glib-web 2.5.0 → 3.0.0-beta1
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/LICENSE +0 -0
- package/README.md +0 -0
- package/action.js +6 -1
- package/actions/analytics/logEvent.js +0 -0
- package/actions/auth/creditCard.js +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/auth/saveCsrfToken.js +0 -0
- package/actions/cables/push.js +0 -0
- package/actions/commands/copy.js +0 -0
- package/actions/commands/enqueue.js +17 -0
- package/actions/components/update.js +13 -14
- package/actions/dialogs/alert.js +0 -0
- package/actions/dialogs/close.js +0 -0
- package/actions/dialogs/notification.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/open.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/dialogs/reload.js +0 -0
- package/actions/dialogs/show.js +0 -0
- package/actions/http/delete.js +0 -0
- package/actions/http/patch.js +0 -0
- package/actions/http/post.js +0 -0
- package/actions/http/put.js +0 -0
- package/actions/panels/scrollTo.js +0 -0
- package/actions/panels/scrollToBottom.js +0 -0
- package/actions/runMultiple.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/timeouts/set.js +0 -0
- package/actions/tours/start.js +0 -0
- package/actions/windows/close.js +0 -0
- package/actions/windows/closeAll.js +0 -0
- package/actions/windows/closeWithReload.js +0 -0
- package/actions/windows/open.js +0 -0
- package/actions/windows/openWeb.js +0 -0
- package/actions/windows/print.js +0 -0
- package/actions/windows/refreshState.js +0 -0
- package/actions/windows/reload.js +0 -0
- package/actions/ws/push.js +0 -0
- package/app.vue +25 -26
- package/components/_button.vue +21 -28
- package/components/_chip.vue +14 -19
- package/components/_dropdownMenu.vue +10 -23
- package/components/_icon.vue +5 -5
- package/components/_message.vue +0 -0
- 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 +5 -5
- package/components/calendar.vue +0 -0
- package/components/component.vue +96 -101
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_patternText.vue +5 -19
- package/components/fields/_select.vue +7 -28
- package/components/fields/autocomplete.vue +5 -21
- package/components/fields/check.vue +19 -11
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/field.vue +9 -27
- package/components/fields/country/regions.js +0 -0
- package/components/fields/creditCard.vue +0 -0
- package/components/fields/date.vue +5 -5
- package/components/fields/datetime.vue +5 -5
- package/components/fields/dynamicSelect.vue +8 -29
- package/components/fields/file.vue +0 -0
- package/components/fields/googlePlace.vue +0 -0
- package/components/fields/hidden.vue +0 -0
- package/components/fields/location.vue +0 -0
- package/components/fields/newRichText.vue +66 -53
- package/components/fields/otpField.vue +6 -14
- package/components/fields/phone/countries.js +0 -0
- package/components/fields/phone/field.vue +60 -78
- package/components/fields/phone/sprite.css +0 -0
- package/components/fields/radio.vue +16 -23
- package/components/fields/rating.vue +9 -16
- package/components/fields/richText.vue +8 -28
- package/components/fields/select.vue +10 -7
- package/components/fields/stripe/stripeFields.vue +0 -0
- package/components/fields/stripe/stripeIndividualFields.vue +0 -0
- package/components/fields/stripeExternalAccount.vue +10 -24
- package/components/fields/stripeToken.vue +0 -0
- package/components/fields/submit.vue +0 -0
- package/components/fields/text.vue +24 -40
- package/components/fields/textarea.vue +13 -27
- package/components/fields/timeZone.vue +9 -6
- package/components/fields/timer.vue +3 -10
- package/components/h1.vue +0 -0
- package/components/h2.vue +0 -0
- package/components/h3.vue +0 -0
- package/components/h5.vue +0 -0
- package/components/h6.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/icon.vue +0 -0
- package/components/image.vue +13 -20
- package/components/label.vue +0 -0
- package/components/markdown.vue +15 -8
- package/components/mixins/chart/annotation.js +0 -0
- package/components/mixins/chart/tooltip.js +0 -0
- package/components/mixins/dataset.js +0 -0
- package/components/mixins/events.js +17 -6
- package/components/mixins/extension.js +0 -0
- package/components/mixins/list/autoload.js +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +18 -15
- package/components/mixins/table/autoload.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/mixins/text.js +0 -0
- package/components/mixins/ws/actionCable.js +0 -0
- package/components/mixins/ws/phoenixSocket.js +0 -0
- package/components/multimedia/video.vue +0 -0
- package/components/p.vue +0 -0
- package/components/panels/carousel.vue +0 -0
- package/components/panels/column.vue +5 -5
- package/components/panels/custom.vue +15 -15
- package/components/panels/flow.vue +19 -13
- package/components/panels/form.vue +17 -28
- package/components/panels/grid.vue +15 -9
- package/components/panels/horizontal.vue +149 -18
- package/components/panels/list.vue +63 -70
- package/components/panels/responsive.vue +13 -33
- package/components/panels/scroll.vue +0 -0
- package/components/panels/split.vue +2 -2
- package/components/panels/table.vue +27 -61
- package/components/panels/timeline.vue +20 -30
- package/components/panels/vertical.vue +9 -14
- package/components/panels/web.vue +0 -0
- package/components/progressbar.vue +0 -0
- package/components/spacer.vue +0 -0
- package/components/switch.vue +0 -0
- package/components/tabBar.vue +27 -19
- package/index.js +68 -72
- package/keys.js +0 -0
- package/nav/appbar.vue +4 -4
- package/nav/dialog.vue +24 -34
- package/nav/drawer.vue +39 -51
- package/nav/drawerButton.vue +5 -7
- package/nav/drawerLabel.vue +2 -3
- package/nav/sheet.vue +18 -24
- package/nav/snackbar.vue +16 -26
- package/package.json +10 -11
- package/plugins/driverCustomBehavior.js +1 -1
- package/plugins/updatableComponent.js +1 -7
- package/plugins/vuetify.js +27 -0
- package/settings.json.example +0 -0
- package/static/plugins/alignment/alignment.js +0 -0
- package/static/plugins/alignment/alignment.min.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
- package/static/plugins/blockcode/blockcode.js +0 -0
- package/static/plugins/blockcode/blockcode.min.js +0 -0
- package/static/plugins/clips/clips.js +0 -0
- package/static/plugins/clips/clips.min.js +0 -0
- package/static/plugins/counter/counter.js +0 -0
- package/static/plugins/counter/counter.min.js +0 -0
- package/static/plugins/definedlinks/definedlinks.js +0 -0
- package/static/plugins/definedlinks/definedlinks.min.js +0 -0
- package/static/plugins/handle/handle.js +0 -0
- package/static/plugins/handle/handle.min.js +0 -0
- package/static/plugins/icons/icons.js +0 -0
- package/static/plugins/icons/icons.min.js +0 -0
- package/static/plugins/imageposition/imageposition.js +0 -0
- package/static/plugins/imageposition/imageposition.min.js +0 -0
- package/static/plugins/inlineformat/inlineformat.js +0 -0
- package/static/plugins/inlineformat/inlineformat.min.js +0 -0
- package/static/plugins/removeformat/removeformat.js +0 -0
- package/static/plugins/removeformat/removeformat.min.js +0 -0
- package/static/plugins/selector/selector.js +0 -0
- package/static/plugins/selector/selector.min.js +0 -0
- package/static/plugins/specialchars/specialchars.js +0 -0
- package/static/plugins/specialchars/specialchars.min.js +0 -0
- package/static/plugins/textdirection/textdirection.js +0 -0
- package/static/plugins/textdirection/textdirection.min.js +0 -0
- package/static/plugins/textexpander/textexpander.js +0 -0
- package/static/plugins/textexpander/textexpander.min.js +0 -0
- package/static/plugins/underline/underline.js +0 -0
- package/static/plugins/underline/underline.min.js +0 -0
- package/static/redactorx.css +0 -0
- package/static/redactorx.js +0 -0
- package/static/redactorx.min.css +0 -0
- package/static/redactorx.min.js +0 -0
- package/static/redactorx.usm.min.js +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/_menu.vue +0 -0
- package/templates/comment.vue +42 -19
- package/templates/featured.vue +8 -9
- package/templates/thumbnail-old.vue +188 -0
- package/templates/thumbnail.vue +5 -188
- package/templates/unsupported.vue +0 -0
- package/tsconfig.json +1 -1
- package/utils/dom.js +0 -0
- package/utils/eventBus.js +9 -2
- package/utils/helper.js +0 -0
- package/utils/history.js +7 -4
- package/utils/http.js +7 -2
- package/utils/launch.js +43 -51
- package/utils/mime_type.js +0 -0
- package/utils/private/ws.js +0 -0
- package/utils/public.js +6 -0
- package/utils/queue.js +110 -0
- package/utils/settings.js +3 -1
- package/utils/type.js +0 -0
- package/utils/uploader.js +0 -0
|
@@ -3,45 +3,25 @@
|
|
|
3
3
|
<div ref="topAnchor"></div>
|
|
4
4
|
|
|
5
5
|
<table :style="$styles()" :class="$classes()">
|
|
6
|
-
<template v-for="(section, sectionIndex) in sections">
|
|
7
|
-
<thead
|
|
6
|
+
<template v-for="(section, sectionIndex) in sections" :key="`head_${sectionIndex}`">
|
|
7
|
+
<thead>
|
|
8
8
|
<tr v-if="importable || exportable">
|
|
9
9
|
<td colspan="10">
|
|
10
10
|
<div class="pa-3">
|
|
11
11
|
<template v-if="importable">
|
|
12
|
-
<span
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<input
|
|
19
|
-
ref="fileInput"
|
|
20
|
-
style="display: none;"
|
|
21
|
-
type="file"
|
|
22
|
-
accept=".csv"
|
|
23
|
-
@change="loadFile($event, section)"
|
|
24
|
-
/>
|
|
12
|
+
<span>{{
|
|
13
|
+
rows(section).length + section.dataRows.length
|
|
14
|
+
}}
|
|
15
|
+
rows</span>
|
|
16
|
+
<input ref="fileInput" style="display: none;" type="file" accept=".csv"
|
|
17
|
+
@change="loadFile($event, section)" />
|
|
25
18
|
<v-btn @click="triggerImport(sectionIndex)">Import</v-btn>
|
|
26
|
-
<v-btn
|
|
27
|
-
|
|
28
|
-
@click="submitRows($event, section)"
|
|
29
|
-
>Save</v-btn
|
|
30
|
-
>
|
|
31
|
-
<v-btn
|
|
32
|
-
:disabled="totalRows(section) <= 0"
|
|
33
|
-
@click="clear(section)"
|
|
34
|
-
>Clear</v-btn
|
|
35
|
-
>
|
|
19
|
+
<v-btn :disabled="totalRows(section) <= 0" @click="submitRows($event, section)">Save</v-btn>
|
|
20
|
+
<v-btn :disabled="totalRows(section) <= 0" @click="clear(section)">Clear</v-btn>
|
|
36
21
|
</template>
|
|
37
22
|
|
|
38
23
|
<div class="float-right">
|
|
39
|
-
<v-btn
|
|
40
|
-
v-if="exportable"
|
|
41
|
-
:download="exportFile"
|
|
42
|
-
:href="exportCsv(section)"
|
|
43
|
-
>{{ exportLabel }}</v-btn
|
|
44
|
-
>
|
|
24
|
+
<v-btn v-if="exportable" :download="exportFile" :href="exportCsv(section)">{{ exportLabel }}</v-btn>
|
|
45
25
|
</div>
|
|
46
26
|
</div>
|
|
47
27
|
|
|
@@ -53,36 +33,22 @@
|
|
|
53
33
|
|
|
54
34
|
<tr v-if="section.header" :style="genericStyles(section.header)">
|
|
55
35
|
<template v-if="section.header.dataCells">
|
|
56
|
-
<th
|
|
57
|
-
v-for="(cell, index) in section.header.dataCells"
|
|
58
|
-
:key="index"
|
|
59
|
-
>
|
|
36
|
+
<th v-for="(cell, index) in section.header.dataCells" :key="index">
|
|
60
37
|
{{ cell }}
|
|
61
38
|
</th>
|
|
62
39
|
</template>
|
|
63
|
-
<th
|
|
64
|
-
v-for="(cell, index) in section.header.cellViews"
|
|
65
|
-
v-else
|
|
66
|
-
:key="index"
|
|
67
|
-
>
|
|
40
|
+
<th v-for="(cell, index) in section.header.cellViews" v-else :key="index">
|
|
68
41
|
<glib-component :spec="cell" />
|
|
69
42
|
</th>
|
|
70
43
|
</tr>
|
|
71
44
|
</thead>
|
|
72
45
|
|
|
73
|
-
<tbody
|
|
46
|
+
<tbody>
|
|
74
47
|
<!-- <tr v-for="(row, index) in section.rows" :key="`row_${index}`"> -->
|
|
75
|
-
<template v-for="(row, rowIndex) in section.rows">
|
|
76
|
-
<tr
|
|
77
|
-
:key="`
|
|
78
|
-
|
|
79
|
-
>
|
|
80
|
-
<td
|
|
81
|
-
v-for="(cell, cellIndex) in row.cellViews"
|
|
82
|
-
:key="`cell_${cellIndex}`"
|
|
83
|
-
:colSpan="colSpan(row, cellIndex)"
|
|
84
|
-
:style="colStyles(row, cellIndex)"
|
|
85
|
-
>
|
|
48
|
+
<template v-for="(row, rowIndex) in section.rows" :key="`row_${rowIndex}`">
|
|
49
|
+
<tr :class="row.onClick ? 'clickable' : ''">
|
|
50
|
+
<td v-for="(cell, cellIndex) in row.cellViews" :key="`cell_${cellIndex}`" :colSpan="colSpan(row, cellIndex)"
|
|
51
|
+
:style="colStyles(row, cellIndex)">
|
|
86
52
|
<!-- Prevent double links -->
|
|
87
53
|
<glib-component v-if="$href(cell)" :spec="cell" />
|
|
88
54
|
<a v-else :href="$href(row)" @click="$onClick($event, row)">
|
|
@@ -92,14 +58,8 @@
|
|
|
92
58
|
</tr>
|
|
93
59
|
</template>
|
|
94
60
|
|
|
95
|
-
<tr
|
|
96
|
-
v-for="(
|
|
97
|
-
:key="`data_row_${rowIndex}`"
|
|
98
|
-
>
|
|
99
|
-
<td
|
|
100
|
-
v-for="(cell, cellIndex) in row"
|
|
101
|
-
:key="`data_cell_${cellIndex}`"
|
|
102
|
-
>
|
|
61
|
+
<tr v-for="(row, rowIndex) in section.dataRows" :key="`data_row_${rowIndex}`">
|
|
62
|
+
<td v-for="(cell, cellIndex) in row" :key="`data_cell_${cellIndex}`">
|
|
103
63
|
<a class="data-cell">{{ cell }}</a>
|
|
104
64
|
</td>
|
|
105
65
|
</tr>
|
|
@@ -195,6 +155,7 @@ export default {
|
|
|
195
155
|
table {
|
|
196
156
|
border-spacing: 0;
|
|
197
157
|
}
|
|
158
|
+
|
|
198
159
|
thead {
|
|
199
160
|
th {
|
|
200
161
|
padding: 10px 4px;
|
|
@@ -202,11 +163,13 @@ thead {
|
|
|
202
163
|
// border-left: 1px solid rgba(0, 0, 0, 0.12);
|
|
203
164
|
}
|
|
204
165
|
}
|
|
166
|
+
|
|
205
167
|
tbody {
|
|
206
168
|
tr.clickable {
|
|
207
|
-
td
|
|
169
|
+
td>a {
|
|
208
170
|
cursor: pointer;
|
|
209
171
|
}
|
|
172
|
+
|
|
210
173
|
&:hover {
|
|
211
174
|
background: #eee;
|
|
212
175
|
}
|
|
@@ -224,13 +187,16 @@ tbody {
|
|
|
224
187
|
}
|
|
225
188
|
}
|
|
226
189
|
}
|
|
190
|
+
|
|
227
191
|
.scrollable {
|
|
228
192
|
width: 100%;
|
|
229
193
|
overflow: auto;
|
|
230
194
|
}
|
|
195
|
+
|
|
231
196
|
.data-cell {
|
|
232
197
|
white-space: pre-line;
|
|
233
198
|
}
|
|
199
|
+
|
|
234
200
|
table.table--grid {
|
|
235
201
|
tbody {
|
|
236
202
|
td {
|
|
@@ -1,43 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- Paddings cannot be applied to v-timeline directly -->
|
|
3
3
|
<div :style="$styles()" :class="$classes()">
|
|
4
|
-
<v-timeline v-if="events" dense align-top>
|
|
5
|
-
<v-timeline-item
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:color="item.backgroundColor || 'white'"
|
|
9
|
-
:small="itemClasses(item).includes('small')"
|
|
10
|
-
:large="itemClasses(item).includes('large')"
|
|
11
|
-
:hide-dot="item.hide_dot"
|
|
12
|
-
fill-dot
|
|
13
|
-
>
|
|
4
|
+
<v-timeline v-if="events" :dense="true" align-top>
|
|
5
|
+
<v-timeline-item v-for="(item, index) in events" :key="index" :color="item.backgroundColor || 'white'"
|
|
6
|
+
:small="itemClasses(item).includes('small') || null" :large="itemClasses(item).includes('large')"
|
|
7
|
+
:hide-dot="item.hide_dot" fill-dot>
|
|
14
8
|
<template v-slot:icon>
|
|
15
|
-
<div
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
>
|
|
20
|
-
<div
|
|
21
|
-
v-if="item.text"
|
|
22
|
-
class="number-circle"
|
|
23
|
-
:style="{ color: item.color }"
|
|
24
|
-
>
|
|
9
|
+
<div :class="
|
|
10
|
+
itemClasses(item).includes('outlined') ? 'outlined-dots' : ''
|
|
11
|
+
">
|
|
12
|
+
<div v-if="item.text" class="number-circle" :style="{ color: item.color }">
|
|
25
13
|
{{ item.text }}
|
|
26
14
|
</div>
|
|
27
15
|
<div v-else class="icon">
|
|
28
|
-
<common-icon
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}"
|
|
33
|
-
/>
|
|
16
|
+
<common-icon :spec="{
|
|
17
|
+
material: { name: item.icon, size: iconSize(item) },
|
|
18
|
+
color: item.color
|
|
19
|
+
}" />
|
|
34
20
|
</div>
|
|
35
21
|
</div>
|
|
36
22
|
</template>
|
|
37
|
-
<panels-responsive
|
|
38
|
-
v-if="childViews"
|
|
39
|
-
:spec="{ childViews: [childViews[index]] }"
|
|
40
|
-
/>
|
|
23
|
+
<panels-responsive v-if="childViews" :spec="{ childViews: [childViews[index]] }" />
|
|
41
24
|
</v-timeline-item>
|
|
42
25
|
</v-timeline>
|
|
43
26
|
</div>
|
|
@@ -78,6 +61,7 @@ export default {
|
|
|
78
61
|
height: 36px;
|
|
79
62
|
width: 36px;
|
|
80
63
|
}
|
|
64
|
+
|
|
81
65
|
.v-timeline-item__dot--small {
|
|
82
66
|
height: 20px;
|
|
83
67
|
width: 20px;
|
|
@@ -88,13 +72,16 @@ export default {
|
|
|
88
72
|
.v-timeline {
|
|
89
73
|
padding-top: 0px;
|
|
90
74
|
}
|
|
75
|
+
|
|
91
76
|
.v-timeline-item {
|
|
92
77
|
// Minimum line distance
|
|
93
78
|
padding-bottom: 10px;
|
|
94
79
|
}
|
|
80
|
+
|
|
95
81
|
.container {
|
|
96
82
|
padding-top: 0px;
|
|
97
83
|
}
|
|
84
|
+
|
|
98
85
|
.outlined-dots {
|
|
99
86
|
border-radius: 50%;
|
|
100
87
|
width: 100%;
|
|
@@ -106,11 +93,13 @@ export default {
|
|
|
106
93
|
padding: 4px 0;
|
|
107
94
|
// font-size: 22px;
|
|
108
95
|
}
|
|
96
|
+
|
|
109
97
|
.outlined .v-timeline-item {
|
|
110
98
|
::v-deep .v-timeline-item__dot {
|
|
111
99
|
box-shadow: none;
|
|
112
100
|
}
|
|
113
101
|
}
|
|
102
|
+
|
|
114
103
|
.icon {
|
|
115
104
|
display: inline-flex;
|
|
116
105
|
vertical-align: middle;
|
|
@@ -120,6 +109,7 @@ export default {
|
|
|
120
109
|
.number-circle {
|
|
121
110
|
font-size: 16px;
|
|
122
111
|
}
|
|
112
|
+
|
|
123
113
|
.small {
|
|
124
114
|
.number-circle {
|
|
125
115
|
font-size: 14px;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
3
|
-
:
|
|
4
|
-
:class="cssClasses"
|
|
5
|
-
:style="cssStyles"
|
|
6
|
-
:href="$href()"
|
|
7
|
-
@click="$onClick()"
|
|
8
|
-
>
|
|
9
|
-
<template v-for="(item, index) in spec.childViews">
|
|
2
|
+
<component :is="componentName" :class="cssClasses" :style="cssStyles" :href="$href()" @click="$onClick()">
|
|
3
|
+
<template v-for="(item, index) in spec.childViews" :key="`${index}_${item.view}`">
|
|
10
4
|
<!-- Use view name for key to avoid component reuse issue -->
|
|
11
|
-
<glib-component :
|
|
5
|
+
<glib-component :spec="item" />
|
|
12
6
|
</template>
|
|
13
7
|
</component>
|
|
14
8
|
</template>
|
|
@@ -19,7 +13,7 @@ export default {
|
|
|
19
13
|
spec: { type: Object, required: true }
|
|
20
14
|
},
|
|
21
15
|
computed: {
|
|
22
|
-
cssClasses: function() {
|
|
16
|
+
cssClasses: function () {
|
|
23
17
|
// TODO: Remove this after migrating to `panels/responsive`
|
|
24
18
|
// Vertical panels are nameless when used in predefined layout (e.g. page.body, list.header, etc.)
|
|
25
19
|
this.spec.view = this.spec.view || "panels/vertical";
|
|
@@ -35,7 +29,7 @@ export default {
|
|
|
35
29
|
}
|
|
36
30
|
return classes;
|
|
37
31
|
},
|
|
38
|
-
cssStyles: function() {
|
|
32
|
+
cssStyles: function () {
|
|
39
33
|
const styles = this.genericStyles();
|
|
40
34
|
switch (this.spec.align) {
|
|
41
35
|
case "center":
|
|
@@ -50,7 +44,7 @@ export default {
|
|
|
50
44
|
return styles;
|
|
51
45
|
},
|
|
52
46
|
componentName() {
|
|
53
|
-
return this
|
|
47
|
+
return this.spec.onClick ? "a" : "div";
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
50
|
};
|
|
@@ -92,11 +86,12 @@ a.panels-vertical {
|
|
|
92
86
|
</style>
|
|
93
87
|
|
|
94
88
|
<style>
|
|
95
|
-
.layouts-vertical--fill-equally
|
|
89
|
+
.layouts-vertical--fill-equally>* {
|
|
96
90
|
flex: initial;
|
|
97
91
|
height: 100% !important;
|
|
98
92
|
}
|
|
99
|
-
|
|
93
|
+
|
|
94
|
+
.layouts-vertical--space-equally>* {
|
|
100
95
|
flex: initial;
|
|
101
96
|
}
|
|
102
97
|
</style>
|
|
File without changes
|
|
File without changes
|
package/components/spacer.vue
CHANGED
|
File without changes
|
package/components/switch.vue
CHANGED
|
File without changes
|
package/components/tabBar.vue
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="'width: 100%'" :class="$classes()">
|
|
3
|
-
<v-tabs
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
<v-tab
|
|
12
|
-
v-for="(item, index) in spec.buttons"
|
|
13
|
-
:key="index"
|
|
14
|
-
height="100%"
|
|
15
|
-
:href="$href(item)"
|
|
16
|
-
@click="$onClick($event, item)"
|
|
17
|
-
>
|
|
18
|
-
<common-badge :spec="item">
|
|
19
|
-
<common-icon v-if="item.icon" :spec="item.icon" />
|
|
20
|
-
<span :style="{ color: spec.color }">{{ item.text }}</span>
|
|
21
|
-
</common-badge>
|
|
3
|
+
<v-tabs v-model="tab" :background-color="spec.backgroundColor" :slider-color="spec.color" show-arrows
|
|
4
|
+
:height="spec.height || 60" :grow="$classes().includes('no-grow') ? false : true"
|
|
5
|
+
:model-value="this.spec.activeIndex || null">
|
|
6
|
+
<v-tab v-for="(item, index) in spec.buttons" :key="index" height="100%" :value="index">
|
|
7
|
+
|
|
8
|
+
<span :style="{ color: spec.color }">{{ item.text }}</span>
|
|
9
|
+
|
|
22
10
|
</v-tab>
|
|
23
11
|
</v-tabs>
|
|
24
12
|
<v-divider />
|
|
@@ -26,6 +14,8 @@
|
|
|
26
14
|
</template>
|
|
27
15
|
|
|
28
16
|
<script>
|
|
17
|
+
import Action from '../action';
|
|
18
|
+
|
|
29
19
|
export default {
|
|
30
20
|
props: {
|
|
31
21
|
spec: { type: Object, required: true }
|
|
@@ -36,6 +26,20 @@ export default {
|
|
|
36
26
|
buttons: null
|
|
37
27
|
};
|
|
38
28
|
},
|
|
29
|
+
watch: {
|
|
30
|
+
tab: function (val, oldVal) {
|
|
31
|
+
if (val == oldVal && oldVal == null) return null;
|
|
32
|
+
|
|
33
|
+
this.$nextTick(function () {
|
|
34
|
+
const activeTab = this.buttons[val]
|
|
35
|
+
const onClick = activeTab?.onClick
|
|
36
|
+
|
|
37
|
+
if (onClick) {
|
|
38
|
+
Action.execute(onClick, this)
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
},
|
|
39
43
|
methods: {
|
|
40
44
|
$ready() {
|
|
41
45
|
this.buttons = this.spec.tabButtons || this.spec.buttons;
|
|
@@ -54,15 +58,19 @@ export default {
|
|
|
54
58
|
left: 0;
|
|
55
59
|
width: 100%;
|
|
56
60
|
}
|
|
61
|
+
|
|
57
62
|
.no-divider .v-divider {
|
|
58
63
|
display: none;
|
|
59
64
|
}
|
|
65
|
+
|
|
60
66
|
.v-tab .v-badge span {
|
|
61
67
|
// Make sure tab label is middle aligned.
|
|
62
68
|
margin: auto 0;
|
|
63
69
|
}
|
|
70
|
+
|
|
64
71
|
/* .v-badge {
|
|
65
72
|
top: 50%;
|
|
66
73
|
transform: translate(0, -50%);
|
|
67
74
|
} */
|
|
68
75
|
</style>
|
|
76
|
+
|
package/index.js
CHANGED
|
@@ -1,26 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createApp, h } from "vue";
|
|
2
|
+
import vuetify from "./plugins/vuetify";
|
|
4
3
|
import App from "./app.vue";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
window.vueApp = {
|
|
6
|
+
vuetify: vuetify,
|
|
7
|
+
page: window.__page,
|
|
8
|
+
indicator: false,
|
|
9
|
+
// Rename to isPageStale
|
|
10
|
+
isStale: false,
|
|
11
|
+
/// Dirty form handling
|
|
12
|
+
isFormSubmitted: false,
|
|
13
|
+
isFormDirty: false,
|
|
14
|
+
///
|
|
15
|
+
stateUpdatedAt: null,
|
|
16
|
+
webSocket: { channels: {}, header: {} },
|
|
17
|
+
actionCable: { channels: {} },
|
|
18
|
+
registeredComponents: [],
|
|
19
|
+
temp: {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const Vue = createApp({
|
|
23
|
+
vuetify: window.vueApp.vuetify,
|
|
24
|
+
data: {
|
|
25
|
+
vueApp: window.vueApp,
|
|
26
|
+
},
|
|
27
|
+
mounted() {
|
|
28
|
+
eventBus.$on('app/updatePage', page => this.vueApp = Object.assign({}, this.vueApp, { page: page }))
|
|
29
|
+
},
|
|
30
|
+
render: function () {
|
|
31
|
+
return h(App, { page: this.$data.vueApp.page });
|
|
11
32
|
}
|
|
12
|
-
})
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Vue.use(vuetify)
|
|
37
|
+
|
|
38
|
+
// import * as VueGoogleMaps from "vue2-google-maps";
|
|
39
|
+
// Vue.use(VueGoogleMaps, {
|
|
40
|
+
// load: {
|
|
41
|
+
// key: process.env.GMAPS_API_KEY,
|
|
42
|
+
// libraries: "places"
|
|
43
|
+
// }
|
|
44
|
+
// });
|
|
13
45
|
|
|
14
46
|
import "./styles/test.scss";
|
|
15
47
|
import "./styles/test.sass";
|
|
16
48
|
|
|
17
|
-
import Vuetify from "vuetify";
|
|
18
|
-
import "vuetify/dist/vuetify.min.css";
|
|
19
49
|
// Only used for social media icons
|
|
20
|
-
import "@fortawesome/fontawesome-free/css/all.css";
|
|
50
|
+
// import "@fortawesome/fontawesome-free/css/all.css";
|
|
21
51
|
// import "material-design-icons-iconfont/dist/material-design-icons.css";
|
|
22
52
|
// import "@mdi/font/css/materialdesignicons.css";
|
|
23
|
-
Vue.use(Vuetify);
|
|
24
53
|
|
|
25
54
|
import Chartkick from "vue-chartkick";
|
|
26
55
|
import Chart from "chart.js";
|
|
@@ -29,8 +58,8 @@ Chart.plugins.register(annotationPlugin);
|
|
|
29
58
|
Vue.use(Chartkick.use(Chart));
|
|
30
59
|
|
|
31
60
|
// TODO: make this opt-in
|
|
32
|
-
import VueYoutube from "vue-youtube";
|
|
33
|
-
Vue.use(VueYoutube);
|
|
61
|
+
// import VueYoutube from "vue-youtube";
|
|
62
|
+
// Vue.use(VueYoutube);
|
|
34
63
|
|
|
35
64
|
// import VueAnalytics from 'vue-analytics'
|
|
36
65
|
// // TODO: Avoid hardcoding
|
|
@@ -38,32 +67,32 @@ Vue.use(VueYoutube);
|
|
|
38
67
|
// id: 'UA-146876849-1'
|
|
39
68
|
// })
|
|
40
69
|
|
|
41
|
-
import VueSocialSharing from "vue-social-sharing";
|
|
42
|
-
Vue.use(VueSocialSharing, { networks: { copy: "" } });
|
|
70
|
+
// import VueSocialSharing from "vue-social-sharing";
|
|
71
|
+
// Vue.use(VueSocialSharing, { networks: { copy: "" } });
|
|
43
72
|
|
|
44
73
|
import "./extensions/string.js";
|
|
45
74
|
import "./extensions/array.js";
|
|
46
75
|
|
|
47
76
|
// Recursive components must be global
|
|
48
|
-
import VerticalPanel from "./components/panels/vertical";
|
|
49
|
-
import ResponsivePanel from "./components/panels/responsive";
|
|
50
|
-
import Component from "./components/component";
|
|
51
|
-
import CommonIcon from "./components/_icon";
|
|
52
|
-
import CommonBadge from "./components/_badge";
|
|
53
|
-
import CommonTooltip from "./components/_tooltip";
|
|
54
|
-
import CommonButton from "./components/_button";
|
|
55
|
-
import CommonChip from "./components/_chip";
|
|
56
|
-
import CommonMessage from "./components/_message";
|
|
57
|
-
import CommonDropdownMenu from "./components/_dropdownMenu";
|
|
58
|
-
import CommonResponsive from "./components/_responsive";
|
|
59
|
-
import CommonTemplateMenu from "./templates/_menu";
|
|
60
|
-
import RichButton from "./components/button";
|
|
77
|
+
import VerticalPanel from "./components/panels/vertical.vue";
|
|
78
|
+
import ResponsivePanel from "./components/panels/responsive.vue";
|
|
79
|
+
import Component from "./components/component.vue";
|
|
80
|
+
import CommonIcon from "./components/_icon.vue";
|
|
81
|
+
// import CommonBadge from "./components/_badge.vue";
|
|
82
|
+
// import CommonTooltip from "./components/_tooltip.vue";
|
|
83
|
+
import CommonButton from "./components/_button.vue";
|
|
84
|
+
import CommonChip from "./components/_chip.vue";
|
|
85
|
+
import CommonMessage from "./components/_message.vue";
|
|
86
|
+
import CommonDropdownMenu from "./components/_dropdownMenu.vue";
|
|
87
|
+
import CommonResponsive from "./components/_responsive.vue";
|
|
88
|
+
import CommonTemplateMenu from "./templates/_menu.vue";
|
|
89
|
+
import RichButton from "./components/button.vue";
|
|
61
90
|
Vue.component("panels-vertical", VerticalPanel);
|
|
62
91
|
Vue.component("panels-responsive", ResponsivePanel);
|
|
63
92
|
Vue.component("common-button", CommonButton);
|
|
64
93
|
Vue.component("common-icon", CommonIcon);
|
|
65
|
-
Vue.component("common-badge", CommonBadge);
|
|
66
|
-
Vue.component("common-tooltip", CommonTooltip);
|
|
94
|
+
// Vue.component("common-badge", CommonBadge);
|
|
95
|
+
// Vue.component("common-tooltip", CommonTooltip);
|
|
67
96
|
Vue.component("common-chip", CommonChip);
|
|
68
97
|
Vue.component("common-message", CommonMessage);
|
|
69
98
|
Vue.component("common-dropdownMenu", CommonDropdownMenu);
|
|
@@ -91,7 +120,7 @@ Vue.mixin(scrollingMixin);
|
|
|
91
120
|
import datasetMixins from "./components/mixins/dataset.js";
|
|
92
121
|
Vue.mixin(datasetMixins);
|
|
93
122
|
|
|
94
|
-
Vue.
|
|
123
|
+
Vue.config.globalProperties.extension = {};
|
|
95
124
|
import extension from "./components/mixins/extension.js";
|
|
96
125
|
Vue.mixin(extension);
|
|
97
126
|
|
|
@@ -102,8 +131,8 @@ Vue.directive("longclick", window.longClickInstance);
|
|
|
102
131
|
// TODO: Deprecate
|
|
103
132
|
import TypeUtils from "./utils/type";
|
|
104
133
|
Vue.use({
|
|
105
|
-
install: function(Vue, options) {
|
|
106
|
-
Vue.
|
|
134
|
+
install: function (Vue, options) {
|
|
135
|
+
Vue.config.globalProperties.$type = {
|
|
107
136
|
isObject: TypeUtils.isObject,
|
|
108
137
|
isString: TypeUtils.isString,
|
|
109
138
|
isNumber: TypeUtils.isNumber,
|
|
@@ -124,7 +153,6 @@ import Framework from "./utils/public";
|
|
|
124
153
|
window.GLib = Framework;
|
|
125
154
|
|
|
126
155
|
import { settings } from "./utils/settings";
|
|
127
|
-
export { settings };
|
|
128
156
|
|
|
129
157
|
import driverCustomBehavior from "./plugins/driverCustomBehavior";
|
|
130
158
|
Vue.use(driverCustomBehavior);
|
|
@@ -141,6 +169,7 @@ Vue.use(updatableComponent);
|
|
|
141
169
|
// })
|
|
142
170
|
|
|
143
171
|
import VueGtag from "vue-gtag";
|
|
172
|
+
import eventBus from "./utils/eventBus";
|
|
144
173
|
|
|
145
174
|
document.addEventListener("DOMContentLoaded", () => {
|
|
146
175
|
const gtagId = settings.gtagId;
|
|
@@ -155,44 +184,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
155
184
|
});
|
|
156
185
|
}
|
|
157
186
|
|
|
158
|
-
|
|
159
|
-
vuetify: new Vuetify({
|
|
160
|
-
icons: {
|
|
161
|
-
iconfont: "md"
|
|
162
|
-
},
|
|
163
|
-
theme: {
|
|
164
|
-
themes: Utils.settings.themes
|
|
165
|
-
},
|
|
166
|
-
breakpoint: {
|
|
167
|
-
smAndDown: true
|
|
168
|
-
}
|
|
169
|
-
}),
|
|
170
|
-
page: window.__page,
|
|
171
|
-
indicator: false,
|
|
172
|
-
// Rename to isPageStale
|
|
173
|
-
isStale: false,
|
|
174
|
-
/// Dirty form handling
|
|
175
|
-
isFormSubmitted: false,
|
|
176
|
-
isFormDirty: false,
|
|
177
|
-
///
|
|
178
|
-
stateUpdatedAt: null,
|
|
179
|
-
webSocket: { channels: {}, header: {} },
|
|
180
|
-
actionCable: { channels: {} },
|
|
181
|
-
registeredComponents: [],
|
|
182
|
-
temp: {}
|
|
183
|
-
};
|
|
184
|
-
new Vue({
|
|
185
|
-
el: "#app",
|
|
186
|
-
vuetify: window.vueApp.vuetify,
|
|
187
|
-
data: {
|
|
188
|
-
vueApp: window.vueApp
|
|
189
|
-
},
|
|
190
|
-
render: function(createElement) {
|
|
191
|
-
return createElement(App, { props: { page: this.$data.vueApp.page } });
|
|
192
|
-
}
|
|
193
|
-
});
|
|
187
|
+
Vue.mount("#app")
|
|
194
188
|
});
|
|
195
189
|
|
|
190
|
+
export { Vue, settings }
|
|
191
|
+
|
|
196
192
|
// The above code uses Vue without the compiler, which means you cannot
|
|
197
193
|
// use Vue to target elements in your existing html templates. You would
|
|
198
194
|
// need to always use single file components.
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/appbar.vue
CHANGED
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script>
|
|
37
|
-
import NavDrawer from "./drawer";
|
|
38
|
-
import ViewsAvatar from "../components/avatar";
|
|
37
|
+
import NavDrawer from "./drawer.vue";
|
|
38
|
+
import ViewsAvatar from "../components/avatar.vue";
|
|
39
39
|
|
|
40
40
|
export default {
|
|
41
41
|
components: {
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
},
|
|
60
60
|
// We could've used the `app` attribute on `v-toolbar` if it didn't conflict with our header-footer css.
|
|
61
61
|
leftPadding: function () {
|
|
62
|
-
switch (this.$vuetify.
|
|
62
|
+
switch (this.$vuetify.display.name) {
|
|
63
63
|
case "lg":
|
|
64
64
|
case "xl":
|
|
65
65
|
return { "padding-left": "270px" };
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
return this.leftPadding !== null;
|
|
72
72
|
},
|
|
73
73
|
showMobileMenu() {
|
|
74
|
-
return this.rightButtons.length > 0 && this.$vuetify.
|
|
74
|
+
return this.rightButtons.length > 0 && this.$vuetify.display.smAndDown;
|
|
75
75
|
},
|
|
76
76
|
mobileMenu() {
|
|
77
77
|
return {
|