glib-web 4.34.3 → 4.34.4
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.
|
@@ -16,14 +16,9 @@
|
|
|
16
16
|
<glib-component :spec="item.raw" />
|
|
17
17
|
</v-list-subheader>
|
|
18
18
|
<v-divider v-else-if="item.raw.divider"></v-divider>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<v-list-item-action start v-if="spec.multiple">
|
|
23
|
-
<v-checkbox-btn :model-value="isActive"></v-checkbox-btn>
|
|
24
|
-
</v-list-item-action>
|
|
25
|
-
</template>
|
|
26
|
-
</v-list-item>
|
|
19
|
+
<select-item-default v-else-if="!item.raw.imageUrl" :context="props" :item="item"
|
|
20
|
+
:spec="spec"></select-item-default>
|
|
21
|
+
<select-item-with-image :context="props" :item="item" :spec="spec" v-else></select-item-with-image>
|
|
27
22
|
</div>
|
|
28
23
|
</template>
|
|
29
24
|
|
|
@@ -65,8 +60,14 @@ import { triggerOnChange, triggerOnInput, useGlibInput } from "../composable/for
|
|
|
65
60
|
import Hash from '../../utils/hash';
|
|
66
61
|
import { useGlibSelectable, watchNoneOfAbove } from '../composable/selectable';
|
|
67
62
|
import { ref } from 'vue';
|
|
63
|
+
import SelectItemDefault from "./_selectItemDefault.vue";
|
|
64
|
+
import SelectItemWithImage from "./_selectItemWithImage.vue";
|
|
68
65
|
|
|
69
66
|
export default {
|
|
67
|
+
components: {
|
|
68
|
+
'select-item-default': SelectItemDefault,
|
|
69
|
+
'select-item-with-image': SelectItemWithImage
|
|
70
|
+
},
|
|
70
71
|
mixins: [inputVariant],
|
|
71
72
|
props: {
|
|
72
73
|
spec: { type: Object, required: true },
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-list-item v-bind="props.context" :disabled="props.item.raw.disabled">
|
|
3
|
+
<template v-slot:prepend="{ isActive }">
|
|
4
|
+
<glib-component v-if="props.item.raw.icon" :spec="itemIconSpec(props.item.raw.icon)" />
|
|
5
|
+
<v-list-item-action start v-if="props.spec.multiple">
|
|
6
|
+
<v-checkbox-btn :model-value="isActive"></v-checkbox-btn>
|
|
7
|
+
</v-list-item-action>
|
|
8
|
+
</template>
|
|
9
|
+
</v-list-item>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
const props = defineProps(['context', 'item', 'spec']);
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-list-item v-bind="props.context" :disabled="props.item.raw.disabled">
|
|
3
|
+
<template v-slot:prepend>
|
|
4
|
+
<v-avatar size="24" color="white">
|
|
5
|
+
<v-img :src="props.item.raw.imageUrl"></v-img>
|
|
6
|
+
</v-avatar>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-slot:append="{ isActive }">
|
|
9
|
+
<v-list-item-action start v-if="props.spec.multiple">
|
|
10
|
+
<v-checkbox-btn :model-value="isActive"></v-checkbox-btn>
|
|
11
|
+
</v-list-item-action>
|
|
12
|
+
</template>
|
|
13
|
+
</v-list-item>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
const props = defineProps(['context', 'item', 'spec']);
|
|
18
|
+
</script>
|
package/index.js
CHANGED
package/package.json
CHANGED
package/store.js
CHANGED
package/utils/constant.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { vueApp } from "../store";
|
|
2
2
|
|
|
3
3
|
// const colors = ['primary', 'secondary', 'success', 'warning', 'info', 'error']
|
|
4
4
|
const variants = ['text', 'flat', 'elevated', 'outlined', 'plain', 'tonal'];
|
|
@@ -6,7 +6,7 @@ const densities = ['comfortable', 'compact'];
|
|
|
6
6
|
const sizes = ['x-small', 'small', 'large', 'x-large'];
|
|
7
7
|
|
|
8
8
|
function determineColor(styleClasses, defaultColor) {
|
|
9
|
-
const colors = Object.keys(
|
|
9
|
+
const colors = Object.keys(vueApp.colors);
|
|
10
10
|
const classes = styleClasses || [];
|
|
11
11
|
for (const value of colors) {
|
|
12
12
|
if (classes.includes(value)) {
|
package/utils/http.js
CHANGED
|
@@ -4,6 +4,7 @@ import { nextTick } from 'vue';
|
|
|
4
4
|
import { ctx, dialogs, jsonView, vueApp } from "../store";
|
|
5
5
|
import Hash from "./hash";
|
|
6
6
|
import { hideSkeletonView } from "../actions/windows/skeletionView";
|
|
7
|
+
import Mustache from "mustache";
|
|
7
8
|
|
|
8
9
|
const strandom = () => (Math.random() + 1).toString(36).substring(7) + Date.now().toString();
|
|
9
10
|
|
|
@@ -208,11 +209,12 @@ export default class {
|
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
static _populatePlaceholders(str, body) {
|
|
211
|
-
str = this._populatePlaceholdersForIndicators(str, body, "{{", "}}");
|
|
212
|
-
// Allow support for encoded `{{placeholder}}`
|
|
213
|
-
str = this._populatePlaceholdersForIndicators(str, body, "%7B%7B", "%7D%7D");
|
|
212
|
+
// str = this._populatePlaceholdersForIndicators(str, body, "{{", "}}");
|
|
213
|
+
// // Allow support for encoded `{{placeholder}}`
|
|
214
|
+
// str = this._populatePlaceholdersForIndicators(str, body, "%7B%7B", "%7D%7D");
|
|
214
215
|
|
|
215
|
-
return str;
|
|
216
|
+
// return str;
|
|
217
|
+
return Mustache.render(decodeURI(str), Object.fromEntries(body));
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
static execute(properties, methodName, component, jsonHandler, errorHandler) {
|