toggle-components-library 1.18.0 → 1.20.1
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/dist/toggle-components-library.common.js +164 -46
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +164 -46
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +3 -3
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +2 -1
- package/src/components/forms/ToggleInputMultiSelect.vue +70 -0
- package/src/index.js +3 -1
- package/src/sass/includes/_as_globals.scss +4 -0
- package/src/sass/includes/_as_inputs.scss +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toggle-components-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"vue-airbnb-style-datepicker": "^2.7.1",
|
|
33
33
|
"vue-color": "^2.7.1",
|
|
34
34
|
"vue-moment": "^4.1.0",
|
|
35
|
+
"vue-multiselect": "^2.0.8",
|
|
35
36
|
"vue-router": "^3.4.3",
|
|
36
37
|
"vue2-dropzone": "^3.6.0",
|
|
37
38
|
"vuedraggable": "^2.24.3",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid }" >
|
|
3
|
+
|
|
4
|
+
<label v-if="label" class="toggle-input-label toggle-float-none" :for="name ? name : 'ToggleInputMultiSelect' ">
|
|
5
|
+
{{label}}
|
|
6
|
+
</label>
|
|
7
|
+
|
|
8
|
+
<div class="input-holder">
|
|
9
|
+
<multiselect v-model="inputVal" :options="options" :multiple="true" :close-on-select="true" :clear-on-select="false" :preserve-search="true" :placeholder="placeholder" label="label" track-by="value" :preselect-first="false">
|
|
10
|
+
</multiselect>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<label class="toggle-input-label-error" v-if="isInvalid" :for="name ? name : 'ToggleInputMultiSelect' ">
|
|
14
|
+
{{ errorMessage }}
|
|
15
|
+
</label>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import Vue from 'vue';
|
|
21
|
+
import Multiselect from 'vue-multiselect';
|
|
22
|
+
import 'vue-multiselect/dist/vue-multiselect.min.css';
|
|
23
|
+
Vue.component('multi-select', Multiselect);
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
components: { Multiselect },
|
|
27
|
+
props: {
|
|
28
|
+
value: {
|
|
29
|
+
type: Array
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: String
|
|
33
|
+
},
|
|
34
|
+
name: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
options: {
|
|
39
|
+
type: Array,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
placeholder: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
isInvalid: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false
|
|
49
|
+
},
|
|
50
|
+
errorMessage: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
inputVal: {
|
|
57
|
+
get(){
|
|
58
|
+
return this.value;
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
set(value){
|
|
62
|
+
this.$emit('input', value);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
<style>
|
|
69
|
+
|
|
70
|
+
</style>
|
package/src/index.js
CHANGED
|
@@ -53,6 +53,7 @@ import ToggleFontPicker from "./components/forms/ToggleFontPicker.vue";
|
|
|
53
53
|
|
|
54
54
|
import ToggleInputNumberUnit from "./components/forms/ToggleInputNumberUnit.vue";
|
|
55
55
|
import ToggleInputLabelLeft from "./components/forms/ToggleInputLabelLeft.vue";
|
|
56
|
+
import ToggleInputMultiSelect from "./components/forms/ToggleInputMultiSelect.vue";
|
|
56
57
|
|
|
57
58
|
import './sass/main.scss';
|
|
58
59
|
|
|
@@ -100,7 +101,8 @@ const Components = {
|
|
|
100
101
|
ToggleInternationalPhoneInputSelect,
|
|
101
102
|
ToggleFontPicker,
|
|
102
103
|
ToggleInputNumberUnit,
|
|
103
|
-
ToggleInputLabelLeft
|
|
104
|
+
ToggleInputLabelLeft,
|
|
105
|
+
ToggleInputMultiSelect
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
Object.keys(Components).forEach(name => {
|