glib-web 0.5.98 → 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 -34
- package/components/charts/line.vue +67 -65
- 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 -81
- 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 -20
- package/components/h3.vue +29 -22
- package/components/h4.vue +28 -20
- package/components/h5.vue +28 -20
- package/components/h6.vue +28 -20
- 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.js → chart/annotation.js} +73 -73
- package/components/mixins/chart/tooltip.js +31 -0
- 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
package/index.js
CHANGED
|
@@ -1,199 +1,199 @@
|
|
|
1
|
-
import Vue from "vue";
|
|
2
|
-
export { Vue };
|
|
3
|
-
|
|
4
|
-
import App from "./app.vue";
|
|
5
|
-
|
|
6
|
-
import * as VueGoogleMaps from "vue2-google-maps";
|
|
7
|
-
Vue.use(VueGoogleMaps, {
|
|
8
|
-
load: {
|
|
9
|
-
key: process.env.GMAPS_API_KEY,
|
|
10
|
-
libraries: "places"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
import "./styles/test.scss";
|
|
15
|
-
import "./styles/test.sass";
|
|
16
|
-
|
|
17
|
-
import Vuetify from "vuetify";
|
|
18
|
-
import "vuetify/dist/vuetify.min.css";
|
|
19
|
-
// import "material-design-icons-iconfont/dist/material-design-icons.css";
|
|
20
|
-
// import "@mdi/font/css/materialdesignicons.css";
|
|
21
|
-
Vue.use(Vuetify);
|
|
22
|
-
|
|
23
|
-
import Chartkick from "vue-chartkick";
|
|
24
|
-
import Chart from "chart.js";
|
|
25
|
-
import annotationPlugin from "chartjs-plugin-annotation";
|
|
26
|
-
Chart.plugins.register(annotationPlugin);
|
|
27
|
-
Vue.use(Chartkick.use(Chart));
|
|
28
|
-
|
|
29
|
-
// TODO: make this opt-in
|
|
30
|
-
import VueYoutube from "vue-youtube";
|
|
31
|
-
Vue.use(VueYoutube);
|
|
32
|
-
|
|
33
|
-
// import VueAnalytics from 'vue-analytics'
|
|
34
|
-
// // TODO: Avoid hardcoding
|
|
35
|
-
// Vue.use(VueAnalytics, {
|
|
36
|
-
// id: 'UA-146876849-1'
|
|
37
|
-
// })
|
|
38
|
-
|
|
39
|
-
import "./extensions/string.js";
|
|
40
|
-
import "./extensions/array.js";
|
|
41
|
-
|
|
42
|
-
// Recursive components must be global
|
|
43
|
-
import VerticalPanel from "./components/panels/vertical";
|
|
44
|
-
import ResponsivePanel from "./components/panels/responsive";
|
|
45
|
-
import Component from "./components/component";
|
|
46
|
-
import CommonIcon from "./components/_icon";
|
|
47
|
-
import CommonBadge from "./components/_badge";
|
|
48
|
-
import CommonButton from "./components/_button";
|
|
49
|
-
import CommonMessage from "./components/_message";
|
|
50
|
-
import CommonDropdownMenu from "./components/_dropdownMenu";
|
|
51
|
-
import CommonTemplateMenu from "./templates/_menu";
|
|
52
|
-
Vue.component("panels-vertical", VerticalPanel);
|
|
53
|
-
Vue.component("panels-responsive", ResponsivePanel);
|
|
54
|
-
Vue.component("common-button", CommonButton);
|
|
55
|
-
Vue.component("common-icon", CommonIcon);
|
|
56
|
-
Vue.component("common-badge", CommonBadge);
|
|
57
|
-
Vue.component("common-message", CommonMessage);
|
|
58
|
-
Vue.component("common-dropdownMenu", CommonDropdownMenu);
|
|
59
|
-
Vue.component("templates-menu", CommonTemplateMenu);
|
|
60
|
-
|
|
61
|
-
// TODO: Deprecate
|
|
62
|
-
Vue.component("ui-component", Component);
|
|
63
|
-
|
|
64
|
-
Vue.component("glib-component", Component);
|
|
65
|
-
Vue.component("glib-icon", CommonIcon);
|
|
66
|
-
Vue.component("glib-panels-responsive", ResponsivePanel);
|
|
67
|
-
// Vue.component("glib-templates-menu", CommonTemplateMenu);
|
|
68
|
-
|
|
69
|
-
import genericMixin from "./components/mixins/generic.js";
|
|
70
|
-
Vue.mixin(genericMixin);
|
|
71
|
-
|
|
72
|
-
import eventsMixin from "./components/mixins/events.js";
|
|
73
|
-
Vue.mixin(eventsMixin);
|
|
74
|
-
|
|
75
|
-
import stylesMixin from "./components/mixins/styles.js";
|
|
76
|
-
Vue.mixin(stylesMixin);
|
|
77
|
-
|
|
78
|
-
import scrollingMixin from "./components/mixins/scrolling.js";
|
|
79
|
-
Vue.mixin(scrollingMixin);
|
|
80
|
-
|
|
81
|
-
import longClickDirective from "./components/mixins/longClick.js";
|
|
82
|
-
window.longClickInstance = longClickDirective({ delay: 500, interval: 0 });
|
|
83
|
-
Vue.directive("longclick", window.longClickInstance);
|
|
84
|
-
|
|
85
|
-
// TODO: Deprecate
|
|
86
|
-
import TypeUtils from "./utils/type";
|
|
87
|
-
Vue.use({
|
|
88
|
-
install: function(Vue, options) {
|
|
89
|
-
Vue.prototype.$type = {
|
|
90
|
-
isObject: TypeUtils.isObject,
|
|
91
|
-
isString: TypeUtils.isString,
|
|
92
|
-
isNumber: TypeUtils.isNumber,
|
|
93
|
-
isArray: TypeUtils.isArray,
|
|
94
|
-
|
|
95
|
-
ifObject: TypeUtils.ifObject,
|
|
96
|
-
ifString: TypeUtils.ifString,
|
|
97
|
-
ifNumber: TypeUtils.ifNumber,
|
|
98
|
-
ifArray: TypeUtils.ifArray
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
import Utils from "./utils/helper";
|
|
104
|
-
window.Utils = Utils;
|
|
105
|
-
|
|
106
|
-
import Framework from "./utils/public";
|
|
107
|
-
window.GLib = Framework;
|
|
108
|
-
|
|
109
|
-
import { settings } from "./utils/settings";
|
|
110
|
-
export { settings };
|
|
111
|
-
|
|
112
|
-
// TODO: https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components
|
|
113
|
-
// Vue.component('async-webpack-example', function (resolve) {
|
|
114
|
-
// // This special require syntax will instruct Webpack to
|
|
115
|
-
// // automatically split your built code into bundles which
|
|
116
|
-
// // are loaded over Ajax requests.
|
|
117
|
-
// require(['./my-async-component'], resolve)
|
|
118
|
-
// })
|
|
119
|
-
|
|
120
|
-
import VueGtag from "vue-gtag";
|
|
121
|
-
|
|
122
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
123
|
-
const gtagId = settings.gtagId;
|
|
124
|
-
if (gtagId) {
|
|
125
|
-
Vue.use(VueGtag, {
|
|
126
|
-
config: {
|
|
127
|
-
id: settings.gtagId,
|
|
128
|
-
params: {
|
|
129
|
-
send_page_view: false
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
window.vueApp = {
|
|
136
|
-
vuetify: new Vuetify({
|
|
137
|
-
icons: {
|
|
138
|
-
iconfont: "md"
|
|
139
|
-
},
|
|
140
|
-
theme: {
|
|
141
|
-
themes: Utils.settings.themes
|
|
142
|
-
},
|
|
143
|
-
breakpoint: {
|
|
144
|
-
smAndDown: true
|
|
145
|
-
}
|
|
146
|
-
}),
|
|
147
|
-
page: window.__page,
|
|
148
|
-
indicator: false,
|
|
149
|
-
// Rename to isPageStale
|
|
150
|
-
isStale: false,
|
|
151
|
-
stateUpdatedAt: null,
|
|
152
|
-
webSocket: { channels: {}, header: {} },
|
|
153
|
-
actionCable: { channels: {} },
|
|
154
|
-
temp: {}
|
|
155
|
-
};
|
|
156
|
-
new Vue({
|
|
157
|
-
el: "#app",
|
|
158
|
-
vuetify: window.vueApp.vuetify,
|
|
159
|
-
data: {
|
|
160
|
-
vueApp: window.vueApp
|
|
161
|
-
},
|
|
162
|
-
// data: {
|
|
163
|
-
// vuetify: vuetify,
|
|
164
|
-
// page: window.__page,
|
|
165
|
-
// indicator: false,
|
|
166
|
-
// isStale: false,
|
|
167
|
-
// webSocket: { channels: {}, header: {}, listWindow: null }
|
|
168
|
-
// },
|
|
169
|
-
render: function(createElement) {
|
|
170
|
-
return createElement(App, { props: { page: this.$data.vueApp.page } });
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// The above code uses Vue without the compiler, which means you cannot
|
|
176
|
-
// use Vue to target elements in your existing html templates. You would
|
|
177
|
-
// need to always use single file components.
|
|
178
|
-
// To be able to target elements in your existing html/erb templates,
|
|
179
|
-
// comment out the above code and uncomment the below
|
|
180
|
-
// Add <%= javascript_pack_tag 'hello_vue' %> to your layout
|
|
181
|
-
// Then add this markup to your html template:
|
|
182
|
-
//
|
|
183
|
-
// <div id='hello'>
|
|
184
|
-
// {{message}}
|
|
185
|
-
// <app></app>
|
|
186
|
-
// </div>
|
|
187
|
-
|
|
188
|
-
// import Vue from 'vue/dist/vue.esm'
|
|
189
|
-
// import App from '../app.vue'
|
|
190
|
-
//
|
|
191
|
-
// document.addEventListener('DOMContentLoaded', () => {
|
|
192
|
-
// const app = new Vue({
|
|
193
|
-
// el: '#hello',
|
|
194
|
-
// data: {
|
|
195
|
-
// message: "Can you say hello?"
|
|
196
|
-
// },
|
|
197
|
-
// components: { App }
|
|
198
|
-
// })
|
|
199
|
-
// })
|
|
1
|
+
import Vue from "vue";
|
|
2
|
+
export { Vue };
|
|
3
|
+
|
|
4
|
+
import App from "./app.vue";
|
|
5
|
+
|
|
6
|
+
import * as VueGoogleMaps from "vue2-google-maps";
|
|
7
|
+
Vue.use(VueGoogleMaps, {
|
|
8
|
+
load: {
|
|
9
|
+
key: process.env.GMAPS_API_KEY,
|
|
10
|
+
libraries: "places"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
import "./styles/test.scss";
|
|
15
|
+
import "./styles/test.sass";
|
|
16
|
+
|
|
17
|
+
import Vuetify from "vuetify";
|
|
18
|
+
import "vuetify/dist/vuetify.min.css";
|
|
19
|
+
// import "material-design-icons-iconfont/dist/material-design-icons.css";
|
|
20
|
+
// import "@mdi/font/css/materialdesignicons.css";
|
|
21
|
+
Vue.use(Vuetify);
|
|
22
|
+
|
|
23
|
+
import Chartkick from "vue-chartkick";
|
|
24
|
+
import Chart from "chart.js";
|
|
25
|
+
import annotationPlugin from "chartjs-plugin-annotation";
|
|
26
|
+
Chart.plugins.register(annotationPlugin);
|
|
27
|
+
Vue.use(Chartkick.use(Chart));
|
|
28
|
+
|
|
29
|
+
// TODO: make this opt-in
|
|
30
|
+
import VueYoutube from "vue-youtube";
|
|
31
|
+
Vue.use(VueYoutube);
|
|
32
|
+
|
|
33
|
+
// import VueAnalytics from 'vue-analytics'
|
|
34
|
+
// // TODO: Avoid hardcoding
|
|
35
|
+
// Vue.use(VueAnalytics, {
|
|
36
|
+
// id: 'UA-146876849-1'
|
|
37
|
+
// })
|
|
38
|
+
|
|
39
|
+
import "./extensions/string.js";
|
|
40
|
+
import "./extensions/array.js";
|
|
41
|
+
|
|
42
|
+
// Recursive components must be global
|
|
43
|
+
import VerticalPanel from "./components/panels/vertical";
|
|
44
|
+
import ResponsivePanel from "./components/panels/responsive";
|
|
45
|
+
import Component from "./components/component";
|
|
46
|
+
import CommonIcon from "./components/_icon";
|
|
47
|
+
import CommonBadge from "./components/_badge";
|
|
48
|
+
import CommonButton from "./components/_button";
|
|
49
|
+
import CommonMessage from "./components/_message";
|
|
50
|
+
import CommonDropdownMenu from "./components/_dropdownMenu";
|
|
51
|
+
import CommonTemplateMenu from "./templates/_menu";
|
|
52
|
+
Vue.component("panels-vertical", VerticalPanel);
|
|
53
|
+
Vue.component("panels-responsive", ResponsivePanel);
|
|
54
|
+
Vue.component("common-button", CommonButton);
|
|
55
|
+
Vue.component("common-icon", CommonIcon);
|
|
56
|
+
Vue.component("common-badge", CommonBadge);
|
|
57
|
+
Vue.component("common-message", CommonMessage);
|
|
58
|
+
Vue.component("common-dropdownMenu", CommonDropdownMenu);
|
|
59
|
+
Vue.component("templates-menu", CommonTemplateMenu);
|
|
60
|
+
|
|
61
|
+
// TODO: Deprecate
|
|
62
|
+
Vue.component("ui-component", Component);
|
|
63
|
+
|
|
64
|
+
Vue.component("glib-component", Component);
|
|
65
|
+
Vue.component("glib-icon", CommonIcon);
|
|
66
|
+
Vue.component("glib-panels-responsive", ResponsivePanel);
|
|
67
|
+
// Vue.component("glib-templates-menu", CommonTemplateMenu);
|
|
68
|
+
|
|
69
|
+
import genericMixin from "./components/mixins/generic.js";
|
|
70
|
+
Vue.mixin(genericMixin);
|
|
71
|
+
|
|
72
|
+
import eventsMixin from "./components/mixins/events.js";
|
|
73
|
+
Vue.mixin(eventsMixin);
|
|
74
|
+
|
|
75
|
+
import stylesMixin from "./components/mixins/styles.js";
|
|
76
|
+
Vue.mixin(stylesMixin);
|
|
77
|
+
|
|
78
|
+
import scrollingMixin from "./components/mixins/scrolling.js";
|
|
79
|
+
Vue.mixin(scrollingMixin);
|
|
80
|
+
|
|
81
|
+
import longClickDirective from "./components/mixins/longClick.js";
|
|
82
|
+
window.longClickInstance = longClickDirective({ delay: 500, interval: 0 });
|
|
83
|
+
Vue.directive("longclick", window.longClickInstance);
|
|
84
|
+
|
|
85
|
+
// TODO: Deprecate
|
|
86
|
+
import TypeUtils from "./utils/type";
|
|
87
|
+
Vue.use({
|
|
88
|
+
install: function(Vue, options) {
|
|
89
|
+
Vue.prototype.$type = {
|
|
90
|
+
isObject: TypeUtils.isObject,
|
|
91
|
+
isString: TypeUtils.isString,
|
|
92
|
+
isNumber: TypeUtils.isNumber,
|
|
93
|
+
isArray: TypeUtils.isArray,
|
|
94
|
+
|
|
95
|
+
ifObject: TypeUtils.ifObject,
|
|
96
|
+
ifString: TypeUtils.ifString,
|
|
97
|
+
ifNumber: TypeUtils.ifNumber,
|
|
98
|
+
ifArray: TypeUtils.ifArray
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
import Utils from "./utils/helper";
|
|
104
|
+
window.Utils = Utils;
|
|
105
|
+
|
|
106
|
+
import Framework from "./utils/public";
|
|
107
|
+
window.GLib = Framework;
|
|
108
|
+
|
|
109
|
+
import { settings } from "./utils/settings";
|
|
110
|
+
export { settings };
|
|
111
|
+
|
|
112
|
+
// TODO: https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components
|
|
113
|
+
// Vue.component('async-webpack-example', function (resolve) {
|
|
114
|
+
// // This special require syntax will instruct Webpack to
|
|
115
|
+
// // automatically split your built code into bundles which
|
|
116
|
+
// // are loaded over Ajax requests.
|
|
117
|
+
// require(['./my-async-component'], resolve)
|
|
118
|
+
// })
|
|
119
|
+
|
|
120
|
+
import VueGtag from "vue-gtag";
|
|
121
|
+
|
|
122
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
123
|
+
const gtagId = settings.gtagId;
|
|
124
|
+
if (gtagId) {
|
|
125
|
+
Vue.use(VueGtag, {
|
|
126
|
+
config: {
|
|
127
|
+
id: settings.gtagId,
|
|
128
|
+
params: {
|
|
129
|
+
send_page_view: false
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
window.vueApp = {
|
|
136
|
+
vuetify: new Vuetify({
|
|
137
|
+
icons: {
|
|
138
|
+
iconfont: "md"
|
|
139
|
+
},
|
|
140
|
+
theme: {
|
|
141
|
+
themes: Utils.settings.themes
|
|
142
|
+
},
|
|
143
|
+
breakpoint: {
|
|
144
|
+
smAndDown: true
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
page: window.__page,
|
|
148
|
+
indicator: false,
|
|
149
|
+
// Rename to isPageStale
|
|
150
|
+
isStale: false,
|
|
151
|
+
stateUpdatedAt: null,
|
|
152
|
+
webSocket: { channels: {}, header: {} },
|
|
153
|
+
actionCable: { channels: {} },
|
|
154
|
+
temp: {}
|
|
155
|
+
};
|
|
156
|
+
new Vue({
|
|
157
|
+
el: "#app",
|
|
158
|
+
vuetify: window.vueApp.vuetify,
|
|
159
|
+
data: {
|
|
160
|
+
vueApp: window.vueApp
|
|
161
|
+
},
|
|
162
|
+
// data: {
|
|
163
|
+
// vuetify: vuetify,
|
|
164
|
+
// page: window.__page,
|
|
165
|
+
// indicator: false,
|
|
166
|
+
// isStale: false,
|
|
167
|
+
// webSocket: { channels: {}, header: {}, listWindow: null }
|
|
168
|
+
// },
|
|
169
|
+
render: function(createElement) {
|
|
170
|
+
return createElement(App, { props: { page: this.$data.vueApp.page } });
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
// The above code uses Vue without the compiler, which means you cannot
|
|
176
|
+
// use Vue to target elements in your existing html templates. You would
|
|
177
|
+
// need to always use single file components.
|
|
178
|
+
// To be able to target elements in your existing html/erb templates,
|
|
179
|
+
// comment out the above code and uncomment the below
|
|
180
|
+
// Add <%= javascript_pack_tag 'hello_vue' %> to your layout
|
|
181
|
+
// Then add this markup to your html template:
|
|
182
|
+
//
|
|
183
|
+
// <div id='hello'>
|
|
184
|
+
// {{message}}
|
|
185
|
+
// <app></app>
|
|
186
|
+
// </div>
|
|
187
|
+
|
|
188
|
+
// import Vue from 'vue/dist/vue.esm'
|
|
189
|
+
// import App from '../app.vue'
|
|
190
|
+
//
|
|
191
|
+
// document.addEventListener('DOMContentLoaded', () => {
|
|
192
|
+
// const app = new Vue({
|
|
193
|
+
// el: '#hello',
|
|
194
|
+
// data: {
|
|
195
|
+
// message: "Can you say hello?"
|
|
196
|
+
// },
|
|
197
|
+
// components: { App }
|
|
198
|
+
// })
|
|
199
|
+
// })
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/appbar.vue
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<nav-drawer
|
|
4
|
-
v-if="page.leftDrawer"
|
|
5
|
-
:trigger="drawerTrigger"
|
|
6
|
-
:permanent="isPermanent"
|
|
7
|
-
:spec="page.leftDrawer"
|
|
8
|
-
/>
|
|
9
|
-
|
|
10
|
-
<v-toolbar :style="style" class="pages-navBar">
|
|
11
|
-
<v-app-bar-nav-icon
|
|
12
|
-
v-if="page.leftDrawer && !isPermanent"
|
|
13
|
-
style="color: inherit;"
|
|
14
|
-
@click="drawerTrigger = new Date()"
|
|
15
|
-
></v-app-bar-nav-icon>
|
|
16
|
-
<v-progress-circular
|
|
17
|
-
v-if="$root.vueApp.indicator"
|
|
18
|
-
indeterminate
|
|
19
|
-
></v-progress-circular>
|
|
20
|
-
<div v-else>
|
|
21
|
-
<panels-responsive v-if="navBar.logo" :spec="navBar.logo" />
|
|
22
|
-
<v-toolbar-title v-else-if="navBar.showTitle">{{
|
|
23
|
-
page.title
|
|
24
|
-
}}</v-toolbar-title>
|
|
25
|
-
</div>
|
|
26
|
-
<v-spacer></v-spacer>
|
|
27
|
-
|
|
28
|
-
<template v-for="(btn, index) in navBar.rightButtons">
|
|
29
|
-
<common-dropdownMenu
|
|
30
|
-
v-if="btn.childButtons"
|
|
31
|
-
:key="index"
|
|
32
|
-
:spec="btn"
|
|
33
|
-
:disabled="$isBusy"
|
|
34
|
-
/>
|
|
35
|
-
<common-button
|
|
36
|
-
v-else
|
|
37
|
-
:key="`right_${index}`"
|
|
38
|
-
:spec="buttonSpec(btn)"
|
|
39
|
-
:disabled="$isBusy"
|
|
40
|
-
/>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<views-avatar v-if="navBar.imageUrl" :spec="avatarSpec(navBar)" />
|
|
44
|
-
|
|
45
|
-
<v-btn
|
|
46
|
-
v-if="viewSourceEnabled()"
|
|
47
|
-
icon
|
|
48
|
-
style="color: inherit;"
|
|
49
|
-
@click="viewSource"
|
|
50
|
-
>
|
|
51
|
-
<v-icon>zoom_in</v-icon>
|
|
52
|
-
</v-btn>
|
|
53
|
-
</v-toolbar>
|
|
54
|
-
</div>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<script>
|
|
58
|
-
import NavDrawer from "./drawer";
|
|
59
|
-
import Launch from "../utils/launch";
|
|
60
|
-
import ViewsAvatar from "../components/avatar";
|
|
61
|
-
|
|
62
|
-
export default {
|
|
63
|
-
components: {
|
|
64
|
-
"nav-drawer": NavDrawer,
|
|
65
|
-
"views-avatar": ViewsAvatar
|
|
66
|
-
},
|
|
67
|
-
props: {
|
|
68
|
-
page: { type: Object, required: true }
|
|
69
|
-
},
|
|
70
|
-
data: function() {
|
|
71
|
-
return {
|
|
72
|
-
drawerTrigger: null,
|
|
73
|
-
navBar: {},
|
|
74
|
-
on: false
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
computed: {
|
|
78
|
-
style: function() {
|
|
79
|
-
return Object.assign(this.genericStyles(this.navBar), this.leftPadding);
|
|
80
|
-
},
|
|
81
|
-
// We could've used the `app` attribute on `v-toolbar` if it didn't conflict with our header-footer css.
|
|
82
|
-
leftPadding: function() {
|
|
83
|
-
switch (this.$vuetify.breakpoint.name) {
|
|
84
|
-
case "lg":
|
|
85
|
-
case "xl":
|
|
86
|
-
return { "padding-left": "270px" };
|
|
87
|
-
default:
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
isPermanent() {
|
|
92
|
-
return this.leftPadding !== null;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
methods: {
|
|
96
|
-
$ready() {
|
|
97
|
-
this.navBar = this.page.navBar || {};
|
|
98
|
-
},
|
|
99
|
-
buttonSpec(item) {
|
|
100
|
-
return Object.assign({}, item, {
|
|
101
|
-
view: "button-v1",
|
|
102
|
-
styleClasses: item.text ? ["text"] : ["icon"]
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
viewSourceEnabled: function() {
|
|
106
|
-
// return process.env.NODE_ENV === "development";
|
|
107
|
-
return false;
|
|
108
|
-
},
|
|
109
|
-
viewSource: function() {
|
|
110
|
-
const properties = { message: this.page };
|
|
111
|
-
Launch.dialog(Object.assign({}, properties));
|
|
112
|
-
},
|
|
113
|
-
avatarSpec(spec) {
|
|
114
|
-
return {
|
|
115
|
-
view: "avatar-v1",
|
|
116
|
-
url: spec["imageUrl"],
|
|
117
|
-
onClick: spec["onCLick"]
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
</script>
|
|
123
|
-
|
|
124
|
-
<style lang="scss" scoped>
|
|
125
|
-
.v-btn.views-button {
|
|
126
|
-
&.icon {
|
|
127
|
-
color: inherit;
|
|
128
|
-
}
|
|
129
|
-
&.text {
|
|
130
|
-
color: inherit;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
.pages-navBar {
|
|
134
|
-
box-shadow: none !important;
|
|
135
|
-
}
|
|
136
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<nav-drawer
|
|
4
|
+
v-if="page.leftDrawer"
|
|
5
|
+
:trigger="drawerTrigger"
|
|
6
|
+
:permanent="isPermanent"
|
|
7
|
+
:spec="page.leftDrawer"
|
|
8
|
+
/>
|
|
9
|
+
|
|
10
|
+
<v-toolbar :style="style" class="pages-navBar">
|
|
11
|
+
<v-app-bar-nav-icon
|
|
12
|
+
v-if="page.leftDrawer && !isPermanent"
|
|
13
|
+
style="color: inherit;"
|
|
14
|
+
@click="drawerTrigger = new Date()"
|
|
15
|
+
></v-app-bar-nav-icon>
|
|
16
|
+
<v-progress-circular
|
|
17
|
+
v-if="$root.vueApp.indicator"
|
|
18
|
+
indeterminate
|
|
19
|
+
></v-progress-circular>
|
|
20
|
+
<div v-else>
|
|
21
|
+
<panels-responsive v-if="navBar.logo" :spec="navBar.logo" />
|
|
22
|
+
<v-toolbar-title v-else-if="navBar.showTitle">{{
|
|
23
|
+
page.title
|
|
24
|
+
}}</v-toolbar-title>
|
|
25
|
+
</div>
|
|
26
|
+
<v-spacer></v-spacer>
|
|
27
|
+
|
|
28
|
+
<template v-for="(btn, index) in navBar.rightButtons">
|
|
29
|
+
<common-dropdownMenu
|
|
30
|
+
v-if="btn.childButtons"
|
|
31
|
+
:key="index"
|
|
32
|
+
:spec="btn"
|
|
33
|
+
:disabled="$isBusy"
|
|
34
|
+
/>
|
|
35
|
+
<common-button
|
|
36
|
+
v-else
|
|
37
|
+
:key="`right_${index}`"
|
|
38
|
+
:spec="buttonSpec(btn)"
|
|
39
|
+
:disabled="$isBusy"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<views-avatar v-if="navBar.imageUrl" :spec="avatarSpec(navBar)" />
|
|
44
|
+
|
|
45
|
+
<v-btn
|
|
46
|
+
v-if="viewSourceEnabled()"
|
|
47
|
+
icon
|
|
48
|
+
style="color: inherit;"
|
|
49
|
+
@click="viewSource"
|
|
50
|
+
>
|
|
51
|
+
<v-icon>zoom_in</v-icon>
|
|
52
|
+
</v-btn>
|
|
53
|
+
</v-toolbar>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import NavDrawer from "./drawer";
|
|
59
|
+
import Launch from "../utils/launch";
|
|
60
|
+
import ViewsAvatar from "../components/avatar";
|
|
61
|
+
|
|
62
|
+
export default {
|
|
63
|
+
components: {
|
|
64
|
+
"nav-drawer": NavDrawer,
|
|
65
|
+
"views-avatar": ViewsAvatar
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
page: { type: Object, required: true }
|
|
69
|
+
},
|
|
70
|
+
data: function() {
|
|
71
|
+
return {
|
|
72
|
+
drawerTrigger: null,
|
|
73
|
+
navBar: {},
|
|
74
|
+
on: false
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
style: function() {
|
|
79
|
+
return Object.assign(this.genericStyles(this.navBar), this.leftPadding);
|
|
80
|
+
},
|
|
81
|
+
// We could've used the `app` attribute on `v-toolbar` if it didn't conflict with our header-footer css.
|
|
82
|
+
leftPadding: function() {
|
|
83
|
+
switch (this.$vuetify.breakpoint.name) {
|
|
84
|
+
case "lg":
|
|
85
|
+
case "xl":
|
|
86
|
+
return { "padding-left": "270px" };
|
|
87
|
+
default:
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
isPermanent() {
|
|
92
|
+
return this.leftPadding !== null;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
$ready() {
|
|
97
|
+
this.navBar = this.page.navBar || {};
|
|
98
|
+
},
|
|
99
|
+
buttonSpec(item) {
|
|
100
|
+
return Object.assign({}, item, {
|
|
101
|
+
view: "button-v1",
|
|
102
|
+
styleClasses: item.text ? ["text"] : ["icon"]
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
viewSourceEnabled: function() {
|
|
106
|
+
// return process.env.NODE_ENV === "development";
|
|
107
|
+
return false;
|
|
108
|
+
},
|
|
109
|
+
viewSource: function() {
|
|
110
|
+
const properties = { message: this.page };
|
|
111
|
+
Launch.dialog(Object.assign({}, properties));
|
|
112
|
+
},
|
|
113
|
+
avatarSpec(spec) {
|
|
114
|
+
return {
|
|
115
|
+
view: "avatar-v1",
|
|
116
|
+
url: spec["imageUrl"],
|
|
117
|
+
onClick: spec["onCLick"]
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<style lang="scss" scoped>
|
|
125
|
+
.v-btn.views-button {
|
|
126
|
+
&.icon {
|
|
127
|
+
color: inherit;
|
|
128
|
+
}
|
|
129
|
+
&.text {
|
|
130
|
+
color: inherit;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.pages-navBar {
|
|
134
|
+
box-shadow: none !important;
|
|
135
|
+
}
|
|
136
|
+
</style>
|
package/nav/content.vue
CHANGED
|
File without changes
|