comand-component-library 4.3.2 → 4.3.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/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.js +1583 -1561
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +5 -3
- package/src/assets/data/form-elements.json +3 -1
- package/src/components/CmdForm.vue +30 -1
- package/src/components/CmdFormElement.vue +10 -7
- package/src/components/CmdInputGroup.vue +9 -6
- package/src/components/CmdSiteHeader.vue +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comand-component-library",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"author": "CoManD-UI",
|
|
6
6
|
"private": false,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"clickout-event": "^1.1.2",
|
|
32
|
-
"comand-frontend-framework": "^4.3.
|
|
32
|
+
"comand-frontend-framework": "^4.3.29",
|
|
33
33
|
"comand-ui-iconfonts": "^1.0.19",
|
|
34
34
|
"core-js": "^3.20.1",
|
|
35
35
|
"prismjs": "^1.27.0",
|
package/src/ComponentLibrary.vue
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</template>
|
|
150
150
|
</CmdSidebar>
|
|
151
151
|
<!-- begin site-header ------------------------------------------------------------------------------------------->
|
|
152
|
-
<CmdSiteHeader :sticky="true">
|
|
152
|
+
<CmdSiteHeader :sticky="true" :resizeHeaderOnScroll="true" :cmdCompanyLogo="companyLogoData">
|
|
153
153
|
<template v-slot:top-header>
|
|
154
154
|
<!-- begin list ------------------------------------------------------------------------------------------->
|
|
155
155
|
<CmdList :links="listData" orientation="horizontal" align="right" />
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</template>
|
|
158
158
|
<template v-slot:logo>
|
|
159
159
|
<!-- begin company-logo ------------------------------------------------------------------------------------------->
|
|
160
|
-
|
|
160
|
+
<!-- CmdCompanyLogo v-bind="companyLogoData" --/>
|
|
161
161
|
<!-- end company-logo ------------------------------------------------------------------------------------------->
|
|
162
162
|
</template>
|
|
163
163
|
</CmdSiteHeader>
|
|
@@ -285,9 +285,10 @@
|
|
|
285
285
|
placeholder="Type in username" tooltipText="This is a tooltip!" maxlength="100"
|
|
286
286
|
v-model="inputUsername" :status="validationStatus" :disabled="disabledStatus" />
|
|
287
287
|
<CmdFormElement element="input" labelText="Label for password-field:" type="password"
|
|
288
|
+
:required="true"
|
|
288
289
|
minlength="8" maxlength="255" id="inputfield-password"
|
|
289
290
|
fieldIconClass="icon-security-settings" placeholder="Type in password"
|
|
290
|
-
tooltipText="This is a tooltip!" :customRequirements="customRequirements"
|
|
291
|
+
tooltipText="This is a tooltip!" :customRequirements="customRequirements.filter((_ , index) => index !== 2)"
|
|
291
292
|
v-model="inputPassword" :status="validationStatus" :disabled="disabledStatus" />
|
|
292
293
|
</div>
|
|
293
294
|
<!-- end inputfield in two columns -->
|
|
@@ -2637,6 +2638,7 @@ export default {
|
|
|
2637
2638
|
flex-direction: column;
|
|
2638
2639
|
gap: var(--default-gap);
|
|
2639
2640
|
padding: var(--default-padding);
|
|
2641
|
+
align-items: center;
|
|
2640
2642
|
|
|
2641
2643
|
.button {
|
|
2642
2644
|
align-self: center;
|
|
@@ -163,7 +163,8 @@
|
|
|
163
163
|
"labelText": "Input Group (Checkbox):",
|
|
164
164
|
"toggleSwitches": true,
|
|
165
165
|
"inputTypes": "checkbox",
|
|
166
|
-
"value": "checkbox-website",
|
|
166
|
+
"value": ["checkbox-website"],
|
|
167
|
+
"name": "input-group-checkboxes",
|
|
167
168
|
"inputElements": [
|
|
168
169
|
{
|
|
169
170
|
"labelText": "Website",
|
|
@@ -193,6 +194,7 @@
|
|
|
193
194
|
"labelText": "Input Group (Radio):",
|
|
194
195
|
"toggleSwitches": true,
|
|
195
196
|
"value": "radio-website",
|
|
197
|
+
"name": "input-group-radiobuttons",
|
|
196
198
|
"inputElements": [
|
|
197
199
|
{
|
|
198
200
|
"labelText": "Website",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
<!-- begin default-slot-content -->
|
|
32
32
|
<slot v-if="useSlot"></slot>
|
|
33
33
|
<!-- end default-slot-content -->
|
|
34
|
-
|
|
35
34
|
<!-- begin loop for formElements -->
|
|
36
35
|
<template v-else v-for="(item, index) in formElements" :key="index">
|
|
36
|
+
|
|
37
37
|
<CmdFormElement
|
|
38
38
|
v-if="!item.component || item.component === 'CmdFormElement'"
|
|
39
39
|
:key="index"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
v-bind="item"
|
|
55
55
|
v-model="formValues[item.name]"
|
|
56
56
|
/>
|
|
57
|
+
|
|
57
58
|
<div
|
|
58
59
|
v-else-if="item.component === 'flexContainer' || item.component === 'inputWrapper'"
|
|
59
60
|
:class="item.component === 'flexContainer' ? 'flex-container' : 'input-wrapper'"
|
|
@@ -344,7 +345,15 @@ export default {
|
|
|
344
345
|
// fill form-data with names and value
|
|
345
346
|
let formdata = {}
|
|
346
347
|
if (this.formElements) {
|
|
348
|
+
// iterate form-elements in flex-containers and input-wrappers to get their names and values
|
|
347
349
|
this.formElements.forEach((element) => {
|
|
350
|
+
if(element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
351
|
+
element.formElements.forEach(innerElement => {
|
|
352
|
+
formdata[innerElement.name] = this.formValues[innerElement.name]
|
|
353
|
+
})
|
|
354
|
+
return
|
|
355
|
+
}
|
|
356
|
+
|
|
348
357
|
formdata[element.name] = this.formValues[element.name]
|
|
349
358
|
})
|
|
350
359
|
}
|
|
@@ -410,6 +419,26 @@ export default {
|
|
|
410
419
|
formElements: {
|
|
411
420
|
handler() {
|
|
412
421
|
this.formElements?.forEach(element => {
|
|
422
|
+
// iterate form-elements inside flex-containers and input-wrappers
|
|
423
|
+
if(element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
424
|
+
element.formElements.forEach(innerElement => {
|
|
425
|
+
if (innerElement.type === "checkbox") {
|
|
426
|
+
// create array if element is a checkbox (to contain several values)
|
|
427
|
+
if (!this.formValues[innerElement.name]) {
|
|
428
|
+
this.formValues[innerElement.name] = []
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (innerElement.value != null) {
|
|
432
|
+
this.formValues[innerElement.name].push(innerElement.value)
|
|
433
|
+
}
|
|
434
|
+
} else {
|
|
435
|
+
this.formValues[innerElement.name] = innerElement.value ?? ""
|
|
436
|
+
}
|
|
437
|
+
})
|
|
438
|
+
return
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// iterate form-elements on main-level
|
|
413
442
|
if (element.type === "checkbox") {
|
|
414
443
|
// create array if element is a checkbox (to contain several values)
|
|
415
444
|
if (!this.formValues[element.name]) {
|
|
@@ -232,6 +232,16 @@ export default {
|
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
234
|
props: {
|
|
235
|
+
/**
|
|
236
|
+
* set value for v-model (must be named modelValue in vue3 if default v-model should be used)
|
|
237
|
+
*/
|
|
238
|
+
modelValue: {
|
|
239
|
+
type: [String, Boolean, Array, Number],
|
|
240
|
+
default: ""
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* group entries of selectbox by first letter of its options
|
|
244
|
+
*/
|
|
235
245
|
groupSelectOptionsByInitialLetters: {
|
|
236
246
|
type: Boolean,
|
|
237
247
|
default: false
|
|
@@ -243,13 +253,6 @@ export default {
|
|
|
243
253
|
type: String,
|
|
244
254
|
required: false
|
|
245
255
|
},
|
|
246
|
-
/**
|
|
247
|
-
* set value for v-model (must be named modelValue in vue3 if default v-model should be used)
|
|
248
|
-
*/
|
|
249
|
-
modelValue: {
|
|
250
|
-
type: [String, Boolean, Array, Number],
|
|
251
|
-
default: ""
|
|
252
|
-
},
|
|
253
256
|
/**
|
|
254
257
|
* set type of native form-element
|
|
255
258
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- begin CmdInputGroup ---------------------------------------------------------------------------------------- -->
|
|
3
3
|
<div :class="[
|
|
4
4
|
'cmd-input-group label',
|
|
5
|
-
|
|
5
|
+
required ? validationStatus : null,
|
|
6
6
|
{
|
|
7
7
|
'has-state': validationStatus,
|
|
8
8
|
inline: labelInline,
|
|
@@ -359,14 +359,17 @@ export default {
|
|
|
359
359
|
--status-color: var(--hyperlink-color);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
.label-text span {
|
|
363
|
+
color: var(--status-color);
|
|
364
|
+
}
|
|
365
|
+
|
|
362
366
|
&.error {
|
|
363
367
|
--status-color: var(--error-color);
|
|
368
|
+
|
|
369
|
+
/* labels for checkboxes and radiobuttons */
|
|
370
|
+
|
|
364
371
|
}
|
|
365
372
|
|
|
366
|
-
/*
|
|
367
|
-
label, span, [class*="icon-"] {
|
|
368
|
-
color: var(--status-color);
|
|
369
|
-
}*/
|
|
370
373
|
|
|
371
374
|
&.multiple-switch {
|
|
372
375
|
&.error {
|
|
@@ -380,7 +383,7 @@ export default {
|
|
|
380
383
|
}
|
|
381
384
|
|
|
382
385
|
&:is(:hover, :active, :focus) {
|
|
383
|
-
|
|
386
|
+
> * {
|
|
384
387
|
color: var(--hyperlink-color-highlighted);
|
|
385
388
|
}
|
|
386
389
|
}
|
|
@@ -158,7 +158,10 @@ export default {
|
|
|
158
158
|
},
|
|
159
159
|
methods: {
|
|
160
160
|
onImageLoaded(event) {
|
|
161
|
-
this.
|
|
161
|
+
if(!this.useGrid) {
|
|
162
|
+
// image should must have height to bi visible as flex-item (else size is 0x0)
|
|
163
|
+
this.defaultLogoHeight = (event.target.height / 10) + "rem"
|
|
164
|
+
}
|
|
162
165
|
},
|
|
163
166
|
emitOffcanvasStatus(event) {
|
|
164
167
|
this.$emit("offcanvas", event)
|