glib-web 0.7.1 → 0.8.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/actions/auth/restart.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/options.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/windows/openWeb.js +0 -0
- package/components/_message.vue +0 -0
- package/components/component.vue +2 -2
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_select.vue +0 -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/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/image.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/panels/column.vue +0 -0
- package/components/panels/custom.vue +0 -0
- package/components/panels/horizontal.vue +0 -0
- package/components/panels/split.vue +0 -0
- package/components/panels/ul.vue +0 -0
- package/components/{socialSharing.vue → shareButton.vue} +20 -1
- package/index.js +1 -1
- package/keys.js +0 -0
- package/nav/dialog.vue +1 -1
- package/nav/drawer.vue +83 -2
- 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/featured.vue +0 -0
- package/templates/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/http.js +1 -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
|
package/actions/sheets/select.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/component.vue
CHANGED
|
@@ -113,7 +113,7 @@ import SelectBanner from "./banners/select";
|
|
|
113
113
|
import LineChart from "./charts/line";
|
|
114
114
|
import ColumnChart from "./charts/column";
|
|
115
115
|
|
|
116
|
-
import
|
|
116
|
+
import ShareButton from "./shareButton";
|
|
117
117
|
|
|
118
118
|
export default {
|
|
119
119
|
components: {
|
|
@@ -145,7 +145,7 @@ export default {
|
|
|
145
145
|
"views-map": Map,
|
|
146
146
|
"views-tabBar": TabBar,
|
|
147
147
|
"views-calendar": Calendar,
|
|
148
|
-
"views-
|
|
148
|
+
"views-shareButton": ShareButton,
|
|
149
149
|
|
|
150
150
|
"fields-hidden": HiddenField,
|
|
151
151
|
"fields-text": TextField,
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
package/components/image.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/panels/ul.vue
CHANGED
|
File without changes
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:url="spec.url"
|
|
6
6
|
:title="spec.title"
|
|
7
7
|
:description="spec.description"
|
|
8
|
-
:quote="spec.
|
|
8
|
+
:quote="spec.facebookQuote"
|
|
9
9
|
:hashtags="spec.hashtags"
|
|
10
10
|
:twitter-user="spec.twitterUser"
|
|
11
11
|
>
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
+
import Action from "../action";
|
|
20
|
+
|
|
19
21
|
export default {
|
|
20
22
|
props: {
|
|
21
23
|
spec: { type: Object, required: true }
|
|
@@ -23,6 +25,10 @@ export default {
|
|
|
23
25
|
data() {
|
|
24
26
|
return {
|
|
25
27
|
config: {
|
|
28
|
+
copy: {
|
|
29
|
+
icon: "far fah fa-lg fa-copy",
|
|
30
|
+
color: "#183153"
|
|
31
|
+
},
|
|
26
32
|
email: {
|
|
27
33
|
icon: "far fah fa-lg fa-envelope",
|
|
28
34
|
color: "#333333"
|
|
@@ -85,6 +91,19 @@ export default {
|
|
|
85
91
|
}
|
|
86
92
|
}
|
|
87
93
|
};
|
|
94
|
+
},
|
|
95
|
+
mounted() {
|
|
96
|
+
if (this.spec.onClick) {
|
|
97
|
+
const parentElement = this.$el.parentElement;
|
|
98
|
+
// remove default event listener
|
|
99
|
+
this.$el.replaceWith(this.$el.cloneNode(true));
|
|
100
|
+
// manually attach event listener because @click not working
|
|
101
|
+
parentElement
|
|
102
|
+
.querySelector(`a.${this.$el.classList[0]}`)
|
|
103
|
+
.addEventListener("click", () => {
|
|
104
|
+
Action.execute(this.spec.onClick, this);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
88
107
|
}
|
|
89
108
|
};
|
|
90
109
|
</script>
|
package/index.js
CHANGED
package/keys.js
CHANGED
|
File without changes
|
package/nav/dialog.vue
CHANGED
package/nav/drawer.vue
CHANGED
|
@@ -50,6 +50,75 @@
|
|
|
50
50
|
import NavDrawerButton from "./drawerButton";
|
|
51
51
|
import NavDrawerLabel from "./drawerLabel";
|
|
52
52
|
|
|
53
|
+
const activeClass = (element, action) => {
|
|
54
|
+
let indicator = element.querySelector(".indicator");
|
|
55
|
+
if (indicator) {
|
|
56
|
+
indicator.classList[action]("active");
|
|
57
|
+
}
|
|
58
|
+
let icon = element.querySelector(".v-list-item__action");
|
|
59
|
+
if (icon) {
|
|
60
|
+
icon.classList[action]("active");
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const comparePathname = (hrefPathname, locationPathname) => {
|
|
65
|
+
let value = 0;
|
|
66
|
+
const loc = locationPathname.split("/").filter(v => v);
|
|
67
|
+
const hr = hrefPathname.split("/").filter(v => v);
|
|
68
|
+
|
|
69
|
+
if (loc.length == hr.length) value = value + 1;
|
|
70
|
+
|
|
71
|
+
loc.forEach((route, index) => {
|
|
72
|
+
if (!hr[index]) {
|
|
73
|
+
value = value + 0;
|
|
74
|
+
} else if (hr[index] == route) {
|
|
75
|
+
value = value + 1;
|
|
76
|
+
} else if (hr[index] != route) {
|
|
77
|
+
value = value - 2;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return value;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const navigationMap = (element, locationPathname) => {
|
|
85
|
+
return Array.from(element.querySelectorAll(".nav-item")).reduce(
|
|
86
|
+
(prev, curr) => {
|
|
87
|
+
let a = curr.querySelector("a");
|
|
88
|
+
if (a) {
|
|
89
|
+
let obj = {};
|
|
90
|
+
obj[new URL(a.href).pathname] = {
|
|
91
|
+
element: curr,
|
|
92
|
+
matchValue: comparePathname(
|
|
93
|
+
new URL(a.href).pathname,
|
|
94
|
+
locationPathname
|
|
95
|
+
)
|
|
96
|
+
};
|
|
97
|
+
return Object.assign(prev, obj);
|
|
98
|
+
} else {
|
|
99
|
+
return prev;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const getActiveNav = navigationMap => {
|
|
107
|
+
let currentRoute = "";
|
|
108
|
+
let maxMatchValue = null;
|
|
109
|
+
|
|
110
|
+
for (let route in navigationMap) {
|
|
111
|
+
if (!maxMatchValue) {
|
|
112
|
+
maxMatchValue = navigationMap[route].matchValue;
|
|
113
|
+
currentRoute = route;
|
|
114
|
+
} else if (maxMatchValue < navigationMap[route].matchValue) {
|
|
115
|
+
maxMatchValue = navigationMap[route].matchValue;
|
|
116
|
+
currentRoute = route;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return navigationMap[currentRoute];
|
|
120
|
+
};
|
|
121
|
+
|
|
53
122
|
export default {
|
|
54
123
|
components: {
|
|
55
124
|
"nav-drawerButton": NavDrawerButton,
|
|
@@ -98,6 +167,8 @@ export default {
|
|
|
98
167
|
},
|
|
99
168
|
methods: {
|
|
100
169
|
$ready() {
|
|
170
|
+
this.updateNavigationStyle(window.location);
|
|
171
|
+
|
|
101
172
|
// this.$el.addEventListener('drawers/clickButton', () => { this.updateState(false) }, false)
|
|
102
173
|
this.$el.addEventListener("drawers/clickButton", () => {
|
|
103
174
|
if (!this.permanent) {
|
|
@@ -113,6 +184,15 @@ export default {
|
|
|
113
184
|
this.cssClasses.includes("mini") ||
|
|
114
185
|
(this.cssClasses.includes("mini-lg-and-above") && this.lgAndAbove)
|
|
115
186
|
);
|
|
187
|
+
},
|
|
188
|
+
updateNavigationStyle(urlObject) {
|
|
189
|
+
const navMap = navigationMap(this.$el, urlObject.pathname);
|
|
190
|
+
// remove all active class
|
|
191
|
+
for (let route in navMap) {
|
|
192
|
+
activeClass(navMap[route].element, "remove");
|
|
193
|
+
}
|
|
194
|
+
// add active class to nav
|
|
195
|
+
activeClass(getActiveNav(navMap).element, "add");
|
|
116
196
|
}
|
|
117
197
|
}
|
|
118
198
|
};
|
|
@@ -122,12 +202,13 @@ export default {
|
|
|
122
202
|
.nav-item {
|
|
123
203
|
position: relative;
|
|
124
204
|
}
|
|
125
|
-
.nav-item:hover .indicator
|
|
205
|
+
.nav-item:hover .indicator,
|
|
206
|
+
.nav-item .indicator.active {
|
|
126
207
|
display: flex;
|
|
127
208
|
position: absolute;
|
|
128
209
|
width: 3px;
|
|
129
210
|
height: 65%;
|
|
130
|
-
margin:
|
|
211
|
+
margin: 8px 0;
|
|
131
212
|
justify-content: center;
|
|
132
213
|
align-items: center;
|
|
133
214
|
background-color: white;
|
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
|
package/templates/featured.vue
CHANGED
|
File without changes
|
|
File without changes
|
package/utils/dom.js
CHANGED
|
File without changes
|
package/utils/http.js
CHANGED
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
|