@monoui/vuejs 1.1.10
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/README.md +27 -0
- package/dist/main.js +410 -0
- package/package.json +105 -0
- package/src/components/BreadCrumb/BreadCrumb.vue +59 -0
- package/src/components/BreadCrumb/index.js +3 -0
- package/src/components/Button/Button.vue +118 -0
- package/src/components/Button/ButtonCore.vue +59 -0
- package/src/components/Button/ButtonEdit.vue +15 -0
- package/src/components/Button/ButtonRemove.vue +15 -0
- package/src/components/Button/index.js +4 -0
- package/src/components/Card/Card.vue +82 -0
- package/src/components/Card/CardBody.vue +72 -0
- package/src/components/Card/CardFooter.vue +55 -0
- package/src/components/Card/CardHeader.vue +58 -0
- package/src/components/Card/CardSubTitle.vue +43 -0
- package/src/components/Card/CardText.vue +21 -0
- package/src/components/Card/CardTitle.vue +38 -0
- package/src/components/Card/index.js +17 -0
- package/src/components/Checkbox/Checkbox.vue +72 -0
- package/src/components/Checkbox/index.js +3 -0
- package/src/components/Cron/Cron.vue +68 -0
- package/src/components/Cron/index.js +3 -0
- package/src/components/Date/DatePicker.vue +406 -0
- package/src/components/Date/index.js +3 -0
- package/src/components/Dropdown/Dropdown.vue +51 -0
- package/src/components/Dropdown/DropdownDivider.vue +12 -0
- package/src/components/Dropdown/DropdownItem.vue +23 -0
- package/src/components/Dropdown/index.js +5 -0
- package/src/components/DynamicInput/DynamicInput.vue +192 -0
- package/src/components/DynamicInput/index.js +3 -0
- package/src/components/DynamicInput/inputTypes.js +14 -0
- package/src/components/Icon/Icon.vue +43 -0
- package/src/components/Icon/index.js +3 -0
- package/src/components/Info/Info.vue +19 -0
- package/src/components/Info/index.js +3 -0
- package/src/components/Input/Input.vue +73 -0
- package/src/components/Input/index.js +3 -0
- package/src/components/KeyValue/KeyValue.vue +138 -0
- package/src/components/KeyValue/index.js +3 -0
- package/src/components/KeyValueInput/KeyValueInput.vue +203 -0
- package/src/components/KeyValueInput/index.js +3 -0
- package/src/components/Loader/Loader.vue +82 -0
- package/src/components/Loader/content-loader.js +150 -0
- package/src/components/Loader/index.js +2 -0
- package/src/components/Modal/Alert.vue +96 -0
- package/src/components/Modal/Modal.vue +125 -0
- package/src/components/Modal/RemoveAlert.vue +58 -0
- package/src/components/Modal/UnsavedChangesAlert.vue +83 -0
- package/src/components/Modal/index.js +6 -0
- package/src/components/MultiKeyValue/MultiKeyValue.vue +359 -0
- package/src/components/MultiKeyValue/index.js +3 -0
- package/src/components/NoData/NoData.vue +20 -0
- package/src/components/NoData/index.js +3 -0
- package/src/components/Popover/Popover.vue +91 -0
- package/src/components/Popover/index.js +3 -0
- package/src/components/Select/Select.vue +71 -0
- package/src/components/Select/index.js +3 -0
- package/src/components/Spinner/Spinner.vue +19 -0
- package/src/components/Spinner/index.js +3 -0
- package/src/components/Table/Icons/ArrowDown.vue +18 -0
- package/src/components/Table/Icons/ArrowDownLong.vue +18 -0
- package/src/components/Table/Icons/ArrowUp.vue +18 -0
- package/src/components/Table/Icons/ArrowUpLong.vue +18 -0
- package/src/components/Table/Icons/BaseIcon.vue +46 -0
- package/src/components/Table/Icons/Sorting.vue +16 -0
- package/src/components/Table/Icons/SortingAZ.vue +18 -0
- package/src/components/Table/Icons/SortingArrows.vue +18 -0
- package/src/components/Table/Table.vue +548 -0
- package/src/components/Table/index.js +3 -0
- package/src/components/Tabs/Tab.vue +36 -0
- package/src/components/Tabs/Tabs.vue +44 -0
- package/src/components/Tabs/index.js +4 -0
- package/src/components/TagInput/TagInput.vue +129 -0
- package/src/components/TagInput/index.js +3 -0
- package/src/components/Timeline/Timeline.vue +33 -0
- package/src/components/Timeline/TimelineItem.vue +40 -0
- package/src/components/Timeline/index.js +4 -0
- package/src/components/Tooltip/Tooltip.vue +62 -0
- package/src/components/Tooltip/index.js +3 -0
- package/src/functions/alert.js +40 -0
- package/src/functions/notification.js +51 -0
- package/src/icons.js +144 -0
- package/src/index.js +133 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<mui-alert
|
|
3
|
+
:title="title"
|
|
4
|
+
:text="text"
|
|
5
|
+
type="warning"
|
|
6
|
+
ref="alert"
|
|
7
|
+
:onConfirm="onConfirm"
|
|
8
|
+
confirmButtonText="<i class='fas fa-fw fa-trash'></i> Yes, delete it!"
|
|
9
|
+
confirmButtonColor="#d33"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
/**
|
|
15
|
+
* MonoSign Remove Alert Modal Component
|
|
16
|
+
*/
|
|
17
|
+
export default {
|
|
18
|
+
name: "mui-remove-alert",
|
|
19
|
+
props: {
|
|
20
|
+
/**
|
|
21
|
+
* Header title.
|
|
22
|
+
* @type String
|
|
23
|
+
*/
|
|
24
|
+
title: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: false,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* Modal content.
|
|
31
|
+
* @type String
|
|
32
|
+
*/
|
|
33
|
+
text: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* The method triggered when confirm button clicked.
|
|
40
|
+
* @type Function
|
|
41
|
+
* @event onConfirm
|
|
42
|
+
*/
|
|
43
|
+
onConfirm: {
|
|
44
|
+
type: Function,
|
|
45
|
+
required: false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
/**
|
|
50
|
+
* Show modal
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
show() {
|
|
54
|
+
this.$refs.alert.show();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<mui-alert
|
|
3
|
+
:title="title"
|
|
4
|
+
:text="text"
|
|
5
|
+
:type="type"
|
|
6
|
+
ref="alert"
|
|
7
|
+
:onConfirm="onConfirm"
|
|
8
|
+
:confirmButtonText="confirmButtonText"
|
|
9
|
+
:confirmButtonColor="confirmButtonColor"
|
|
10
|
+
:denyButtonText="denyButtonText"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
/**
|
|
16
|
+
* MonoSign Unsaved Changes Alert Modal Component
|
|
17
|
+
*/
|
|
18
|
+
export default {
|
|
19
|
+
name: "mui-unsaved-changes-alert",
|
|
20
|
+
props: {
|
|
21
|
+
/**
|
|
22
|
+
* Header title.
|
|
23
|
+
* @type String
|
|
24
|
+
*/
|
|
25
|
+
title: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
default: "Unsaved Changes"
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Modal content.
|
|
32
|
+
* @type String
|
|
33
|
+
*/
|
|
34
|
+
text: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "Are you sure you want to discard?"
|
|
38
|
+
},
|
|
39
|
+
confirmButtonText: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
default: "Yes, discard!"
|
|
43
|
+
},
|
|
44
|
+
denyButtonText: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false,
|
|
47
|
+
default: "No, stay!"
|
|
48
|
+
},
|
|
49
|
+
confirmButtonColor: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false,
|
|
52
|
+
default: "#d33"
|
|
53
|
+
},
|
|
54
|
+
type: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false,
|
|
57
|
+
default: "info"
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The method triggered when confirm button clicked.
|
|
62
|
+
* @type Function
|
|
63
|
+
* @event onConfirm
|
|
64
|
+
*/
|
|
65
|
+
onConfirm: {
|
|
66
|
+
type: Function,
|
|
67
|
+
required: false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
/**
|
|
72
|
+
* Show modal
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
show() {
|
|
76
|
+
this.$refs.alert.show();
|
|
77
|
+
},
|
|
78
|
+
hide() {
|
|
79
|
+
this.$refs.alert.hide();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-responsive">
|
|
3
|
+
<table
|
|
4
|
+
class="table table-condensed table-hover text-monospace table-sm"
|
|
5
|
+
>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th
|
|
9
|
+
scope="col"
|
|
10
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
11
|
+
>
|
|
12
|
+
<select
|
|
13
|
+
class="form-control"
|
|
14
|
+
v-model="objectMapping[modeName]"
|
|
15
|
+
>
|
|
16
|
+
<option :value="null" disabled
|
|
17
|
+
>Select {{ modeName }}</option
|
|
18
|
+
>
|
|
19
|
+
<option
|
|
20
|
+
v-for="modeOption in modeOptions"
|
|
21
|
+
:key="modeOption.value"
|
|
22
|
+
:value="modeOption.value"
|
|
23
|
+
>{{ modeOption.text }}</option
|
|
24
|
+
>
|
|
25
|
+
</select>
|
|
26
|
+
</th>
|
|
27
|
+
<th
|
|
28
|
+
scope="col"
|
|
29
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
30
|
+
>
|
|
31
|
+
<select
|
|
32
|
+
class="form-control"
|
|
33
|
+
v-model="objectMapping[typeName]"
|
|
34
|
+
>
|
|
35
|
+
<option :value="null" disabled
|
|
36
|
+
>Select {{ typeName }}</option
|
|
37
|
+
>
|
|
38
|
+
<option
|
|
39
|
+
v-for="typeOption in typeOptions"
|
|
40
|
+
:key="typeOption.value"
|
|
41
|
+
:value="typeOption.value"
|
|
42
|
+
>{{ typeOption.text }}</option
|
|
43
|
+
>
|
|
44
|
+
</select>
|
|
45
|
+
</th>
|
|
46
|
+
<th
|
|
47
|
+
scope="col"
|
|
48
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
49
|
+
>
|
|
50
|
+
<input
|
|
51
|
+
type="text"
|
|
52
|
+
class="form-control"
|
|
53
|
+
v-model="objectMapping[keyName]"
|
|
54
|
+
@keyup.enter="addMapping"
|
|
55
|
+
:placeholder="keyName"
|
|
56
|
+
/>
|
|
57
|
+
</th>
|
|
58
|
+
<th
|
|
59
|
+
scope="col"
|
|
60
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
61
|
+
>
|
|
62
|
+
<input
|
|
63
|
+
type="text"
|
|
64
|
+
class="form-control"
|
|
65
|
+
v-model="objectMapping[valueName]"
|
|
66
|
+
@keyup.enter="addMapping"
|
|
67
|
+
:placeholder="valueName"
|
|
68
|
+
/>
|
|
69
|
+
</th>
|
|
70
|
+
<th
|
|
71
|
+
scope="col"
|
|
72
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
73
|
+
>
|
|
74
|
+
<input
|
|
75
|
+
type="text"
|
|
76
|
+
class="form-control"
|
|
77
|
+
v-model="objectMapping[formatName]"
|
|
78
|
+
@keyup.enter="addMapping"
|
|
79
|
+
:placeholder="formatName"
|
|
80
|
+
/>
|
|
81
|
+
</th>
|
|
82
|
+
<th
|
|
83
|
+
scope="col"
|
|
84
|
+
class="pl-1 pr-1 align-text-bottom non-border"
|
|
85
|
+
></th>
|
|
86
|
+
<th
|
|
87
|
+
scope="col"
|
|
88
|
+
class="pl-1 pr-1 align-text-bottom non-border align-middle"
|
|
89
|
+
>
|
|
90
|
+
<mui-button
|
|
91
|
+
variant="light"
|
|
92
|
+
@click="addMapping"
|
|
93
|
+
icon="plus-circle"
|
|
94
|
+
:iconClass="'mr-1'"
|
|
95
|
+
:text="'Add'"
|
|
96
|
+
/>
|
|
97
|
+
</th>
|
|
98
|
+
</tr>
|
|
99
|
+
</thead>
|
|
100
|
+
<tbody>
|
|
101
|
+
<tr v-for="(mapping, index) in data" :key="index">
|
|
102
|
+
<td>
|
|
103
|
+
<select
|
|
104
|
+
class="form-control none-border"
|
|
105
|
+
v-model="mapping[modeName]"
|
|
106
|
+
@change="emitData"
|
|
107
|
+
>
|
|
108
|
+
<option :value="null" disabled
|
|
109
|
+
>Select {{ modeName }}</option
|
|
110
|
+
>
|
|
111
|
+
<option
|
|
112
|
+
v-for="modeOption in modeOptions"
|
|
113
|
+
:key="modeOption.value"
|
|
114
|
+
:value="modeOption.value"
|
|
115
|
+
>{{ modeOption.text }}</option
|
|
116
|
+
>
|
|
117
|
+
</select>
|
|
118
|
+
</td>
|
|
119
|
+
<td>
|
|
120
|
+
<select
|
|
121
|
+
class="form-control none-border"
|
|
122
|
+
v-model="mapping[typeName]"
|
|
123
|
+
@change="emitData"
|
|
124
|
+
>
|
|
125
|
+
<option :value="null" disabled
|
|
126
|
+
>Select {{ typeName }}</option
|
|
127
|
+
>
|
|
128
|
+
<option
|
|
129
|
+
v-for="typeOption in typeOptions"
|
|
130
|
+
:key="typeOption.value"
|
|
131
|
+
:value="typeOption.value"
|
|
132
|
+
>{{ typeOption.text }}</option
|
|
133
|
+
>
|
|
134
|
+
</select>
|
|
135
|
+
</td>
|
|
136
|
+
<td>
|
|
137
|
+
<b-input
|
|
138
|
+
type="text"
|
|
139
|
+
class="form-control none-border"
|
|
140
|
+
v-model="mapping[keyName]"
|
|
141
|
+
@change="emitData"
|
|
142
|
+
/>
|
|
143
|
+
</td>
|
|
144
|
+
<td>
|
|
145
|
+
<b-input
|
|
146
|
+
type="text"
|
|
147
|
+
class="form-control none-border"
|
|
148
|
+
v-model="mapping[valueName]"
|
|
149
|
+
@change="emitData"
|
|
150
|
+
/>
|
|
151
|
+
</td>
|
|
152
|
+
<td>
|
|
153
|
+
<b-input
|
|
154
|
+
type="text"
|
|
155
|
+
class="form-control none-border"
|
|
156
|
+
v-model="mapping[formatName]"
|
|
157
|
+
@change="emitData"
|
|
158
|
+
/>
|
|
159
|
+
</td>
|
|
160
|
+
<td class="text-center align-middle">
|
|
161
|
+
<div>
|
|
162
|
+
<b-checkbox
|
|
163
|
+
switch
|
|
164
|
+
v-model="mapping[activeName]"
|
|
165
|
+
@change="changeActive($event, mapping)"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</td>
|
|
169
|
+
<td class="pl-1 pr-0 text-left align-middle">
|
|
170
|
+
<button
|
|
171
|
+
class="btn btn-xs"
|
|
172
|
+
@click="
|
|
173
|
+
removeMapping(
|
|
174
|
+
mapping[keyName],
|
|
175
|
+
mapping[valueName]
|
|
176
|
+
)
|
|
177
|
+
"
|
|
178
|
+
>
|
|
179
|
+
<i
|
|
180
|
+
aria-hidden="true"
|
|
181
|
+
class="fas fa-fw fa-trash"
|
|
182
|
+
></i>
|
|
183
|
+
</button>
|
|
184
|
+
</td>
|
|
185
|
+
</tr>
|
|
186
|
+
</tbody>
|
|
187
|
+
</table>
|
|
188
|
+
</div>
|
|
189
|
+
</template>
|
|
190
|
+
|
|
191
|
+
<script>
|
|
192
|
+
export default {
|
|
193
|
+
name: "mui-multi-key-value",
|
|
194
|
+
props: {
|
|
195
|
+
value: {
|
|
196
|
+
required: true
|
|
197
|
+
},
|
|
198
|
+
typeName: {
|
|
199
|
+
type: String,
|
|
200
|
+
default: "type"
|
|
201
|
+
},
|
|
202
|
+
typeOptions: {
|
|
203
|
+
type: Array
|
|
204
|
+
},
|
|
205
|
+
keyName: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: "key"
|
|
208
|
+
},
|
|
209
|
+
valueName: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: "value"
|
|
212
|
+
},
|
|
213
|
+
formatName: {
|
|
214
|
+
type: String,
|
|
215
|
+
default: "format"
|
|
216
|
+
},
|
|
217
|
+
activeName: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: "active"
|
|
220
|
+
},
|
|
221
|
+
modeName: {
|
|
222
|
+
type: String,
|
|
223
|
+
default: "mode"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
watch: {
|
|
227
|
+
data() {
|
|
228
|
+
this.emitData();
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
data() {
|
|
232
|
+
return {
|
|
233
|
+
objectMapping: {
|
|
234
|
+
[this.modeName]: null,
|
|
235
|
+
[this.typeName]: null,
|
|
236
|
+
[this.keyName]: null,
|
|
237
|
+
[this.valueName]: null,
|
|
238
|
+
[this.formatName]: null,
|
|
239
|
+
[this.activeName]: true
|
|
240
|
+
},
|
|
241
|
+
data: null,
|
|
242
|
+
modeOptions: [
|
|
243
|
+
{ value: "0", text: "None" },
|
|
244
|
+
{ value: "1", text: "Full" },
|
|
245
|
+
{ value: "2", text: "Incremental" }
|
|
246
|
+
]
|
|
247
|
+
};
|
|
248
|
+
},
|
|
249
|
+
created() {
|
|
250
|
+
if (
|
|
251
|
+
this.value === null ||
|
|
252
|
+
this.value == "null" ||
|
|
253
|
+
this.value === undefined
|
|
254
|
+
) {
|
|
255
|
+
this.data = [];
|
|
256
|
+
} else if (typeof this.value === "string") {
|
|
257
|
+
this.data = JSON.parse(this.value);
|
|
258
|
+
} else {
|
|
259
|
+
this.data = this.value;
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
methods: {
|
|
263
|
+
addMapping() {
|
|
264
|
+
let modeValue = this.objectMapping[this.modeName];
|
|
265
|
+
if (modeValue === null || modeValue === "") return;
|
|
266
|
+
|
|
267
|
+
let typeValue = this.objectMapping[this.typeName];
|
|
268
|
+
if (typeValue === null || typeValue === "") return;
|
|
269
|
+
|
|
270
|
+
let keyValue = this.objectMapping[this.keyName];
|
|
271
|
+
if (keyValue === null || keyValue === "") return;
|
|
272
|
+
|
|
273
|
+
let valueValue = this.objectMapping[this.valueName];
|
|
274
|
+
if (valueValue === null || valueValue === "") return;
|
|
275
|
+
|
|
276
|
+
let formatValue = this.objectMapping[this.formatName];
|
|
277
|
+
|
|
278
|
+
const isValidDataMapping =
|
|
279
|
+
modeValue.trim().replace(" ", "").length > 0 &&
|
|
280
|
+
typeValue.trim().replace(" ", "").length > 0 &&
|
|
281
|
+
keyValue.trim().replace(" ", "").length > 0 &&
|
|
282
|
+
valueValue.trim().replace(" ", "").length > 0;
|
|
283
|
+
|
|
284
|
+
const isHaveSameDataMapping = this.isHaveSameDataMapping();
|
|
285
|
+
|
|
286
|
+
if (isValidDataMapping && !isHaveSameDataMapping) {
|
|
287
|
+
this.data.push({
|
|
288
|
+
[this.modeName]: modeValue.trim().replace(" ", ""),
|
|
289
|
+
[this.typeName]: typeValue.trim().replace(" ", ""),
|
|
290
|
+
[this.keyName]: keyValue.trim().replace(" ", ""),
|
|
291
|
+
[this.valueName]: valueValue.trim().replace(" ", ""),
|
|
292
|
+
[this.formatName]: formatValue === null ? "" : formatValue,
|
|
293
|
+
[this.activeName]: true
|
|
294
|
+
});
|
|
295
|
+
this.clearInputs();
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
isHaveSameDataMapping() {
|
|
299
|
+
let index = this.data.findIndex(val => {
|
|
300
|
+
return (
|
|
301
|
+
val[this.keyName] ===
|
|
302
|
+
this.objectMapping[this.keyName]
|
|
303
|
+
.trim()
|
|
304
|
+
.replace(" ", "") &&
|
|
305
|
+
val[this.modeName] === this.objectMapping[this.modeName]
|
|
306
|
+
);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
return index !== -1;
|
|
310
|
+
},
|
|
311
|
+
clearInputs() {
|
|
312
|
+
this.objectMapping[this.modeName] = null;
|
|
313
|
+
this.objectMapping[this.typeName] = null;
|
|
314
|
+
this.objectMapping[this.keyName] = null;
|
|
315
|
+
this.objectMapping[this.valueName] = null;
|
|
316
|
+
this.objectMapping[this.formatName] = "";
|
|
317
|
+
this.objectMapping[this.activeName] = true;
|
|
318
|
+
},
|
|
319
|
+
removeMapping(key, value) {
|
|
320
|
+
key = key.trim().replace(" ", "");
|
|
321
|
+
let index = this.data.findIndex(val => {
|
|
322
|
+
return (
|
|
323
|
+
val[this.keyName] === key && val[this.valueName] === value
|
|
324
|
+
);
|
|
325
|
+
});
|
|
326
|
+
if (index !== -1) {
|
|
327
|
+
this.data.splice(index, 1);
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
changeActive(isActive, mapping) {
|
|
331
|
+
let param = this.data.find(
|
|
332
|
+
x =>
|
|
333
|
+
x[this.modeName] === mapping[this.modeName] &&
|
|
334
|
+
x[this.typeName] === mapping[this.typeName] &&
|
|
335
|
+
x[this.keyName] === mapping[this.keyName] &&
|
|
336
|
+
x[this.valueName] === mapping[this.valueName] &&
|
|
337
|
+
x[this.activeName] === mapping[this.activeName]
|
|
338
|
+
);
|
|
339
|
+
param[this.activeName] = isActive;
|
|
340
|
+
|
|
341
|
+
this.emitData();
|
|
342
|
+
},
|
|
343
|
+
emitData() {
|
|
344
|
+
let changedData = JSON.stringify(this.data);
|
|
345
|
+
this.$emit("input", changedData);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
</script>
|
|
350
|
+
|
|
351
|
+
<style scoped>
|
|
352
|
+
.non-border {
|
|
353
|
+
border-top: none !important;
|
|
354
|
+
border-bottom: none !important;
|
|
355
|
+
}
|
|
356
|
+
.none-border {
|
|
357
|
+
border: none !important;
|
|
358
|
+
}
|
|
359
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="card">
|
|
3
|
+
<div class="card-body">
|
|
4
|
+
<mui-icon icon="exclamation-triangle" class="mr-1" /> {{ message }}
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: "mui-no-data",
|
|
12
|
+
props: {
|
|
13
|
+
message: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "There is no data in this section."
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
mounted() {}
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<b-popover
|
|
3
|
+
ref="popover"
|
|
4
|
+
v-bind="this.$props"
|
|
5
|
+
@show="onShow"
|
|
6
|
+
@shown="onShown"
|
|
7
|
+
@hide="onHide"
|
|
8
|
+
@hidden="onHidden"
|
|
9
|
+
@enabled="onEnabled"
|
|
10
|
+
@disabled="onDisabled"
|
|
11
|
+
>
|
|
12
|
+
<template v-slot:title>
|
|
13
|
+
<slot name="title"></slot>
|
|
14
|
+
</template>
|
|
15
|
+
<template v-slot:default>
|
|
16
|
+
<slot name="default"></slot>
|
|
17
|
+
</template>
|
|
18
|
+
</b-popover>
|
|
19
|
+
</template>
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: "mui-popover",
|
|
23
|
+
props: {
|
|
24
|
+
id: {},
|
|
25
|
+
target: {
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
title: {},
|
|
29
|
+
content: {},
|
|
30
|
+
placement: {
|
|
31
|
+
default: "right"
|
|
32
|
+
},
|
|
33
|
+
fallbackPlacement: {
|
|
34
|
+
default: "flip"
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
triggers: {
|
|
41
|
+
default: "click"
|
|
42
|
+
},
|
|
43
|
+
noFade: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
delay: {
|
|
48
|
+
default: 50
|
|
49
|
+
},
|
|
50
|
+
offset: {
|
|
51
|
+
default: 0
|
|
52
|
+
},
|
|
53
|
+
container: {},
|
|
54
|
+
boundary: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "scrollParent"
|
|
57
|
+
},
|
|
58
|
+
boundaryPadding: {
|
|
59
|
+
default: 5
|
|
60
|
+
},
|
|
61
|
+
variant: {},
|
|
62
|
+
customClass: {}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
onShow(event) {
|
|
66
|
+
this.$emit("show", event);
|
|
67
|
+
},
|
|
68
|
+
onShown(event) {
|
|
69
|
+
this.$emit("shown", event);
|
|
70
|
+
},
|
|
71
|
+
onHide(event) {
|
|
72
|
+
this.$emit("hide", event);
|
|
73
|
+
},
|
|
74
|
+
onHidden(event) {
|
|
75
|
+
this.$emit("hidden", event);
|
|
76
|
+
},
|
|
77
|
+
onEnabled(event) {
|
|
78
|
+
this.$emit("enabled", event);
|
|
79
|
+
},
|
|
80
|
+
onDisabled(event) {
|
|
81
|
+
this.$emit("disabled", event);
|
|
82
|
+
},
|
|
83
|
+
showPopover() {
|
|
84
|
+
this.$refs.popover.$emit("open");
|
|
85
|
+
},
|
|
86
|
+
hidePopover() {
|
|
87
|
+
this.$refs.popover.$emit("close");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
</script>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<multiselect v-on="$listeners" v-bind="$props" :options="options">
|
|
3
|
+
</multiselect>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Multiselect from "vue-multiselect";
|
|
8
|
+
import "vue-multiselect/dist/vue-multiselect.min.css";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "mui-select",
|
|
12
|
+
components: { Multiselect },
|
|
13
|
+
props: {
|
|
14
|
+
value: {},
|
|
15
|
+
options: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
placeholder: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
"close-on-select": {},
|
|
24
|
+
"show-labels": {},
|
|
25
|
+
"select-label": {},
|
|
26
|
+
"deselect-label": {},
|
|
27
|
+
"allow-empty": {},
|
|
28
|
+
"group-values": {},
|
|
29
|
+
"group-select": {},
|
|
30
|
+
"group-label": {},
|
|
31
|
+
"track-by": {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "id",
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
label: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "text",
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
searchable: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style lang="css">
|
|
50
|
+
.multiselect__element {
|
|
51
|
+
font-size: 10pt;
|
|
52
|
+
}
|
|
53
|
+
.multiselect {
|
|
54
|
+
min-height: 34px;
|
|
55
|
+
}
|
|
56
|
+
.multiselect__select {
|
|
57
|
+
height: 34px;
|
|
58
|
+
}
|
|
59
|
+
.multiselect__tags {
|
|
60
|
+
height: 32px;
|
|
61
|
+
}
|
|
62
|
+
.multiselect__tags {
|
|
63
|
+
border: 1px solid #ddd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.multiselect__tags input,
|
|
67
|
+
.multiselect__placeholder,
|
|
68
|
+
.multiselect__single {
|
|
69
|
+
font-size: 10pt;
|
|
70
|
+
}
|
|
71
|
+
</style>
|