glib-web 0.6.0 → 0.6.4
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/action.js +7 -4
- package/actions/analytics/logEvent.js +1 -1
- package/actions/auth/creditCard.js +4 -4
- package/actions/auth/saveCsrfToken.js +4 -4
- package/actions/cables/push.js +0 -12
- package/actions/commands/copy.js +12 -0
- package/actions/dialogs/alert.js +2 -2
- package/actions/dialogs/close.js +2 -4
- package/actions/dialogs/notification.js +2 -2
- package/actions/dialogs/open.js +2 -4
- package/actions/dialogs/show.js +3 -2
- package/actions/forms/submit.js +2 -12
- package/actions/http/delete.js +1 -1
- package/actions/http/patch.js +1 -1
- package/actions/http/post.js +1 -1
- package/actions/http/put.js +1 -1
- package/actions/runMultiple.js +2 -2
- package/actions/timeouts/set.js +2 -2
- package/actions/windows/close.js +2 -2
- package/actions/windows/closeAll.js +2 -2
- package/actions/windows/closeWithReload.js +1 -1
- package/actions/windows/open.js +1 -1
- package/actions/windows/reload.js +1 -1
- package/actions/ws/push.js +1 -1
- package/app.vue +5 -3
- package/components/button.vue +10 -10
- package/components/calendar.vue +1 -1
- package/components/chip.vue +38 -13
- package/components/component.vue +4 -0
- package/components/fields/check.vue +20 -10
- package/components/fields/creditCard.vue +22 -13
- package/components/fields/googlePlace.vue +80 -52
- package/components/fields/radioGroup.vue +1 -0
- package/components/mixins/chart/tooltip.js +5 -2
- package/components/mixins/dataset.js +10 -0
- package/components/mixins/events.js +4 -5
- package/components/mixins/generic.js +6 -0
- package/components/mixins/list/autoload.js +2 -3
- package/components/mixins/table/autoload.js +2 -2
- package/components/mixins/tooltip.js +11 -0
- package/components/mixins/tour.js +75 -0
- package/components/mixins/ws/actionCable.js +1 -1
- package/components/multimedia/video.vue +87 -0
- package/components/panels/form.vue +13 -3
- package/components/panels/list.vue +1 -1
- package/components/switch.vue +2 -2
- package/index.js +3 -0
- package/nav/appbar.vue +1 -1
- package/nav/dialog.vue +2 -2
- package/nav/sheet.vue +1 -2
- package/nav/snackbar.vue +1 -2
- package/package.json +3 -2
- package/utils/form.js +1 -5
- package/utils/http.js +2 -2
- package/utils/launch.js +25 -18
- package/utils/private/ws.js +1 -1
- package/utils/uploader.js +4 -22
package/action.js
CHANGED
|
@@ -45,6 +45,8 @@ import ActionsCreditCard from "./actions/auth/creditCard";
|
|
|
45
45
|
|
|
46
46
|
import ActionsAnalyticsLogEvent from "./actions/analytics/logEvent";
|
|
47
47
|
|
|
48
|
+
import ActionCommandsCopy from "./actions/commands/copy";
|
|
49
|
+
|
|
48
50
|
const actions = {
|
|
49
51
|
runMultiple: ActionsRunMultiple,
|
|
50
52
|
|
|
@@ -89,11 +91,12 @@ const actions = {
|
|
|
89
91
|
"auth/restart": ActionsAuthRestart,
|
|
90
92
|
"auth/creditCard": ActionsCreditCard,
|
|
91
93
|
|
|
92
|
-
"analytics/logEvent": ActionsAnalyticsLogEvent
|
|
94
|
+
"analytics/logEvent": ActionsAnalyticsLogEvent,
|
|
95
|
+
"commands/copy": ActionCommandsCopy
|
|
93
96
|
};
|
|
94
97
|
|
|
95
98
|
export default class Action {
|
|
96
|
-
static execute(spec,
|
|
99
|
+
static execute(spec, component, params = {}) {
|
|
97
100
|
if (!TypeUtils.isObject(spec)) {
|
|
98
101
|
return;
|
|
99
102
|
}
|
|
@@ -141,7 +144,7 @@ export default class Action {
|
|
|
141
144
|
if (!logDisabled) {
|
|
142
145
|
console.log(`Executing "${actionName}"`);
|
|
143
146
|
}
|
|
144
|
-
action.execute(spec,
|
|
147
|
+
action.execute(spec, component, params);
|
|
145
148
|
} catch (e) {
|
|
146
149
|
console.log(
|
|
147
150
|
"Failed executing command",
|
|
@@ -159,7 +162,7 @@ export default class Action {
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
window.vueApp.temp.analytics = response.analytics;
|
|
162
|
-
GLib.action.execute(response.onResponse,
|
|
165
|
+
GLib.action.execute(response.onResponse, component);
|
|
163
166
|
window.vueApp.temp.analytics = null;
|
|
164
167
|
}
|
|
165
168
|
}
|
|
@@ -9,9 +9,9 @@ export default class {
|
|
|
9
9
|
Utils.http.stopIndicator(component);
|
|
10
10
|
|
|
11
11
|
if (result.error) {
|
|
12
|
-
GLib.action.execute(properties.onFailure,
|
|
12
|
+
GLib.action.execute(properties.onFailure, component);
|
|
13
13
|
} else {
|
|
14
|
-
GLib.action.execute(properties.onSuccess,
|
|
14
|
+
GLib.action.execute(properties.onSuccess, component);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
} else {
|
|
@@ -19,9 +19,9 @@ export default class {
|
|
|
19
19
|
Utils.http.stopIndicator(component);
|
|
20
20
|
|
|
21
21
|
if (result.error) {
|
|
22
|
-
GLib.action.execute(properties.onFailure,
|
|
22
|
+
GLib.action.execute(properties.onFailure, component);
|
|
23
23
|
} else {
|
|
24
|
-
GLib.action.execute(properties.onSuccess,
|
|
24
|
+
GLib.action.execute(properties.onSuccess, component);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// import Keys from '../../keys'
|
|
3
3
|
|
|
4
4
|
export default class {
|
|
5
|
-
execute(properties,
|
|
5
|
+
execute(properties, component) {
|
|
6
6
|
// console.log(properties['token'])
|
|
7
7
|
// Storage.setLocal(Keys.Db.csrfToken, properties['token'])
|
|
8
|
-
|
|
9
|
-
Utils.dom.setCsrf(properties[
|
|
10
|
-
Action.execute(properties[
|
|
8
|
+
|
|
9
|
+
Utils.dom.setCsrf(properties["token"]);
|
|
10
|
+
Action.execute(properties["onSave"], component);
|
|
11
11
|
}
|
|
12
12
|
}
|
package/actions/cables/push.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
export default class {
|
|
2
2
|
execute(properties) {
|
|
3
|
-
// const spec = Object.assign({}, properties, {
|
|
4
|
-
// buttons: [
|
|
5
|
-
// {
|
|
6
|
-
// text: "OK",
|
|
7
|
-
// onClick: properties.onClose
|
|
8
|
-
// }
|
|
9
|
-
// ]
|
|
10
|
-
// });
|
|
11
|
-
// Launch.dialog(spec);
|
|
12
|
-
|
|
13
|
-
// const ws = window.vueApp.actionCable;
|
|
14
|
-
|
|
15
3
|
Utils.type.ifString(properties.channel, channelName => {
|
|
16
4
|
const ws = window.vueApp.actionCable;
|
|
17
5
|
const channel = ws.channels[channelName];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
execute(properties) {
|
|
3
|
+
let spec = Object.assign({}, properties, {
|
|
4
|
+
message: "Copied",
|
|
5
|
+
styleClasses: ["success"]
|
|
6
|
+
});
|
|
7
|
+
navigator.clipboard.writeText(properties.text).then(
|
|
8
|
+
() => Utils.launch.snackbar.open(spec),
|
|
9
|
+
reason => console.error("Could not copy text: " + reason)
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/actions/dialogs/alert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Launch from "../../utils/launch";
|
|
2
2
|
|
|
3
3
|
export default class {
|
|
4
|
-
execute(properties) {
|
|
4
|
+
execute(properties, component) {
|
|
5
5
|
const spec = Object.assign({}, properties, {
|
|
6
6
|
buttons: [
|
|
7
7
|
{
|
|
@@ -10,6 +10,6 @@ export default class {
|
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
Utils.launch.dialog.open(spec, component);
|
|
14
14
|
}
|
|
15
15
|
}
|
package/actions/dialogs/close.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Push from "push.js";
|
|
2
2
|
|
|
3
3
|
export default class {
|
|
4
|
-
execute(properties,
|
|
4
|
+
execute(properties, component) {
|
|
5
5
|
Push.create(properties.title, {
|
|
6
6
|
body: properties.message,
|
|
7
7
|
onClick() {
|
|
8
8
|
const onClick = properties.onClick;
|
|
9
|
-
GLib.action.execute(onClick,
|
|
9
|
+
GLib.action.execute(onClick, component);
|
|
10
10
|
this.close();
|
|
11
11
|
}
|
|
12
12
|
});
|
package/actions/dialogs/open.js
CHANGED
package/actions/dialogs/show.js
CHANGED
package/actions/forms/submit.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
export default class {
|
|
2
|
-
execute(properties,
|
|
3
|
-
|
|
4
|
-
if (form != null) {
|
|
5
|
-
form.submit();
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// const vm = this;
|
|
9
|
-
// // Allows time for things to get finalized. For example, select.vue needs time to insert values
|
|
10
|
-
// // into hidden fields before they get submitted.
|
|
11
|
-
// setTimeout(() => {
|
|
12
|
-
// vm.submit(target, component);
|
|
13
|
-
// }, 10);
|
|
2
|
+
execute(properties, component) {
|
|
3
|
+
component.$dispatchEvent("forms/directSubmit");
|
|
14
4
|
}
|
|
15
5
|
}
|
package/actions/http/delete.js
CHANGED
package/actions/http/patch.js
CHANGED
package/actions/http/post.js
CHANGED
package/actions/http/put.js
CHANGED
package/actions/runMultiple.js
CHANGED
|
@@ -3,9 +3,9 @@ export default class {
|
|
|
3
3
|
return true;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
execute(properties,
|
|
6
|
+
execute(properties, component) {
|
|
7
7
|
for (const action of properties.childActions) {
|
|
8
|
-
GLib.action.execute(action,
|
|
8
|
+
GLib.action.execute(action, component);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/actions/timeouts/set.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default class {
|
|
2
|
-
execute(properties,
|
|
2
|
+
execute(properties, component) {
|
|
3
3
|
component.$data._isBusy = true;
|
|
4
4
|
|
|
5
5
|
if (properties.repeat) {
|
|
@@ -15,6 +15,6 @@ export default class {
|
|
|
15
15
|
|
|
16
16
|
onTimeout(properties, component) {
|
|
17
17
|
component.$data._isBusy = false;
|
|
18
|
-
GLib.action.execute(properties.onTimeout,
|
|
18
|
+
GLib.action.execute(properties.onTimeout, component);
|
|
19
19
|
}
|
|
20
20
|
}
|
package/actions/windows/close.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default class {
|
|
2
|
-
execute(properties,
|
|
2
|
+
execute(properties, component) {
|
|
3
3
|
Utils.history.back();
|
|
4
4
|
|
|
5
5
|
Utils.type.ifObject(properties["onClose"], it => {
|
|
6
6
|
// Allow time for history.back() to complete, which is important for actions that need
|
|
7
7
|
// to use window.location.href such as windows/reload
|
|
8
8
|
setTimeout(function() {
|
|
9
|
-
GLib.action.execute(it,
|
|
9
|
+
GLib.action.execute(it, component);
|
|
10
10
|
}, 100);
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Type from "../../utils/type";
|
|
2
2
|
|
|
3
3
|
export default class {
|
|
4
|
-
execute(properties,
|
|
4
|
+
execute(properties, component) {
|
|
5
5
|
// TODO
|
|
6
6
|
// window.history.deleteAll()
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ export default class {
|
|
|
9
9
|
// Allow time for history.back() to complete, which is important for actions that need
|
|
10
10
|
// to use window.location.href such as windows/reload
|
|
11
11
|
setTimeout(function() {
|
|
12
|
-
GLib.action.execute(it,
|
|
12
|
+
GLib.action.execute(it, component);
|
|
13
13
|
}, 100);
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Hash from "../../utils/hash";
|
|
2
2
|
|
|
3
3
|
export default class {
|
|
4
|
-
execute(properties,
|
|
4
|
+
execute(properties, component) {
|
|
5
5
|
const fallbackUrl = new Hash(properties).remove("fallbackUrl");
|
|
6
6
|
const data = Object.assign({}, properties);
|
|
7
7
|
if (!Utils.history.back()) {
|
package/actions/windows/open.js
CHANGED
package/actions/ws/push.js
CHANGED
package/app.vue
CHANGED
|
@@ -42,13 +42,14 @@ import Utils from "./utils/helper";
|
|
|
42
42
|
import ContentLayout from "./nav/content";
|
|
43
43
|
import phoenixSocketMixin from "./components/mixins/ws/phoenixSocket.js";
|
|
44
44
|
import actionCableMixin from "./components/mixins/ws/actionCable.js";
|
|
45
|
+
import tourMixin from "./components/mixins/tour";
|
|
45
46
|
|
|
46
47
|
export default {
|
|
47
48
|
components: {
|
|
48
49
|
"nav-appbar": NavAppBar,
|
|
49
50
|
"layouts-content": ContentLayout
|
|
50
51
|
},
|
|
51
|
-
mixins: [phoenixSocketMixin, actionCableMixin],
|
|
52
|
+
mixins: [phoenixSocketMixin, actionCableMixin, tourMixin],
|
|
52
53
|
props: {
|
|
53
54
|
page: { type: Object, required: true }
|
|
54
55
|
},
|
|
@@ -103,12 +104,13 @@ export default {
|
|
|
103
104
|
if (Utils.history.isPoppedState(this.page)) {
|
|
104
105
|
setTimeout(() => {
|
|
105
106
|
// Wait until page is rendered
|
|
106
|
-
GLib.action.execute(this.page.onRefocus,
|
|
107
|
+
GLib.action.execute(this.page.onRefocus, this);
|
|
107
108
|
});
|
|
108
109
|
} else {
|
|
109
110
|
setTimeout(() => {
|
|
110
111
|
// Wait until page is rendered
|
|
111
|
-
GLib.action.execute(this.page.onLoad,
|
|
112
|
+
GLib.action.execute(this.page.onLoad, this);
|
|
113
|
+
this.startTour();
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
}
|
package/components/button.vue
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<v-tooltip
|
|
4
4
|
v-if="spec.tooltip"
|
|
5
|
-
:top="
|
|
6
|
-
:right="
|
|
7
|
-
:bottom="
|
|
8
|
-
:left="
|
|
5
|
+
:top="tooltipPositionMatches('top')"
|
|
6
|
+
:right="tooltipPositionMatches('right')"
|
|
7
|
+
:bottom="tooltipPositionMatches('bottom')"
|
|
8
|
+
:left="tooltipPositionMatches('left')"
|
|
9
9
|
>
|
|
10
10
|
<template v-slot:activator="{ on }">
|
|
11
11
|
<div v-on="on">
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
+
import tooltipMixin from "./mixins/tooltip";
|
|
25
|
+
import tourMixin from "./mixins/tour";
|
|
26
|
+
|
|
24
27
|
export default {
|
|
28
|
+
mixins: [tooltipMixin, tourMixin],
|
|
25
29
|
props: {
|
|
26
30
|
spec: { type: Object, required: true }
|
|
27
31
|
},
|
|
28
32
|
methods: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return position == this.spec.tooltip.position;
|
|
32
|
-
} else {
|
|
33
|
-
return position == "bottom";
|
|
34
|
-
}
|
|
33
|
+
$ready() {
|
|
34
|
+
this.registerTour();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
package/components/calendar.vue
CHANGED
package/components/chip.vue
CHANGED
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-
|
|
3
|
-
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
|
|
2
|
+
<v-tooltip
|
|
3
|
+
:disabled="!spec.tooltip"
|
|
4
|
+
:top="tooltipPositionMatches('top')"
|
|
5
|
+
:right="tooltipPositionMatches('right')"
|
|
6
|
+
:bottom="tooltipPositionMatches('bottom')"
|
|
7
|
+
:left="tooltipPositionMatches('left')"
|
|
8
8
|
>
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
<template v-slot:activator="{ on }">
|
|
10
|
+
<div v-on="on">
|
|
11
|
+
<v-chip
|
|
12
|
+
v-if="spec.onClick"
|
|
13
|
+
:style="genericStyles()"
|
|
14
|
+
:class="$classes()"
|
|
15
|
+
:href="$href()"
|
|
16
|
+
@click="$onClick()"
|
|
17
|
+
>
|
|
18
|
+
{{ spec.text }}
|
|
19
|
+
<common-badge :spec="spec" />
|
|
20
|
+
</v-chip>
|
|
21
|
+
<v-chip v-else :style="genericStyles()" :class="$classes()">
|
|
22
|
+
{{ spec.text }}
|
|
23
|
+
<common-badge :spec="spec" />
|
|
24
|
+
</v-chip>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<span>{{ tooltip.text }}</span>
|
|
28
|
+
</v-tooltip>
|
|
16
29
|
</template>
|
|
17
30
|
|
|
18
31
|
<script>
|
|
32
|
+
import TooltipMixins from "./mixins/tooltip";
|
|
19
33
|
export default {
|
|
34
|
+
mixins: [TooltipMixins],
|
|
20
35
|
props: {
|
|
21
36
|
spec: { type: Object, required: true }
|
|
37
|
+
},
|
|
38
|
+
data: function() {
|
|
39
|
+
return {
|
|
40
|
+
tooltip: {}
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
$ready() {
|
|
45
|
+
this.tooltip = this.spec.tooltip || {};
|
|
46
|
+
}
|
|
22
47
|
}
|
|
23
48
|
};
|
|
24
49
|
</script>
|
package/components/component.vue
CHANGED
|
@@ -105,6 +105,8 @@ import ResponsivePanel from "./panels/responsive";
|
|
|
105
105
|
import UlPanel from "./panels/ul";
|
|
106
106
|
import WebPanel from "./panels/web";
|
|
107
107
|
|
|
108
|
+
import MultimediaVideo from "./multimedia/video";
|
|
109
|
+
|
|
108
110
|
import AlertBanner from "./banners/alert";
|
|
109
111
|
import SelectBanner from "./banners/select";
|
|
110
112
|
|
|
@@ -185,6 +187,8 @@ export default {
|
|
|
185
187
|
"panels-ul": UlPanel,
|
|
186
188
|
"panels-web": WebPanel,
|
|
187
189
|
|
|
190
|
+
"multimedia-video": MultimediaVideo,
|
|
191
|
+
|
|
188
192
|
"banners-alert": AlertBanner,
|
|
189
193
|
"banners-select": SelectBanner,
|
|
190
194
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$classes()" :style="$styles()">
|
|
3
|
-
<fields-hidden v-if="uncheckSpec" :spec="uncheckSpec" />
|
|
3
|
+
<!-- <fields-hidden v-if="uncheckSpec" :spec="uncheckSpec" /> -->
|
|
4
|
+
<!-- This hidden field should always be there to make sure the submitted param is not empty,
|
|
5
|
+
which could cause "Not accessible" error on the server. -->
|
|
6
|
+
<input type="hidden" :name="fieldName" :value="spec.uncheckValue" />
|
|
4
7
|
<v-checkbox
|
|
5
8
|
v-model="fieldModel"
|
|
6
9
|
:name="fieldName"
|
|
@@ -15,20 +18,20 @@
|
|
|
15
18
|
</template>
|
|
16
19
|
|
|
17
20
|
<script>
|
|
18
|
-
import HiddenField from "./hidden";
|
|
21
|
+
// import HiddenField from "./hidden";
|
|
19
22
|
|
|
20
23
|
export default {
|
|
21
|
-
components: {
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
+
// components: {
|
|
25
|
+
// "fields-hidden": HiddenField
|
|
26
|
+
// },
|
|
24
27
|
props: {
|
|
25
28
|
spec: { type: Object, required: true }
|
|
26
29
|
},
|
|
27
30
|
data() {
|
|
28
31
|
return {
|
|
29
32
|
groupName: null,
|
|
30
|
-
fieldType: null
|
|
31
|
-
uncheckSpec: null
|
|
33
|
+
fieldType: null
|
|
34
|
+
// uncheckSpec: null
|
|
32
35
|
};
|
|
33
36
|
},
|
|
34
37
|
methods: {
|
|
@@ -42,6 +45,7 @@ export default {
|
|
|
42
45
|
);
|
|
43
46
|
|
|
44
47
|
this.fieldName = this.spec.name || groupName;
|
|
48
|
+
|
|
45
49
|
this.fieldModel = this.spec.checked
|
|
46
50
|
? this.spec.checkValue
|
|
47
51
|
: this.spec.value;
|
|
@@ -52,9 +56,9 @@ export default {
|
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
58
|
|
|
55
|
-
Utils.type.ifNotNull(this.spec.uncheckValue, value => {
|
|
56
|
-
|
|
57
|
-
});
|
|
59
|
+
// Utils.type.ifNotNull(this.spec.uncheckValue, value => {
|
|
60
|
+
// this.uncheckSpec = { name: this.spec.name, value: value };
|
|
61
|
+
// });
|
|
58
62
|
},
|
|
59
63
|
changed(event) {
|
|
60
64
|
// Execute later to ensure the checkbox's checked state has been updated.
|
|
@@ -69,6 +73,12 @@ export default {
|
|
|
69
73
|
this.$dispatchEvent("forms/submit");
|
|
70
74
|
}, 200);
|
|
71
75
|
}
|
|
76
|
+
},
|
|
77
|
+
$internalizeValue(val) {
|
|
78
|
+
if (val == this.spec.checkValue) {
|
|
79
|
+
return val;
|
|
80
|
+
}
|
|
81
|
+
return this.spec.uncheckValue;
|
|
72
82
|
}
|
|
73
83
|
}
|
|
74
84
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="genericStyles()" :class="$classes()">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
<div class="stretcher">
|
|
4
|
+
<StripeIndividualFields
|
|
5
|
+
v-if="$classes().includes('individual')"
|
|
6
|
+
:spec="spec"
|
|
7
|
+
:on-complete="_retrieveToken"
|
|
8
|
+
:on-error="_displayError"
|
|
9
|
+
/>
|
|
10
|
+
<StripeFields
|
|
11
|
+
v-else
|
|
12
|
+
:spec="spec"
|
|
13
|
+
:on-complete="_retrieveToken"
|
|
14
|
+
:on-error="_displayError"
|
|
15
|
+
/>
|
|
16
|
+
<div ref="error" style="color: red;"></div>
|
|
17
|
+
</div>
|
|
16
18
|
<!-- <input ref="token" type="hidden" :name="spec.name" /> -->
|
|
17
19
|
|
|
18
20
|
<input
|
|
@@ -103,3 +105,10 @@ export default {
|
|
|
103
105
|
}
|
|
104
106
|
};
|
|
105
107
|
</script>
|
|
108
|
+
|
|
109
|
+
<style lang="scss" scoped>
|
|
110
|
+
// Without this, this view will have minimal width when displayed using showIf.
|
|
111
|
+
.stretcher {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
</style>
|