glib-web 0.5.77
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/.eslintrc.js +37 -0
- package/LICENSE +201 -0
- package/README.md +33 -0
- package/action.js +167 -0
- package/actions/analytics/logEvent.js +26 -0
- package/actions/auth/creditCard.js +29 -0
- package/actions/auth/restart.js +5 -0
- package/actions/auth/saveCsrfToken.js +12 -0
- package/actions/cables/push.js +38 -0
- package/actions/dialogs/alert.js +15 -0
- package/actions/dialogs/close.js +7 -0
- package/actions/dialogs/notification.js +14 -0
- package/actions/dialogs/oauth.js +6 -0
- package/actions/dialogs/open.js +7 -0
- package/actions/dialogs/options.js +5 -0
- package/actions/dialogs/show.js +5 -0
- package/actions/forms/submit.js +15 -0
- package/actions/http/delete.js +7 -0
- package/actions/http/patch.js +7 -0
- package/actions/http/post.js +7 -0
- package/actions/http/put.js +7 -0
- package/actions/panels/scrollTo.js +18 -0
- package/actions/panels/scrollToBottom.js +11 -0
- package/actions/runMultiple.js +11 -0
- package/actions/sheets/select.js +5 -0
- package/actions/snackbars/alert.js +15 -0
- package/actions/snackbars/select.js +5 -0
- package/actions/timeouts/set.js +20 -0
- package/actions/windows/close.js +13 -0
- package/actions/windows/closeAll.js +16 -0
- package/actions/windows/closeWithReload.js +18 -0
- package/actions/windows/open.js +5 -0
- package/actions/windows/openWeb.js +5 -0
- package/actions/windows/refreshState.js +5 -0
- package/actions/windows/reload.js +24 -0
- package/actions/ws/push.js +35 -0
- package/app.vue +180 -0
- package/components/_button.vue +101 -0
- package/components/_dropdownMenu.vue +76 -0
- package/components/_icon.vue +50 -0
- package/components/_message.vue +25 -0
- package/components/avatar.vue +16 -0
- package/components/banners/alert.vue +49 -0
- package/components/banners/select.vue +82 -0
- package/components/button.vue +13 -0
- package/components/calendar.vue +105 -0
- package/components/charts/column.vue +26 -0
- package/components/charts/line.vue +61 -0
- package/components/chip.vue +24 -0
- package/components/component.vue +222 -0
- package/components/datetime.vue +54 -0
- package/components/fab.vue +33 -0
- package/components/fields/_patternText.vue +61 -0
- package/components/fields/_select.vue +86 -0
- package/components/fields/autocomplete.vue +73 -0
- package/components/fields/check.vue +104 -0
- package/components/fields/checkGroup.vue +51 -0
- package/components/fields/country/countries.js +251 -0
- package/components/fields/country/field.vue +81 -0
- package/components/fields/country/regions.js +12 -0
- package/components/fields/creditCard.vue +105 -0
- package/components/fields/date.vue +24 -0
- package/components/fields/datetime.vue +49 -0
- package/components/fields/dynamicGroup.vue +106 -0
- package/components/fields/dynamicSelect.vue +173 -0
- package/components/fields/file.vue +166 -0
- package/components/fields/googlePlace.vue +158 -0
- package/components/fields/hidden.vue +18 -0
- package/components/fields/location.vue +223 -0
- package/components/fields/newRichText.vue +191 -0
- package/components/fields/phone/countries.js +315 -0
- package/components/fields/phone/field.vue +348 -0
- package/components/fields/phone/sprite.css +1071 -0
- package/components/fields/radio.vue +64 -0
- package/components/fields/radioGroup.vue +93 -0
- package/components/fields/rating.vue +26 -0
- package/components/fields/richText.vue +172 -0
- package/components/fields/select.vue +17 -0
- package/components/fields/stripe/stripeFields.vue +93 -0
- package/components/fields/stripe/stripeIndividualFields.vue +207 -0
- package/components/fields/stripeExternalAccount.vue +135 -0
- package/components/fields/stripeToken.vue +59 -0
- package/components/fields/submit.vue +23 -0
- package/components/fields/text.vue +144 -0
- package/components/fields/textarea.vue +59 -0
- package/components/fields/timeZone.vue +22 -0
- package/components/fields/timer.vue +83 -0
- package/components/h1.vue +28 -0
- package/components/h2.vue +20 -0
- package/components/h3.vue +22 -0
- package/components/h4.vue +20 -0
- package/components/h5.vue +20 -0
- package/components/h6.vue +20 -0
- package/components/hr.vue +13 -0
- package/components/html.vue +13 -0
- package/components/icon.vue +25 -0
- package/components/image.vue +87 -0
- package/components/label.vue +62 -0
- package/components/map.vue +206 -0
- package/components/markdown.vue +52 -0
- package/components/mixins/events.js +178 -0
- package/components/mixins/generic.js +58 -0
- package/components/mixins/list/autoload.js +144 -0
- package/components/mixins/longClick.js +56 -0
- package/components/mixins/scrolling.js +35 -0
- package/components/mixins/styles.js +221 -0
- package/components/mixins/table/autoload.js +131 -0
- package/components/mixins/table/export.js +52 -0
- package/components/mixins/table/import.js +106 -0
- package/components/mixins/text.js +20 -0
- package/components/mixins/ws/actionCable.js +48 -0
- package/components/mixins/ws/phoenixSocket.js +117 -0
- package/components/p.vue +36 -0
- package/components/panels/carousel.vue +55 -0
- package/components/panels/column.vue +117 -0
- package/components/panels/custom.vue +52 -0
- package/components/panels/flow.vue +81 -0
- package/components/panels/form.vue +126 -0
- package/components/panels/horizontal.vue +73 -0
- package/components/panels/list.vue +241 -0
- package/components/panels/responsive.vue +88 -0
- package/components/panels/scroll.vue +68 -0
- package/components/panels/split.vue +52 -0
- package/components/panels/table.vue +234 -0
- package/components/panels/ul.vue +34 -0
- package/components/panels/vertical.vue +71 -0
- package/components/panels/web.vue +11 -0
- package/components/spacer.vue +11 -0
- package/components/switch.vue +42 -0
- package/components/tabBar.vue +44 -0
- package/extensions/array.js +20 -0
- package/extensions/string.js +21 -0
- package/index.js +195 -0
- package/keys.js +12 -0
- package/nav/appbar.vue +117 -0
- package/nav/content.vue +40 -0
- package/nav/dialog.vue +127 -0
- package/nav/drawer.vue +88 -0
- package/nav/drawerButton.vue +28 -0
- package/nav/drawerLabel.vue +21 -0
- package/nav/sheet.vue +57 -0
- package/nav/snackbar.vue +72 -0
- package/package.json +42 -0
- package/settings.json.example +21 -0
- package/static/plugins/alignment/alignment.js +76 -0
- package/static/plugins/alignment/alignment.min.js +1 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +46 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +1 -0
- package/static/plugins/blockcode/blockcode.js +110 -0
- package/static/plugins/blockcode/blockcode.min.js +1 -0
- package/static/plugins/clips/clips.js +44 -0
- package/static/plugins/clips/clips.min.js +1 -0
- package/static/plugins/counter/counter.js +60 -0
- package/static/plugins/counter/counter.min.js +1 -0
- package/static/plugins/definedlinks/definedlinks.js +64 -0
- package/static/plugins/definedlinks/definedlinks.min.js +1 -0
- package/static/plugins/handle/handle.js +173 -0
- package/static/plugins/handle/handle.min.js +1 -0
- package/static/plugins/icons/icons.js +72 -0
- package/static/plugins/icons/icons.min.js +1 -0
- package/static/plugins/imageposition/imageposition.js +85 -0
- package/static/plugins/imageposition/imageposition.min.js +1 -0
- package/static/plugins/inlineformat/inlineformat.js +85 -0
- package/static/plugins/inlineformat/inlineformat.min.js +1 -0
- package/static/plugins/removeformat/removeformat.js +28 -0
- package/static/plugins/removeformat/removeformat.min.js +1 -0
- package/static/plugins/selector/selector.js +96 -0
- package/static/plugins/selector/selector.min.js +1 -0
- package/static/plugins/specialchars/specialchars.js +63 -0
- package/static/plugins/specialchars/specialchars.min.js +1 -0
- package/static/plugins/textdirection/textdirection.js +55 -0
- package/static/plugins/textdirection/textdirection.min.js +1 -0
- package/static/plugins/textexpander/textexpander.js +46 -0
- package/static/plugins/textexpander/textexpander.min.js +1 -0
- package/static/plugins/underline/underline.js +27 -0
- package/static/plugins/underline/underline.min.js +1 -0
- package/static/redactorx.css +1344 -0
- package/static/redactorx.js +14254 -0
- package/static/redactorx.min.css +1 -0
- package/static/redactorx.min.js +1 -0
- package/static/redactorx.usm.min.js +2 -0
- package/styles/test.sass +3 -0
- package/styles/test.scss +5 -0
- package/templates/_menu.vue +38 -0
- package/templates/comment.vue +202 -0
- package/templates/featured.vue +32 -0
- package/templates/thumbnail.vue +138 -0
- package/templates/unsupported.vue +12 -0
- package/utils/app.js +14 -0
- package/utils/dom.js +13 -0
- package/utils/form.js +34 -0
- package/utils/format.js +14 -0
- package/utils/hash.js +29 -0
- package/utils/helper.js +44 -0
- package/utils/history.js +70 -0
- package/utils/http.js +209 -0
- package/utils/launch.js +135 -0
- package/utils/private/ws.js +22 -0
- package/utils/public.js +23 -0
- package/utils/settings.js +48 -0
- package/utils/storage.js +9 -0
- package/utils/type.js +69 -0
- package/utils/uploader.js +121 -0
- package/utils/url.js +132 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Scroll the main body of the current window
|
|
2
|
+
export default class {
|
|
3
|
+
execute(properties) {
|
|
4
|
+
const pageBody = Utils.history._pageBody;
|
|
5
|
+
const selector = `#${properties.viewId}`;
|
|
6
|
+
console.log("Scrolling to", selector);
|
|
7
|
+
const element = pageBody.querySelector(selector);
|
|
8
|
+
element.scrollIntoView({
|
|
9
|
+
behavior: properties["animate"] ? "smooth" : "auto"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
element.classList.add("glib-scrollto");
|
|
13
|
+
element.classList.add("glib-scrollto--highlighted");
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
element.classList.remove("glib-scrollto--highlighted");
|
|
16
|
+
}, 500);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Scroll the main body of the current window
|
|
2
|
+
export default class {
|
|
3
|
+
execute(properties) {
|
|
4
|
+
const pageBody = Utils.history._pageBody;
|
|
5
|
+
console.log("Scrolling to bottom");
|
|
6
|
+
pageBody.scrollTo({
|
|
7
|
+
top: pageBody.scrollHeight,
|
|
8
|
+
behavior: properties["animate"] ? "smooth" : "auto"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Launch from "../../utils/launch";
|
|
2
|
+
|
|
3
|
+
export default class {
|
|
4
|
+
execute(properties) {
|
|
5
|
+
const spec = Object.assign({}, properties, {
|
|
6
|
+
buttons: [
|
|
7
|
+
{
|
|
8
|
+
text: "OK",
|
|
9
|
+
onClick: properties.onClose
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
});
|
|
13
|
+
Utils.launch.snackbar.open(spec);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
execute(properties, target, component) {
|
|
3
|
+
component.$data._isBusy = true;
|
|
4
|
+
|
|
5
|
+
if (properties.repeat) {
|
|
6
|
+
setInterval(() => {
|
|
7
|
+
this.onTimeout(properties, component);
|
|
8
|
+
}, properties.interval);
|
|
9
|
+
} else {
|
|
10
|
+
setTimeout(() => {
|
|
11
|
+
this.onTimeout(properties, component);
|
|
12
|
+
}, properties.interval);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
onTimeout(properties, component) {
|
|
17
|
+
component.$data._isBusy = false;
|
|
18
|
+
GLib.action.execute(properties.onTimeout, null, component);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
execute(properties, target, component) {
|
|
3
|
+
Utils.history.back();
|
|
4
|
+
|
|
5
|
+
Utils.type.ifObject(properties["onClose"], it => {
|
|
6
|
+
// Allow time for history.back() to complete, which is important for actions that need
|
|
7
|
+
// to use window.location.href such as windows/reload
|
|
8
|
+
setTimeout(function() {
|
|
9
|
+
GLib.action.execute(it, null, component);
|
|
10
|
+
}, 100);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Type from "../../utils/type";
|
|
2
|
+
|
|
3
|
+
export default class {
|
|
4
|
+
execute(properties, target, component) {
|
|
5
|
+
// TODO
|
|
6
|
+
// window.history.deleteAll()
|
|
7
|
+
|
|
8
|
+
Type.ifObject(properties["onClose"], it => {
|
|
9
|
+
// Allow time for history.back() to complete, which is important for actions that need
|
|
10
|
+
// to use window.location.href such as windows/reload
|
|
11
|
+
setTimeout(function() {
|
|
12
|
+
GLib.action.execute(it, null, component);
|
|
13
|
+
}, 100);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Hash from "../../utils/hash";
|
|
2
|
+
|
|
3
|
+
export default class {
|
|
4
|
+
execute(properties, target, component) {
|
|
5
|
+
const fallbackUrl = new Hash(properties).remove("fallbackUrl");
|
|
6
|
+
const data = Object.assign({}, properties);
|
|
7
|
+
if (!Utils.history.back()) {
|
|
8
|
+
data.url = fallbackUrl;
|
|
9
|
+
console.log("Use fallbackUrl", data.url);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Allow time for history.back() to complete, which is important for actions that need
|
|
13
|
+
// to use window.location.href such as `windows/reload`
|
|
14
|
+
setTimeout(function() {
|
|
15
|
+
Utils.http.reload(data, component);
|
|
16
|
+
}, 100);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
execute(properties, target, component) {
|
|
3
|
+
if (Utils.settings.reactive) {
|
|
4
|
+
// const currentUrl = window.location.href;
|
|
5
|
+
// const data = {
|
|
6
|
+
// url: properties.url || currentUrl
|
|
7
|
+
// };
|
|
8
|
+
|
|
9
|
+
// Utils.http.execute(data, "GET", component, (page, response) => {
|
|
10
|
+
// Utils.http.forceComponentUpdate(() => {
|
|
11
|
+
// window.vueApp.page = page;
|
|
12
|
+
// const redirectUrl = Utils.url.htmlUrl(response.url);
|
|
13
|
+
// Utils.history.updatePage(redirectUrl);
|
|
14
|
+
|
|
15
|
+
// GLib.action.execute(properties["onReload"], null, component);
|
|
16
|
+
// });
|
|
17
|
+
// });
|
|
18
|
+
|
|
19
|
+
Utils.http.reload(properties, component);
|
|
20
|
+
} else {
|
|
21
|
+
window.location.reload();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
execute(properties, target, component, params) {
|
|
3
|
+
Utils.type.ifString(properties.topic, topicName => {
|
|
4
|
+
const ws = window.vueApp.webSocket;
|
|
5
|
+
const channel = ws.channels[topicName];
|
|
6
|
+
|
|
7
|
+
Utils.type.ifString(properties.event, eventName => {
|
|
8
|
+
if (channel) {
|
|
9
|
+
const payload = Object.assign({}, properties.payload, ws.header, {
|
|
10
|
+
formData: properties.formData
|
|
11
|
+
});
|
|
12
|
+
console.debug(`Pushing to '${topicName}/${eventName}'`, payload);
|
|
13
|
+
channel
|
|
14
|
+
.push(eventName, payload)
|
|
15
|
+
.receive("ok", resp => {
|
|
16
|
+
console.log(
|
|
17
|
+
`Push to '${topicName}/${eventName}' succeeded`,
|
|
18
|
+
resp
|
|
19
|
+
);
|
|
20
|
+
Utils.ws.handleResponse(resp.onResponse, component);
|
|
21
|
+
})
|
|
22
|
+
.receive("error", resp => {
|
|
23
|
+
console.log(`Push to '${topicName}/${eventName}' failed`, resp);
|
|
24
|
+
Utils.ws.handleResponse(resp.onResponse, component);
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
console.error(`Topic not joined: '${topicName}'`);
|
|
28
|
+
Utils.launch.snackbar.error(
|
|
29
|
+
"Something went wrong and we have been notified"
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
package/app.vue
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-app :class="page.styleClasses">
|
|
3
|
+
<nav-appbar :page="page" />
|
|
4
|
+
|
|
5
|
+
<v-progress-linear
|
|
6
|
+
v-if="$root.vueApp.indicator"
|
|
7
|
+
:indeterminate="true"
|
|
8
|
+
height="5"
|
|
9
|
+
style="position: fixed; z-index: 4;"
|
|
10
|
+
>
|
|
11
|
+
</v-progress-linear>
|
|
12
|
+
|
|
13
|
+
<div class="pages-header">
|
|
14
|
+
<layouts-content
|
|
15
|
+
:template="page.template"
|
|
16
|
+
:spec="header"
|
|
17
|
+
:full-height="false"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div id="page_body" class="pages-body body-wrapper">
|
|
22
|
+
<layouts-content
|
|
23
|
+
:template="page.template"
|
|
24
|
+
:spec="body"
|
|
25
|
+
:full-height="true"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="pages-footer">
|
|
30
|
+
<layouts-content
|
|
31
|
+
:template="page.template"
|
|
32
|
+
:spec="footer"
|
|
33
|
+
:full-height="false"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</v-app>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
import NavAppBar from "./nav/appbar";
|
|
41
|
+
import Utils from "./utils/helper";
|
|
42
|
+
import ContentLayout from "./nav/content";
|
|
43
|
+
import phoenixSocketMixin from "./components/mixins/ws/phoenixSocket.js";
|
|
44
|
+
import actionCableMixin from "./components/mixins/ws/actionCable.js";
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
components: {
|
|
48
|
+
"nav-appbar": NavAppBar,
|
|
49
|
+
"layouts-content": ContentLayout
|
|
50
|
+
},
|
|
51
|
+
mixins: [phoenixSocketMixin, actionCableMixin],
|
|
52
|
+
props: {
|
|
53
|
+
page: { type: Object, required: true }
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
title: "..."
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
header() {
|
|
62
|
+
return this.page.header || {};
|
|
63
|
+
},
|
|
64
|
+
body() {
|
|
65
|
+
return this.page.body || {};
|
|
66
|
+
},
|
|
67
|
+
footer() {
|
|
68
|
+
return this.page.footer || {};
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
watch: {
|
|
72
|
+
"$root.indicator": function(val, oldVal) {
|
|
73
|
+
document.title = val ? "..." : this.page.title;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
created() {
|
|
77
|
+
console.log(
|
|
78
|
+
`Version: ${Utils.settings.appVersion} (${Utils.settings.env})`
|
|
79
|
+
);
|
|
80
|
+
Utils.history.saveInitialContent(this.page);
|
|
81
|
+
Utils.history.restoreOnBackOrForward();
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
$ready: function() {
|
|
85
|
+
document.title = this.page.title;
|
|
86
|
+
|
|
87
|
+
this.$wsInitPhoenixSocket(this.page.phoenixSocket);
|
|
88
|
+
this.$wsInitActionCable(this.page.actionCable);
|
|
89
|
+
|
|
90
|
+
if (this.$gtag) {
|
|
91
|
+
if (!Utils.settings.isDev) {
|
|
92
|
+
console.log(`Tracking analytics: ${window.location}`);
|
|
93
|
+
// this.$ga.page(window.location);
|
|
94
|
+
|
|
95
|
+
this.$gtag.pageview({
|
|
96
|
+
page_location: window.location
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
console.warn("Analytics not setup. Set `settings.gtagId`.");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (Utils.history.isPoppedState(this.page)) {
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
// Wait until page is rendered
|
|
106
|
+
GLib.action.execute(this.page.onRefocus, null, this);
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
setTimeout(() => {
|
|
110
|
+
// Wait until page is rendered
|
|
111
|
+
GLib.action.execute(this.page.onLoad, null, this);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style lang="scss">
|
|
120
|
+
// h1,
|
|
121
|
+
// h2,
|
|
122
|
+
// h3,
|
|
123
|
+
// h4,
|
|
124
|
+
// h5,
|
|
125
|
+
// h6,
|
|
126
|
+
// span {
|
|
127
|
+
// line-height: 1;
|
|
128
|
+
// }
|
|
129
|
+
|
|
130
|
+
body {
|
|
131
|
+
// Hide superfluous scrollbar (Edge)
|
|
132
|
+
-ms-overflow-style: none;
|
|
133
|
+
* {
|
|
134
|
+
-ms-overflow-style: initial;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Hide superfluous scrollbar (Webkit)
|
|
138
|
+
&::-webkit-scrollbar {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
html {
|
|
143
|
+
// Hide superfluous scrollbar (Firefox)
|
|
144
|
+
scrollbar-width: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/*** Header/footer support ***/
|
|
148
|
+
html,
|
|
149
|
+
body,
|
|
150
|
+
#app {
|
|
151
|
+
height: 100%;
|
|
152
|
+
}
|
|
153
|
+
/******/
|
|
154
|
+
|
|
155
|
+
/*** panels/scrollTo support ***/
|
|
156
|
+
.glib-scrollto {
|
|
157
|
+
transition: background 0.5s;
|
|
158
|
+
}
|
|
159
|
+
.glib-scrollto--highlighted {
|
|
160
|
+
background: yellow !important;
|
|
161
|
+
}
|
|
162
|
+
/******/
|
|
163
|
+
</style>
|
|
164
|
+
|
|
165
|
+
<style scoped>
|
|
166
|
+
/*** Header/footer support ***/
|
|
167
|
+
.application--wrap {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
justify-content: space-between;
|
|
171
|
+
height: 100%;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.body-wrapper {
|
|
175
|
+
height: 100%;
|
|
176
|
+
/* overflow-y: auto; */
|
|
177
|
+
overflow-y: overlay;
|
|
178
|
+
}
|
|
179
|
+
/******/
|
|
180
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-btn
|
|
3
|
+
:type="type"
|
|
4
|
+
:disabled="disabled || $isBusy"
|
|
5
|
+
:style="styles()"
|
|
6
|
+
:class="$classes()"
|
|
7
|
+
:href="$href()"
|
|
8
|
+
:rel="$rel()"
|
|
9
|
+
:text="linkStyling || $classes().includes('text')"
|
|
10
|
+
:small="linkStyling"
|
|
11
|
+
:icon="$classes().includes('icon')"
|
|
12
|
+
:outlined="$classes().includes('outlined')"
|
|
13
|
+
:tile="$classes().includes('tile')"
|
|
14
|
+
:rounded="$classes().includes('rounded')"
|
|
15
|
+
:depressed="$classes().includes('depressed')"
|
|
16
|
+
@click="type == 'submit' ? null : $onClick()"
|
|
17
|
+
>
|
|
18
|
+
<span><common-icon :spec="spec.icon || {}"/></span>
|
|
19
|
+
<div :class="hideTextOnXs && spec.icon ? 'd-none d-sm-flex' : null">
|
|
20
|
+
{{ spec.text }}
|
|
21
|
+
</div>
|
|
22
|
+
</v-btn>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
props: {
|
|
28
|
+
spec: { type: Object, required: true },
|
|
29
|
+
type: { type: String, default: "button" },
|
|
30
|
+
disabled: { type: Boolean, required: true },
|
|
31
|
+
hideTextOnXs: { type: Boolean }
|
|
32
|
+
},
|
|
33
|
+
data: function() {
|
|
34
|
+
return {
|
|
35
|
+
linkStyling: false
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
$ready() {
|
|
40
|
+
this.$type.ifArray(this.spec.styleClasses, val => {
|
|
41
|
+
this.linkStyling = val.includes("link");
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
styles() {
|
|
45
|
+
const styles = this.genericStyles();
|
|
46
|
+
if (this.linkStyling) {
|
|
47
|
+
styles["color"] = styles["color"] || "#1976d2";
|
|
48
|
+
}
|
|
49
|
+
return styles;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style lang="scss" scoped>
|
|
56
|
+
a,
|
|
57
|
+
button {
|
|
58
|
+
min-width: 0;
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
61
|
+
.v-btn {
|
|
62
|
+
&.link {
|
|
63
|
+
text-transform: none !important;
|
|
64
|
+
/* text-decoration: underline; */
|
|
65
|
+
padding-left: 0;
|
|
66
|
+
padding-right: 0;
|
|
67
|
+
/* `height: inherit/auto/initial` will stretch to max height when used inside a horizontal panel,
|
|
68
|
+
presumably because it is affected by the panel's flex arrangement. */
|
|
69
|
+
height: 16px;
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
line-height: 1;
|
|
72
|
+
min-width: auto;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.v-btn--rounded {
|
|
76
|
+
// Override .v-application.rounded
|
|
77
|
+
border-radius: 28px !important;
|
|
78
|
+
}
|
|
79
|
+
.v-banner__wrapper .v-btn:not(.v-btn--round).v-size--default {
|
|
80
|
+
min-width: 0;
|
|
81
|
+
padding: 0;
|
|
82
|
+
}
|
|
83
|
+
.v-banner__wrapper .v-btn.v-size--default {
|
|
84
|
+
font-size: 12px;
|
|
85
|
+
}
|
|
86
|
+
.breadcrumbs .v-btn.link {
|
|
87
|
+
display: inline-table;
|
|
88
|
+
justify-content: left;
|
|
89
|
+
white-space: normal;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media only screen and (min-width: 600px) {
|
|
93
|
+
.v-banner__wrapper.v-btn.v-size--default {
|
|
94
|
+
font-size: 0.875rem;
|
|
95
|
+
}
|
|
96
|
+
.v-banner__wrapper.v-btn:not(.v-btn--round).v-size--default {
|
|
97
|
+
min-width: 64px;
|
|
98
|
+
padding: 0 16px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +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>
|
|
@@ -0,0 +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>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- TODO: Deprecate this in favor of supporting `body` in dialogs, banners, and sheets -->
|
|
2
|
+
<template>
|
|
3
|
+
<div v-if="isMarkdown" v-html="compiledText"></div>
|
|
4
|
+
<div v-else class="unformatted">{{this.spec.message}}</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: ["spec"],
|
|
10
|
+
computed: {
|
|
11
|
+
compiledText() {
|
|
12
|
+
return Utils.format.markdown(this.spec.message);
|
|
13
|
+
},
|
|
14
|
+
isMarkdown() {
|
|
15
|
+
return this.spec.message_format == 'markdown'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
.unformatted {
|
|
23
|
+
white-space: pre-wrap;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
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: ["spec"]
|
|
15
|
+
};
|
|
16
|
+
</script>
|