glib-web 0.16.0 → 0.17.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/windows/openWeb.js +0 -0
- package/components/_message.vue +0 -0
- package/components/charts/pie.vue +34 -0
- package/components/component.vue +5 -1
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/check.vue +1 -0
- package/components/fields/checkGroup.vue +8 -1
- 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 +44 -10
- package/components/fields/select.vue +0 -0
- package/components/fields/text.vue +6 -2
- package/components/fields/timeZone.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/p.vue +0 -0
- package/components/progressCircle.vue +22 -0
- package/keys.js +0 -0
- package/nav/drawerButton.vue +0 -0
- package/package.json +1 -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/eventFiltering.js +11 -0
- 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
|
|
File without changes
|
package/components/_message.vue
CHANGED
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<pie-chart
|
|
3
|
+
:style="genericStyles()"
|
|
4
|
+
:class="$classes()"
|
|
5
|
+
:data="series"
|
|
6
|
+
:library="options"
|
|
7
|
+
></pie-chart>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
mixins: [],
|
|
13
|
+
props: {
|
|
14
|
+
spec: { type: Object, required: true }
|
|
15
|
+
},
|
|
16
|
+
data: function() {
|
|
17
|
+
return {
|
|
18
|
+
series: []
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
$ready() {
|
|
23
|
+
this.series = this.spec.dataSeries.reduce((prev, curr) => {
|
|
24
|
+
let obj = {};
|
|
25
|
+
obj[curr.title] = curr.value;
|
|
26
|
+
|
|
27
|
+
return Object.assign(prev, obj);
|
|
28
|
+
}, {});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped></style>
|
package/components/component.vue
CHANGED
|
@@ -46,6 +46,7 @@ import Chip from "./chip";
|
|
|
46
46
|
import Datetime from "./datetime";
|
|
47
47
|
|
|
48
48
|
import ProgressBar from "./progressbar";
|
|
49
|
+
import ProgressCircle from "./progressCircle.vue";
|
|
49
50
|
|
|
50
51
|
import Image from "./image";
|
|
51
52
|
import Avatar from "./avatar";
|
|
@@ -114,6 +115,7 @@ import SelectBanner from "./banners/select";
|
|
|
114
115
|
|
|
115
116
|
import LineChart from "./charts/line";
|
|
116
117
|
import ColumnChart from "./charts/column";
|
|
118
|
+
import PieChart from "./charts/pie";
|
|
117
119
|
|
|
118
120
|
import ShareButton from "./shareButton";
|
|
119
121
|
|
|
@@ -132,6 +134,7 @@ export default {
|
|
|
132
134
|
"views-chip": Chip,
|
|
133
135
|
"views-datetime": Datetime,
|
|
134
136
|
"views-progressBar": ProgressBar,
|
|
137
|
+
"views-progressCircle": ProgressCircle,
|
|
135
138
|
|
|
136
139
|
"views-image": Image,
|
|
137
140
|
"views-avatar": Avatar,
|
|
@@ -200,7 +203,8 @@ export default {
|
|
|
200
203
|
"banners-select": SelectBanner,
|
|
201
204
|
|
|
202
205
|
"charts-line": LineChart,
|
|
203
|
-
"charts-column": ColumnChart
|
|
206
|
+
"charts-column": ColumnChart,
|
|
207
|
+
"charts-pie": PieChart
|
|
204
208
|
},
|
|
205
209
|
props: {
|
|
206
210
|
spec: { type: Object, required: true }
|
package/components/datetime.vue
CHANGED
|
File without changes
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- <fields-hidden v-if="!anyChecked" :spec="uncheckSpec" /> -->
|
|
9
9
|
|
|
10
10
|
<div v-for="(item, index) in spec.childViews" :key="index">
|
|
11
|
-
<glib-component :spec="item" />
|
|
11
|
+
<glib-component :spec="childSpec(item)" />
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<v-text-field
|
|
@@ -76,6 +76,13 @@ export default {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
+
},
|
|
80
|
+
childSpec(item) {
|
|
81
|
+
if (this.spec.readOnly) {
|
|
82
|
+
return Object.assign(item, { readOnly: this.spec.readOnly });
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return item;
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
<VueEditor
|
|
5
5
|
v-model="rawValue"
|
|
6
6
|
:editor-toolbar="customToolbar"
|
|
7
|
-
:use-custom-image-handler="true"
|
|
8
7
|
@text-change="separateOutImages"
|
|
9
8
|
@image-added="uploadImage"
|
|
10
9
|
/>
|
|
@@ -39,7 +38,7 @@ export default {
|
|
|
39
38
|
["bold", "italic", "strike"],
|
|
40
39
|
[{ header: 1 }, { header: 2 }],
|
|
41
40
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
42
|
-
["
|
|
41
|
+
["link"]
|
|
43
42
|
],
|
|
44
43
|
rawValue: "",
|
|
45
44
|
cleanValue: "",
|
|
@@ -49,6 +48,14 @@ export default {
|
|
|
49
48
|
imageUploader: {},
|
|
50
49
|
turndownService: new TurndownService({ headingStyle: "atx" })
|
|
51
50
|
}),
|
|
51
|
+
computed: {
|
|
52
|
+
showProgress: function() {
|
|
53
|
+
return this.progress.value >= 0;
|
|
54
|
+
},
|
|
55
|
+
markdownValue: function() {
|
|
56
|
+
return this.turndownService.turndown(this.rawValue);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
52
59
|
// mounted: function () {
|
|
53
60
|
// const vm = this
|
|
54
61
|
// this.rawValue = (this.spec.value || "").replace(/\{\{image([0-9]+)\}\}/g, function (_, index) {
|
|
@@ -62,13 +69,8 @@ export default {
|
|
|
62
69
|
// return "{{IMAGE_NOT_FOUND}}"
|
|
63
70
|
// })
|
|
64
71
|
// },
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return this.progress.value >= 0;
|
|
68
|
-
},
|
|
69
|
-
markdownValue: function() {
|
|
70
|
-
return this.turndownService.turndown(this.rawValue);
|
|
71
|
-
}
|
|
72
|
+
mounted() {
|
|
73
|
+
this.registerScrollEvent();
|
|
72
74
|
},
|
|
73
75
|
methods: {
|
|
74
76
|
$ready() {
|
|
@@ -162,12 +164,39 @@ export default {
|
|
|
162
164
|
};
|
|
163
165
|
reader.readAsDataURL(file);
|
|
164
166
|
vm.progress.value = -1;
|
|
167
|
+
},
|
|
168
|
+
updateToolbar: function(wrapper, toolbar, container) {
|
|
169
|
+
if (wrapper.scrollTop >= container.offsetTop) {
|
|
170
|
+
toolbar.classList.add("sticky");
|
|
171
|
+
toolbar.style.top = `${wrapper.offsetTop}px`;
|
|
172
|
+
toolbar.style.left = `${wrapper.offsetLeft}px`;
|
|
173
|
+
toolbar.style.width = `${wrapper.offsetWidth}px`;
|
|
174
|
+
} else {
|
|
175
|
+
toolbar.classList.remove("sticky");
|
|
176
|
+
toolbar.style.top = "auto";
|
|
177
|
+
toolbar.style.left = "auto";
|
|
178
|
+
toolbar.style.width = "auto";
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
registerScrollEvent: function() {
|
|
182
|
+
const wrapper = document.querySelector(".v-dialog") || window;
|
|
183
|
+
const toolbar = this.$el.querySelector(".ql-toolbar");
|
|
184
|
+
const container = this.$el.querySelector(".ql-container");
|
|
185
|
+
|
|
186
|
+
if (wrapper) {
|
|
187
|
+
wrapper.addEventListener("scroll", () =>
|
|
188
|
+
this.updateToolbar(wrapper, toolbar, container)
|
|
189
|
+
);
|
|
190
|
+
window.addEventListener("resize", () =>
|
|
191
|
+
this.updateToolbar(wrapper, toolbar, container)
|
|
192
|
+
);
|
|
193
|
+
}
|
|
165
194
|
}
|
|
166
195
|
}
|
|
167
196
|
};
|
|
168
197
|
</script>
|
|
169
198
|
|
|
170
|
-
<style
|
|
199
|
+
<style>
|
|
171
200
|
/*
|
|
172
201
|
@import "~vue2-editor/dist/vue2-editor.css";
|
|
173
202
|
@import '~quill/dist/quill.core.css';
|
|
@@ -177,4 +206,9 @@ export default {
|
|
|
177
206
|
height: 375px;
|
|
178
207
|
}
|
|
179
208
|
*/
|
|
209
|
+
.ql-toolbar.sticky {
|
|
210
|
+
position: fixed;
|
|
211
|
+
z-index: 99;
|
|
212
|
+
background-color: white;
|
|
213
|
+
}
|
|
180
214
|
</style>
|
|
File without changes
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
|
+
import eventFiltering from "../../utils/eventFiltering";
|
|
39
|
+
|
|
38
40
|
export default {
|
|
39
41
|
props: {
|
|
40
42
|
spec: { type: Object, required: true },
|
|
@@ -125,8 +127,10 @@ export default {
|
|
|
125
127
|
classes() {
|
|
126
128
|
return this.$classes().concat("g-text-field--hintless");
|
|
127
129
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
onChange: eventFiltering.debounce(function() {
|
|
131
|
+
this.executeActionWithParams();
|
|
132
|
+
}, 300),
|
|
133
|
+
executeActionWithParams() {
|
|
130
134
|
Utils.type.ifObject(this.spec.onChange, onChange => {
|
|
131
135
|
this.$nextTick(() => {
|
|
132
136
|
const params = {
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/p.vue
CHANGED
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-progress-circular
|
|
3
|
+
:class="$classes()"
|
|
4
|
+
:rotate="spec.rotate || 270"
|
|
5
|
+
:size="spec.size || 100"
|
|
6
|
+
:width="spec.width || 20"
|
|
7
|
+
:color="spec.color"
|
|
8
|
+
:value="spec.value"
|
|
9
|
+
>
|
|
10
|
+
<span class="grey--text text--lighten-1 text-h5">{{ spec.text }}</span>
|
|
11
|
+
</v-progress-circular>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
props: {
|
|
17
|
+
spec: { type: Object, required: true }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped></style>
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/drawerButton.vue
CHANGED
|
File without changes
|
package/package.json
CHANGED
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/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
|