comand-component-library 4.0.46 → 4.0.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <span v-if="icon.iconClass && icon.position !== 'right'" :class="icon.iconClass" :title="icon.tooltip"></span>
3
+ <span v-if="text">{{ text }}</span>
4
+ <span v-if="icon.iconClass && icon.position === 'right'" :class="icon.iconClass" :title="icon.tooltip"></span>
5
+ <!-- begin default-slot -->
6
+ <slot></slot>
7
+ <!-- end default-slot -->
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: "CmdInnerLink",
13
+ props: {
14
+ /**
15
+ * icon to display
16
+ */
17
+ icon: {
18
+ type: Object,
19
+ default: {}
20
+ },
21
+ /**
22
+ * displayed text
23
+ */
24
+ text: {
25
+ type: String,
26
+ default: ""
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+
32
+ <style>
33
+
34
+ </style>
@@ -2,61 +2,34 @@
2
2
  <!-- begin CmdLink -->
3
3
  <!-- begin href -->
4
4
  <a v-if="linkType === 'href'" :href="path" :target="target" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton}]" @click="emitClick($event, 'href')">
5
- <InnerLink :text="text" :icon="icon">
5
+ <CmdInnerLink :text="text" :icon="icon">
6
6
  <slot></slot>
7
- </InnerLink>
7
+ </CmdInnerLink>
8
8
  </a>
9
9
  <!-- end href -->
10
10
 
11
11
  <!-- begin router -->
12
12
  <router-link v-else-if="linkType === 'router'" :to="path" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton}]" @click="emitClick($event, 'router')">
13
- <InnerLink :text="text" :icon="icon">
13
+ <CmdInnerLink :text="text" :icon="icon">
14
14
  <slot></slot>
15
- </InnerLink>
15
+ </CmdInnerLink>
16
16
  </router-link>
17
17
  <!-- end router -->
18
18
 
19
19
  <!-- begin button -->
20
20
  <button v-else-if="linkType === 'button'" :class="['cmd-link button', {'primary': primaryButton}]" type="submit" @click="emitClick($event, 'button')">
21
- <InnerLink :text="text" :icon="icon">
21
+ <CmdInnerLink :text="text" :icon="icon">
22
22
  <slot></slot>
23
- </InnerLink>
23
+ </CmdInnerLink>
24
24
  </button>
25
25
  <!-- end button -->
26
26
  <!-- end CmdLink -->
27
27
  </template>
28
28
 
29
29
  <script>
30
- import { defineComponent } from "vue"
31
- const InnerLink = defineComponent({
32
- template: `<span v-if="icon.iconClass && icon.position !== 'right'" :class="icon.iconClass" :title="icon.tooltip"></span>
33
- <span v-if="text">{{ text }}</span>
34
- <span v-if="icon.iconClass && icon.position === 'right'" :class="icon.iconClass" :title="icon.tooltip"></span>
35
- <slot></slot>`,
36
- props: {
37
- /**
38
- * icon to display
39
- */
40
- icon: {
41
- type: Object,
42
- default: {}
43
- },
44
- /**
45
- * displayed text
46
- */
47
- text: {
48
- type: String,
49
- default: ""
50
- }
51
- }
52
- })
53
-
54
30
  export default {
55
31
  name: "CmdLink",
56
32
  emits: ["click"],
57
- components: {
58
- InnerLink
59
- },
60
33
  props: {
61
34
  /**
62
35
  * set type of link
@@ -132,9 +105,5 @@ export default {
132
105
  </script>
133
106
 
134
107
  <style>
135
- .cmd-link {
136
- span[class*="icon"]:not(:only-child) {
137
- font-size: 1rem;
138
- }
139
- }
108
+
140
109
  </style>
@@ -137,13 +137,6 @@ export default {
137
137
  value === "right"
138
138
  }
139
139
  },
140
- /**
141
- * properties for CmdHeadline-component
142
- */
143
- cmdHeadline: {
144
- type: Object,
145
- required: false
146
- },
147
140
  /**
148
141
  * list of displayed links
149
142
  */
@@ -163,6 +156,13 @@ export default {
163
156
  return value === "horizontal" ||
164
157
  value === "vertical"
165
158
  }
159
+ },
160
+ /**
161
+ * properties for CmdHeadline-component
162
+ */
163
+ cmdHeadline: {
164
+ type: Object,
165
+ required: false
166
166
  }
167
167
  },
168
168
  computed: {
@@ -44,9 +44,9 @@
44
44
  </div>
45
45
  <!-- end form elements -->
46
46
 
47
- <!-- begin slot for login-form -->
47
+ <!-- begin named slot for login-form -->
48
48
  <slot name="login"></slot>
49
- <!-- end slot for login-form -->
49
+ <!-- end named slot for login-form -->
50
50
 
51
51
  <div class="option-wrapper flex-container">
52
52
  <template v-if="options.forgotPassword || options.createAccount">
package/src/index.js CHANGED
@@ -66,4 +66,7 @@ export { createUuid, createHtmlId } from '@/utils/common'
66
66
  export { getFileExtension } from '@/utils/getFileExtension'
67
67
 
68
68
  // export composables
69
- export { useSequence } from '@/composables/sequence'
69
+ export { useSequence } from '@/composables/sequence'
70
+
71
+ // export mixins
72
+ export { default as I18n } from '@/mixins/I18n.js'