glib-web 2.6.7 → 3.0.0
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/action.js +39 -17
- package/actions/analytics/logEvent.js +2 -2
- package/actions/auth/saveCsrfToken.js +6 -0
- package/actions/cables/push.js +4 -4
- package/actions/commands/enqueue.js +17 -0
- package/actions/fields/reset.js +2 -2
- package/actions/http/get.js +15 -27
- package/actions/panels/scrollTo.js +1 -1
- package/actions/panels/scrollToBottom.js +1 -1
- package/actions/popovers/close.js +5 -0
- package/actions/popovers/open.js +9 -0
- package/actions/windows/closeWithReload.js +1 -1
- package/actions/windows/refreshState.js +3 -1
- package/actions/ws/push.js +5 -3
- package/app.vue +59 -27
- package/components/_badge.vue +1 -6
- package/components/_button.vue +30 -30
- package/components/_chip.vue +27 -29
- package/components/_dropdownMenu.vue +10 -23
- package/components/_icon.vue +5 -5
- package/components/_responsive.vue +7 -21
- package/components/avatar.vue +11 -15
- package/components/banners/alert.vue +2 -7
- package/components/banners/select.vue +18 -30
- package/components/button.vue +4 -5
- package/components/component.vue +112 -133
- package/components/datetime.vue +2 -0
- package/components/fields/_patternText.vue +8 -19
- package/components/fields/_select.vue +9 -27
- package/components/fields/autocomplete.vue +8 -21
- package/components/fields/check.vue +5 -12
- package/components/fields/checkGroup.vue +3 -13
- package/components/fields/country/field.vue +9 -27
- package/components/fields/date.vue +5 -5
- package/components/fields/datetime.vue +6 -11
- package/components/fields/dynamicSelect.vue +8 -29
- package/components/fields/file.vue +10 -29
- package/components/fields/newRichText.vue +67 -54
- package/components/fields/otpField.vue +11 -31
- package/components/fields/phone/field.vue +60 -78
- package/components/fields/radio.vue +8 -44
- package/components/fields/radioGroup.vue +17 -19
- package/components/fields/rating.vue +9 -16
- package/components/fields/richText.vue +27 -45
- package/components/fields/select.vue +10 -7
- package/components/fields/stripe/stripeFields.vue +9 -2
- package/components/fields/stripe/stripeIndividualFields.vue +9 -7
- package/components/fields/stripeExternalAccount.vue +10 -24
- package/components/fields/text.vue +26 -50
- package/components/fields/textarea.vue +14 -27
- package/components/fields/timeZone.vue +9 -6
- package/components/fields/timer.vue +5 -11
- package/components/image.vue +12 -23
- package/components/label.vue +10 -18
- package/components/markdown.vue +45 -23
- package/components/mixins/events.js +24 -25
- package/components/mixins/generic.js +7 -4
- package/components/mixins/inputVariant.js +16 -0
- package/components/mixins/list/autoload.js +7 -5
- package/components/mixins/styles.js +16 -16
- package/components/mixins/table/autoload.js +6 -4
- package/components/mixins/ws/actionCable.js +6 -5
- package/components/mixins/ws/phoenixSocket.js +11 -9
- package/components/p.vue +10 -0
- package/components/panels/column.vue +8 -19
- package/components/panels/custom.vue +9 -13
- package/components/panels/flow.vue +19 -13
- package/components/panels/form.vue +26 -34
- package/components/panels/grid.vue +15 -9
- package/components/panels/horizontal.vue +58 -54
- package/components/panels/list.vue +37 -72
- package/components/panels/responsive.vue +2 -33
- package/components/panels/scroll.vue +3 -0
- package/components/panels/split.vue +2 -2
- package/components/panels/table.vue +32 -63
- package/components/panels/timeline.vue +20 -30
- package/components/panels/vertical.vue +8 -13
- package/components/popover.vue +39 -0
- package/components/progressCircle.vue +2 -8
- package/components/progressbar.vue +4 -14
- package/components/shareButton.vue +24 -30
- package/components/tabBar.vue +29 -28
- package/index.js +60 -94
- package/nav/appbar.vue +8 -6
- package/nav/dialog.vue +30 -49
- package/nav/drawer.vue +39 -51
- package/nav/drawerButton.vue +5 -7
- package/nav/drawerLabel.vue +2 -3
- package/nav/sheet.vue +21 -22
- package/nav/snackbar.vue +19 -30
- package/package.json +13 -16
- package/plugins/driverCustomBehavior.js +1 -1
- package/plugins/updatableComponent.js +2 -2
- package/plugins/vuetify.js +26 -0
- package/store.js +16 -0
- package/templates/comment.vue +42 -19
- package/templates/featured.vue +8 -9
- package/templates/thumbnail-old.vue +188 -0
- package/templates/thumbnail.vue +3 -208
- package/tsconfig.json +1 -1
- package/utils/component.js +18 -18
- package/utils/constant.js +4 -0
- package/utils/eventBus.js +9 -2
- package/utils/history.js +12 -8
- package/utils/http.js +29 -71
- package/utils/launch.js +89 -52
- package/utils/private/ws.js +5 -3
- package/utils/public.js +6 -0
- package/utils/queue.js +102 -0
- package/utils/settings.js +3 -9
package/action.js
CHANGED
|
@@ -52,12 +52,18 @@ import ActionsAnalyticsLogEvent from "./actions/analytics/logEvent";
|
|
|
52
52
|
|
|
53
53
|
import ActionCommandsCopy from "./actions/commands/copy";
|
|
54
54
|
import ActionCommandsCustom from "./actions/commands/custom";
|
|
55
|
+
import ActionCommandsEnqueue from "./actions/commands/enqueue";
|
|
55
56
|
|
|
56
57
|
import ActionToursStart from "./actions/tours/start";
|
|
57
58
|
import ActionToursStop from "./actions/tours/stop";
|
|
58
59
|
|
|
59
60
|
import ActionComponentsUpdate from "./actions/components/update";
|
|
60
61
|
|
|
62
|
+
import ActionPopoversOpen from "./actions/popovers/open"
|
|
63
|
+
import ActionPopoversClose from "./actions/popovers/close"
|
|
64
|
+
|
|
65
|
+
import { vueApp } from "./store";
|
|
66
|
+
|
|
61
67
|
const actions = {
|
|
62
68
|
runMultiple: ActionsRunMultiple,
|
|
63
69
|
|
|
@@ -111,8 +117,12 @@ const actions = {
|
|
|
111
117
|
|
|
112
118
|
"commands/copy": ActionCommandsCopy,
|
|
113
119
|
"commands/custom": ActionCommandsCustom,
|
|
120
|
+
"commands/enqueue": ActionCommandsEnqueue,
|
|
114
121
|
|
|
115
122
|
"tours/start": ActionToursStart,
|
|
123
|
+
"components/update": ActionComponentsUpdate,
|
|
124
|
+
"popovers/open": ActionPopoversOpen,
|
|
125
|
+
"popovers/close": ActionPopoversClose,
|
|
116
126
|
"tours/stop": ActionToursStop,
|
|
117
127
|
"components/update": ActionComponentsUpdate
|
|
118
128
|
};
|
|
@@ -124,34 +134,43 @@ export default class Action {
|
|
|
124
134
|
if (!TypeUtils.isObject(spec)) {
|
|
125
135
|
return;
|
|
126
136
|
}
|
|
127
|
-
if (!TypeUtils.isObject(component)) {
|
|
128
|
-
console.warn("Action requires a component");
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
137
|
|
|
132
138
|
const name = spec.action;
|
|
133
139
|
if (TypeUtils.isString(name)) {
|
|
134
140
|
if (name.startsWith("component/")) {
|
|
135
|
-
|
|
141
|
+
this.executeLocal(name, spec, component);
|
|
136
142
|
} else {
|
|
137
|
-
|
|
143
|
+
this.executeGlobal(name, spec, component, params);
|
|
138
144
|
}
|
|
145
|
+
|
|
146
|
+
// const actionName = name.replace(/-v1$/, "");
|
|
147
|
+
|
|
148
|
+
// try {
|
|
149
|
+
// const action = new actions[actionName]();
|
|
150
|
+
// const logDisabled = action.logDisabled && action.logDisabled();
|
|
151
|
+
// if (!logDisabled) {
|
|
152
|
+
// console.log(`Executing "${actionName}"`);
|
|
153
|
+
// }
|
|
154
|
+
// action.execute(spec, null, component, params);
|
|
155
|
+
// } catch (e) {
|
|
156
|
+
// console.log(`Failed executing command: "${e.message}"`);
|
|
157
|
+
// }
|
|
139
158
|
} else {
|
|
140
|
-
console.
|
|
159
|
+
console.log(`Invalid action: "${name}"`);
|
|
141
160
|
}
|
|
142
161
|
}
|
|
143
162
|
|
|
144
163
|
static executeLocal(name, spec, component) {
|
|
145
164
|
const methodName = name.replace(/^component\//, "");
|
|
146
165
|
const componentName = GLib.component.vueName(component);
|
|
147
|
-
console.
|
|
166
|
+
console.log(
|
|
148
167
|
`Executing component action on ${componentName}: ${methodName}`
|
|
149
168
|
);
|
|
150
169
|
component[`action_${methodName}`](spec);
|
|
151
170
|
}
|
|
152
171
|
|
|
153
172
|
static executeGlobal(name, spec, component, params) {
|
|
154
|
-
|
|
173
|
+
this._executeInternal(name, spec, component, params, actions);
|
|
155
174
|
}
|
|
156
175
|
|
|
157
176
|
static _executeInternal(name, spec, component, params, registry) {
|
|
@@ -161,12 +180,15 @@ export default class Action {
|
|
|
161
180
|
const action = new registry[actionName]();
|
|
162
181
|
const logDisabled = action.logDisabled && action.logDisabled();
|
|
163
182
|
if (!logDisabled) {
|
|
164
|
-
console.
|
|
183
|
+
console.log(`Executing "${actionName}"`);
|
|
165
184
|
}
|
|
166
|
-
|
|
185
|
+
action.execute(spec, component, params);
|
|
167
186
|
} catch (e) {
|
|
168
|
-
GLib.settings.errorHandler(
|
|
169
|
-
|
|
187
|
+
GLib.settings.errorHandler(
|
|
188
|
+
new Error(
|
|
189
|
+
`Failed executing command "${actionName}". Error: ${e.message}`
|
|
190
|
+
)
|
|
191
|
+
);
|
|
170
192
|
}
|
|
171
193
|
}
|
|
172
194
|
|
|
@@ -174,13 +196,13 @@ export default class Action {
|
|
|
174
196
|
// TODO: The execution should be in the following order: onResponse, page render, onLoad
|
|
175
197
|
if (response.header || response.body || response.footer) {
|
|
176
198
|
Utils.http.forceComponentUpdate(() => {
|
|
177
|
-
|
|
199
|
+
vueApp.page = response
|
|
178
200
|
});
|
|
179
201
|
}
|
|
180
202
|
|
|
181
|
-
|
|
203
|
+
vueApp.temp.analytics = response.analytics;
|
|
182
204
|
GLib.action.execute(response.onResponse, component);
|
|
183
|
-
|
|
205
|
+
vueApp.temp.analytics = null;
|
|
184
206
|
}
|
|
185
207
|
|
|
186
208
|
static registerCustom(actionName, action) {
|
|
@@ -192,7 +214,7 @@ export default class Action {
|
|
|
192
214
|
}
|
|
193
215
|
|
|
194
216
|
static executeCustom(name, spec, component, params) {
|
|
195
|
-
|
|
217
|
+
this._executeInternal(name, spec, component, params, customActions);
|
|
196
218
|
}
|
|
197
219
|
}
|
|
198
220
|
|
|
@@ -14,10 +14,10 @@ export default class {
|
|
|
14
14
|
const suffix = params.referer_group ? "w/ referer" : "w/o referer";
|
|
15
15
|
params.build_env = Utils.settings.env;
|
|
16
16
|
// params.build_version = Utils.settings.appVersion;
|
|
17
|
-
console.
|
|
17
|
+
console.log(`Logging ${suffix}:`, properties.name, params);
|
|
18
18
|
firebase.analytics().logEvent(properties.name, params);
|
|
19
19
|
} else {
|
|
20
|
-
console.
|
|
20
|
+
console.log("Waiting for firebase to be initialized...");
|
|
21
21
|
setTimeout(() => {
|
|
22
22
|
this.execute(properties);
|
|
23
23
|
}, 100);
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
// import Storage from '../../utils/storage'
|
|
2
|
+
// import Keys from '../../keys'
|
|
3
|
+
|
|
1
4
|
export default class {
|
|
2
5
|
execute(properties, component) {
|
|
6
|
+
// console.log(properties['token'])
|
|
7
|
+
// Storage.setLocal(Keys.Db.csrfToken, properties['token'])
|
|
8
|
+
|
|
3
9
|
Utils.dom.setCsrf(properties["token"]);
|
|
4
10
|
Action.execute(properties["onSave"], component);
|
|
5
11
|
}
|
package/actions/cables/push.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { vueApp } from "../../store";
|
|
2
|
+
|
|
1
3
|
export default class {
|
|
2
4
|
execute(properties, component) {
|
|
3
5
|
Utils.type.ifString(properties.channel, channelName => {
|
|
4
|
-
const ws =
|
|
6
|
+
const ws = vueApp.actionCable;
|
|
5
7
|
const channel = ws.channels[channelName];
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
// This is because `push` action's logs are a bit sensitive.
|
|
9
|
-
console.debug("Pushing to", channel);
|
|
9
|
+
console.log("Pushing to", channel);
|
|
10
10
|
|
|
11
11
|
Utils.type.ifString(properties.event, eventName => {
|
|
12
12
|
if (channel) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// import Hash from "../../utils/hash";
|
|
2
|
+
|
|
3
|
+
export default class {
|
|
4
|
+
// async executeJob(spec, component) {
|
|
5
|
+
// console.log("Waiting for next job1...");
|
|
6
|
+
// GLib.action.execute(spec.onExecute, component);
|
|
7
|
+
// await this.sleep(2000);
|
|
8
|
+
// console.log("Waiting for next job2...");
|
|
9
|
+
// }
|
|
10
|
+
execute(spec, component) {
|
|
11
|
+
GLib.queue.enqueue(() => {
|
|
12
|
+
GLib.action.execute(spec.onExecute, component);
|
|
13
|
+
// console.log("Waiting for next job0...");
|
|
14
|
+
// this.executeJob(spec, component);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
package/actions/fields/reset.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { nextTick } from "vue";
|
|
2
2
|
|
|
3
3
|
export default class {
|
|
4
4
|
execute(properties, component) {
|
|
5
5
|
const target = GLib.component.findById(properties.targetId);
|
|
6
6
|
target.action_resetValue();
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
nextTick(() => {
|
|
9
9
|
GLib.action.execute(properties["onReset"], component);
|
|
10
10
|
});
|
|
11
11
|
}
|
package/actions/http/get.js
CHANGED
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
export default class {
|
|
2
|
-
execute(
|
|
3
|
-
return new Promise(resolve => {
|
|
4
|
-
GLib.http.execute(
|
|
5
|
-
spec,
|
|
6
|
-
"GET",
|
|
7
|
-
component,
|
|
8
|
-
(page, response) => {
|
|
9
|
-
this.handleSuccess(page, spec, component);
|
|
10
|
-
resolve({ page: page, response: response });
|
|
11
|
-
},
|
|
12
|
-
(error, response) => {
|
|
13
|
-
resolve({ error: error, response: response });
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
handleSuccess(page, spec, component) {
|
|
2
|
+
execute(properties, controller) {
|
|
20
3
|
const currentUrl = window.location.href;
|
|
4
|
+
// const htmlUrl = Utils.url.htmlUrl(properties["url"]);
|
|
21
5
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
6
|
+
GLib.http.execute(properties, "GET", controller, (page, response) => {
|
|
7
|
+
Utils.type.ifString(properties.historyUrl, historyUrl => {
|
|
8
|
+
const cleanUrl = Utils.url.htmlUrl(historyUrl);
|
|
9
|
+
if (cleanUrl !== currentUrl) {
|
|
10
|
+
console.log("URL", cleanUrl, response.url, response);
|
|
11
|
+
const data = Object.assign({}, page, {
|
|
12
|
+
replayGetResponse: page.onResponse
|
|
13
|
+
});
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
// Utils.history.pushPage(data, historyUrl);
|
|
16
|
+
Utils.history.pushPage(data, cleanUrl);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
GLib.action.handleResponse(page, controller);
|
|
31
20
|
});
|
|
32
|
-
GLib.action.handleResponse(page, component);
|
|
33
21
|
}
|
|
34
22
|
}
|
|
@@ -5,7 +5,7 @@ export default class {
|
|
|
5
5
|
Utils.launch.dialog.closestBody(component) || Utils.history._pageBody;
|
|
6
6
|
|
|
7
7
|
const selector = `#${properties.viewId}`;
|
|
8
|
-
console.
|
|
8
|
+
console.log("Scrolling to", selector);
|
|
9
9
|
const element = pageBody.querySelector(selector);
|
|
10
10
|
element.scrollIntoView({
|
|
11
11
|
behavior: properties["animate"] ? "smooth" : "auto"
|
|
@@ -4,7 +4,7 @@ export default class {
|
|
|
4
4
|
// TODO: make this support any panelId
|
|
5
5
|
const target = properties.panelId ? `_innerBody` : "_pageBody";
|
|
6
6
|
const pageBody = Utils.history[target];
|
|
7
|
-
console.
|
|
7
|
+
console.log(`Scrolling ${target} to bottom`);
|
|
8
8
|
pageBody.scrollTo({
|
|
9
9
|
top: pageBody.scrollHeight,
|
|
10
10
|
behavior: properties["animate"] ? "smooth" : "auto"
|
|
@@ -6,7 +6,7 @@ export default class {
|
|
|
6
6
|
const data = Object.assign({}, properties);
|
|
7
7
|
if (!Utils.history.back()) {
|
|
8
8
|
data.url = fallbackUrl;
|
|
9
|
-
console.
|
|
9
|
+
console.log("Use fallbackUrl", data.url);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// Allow time for history.back() to complete, which is important for actions that need
|
package/actions/ws/push.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { vueApp } from "../../store";
|
|
2
|
+
|
|
1
3
|
export default class {
|
|
2
4
|
execute(properties, component, params) {
|
|
3
5
|
Utils.type.ifString(properties.topic, topicName => {
|
|
4
|
-
const ws =
|
|
6
|
+
const ws = vueApp.webSocket;
|
|
5
7
|
const channel = ws.channels[topicName];
|
|
6
8
|
|
|
7
9
|
Utils.type.ifString(properties.event, eventName => {
|
|
@@ -13,14 +15,14 @@ export default class {
|
|
|
13
15
|
channel
|
|
14
16
|
.push(eventName, payload)
|
|
15
17
|
.receive("ok", resp => {
|
|
16
|
-
console.
|
|
18
|
+
console.log(
|
|
17
19
|
`Push to '${topicName}/${eventName}' succeeded`,
|
|
18
20
|
resp
|
|
19
21
|
);
|
|
20
22
|
Utils.ws.handleResponse(resp.onResponse, component);
|
|
21
23
|
})
|
|
22
24
|
.receive("error", resp => {
|
|
23
|
-
console.
|
|
25
|
+
console.log(`Push to '${topicName}/${eventName}' failed`, resp);
|
|
24
26
|
Utils.ws.handleResponse(resp.onResponse, component);
|
|
25
27
|
});
|
|
26
28
|
} else {
|
package/app.vue
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-app :class="page.styleClasses">
|
|
3
|
-
<component
|
|
4
|
-
:is="containerComponent"
|
|
5
|
-
:spec="formSpec"
|
|
6
|
-
:style="'height: 100%;'"
|
|
7
|
-
>
|
|
3
|
+
<component :is="containerComponent" :spec="formSpec" :style="'height: 100%;'">
|
|
8
4
|
<nav-appbar ref="appBar" :page="page" />
|
|
9
5
|
|
|
10
|
-
<v-progress-linear
|
|
11
|
-
|
|
12
|
-
:indeterminate="true"
|
|
13
|
-
height="5"
|
|
14
|
-
style="position: fixed; z-index: 4;"
|
|
15
|
-
>
|
|
6
|
+
<v-progress-linear color="primary" v-if="vueApp.indicator" :indeterminate="true" height="5"
|
|
7
|
+
style="position: fixed; z-index: 4;">
|
|
16
8
|
</v-progress-linear>
|
|
17
9
|
|
|
18
10
|
<v-main :style="`height: ${mainHeight}px;`">
|
|
19
|
-
<v-container
|
|
20
|
-
:fluid="page.template == 'fullWidth'"
|
|
21
|
-
:class="containerClasses"
|
|
22
|
-
>
|
|
11
|
+
<v-container :fluid="page.template == 'fullWidth'" :class="containerClasses">
|
|
23
12
|
<div class="pages-header">
|
|
24
13
|
<panels-responsive :spec="header" />
|
|
25
14
|
</div>
|
|
@@ -38,25 +27,27 @@
|
|
|
38
27
|
</template>
|
|
39
28
|
|
|
40
29
|
<script>
|
|
41
|
-
import NavAppBar from "./nav/appbar";
|
|
30
|
+
import NavAppBar from "./nav/appbar.vue";
|
|
42
31
|
import Utils from "./utils/helper";
|
|
43
32
|
import phoenixSocketMixin from "./components/mixins/ws/phoenixSocket.js";
|
|
44
33
|
import actionCableMixin from "./components/mixins/ws/actionCable.js";
|
|
45
|
-
import FormPanel from "./components/panels/form";
|
|
34
|
+
import FormPanel from "./components/panels/form.vue";
|
|
35
|
+
import { vueApp } from "./store";
|
|
46
36
|
|
|
47
37
|
export default {
|
|
48
38
|
components: {
|
|
49
39
|
"nav-appbar": NavAppBar,
|
|
50
|
-
"panels-form": FormPanel
|
|
40
|
+
"panels-form": FormPanel,
|
|
51
41
|
},
|
|
52
42
|
mixins: [phoenixSocketMixin, actionCableMixin],
|
|
53
43
|
props: {
|
|
54
|
-
page: { type: Object, required: true }
|
|
44
|
+
page: { type: Object, required: true },
|
|
55
45
|
},
|
|
56
46
|
data() {
|
|
57
47
|
return {
|
|
58
48
|
title: "...",
|
|
59
|
-
mainHeight: 0
|
|
49
|
+
mainHeight: 0,
|
|
50
|
+
vueApp
|
|
60
51
|
};
|
|
61
52
|
},
|
|
62
53
|
computed: {
|
|
@@ -71,6 +62,7 @@ export default {
|
|
|
71
62
|
},
|
|
72
63
|
containerComponent() {
|
|
73
64
|
if (this.formSpec) {
|
|
65
|
+
this.name = 'panels-form'
|
|
74
66
|
return "panels-form";
|
|
75
67
|
}
|
|
76
68
|
return "div";
|
|
@@ -83,15 +75,15 @@ export default {
|
|
|
83
75
|
// Use computed to ensure that the spec gets updated when the user navigates to another page.
|
|
84
76
|
formSpec() {
|
|
85
77
|
return this.page.fullPageForm;
|
|
86
|
-
}
|
|
78
|
+
},
|
|
87
79
|
},
|
|
88
80
|
watch: {
|
|
89
|
-
"
|
|
81
|
+
"vueApp.indicator": function (val, oldVal) {
|
|
90
82
|
document.title = val ? "..." : this.page.title;
|
|
91
83
|
}
|
|
92
84
|
},
|
|
93
85
|
created() {
|
|
94
|
-
console.
|
|
86
|
+
console.log(
|
|
95
87
|
`Version: ${Utils.settings.appVersion} (${Utils.settings.env})`
|
|
96
88
|
);
|
|
97
89
|
Utils.history.saveInitialContent(this.page);
|
|
@@ -102,7 +94,7 @@ export default {
|
|
|
102
94
|
$mounted() {
|
|
103
95
|
window.addEventListener(
|
|
104
96
|
"resize",
|
|
105
|
-
event => {
|
|
97
|
+
(event) => {
|
|
106
98
|
this.updateMainHeight();
|
|
107
99
|
},
|
|
108
100
|
true
|
|
@@ -145,9 +137,10 @@ export default {
|
|
|
145
137
|
});
|
|
146
138
|
},
|
|
147
139
|
updateMainHeight() {
|
|
140
|
+
console.debug("Setting body height");
|
|
148
141
|
this.mainHeight = window.innerHeight - this.$refs.appBar.$el.offsetHeight;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
142
|
+
},
|
|
143
|
+
},
|
|
151
144
|
};
|
|
152
145
|
</script>
|
|
153
146
|
|
|
@@ -165,6 +158,7 @@ export default {
|
|
|
165
158
|
body {
|
|
166
159
|
// Hide superfluous scrollbar (Edge)
|
|
167
160
|
-ms-overflow-style: none;
|
|
161
|
+
|
|
168
162
|
* {
|
|
169
163
|
-ms-overflow-style: initial;
|
|
170
164
|
}
|
|
@@ -174,6 +168,7 @@ body {
|
|
|
174
168
|
display: none;
|
|
175
169
|
}
|
|
176
170
|
}
|
|
171
|
+
|
|
177
172
|
html {
|
|
178
173
|
// Hide superfluous scrollbar (Firefox)
|
|
179
174
|
scrollbar-width: none;
|
|
@@ -185,17 +180,20 @@ body,
|
|
|
185
180
|
#app {
|
|
186
181
|
height: 100%;
|
|
187
182
|
}
|
|
183
|
+
|
|
188
184
|
/******/
|
|
189
185
|
|
|
190
186
|
/*** panels/scrollTo support ***/
|
|
191
187
|
.glib-scrollto {
|
|
192
188
|
transition: background 0.5s;
|
|
193
189
|
}
|
|
190
|
+
|
|
194
191
|
.glib-scrollto--highlighted {
|
|
195
192
|
background: yellow !important;
|
|
196
193
|
}
|
|
194
|
+
|
|
197
195
|
// Don't override the default button's effect.
|
|
198
|
-
.glib-clickable:not(.v-btn)
|
|
196
|
+
.glib-clickable:not(.v-btn) {
|
|
199
197
|
cursor: pointer;
|
|
200
198
|
|
|
201
199
|
// // So that we can display a semi-transparent layer on hover (see below)
|
|
@@ -215,9 +213,42 @@ body,
|
|
|
215
213
|
background: rgba(100, 100, 100, 0.2);
|
|
216
214
|
}
|
|
217
215
|
}
|
|
216
|
+
|
|
218
217
|
.glib-clickable.theme--light.v-list-item:hover:before {
|
|
219
218
|
opacity: 1; // Override Vuetify
|
|
220
219
|
}
|
|
220
|
+
|
|
221
|
+
.popover-menu {
|
|
222
|
+
padding: 8px 0;
|
|
223
|
+
background-color: white;
|
|
224
|
+
border-radius: 8px;
|
|
225
|
+
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
226
|
+
height: fit-content;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.popover-menu-item {
|
|
230
|
+
font-size: 14px;
|
|
231
|
+
padding: 8px 16px;
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.popover-menu-item:hover {
|
|
236
|
+
background-color: #f3f4f6;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.v-input__details {
|
|
240
|
+
min-height: 0;
|
|
241
|
+
margin-bottom: 0;
|
|
242
|
+
|
|
243
|
+
.v-messages {
|
|
244
|
+
min-height: 0;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.v-label {
|
|
249
|
+
opacity: 1;
|
|
250
|
+
}
|
|
251
|
+
|
|
221
252
|
/******/
|
|
222
253
|
</style>
|
|
223
254
|
|
|
@@ -236,5 +267,6 @@ body,
|
|
|
236
267
|
/* overflow-y: auto; */
|
|
237
268
|
overflow-y: overlay;
|
|
238
269
|
}
|
|
270
|
+
|
|
239
271
|
/******/
|
|
240
272
|
</style>
|
package/components/_badge.vue
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-badge
|
|
3
|
-
:color="badge.backgroundColor || 'red'"
|
|
4
|
-
overlap
|
|
5
|
-
:value="badgeExists()"
|
|
6
|
-
:style="styles()"
|
|
7
|
-
>
|
|
2
|
+
<v-badge :color="badge.backgroundColor || 'red'" overlap :model-value="badgeExists()" :style="styles()">
|
|
8
3
|
<template v-slot:badge>{{ badge.text }}</template>
|
|
9
4
|
<slot />
|
|
10
5
|
</v-badge>
|
package/components/_button.vue
CHANGED
|
@@ -1,46 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
<!-- Use `click.prevent` to prevent bubbling when clicking a dropdown button that is
|
|
2
|
+
<!-- Use `click.prevent` to prevent bubbling when clicking a dropdown button that is
|
|
4
3
|
located in a list row that has href. -->
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
:icon="$classes().includes('icon')"
|
|
15
|
-
:outlined="$classes().includes('outlined')"
|
|
16
|
-
:tile="$classes().includes('tile')"
|
|
17
|
-
:rounded="$classes().includes('rounded')"
|
|
18
|
-
:depressed="$classes().includes('depressed')"
|
|
19
|
-
@click.prevent="
|
|
20
|
-
type == 'submit' ? $dispatchEvent('forms/submit') : $onClick()
|
|
21
|
-
"
|
|
22
|
-
v-on="eventHandlers"
|
|
23
|
-
>
|
|
24
|
-
<span><common-icon :spec="spec.icon || {}"/></span>
|
|
25
|
-
<div :class="hideTextOnXs && spec.icon ? 'd-none d-sm-flex' : null">
|
|
26
|
-
{{ spec.text }}
|
|
27
|
-
</div>
|
|
28
|
-
</v-btn>
|
|
29
|
-
</common-badge>
|
|
4
|
+
<v-btn :type="type" :disabled="disabled || $isBusy || spec.disabled" :style="styles()" :class="classes()"
|
|
5
|
+
:href="$href()" :rel="$rel()" :variant="variant" :rounded="$classes().includes('rounded') || null" @click.prevent="
|
|
6
|
+
type == 'submit' ? $dispatchEvent('forms/submit') : $onClick()
|
|
7
|
+
">
|
|
8
|
+
<span v-if="spec.icon"><common-icon :spec="spec.icon || {}" /></span>
|
|
9
|
+
<div :class="hideTextOnXs && spec.icon ? 'd-none d-sm-flex' : null">
|
|
10
|
+
{{ spec.text }}
|
|
11
|
+
</div>
|
|
12
|
+
</v-btn>
|
|
30
13
|
</template>
|
|
31
14
|
|
|
32
15
|
<script>
|
|
16
|
+
import { variants } from '../utils/constant'
|
|
17
|
+
|
|
33
18
|
export default {
|
|
34
19
|
props: {
|
|
35
20
|
spec: { type: Object, required: true },
|
|
36
21
|
type: { type: String, default: "button" },
|
|
37
|
-
disabled: { type: Boolean
|
|
22
|
+
disabled: { type: Boolean },
|
|
38
23
|
hideTextOnXs: { type: Boolean },
|
|
39
24
|
eventHandlers: { type: Object, default: null }
|
|
40
25
|
},
|
|
41
|
-
data: function() {
|
|
26
|
+
data: function () {
|
|
42
27
|
return {
|
|
43
|
-
linkStyling: false
|
|
28
|
+
linkStyling: false,
|
|
29
|
+
variant: 'elevated'
|
|
44
30
|
};
|
|
45
31
|
},
|
|
46
32
|
methods: {
|
|
@@ -48,6 +34,13 @@ export default {
|
|
|
48
34
|
this.$type.ifArray(this.spec.styleClasses, val => {
|
|
49
35
|
this.linkStyling = val.includes("link");
|
|
50
36
|
});
|
|
37
|
+
|
|
38
|
+
const vm = this
|
|
39
|
+
variants.forEach((value) => {
|
|
40
|
+
if (vm.$classes().includes(value)) {
|
|
41
|
+
vm.variant = value
|
|
42
|
+
}
|
|
43
|
+
})
|
|
51
44
|
},
|
|
52
45
|
styles() {
|
|
53
46
|
const styles = this.$styles();
|
|
@@ -83,6 +76,7 @@ button {
|
|
|
83
76
|
min-width: 0;
|
|
84
77
|
margin: 0;
|
|
85
78
|
}
|
|
79
|
+
|
|
86
80
|
.v-btn {
|
|
87
81
|
&.link {
|
|
88
82
|
text-transform: none !important;
|
|
@@ -95,19 +89,24 @@ button {
|
|
|
95
89
|
font-size: 16px;
|
|
96
90
|
line-height: 1;
|
|
97
91
|
min-width: auto;
|
|
92
|
+
box-shadow: none !important;
|
|
98
93
|
}
|
|
99
94
|
}
|
|
95
|
+
|
|
100
96
|
.v-btn--rounded {
|
|
101
97
|
// Override .v-application.rounded
|
|
102
98
|
border-radius: 28px !important;
|
|
103
99
|
}
|
|
100
|
+
|
|
104
101
|
.v-banner__wrapper .v-btn:not(.v-btn--round).v-size--default {
|
|
105
102
|
min-width: 0;
|
|
106
103
|
padding: 0;
|
|
107
104
|
}
|
|
105
|
+
|
|
108
106
|
.v-banner__wrapper .v-btn.v-size--default {
|
|
109
107
|
font-size: 12px;
|
|
110
108
|
}
|
|
109
|
+
|
|
111
110
|
.breadcrumbs .v-btn.link {
|
|
112
111
|
display: inline-table;
|
|
113
112
|
justify-content: left;
|
|
@@ -118,6 +117,7 @@ button {
|
|
|
118
117
|
.v-banner__wrapper.v-btn.v-size--default {
|
|
119
118
|
font-size: 0.875rem;
|
|
120
119
|
}
|
|
120
|
+
|
|
121
121
|
.v-banner__wrapper.v-btn:not(.v-btn--round).v-size--default {
|
|
122
122
|
min-width: 64px;
|
|
123
123
|
padding: 0 16px;
|