@avakhula/ui 0.0.38 → 0.0.40

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.38",
3
+ "version": "0.0.40",
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: {
@@ -235,9 +235,6 @@ export default {
235
235
  name: "IbTreeSelect",
236
236
  inject: ["LANG_COMPONENTS"],
237
237
  props: {
238
- // LANG_COMPONENTS: {
239
- // type: Object,
240
- // },
241
238
  placeholder: {
242
239
  type: String,
243
240
  default: "",
@@ -438,7 +435,6 @@ export default {
438
435
  },
439
436
  },
440
437
  mounted() {
441
- console.log(lang, typeof(lang), 'lang', this.LANG_COMPONENTS, 'LANG_COMPONENTS')
442
438
  this.marker = new Mark(this.$refs.list.$el);
443
439
 
444
440
  this.registerDependency();
@@ -486,41 +482,33 @@ export default {
486
482
  uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
487
483
  actualStrings: {
488
484
  ...{
489
- // searchPlaceholder: "Search placeholder",
490
485
  searchPlaceholder: lang(
491
486
  this.searchPlaceholderText.length
492
487
  ? this.searchPlaceholderText
493
488
  : "search_placeholder",
494
489
  this.LANG_COMPONENTS?.COMPONENT_SELECT
495
490
  ),
496
- // emptyTitle: "Empty title",
497
491
  emptyTitle: lang(
498
492
  "empty_title",
499
493
  this.LANG_COMPONENTS?.COMPONENT_SELECT
500
494
  ),
501
- // selectAllOptions: "All Options",
502
495
  selectAllOptions: lang(
503
496
  "all_options",
504
497
  this.LANG_COMPONENTS?.COMPONENT_SELECT
505
498
  ),
506
- // allSelected: "All selected",
507
499
  allSelected: lang(
508
500
  "all_selected",
509
501
  this.LANG_COMPONENTS?.COMPONENT_SELECT
510
502
  ),
511
- // loading: "loading",
512
503
  loading:
513
504
  lang("loading", this.LANG_COMPONENTS?.COMPONENT_SELECT) + "...",
514
- // selectedCount: "Selected {selected} of {all} items",
515
505
  selectedCount: lang(
516
506
  "selected_count",
517
507
  this.LANG_COMPONENTS?.COMPONENT_SELECT
518
508
  ),
519
- // buttonTitle: "Button title",
520
509
  buttonTitle:
521
510
  this.buttonTitle ||
522
511
  lang("button_title", this.LANG_COMPONENTS?.COMPONENT_SELECT),
523
- // requiredDependencyNotFilled: "Required dependency are not filled",
524
512
  requiredDependencyNotFilled:
525
513
  // eslint-disable-next-line vue/no-computed-properties-in-data
526
514
  this.requiredDependencyNotFilled ||
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");