comand-component-library 4.2.11 → 4.2.12

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="cmd-image-zoom flex-container">
3
3
  <!-- begin small image -->
4
- <a href="#" class="no-flex thumbnails-imagezoom" :title="imageSmall.image.tooltip">
4
+ <a href="#" class="no-flex thumbnail-imagezoom" :title="imageSmall.image.tooltip">
5
5
  <!-- begin CmdImage for small image -->
6
6
  <CmdImage v-bind="imageSmall" :figcaption="{}"
7
7
  @mouseover="onMouseOver"
@@ -9,16 +9,17 @@
9
9
  @mouseout="onMouseOut"
10
10
  />
11
11
  <!-- end CmdImage for small image -->
12
+ <div class="zoom-overlay"></div>
12
13
  </a>
13
14
  <!-- end small image -->
14
15
 
15
16
  <!-- begin large image -->
16
- <div class="zoom-container">
17
+ <div class="zoom-container">
17
18
  <!-- begin CmdImage for large image -->
18
19
  <CmdImage v-bind="imageLarge" :useFigureTag="false" />
19
20
  <!-- end CmdImage for large image -->
20
21
  </div>
21
- <div class="zoom-overlay"></div>
22
+
22
23
  <!-- end large image -->
23
24
  </div>
24
25
  </template>
@@ -77,8 +78,8 @@ function positionOverlay(vm, e) {
77
78
  const largeImageWidth = largeImage.getBoundingClientRect().width
78
79
  const largeImageHeight = largeImage.getBoundingClientRect().height
79
80
 
80
- const mouseX = e.pageX - e.target.getBoundingClientRect().x - window.pageXOffset
81
- const mouseY = e.pageY - e.target.getBoundingClientRect().y - window.pageYOffset
81
+ const mouseX = e.pageX - e.target.getBoundingClientRect().x - window.scrollX
82
+ const mouseY = e.pageY - e.target.getBoundingClientRect().y - window.scrollY
82
83
 
83
84
  const overlayWidth = Math.min(smallImageWidth, largeImageContainer.getBoundingClientRect().width / largeImageWidth * smallImageWidth)
84
85
  const overlayHeight = Math.min(smallImageHeight, largeImageContainer.getBoundingClientRect().height / largeImageHeight * smallImageHeight)
@@ -115,12 +116,16 @@ function clamp(value, min, max) {
115
116
  .cmd-image-zoom {
116
117
  overflow: hidden;
117
118
 
119
+ .thumbnail-imagezoom {
120
+ align-self: flex-start;
121
+ }
122
+
118
123
  .zoom-container {
119
- display: block !important;
120
124
  overflow: hidden;
121
125
 
122
126
  > img {
123
127
  max-width: none;
128
+ max-height: none;
124
129
  }
125
130
  }
126
131
 
@@ -133,5 +138,26 @@ function clamp(value, min, max) {
133
138
  }
134
139
  }
135
140
 
141
+ </style>
142
+
143
+ <style lang="scss">
144
+ @import '../assets/styles/variables';
145
+
146
+ @media only screen and (max-width: $small-max-width) {
147
+ .cmd-image-zoom {
148
+ .thumbnail-imagezoom {
149
+ align-self: center;
150
+ }
151
+
152
+ .zoom-container {
153
+ max-height: 40vh;
154
+ flex: none;
155
+
156
+ > img {
157
+ max-height: none;
158
+ }
159
+ }
160
+ }
161
+ }
136
162
  /* end cmd-imagezoom ------------------------------------------------------------------------------------------ */
137
- </style>
163
+ </style>
@@ -23,7 +23,7 @@
23
23
  <!-- end router-link -->
24
24
 
25
25
  <!-- begin button -->
26
- <button v-else-if="linkType === 'button'" :class="['cmd-link button', {'primary': primaryButton, 'box': styleAsBox, 'fancybox': fancybox}]" type="submit" @click="emitClick($event, 'button')" :title="icon?.tooltip">
26
+ <button v-else-if="linkType === 'button' || linkType === 'submit'" :class="['cmd-link button', {'primary': primaryButton, 'box': styleAsBox, 'fancybox': fancybox}]" type="submit" @click="emitClick($event, 'button')" :title="icon?.tooltip">
27
27
  <CmdInnerLink :text="text" :icon="icon" :image="image">
28
28
  <slot></slot>
29
29
  </CmdInnerLink>
@@ -48,7 +48,8 @@ export default {
48
48
  validator(value) {
49
49
  return value === "href" ||
50
50
  value === "router" ||
51
- value === "button"
51
+ value === "button" ||
52
+ value === "submit"
52
53
  }
53
54
  },
54
55
  /**
@@ -6,7 +6,7 @@
6
6
  ]">
7
7
  <!-- begin cmd-headline -->
8
8
  <CmdHeadline
9
- v-if="cmdHeadline?.headlineText || editModeContext"
9
+ v-if="cmdHeadline?.headlineText"
10
10
  v-bind="cmdHeadline"
11
11
  />
12
12
  <!-- end cmd-headline -->
@@ -32,7 +32,7 @@
32
32
 
33
33
  <script>
34
34
  // import mixins (editMode only)
35
- // import EditMode from "../mixins/EditMode.vue"
35
+ import EditMode from "../mixins/EditMode.vue"
36
36
 
37
37
  // import utils (editMode only)
38
38
  // import {buildComponentPath, updateHandlerProvider} from "../utils/editmode.js"
@@ -40,7 +40,7 @@
40
40
  export default {
41
41
  name: "CmdListOfImages",
42
42
  emits: ["click"],
43
- // mixins: [EditMode],
43
+ //mixins: [EditMode],
44
44
  props: {
45
45
  /**
46
46
  * style component like a box
@@ -80,7 +80,7 @@ export default {
80
80
  }
81
81
  },
82
82
  methods: {
83
- /*
83
+ /*
84
84
  onAddItem() {
85
85
  this.editModeContext.content.addContent(
86
86
  buildComponentPath(this, 'props', 'links', -1),
@@ -107,7 +107,7 @@ export default {
107
107
  }
108
108
  })
109
109
  }
110
- */
110
+ */
111
111
  }
112
112
  }
113
113
  </script>
@@ -12,7 +12,7 @@
12
12
  <!-- end CmdHeadline -->
13
13
 
14
14
  <!-- begin Google-Login-Button -->
15
- <button v-if="enableLoginWithGoogle" class="gsi-material-button">
15
+ <button v-if="enableLoginWithGoogle" class="gsi-material-button stretch-on-small-devices">
16
16
  <div class="gsi-material-button-state"></div>
17
17
  <div class="gsi-material-button-content-wrapper">
18
18
  <div class="gsi-material-button-icon">
@@ -37,7 +37,7 @@
37
37
 
38
38
  <!-- begin Facebook-Login-Button -->
39
39
  <div v-if="enableLoginWithFacebook"
40
- class="fb-login-button"
40
+ class="fb-login-button stretch-on-small-devices"
41
41
  data-width="200"
42
42
  data-size=""
43
43
  data-button-type=""
@@ -47,8 +47,19 @@
47
47
  </div>
48
48
  <!-- end Facebook-Login-Button -->
49
49
 
50
- <button v-if="enableLoginWithGoogle || enableLoginWithFacebook" @click.prevent="showLogin = true">
51
- <span>Login with your data</span>
50
+ <button v-if="enableLoginWithGoogle || enableLoginWithFacebook"
51
+ class="button stretch-on-small-devices"
52
+ v-bind="buttonLoginWithYourDataDefaultOptions"
53
+ @click.prevent="showLogin = true">
54
+ <!-- begin CmdIcon -->
55
+ <CmdIcon
56
+ v-if="buttonLoginWithYourDataDefaultOptions.icon?.iconClass"
57
+ :iconClass="buttonLoginWithYourDataDefaultOptions.icon.iconClass"
58
+ :type="buttonLoginWithYourDataDefaultOptions.icon.iconType"
59
+ :title="buttonLoginWithYourDataDefaultOptions.icon.tooltip"
60
+ />
61
+ <!-- end CmdIcon -->
62
+ <span v-if="buttonLoginWithYourDataDefaultOptions.text">{{ buttonLoginWithYourDataDefaultOptions.text }}</span>
52
63
  </button>
53
64
 
54
65
  <!-- begin form elements -->
@@ -81,14 +92,15 @@
81
92
  <!-- end named slot for login-form -->
82
93
 
83
94
  <div class="option-wrapper flex-container">
84
- <template v-if="linkForgotPassword || linkCreateAccount">
95
+ <div class="flex-container reset-flex no-wrap-on-small-devices justify-content-space-around" v-if="linkForgotPassword || linkCreateAccount">
85
96
  <!-- begin link for 'forgot password' -->
86
97
  <a v-if="linkForgotPassword" href="#" @click.prevent="toggleSendLoginView">
87
98
  <!-- begin CmdIcon -->
88
- <CmdIcon v-if="linkForgotPassword.icon?.show && linkForgotPassword.icon?.iconClass"
89
- :iconClass="linkForgotPassword.icon.iconClass"
90
- :type="linkForgotPassword.icon.iconType"
91
- :title="linkForgotPassword.icon.tooltip"
99
+ <CmdIcon
100
+ v-if="linkForgotPassword.icon?.show && linkForgotPassword.icon?.iconClass"
101
+ :iconClass="linkForgotPassword.icon.iconClass"
102
+ :type="linkForgotPassword.icon.iconType"
103
+ :title="linkForgotPassword.icon.tooltip"
92
104
  />
93
105
  <!-- end CmdIcon -->
94
106
  <span v-if="linkForgotPassword.text">{{ linkForgotPassword.text }}</span>
@@ -111,14 +123,14 @@
111
123
  <!-- end CmdLink -->
112
124
  </template>
113
125
  <!-- end link for 'create account' -->
114
- </template>
126
+ </div>
115
127
 
116
128
  <!-- begin link-type 'button' -->
117
129
  <button
118
130
  v-if="buttonLoginDefaultOptions.linkType === 'button'"
119
131
  :type="buttonLoginDefaultOptions.type === 'submit' ? 'submit' : 'button'"
120
132
  v-bind="buttonLoginOptions"
121
- :class="['button', { primary: buttonLoginDefaultOptions.primary }]"
133
+ :class="['button stretch-on-small-devices', { primary: buttonLoginDefaultOptions.primary }]"
122
134
  @click="onClick"
123
135
  :disabled="buttonLoginDisabled"
124
136
  >
@@ -185,7 +197,7 @@
185
197
  v-if="buttonSendLoginOptions.linkType === 'button'"
186
198
  v-bind="buttonSendLoginOptions"
187
199
  :type="buttonSendLoginOptions.type === 'submit' ? 'submit' : 'button'"
188
- :class="['button', { primary: buttonSendLoginOptions.primary }]"
200
+ :class="['button stretch-on-small-devices', { primary: buttonSendLoginOptions.primary }]"
189
201
  :disabled="buttonSendLoginDisabled"
190
202
  >
191
203
  <!-- begin CmdIcon -->
@@ -393,6 +405,15 @@ export default {
393
405
  }
394
406
  }
395
407
  },
408
+ /**
409
+ * button to show login if multiple login possibilities (i.e. google, facebook) are enabled
410
+ *
411
+ * @requiredForAccessibility: partial
412
+ */
413
+ buttonLoginWithYourData: {
414
+ type: Object,
415
+ required: false
416
+ },
396
417
  /**
397
418
  * button to login
398
419
  *
@@ -446,6 +467,16 @@ export default {
446
467
  ...this.cmdFormElementSendLogin
447
468
  }
448
469
  },
470
+ buttonLoginWithYourDataDefaultOptions() {
471
+ return {
472
+ linkType: "button", /* href, router, button */
473
+ type: "button", /* submit, button */
474
+ path: "",
475
+ text: "Login with your data",
476
+ primary: false,
477
+ ...this.buttonLoginWithYourData
478
+ }
479
+ },
449
480
  buttonLoginDefaultOptions() {
450
481
  return {
451
482
  linkType: "button", /* href, router, button */
@@ -612,68 +643,66 @@ export default {
612
643
  background-color: var(--color-white);
613
644
  height: var(--input-height);
614
645
  padding: var(--button-padding);
615
- }
616
646
 
617
- .gsi-material-button .gsi-material-button-icon {
618
- height: 2rem;
619
- aspect-ratio: 1/1;
620
- margin-right: calc(var(--default-margin) / 2);
621
- }
647
+ .gsi-material-button-icon {
648
+ height: 2rem;
649
+ aspect-ratio: 1/1;
650
+ margin-right: calc(var(--default-margin) / 2);
651
+ }
622
652
 
623
- .gsi-material-button .gsi-material-button-content-wrapper {
624
- align-items: center;
625
- display: flex;
626
- flex-direction: row;
627
- flex-wrap: nowrap;
628
- height: 100%;
629
- justify-content: space-between;
630
- position: relative;
631
- width: 100%;
632
- }
653
+ .gsi-material-button-content-wrapper {
654
+ align-items: center;
655
+ display: flex;
656
+ flex-direction: row;
657
+ flex-wrap: nowrap;
658
+ height: 100%;
659
+ justify-content: space-between;
660
+ position: relative;
661
+ width: 100%;
662
+ }
633
663
 
634
- .gsi-material-button .gsi-material-button-contents {
635
- flex-grow: 1;
636
- font-family: 'Roboto', arial, sans-serif;
637
- font-weight: 500;
638
- overflow: hidden;
639
- text-overflow: ellipsis;
640
- vertical-align: top;
641
- }
664
+ .gsi-material-button-contents {
665
+ flex-grow: 1;
666
+ font-family: 'Roboto', arial, sans-serif;
667
+ font-weight: 500;
668
+ text-overflow: ellipsis;
669
+ vertical-align: top;
670
+ }
642
671
 
643
- .gsi-material-button .gsi-material-button-state {
644
- transition: opacity .218s;
645
- bottom: 0;
646
- left: 0;
647
- opacity: 0;
648
- position: absolute;
649
- right: 0;
650
- top: 0;
651
- }
672
+ .gsi-material-button-state {
673
+ transition: opacity .218s;
674
+ bottom: 0;
675
+ left: 0;
676
+ opacity: 0;
677
+ position: absolute;
678
+ right: 0;
679
+ top: 0;
680
+ }
652
681
 
653
- .gsi-material-button:disabled {
654
- background-color: #ffffff61;
655
- border-color: #1f1f1f1f;
656
- }
682
+ .gsi-material-button:disabled {
683
+ background-color: #ffffff61;
684
+ border-color: #1f1f1f1f;
657
685
 
658
- .gsi-material-button:disabled {
659
- .gsi-material-button-contents, .gsi-material-button-icon {
660
- opacity: 38%;
661
- }
662
- }
686
+ .gsi-material-button-contents, .gsi-material-button-icon {
687
+ opacity: 38%;
688
+ }
663
689
 
664
- .gsi-material-button:not(:disabled):is(:active, :focus) .gsi-material-button-state {
665
- background-color: #303030;
666
- opacity: 12%;
667
- }
690
+ &:not(:disabled):is(:active, :focus) .gsi-material-button-state {
691
+ background-color: #303030;
692
+ opacity: 12%;
693
+ }
668
694
 
669
- .gsi-material-button:not(:disabled):hover {
670
- box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
695
+ &:not(:disabled):hover {
696
+ box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
671
697
 
672
- .gsi-material-button-state {
673
- background-color: #303030;
674
- opacity: 8%;
698
+ .gsi-material-button-state {
699
+ background-color: #303030;
700
+ opacity: 8%;
701
+ }
702
+ }
675
703
  }
676
704
  }
705
+
677
706
  /* end google-login-button */
678
707
  }
679
708
 
@@ -142,10 +142,4 @@ export default {
142
142
  }
143
143
  }
144
144
  }
145
- </script>
146
-
147
- <style>
148
- .cmd-mail-tool {
149
-
150
- }
151
- </style>
145
+ </script>
@@ -7,12 +7,12 @@
7
7
  :title="getMessage('mail_tool_entry.tooltip.read_this_mail')"
8
8
  >
9
9
  <dl class="no-flex">
10
- <dt class="flex-container align-items-center">
10
+ <dt class="flex-container">
11
11
  {{
12
12
  boxType === "inbox" ? getMessage("mail_tool_entry.description_label.from") : getMessage("mail_tool_entry.description_label.to")
13
13
  }}
14
14
  </dt>
15
- <dd class="sender-receiver-wrapper flex-container align-items-center no-flex">
15
+ <dd class="sender-receiver-wrapper flex-container no-wrap-on-small-devices align-items-center no-flex">
16
16
  <!-- begin CmdImage for contact image -->
17
17
  <CmdImage v-if="mail.cmdImage?.src"
18
18
  :src="mail.cmdImage.src"
@@ -25,15 +25,15 @@
25
25
  <dt>{{ getMessage("mail_tool_entry.description_label.subject") }}</dt>
26
26
  <dd><a href="#" @click.prevent="readMail(mail.id)">{{ mail.subject }}</a></dd>
27
27
  </dl>
28
- <div class="flex-container vertical no-flex">
28
+ <div class="flex-container received-and-options-wrapper no-wrap-on-small-devices">
29
29
  <dl class="no-list-items date-time-wrapper">
30
- <dt>Received:</dt>
31
- <dd>
30
+ <dt>{{ getMessage("mail_tool_entry.description_label.received") }}</dt>
31
+ <dd class="flex-container no-wrap-on-small-devices">
32
32
  <time :datetime="mail.isoDate">{{ mailFormatDate(mail.isoDate) }}</time>
33
33
  <time :datetime="mail.time">{{ mailFormatTime(mail.time) }}</time>
34
34
  </dd>
35
35
  </dl>
36
- <div class="options-wrapper flex-container no-flex">
36
+ <div class="options-wrapper flex-container no-wrap-on-small-devices no-flex">
37
37
  <a href="#" @click.prevent="deleteMail(mail.id)" title="Delete this mail">
38
38
  <span class="icon-delete"></span>
39
39
  </a>
@@ -208,6 +208,11 @@ export default {
208
208
  dl {
209
209
  margin: 0;
210
210
 
211
+ dt {
212
+ align-items: center;
213
+ justify-content: flex-start;
214
+ }
215
+
211
216
  dd {
212
217
  gap: calc(var(--default-gap) / 2);
213
218
  }
@@ -224,7 +229,47 @@ export default {
224
229
  .options-wrapper {
225
230
  justify-content: flex-end;
226
231
  }
232
+
233
+ .sender-receiver-wrapper {
234
+ justify-content: flex-start !important;
235
+ }
236
+
237
+ .received-and-options-wrapper {
238
+ flex-direction: column;
239
+ flex: none;
240
+
241
+ .date-time-wrapper {
242
+ time {
243
+ flex: none;
244
+ }
245
+ }
246
+
247
+ .options-wrapper {
248
+ margin-left: auto;
249
+ }
250
+ }
227
251
  }
252
+ </style>
253
+
254
+ <style lang="scss">
255
+ @import "../assets/styles/variables";
256
+
257
+
258
+ @media only screen and (max-width: $small-max-width) {
259
+ .cmd-mail-tool-entry {
260
+ dl {
261
+
262
+ dt {
263
+ align-items: flex-start;
264
+ justify-content: center;
265
+ }
266
+ }
228
267
 
268
+ .received-and-options-wrapper {
269
+ flex-direction: row;
270
+ justify-content: space-between;
271
+ }
272
+ }
273
+ }
229
274
  /* end cmd-mail-tool-entry -------------------------------------------------------------------------------------------- */
230
275
  </style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <div class="cmd-mail-tool-filter align-items-center">
2
+ <div class="cmd-mail-tool-filter">
3
3
  <!-- begin CmdHeadline -->
4
4
  <CmdHeadline v-if="headlineText" :headlineText="headlineText" :headlineLevel="headlineLevel"/>
5
5
  <!-- end CmdHeadline -->
6
6
 
7
- <div class="flex-container horizontal align-items-center">
7
+ <div class="flex-container align-items-center">
8
8
  <!-- begin CmdFormElement -->
9
9
  <CmdFormElement
10
10
  element="input"
@@ -18,31 +18,33 @@
18
18
  />
19
19
  <!-- end CmdFormElement -->
20
20
 
21
- <!-- begin CmdFormElement -->
22
- <CmdFormElement
23
- element="input"
24
- type="checkbox"
25
- name="search-filters"
26
- id="search-subject"
27
- labelText="Search subjects"
28
- v-model="searchFilterOptions"
29
- inputValue="subjects"
30
- />
31
- <!-- end CmdFormElement -->
21
+ <div class="flex-container reset-flex">
22
+ <!-- begin CmdFormElement -->
23
+ <CmdFormElement
24
+ element="input"
25
+ type="checkbox"
26
+ name="search-filters"
27
+ id="search-subject"
28
+ labelText="Search subjects"
29
+ v-model="searchFilterOptions"
30
+ inputValue="subjects"
31
+ />
32
+ <!-- end CmdFormElement -->
32
33
 
33
- <!-- begin CmdFormElement -->
34
- <CmdFormElement
35
- element="input"
36
- type="checkbox"
37
- name="search-filters"
38
- :id="'search-' + senderReceiver"
39
- :labelText="'Search ' + senderReceiver"
40
- v-model="searchFilterOptions"
41
- :inputValue="senderReceiver"
42
- />
43
- <!-- end CmdFormElement -->
34
+ <!-- begin CmdFormElement -->
35
+ <CmdFormElement
36
+ element="input"
37
+ type="checkbox"
38
+ name="search-filters"
39
+ :id="'search-' + senderReceiver"
40
+ :labelText="'Search ' + senderReceiver"
41
+ v-model="searchFilterOptions"
42
+ :inputValue="senderReceiver"
43
+ />
44
+ <!-- end CmdFormElement -->
45
+ </div>
44
46
  </div>
45
- <div class="flex-container horizontal sort-wrapper">
47
+ <div class="flex-container sort-wrapper">
46
48
  <!-- begin link sort ascending -->
47
49
  <a v-if="sortOrderAsc" href="#" @click.prevent="sortByDate('asc')" :title="linkSortAscending.title">
48
50
  <span v-if="linkSortAscending.text">{{ linkSortAscending.text }}</span>
@@ -188,15 +190,19 @@ export default {
188
190
  display: flex;
189
191
  padding: var(--default-padding);
190
192
  background: var(--color-light-gray);
191
-
192
- & > * {
193
- flex: 1;
194
- }
193
+ align-items: center;
194
+ justify-content: space-between;
195
195
 
196
196
  .cmd-headline {
197
197
  margin: 0;
198
198
  }
199
199
 
200
+ .label-text {
201
+ white-space: nowrap;
202
+
203
+
204
+ }
205
+
200
206
  .sort-wrapper {
201
207
  text-align: right;
202
208