glib-web 2.4.1 → 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/LICENSE +0 -0
- package/action.js +6 -1
- package/actions/auth/restart.js +0 -0
- package/actions/commands/enqueue.js +17 -0
- package/actions/components/update.js +13 -14
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/options.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/component.vue +97 -100
- 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/date.vue +5 -5
- package/components/fields/datetime.vue +5 -5
- package/components/fields/dynamicSelect.vue +8 -29
- package/components/fields/newRichText.vue +66 -53
- package/components/fields/otpField.vue +90 -0
- package/components/fields/phone/field.vue +60 -78
- 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/stripeExternalAccount.vue +10 -24
- 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/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/image.vue +13 -20
- package/components/map.vue +115 -29
- package/components/markdown.vue +15 -8
- package/components/mixins/events.js +17 -6
- 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/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/p.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/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/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/styles/test.sass +0 -0
- package/styles/test.scss +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/history.js +7 -4
- package/utils/http.js +7 -2
- package/utils/launch.js +43 -51
- package/utils/public.js +6 -0
- package/utils/queue.js +110 -0
- package/utils/settings.js +3 -1
- package/utils/storage.js +0 -0
- package/utils/url.js +0 -0
package/components/component.vue
CHANGED
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
<fields-text v-else-if="name == 'fields-number'" :spec="spec" type="number" />
|
|
4
4
|
<fields-text v-else-if="name == 'fields-email'" :spec="spec" type="email" />
|
|
5
5
|
<fields-text v-else-if="name == 'fields-url'" :spec="spec" type="url" />
|
|
6
|
-
<fields-text
|
|
7
|
-
v-else-if="name == 'fields-password'"
|
|
8
|
-
:spec="spec"
|
|
9
|
-
type="password"
|
|
10
|
-
/>
|
|
6
|
+
<fields-text v-else-if="name == 'fields-password'" :spec="spec" type="password" />
|
|
11
7
|
<!-- <fields-textarea v-else-if="spec.view == 'fields/textarea-v1'" :spec="spec" />
|
|
12
8
|
<fields-richText v-else-if="spec.view == 'fields/richText-v1'" :spec="spec" /> -->
|
|
13
9
|
<!-- <fields-file v-else-if="spec.view == 'fields/file-v1'" :spec="spec" />
|
|
@@ -19,10 +15,7 @@
|
|
|
19
15
|
<!-- <fields-country v-else-if="spec.view == 'fields/country-v1'" :spec="spec" /> -->
|
|
20
16
|
|
|
21
17
|
<!-- <fields-latLong v-else-if="spec.view == 'fields/latLong-v1'" :spec="spec" /> -->
|
|
22
|
-
<fields-googlePlace
|
|
23
|
-
v-else-if="spec.view == 'fields/googlePlace-v1'"
|
|
24
|
-
:spec="spec"
|
|
25
|
-
/>
|
|
18
|
+
<fields-googlePlace v-else-if="spec.view == 'fields/googlePlace-v1'" :spec="spec" />
|
|
26
19
|
|
|
27
20
|
<!-- <panels-responsive v-else-if="spec.view == 'panels/scroll-v1'" :spec="spec" /> -->
|
|
28
21
|
|
|
@@ -32,92 +25,95 @@
|
|
|
32
25
|
</template>
|
|
33
26
|
|
|
34
27
|
<script>
|
|
35
|
-
import H1 from "./h1";
|
|
36
|
-
import H2 from "./h2";
|
|
37
|
-
import H3 from "./h3";
|
|
38
|
-
import H4 from "./h4";
|
|
39
|
-
import H5 from "./h5";
|
|
40
|
-
import H6 from "./h6";
|
|
41
|
-
import Label from "./label";
|
|
42
|
-
import P from "./p";
|
|
43
|
-
import Markdown from "./markdown";
|
|
44
|
-
import Html from "./html";
|
|
45
|
-
import Chip from "./chip";
|
|
46
|
-
import Datetime from "./datetime";
|
|
47
|
-
|
|
48
|
-
import ProgressBar from "./progressbar";
|
|
28
|
+
import H1 from "./h1.vue";
|
|
29
|
+
import H2 from "./h2.vue";
|
|
30
|
+
import H3 from "./h3.vue";
|
|
31
|
+
import H4 from "./h4.vue";
|
|
32
|
+
import H5 from "./h5.vue";
|
|
33
|
+
import H6 from "./h6.vue";
|
|
34
|
+
import Label from "./label.vue";
|
|
35
|
+
import P from "./p.vue";
|
|
36
|
+
import Markdown from "./markdown.vue";
|
|
37
|
+
import Html from "./html.vue";
|
|
38
|
+
import Chip from "./chip.vue";
|
|
39
|
+
import Datetime from "./datetime.vue";
|
|
40
|
+
|
|
41
|
+
import ProgressBar from "./progressbar.vue";
|
|
49
42
|
import ProgressCircle from "./progressCircle.vue";
|
|
50
43
|
|
|
51
|
-
import Image from "./image";
|
|
52
|
-
import Avatar from "./avatar";
|
|
53
|
-
import Icon from "./icon";
|
|
54
|
-
|
|
55
|
-
import Button from "./button";
|
|
56
|
-
import Fab from "./fab";
|
|
57
|
-
import Switch from "./switch";
|
|
58
|
-
|
|
59
|
-
import Hr from "./hr";
|
|
60
|
-
import Spacer from "./spacer";
|
|
61
|
-
|
|
62
|
-
import Map from "./map";
|
|
63
|
-
import TabBar from "./tabBar";
|
|
64
|
-
import Calendar from "./calendar";
|
|
65
|
-
|
|
66
|
-
import HiddenField from "./fields/hidden";
|
|
67
|
-
import TextField from "./fields/text";
|
|
68
|
-
import SubmitField from "./fields/submit";
|
|
69
|
-
import TextAreaField from "./fields/textarea";
|
|
70
|
-
import RichTextField from "./fields/richText";
|
|
71
|
-
import NewRichTextField from "./fields/newRichText";
|
|
72
|
-
import FileField from "./fields/file";
|
|
73
|
-
import AutocompleteField from "./fields/autocomplete";
|
|
74
|
-
import SelectField from "./fields/select";
|
|
75
|
-
import TimeZoneField from "./fields/timeZone";
|
|
76
|
-
import DynamicSelectField from "./fields/dynamicSelect";
|
|
77
|
-
import CountryField from "./fields/country/field";
|
|
78
|
-
import RadioGroupField from "./fields/radioGroup";
|
|
79
|
-
import RadioField from "./fields/radio";
|
|
80
|
-
import CheckGroupField from "./fields/checkGroup";
|
|
81
|
-
import CheckField from "./fields/check";
|
|
82
|
-
import DateField from "./fields/date";
|
|
83
|
-
import DateTimeField from "./fields/datetime";
|
|
84
|
-
import LocationField from "./fields/location";
|
|
85
|
-
import GooglePlaceField from "./fields/googlePlace";
|
|
86
|
-
import DynamicGroupField from "./fields/dynamicGroup";
|
|
87
|
-
import StripeTokenField from "./fields/stripeToken";
|
|
88
|
-
import StripeExternalAccount from "./fields/stripeExternalAccount";
|
|
89
|
-
import CreditCardField from "./fields/creditCard";
|
|
90
|
-
import RatingField from "./fields/rating";
|
|
91
|
-
import PhoneField from "./fields/phone/field";
|
|
92
|
-
import TimerField from "./fields/timer";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
import
|
|
96
|
-
import
|
|
97
|
-
import
|
|
98
|
-
import
|
|
99
|
-
import
|
|
100
|
-
import
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
import
|
|
105
|
-
import
|
|
106
|
-
import
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
import
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
import
|
|
118
|
-
import
|
|
119
|
-
|
|
120
|
-
|
|
44
|
+
import Image from "./image.vue";
|
|
45
|
+
import Avatar from "./avatar.vue";
|
|
46
|
+
import Icon from "./icon.vue";
|
|
47
|
+
|
|
48
|
+
import Button from "./button.vue";
|
|
49
|
+
import Fab from "./fab.vue";
|
|
50
|
+
import Switch from "./switch.vue";
|
|
51
|
+
|
|
52
|
+
import Hr from "./hr.vue";
|
|
53
|
+
import Spacer from "./spacer.vue";
|
|
54
|
+
|
|
55
|
+
// import Map from "./map.vue";
|
|
56
|
+
import TabBar from "./tabBar.vue";
|
|
57
|
+
import Calendar from "./calendar.vue";
|
|
58
|
+
|
|
59
|
+
import HiddenField from "./fields/hidden.vue";
|
|
60
|
+
import TextField from "./fields/text.vue";
|
|
61
|
+
import SubmitField from "./fields/submit.vue";
|
|
62
|
+
import TextAreaField from "./fields/textarea.vue";
|
|
63
|
+
import RichTextField from "./fields/richText.vue";
|
|
64
|
+
// import NewRichTextField from "./fields/newRichText.vue";
|
|
65
|
+
import FileField from "./fields/file.vue";
|
|
66
|
+
import AutocompleteField from "./fields/autocomplete.vue";
|
|
67
|
+
import SelectField from "./fields/select.vue";
|
|
68
|
+
import TimeZoneField from "./fields/timeZone.vue";
|
|
69
|
+
import DynamicSelectField from "./fields/dynamicSelect.vue";
|
|
70
|
+
import CountryField from "./fields/country/field.vue";
|
|
71
|
+
import RadioGroupField from "./fields/radioGroup.vue";
|
|
72
|
+
import RadioField from "./fields/radio.vue";
|
|
73
|
+
import CheckGroupField from "./fields/checkGroup.vue";
|
|
74
|
+
import CheckField from "./fields/check.vue";
|
|
75
|
+
import DateField from "./fields/date.vue";
|
|
76
|
+
import DateTimeField from "./fields/datetime.vue";
|
|
77
|
+
import LocationField from "./fields/location.vue";
|
|
78
|
+
import GooglePlaceField from "./fields/googlePlace.vue";
|
|
79
|
+
import DynamicGroupField from "./fields/dynamicGroup.vue";
|
|
80
|
+
import StripeTokenField from "./fields/stripeToken.vue";
|
|
81
|
+
import StripeExternalAccount from "./fields/stripeExternalAccount.vue";
|
|
82
|
+
import CreditCardField from "./fields/creditCard.vue";
|
|
83
|
+
import RatingField from "./fields/rating.vue";
|
|
84
|
+
import PhoneField from "./fields/phone/field.vue";
|
|
85
|
+
import TimerField from "./fields/timer.vue";
|
|
86
|
+
import OtpField from "./fields/otpField.vue";
|
|
87
|
+
|
|
88
|
+
import ScrollPanel from "./panels/scroll.vue";
|
|
89
|
+
import VerticalPanel from "./panels/vertical.vue";
|
|
90
|
+
import HorizontalPanel from "./panels/horizontal.vue";
|
|
91
|
+
import FlowPanel from "./panels/flow.vue";
|
|
92
|
+
import SplitPanel from "./panels/split.vue";
|
|
93
|
+
import FormPanel from "./panels/form.vue";
|
|
94
|
+
import ListPanel from "./panels/list.vue";
|
|
95
|
+
import CarouselPanel from "./panels/carousel.vue";
|
|
96
|
+
import TablePanel from "./panels/table.vue";
|
|
97
|
+
import CustomPanel from "./panels/custom.vue";
|
|
98
|
+
import ColumnPanel from "./panels/column.vue";
|
|
99
|
+
import ResponsivePanel from "./panels/responsive.vue";
|
|
100
|
+
import UlPanel from "./panels/ul.vue";
|
|
101
|
+
import WebPanel from "./panels/web.vue";
|
|
102
|
+
import GridPanel from "./panels/grid.vue";
|
|
103
|
+
import TimelinePanel from "./panels/timeline.vue";
|
|
104
|
+
|
|
105
|
+
import MultimediaVideo from "./multimedia/video.vue";
|
|
106
|
+
|
|
107
|
+
import AlertBanner from "./banners/alert.vue";
|
|
108
|
+
import SelectBanner from "./banners/select.vue";
|
|
109
|
+
|
|
110
|
+
import LineChart from "./charts/line.vue";
|
|
111
|
+
import ColumnChart from "./charts/column.vue";
|
|
112
|
+
import PieChart from "./charts/pie.vue";
|
|
113
|
+
|
|
114
|
+
import ShareButton from "./shareButton.vue";
|
|
115
|
+
|
|
116
|
+
import { getCurrentInstance } from 'vue';
|
|
121
117
|
|
|
122
118
|
export default {
|
|
123
119
|
components: {
|
|
@@ -157,7 +153,7 @@ export default {
|
|
|
157
153
|
"fields-submit": SubmitField,
|
|
158
154
|
"fields-textarea": TextAreaField,
|
|
159
155
|
"fields-richText": RichTextField,
|
|
160
|
-
"fields-newRichText": NewRichTextField,
|
|
156
|
+
// "fields-newRichText": NewRichTextField,
|
|
161
157
|
"fields-file": FileField,
|
|
162
158
|
"fields-autocomplete": AutocompleteField,
|
|
163
159
|
"fields-select": SelectField,
|
|
@@ -179,6 +175,7 @@ export default {
|
|
|
179
175
|
"fields-rating": RatingField,
|
|
180
176
|
"fields-phone": PhoneField,
|
|
181
177
|
"fields-timer": TimerField,
|
|
178
|
+
"fields-otp": OtpField,
|
|
182
179
|
|
|
183
180
|
"panels-scroll": ScrollPanel,
|
|
184
181
|
"panels-vertical": VerticalPanel,
|
|
@@ -204,14 +201,14 @@ export default {
|
|
|
204
201
|
|
|
205
202
|
"charts-line": LineChart,
|
|
206
203
|
"charts-column": ColumnChart,
|
|
207
|
-
"charts-pie": PieChart
|
|
204
|
+
"charts-pie": PieChart,
|
|
208
205
|
},
|
|
209
206
|
props: {
|
|
210
|
-
spec: { type: Object, required: true }
|
|
207
|
+
spec: { type: Object, required: true },
|
|
211
208
|
},
|
|
212
209
|
data() {
|
|
213
210
|
return {
|
|
214
|
-
name: null
|
|
211
|
+
name: null,
|
|
215
212
|
};
|
|
216
213
|
},
|
|
217
214
|
beforeUpdate() {
|
|
@@ -228,15 +225,15 @@ export default {
|
|
|
228
225
|
if (strict) {
|
|
229
226
|
this.name = name;
|
|
230
227
|
} else {
|
|
231
|
-
if (
|
|
228
|
+
if (getCurrentInstance().appContext.app.components[name]) {
|
|
232
229
|
this.name = name;
|
|
233
230
|
}
|
|
234
231
|
}
|
|
235
232
|
},
|
|
236
233
|
$registryEnabled() {
|
|
237
234
|
return false;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
235
|
+
},
|
|
236
|
+
},
|
|
240
237
|
};
|
|
241
238
|
</script>
|
|
242
239
|
|
package/components/datetime.vue
CHANGED
|
File without changes
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="$styles()" :class="classes()">
|
|
3
3
|
<!-- See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for why we need to use `pattern` -->
|
|
4
|
-
<v-text-field
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
:hint="spec.hint"
|
|
10
|
-
:type="type"
|
|
11
|
-
:readonly="spec.readOnly || false"
|
|
12
|
-
:disabled="spec.readOnly"
|
|
13
|
-
:min="$sanitizeValue(spec.min)"
|
|
14
|
-
:max="$sanitizeValue(spec.max)"
|
|
15
|
-
:pattern="pattern"
|
|
16
|
-
:rules="$validation()"
|
|
17
|
-
:outlined="$classes().includes('outlined')"
|
|
18
|
-
:style="$styles()"
|
|
19
|
-
:dense="$classes().includes('dense')"
|
|
20
|
-
clearable
|
|
21
|
-
@input="onChange"
|
|
22
|
-
/>
|
|
4
|
+
<v-text-field v-model="fieldModel" :name="fieldName" :label="spec.label" :value="spec.value" :hint="spec.hint"
|
|
5
|
+
:type="type" :readonly="spec.readOnly || false" :disabled="spec.readOnly" :min="$sanitizeValue(spec.min)"
|
|
6
|
+
:max="$sanitizeValue(spec.max)" :pattern="pattern" :rules="$validation()"
|
|
7
|
+
:outlined="$classes().includes('outlined') || null" :style="$styles()" :dense="$classes().includes('dense') || null"
|
|
8
|
+
clearable @input="onChange" />
|
|
23
9
|
</div>
|
|
24
10
|
</template>
|
|
25
11
|
|
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="$styles()" :class="classes()">
|
|
3
|
-
<v-autocomplete
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
:deletable-chips="spec.multiple"
|
|
9
|
-
:multiple="spec.multiple"
|
|
10
|
-
:disabled="spec.readOnly"
|
|
11
|
-
:clearable="!spec.readOnly"
|
|
12
|
-
:hint="spec.hint"
|
|
13
|
-
:placeholder="spec.placeholder"
|
|
14
|
-
:rules="rules"
|
|
15
|
-
validate-on-blur
|
|
16
|
-
persistent-hint
|
|
17
|
-
:class="$classes()"
|
|
18
|
-
:dense="$classes().includes('dense')"
|
|
19
|
-
:outlined="$classes().includes('outlined')"
|
|
20
|
-
:append-icon="append.icon"
|
|
21
|
-
@change="onChange"
|
|
22
|
-
/>
|
|
3
|
+
<v-autocomplete v-model="fieldModel" :label="spec.label" :items="options || []" :chips="spec.multiple"
|
|
4
|
+
:deletable-chips="spec.multiple" :multiple="spec.multiple" :disabled="spec.readOnly" :clearable="!spec.readOnly"
|
|
5
|
+
:hint="spec.hint" :placeholder="spec.placeholder" :rules="rules" validate-on-blur persistent-hint
|
|
6
|
+
:class="$classes()" :dense="$classes().includes('dense') || null"
|
|
7
|
+
:outlined="$classes().includes('outlined') || null" :append-icon="append.icon" @change="onChange" />
|
|
23
8
|
|
|
24
|
-
<input
|
|
25
|
-
v-for="(item, index) in values"
|
|
26
|
-
:key="index"
|
|
27
|
-
type="hidden"
|
|
28
|
-
:name="fieldName"
|
|
29
|
-
:value="item"
|
|
30
|
-
/>
|
|
9
|
+
<input v-for="(item, index) in values" :key="index" type="hidden" :name="fieldName" :value="item" />
|
|
31
10
|
</div>
|
|
32
11
|
</template>
|
|
33
12
|
|
|
@@ -71,7 +50,7 @@ export default {
|
|
|
71
50
|
case "divider":
|
|
72
51
|
return { divider: true };
|
|
73
52
|
default:
|
|
74
|
-
return i;
|
|
53
|
+
return { 'title': i.text, 'value': i.value };
|
|
75
54
|
}
|
|
76
55
|
});
|
|
77
56
|
},
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
<!-- TODO: Remove (deprecated) -->
|
|
2
2
|
<template>
|
|
3
3
|
<div :style="genericStyles()">
|
|
4
|
-
<v-combobox
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
:chips="spec.multiple"
|
|
9
|
-
:deletable-chips="spec.multiple"
|
|
10
|
-
:multiple="spec.multiple"
|
|
11
|
-
:readonly="spec.readOnly"
|
|
12
|
-
:disabled="spec.readOnly"
|
|
13
|
-
:hint="spec.hint"
|
|
14
|
-
:placeholder="spec.placeholder"
|
|
15
|
-
:outlined="$classes().includes('outlined')"
|
|
16
|
-
:append-icon="append.icon"
|
|
17
|
-
/>
|
|
4
|
+
<v-combobox v-model="fieldModel" :label="spec.label" :items="options" :chips="spec.multiple"
|
|
5
|
+
:deletable-chips="spec.multiple" :multiple="spec.multiple" :readonly="spec.readOnly" :disabled="spec.readOnly"
|
|
6
|
+
:hint="spec.hint" :placeholder="spec.placeholder" :outlined="$classes().includes('outlined') || null"
|
|
7
|
+
:append-icon="append.icon" />
|
|
18
8
|
|
|
19
|
-
<input
|
|
20
|
-
v-for="(item, index) in values"
|
|
21
|
-
:key="index"
|
|
22
|
-
type="hidden"
|
|
23
|
-
:name="fieldName"
|
|
24
|
-
:value="item"
|
|
25
|
-
/>
|
|
9
|
+
<input v-for="(item, index) in values" :key="index" type="hidden" :name="fieldName" :value="item" />
|
|
26
10
|
</div>
|
|
27
11
|
</template>
|
|
28
12
|
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
:class="$classes()"
|
|
4
|
+
:style="$styles()"
|
|
5
|
+
>
|
|
3
6
|
<!-- This hidden field should always be there to make sure the submitted param is not empty,
|
|
4
7
|
which could cause "Not accessible" error on the server. -->
|
|
5
|
-
<input
|
|
8
|
+
<input
|
|
9
|
+
v-model="uncheckValue"
|
|
10
|
+
type="hidden"
|
|
11
|
+
:name="fieldName"
|
|
12
|
+
/>
|
|
6
13
|
<v-checkbox
|
|
7
14
|
v-model="fieldModel"
|
|
8
15
|
:name="fieldName"
|
|
9
16
|
:disabled="spec.readOnly"
|
|
10
|
-
:value="spec.checkValue"
|
|
11
17
|
:label="fieldModel ? spec.onLabel || spec.label : spec.label"
|
|
12
18
|
:on-icon="spec.onIcon"
|
|
13
19
|
:off-icon="spec.offIcon"
|
|
@@ -20,22 +26,24 @@
|
|
|
20
26
|
<script>
|
|
21
27
|
export default {
|
|
22
28
|
props: {
|
|
23
|
-
spec: { type: Object, required: true }
|
|
29
|
+
spec: { type: Object, required: true },
|
|
24
30
|
},
|
|
25
31
|
data() {
|
|
26
32
|
return {
|
|
27
33
|
groupName: null,
|
|
28
|
-
fieldType: null
|
|
34
|
+
fieldType: null,
|
|
29
35
|
};
|
|
30
36
|
},
|
|
31
37
|
methods: {
|
|
32
38
|
$ready() {
|
|
39
|
+
this.fieldModel = this.checkValue;
|
|
40
|
+
this.uncheckValue = this.spec.uncheckValue;
|
|
33
41
|
this.groupElement = this.$el.closest("[data-component=checkGroup]");
|
|
34
42
|
|
|
35
43
|
let groupName = null;
|
|
36
44
|
this.$type.ifObject(
|
|
37
45
|
this.groupElement,
|
|
38
|
-
val => (groupName = val.getAttribute("name"))
|
|
46
|
+
(val) => (groupName = val.getAttribute("name"))
|
|
39
47
|
);
|
|
40
48
|
|
|
41
49
|
this.fieldName = this.spec.name || groupName;
|
|
@@ -44,7 +52,7 @@ export default {
|
|
|
44
52
|
? this.spec.checkValue
|
|
45
53
|
: this.spec.value;
|
|
46
54
|
|
|
47
|
-
Utils.type.ifArray(this.spec.styleClasses, classes => {
|
|
55
|
+
Utils.type.ifArray(this.spec.styleClasses, (classes) => {
|
|
48
56
|
if (classes.remove("switch")) {
|
|
49
57
|
this.fieldType = "switch";
|
|
50
58
|
}
|
|
@@ -53,7 +61,7 @@ export default {
|
|
|
53
61
|
changed(event) {
|
|
54
62
|
// Execute later to ensure the checkbox's checked state has been updated.
|
|
55
63
|
setTimeout(() => {
|
|
56
|
-
this.$type.ifObject(this.groupElement, val =>
|
|
64
|
+
this.$type.ifObject(this.groupElement, (val) =>
|
|
57
65
|
val.dispatchEvent(new Event("change"))
|
|
58
66
|
);
|
|
59
67
|
}, 100);
|
|
@@ -64,7 +72,7 @@ export default {
|
|
|
64
72
|
// }, 200);
|
|
65
73
|
// }
|
|
66
74
|
|
|
67
|
-
Utils.type.ifObject(this.spec.onChange, onChange => {
|
|
75
|
+
Utils.type.ifObject(this.spec.onChange, (onChange) => {
|
|
68
76
|
this.$nextTick(() => {
|
|
69
77
|
GLib.action.execute(onChange, this);
|
|
70
78
|
});
|
|
@@ -75,8 +83,8 @@ export default {
|
|
|
75
83
|
return val;
|
|
76
84
|
}
|
|
77
85
|
return this.spec.uncheckValue;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
80
88
|
};
|
|
81
89
|
</script>
|
|
82
90
|
|
|
File without changes
|
|
@@ -19,32 +19,14 @@
|
|
|
19
19
|
:value="regionField.value"
|
|
20
20
|
/>-->
|
|
21
21
|
|
|
22
|
-
<v-autocomplete
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
:name="spec.name"
|
|
26
|
-
:items="countryOptions"
|
|
27
|
-
:readonly="spec.readOnly"
|
|
28
|
-
:disabled="spec.readOnly"
|
|
29
|
-
:clearable="!spec.readOnly"
|
|
30
|
-
:hint="spec.hint"
|
|
31
|
-
persistent-hint
|
|
32
|
-
:outlined="$classes().includes('outlined')"
|
|
33
|
-
/>
|
|
22
|
+
<v-autocomplete v-model="country" :label="spec.label" :name="spec.name" :items="countryOptions"
|
|
23
|
+
:readonly="spec.readOnly" :disabled="spec.readOnly" :clearable="!spec.readOnly" :hint="spec.hint" persistent-hint
|
|
24
|
+
:outlined="$classes().includes('outlined') || null" />
|
|
34
25
|
|
|
35
|
-
<v-autocomplete
|
|
36
|
-
|
|
37
|
-
:
|
|
38
|
-
:
|
|
39
|
-
:value="regionField.value"
|
|
40
|
-
:items="regionOptions"
|
|
41
|
-
:readonly="regionField.readOnly"
|
|
42
|
-
:disabled="regionField.readOnly"
|
|
43
|
-
:clearable="!regionField.readOnly"
|
|
44
|
-
:hint="regionField.hint"
|
|
45
|
-
persistent-hint
|
|
46
|
-
:outlined="$classes().includes('outlined')"
|
|
47
|
-
/>
|
|
26
|
+
<v-autocomplete v-if="regionField && regionOptions" :label="regionField.label" :name="regionField.name"
|
|
27
|
+
:value="regionField.value" :items="regionOptions" :readonly="regionField.readOnly" :disabled="regionField.readOnly"
|
|
28
|
+
:clearable="!regionField.readOnly" :hint="regionField.hint" persistent-hint
|
|
29
|
+
:outlined="$classes().includes('outlined') || null" />
|
|
48
30
|
</div>
|
|
49
31
|
</template>
|
|
50
32
|
|
|
@@ -63,10 +45,10 @@ export default {
|
|
|
63
45
|
};
|
|
64
46
|
},
|
|
65
47
|
computed: {
|
|
66
|
-
regionField: function() {
|
|
48
|
+
regionField: function () {
|
|
67
49
|
return this.spec.region;
|
|
68
50
|
},
|
|
69
|
-
regionOptions: function() {
|
|
51
|
+
regionOptions: function () {
|
|
70
52
|
return regions[this.country];
|
|
71
53
|
}
|
|
72
54
|
},
|
|
File without changes
|
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
import PatternTextField from "./_patternText";
|
|
12
|
+
import PatternTextField from "./_patternText.vue";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
components: {
|
|
16
16
|
// Need to start with `fields-` to enable jsonlogic in `styles.js#_linkFieldModels`
|
|
17
|
-
"fields-patternText": PatternTextField
|
|
17
|
+
"fields-patternText": PatternTextField,
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
20
|
-
spec: { type: Object, required: true }
|
|
20
|
+
spec: { type: Object, required: true },
|
|
21
21
|
},
|
|
22
22
|
methods: {
|
|
23
23
|
action_merge(mergedSpec) {
|
|
24
24
|
Object.assign(this.spec, mergedSpec);
|
|
25
25
|
this.$refs.delegate.updateData();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
28
|
};
|
|
29
29
|
</script>
|
|
30
30
|
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import PatternTextField from "./_patternText";
|
|
25
|
+
import PatternTextField from "./_patternText.vue";
|
|
26
26
|
|
|
27
27
|
export default {
|
|
28
28
|
components: {
|
|
29
29
|
// Need to start with `fields-` to enable jsonlogic in `styles.js#_linkFieldModels`
|
|
30
|
-
"fields-patternText": PatternTextField
|
|
30
|
+
"fields-patternText": PatternTextField,
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
|
-
spec: { type: Object, required: true }
|
|
33
|
+
spec: { type: Object, required: true },
|
|
34
34
|
},
|
|
35
35
|
data() {
|
|
36
36
|
return {
|
|
37
|
-
value: null
|
|
37
|
+
value: null,
|
|
38
38
|
};
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
40
|
// methods: {
|
|
41
41
|
// $ready() {
|
|
42
42
|
// this.value = this.spec.value.slice(0, 16);
|
|
@@ -1,42 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="genericStyles()">
|
|
3
|
-
<v-autocomplete
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:items="allItems"
|
|
7
|
-
:loading="$isBusy"
|
|
8
|
-
:search-input.sync="search"
|
|
9
|
-
:label="spec.label"
|
|
10
|
-
hide-no-data
|
|
11
|
-
hide-selected
|
|
12
|
-
no-filter
|
|
13
|
-
return-object
|
|
14
|
-
:chips="true"
|
|
15
|
-
:deletable-chips="true"
|
|
16
|
-
:multiple="spec.multiple"
|
|
17
|
-
>
|
|
3
|
+
<v-autocomplete ref="autocomplete" v-model="model" :items="allItems" :loading="$isBusy" :v-model:search-input="search"
|
|
4
|
+
:label="spec.label" hide-no-data hide-selected no-filter return-object :chips="true" :deletable-chips="true"
|
|
5
|
+
:multiple="spec.multiple">
|
|
18
6
|
<template v-slot:item="data">
|
|
19
7
|
{{ data.item.title }} - {{ data.item.subtitle }}
|
|
20
8
|
</template>
|
|
21
9
|
|
|
22
|
-
<v-list-item
|
|
23
|
-
v-if="!$isBusy && nextPageUrl"
|
|
24
|
-
slot="append-item"
|
|
25
|
-
class="load-more"
|
|
26
|
-
>
|
|
10
|
+
<!-- <v-list-item v-if="!$isBusy && nextPageUrl" slot="append-item" class="load-more">
|
|
27
11
|
<v-list-item-content class="text-content" @click="loadMore">
|
|
28
12
|
<v-list-item-title>Load More</v-list-item-title>
|
|
29
13
|
</v-list-item-content>
|
|
30
|
-
</v-list-item>
|
|
14
|
+
</v-list-item> -->
|
|
31
15
|
</v-autocomplete>
|
|
32
16
|
|
|
33
|
-
<input
|
|
34
|
-
v-for="(item, index) in values"
|
|
35
|
-
:key="index"
|
|
36
|
-
type="hidden"
|
|
37
|
-
:name="spec.name"
|
|
38
|
-
:value="item.value"
|
|
39
|
-
/>
|
|
17
|
+
<input v-for="(item, index) in values" :key="index" type="hidden" :name="spec.name" :value="item.value" />
|
|
40
18
|
</div>
|
|
41
19
|
</template>
|
|
42
20
|
|
|
@@ -155,7 +133,7 @@ export default {
|
|
|
155
133
|
return data.rows.map(row => {
|
|
156
134
|
const extra = row.extra;
|
|
157
135
|
row.value = extra.value;
|
|
158
|
-
row.
|
|
136
|
+
row.title = extra.text;
|
|
159
137
|
return row;
|
|
160
138
|
});
|
|
161
139
|
}
|
|
@@ -167,6 +145,7 @@ export default {
|
|
|
167
145
|
.load-more {
|
|
168
146
|
cursor: pointer;
|
|
169
147
|
}
|
|
148
|
+
|
|
170
149
|
.load-more:hover {
|
|
171
150
|
background-color: lightgray;
|
|
172
151
|
}
|