comand-component-library 4.2.23 → 4.2.25
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/dist/comand-component-library.js +1701 -1648
- package/package.json +1 -1
- package/src/components/CmdForm.vue +62 -13
- package/src/components/CmdGoogleMaps.vue +12 -0
package/package.json
CHANGED
@@ -37,11 +37,23 @@
|
|
37
37
|
/>
|
38
38
|
<!-- end loop for formElements -->
|
39
39
|
|
40
|
-
<div v-if="submitButtonOptions && (submitButtonOptions.position === 'insideFieldset' || submitButtonOptions.position === null)" class="flex-container">
|
40
|
+
<div v-if="submitButtonOptions && (submitButtonOptions.position === 'insideFieldset' || submitButtonOptions.position === null)" class="flex-container no-wrap-on-small-devices">
|
41
41
|
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
42
|
+
<!-- begin cancel-button (below fieldset) -->
|
43
|
+
<button
|
44
|
+
v-if="cancelButtonOptions !== undefined"
|
45
|
+
:class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
|
46
|
+
type="button"
|
47
|
+
@click="cancelFormSubmit"
|
48
|
+
>
|
49
|
+
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
50
|
+
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
51
|
+
</button>
|
52
|
+
<!-- end cancel-button (below fieldset) -->
|
53
|
+
|
42
54
|
<!-- begin submit-button (inside fieldset) -->
|
43
55
|
<button
|
44
|
-
:class="['button stretch-on-small-devices',
|
56
|
+
:class="['button', {'stretch-on-small-devices': submitButtonOptions.stretchOnSmallDevices, primary: submitButtonOptions.primary, disabled: submitButtonOptions.disabled}]"
|
45
57
|
:type="submitButtonOptions.type"
|
46
58
|
>
|
47
59
|
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
@@ -51,10 +63,22 @@
|
|
51
63
|
</div>
|
52
64
|
</fieldset>
|
53
65
|
|
54
|
-
<div v-if="submitButtonOptions && submitButtonOptions.position === 'belowFieldset'" class="
|
55
|
-
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
66
|
+
<div v-if="submitButtonOptions && submitButtonOptions.position === 'belowFieldset'" class="flex-container no-wrap-on-small-devices">
|
67
|
+
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
68
|
+
<!-- begin cancel-button (below fieldset) -->
|
69
|
+
<button
|
70
|
+
v-if="cancelButtonOptions !== undefined"
|
71
|
+
:class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
|
72
|
+
type="button"
|
73
|
+
@click="cancelFormSubmit"
|
74
|
+
>
|
75
|
+
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
76
|
+
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
77
|
+
</button>
|
78
|
+
<!-- end cancel-button (below fieldset) -->
|
79
|
+
|
56
80
|
<!-- begin submit-button (below fieldset) -->
|
57
|
-
<button :class="['button stretch-on-small-devices',
|
81
|
+
<button :class="['button', {'stretch-on-small-devices': submitButtonOptions.stretchOnSmallDevices, primary: submitButtonOptions.primary, disabled: submitButtonOptions.disabled}]"
|
58
82
|
:type="submitButtonOptions.type || 'submit'">
|
59
83
|
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
60
84
|
<span v-if="submitButtonOptions.text">{{ submitButtonOptions.text }}</span>
|
@@ -160,20 +184,27 @@ export default {
|
|
160
184
|
useFieldset: {
|
161
185
|
type: Boolean,
|
162
186
|
default: true
|
187
|
+
},
|
188
|
+
/**
|
189
|
+
* text to clarify which inputs are mandatory
|
190
|
+
*/
|
191
|
+
mandatoryText: {
|
192
|
+
type: String,
|
193
|
+
default: "mandatory inputs"
|
163
194
|
},
|
164
195
|
/**
|
165
|
-
*
|
196
|
+
* cancel-button to not submit any form-data
|
166
197
|
*/
|
167
|
-
|
198
|
+
cancelButton: {
|
168
199
|
type: Object,
|
169
200
|
required: false
|
170
201
|
},
|
171
|
-
|
172
|
-
*
|
202
|
+
/**
|
203
|
+
* submit-button to submit all form-data
|
173
204
|
*/
|
174
|
-
|
175
|
-
type:
|
176
|
-
|
205
|
+
submitButton: {
|
206
|
+
type: Object,
|
207
|
+
required: false
|
177
208
|
}
|
178
209
|
},
|
179
210
|
computed: {
|
@@ -185,11 +216,22 @@ export default {
|
|
185
216
|
...this.legend
|
186
217
|
}
|
187
218
|
},
|
219
|
+
cancelButtonOptions() {
|
220
|
+
return {
|
221
|
+
iconClass: "icon-cancel-circle",
|
222
|
+
text: "Cancel",
|
223
|
+
useDefaultStyling: false,
|
224
|
+
stretchOnSmallDevices: false,
|
225
|
+
position: "insideFieldset",
|
226
|
+
...this.cancelButton
|
227
|
+
}
|
228
|
+
},
|
188
229
|
submitButtonOptions() {
|
189
230
|
return {
|
190
|
-
iconClass: "icon-check",
|
231
|
+
iconClass: "icon-check-circle",
|
191
232
|
text: "Submit",
|
192
233
|
type: "submit",
|
234
|
+
stretchOnSmallDevices: false,
|
193
235
|
position: "insideFieldset",
|
194
236
|
primary: true,
|
195
237
|
...this.submitButton
|
@@ -203,6 +245,13 @@ export default {
|
|
203
245
|
this.systemMessage.validationStatus = validationStatus
|
204
246
|
this.systemMessage.message = message
|
205
247
|
},
|
248
|
+
cancelFormSubmit(event) {
|
249
|
+
const isConfirmed = window.confirm("Are you sure you want to cancel the form submit (all entered data will be lost)?");
|
250
|
+
|
251
|
+
if (isConfirmed) {
|
252
|
+
this.$emit("cancel-form-submit", event)
|
253
|
+
}
|
254
|
+
},
|
206
255
|
submitFormData(event) {
|
207
256
|
// fill form-data with names and value
|
208
257
|
let formdata = {}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="cmd-google-maps responsive-wrapper">
|
3
|
+
<!-- begin CmdHeadline -->
|
4
|
+
<CmdHeadline v-bind="cmdHeadline" />
|
5
|
+
<!-- end CmdHeadline-->
|
6
|
+
|
7
|
+
|
3
8
|
<!-- begin CmdSystemMessage -->
|
4
9
|
<CmdSystemMessage v-if="!cookiesAccepted" validationStatus="warning">
|
5
10
|
<p>
|
@@ -53,6 +58,13 @@ export default {
|
|
53
58
|
address: {
|
54
59
|
type: Object,
|
55
60
|
required: true
|
61
|
+
},
|
62
|
+
/**
|
63
|
+
* properties for cmdHeadline-component
|
64
|
+
*/
|
65
|
+
cmdHeadline: {
|
66
|
+
type: Object,
|
67
|
+
required: false
|
56
68
|
}
|
57
69
|
},
|
58
70
|
mounted() {
|