glib-web 0.6.1 → 0.6.2
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/LICENSE +0 -0
- package/README.md +0 -0
- package/action.js +167 -167
- package/actions/analytics/logEvent.js +0 -0
- package/actions/auth/creditCard.js +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/auth/saveCsrfToken.js +0 -0
- package/actions/cables/push.js +0 -0
- package/actions/dialogs/alert.js +0 -0
- package/actions/dialogs/notification.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/open.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/dialogs/show.js +0 -0
- package/actions/forms/submit.js +0 -0
- package/actions/http/delete.js +0 -0
- package/actions/http/patch.js +0 -0
- package/actions/http/post.js +0 -0
- package/actions/http/put.js +0 -0
- package/actions/panels/scrollTo.js +18 -18
- package/actions/panels/scrollToBottom.js +0 -0
- package/actions/runMultiple.js +0 -0
- package/actions/sheets/select.js +0 -0
- package/actions/snackbars/alert.js +0 -0
- package/actions/snackbars/select.js +0 -0
- package/actions/timeouts/set.js +20 -20
- package/actions/windows/close.js +0 -0
- package/actions/windows/closeAll.js +0 -0
- package/actions/windows/closeWithReload.js +0 -0
- package/actions/windows/open.js +0 -0
- package/actions/windows/openWeb.js +0 -0
- package/actions/windows/refreshState.js +5 -5
- package/actions/windows/reload.js +0 -0
- package/actions/ws/push.js +0 -0
- package/app.vue +180 -180
- package/components/_badge.vue +23 -23
- package/components/_button.vue +107 -107
- package/components/_dropdownMenu.vue +76 -76
- package/components/_icon.vue +50 -50
- package/components/_message.vue +0 -0
- package/components/avatar.vue +18 -18
- package/components/banners/alert.vue +0 -0
- package/components/banners/select.vue +82 -82
- package/components/button.vue +33 -40
- package/components/calendar.vue +0 -0
- package/components/charts/column.vue +47 -47
- package/components/charts/line.vue +67 -67
- package/components/chip.vue +51 -26
- package/components/component.vue +225 -225
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_patternText.vue +65 -65
- package/components/fields/_select.vue +86 -86
- package/components/fields/autocomplete.vue +73 -73
- package/components/fields/check.vue +91 -91
- package/components/fields/checkGroup.vue +58 -58
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/field.vue +0 -0
- package/components/fields/country/regions.js +0 -0
- package/components/fields/creditCard.vue +22 -13
- package/components/fields/date.vue +24 -24
- package/components/fields/datetime.vue +0 -0
- package/components/fields/dynamicGroup.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/file.vue +0 -0
- package/components/fields/googlePlace.vue +0 -0
- package/components/fields/hidden.vue +0 -0
- package/components/fields/location.vue +198 -198
- package/components/fields/newRichText.vue +0 -0
- package/components/fields/phone/countries.js +315 -315
- package/components/fields/phone/field.vue +351 -351
- package/components/fields/phone/sprite.css +1071 -1071
- package/components/fields/radio.vue +16 -16
- package/components/fields/radioGroup.vue +42 -42
- package/components/fields/rating.vue +0 -0
- package/components/fields/richText.vue +0 -0
- package/components/fields/select.vue +17 -17
- package/components/fields/stripe/stripeFields.vue +93 -93
- package/components/fields/stripe/stripeIndividualFields.vue +207 -207
- package/components/fields/stripeExternalAccount.vue +135 -135
- package/components/fields/text.vue +0 -0
- package/components/fields/textarea.vue +0 -0
- package/components/fields/timeZone.vue +22 -22
- package/components/fields/timer.vue +83 -83
- package/components/h1.vue +28 -28
- package/components/h2.vue +28 -28
- package/components/h3.vue +29 -29
- package/components/h4.vue +28 -28
- package/components/h5.vue +28 -28
- package/components/h6.vue +28 -28
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/icon.vue +25 -25
- package/components/image.vue +0 -0
- package/components/label.vue +62 -62
- package/components/map.vue +0 -0
- package/components/markdown.vue +0 -0
- package/components/mixins/chart/annotation.js +73 -73
- package/components/mixins/chart/tooltip.js +31 -28
- package/components/mixins/events.js +178 -178
- package/components/mixins/generic.js +0 -0
- package/components/mixins/list/autoload.js +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +222 -222
- package/components/mixins/table/autoload.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/mixins/text.js +20 -20
- package/components/mixins/tooltip.js +11 -0
- package/components/mixins/ws/actionCable.js +48 -48
- package/components/mixins/ws/phoenixSocket.js +0 -0
- package/components/p.vue +0 -0
- package/components/panels/carousel.vue +55 -55
- package/components/panels/column.vue +0 -0
- package/components/panels/custom.vue +0 -0
- package/components/panels/flow.vue +81 -81
- package/components/panels/form.vue +130 -130
- package/components/panels/horizontal.vue +0 -0
- package/components/panels/list.vue +247 -247
- package/components/panels/responsive.vue +94 -94
- package/components/panels/scroll.vue +0 -0
- package/components/panels/split.vue +0 -0
- package/components/panels/table.vue +0 -0
- package/components/panels/ul.vue +34 -34
- package/components/panels/vertical.vue +0 -0
- package/components/panels/web.vue +11 -11
- package/components/progressbar.vue +36 -36
- package/components/spacer.vue +0 -0
- package/components/switch.vue +42 -42
- package/components/tabBar.vue +68 -68
- package/extensions/array.js +0 -0
- package/extensions/string.js +21 -21
- package/index.js +199 -199
- package/keys.js +0 -0
- package/nav/appbar.vue +136 -136
- package/nav/content.vue +0 -0
- package/nav/dialog.vue +127 -127
- package/nav/drawer.vue +105 -105
- package/nav/drawerButton.vue +31 -31
- package/nav/drawerLabel.vue +0 -0
- package/nav/sheet.vue +0 -0
- package/nav/snackbar.vue +0 -0
- package/package.json +44 -44
- package/settings.json.example +0 -0
- package/static/plugins/alignment/alignment.js +0 -0
- package/static/plugins/alignment/alignment.min.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
- package/static/plugins/blockcode/blockcode.js +0 -0
- package/static/plugins/blockcode/blockcode.min.js +0 -0
- package/static/plugins/clips/clips.js +0 -0
- package/static/plugins/clips/clips.min.js +0 -0
- package/static/plugins/counter/counter.js +0 -0
- package/static/plugins/counter/counter.min.js +0 -0
- package/static/plugins/definedlinks/definedlinks.js +0 -0
- package/static/plugins/definedlinks/definedlinks.min.js +0 -0
- package/static/plugins/handle/handle.js +0 -0
- package/static/plugins/handle/handle.min.js +0 -0
- package/static/plugins/icons/icons.js +0 -0
- package/static/plugins/icons/icons.min.js +0 -0
- package/static/plugins/imageposition/imageposition.js +0 -0
- package/static/plugins/imageposition/imageposition.min.js +0 -0
- package/static/plugins/inlineformat/inlineformat.js +0 -0
- package/static/plugins/inlineformat/inlineformat.min.js +0 -0
- package/static/plugins/removeformat/removeformat.js +0 -0
- package/static/plugins/removeformat/removeformat.min.js +0 -0
- package/static/plugins/selector/selector.js +0 -0
- package/static/plugins/selector/selector.min.js +0 -0
- package/static/plugins/specialchars/specialchars.js +0 -0
- package/static/plugins/specialchars/specialchars.min.js +0 -0
- package/static/plugins/textdirection/textdirection.js +0 -0
- package/static/plugins/textdirection/textdirection.min.js +0 -0
- package/static/plugins/textexpander/textexpander.js +0 -0
- package/static/plugins/textexpander/textexpander.min.js +0 -0
- package/static/plugins/underline/underline.js +0 -0
- package/static/plugins/underline/underline.min.js +0 -0
- package/static/redactorx.css +0 -0
- package/static/redactorx.js +0 -0
- package/static/redactorx.min.css +0 -0
- package/static/redactorx.min.js +0 -0
- package/static/redactorx.usm.min.js +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/_menu.vue +38 -38
- package/templates/comment.vue +202 -202
- package/templates/featured.vue +32 -32
- package/templates/thumbnail.vue +145 -145
- package/templates/unsupported.vue +12 -12
- package/utils/app.js +0 -0
- package/utils/dom.js +0 -0
- package/utils/form.js +0 -0
- package/utils/hash.js +0 -0
- package/utils/helper.js +0 -0
- package/utils/history.js +70 -70
- package/utils/http.js +209 -209
- package/utils/launch.js +135 -135
- package/utils/private/ws.js +0 -0
- package/utils/public.js +0 -0
- package/utils/settings.js +0 -0
- package/utils/storage.js +0 -0
- package/utils/type.js +0 -0
- package/utils/uploader.js +0 -0
- package/utils/url.js +136 -136
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-menu left bottom>
|
|
3
|
-
<template v-slot:activator="{ on, attrs }">
|
|
4
|
-
<v-btn
|
|
5
|
-
:icon="iconStyling"
|
|
6
|
-
:text="textStyling"
|
|
7
|
-
v-bind="attrs"
|
|
8
|
-
style="color: inherit;"
|
|
9
|
-
v-on="on"
|
|
10
|
-
@click.stop.prevent=""
|
|
11
|
-
>
|
|
12
|
-
<span v-if="spec.icon" :class="[textStyling ? 'padder' : '']"
|
|
13
|
-
><common-icon :spec="spec.icon || {}"
|
|
14
|
-
/></span>
|
|
15
|
-
{{ spec.text }}
|
|
16
|
-
</v-btn>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<v-list>
|
|
20
|
-
<v-list-item
|
|
21
|
-
v-for="(childItem, childIndex) in spec.childButtons"
|
|
22
|
-
:key="childIndex"
|
|
23
|
-
>
|
|
24
|
-
<common-button
|
|
25
|
-
:spec="buttonSpec(childItem)"
|
|
26
|
-
:disabled="childItem.disabled || $isBusy"
|
|
27
|
-
/>
|
|
28
|
-
</v-list-item>
|
|
29
|
-
</v-list>
|
|
30
|
-
</v-menu>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
export default {
|
|
35
|
-
props: {
|
|
36
|
-
spec: { type: Object, required: true }
|
|
37
|
-
},
|
|
38
|
-
data: function() {
|
|
39
|
-
return {
|
|
40
|
-
iconStyling: false,
|
|
41
|
-
textStyling: false
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
$ready() {
|
|
46
|
-
if (this.spec.text) {
|
|
47
|
-
this.textStyling = true;
|
|
48
|
-
} else {
|
|
49
|
-
this.iconStyling = true;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
buttonSpec(item) {
|
|
53
|
-
return Object.assign({}, item, {
|
|
54
|
-
view: "button-v1",
|
|
55
|
-
styleClasses: ["text"]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style lang="scss" scoped>
|
|
63
|
-
.v-list-item {
|
|
64
|
-
padding: 0 8px 0 8px;
|
|
65
|
-
|
|
66
|
-
> a,
|
|
67
|
-
> button {
|
|
68
|
-
width: 100%;
|
|
69
|
-
min-height: 48px;
|
|
70
|
-
justify-content: flex-start;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.padder {
|
|
74
|
-
margin-right: 8px;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu left bottom>
|
|
3
|
+
<template v-slot:activator="{ on, attrs }">
|
|
4
|
+
<v-btn
|
|
5
|
+
:icon="iconStyling"
|
|
6
|
+
:text="textStyling"
|
|
7
|
+
v-bind="attrs"
|
|
8
|
+
style="color: inherit;"
|
|
9
|
+
v-on="on"
|
|
10
|
+
@click.stop.prevent=""
|
|
11
|
+
>
|
|
12
|
+
<span v-if="spec.icon" :class="[textStyling ? 'padder' : '']"
|
|
13
|
+
><common-icon :spec="spec.icon || {}"
|
|
14
|
+
/></span>
|
|
15
|
+
{{ spec.text }}
|
|
16
|
+
</v-btn>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<v-list>
|
|
20
|
+
<v-list-item
|
|
21
|
+
v-for="(childItem, childIndex) in spec.childButtons"
|
|
22
|
+
:key="childIndex"
|
|
23
|
+
>
|
|
24
|
+
<common-button
|
|
25
|
+
:spec="buttonSpec(childItem)"
|
|
26
|
+
:disabled="childItem.disabled || $isBusy"
|
|
27
|
+
/>
|
|
28
|
+
</v-list-item>
|
|
29
|
+
</v-list>
|
|
30
|
+
</v-menu>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
props: {
|
|
36
|
+
spec: { type: Object, required: true }
|
|
37
|
+
},
|
|
38
|
+
data: function() {
|
|
39
|
+
return {
|
|
40
|
+
iconStyling: false,
|
|
41
|
+
textStyling: false
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
$ready() {
|
|
46
|
+
if (this.spec.text) {
|
|
47
|
+
this.textStyling = true;
|
|
48
|
+
} else {
|
|
49
|
+
this.iconStyling = true;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
buttonSpec(item) {
|
|
53
|
+
return Object.assign({}, item, {
|
|
54
|
+
view: "button-v1",
|
|
55
|
+
styleClasses: ["text"]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style lang="scss" scoped>
|
|
63
|
+
.v-list-item {
|
|
64
|
+
padding: 0 8px 0 8px;
|
|
65
|
+
|
|
66
|
+
> a,
|
|
67
|
+
> button {
|
|
68
|
+
width: 100%;
|
|
69
|
+
min-height: 48px;
|
|
70
|
+
justify-content: flex-start;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.padder {
|
|
74
|
+
margin-right: 8px;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
package/components/_icon.vue
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-badge v-if="badge.text" :color="badge.backgroundColor" overlap>
|
|
3
|
-
<template v-slot:badge>{{ badge.text }}</template>
|
|
4
|
-
<v-icon :style="genericStyles()" :size="size">{{ value }}</v-icon>
|
|
5
|
-
</v-badge>
|
|
6
|
-
<v-icon v-else :style="genericStyles()" :size="size" :color="color">{{
|
|
7
|
-
value
|
|
8
|
-
}}</v-icon>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
props: {
|
|
14
|
-
spec: { type: Object, required: true },
|
|
15
|
-
isBusy: { type: Boolean }
|
|
16
|
-
},
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
badge: {},
|
|
20
|
-
color: null,
|
|
21
|
-
name: null,
|
|
22
|
-
size: null
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
computed: {
|
|
26
|
-
value() {
|
|
27
|
-
return this.isBusy || this.$isBusy ? "autorenew" : this.name;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
$ready() {
|
|
32
|
-
this.badge = this.spec.badge || {};
|
|
33
|
-
this.color =
|
|
34
|
-
this.spec.color || this.$builtinColor(this.spec.styleClasses);
|
|
35
|
-
|
|
36
|
-
Utils.type.ifObject(this.spec.fa, fa => {
|
|
37
|
-
this.name = `fab fa-${fa.name}`;
|
|
38
|
-
this.size = fa.size;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
Utils.type.ifObject(this.spec.material, material => {
|
|
42
|
-
this.name = material.name;
|
|
43
|
-
this.size = material.size;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-badge v-if="badge.text" :color="badge.backgroundColor" overlap>
|
|
3
|
+
<template v-slot:badge>{{ badge.text }}</template>
|
|
4
|
+
<v-icon :style="genericStyles()" :size="size">{{ value }}</v-icon>
|
|
5
|
+
</v-badge>
|
|
6
|
+
<v-icon v-else :style="genericStyles()" :size="size" :color="color">{{
|
|
7
|
+
value
|
|
8
|
+
}}</v-icon>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
props: {
|
|
14
|
+
spec: { type: Object, required: true },
|
|
15
|
+
isBusy: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
badge: {},
|
|
20
|
+
color: null,
|
|
21
|
+
name: null,
|
|
22
|
+
size: null
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
value() {
|
|
27
|
+
return this.isBusy || this.$isBusy ? "autorenew" : this.name;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
$ready() {
|
|
32
|
+
this.badge = this.spec.badge || {};
|
|
33
|
+
this.color =
|
|
34
|
+
this.spec.color || this.$builtinColor(this.spec.styleClasses);
|
|
35
|
+
|
|
36
|
+
Utils.type.ifObject(this.spec.fa, fa => {
|
|
37
|
+
this.name = `fab fa-${fa.name}`;
|
|
38
|
+
this.size = fa.size;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
Utils.type.ifObject(this.spec.material, material => {
|
|
42
|
+
this.name = material.name;
|
|
43
|
+
this.size = material.size;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style scoped></style>
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/avatar.vue
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-avatar :style="genericStyles()" :class="$classes()" :size="spec.size">
|
|
3
|
-
<v-img :src="spec.url || spec.base64Data" @click="$onClick()"> </v-img>
|
|
4
|
-
</v-avatar>
|
|
5
|
-
|
|
6
|
-
<!-- <v-avatar :width="genericStyles().remove('width')" :height="genericStyles().remove('height')">
|
|
7
|
-
<v-img :src="spec.url || spec.base64Data" :style="genericStyles()" @click='$onClick()'>
|
|
8
|
-
</v-img>
|
|
9
|
-
</v-avatar> -->
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
props: {
|
|
15
|
-
spec: { type: Object, required: true }
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<v-avatar :style="genericStyles()" :class="$classes()" :size="spec.size">
|
|
3
|
+
<v-img :src="spec.url || spec.base64Data" @click="$onClick()"> </v-img>
|
|
4
|
+
</v-avatar>
|
|
5
|
+
|
|
6
|
+
<!-- <v-avatar :width="genericStyles().remove('width')" :height="genericStyles().remove('height')">
|
|
7
|
+
<v-img :src="spec.url || spec.base64Data" :style="genericStyles()" @click='$onClick()'>
|
|
8
|
+
</v-img>
|
|
9
|
+
</v-avatar> -->
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
props: {
|
|
15
|
+
spec: { type: Object, required: true }
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
File without changes
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-banner
|
|
3
|
-
:id="spec.id"
|
|
4
|
-
:style="genericStyles()"
|
|
5
|
-
:class="$classes()"
|
|
6
|
-
:color="spec.color || color"
|
|
7
|
-
:dark="dark"
|
|
8
|
-
single-line
|
|
9
|
-
:outlined="!$classes().includes('frameless')"
|
|
10
|
-
>
|
|
11
|
-
<common-icon v-if="spec.icon" slot="icon" :spec="spec.icon" />
|
|
12
|
-
|
|
13
|
-
<common-message :spec="spec" />
|
|
14
|
-
|
|
15
|
-
<template v-slot:actions>
|
|
16
|
-
<template v-for="(item, index) in spec.buttons">
|
|
17
|
-
<common-dropdownMenu
|
|
18
|
-
v-if="item.childButtons"
|
|
19
|
-
:key="index"
|
|
20
|
-
:spec="item"
|
|
21
|
-
:disabled="$isBusy"
|
|
22
|
-
/>
|
|
23
|
-
<common-button
|
|
24
|
-
v-else
|
|
25
|
-
:key="index"
|
|
26
|
-
:spec="buttonSpec(item)"
|
|
27
|
-
:disabled="$isBusy"
|
|
28
|
-
:hide-text-on-xs="true"
|
|
29
|
-
/>
|
|
30
|
-
</template>
|
|
31
|
-
</template>
|
|
32
|
-
</v-banner>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
export default {
|
|
37
|
-
props: {
|
|
38
|
-
spec: { type: Object, required: true }
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
color: null,
|
|
43
|
-
dark: false
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
$ready() {
|
|
48
|
-
// const vm = this;
|
|
49
|
-
// this.$type.ifArray(this.spec.styleClasses, val => {
|
|
50
|
-
// ["success", "info", "warning", "error"].forEach(color => {
|
|
51
|
-
// if (val.remove(color)) {
|
|
52
|
-
// vm.color = color;
|
|
53
|
-
// vm.dark = true;
|
|
54
|
-
// }
|
|
55
|
-
// });
|
|
56
|
-
// });
|
|
57
|
-
},
|
|
58
|
-
buttonSpec(item) {
|
|
59
|
-
return Object.assign({}, item, {
|
|
60
|
-
view: "button-v1",
|
|
61
|
-
styleClasses: ["text"]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style lang="scss" scoped>
|
|
69
|
-
.frameless {
|
|
70
|
-
padding: 0;
|
|
71
|
-
}
|
|
72
|
-
.v-list-item {
|
|
73
|
-
padding: 0 8px 0 8px;
|
|
74
|
-
|
|
75
|
-
> a,
|
|
76
|
-
> button {
|
|
77
|
-
width: 100%;
|
|
78
|
-
min-height: 48px;
|
|
79
|
-
justify-content: flex-start;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-banner
|
|
3
|
+
:id="spec.id"
|
|
4
|
+
:style="genericStyles()"
|
|
5
|
+
:class="$classes()"
|
|
6
|
+
:color="spec.color || color"
|
|
7
|
+
:dark="dark"
|
|
8
|
+
single-line
|
|
9
|
+
:outlined="!$classes().includes('frameless')"
|
|
10
|
+
>
|
|
11
|
+
<common-icon v-if="spec.icon" slot="icon" :spec="spec.icon" />
|
|
12
|
+
|
|
13
|
+
<common-message :spec="spec" />
|
|
14
|
+
|
|
15
|
+
<template v-slot:actions>
|
|
16
|
+
<template v-for="(item, index) in spec.buttons">
|
|
17
|
+
<common-dropdownMenu
|
|
18
|
+
v-if="item.childButtons"
|
|
19
|
+
:key="index"
|
|
20
|
+
:spec="item"
|
|
21
|
+
:disabled="$isBusy"
|
|
22
|
+
/>
|
|
23
|
+
<common-button
|
|
24
|
+
v-else
|
|
25
|
+
:key="index"
|
|
26
|
+
:spec="buttonSpec(item)"
|
|
27
|
+
:disabled="$isBusy"
|
|
28
|
+
:hide-text-on-xs="true"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
31
|
+
</template>
|
|
32
|
+
</v-banner>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
props: {
|
|
38
|
+
spec: { type: Object, required: true }
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
color: null,
|
|
43
|
+
dark: false
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
$ready() {
|
|
48
|
+
// const vm = this;
|
|
49
|
+
// this.$type.ifArray(this.spec.styleClasses, val => {
|
|
50
|
+
// ["success", "info", "warning", "error"].forEach(color => {
|
|
51
|
+
// if (val.remove(color)) {
|
|
52
|
+
// vm.color = color;
|
|
53
|
+
// vm.dark = true;
|
|
54
|
+
// }
|
|
55
|
+
// });
|
|
56
|
+
// });
|
|
57
|
+
},
|
|
58
|
+
buttonSpec(item) {
|
|
59
|
+
return Object.assign({}, item, {
|
|
60
|
+
view: "button-v1",
|
|
61
|
+
styleClasses: ["text"]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.frameless {
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
.v-list-item {
|
|
73
|
+
padding: 0 8px 0 8px;
|
|
74
|
+
|
|
75
|
+
> a,
|
|
76
|
+
> button {
|
|
77
|
+
width: 100%;
|
|
78
|
+
min-height: 48px;
|
|
79
|
+
justify-content: flex-start;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
package/components/button.vue
CHANGED
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-tooltip
|
|
4
|
-
v-if="spec.tooltip"
|
|
5
|
-
:top="
|
|
6
|
-
:right="
|
|
7
|
-
:bottom="
|
|
8
|
-
:left="
|
|
9
|
-
>
|
|
10
|
-
<template v-slot:activator="{ on }">
|
|
11
|
-
<div v-on="on">
|
|
12
|
-
<common-button :spec="spec" :disabled="$isBusy" />
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
<span> {{ spec.tooltip.text }} </span>
|
|
16
|
-
</v-tooltip>
|
|
17
|
-
<div v-else>
|
|
18
|
-
<common-button :spec="spec" :disabled="$isBusy" />
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-tooltip
|
|
4
|
+
v-if="spec.tooltip"
|
|
5
|
+
:top="tooltipPositionMatches('top')"
|
|
6
|
+
:right="tooltipPositionMatches('right')"
|
|
7
|
+
:bottom="tooltipPositionMatches('bottom')"
|
|
8
|
+
:left="tooltipPositionMatches('left')"
|
|
9
|
+
>
|
|
10
|
+
<template v-slot:activator="{ on }">
|
|
11
|
+
<div v-on="on">
|
|
12
|
+
<common-button :spec="spec" :disabled="$isBusy" />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<span> {{ spec.tooltip.text }} </span>
|
|
16
|
+
</v-tooltip>
|
|
17
|
+
<div v-else>
|
|
18
|
+
<common-button :spec="spec" :disabled="$isBusy" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import TooltipMixins from "./mixins/tooltip";
|
|
25
|
+
export default {
|
|
26
|
+
mixins: [TooltipMixins],
|
|
27
|
+
props: {
|
|
28
|
+
spec: { type: Object, required: true }
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped></style>
|
package/components/calendar.vue
CHANGED
|
File without changes
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<column-chart
|
|
3
|
-
:data="groups"
|
|
4
|
-
:stacked="spec.stacked"
|
|
5
|
-
:library="options"
|
|
6
|
-
></column-chart>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
// https://chartkick.com/vue
|
|
11
|
-
|
|
12
|
-
import annotation from "../mixins/chart/annotation.js";
|
|
13
|
-
import tooltip from "../mixins/chart/tooltip.js";
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
mixins: [annotation, tooltip],
|
|
17
|
-
props: {
|
|
18
|
-
spec: { type: Object, required: true }
|
|
19
|
-
},
|
|
20
|
-
data: function() {
|
|
21
|
-
return {
|
|
22
|
-
groups: [],
|
|
23
|
-
dataName: "dataGroups"
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
methods: {
|
|
27
|
-
$ready() {
|
|
28
|
-
this.groups = this.spec.dataGroups.map(element => {
|
|
29
|
-
let data;
|
|
30
|
-
if (Array.isArray(element.points)) {
|
|
31
|
-
data = element.points.reduce((prev, curr) => {
|
|
32
|
-
let obj = {};
|
|
33
|
-
obj[curr.x] = curr.y;
|
|
34
|
-
return Object.assign(prev, obj);
|
|
35
|
-
}, {});
|
|
36
|
-
} else {
|
|
37
|
-
// Support for legacy code
|
|
38
|
-
data = element.points;
|
|
39
|
-
}
|
|
40
|
-
return { name: element.title, data: data };
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<column-chart
|
|
3
|
+
:data="groups"
|
|
4
|
+
:stacked="spec.stacked"
|
|
5
|
+
:library="options"
|
|
6
|
+
></column-chart>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
// https://chartkick.com/vue
|
|
11
|
+
|
|
12
|
+
import annotation from "../mixins/chart/annotation.js";
|
|
13
|
+
import tooltip from "../mixins/chart/tooltip.js";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
mixins: [annotation, tooltip],
|
|
17
|
+
props: {
|
|
18
|
+
spec: { type: Object, required: true }
|
|
19
|
+
},
|
|
20
|
+
data: function() {
|
|
21
|
+
return {
|
|
22
|
+
groups: [],
|
|
23
|
+
dataName: "dataGroups"
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
$ready() {
|
|
28
|
+
this.groups = this.spec.dataGroups.map(element => {
|
|
29
|
+
let data;
|
|
30
|
+
if (Array.isArray(element.points)) {
|
|
31
|
+
data = element.points.reduce((prev, curr) => {
|
|
32
|
+
let obj = {};
|
|
33
|
+
obj[curr.x] = curr.y;
|
|
34
|
+
return Object.assign(prev, obj);
|
|
35
|
+
}, {});
|
|
36
|
+
} else {
|
|
37
|
+
// Support for legacy code
|
|
38
|
+
data = element.points;
|
|
39
|
+
}
|
|
40
|
+
return { name: element.title, data: data };
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style scoped></style>
|