@avakhula/ui 0.0.33 → 0.0.35

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.33",
3
+ "version": "0.0.35",
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,32 +1,90 @@
1
1
  <template>
2
- test
3
- <ib-panel>
4
- <template #title>
5
- Some title
6
- </template>
7
- <template #head-content>Some long long description</template>
8
- <template #body>
9
- <p>tests</p>
10
- <p>tests</p>
11
- <p>tests</p>
12
- <p>tests</p>
13
- <p>tests</p>
14
- <p>tests</p>
15
- <p>tests</p>
16
- <p>tests</p>
17
- <p>tests</p>
18
- </template>
19
- </ib-panel>
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
+ <ib-select
11
+ :options="roles"
12
+ :is-required="true"
13
+ :is-multiple="false"
14
+ :show-clear-button="false"
15
+ :model-value="val"
16
+ >
17
+ </ib-select>
20
18
  </template>
21
19
 
22
20
  <script>
23
- // import IbPanel from "./components/Panel/Panel.vue"
24
- import { IbPanel } from "./index";
21
+ import IbSelect from "./components/TreeSelect/Select.vue";
22
+
25
23
  export default {
24
+ data() {
25
+ return {
26
+ val: 1,
27
+ connections: [
28
+ {
29
+ id: 5,
30
+ title: "Blackboard Demo",
31
+ lms_connection_type: 3,
32
+ initiallyVisible: true,
33
+ visible: true,
34
+ isDisabled: false,
35
+ checked: false,
36
+ },
37
+ {
38
+ id: 3,
39
+ title: "Ilias",
40
+ lms_connection_type: 16,
41
+ initiallyVisible: true,
42
+ visible: true,
43
+ isDisabled: false,
44
+ checked: true,
45
+ },
46
+ {
47
+ id: 9,
48
+ title: "Ilias Don't Delete Pol",
49
+ lms_connection_type: 16,
50
+ initiallyVisible: true,
51
+ visible: true,
52
+ isDisabled: false,
53
+ checked: false,
54
+ },
55
+ {
56
+ id: 10,
57
+ title: "Sakai Demo",
58
+ lms_connection_type: 18,
59
+ initiallyVisible: true,
60
+ visible: true,
61
+ isDisabled: false,
62
+ checked: false,
63
+ },
64
+ ],
65
+ roles: [
66
+ {
67
+ id: 1,
68
+ title: "test role",
69
+ initiallyVisible: true,
70
+ visible: true,
71
+ isDisabled: false,
72
+ checked: false,
73
+ },
74
+ {
75
+ id: 2,
76
+ title: "testset",
77
+ initiallyVisible: true,
78
+ visible: true,
79
+ isDisabled: false,
80
+ checked: false,
81
+ },
82
+ ],
83
+ };
84
+ },
26
85
  components: {
27
- IbPanel,
86
+ IbSelect,
28
87
  },
29
88
  };
30
89
  </script>
31
- <style lang="scss">
32
- </style>
90
+
@@ -234,6 +234,13 @@ import List from "../List.vue";
234
234
  export default {
235
235
  name: "IbTreeSelect",
236
236
  props: {
237
+ lang: {
238
+ type: Function,
239
+ default: (key) => key,
240
+ },
241
+ LANG_COMPONENTS: {
242
+ type: Object,
243
+ },
237
244
  placeholder: {
238
245
  type: String,
239
246
  default: "",
@@ -434,6 +441,7 @@ export default {
434
441
  },
435
442
  },
436
443
  mounted() {
444
+ console.log(this.lang, this.LANG_COMPONENTS)
437
445
  this.marker = new Mark(this.$refs.list.$el);
438
446
 
439
447
  this.registerDependency();
@@ -481,45 +489,48 @@ export default {
481
489
  uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
482
490
  actualStrings: {
483
491
  ...{
484
- searchPlaceholder: "Search placeholder",
485
- // this.lang(
486
- // this.searchPlaceholderText.length
487
- // ? this.searchPlaceholderText
488
- // : "search_placeholder",
489
- // LANG_COMPONENTS.COMPONENT_SELECT
490
- // ),
491
- emptyTitle: "Empty title",
492
- // this.lang(
493
- // "empty_title",
494
- // LANG_COMPONENTS.COMPONENT_SELECT
495
- // ),
496
- selectAllOptions: "All Options",
497
- // this.lang(
498
- // "all_options",
499
- // LANG_COMPONENTS.COMPONENT_SELECT
500
- // ),
501
- allSelected: "All selected",
502
- // this.lang(
503
- // "all_selected",
504
- // LANG_COMPONENTS.COMPONENT_SELECT
505
- // ),
506
- loading: "loading",
507
- // this.lang("loading", LANG_COMPONENTS.COMPONENT_SELECT) + "...",
508
- selectedCount: "Selected {selected} of {all} items",
509
- // this.lang(
510
- // "selected_count",
511
- // LANG_COMPONENTS.COMPONENT_SELECT
512
- // ),
513
- buttonTitle: "Button title",
514
- // this.buttonTitle ||
515
- // this.lang("button_title", LANG_COMPONENTS.COMPONENT_SELECT),
516
- requiredDependencyNotFilled: "Required dependency are not filled",
517
- // // eslint-disable-next-line vue/no-computed-properties-in-data
518
- // this.requiredDependencyNotFilled ||
519
- // this.lang(
520
- // "required_dependency_are_not_filled",
521
- // LANG_COMPONENTS.COMPONENT_SELECT
522
- // ),
492
+ // searchPlaceholder: "Search placeholder",
493
+ searchPlaceholder: this.lang(
494
+ this.searchPlaceholderText.length
495
+ ? this.searchPlaceholderText
496
+ : "search_placeholder",
497
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
498
+ ),
499
+ // emptyTitle: "Empty title",
500
+ emptyTitle: this.lang(
501
+ "empty_title",
502
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
503
+ ),
504
+ // selectAllOptions: "All Options",
505
+ selectAllOptions: this.lang(
506
+ "all_options",
507
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
508
+ ),
509
+ // allSelected: "All selected",
510
+ allSelected: this.lang(
511
+ "all_selected",
512
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
513
+ ),
514
+ // loading: "loading",
515
+ loading:
516
+ this.lang("loading", this.LANG_COMPONENTS?.COMPONENT_SELECT) + "...",
517
+ // selectedCount: "Selected {selected} of {all} items",
518
+ selectedCount: this.lang(
519
+ "selected_count",
520
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
521
+ ),
522
+ // buttonTitle: "Button title",
523
+ buttonTitle:
524
+ this.buttonTitle ||
525
+ this.lang("button_title", this.LANG_COMPONENTS?.COMPONENT_SELECT),
526
+ // requiredDependencyNotFilled: "Required dependency are not filled",
527
+ requiredDependencyNotFilled:
528
+ // eslint-disable-next-line vue/no-computed-properties-in-data
529
+ this.requiredDependencyNotFilled ||
530
+ this.lang(
531
+ "required_dependency_are_not_filled",
532
+ this.LANG_COMPONENTS?.COMPONENT_SELECT
533
+ ),
523
534
  },
524
535
  ...this.strings,
525
536
  },