glib-web 3.3.0 → 3.4.0
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/actions/auth/creditCard.js +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/commands/copy.js +0 -0
- package/actions/dialogs/alert.js +1 -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/get.js +1 -1
- package/actions/http/patch.js +0 -0
- package/actions/http/post.js +0 -0
- package/actions/http/put.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/windows/close.js +0 -0
- package/actions/windows/closeAll.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/reload.js +0 -0
- package/components/_message.vue +0 -0
- package/components/calendar.vue +0 -0
- package/components/component.vue +4 -4
- package/components/composable/conditional.js +11 -0
- package/components/fab.vue +0 -0
- package/components/fields/_otp.vue +2 -1
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/regions.js +0 -0
- package/components/fields/creditCard.vue +0 -0
- package/components/fields/googlePlace.vue +0 -0
- package/components/fields/location.vue +20 -52
- package/components/fields/phone/countries.js +0 -0
- package/components/fields/phone/sprite.css +0 -0
- package/components/fields/stripeToken.vue +0 -0
- 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/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 +10 -2
- package/components/mixins/extension.js +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +26 -51
- 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/multimedia/video.vue +0 -0
- package/components/panels/carousel.vue +0 -0
- package/components/panels/web.vue +0 -0
- package/components/spacer.vue +0 -0
- package/index.js +24 -17
- package/keys.js +0 -0
- package/nav/dialog.vue +18 -18
- package/nav/drawer.vue +8 -2
- package/nav/snackbar.vue +16 -29
- package/package.json +3 -4
- 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.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/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/helper.js +0 -0
- package/utils/http.js +12 -12
- package/utils/launch.js +30 -29
- package/utils/type.js +0 -0
package/LICENSE
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/auth/restart.js
CHANGED
|
File without changes
|
package/actions/commands/copy.js
CHANGED
|
File without changes
|
package/actions/dialogs/alert.js
CHANGED
package/actions/dialogs/close.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/dialogs/oauth.js
CHANGED
|
File without changes
|
package/actions/dialogs/open.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/actions/dialogs/show.js
CHANGED
|
File without changes
|
package/actions/http/delete.js
CHANGED
|
File without changes
|
package/actions/http/get.js
CHANGED
|
@@ -22,7 +22,7 @@ export default class {
|
|
|
22
22
|
Utils.type.ifString(spec.historyUrl, historyUrl => {
|
|
23
23
|
const cleanUrl = Utils.url.htmlUrl(historyUrl);
|
|
24
24
|
if (cleanUrl !== currentUrl) {
|
|
25
|
-
const data = Object.assign({},
|
|
25
|
+
const data = Object.assign({}, page, {
|
|
26
26
|
replayGetResponse: page.onResponse
|
|
27
27
|
});
|
|
28
28
|
|
package/actions/http/patch.js
CHANGED
|
File without changes
|
package/actions/http/post.js
CHANGED
|
File without changes
|
package/actions/http/put.js
CHANGED
|
File without changes
|
package/actions/runMultiple.js
CHANGED
|
File without changes
|
package/actions/sheets/select.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/actions/timeouts/set.js
CHANGED
|
File without changes
|
package/actions/windows/close.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/windows/open.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/windows/print.js
CHANGED
|
File without changes
|
|
File without changes
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/calendar.vue
CHANGED
|
File without changes
|
package/components/component.vue
CHANGED
|
@@ -148,7 +148,7 @@ export default {
|
|
|
148
148
|
"views-hr": Hr,
|
|
149
149
|
"views-spacer": Spacer,
|
|
150
150
|
|
|
151
|
-
"views-map": Map,
|
|
151
|
+
// "views-map": Map,
|
|
152
152
|
"views-tabBar": TabBar,
|
|
153
153
|
"views-calendar": Calendar,
|
|
154
154
|
"views-shareButton": ShareButton,
|
|
@@ -221,10 +221,10 @@ export default {
|
|
|
221
221
|
},
|
|
222
222
|
computed: {
|
|
223
223
|
menter() {
|
|
224
|
-
return this.spec.onMouseEnter ? 'mouseenter' : null
|
|
224
|
+
return this.spec.onMouseEnter ? 'mouseenter' : null;
|
|
225
225
|
},
|
|
226
226
|
mleave() {
|
|
227
|
-
return this.spec.onMouseLeave ? 'mouseleave' : null
|
|
227
|
+
return this.spec.onMouseLeave ? 'mouseleave' : null;
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
watch: {
|
|
@@ -275,7 +275,7 @@ export default {
|
|
|
275
275
|
return false;
|
|
276
276
|
},
|
|
277
277
|
handlePopover(spec) {
|
|
278
|
-
GLib.action.execute(spec, this)
|
|
278
|
+
GLib.action.execute(spec, this);
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
281
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { reactive, watchEffect } from "vue";
|
|
2
|
+
import jsonLogic from 'json-logic-js';
|
|
3
|
+
|
|
4
|
+
const fieldModels = reactive({});
|
|
5
|
+
|
|
6
|
+
const watchFieldModels = (logic, cb) => watchEffect(() => {
|
|
7
|
+
const value = jsonLogic.apply(logic, fieldModels);
|
|
8
|
+
cb(value);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { fieldModels, watchFieldModels };
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<label class="hint">{{ spec.hint }}</label>
|
|
9
9
|
</div>
|
|
10
10
|
<div v-else>
|
|
11
|
-
<input v-for="(digit, index) in digits"
|
|
11
|
+
<input v-for="(digit, index) in digits" :key="index" ref="input" :value="val[index]" type="number"
|
|
12
12
|
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
|
|
13
13
|
maxlength="1" class="otp-input" @input="handleInput($event, index)" @keydown="handleKeydown($event, index)"
|
|
14
14
|
@paste="handlePaste($event, index)" @focus="handleFocus($event, index)" @blur="handleBlur($event, index)"
|
|
@@ -76,6 +76,7 @@ export default {
|
|
|
76
76
|
if (event.target.value.length === 1) {
|
|
77
77
|
this.focusNext(index);
|
|
78
78
|
}
|
|
79
|
+
this.val[index] = event.target.value;
|
|
79
80
|
this.fieldModel = this.otp.join("");
|
|
80
81
|
},
|
|
81
82
|
handleKeydown(event, index) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,62 +4,29 @@
|
|
|
4
4
|
It's safer to manually implement styling than adding another dependency such as vuetify-google-autocomplete,
|
|
5
5
|
which behaves differently and needs to be actively maintained.
|
|
6
6
|
-->
|
|
7
|
-
<div
|
|
8
|
-
class="v-input theme--light v-text-field v-text-field--enclosed v-text-field--outlined"
|
|
9
|
-
>
|
|
7
|
+
<div class="v-input theme--light v-text-field v-text-field--enclosed v-text-field--outlined">
|
|
10
8
|
<div class="v-input__control">
|
|
11
9
|
<div class="v-input__slot">
|
|
12
10
|
<fieldset aria-hidden="true">
|
|
13
11
|
<legend :style="`width: ${labelWidth}px;`"><span></span></legend>
|
|
14
12
|
</fieldset>
|
|
15
13
|
<div class="v-text-field__slot">
|
|
16
|
-
<label
|
|
17
|
-
|
|
18
|
-
class="v-label v-label--active theme--light"
|
|
19
|
-
style="left: 0px; right: auto; position: absolute; font-size: 16px;"
|
|
20
|
-
>{{ spec.label }}</label
|
|
21
|
-
>
|
|
14
|
+
<label ref="label" class="v-label v-label--active theme--light"
|
|
15
|
+
style="left: 0px; right: auto; position: absolute; font-size: 16px;">{{ spec.label }}</label>
|
|
22
16
|
<!-- See https://developers.google.com/places/web-service/autocomplete#place_types for autocompleteOptions -->
|
|
23
|
-
<gmap-autocomplete
|
|
24
|
-
:
|
|
25
|
-
:placeholder="spec.placeholder"
|
|
26
|
-
:value="address"
|
|
27
|
-
:options="spec.autocompleteOptions"
|
|
28
|
-
@input="onAddressChanged"
|
|
29
|
-
@place_changed="onPlaceChanged"
|
|
30
|
-
/>
|
|
17
|
+
<gmap-autocomplete :name="spec.name" :placeholder="spec.placeholder" :value="address"
|
|
18
|
+
:options="spec.autocompleteOptions" @input="onAddressChanged" @place_changed="onPlaceChanged" />
|
|
31
19
|
</div>
|
|
32
20
|
</div>
|
|
33
21
|
</div>
|
|
34
22
|
</div>
|
|
35
23
|
|
|
36
|
-
<gmap-map
|
|
37
|
-
|
|
38
|
-
:
|
|
39
|
-
:zoom="13"
|
|
40
|
-
class="mt-3 mb-3 map"
|
|
41
|
-
map-type-id="roadmap"
|
|
42
|
-
:style="mapStyles"
|
|
43
|
-
@idle="onActionCompleted"
|
|
44
|
-
>
|
|
45
|
-
<gmap-marker
|
|
46
|
-
:position="markerPos"
|
|
47
|
-
:clickable="true"
|
|
48
|
-
:draggable="true"
|
|
49
|
-
@drag="onDrag"
|
|
50
|
-
@dragend="onDrag"
|
|
51
|
-
/>
|
|
24
|
+
<gmap-map ref="map" :center="{ lat: 0, lng: 0 }" :zoom="13" class="mt-3 mb-3 map" map-type-id="roadmap"
|
|
25
|
+
:style="mapStyles" @idle="onActionCompleted">
|
|
26
|
+
<gmap-marker :position="markerPos" :clickable="true" :draggable="true" @drag="onDrag" @dragend="onDrag" />
|
|
52
27
|
</gmap-map>
|
|
53
|
-
<glib-component
|
|
54
|
-
|
|
55
|
-
ref="latitudeView"
|
|
56
|
-
:spec="latitudeField"
|
|
57
|
-
/>
|
|
58
|
-
<glib-component
|
|
59
|
-
v-if="longitudeField"
|
|
60
|
-
ref="longitudeView"
|
|
61
|
-
:spec="longitudeField"
|
|
62
|
-
/>
|
|
28
|
+
<glib-component v-if="latitudeField" ref="latitudeView" :spec="latitudeField" />
|
|
29
|
+
<glib-component v-if="longitudeField" ref="longitudeView" :spec="longitudeField" />
|
|
63
30
|
<glib-component v-if="zoomField" ref="zoomView" :spec="zoomField" />
|
|
64
31
|
</v-container>
|
|
65
32
|
</template>
|
|
@@ -97,8 +64,8 @@ export default {
|
|
|
97
64
|
mapStyles() {
|
|
98
65
|
return this.longitude != null && this.latitude != null
|
|
99
66
|
? {
|
|
100
|
-
|
|
101
|
-
|
|
67
|
+
display: "block"
|
|
68
|
+
}
|
|
102
69
|
: { display: "none" };
|
|
103
70
|
}
|
|
104
71
|
},
|
|
@@ -112,11 +79,11 @@ export default {
|
|
|
112
79
|
this.centerInitial();
|
|
113
80
|
|
|
114
81
|
setTimeout(() => {
|
|
115
|
-
this.latitudeView = this.$refs.latitudeView
|
|
116
|
-
this.longitudeView = this.$refs.longitudeView
|
|
82
|
+
this.latitudeView = this.$refs.latitudeView;
|
|
83
|
+
this.longitudeView = this.$refs.longitudeView;
|
|
117
84
|
|
|
118
85
|
if (this.$refs.zoomView) {
|
|
119
|
-
this.zoomView = this.$refs.zoomView
|
|
86
|
+
this.zoomView = this.$refs.zoomView;
|
|
120
87
|
}
|
|
121
88
|
|
|
122
89
|
const labelView = this.$refs.label;
|
|
@@ -139,10 +106,10 @@ export default {
|
|
|
139
106
|
}
|
|
140
107
|
},
|
|
141
108
|
setLocation(latitudeValue, longitudeValue, dropPin) {
|
|
142
|
-
this.$
|
|
109
|
+
this.$gmapApiPromiseLazy().then(() => {
|
|
143
110
|
// eslint-disable-next-line no-undef
|
|
144
111
|
const location = new google.maps.LatLng(latitudeValue, longitudeValue);
|
|
145
|
-
this.$refs.map
|
|
112
|
+
this.$refs.map.mapInstance.setCenter(location);
|
|
146
113
|
|
|
147
114
|
if (dropPin) {
|
|
148
115
|
this.setMarkerPosition(location);
|
|
@@ -161,14 +128,15 @@ export default {
|
|
|
161
128
|
|
|
162
129
|
const location = place.geometry.location;
|
|
163
130
|
this.setMarkerPosition(location);
|
|
164
|
-
|
|
131
|
+
|
|
132
|
+
this.$refs.map.mapInstance.setCenter(location);
|
|
165
133
|
},
|
|
166
134
|
onDrag(e) {
|
|
167
135
|
this.setMarkerPosition(e.latLng);
|
|
168
136
|
},
|
|
169
137
|
onActionCompleted() {
|
|
170
138
|
if (this.zoomView) {
|
|
171
|
-
this.zoomView.fieldModel = this.$refs.map
|
|
139
|
+
this.zoomView.fieldModel = this.$refs.map.mapInstance.zoom;
|
|
172
140
|
}
|
|
173
141
|
},
|
|
174
142
|
onAddressChanged(e) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/h1.vue
CHANGED
|
File without changes
|
package/components/h2.vue
CHANGED
|
File without changes
|
package/components/h3.vue
CHANGED
|
File without changes
|
package/components/h5.vue
CHANGED
|
File without changes
|
package/components/h6.vue
CHANGED
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
package/components/icon.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -28,6 +28,14 @@ export default {
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
created() {
|
|
31
|
+
// watch components/update
|
|
32
|
+
if (this.spec) {
|
|
33
|
+
this.$watch(
|
|
34
|
+
() => Object.keys(this.spec).map((specKey) => this.spec[specKey]),
|
|
35
|
+
() => this._ready()
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
this.$created();
|
|
32
40
|
},
|
|
33
41
|
mounted() {
|
|
@@ -37,7 +45,7 @@ export default {
|
|
|
37
45
|
},
|
|
38
46
|
beforeUpdate() {
|
|
39
47
|
if (vueApp.isStale) {
|
|
40
|
-
this._mountedUrl = null
|
|
48
|
+
this._mountedUrl = null;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
if (!this._renderingTheSamePage()) {
|
|
@@ -69,7 +77,7 @@ export default {
|
|
|
69
77
|
return UrlUtils.htmlUrl(onClick.url);
|
|
70
78
|
}
|
|
71
79
|
}
|
|
72
|
-
return
|
|
80
|
+
return '';
|
|
73
81
|
},
|
|
74
82
|
$onClick: function (explicitEvent, spec) {
|
|
75
83
|
const properties = spec || this.spec;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,56 +1,34 @@
|
|
|
1
1
|
import { vueApp } from "../../store";
|
|
2
2
|
import Hash from "../../utils/hash";
|
|
3
|
+
import { fieldModels, watchFieldModels } from "../composable/conditional";
|
|
3
4
|
|
|
4
|
-
import jsonLogic from 'json-logic-js';
|
|
5
|
-
|
|
6
|
-
// jsonLogic.add_operation("add_ms", function(a, b) {
|
|
7
|
-
// if (Utils.type.isString(a)) {
|
|
8
|
-
// const newValue = new Date(new Date(a).getTime() + b * 1000);
|
|
9
|
-
// return newValue.toISOString();
|
|
10
|
-
// }
|
|
11
|
-
// return null;
|
|
12
|
-
// });
|
|
13
5
|
export default {
|
|
14
6
|
data: function () {
|
|
15
7
|
return {
|
|
16
|
-
_fieldModels: {},
|
|
17
8
|
fieldName: null,
|
|
18
9
|
fieldModel: null,
|
|
19
|
-
|
|
10
|
+
_show: true,
|
|
20
11
|
// Some components do not support null or empty string value, so we need to use an intermediary value.
|
|
21
12
|
// See https://github.com/vuetifyjs/vuetify/issues/8876
|
|
22
13
|
vuetifyEmptyString: "<EMPTY_STRING>"
|
|
23
14
|
};
|
|
24
15
|
},
|
|
25
|
-
computed: {
|
|
26
|
-
display() {
|
|
27
|
-
const conditions = this.spec.showIf;
|
|
28
|
-
if (conditions) {
|
|
29
|
-
return jsonLogic.apply(conditions, this.$data._fieldModels)
|
|
30
|
-
? this.$displayValue()
|
|
31
|
-
: "none";
|
|
32
|
-
} else {
|
|
33
|
-
return this.$displayValue();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
16
|
watch: {
|
|
38
17
|
fieldModel: function (val, oldVal) {
|
|
39
18
|
if (val === this.vuetifyEmptyString) {
|
|
40
19
|
val = "";
|
|
41
20
|
}
|
|
42
21
|
|
|
43
|
-
|
|
44
|
-
Object.assign(this.$data._fieldModels, { [this.fieldName]: this.$internalizeValue(val) })
|
|
22
|
+
Object.assign(fieldModels, { [this.fieldName]: this.$internalizeValue(val) });
|
|
45
23
|
|
|
46
24
|
this._checkDirtyState(val, oldVal);
|
|
47
25
|
},
|
|
48
26
|
spec: {
|
|
49
27
|
handler(spec, oldSpec) {
|
|
50
28
|
if (spec) {
|
|
51
|
-
let valueChanged = true
|
|
29
|
+
let valueChanged = true;
|
|
52
30
|
if (oldSpec && oldSpec.value === spec.value) {
|
|
53
|
-
valueChanged = false
|
|
31
|
+
valueChanged = false;
|
|
54
32
|
}
|
|
55
33
|
this._linkFieldModels(valueChanged);
|
|
56
34
|
}
|
|
@@ -58,6 +36,22 @@ export default {
|
|
|
58
36
|
immediate: true
|
|
59
37
|
}
|
|
60
38
|
},
|
|
39
|
+
// watch showIf and valueIf
|
|
40
|
+
mounted() {
|
|
41
|
+
if (this.spec && this.spec.valueIf) {
|
|
42
|
+
watchFieldModels(this.spec.valueIf, (value) => this.fieldModel = this.$sanitizeValue(this.$externalizeValue(value)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (this.spec && this.spec.showIf) {
|
|
46
|
+
watchFieldModels(this.spec.showIf, (value) => {
|
|
47
|
+
if (value) {
|
|
48
|
+
this._show = true;
|
|
49
|
+
} else {
|
|
50
|
+
this._show = false;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
},
|
|
61
55
|
methods: {
|
|
62
56
|
// TODO: Deprecated
|
|
63
57
|
genericStyles(spec) {
|
|
@@ -132,13 +126,11 @@ export default {
|
|
|
132
126
|
val => (styles["height"] = val)
|
|
133
127
|
);
|
|
134
128
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// This is the main reason styles have to be used in a dynamic way.
|
|
141
|
-
this._updateDisplay(styles, properties);
|
|
129
|
+
if (this._show) {
|
|
130
|
+
styles['display'] = this.$displayValue();
|
|
131
|
+
} else {
|
|
132
|
+
styles['display'] = 'none';
|
|
133
|
+
}
|
|
142
134
|
|
|
143
135
|
return new Hash(styles);
|
|
144
136
|
},
|
|
@@ -166,18 +158,6 @@ export default {
|
|
|
166
158
|
// });
|
|
167
159
|
// return color;
|
|
168
160
|
// },
|
|
169
|
-
_updateDisplay(styles, properties) {
|
|
170
|
-
Utils.type.ifObject(
|
|
171
|
-
properties.showIf,
|
|
172
|
-
() => {
|
|
173
|
-
styles["display"] = this.display
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
Utils.type.ifObject(properties.valueIf, logic => {
|
|
177
|
-
const newValue = jsonLogic.apply(logic, this.$data._fieldModels);
|
|
178
|
-
this.fieldModel = this._sanitizeValue(this.$externalizeValue(newValue));
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
161
|
$displayValue() {
|
|
182
162
|
// return "block"; Deprecated because it causes problems for multiple rows components
|
|
183
163
|
// return "inherit"; // To be overridden
|
|
@@ -204,11 +184,6 @@ export default {
|
|
|
204
184
|
|
|
205
185
|
const isField = name && name.startsWith("fields-");
|
|
206
186
|
if (hasCondition || isField) {
|
|
207
|
-
const form = this.$closest("panels-form");
|
|
208
|
-
if (form != null) {
|
|
209
|
-
this.$data._fieldModels = form.$data._fieldModels;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
187
|
// Has to be executed before $ready(). This executes regardless of whether a form is found because fields
|
|
213
188
|
// may be used without a form.
|
|
214
189
|
this.fieldName = this.spec.name;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/spacer.vue
CHANGED
|
File without changes
|
package/index.js
CHANGED
|
@@ -7,42 +7,49 @@ import { useTheme } from "vuetify";
|
|
|
7
7
|
import '@vueup/vue-quill/dist/vue-quill.snow.css';
|
|
8
8
|
|
|
9
9
|
// lib for deep merge
|
|
10
|
-
import merge from 'lodash.merge'
|
|
10
|
+
import merge from 'lodash.merge';
|
|
11
11
|
|
|
12
12
|
const Vue = createApp({
|
|
13
13
|
data() {
|
|
14
14
|
return {
|
|
15
15
|
vueApp,
|
|
16
16
|
themeConfig: useTheme()
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
},
|
|
19
19
|
created() {
|
|
20
|
-
this.themeConfig.themes = merge(this.themeConfig.themes, settings.themes)
|
|
20
|
+
this.themeConfig.themes = merge(this.themeConfig.themes, settings.themes);
|
|
21
21
|
},
|
|
22
22
|
render: function () {
|
|
23
23
|
return h(App, { page: this.$data.vueApp.page });
|
|
24
24
|
}
|
|
25
|
-
})
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Vue.use(vuetify);
|
|
29
|
+
|
|
30
|
+
import { GmapVuePlugin, components } from "@gmap-vue/v3";
|
|
31
|
+
Vue.use(GmapVuePlugin, {
|
|
32
|
+
load: {
|
|
33
|
+
key: import.meta.env.GMAPS_API_KEY,
|
|
34
|
+
libraries: "places"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
26
37
|
|
|
38
|
+
const { MapLayer, Autocomplete, Marker } = components;
|
|
39
|
+
Vue.component('gmap-map', MapLayer);
|
|
40
|
+
Vue.component('gmap-marker', Marker);
|
|
41
|
+
Vue.component('gmap-autocomplete', Autocomplete);
|
|
27
42
|
|
|
28
|
-
Vue.use(vuetify)
|
|
29
43
|
|
|
30
|
-
// import * as VueGoogleMaps from "vue2-google-maps";
|
|
31
|
-
// Vue.use(VueGoogleMaps, {
|
|
32
|
-
// load: {
|
|
33
|
-
// key: process.env.GMAPS_API_KEY,
|
|
34
|
-
// libraries: "places"
|
|
35
|
-
// }
|
|
36
|
-
// });
|
|
37
44
|
|
|
38
45
|
import "./styles/test.scss";
|
|
39
46
|
import "./styles/test.sass";
|
|
40
47
|
|
|
41
48
|
|
|
42
|
-
import VueChartkick from 'vue-chartkick'
|
|
43
|
-
import 'chartkick/chart.js'
|
|
49
|
+
import VueChartkick from 'vue-chartkick';
|
|
50
|
+
import 'chartkick/chart.js';
|
|
44
51
|
|
|
45
|
-
Vue.use(VueChartkick)
|
|
52
|
+
Vue.use(VueChartkick);
|
|
46
53
|
|
|
47
54
|
// import VueAnalytics from 'vue-analytics'
|
|
48
55
|
// // TODO: Avoid hardcoding
|
|
@@ -153,10 +160,10 @@ Vue.use(updatableComponent);
|
|
|
153
160
|
import { vueApp } from "./store";
|
|
154
161
|
|
|
155
162
|
document.addEventListener("DOMContentLoaded", () => {
|
|
156
|
-
Vue.mount("#app")
|
|
163
|
+
Vue.mount("#app");
|
|
157
164
|
});
|
|
158
165
|
|
|
159
|
-
export { Vue, settings, vueApp }
|
|
166
|
+
export { Vue, settings, vueApp };
|
|
160
167
|
|
|
161
168
|
// The above code uses Vue without the compiler, which means you cannot
|
|
162
169
|
// use Vue to target elements in your existing html templates. You would
|
package/keys.js
CHANGED
|
File without changes
|