@avakhula/ui 0.0.39 → 0.0.41

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": "@avakhula/ui",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -1,20 +1,14 @@
1
1
  <template>
2
- <ib-select
3
- :options="connections"
4
- :is-required="true"
5
- :is-multiple="false"
6
- :show-clear-button="false"
7
- >
8
- </ib-select>
9
-
10
2
  <ib-select
11
3
  :options="roles"
12
4
  :is-required="true"
13
5
  :is-multiple="false"
14
6
  :show-clear-button="false"
15
- :model-value="val"
7
+ v-model:model-value="value"
16
8
  >
17
9
  </ib-select>
10
+
11
+ <button @click="() => value = null">test</button>
18
12
  </template>
19
13
 
20
14
  <script>
@@ -23,7 +17,8 @@ import IbSelect from "./components/TreeSelect/Select.vue";
23
17
  export default {
24
18
  data() {
25
19
  return {
26
- val: 1,
20
+ value: 1,
21
+ value1: "123",
27
22
  connections: [
28
23
  {
29
24
  id: 5,
@@ -85,6 +80,11 @@ export default {
85
80
  components: {
86
81
  IbSelect,
87
82
  },
83
+ watch: {
84
+ value(val) {
85
+ console.log('testsetset')
86
+ },
87
+ },
88
88
  };
89
89
  </script>
90
90
 
@@ -31,6 +31,9 @@ import IbCharacterCount from "../CharactersCount.vue";
31
31
  export default {
32
32
  name: "IbTextarea",
33
33
  props: {
34
+ modelValue: {
35
+ type: String,
36
+ },
34
37
  disabled: {
35
38
  type: Boolean,
36
39
  default: false,
@@ -58,9 +61,15 @@ export default {
58
61
  default: "",
59
62
  },
60
63
  },
64
+ watch: {
65
+ val(val) {
66
+ console.log('test')
67
+ this.$emit("update:modelValue", val);
68
+ }
69
+ },
61
70
  data() {
62
71
  return {
63
- val: "",
72
+ val: this.modelValue,
64
73
  };
65
74
  },
66
75
  methods: {
@@ -379,7 +379,9 @@ export default {
379
379
  this.setPreparedValues();
380
380
  },
381
381
  modelValue(value) {
382
+ this.selected = [];
382
383
  this.val = value;
384
+ console.log('modelValue changet')
383
385
  this.setPreparedValues();
384
386
  },
385
387
  val(value) {
@@ -731,12 +733,9 @@ export default {
731
733
  const values = Object.keys(this.selected);
732
734
  if (this.isMultiple) {
733
735
  this.$emit("update:modelValue", values);
734
- console.log('value updated', values)
735
736
  this.$emit("input", values);
736
737
  } else {
737
738
  this.$emit("update:modelValue", values[0]);
738
- console.log('value updated', values[0])
739
-
740
739
  this.$emit("input", values[0]);
741
740
  }
742
741
  this.$globalEvents.$emit("select-" + this.filterId + ":update", {
@@ -757,8 +756,6 @@ export default {
757
756
  ) {
758
757
  this.selected[option.id] = option;
759
758
  this.$emit("input", Object.keys(this.selected));
760
- console.log('value updated', Object.keys(this.selected))
761
-
762
759
  this.$emit("update:modelValue", Object.keys(this.selected));
763
760
  }
764
761
  } else {
@@ -775,8 +772,6 @@ export default {
775
772
  delete this.selected[option.id];
776
773
  option.checked = false;
777
774
  this.$emit("input", Object.keys(this.selected));
778
- console.log('value updated', Object.keys(this.selected))
779
-
780
775
  this.$emit("update:modelValue", Object.keys(this.selected));
781
776
  }
782
777
 
package/src/main.js CHANGED
@@ -2,10 +2,11 @@ import { createApp } from "vue";
2
2
  import App from "./App.vue";
3
3
  import EventEmitter from "./EventEmmiter";
4
4
 
5
+ window.lang = (key, component, params = {}) => key;
5
6
  const app = createApp(App);
6
7
  app.config.globalProperties.$globalEvents = new EventEmitter();
7
8
  app.config.globalProperties.$emitEvent = function (event, ...args) {
8
9
  this.$emit.apply(this, arguments);
9
10
  this.$emit("all", { event, args });
10
11
  };
11
- app.mount("#app");
12
+ app.mount("#app");