glib-web 0.5.77 → 0.5.78
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/README.md +0 -0
- package/action.js +167 -167
- package/actions/analytics/logEvent.js +0 -0
- package/actions/cables/push.js +0 -0
- package/actions/dialogs/notification.js +0 -0
- package/actions/http/patch.js +0 -0
- package/actions/panels/scrollTo.js +18 -18
- package/actions/panels/scrollToBottom.js +0 -0
- package/actions/timeouts/set.js +20 -20
- package/actions/windows/close.js +0 -0
- package/actions/windows/closeAll.js +0 -0
- package/actions/windows/closeWithReload.js +0 -0
- package/actions/windows/refreshState.js +5 -5
- package/actions/windows/reload.js +0 -0
- package/actions/ws/push.js +0 -0
- package/app.vue +180 -180
- package/components/_button.vue +101 -101
- package/components/_dropdownMenu.vue +76 -76
- package/components/_icon.vue +50 -50
- package/components/avatar.vue +16 -16
- package/components/banners/alert.vue +0 -0
- package/components/banners/select.vue +82 -82
- package/components/component.vue +222 -222
- package/components/fields/_patternText.vue +61 -61
- package/components/fields/_select.vue +86 -86
- package/components/fields/autocomplete.vue +73 -73
- package/components/fields/check.vue +104 -104
- package/components/fields/creditCard.vue +0 -0
- package/components/fields/dynamicGroup.vue +0 -0
- package/components/fields/hidden.vue +0 -0
- package/components/fields/location.vue +0 -0
- package/components/fields/newRichText.vue +0 -0
- package/components/fields/phone/countries.js +315 -315
- package/components/fields/phone/field.vue +348 -348
- package/components/fields/phone/sprite.css +1071 -1071
- package/components/fields/radio.vue +64 -64
- package/components/fields/radioGroup.vue +0 -0
- package/components/fields/rating.vue +0 -0
- package/components/fields/richText.vue +0 -0
- package/components/fields/select.vue +17 -17
- package/components/fields/stripe/stripeFields.vue +93 -93
- package/components/fields/stripe/stripeIndividualFields.vue +207 -207
- package/components/fields/stripeExternalAccount.vue +135 -135
- package/components/fields/text.vue +0 -0
- package/components/fields/textarea.vue +0 -0
- package/components/fields/timeZone.vue +22 -22
- package/components/fields/timer.vue +83 -83
- package/components/h1.vue +28 -28
- package/components/h2.vue +20 -20
- package/components/h3.vue +22 -22
- package/components/h4.vue +20 -20
- package/components/h5.vue +20 -20
- package/components/h6.vue +20 -20
- package/components/icon.vue +25 -25
- package/components/label.vue +62 -62
- package/components/map.vue +0 -0
- package/components/mixins/events.js +178 -178
- package/components/mixins/generic.js +0 -0
- package/components/mixins/list/autoload.js +0 -0
- package/components/mixins/styles.js +221 -221
- package/components/mixins/table/autoload.js +0 -0
- package/components/mixins/text.js +20 -20
- package/components/mixins/ws/actionCable.js +48 -48
- package/components/mixins/ws/phoenixSocket.js +0 -0
- package/components/panels/carousel.vue +55 -55
- package/components/panels/flow.vue +81 -81
- package/components/panels/form.vue +126 -126
- package/components/panels/list.vue +0 -0
- package/components/panels/scroll.vue +0 -0
- package/components/panels/table.vue +0 -0
- package/components/panels/ul.vue +34 -34
- package/components/panels/vertical.vue +0 -0
- package/components/panels/web.vue +11 -11
- package/components/spacer.vue +0 -0
- package/components/switch.vue +42 -42
- package/extensions/string.js +21 -21
- package/index.js +195 -195
- package/nav/content.vue +0 -0
- package/nav/dialog.vue +127 -127
- package/nav/snackbar.vue +0 -0
- package/package.json +42 -42
- 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/templates/_menu.vue +38 -38
- package/templates/comment.vue +202 -202
- package/templates/featured.vue +32 -32
- package/templates/thumbnail.vue +138 -138
- package/templates/unsupported.vue +12 -12
- package/utils/app.js +0 -0
- package/utils/hash.js +0 -0
- package/utils/helper.js +0 -0
- package/utils/history.js +70 -70
- package/utils/http.js +209 -209
- package/utils/launch.js +135 -135
- package/utils/private/ws.js +0 -0
package/nav/dialog.vue
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-dialog
|
|
3
|
-
v-model="model"
|
|
4
|
-
width="600"
|
|
5
|
-
:dark="false"
|
|
6
|
-
:sm-and-down="false"
|
|
7
|
-
:persistent="true"
|
|
8
|
-
>
|
|
9
|
-
<v-card>
|
|
10
|
-
<v-card-title v-if="title || showClose" class="headline" primary-title>
|
|
11
|
-
{{ title }}
|
|
12
|
-
<v-btn v-if="showClose" text icon class="dialog-close" @click="close">
|
|
13
|
-
<v-icon>close</v-icon>
|
|
14
|
-
</v-btn>
|
|
15
|
-
</v-card-title>
|
|
16
|
-
|
|
17
|
-
<div>
|
|
18
|
-
<div v-if="message" class="dialog-message">
|
|
19
|
-
<common-message :spec="spec" />
|
|
20
|
-
</div>
|
|
21
|
-
<panels-responsive v-if="body" :spec="body" />
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<v-divider></v-divider>
|
|
25
|
-
|
|
26
|
-
<v-card-actions v-if="spec.buttons">
|
|
27
|
-
<v-spacer></v-spacer>
|
|
28
|
-
|
|
29
|
-
<v-btn
|
|
30
|
-
v-for="(button, index) in spec.buttons"
|
|
31
|
-
:key="index"
|
|
32
|
-
color="primary"
|
|
33
|
-
text
|
|
34
|
-
@click="click(button, $event)"
|
|
35
|
-
>
|
|
36
|
-
{{ button.text }}
|
|
37
|
-
</v-btn>
|
|
38
|
-
|
|
39
|
-
<panels-responsive v-if="footer" :spec="footer" />
|
|
40
|
-
</v-card-actions>
|
|
41
|
-
</v-card>
|
|
42
|
-
</v-dialog>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
import Http from "../utils/http";
|
|
47
|
-
import Action from "../action";
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
props: {
|
|
51
|
-
spec: { type: Object, required: true },
|
|
52
|
-
stack: { type: Array, required: true },
|
|
53
|
-
vueApp: { type: Object, required: true }
|
|
54
|
-
},
|
|
55
|
-
data: function() {
|
|
56
|
-
return {
|
|
57
|
-
title: null,
|
|
58
|
-
message: null,
|
|
59
|
-
body: null,
|
|
60
|
-
footer: null,
|
|
61
|
-
model: null,
|
|
62
|
-
url: this.spec.url,
|
|
63
|
-
showClose: Utils.type.isString(this.spec.url)
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
watch: {
|
|
67
|
-
model: function(val, oldVal) {
|
|
68
|
-
if (!val) {
|
|
69
|
-
this.$destroy();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
methods: {
|
|
74
|
-
$ready() {
|
|
75
|
-
this.$root.vueApp = this.vueApp;
|
|
76
|
-
|
|
77
|
-
const spec = this.spec;
|
|
78
|
-
if (Utils.type.isString(this.url)) {
|
|
79
|
-
this.message = "Loading...";
|
|
80
|
-
const url = Utils.url.appendParams(this.url, { _dialog: "v1" });
|
|
81
|
-
Http.execute({ url: url }, "GET", this, response => {
|
|
82
|
-
this.title = response.title;
|
|
83
|
-
this.message = "";
|
|
84
|
-
this.body = response.body;
|
|
85
|
-
this.footer = response.footer;
|
|
86
|
-
this.showClose = false;
|
|
87
|
-
});
|
|
88
|
-
} else {
|
|
89
|
-
this.title = this.spec.title;
|
|
90
|
-
this.message = this.spec.message;
|
|
91
|
-
this.body = this.spec.body;
|
|
92
|
-
Action.execute(spec.onLoad, null, this);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
this.stack.push(this);
|
|
96
|
-
this.model = true;
|
|
97
|
-
},
|
|
98
|
-
$tearDown() {
|
|
99
|
-
console.log("Dialog destroyed");
|
|
100
|
-
this.stack.remove(this);
|
|
101
|
-
},
|
|
102
|
-
close() {
|
|
103
|
-
this.model = false;
|
|
104
|
-
},
|
|
105
|
-
click(spec, event) {
|
|
106
|
-
const onClick = spec["onClick"];
|
|
107
|
-
this.model = false;
|
|
108
|
-
Action.execute(onClick, event.target, this);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
</script>
|
|
113
|
-
|
|
114
|
-
<style scoped>
|
|
115
|
-
.dialog-message {
|
|
116
|
-
padding: 16px 16px 20px 16px;
|
|
117
|
-
/* white-space: pre-wrap; */
|
|
118
|
-
}
|
|
119
|
-
.dialog-close {
|
|
120
|
-
right: 16px;
|
|
121
|
-
top: 12px;
|
|
122
|
-
position: absolute;
|
|
123
|
-
}
|
|
124
|
-
.v-card__text {
|
|
125
|
-
padding: 0 !important;
|
|
126
|
-
}
|
|
127
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-dialog
|
|
3
|
+
v-model="model"
|
|
4
|
+
width="600"
|
|
5
|
+
:dark="false"
|
|
6
|
+
:sm-and-down="false"
|
|
7
|
+
:persistent="true"
|
|
8
|
+
>
|
|
9
|
+
<v-card>
|
|
10
|
+
<v-card-title v-if="title || showClose" class="headline" primary-title>
|
|
11
|
+
{{ title }}
|
|
12
|
+
<v-btn v-if="showClose" text icon class="dialog-close" @click="close">
|
|
13
|
+
<v-icon>close</v-icon>
|
|
14
|
+
</v-btn>
|
|
15
|
+
</v-card-title>
|
|
16
|
+
|
|
17
|
+
<div>
|
|
18
|
+
<div v-if="message" class="dialog-message">
|
|
19
|
+
<common-message :spec="spec" />
|
|
20
|
+
</div>
|
|
21
|
+
<panels-responsive v-if="body" :spec="body" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<v-divider></v-divider>
|
|
25
|
+
|
|
26
|
+
<v-card-actions v-if="spec.buttons">
|
|
27
|
+
<v-spacer></v-spacer>
|
|
28
|
+
|
|
29
|
+
<v-btn
|
|
30
|
+
v-for="(button, index) in spec.buttons"
|
|
31
|
+
:key="index"
|
|
32
|
+
color="primary"
|
|
33
|
+
text
|
|
34
|
+
@click="click(button, $event)"
|
|
35
|
+
>
|
|
36
|
+
{{ button.text }}
|
|
37
|
+
</v-btn>
|
|
38
|
+
|
|
39
|
+
<panels-responsive v-if="footer" :spec="footer" />
|
|
40
|
+
</v-card-actions>
|
|
41
|
+
</v-card>
|
|
42
|
+
</v-dialog>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import Http from "../utils/http";
|
|
47
|
+
import Action from "../action";
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
props: {
|
|
51
|
+
spec: { type: Object, required: true },
|
|
52
|
+
stack: { type: Array, required: true },
|
|
53
|
+
vueApp: { type: Object, required: true }
|
|
54
|
+
},
|
|
55
|
+
data: function() {
|
|
56
|
+
return {
|
|
57
|
+
title: null,
|
|
58
|
+
message: null,
|
|
59
|
+
body: null,
|
|
60
|
+
footer: null,
|
|
61
|
+
model: null,
|
|
62
|
+
url: this.spec.url,
|
|
63
|
+
showClose: Utils.type.isString(this.spec.url)
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
watch: {
|
|
67
|
+
model: function(val, oldVal) {
|
|
68
|
+
if (!val) {
|
|
69
|
+
this.$destroy();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
$ready() {
|
|
75
|
+
this.$root.vueApp = this.vueApp;
|
|
76
|
+
|
|
77
|
+
const spec = this.spec;
|
|
78
|
+
if (Utils.type.isString(this.url)) {
|
|
79
|
+
this.message = "Loading...";
|
|
80
|
+
const url = Utils.url.appendParams(this.url, { _dialog: "v1" });
|
|
81
|
+
Http.execute({ url: url }, "GET", this, response => {
|
|
82
|
+
this.title = response.title;
|
|
83
|
+
this.message = "";
|
|
84
|
+
this.body = response.body;
|
|
85
|
+
this.footer = response.footer;
|
|
86
|
+
this.showClose = false;
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
this.title = this.spec.title;
|
|
90
|
+
this.message = this.spec.message;
|
|
91
|
+
this.body = this.spec.body;
|
|
92
|
+
Action.execute(spec.onLoad, null, this);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
this.stack.push(this);
|
|
96
|
+
this.model = true;
|
|
97
|
+
},
|
|
98
|
+
$tearDown() {
|
|
99
|
+
console.log("Dialog destroyed");
|
|
100
|
+
this.stack.remove(this);
|
|
101
|
+
},
|
|
102
|
+
close() {
|
|
103
|
+
this.model = false;
|
|
104
|
+
},
|
|
105
|
+
click(spec, event) {
|
|
106
|
+
const onClick = spec["onClick"];
|
|
107
|
+
this.model = false;
|
|
108
|
+
Action.execute(onClick, event.target, this);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<style scoped>
|
|
115
|
+
.dialog-message {
|
|
116
|
+
padding: 16px 16px 20px 16px;
|
|
117
|
+
/* white-space: pre-wrap; */
|
|
118
|
+
}
|
|
119
|
+
.dialog-close {
|
|
120
|
+
right: 16px;
|
|
121
|
+
top: 12px;
|
|
122
|
+
position: absolute;
|
|
123
|
+
}
|
|
124
|
+
.v-card__text {
|
|
125
|
+
padding: 0 !important;
|
|
126
|
+
}
|
|
127
|
+
</style>
|
package/nav/snackbar.vue
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "glib-web",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@mdi/font": "^4.5.95",
|
|
13
|
-
"@rails/actioncable": "^6.0.0",
|
|
14
|
-
"@rails/activestorage": "^6.0.0-alpha",
|
|
15
|
-
"awesome-phonenumber": "2.15.0",
|
|
16
|
-
"chart.js": "^2.8.0",
|
|
17
|
-
"json-logic-js": "^1.2.2",
|
|
18
|
-
"marked": "^0.7.0",
|
|
19
|
-
"phoenix": "^1.5.3",
|
|
20
|
-
"push.js": "^1.0.12",
|
|
21
|
-
"sass": "^1.23.6",
|
|
22
|
-
"sass-loader": "^8.0.0",
|
|
23
|
-
"vue": "2.6.10",
|
|
24
|
-
"vue-chartkick": "^0.5.2",
|
|
25
|
-
"vue-gtag": "^1.1.2",
|
|
26
|
-
"vue-youtube": "^1.4.0",
|
|
27
|
-
"vue2-editor": "^2.9.1",
|
|
28
|
-
"vue2-google-maps": "^0.10.6",
|
|
29
|
-
"vuedraggable": "^2.24.1",
|
|
30
|
-
"vuetify": "2.3.9"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"babel-eslint": "^10.0.3",
|
|
34
|
-
"eslint": "^6.4.0",
|
|
35
|
-
"eslint-config-prettier": "^6.3.0",
|
|
36
|
-
"eslint-loader": "^3.0.0",
|
|
37
|
-
"eslint-plugin-prettier": "^3.1.1",
|
|
38
|
-
"eslint-plugin-vue": "^5.2.3",
|
|
39
|
-
"eslint-plugin-vuetify": "^1.0.0-beta.3",
|
|
40
|
-
"prettier": "^1.18.2"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "glib-web",
|
|
3
|
+
"version": "0.5.78",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@mdi/font": "^4.5.95",
|
|
13
|
+
"@rails/actioncable": "^6.0.0",
|
|
14
|
+
"@rails/activestorage": "^6.0.0-alpha",
|
|
15
|
+
"awesome-phonenumber": "2.15.0",
|
|
16
|
+
"chart.js": "^2.8.0",
|
|
17
|
+
"json-logic-js": "^1.2.2",
|
|
18
|
+
"marked": "^0.7.0",
|
|
19
|
+
"phoenix": "^1.5.3",
|
|
20
|
+
"push.js": "^1.0.12",
|
|
21
|
+
"sass": "^1.23.6",
|
|
22
|
+
"sass-loader": "^8.0.0",
|
|
23
|
+
"vue": "2.6.10",
|
|
24
|
+
"vue-chartkick": "^0.5.2",
|
|
25
|
+
"vue-gtag": "^1.1.2",
|
|
26
|
+
"vue-youtube": "^1.4.0",
|
|
27
|
+
"vue2-editor": "^2.9.1",
|
|
28
|
+
"vue2-google-maps": "^0.10.6",
|
|
29
|
+
"vuedraggable": "^2.24.1",
|
|
30
|
+
"vuetify": "2.3.9"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"babel-eslint": "^10.0.3",
|
|
34
|
+
"eslint": "^6.4.0",
|
|
35
|
+
"eslint-config-prettier": "^6.3.0",
|
|
36
|
+
"eslint-loader": "^3.0.0",
|
|
37
|
+
"eslint-plugin-prettier": "^3.1.1",
|
|
38
|
+
"eslint-plugin-vue": "^5.2.3",
|
|
39
|
+
"eslint-plugin-vuetify": "^1.0.0-beta.3",
|
|
40
|
+
"prettier": "^1.18.2"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/static/redactorx.css
CHANGED
|
File without changes
|
package/static/redactorx.js
CHANGED
|
File without changes
|
package/static/redactorx.min.css
CHANGED
|
File without changes
|
package/static/redactorx.min.js
CHANGED
|
File without changes
|
|
File without changes
|
package/templates/_menu.vue
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-list-item-action v-if="editMenu">
|
|
3
|
-
<common-dropdownMenu :spec="editMenu" :disabled="$isBusy" />
|
|
4
|
-
</v-list-item-action>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
props: {
|
|
10
|
-
editButtons: { type: Array, required: true }
|
|
11
|
-
},
|
|
12
|
-
computed: {
|
|
13
|
-
// This needs to be computed so that it is always up-to-date, regardless of whether:
|
|
14
|
-
// 1. The page is navigated away and the parent component gets reused or
|
|
15
|
-
// 2. There is just a delay in the initialization of the menu variable in ($ready())
|
|
16
|
-
editMenu() {
|
|
17
|
-
if (this.editButtons.length > 0) {
|
|
18
|
-
return {
|
|
19
|
-
icon: { material: { name: "more_vert" } },
|
|
20
|
-
childButtons: this.editButtons
|
|
21
|
-
};
|
|
22
|
-
} else {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
methods: {
|
|
28
|
-
buttonSpec(item) {
|
|
29
|
-
return Object.assign({}, item, {
|
|
30
|
-
view: "button-v1",
|
|
31
|
-
styleClasses: ["text"]
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-list-item-action v-if="editMenu">
|
|
3
|
+
<common-dropdownMenu :spec="editMenu" :disabled="$isBusy" />
|
|
4
|
+
</v-list-item-action>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
editButtons: { type: Array, required: true }
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
// This needs to be computed so that it is always up-to-date, regardless of whether:
|
|
14
|
+
// 1. The page is navigated away and the parent component gets reused or
|
|
15
|
+
// 2. There is just a delay in the initialization of the menu variable in ($ready())
|
|
16
|
+
editMenu() {
|
|
17
|
+
if (this.editButtons.length > 0) {
|
|
18
|
+
return {
|
|
19
|
+
icon: { material: { name: "more_vert" } },
|
|
20
|
+
childButtons: this.editButtons
|
|
21
|
+
};
|
|
22
|
+
} else {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
buttonSpec(item) {
|
|
29
|
+
return Object.assign({}, item, {
|
|
30
|
+
view: "button-v1",
|
|
31
|
+
styleClasses: ["text"]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="scss" scoped></style>
|