glib-web 0.10.8 → 0.11.1
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/.eslintrc.js +0 -0
- package/actions/dialogs/close.js +0 -0
- package/components/_responsive.vue +10 -2
- package/components/button.vue +8 -5
- package/components/component.vue +2 -0
- package/components/fields/radio.vue +35 -6
- package/components/fields/radioGroup.vue +1 -0
- package/components/fields/stripeToken.vue +0 -0
- package/components/fields/submit.vue +0 -0
- package/components/h5.vue +0 -0
- package/components/h6.vue +0 -0
- package/components/mixins/events.js +1 -1
- package/components/panels/horizontal.vue +11 -2
- package/components/panels/timeline.vue +114 -0
- package/components/panels/vertical.vue +11 -2
- package/package.json +1 -1
- package/utils/format.js +0 -0
package/.eslintrc.js
CHANGED
|
File without changes
|
package/actions/dialogs/close.js
CHANGED
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="componentName"
|
|
3
4
|
:id="spec.id"
|
|
4
5
|
:class="cssClasses"
|
|
5
6
|
:style="$styles()"
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
</div>
|
|
24
25
|
</template>
|
|
25
26
|
</v-row>
|
|
26
|
-
</
|
|
27
|
+
</component>
|
|
27
28
|
</template>
|
|
28
29
|
|
|
29
30
|
<script>
|
|
@@ -49,6 +50,9 @@ export default {
|
|
|
49
50
|
// This panel will be nameless when used in predefined layout (e.g. page.body, list.header, etc.)
|
|
50
51
|
this.spec.view = this.spec.view || "panels/responsive";
|
|
51
52
|
return this.$classes();
|
|
53
|
+
},
|
|
54
|
+
componentName() {
|
|
55
|
+
return this.$href() ? "a" : "div";
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
methods: {
|
|
@@ -92,4 +96,8 @@ export default {
|
|
|
92
96
|
.full-height {
|
|
93
97
|
height: 100%;
|
|
94
98
|
}
|
|
99
|
+
.v-application a {
|
|
100
|
+
color: inherit;
|
|
101
|
+
text-decoration: inherit;
|
|
102
|
+
}
|
|
95
103
|
</style>
|
package/components/button.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-tooltip
|
|
4
|
-
|
|
4
|
+
:disabled="tooltip.disabled"
|
|
5
5
|
:top="tooltipPositionMatches('top')"
|
|
6
6
|
:right="tooltipPositionMatches('right')"
|
|
7
7
|
:bottom="tooltipPositionMatches('bottom')"
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
<common-button :spec="spec" :disabled="$isBusy" />
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
|
-
<span> {{
|
|
15
|
+
<span> {{ tooltip.text }} </span>
|
|
16
16
|
</v-tooltip>
|
|
17
|
-
<div v-else>
|
|
18
|
-
<common-button :spec="spec" :disabled="$isBusy" />
|
|
19
|
-
</div>
|
|
20
17
|
</div>
|
|
21
18
|
</template>
|
|
22
19
|
|
|
@@ -29,9 +26,15 @@ export default {
|
|
|
29
26
|
props: {
|
|
30
27
|
spec: { type: Object, required: true }
|
|
31
28
|
},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
tooltip: {}
|
|
32
|
+
};
|
|
33
|
+
},
|
|
32
34
|
methods: {
|
|
33
35
|
$ready() {
|
|
34
36
|
this.registerTour();
|
|
37
|
+
this.tooltip = this.spec.tooltip || { disabled: true };
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
};
|
package/components/component.vue
CHANGED
|
@@ -105,6 +105,7 @@ import ResponsivePanel from "./panels/responsive";
|
|
|
105
105
|
import UlPanel from "./panels/ul";
|
|
106
106
|
import WebPanel from "./panels/web";
|
|
107
107
|
import GridPanel from "./panels/grid";
|
|
108
|
+
import TimelinePanel from "./panels/timeline";
|
|
108
109
|
|
|
109
110
|
import MultimediaVideo from "./multimedia/video";
|
|
110
111
|
|
|
@@ -191,6 +192,7 @@ export default {
|
|
|
191
192
|
"panels-ul": UlPanel,
|
|
192
193
|
"panels-web": WebPanel,
|
|
193
194
|
"panels-grid": GridPanel,
|
|
195
|
+
"panels-timeline": TimelinePanel,
|
|
194
196
|
|
|
195
197
|
"multimedia-video": MultimediaVideo,
|
|
196
198
|
|
|
@@ -1,16 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-
|
|
3
|
-
:
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
|
|
2
|
+
<v-tooltip
|
|
3
|
+
:disabled="tooltip.disabled"
|
|
4
|
+
:top="tooltipPositionMatches('top')"
|
|
5
|
+
:right="tooltipPositionMatches('right')"
|
|
6
|
+
:bottom="tooltipPositionMatches('bottom')"
|
|
7
|
+
:left="tooltipPositionMatches('left')"
|
|
8
|
+
>
|
|
9
|
+
<template v-slot:activator="{ on }">
|
|
10
|
+
<v-radio
|
|
11
|
+
:label="spec.label"
|
|
12
|
+
:value="spec.value.presence() || vuetifyEmptyString"
|
|
13
|
+
:class="$classes()"
|
|
14
|
+
:disabled="spec.readOnly"
|
|
15
|
+
:on-icon="spec.onIcon"
|
|
16
|
+
:off-icon="spec.offIcon"
|
|
17
|
+
v-on="on"
|
|
18
|
+
@click="$onClick()"
|
|
19
|
+
>
|
|
20
|
+
</v-radio>
|
|
21
|
+
</template>
|
|
22
|
+
<span>{{ tooltip.text }}</span>
|
|
23
|
+
</v-tooltip>
|
|
8
24
|
</template>
|
|
9
25
|
|
|
10
26
|
<script>
|
|
27
|
+
import TooltipMixins from "../mixins/tooltip";
|
|
28
|
+
|
|
11
29
|
export default {
|
|
30
|
+
mixins: [TooltipMixins],
|
|
12
31
|
props: {
|
|
13
32
|
spec: { type: Object, required: true }
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
tooltip: {}
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
$ready() {
|
|
41
|
+
this.tooltip = this.spec.tooltip || { disabled: true };
|
|
42
|
+
}
|
|
14
43
|
}
|
|
15
44
|
};
|
|
16
45
|
</script>
|
|
File without changes
|
|
File without changes
|
package/components/h5.vue
CHANGED
|
File without changes
|
package/components/h6.vue
CHANGED
|
File without changes
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="componentName"
|
|
4
|
+
:class="cssClasses"
|
|
5
|
+
:style="cssStyles"
|
|
6
|
+
:href="$href()"
|
|
7
|
+
@click="$onClick()"
|
|
8
|
+
>
|
|
3
9
|
<template v-for="(item, index) in spec.childViews">
|
|
4
10
|
<ui-component :key="index" :spec="item" />
|
|
5
11
|
</template>
|
|
6
|
-
</
|
|
12
|
+
</component>
|
|
7
13
|
</template>
|
|
8
14
|
|
|
9
15
|
<script>
|
|
@@ -46,6 +52,9 @@ export default {
|
|
|
46
52
|
styles["align-items"] = "flex-start";
|
|
47
53
|
}
|
|
48
54
|
return styles;
|
|
55
|
+
},
|
|
56
|
+
componentName() {
|
|
57
|
+
return this.$href() ? "a" : "div";
|
|
49
58
|
}
|
|
50
59
|
},
|
|
51
60
|
methods: {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-container :class="$classes()">
|
|
3
|
+
<v-timeline v-if="items" dense align-top>
|
|
4
|
+
<v-timeline-item
|
|
5
|
+
v-for="(item, item_key) in items"
|
|
6
|
+
:key="item_key"
|
|
7
|
+
color="white"
|
|
8
|
+
fill-dot
|
|
9
|
+
:small="$classes().includes('small')"
|
|
10
|
+
:large="$classes().includes('large')"
|
|
11
|
+
:class="timelineItemClasses(item)"
|
|
12
|
+
:hide-dot="item.hide_dot"
|
|
13
|
+
>
|
|
14
|
+
<template v-slot:icon>
|
|
15
|
+
<div
|
|
16
|
+
:class="$classes().includes('outlined') ? 'outlined-dots' : ''"
|
|
17
|
+
:style="`border-color: ${dotColor(item)};`"
|
|
18
|
+
>
|
|
19
|
+
<div v-if="item.left_label" class="number-circle">
|
|
20
|
+
{{ item.left_label }}
|
|
21
|
+
</div>
|
|
22
|
+
<!-- TODO: Use common-icon -->
|
|
23
|
+
<v-icon v-else size="24" :color="dotColor(item)">
|
|
24
|
+
{{ dotIcon(item) }}
|
|
25
|
+
</v-icon>
|
|
26
|
+
</div>
|
|
27
|
+
</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>
|
|
40
|
+
</v-timeline-item>
|
|
41
|
+
</v-timeline>
|
|
42
|
+
</v-container>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
export default {
|
|
47
|
+
props: {
|
|
48
|
+
spec: { type: Object, required: true }
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
items: this.spec.items,
|
|
53
|
+
uncompletedIcon: this.spec.uncompletedIcon || "check_circle",
|
|
54
|
+
completedIcon: this.spec.completedIcon || "radio_button_unchecked",
|
|
55
|
+
completedColor: this.spec.completedColor || "blue",
|
|
56
|
+
uncompletedColor: this.spec.uncompletedColor || "grey"
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
timelineItemClasses(item) {
|
|
61
|
+
let classes = !item.completed && !item.active ? "uncompleted" : "";
|
|
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;
|
|
73
|
+
},
|
|
74
|
+
dotIcon(item) {
|
|
75
|
+
return item.active || item.completed
|
|
76
|
+
? item.uncompletedIcon || this.uncompletedIcon
|
|
77
|
+
: item.completedIcon || this.completedIcon
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style lang="scss" scoped>
|
|
84
|
+
.v-timeline {
|
|
85
|
+
padding-top: 0px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.v-timeline-item {
|
|
89
|
+
padding-bottom: 0px !important;
|
|
90
|
+
}
|
|
91
|
+
.container {
|
|
92
|
+
padding-top: 0px;
|
|
93
|
+
}
|
|
94
|
+
.small {
|
|
95
|
+
> .number-circle {
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
.outlined-dots {
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
border: 1px solid;
|
|
104
|
+
margin: auto;
|
|
105
|
+
text-align: center;
|
|
106
|
+
font-weight: bold;
|
|
107
|
+
font-size: 22px;
|
|
108
|
+
}
|
|
109
|
+
.outlined .v-timeline-item {
|
|
110
|
+
::v-deep .v-timeline-item__dot {
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="componentName"
|
|
4
|
+
:class="cssClasses"
|
|
5
|
+
:style="cssStyles"
|
|
6
|
+
:href="$href()"
|
|
7
|
+
@click="$onClick()"
|
|
8
|
+
>
|
|
3
9
|
<template v-for="(item, index) in spec.childViews">
|
|
4
10
|
<!-- Use view name for key to avoid component reuse issue -->
|
|
5
11
|
<ui-component :key="`${index}_${item.view}`" :spec="item" />
|
|
6
12
|
</template>
|
|
7
|
-
</
|
|
13
|
+
</component>
|
|
8
14
|
</template>
|
|
9
15
|
|
|
10
16
|
<script>
|
|
@@ -42,6 +48,9 @@ export default {
|
|
|
42
48
|
styles["align-items"] = "flex-start";
|
|
43
49
|
}
|
|
44
50
|
return styles;
|
|
51
|
+
},
|
|
52
|
+
componentName() {
|
|
53
|
+
return this.$href() ? "a" : "div";
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
56
|
};
|
package/package.json
CHANGED
package/utils/format.js
CHANGED
|
File without changes
|