@dative-gpi/foundation-shared-components 0.0.124 → 0.0.125

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.
@@ -174,6 +174,7 @@
174
174
  :validateOn="validateOn"
175
175
  :modelValue="$props.modelValue"
176
176
  @update:modelValue="onUpdate"
177
+ @click="onClick"
177
178
  @blur="blurred = true"
178
179
  v-model:search="search"
179
180
  v-bind="$attrs"
@@ -537,33 +538,39 @@ export default defineComponent({
537
538
  };
538
539
 
539
540
  const onRadioChange = (value: any) => {
540
- emit('update:modelValue', value);
541
+ emit("update:modelValue", value);
541
542
  dialog.value = false;
542
543
  };
543
544
 
544
545
  const onCheckboxChange = (value: any) => {
545
546
  if (Array.isArray(props.modelValue)) {
546
547
  if (props.modelValue.includes(value)) {
547
- emit('update:modelValue', props.modelValue.filter((item: any) => item !== value));
548
+ emit("update:modelValue", props.modelValue.filter((item: any) => item !== value));
548
549
  }
549
550
  else {
550
- emit('update:modelValue', [...props.modelValue, value]);
551
+ emit("update:modelValue", [...props.modelValue, value]);
551
552
  }
552
553
  }
553
554
  else {
554
555
  if (props.modelValue === value) {
555
- emit('update:modelValue', []);
556
+ emit("update:modelValue", []);
556
557
  }
557
558
  else {
558
- emit('update:modelValue', [props.modelValue, value]);
559
+ emit("update:modelValue", [props.modelValue, value]);
559
560
  }
560
561
  }
561
562
  };
562
563
 
563
564
  const onUpdate = (value: string[] | string) => {
564
- emit('update:modelValue', value);
565
+ emit("update:modelValue", value);
565
566
  };
566
567
 
568
+ const onClick = () => {
569
+ search.value = "";
570
+ emit("update:search", search.value);
571
+ emit("update:modelValue", null);
572
+ }
573
+
567
574
  watch(search, () => {
568
575
  emit("update:search", search.value);
569
576
  });
@@ -590,7 +597,8 @@ export default defineComponent({
590
597
  onCheckboxChange,
591
598
  mobileItemProps,
592
599
  onRadioChange,
593
- onUpdate
600
+ onUpdate,
601
+ onClick
594
602
  };
595
603
  }
596
604
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.124",
4
+ "version": "0.0.125",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.0.124",
14
- "@dative-gpi/foundation-shared-services": "0.0.124",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.125",
14
+ "@dative-gpi/foundation-shared-services": "0.0.125",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "37128d517dbaf731a08637d60b8b996b4d6e8019"
35
+ "gitHead": "d86e2497538681c5758fe0621a34497cbc395997"
36
36
  }