glib-web 1.0.0 → 2.1.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/LICENSE +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/forms/submit.js +3 -1
- package/actions/windows/openWeb.js +0 -0
- package/components/_message.vue +0 -0
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_patternText.vue +1 -0
- 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/datetime.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/richText.vue +17 -1
- package/components/fields/select.vue +0 -0
- package/components/fields/timeZone.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/map.vue +24 -7
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +4 -1
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/p.vue +0 -0
- package/components/panels/form.vue +9 -5
- package/components/panels/timeline.vue +37 -54
- package/keys.js +0 -0
- package/nav/drawerButton.vue +0 -0
- package/package.json +2 -1
- package/settings.json.example +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/form.js +2 -2
- package/utils/public.js +0 -0
- package/utils/settings.js +0 -0
- package/utils/storage.js +0 -0
- package/utils/url.js +0 -0
package/LICENSE
CHANGED
|
File without changes
|
package/actions/auth/restart.js
CHANGED
|
File without changes
|
package/actions/dialogs/oauth.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/forms/submit.js
CHANGED
|
File without changes
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/datetime.vue
CHANGED
|
File without changes
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-model="rawValue"
|
|
6
6
|
:editor-toolbar="customToolbar"
|
|
7
7
|
use-custom-image-handler
|
|
8
|
-
@text-change="
|
|
8
|
+
@text-change="onChange"
|
|
9
9
|
@image-added="uploadImage"
|
|
10
10
|
/>
|
|
11
11
|
<input type="hidden" :name="spec.name" :value="produceValue" />
|
|
@@ -127,6 +127,22 @@ export default {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
+
onChange() {
|
|
131
|
+
this.separateOutImages();
|
|
132
|
+
|
|
133
|
+
Utils.type.ifObject(this.spec.onChange, onChange => {
|
|
134
|
+
this.$nextTick(() => {
|
|
135
|
+
const params = {
|
|
136
|
+
[this.spec.paramNameForFormData || "formData"]: {
|
|
137
|
+
[this.fieldName]: this.fieldModel
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const data = Object.assign({}, onChange, params);
|
|
142
|
+
GLib.action.execute(data, this);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
},
|
|
130
146
|
separateOutImages: function() {
|
|
131
147
|
const vm = this;
|
|
132
148
|
var index = 0;
|
|
File without changes
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
package/components/map.vue
CHANGED
|
@@ -39,26 +39,35 @@
|
|
|
39
39
|
:clickable="true"
|
|
40
40
|
:title="String(marker.clusterSize || 1)"
|
|
41
41
|
@click="onMarkerClick(marker, index)"
|
|
42
|
-
|
|
42
|
+
>
|
|
43
|
+
</gmap-marker>
|
|
43
44
|
</gmap-cluster>
|
|
44
45
|
<template v-else>
|
|
45
|
-
<gmap-marker
|
|
46
|
+
<gmap-custom-marker
|
|
46
47
|
v-for="(marker, index) in markers"
|
|
47
48
|
:key="index"
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
:marker="{ lat: marker.latitude, lng: marker.longitude }"
|
|
50
|
+
@click.native="onMarkerClick(marker, index)"
|
|
51
|
+
>
|
|
52
|
+
<img v-if="marker.imageUrl" :src="marker.imageUrl" class="marker" />
|
|
53
|
+
<common-icon
|
|
54
|
+
v-else
|
|
55
|
+
class="marker"
|
|
56
|
+
:spec="{ material: { name: 'place', size: 40 }, color: '#c92b2a' }"
|
|
57
|
+
/>
|
|
58
|
+
</gmap-custom-marker>
|
|
52
59
|
</template>
|
|
53
60
|
</gmap-map>
|
|
54
61
|
</template>
|
|
55
62
|
|
|
56
63
|
<script>
|
|
57
64
|
import GmapCluster from "vue2-google-maps/dist/components/cluster";
|
|
65
|
+
import GmapCustomMarker from "vue2-gmap-custom-marker";
|
|
58
66
|
|
|
59
67
|
export default {
|
|
60
68
|
components: {
|
|
61
|
-
"gmap-cluster": GmapCluster
|
|
69
|
+
"gmap-cluster": GmapCluster,
|
|
70
|
+
"gmap-custom-marker": GmapCustomMarker
|
|
62
71
|
},
|
|
63
72
|
props: {
|
|
64
73
|
spec: { type: Object, required: true }
|
|
@@ -204,3 +213,11 @@ export default {
|
|
|
204
213
|
// }
|
|
205
214
|
};
|
|
206
215
|
</script>
|
|
216
|
+
|
|
217
|
+
<style lang="scss" scoped>
|
|
218
|
+
.marker {
|
|
219
|
+
width: 40px;
|
|
220
|
+
height: 40px;
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
}
|
|
223
|
+
</style>
|
|
File without changes
|
|
File without changes
|
|
@@ -202,7 +202,10 @@ export default {
|
|
|
202
202
|
// Has to be executed before $ready(). This executes regardless of whether a form is found because fields
|
|
203
203
|
// may be used without a form.
|
|
204
204
|
this.fieldName = this.spec.name;
|
|
205
|
-
|
|
205
|
+
// Don't initialize fieldModel unnecessarily because this will trigger validations on page load
|
|
206
|
+
if (this.spec.value) {
|
|
207
|
+
this.fieldModel = this._sanitizeValue(this.spec.value);
|
|
208
|
+
}
|
|
206
209
|
}
|
|
207
210
|
},
|
|
208
211
|
$classes(spec) {
|
|
File without changes
|
|
File without changes
|
package/components/p.vue
CHANGED
|
File without changes
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
this.$onEvent("forms/directSubmit", e => {
|
|
67
|
-
this.directSubmit();
|
|
67
|
+
this.directSubmit(e.data.url);
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
70
|
$ready() {
|
|
@@ -117,10 +117,14 @@ export default {
|
|
|
117
117
|
);
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
|
-
directSubmit() {
|
|
121
|
-
|
|
122
|
-
GLib.form.submitData(this.formElement, this);
|
|
123
|
-
}
|
|
120
|
+
directSubmit(overrideUrl = null) {
|
|
121
|
+
if (overrideUrl) {
|
|
122
|
+
GLib.form.submitData(this.formElement, this, overrideUrl);
|
|
123
|
+
} else {
|
|
124
|
+
this.validate(() => {
|
|
125
|
+
GLib.form.submitData(this.formElement, this);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
124
128
|
},
|
|
125
129
|
validate(onPassed) {
|
|
126
130
|
if (this.$refs.form.validate()) {
|
|
@@ -1,42 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container :class="$classes()">
|
|
3
|
-
<v-timeline v-if="
|
|
3
|
+
<v-timeline v-if="events" dense align-top>
|
|
4
4
|
<v-timeline-item
|
|
5
|
-
v-for="(item,
|
|
6
|
-
:key="
|
|
5
|
+
v-for="(item, index) in events"
|
|
6
|
+
:key="index"
|
|
7
7
|
color="white"
|
|
8
8
|
fill-dot
|
|
9
9
|
:small="$classes().includes('small')"
|
|
10
10
|
:large="$classes().includes('large')"
|
|
11
|
-
|
|
11
|
+
class="my-6"
|
|
12
12
|
:hide-dot="item.hide_dot"
|
|
13
13
|
>
|
|
14
14
|
<template v-slot:icon>
|
|
15
|
-
<div
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<div v-
|
|
20
|
-
|
|
15
|
+
<div :class="$classes().includes('outlined') ? 'outlined-dots' : ''">
|
|
16
|
+
<div v-if="item.label" class="number-circle">
|
|
17
|
+
{{ item.label }}
|
|
18
|
+
</div>
|
|
19
|
+
<div v-else class="icon">
|
|
20
|
+
<common-icon
|
|
21
|
+
:spec="{
|
|
22
|
+
material: { name: item.icon, size: iconSize() },
|
|
23
|
+
color: item.color
|
|
24
|
+
}"
|
|
25
|
+
/>
|
|
21
26
|
</div>
|
|
22
|
-
<!-- TODO: Use common-icon -->
|
|
23
|
-
<v-icon v-else size="24" :color="dotColor(item)">
|
|
24
|
-
{{ dotIcon(item) }}
|
|
25
|
-
</v-icon>
|
|
26
27
|
</div>
|
|
27
28
|
</template>
|
|
28
|
-
|
|
29
|
-
<div :class="item.subtitle ? 'mt-5' : 'mt-2'" class="content">
|
|
30
|
-
<div
|
|
31
|
-
:class="item.active ? 'font-weight-bold' : 'font-weight-regular'"
|
|
32
|
-
>
|
|
33
|
-
{{ item.label }}
|
|
34
|
-
</div>
|
|
35
|
-
<div class="font-weight-regular">
|
|
36
|
-
{{ item.subtitle }}
|
|
37
|
-
</div>
|
|
38
|
-
<panels-responsive v-if="item.active" :spec="spec" />
|
|
39
|
-
</div>
|
|
29
|
+
<panels-responsive :spec="{ childViews: [childViews[index]] }" />
|
|
40
30
|
</v-timeline-item>
|
|
41
31
|
</v-timeline>
|
|
42
32
|
</v-container>
|
|
@@ -49,32 +39,17 @@ export default {
|
|
|
49
39
|
},
|
|
50
40
|
data() {
|
|
51
41
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
completedIcon: this.spec.completedIcon || "radio_button_unchecked",
|
|
55
|
-
completedColor: this.spec.completedColor || "blue",
|
|
56
|
-
uncompletedColor: this.spec.uncompletedColor || "grey"
|
|
42
|
+
events: null,
|
|
43
|
+
childViews: null
|
|
57
44
|
};
|
|
58
45
|
},
|
|
59
46
|
methods: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (!this.$classes().includes("small")) {
|
|
64
|
-
classes += " my-6";
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return classes;
|
|
68
|
-
},
|
|
69
|
-
dotColor(item) {
|
|
70
|
-
return !item.completed && !item.active
|
|
71
|
-
? this.uncompletedColor
|
|
72
|
-
: this.completedColor;
|
|
47
|
+
$ready() {
|
|
48
|
+
this.events = this.spec.events;
|
|
49
|
+
this.childViews = this.spec.childViews;
|
|
73
50
|
},
|
|
74
|
-
|
|
75
|
-
return
|
|
76
|
-
? item.uncompletedIcon || this.uncompletedIcon
|
|
77
|
-
: item.completedIcon || this.completedIcon
|
|
51
|
+
iconSize() {
|
|
52
|
+
return this.$classes().includes("small") ? 16 : 24;
|
|
78
53
|
}
|
|
79
54
|
}
|
|
80
55
|
};
|
|
@@ -84,18 +59,12 @@ export default {
|
|
|
84
59
|
.v-timeline {
|
|
85
60
|
padding-top: 0px;
|
|
86
61
|
}
|
|
87
|
-
|
|
88
62
|
.v-timeline-item {
|
|
89
63
|
padding-bottom: 0px !important;
|
|
90
64
|
}
|
|
91
65
|
.container {
|
|
92
66
|
padding-top: 0px;
|
|
93
67
|
}
|
|
94
|
-
.small {
|
|
95
|
-
> .number-circle {
|
|
96
|
-
font-size: 14px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
68
|
.outlined-dots {
|
|
100
69
|
border-radius: 50%;
|
|
101
70
|
width: 100%;
|
|
@@ -111,4 +80,18 @@ export default {
|
|
|
111
80
|
box-shadow: none;
|
|
112
81
|
}
|
|
113
82
|
}
|
|
83
|
+
.icon {
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
vertical-align: middle;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Size variations
|
|
89
|
+
.number-circle {
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
}
|
|
92
|
+
.small {
|
|
93
|
+
.number-circle {
|
|
94
|
+
font-size: 14px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
114
97
|
</style>
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/drawerButton.vue
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glib-web",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"vue-youtube": "^1.4.0",
|
|
31
31
|
"vue2-editor": "^2.9.1",
|
|
32
32
|
"vue2-google-maps": "^0.10.6",
|
|
33
|
+
"vue2-gmap-custom-marker": "^6.1.1",
|
|
33
34
|
"vuedraggable": "^2.24.1",
|
|
34
35
|
"vuetify": "2.3.9"
|
|
35
36
|
},
|
package/settings.json.example
CHANGED
|
File without changes
|
package/styles/test.sass
CHANGED
|
File without changes
|
package/styles/test.scss
CHANGED
|
File without changes
|
|
File without changes
|
package/utils/dom.js
CHANGED
|
File without changes
|
package/utils/form.js
CHANGED
|
@@ -3,14 +3,14 @@ export default class {
|
|
|
3
3
|
// Button -> Button.onClick() -> Utils.http.execute() -- doesn't save autofill values
|
|
4
4
|
// Button -> Button.onClick() -> form.submit() -- doesn't execute Form.onSubmit(), so cannot call Utils.http.execute() there
|
|
5
5
|
// Submit -> Form.onSubmit() -> Utils.http.execute() -- save autofill values and auto-submit when ENTER is pressed
|
|
6
|
-
static submitData(form, component) {
|
|
6
|
+
static submitData(form, component, overrideUrl = null) {
|
|
7
7
|
// Analogous to Rails' form_with's `local: true`
|
|
8
8
|
if (form.dataset.local) {
|
|
9
9
|
// Prevent onUnload dirty prompt.
|
|
10
10
|
Utils.http.clearDirtyState();
|
|
11
11
|
form.submit();
|
|
12
12
|
} else {
|
|
13
|
-
const url = form.getAttribute("action");
|
|
13
|
+
const url = overrideUrl ? overrideUrl : form.getAttribute("action");
|
|
14
14
|
const formData = new FormData(form);
|
|
15
15
|
const method = form.getAttribute("method");
|
|
16
16
|
if (method.toUpperCase() === "GET") {
|
package/utils/public.js
CHANGED
|
File without changes
|
package/utils/settings.js
CHANGED
|
File without changes
|
package/utils/storage.js
CHANGED
|
File without changes
|
package/utils/url.js
CHANGED
|
File without changes
|