@antify/template-module 0.0.3 → 0.0.5

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.
Files changed (37) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/buttons/ActionButton.d.vue.ts +8 -3
  3. package/dist/runtime/components/buttons/ActionButton.vue +46 -11
  4. package/dist/runtime/components/buttons/ActionButton.vue.d.ts +8 -3
  5. package/dist/runtime/components/buttons/CreateButton.d.vue.ts +18 -2
  6. package/dist/runtime/components/buttons/CreateButton.vue +16 -11
  7. package/dist/runtime/components/buttons/CreateButton.vue.d.ts +18 -2
  8. package/dist/runtime/components/buttons/DeleteButton.d.vue.ts +18 -2
  9. package/dist/runtime/components/buttons/DeleteButton.vue +15 -10
  10. package/dist/runtime/components/buttons/DeleteButton.vue.d.ts +18 -2
  11. package/dist/runtime/components/buttons/DuplicateButton.d.vue.ts +18 -2
  12. package/dist/runtime/components/buttons/DuplicateButton.vue +15 -10
  13. package/dist/runtime/components/buttons/DuplicateButton.vue.d.ts +18 -2
  14. package/dist/runtime/components/buttons/EditButton.d.vue.ts +18 -2
  15. package/dist/runtime/components/buttons/EditButton.vue +15 -10
  16. package/dist/runtime/components/buttons/EditButton.vue.d.ts +18 -2
  17. package/dist/runtime/components/buttons/SaveAndNewButton.d.vue.ts +18 -2
  18. package/dist/runtime/components/buttons/SaveAndNewButton.vue +16 -11
  19. package/dist/runtime/components/buttons/SaveAndNewButton.vue.d.ts +18 -2
  20. package/dist/runtime/components/buttons/SaveButton.d.vue.ts +18 -1
  21. package/dist/runtime/components/buttons/SaveButton.vue +16 -10
  22. package/dist/runtime/components/buttons/SaveButton.vue.d.ts +18 -1
  23. package/dist/runtime/components/crud/CrudDetailActions.d.vue.ts +16 -2
  24. package/dist/runtime/components/crud/CrudDetailActions.vue +35 -5
  25. package/dist/runtime/components/crud/CrudDetailActions.vue.d.ts +16 -2
  26. package/dist/runtime/components/crud/CrudDetailNav.d.vue.ts +10 -2
  27. package/dist/runtime/components/crud/CrudDetailNav.vue +18 -2
  28. package/dist/runtime/components/crud/CrudDetailNav.vue.d.ts +10 -2
  29. package/dist/runtime/components/crud/CrudTableFilter.d.vue.ts +9 -1
  30. package/dist/runtime/components/crud/CrudTableFilter.vue +19 -3
  31. package/dist/runtime/components/crud/CrudTableFilter.vue.d.ts +9 -1
  32. package/dist/runtime/components/dialogs/DeleteDialog.vue +12 -12
  33. package/dist/runtime/composables/useUiClient.js +14 -4
  34. package/dist/runtime/plugins/template-module.js +9 -3
  35. package/dist/runtime/utils.d.ts +1 -1
  36. package/dist/runtime/utils.js +6 -2
  37. package/package.json +3 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antify/template-module",
3
3
  "configKey": "templateModule",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "2.0.0"
@@ -20,14 +20,19 @@ type __VLS_Props = {
20
20
  tooltipDelay?: number;
21
21
  submit?: boolean;
22
22
  dataE2e?: string;
23
+ tooltipMessage?: string;
24
+ disabledTooltipMessage?: string;
25
+ invalidPermissionTooltipMessage?: string;
23
26
  };
24
- declare var __VLS_11: {}, __VLS_14: {}, __VLS_16: {};
27
+ declare var __VLS_11: {}, __VLS_14: {}, __VLS_16: {}, __VLS_18: {};
25
28
  type __VLS_Slots = {} & {
26
29
  default?: (props: typeof __VLS_11) => any;
27
30
  } & {
28
- tooltipContent?: (props: typeof __VLS_14) => any;
31
+ invalidPermissionTooltipContent?: (props: typeof __VLS_14) => any;
29
32
  } & {
30
- invalidPermissionTooltipContent?: (props: typeof __VLS_16) => any;
33
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
34
+ } & {
35
+ tooltipContent?: (props: typeof __VLS_18) => any;
31
36
  };
32
37
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
38
  blur: (...args: any[]) => void;
@@ -31,11 +31,15 @@ const props = defineProps({
31
31
  tooltipState: { type: String, required: false },
32
32
  tooltipDelay: { type: Number, required: false },
33
33
  submit: { type: Boolean, required: false, default: false },
34
- dataE2e: { type: String, required: false, default: "action-button" }
34
+ dataE2e: { type: String, required: false, default: "action-button" },
35
+ tooltipMessage: { type: String, required: false },
36
+ disabledTooltipMessage: { type: String, required: false },
37
+ invalidPermissionTooltipMessage: { type: String, required: false }
35
38
  });
36
39
  const slots = useSlots();
37
- const hasTooltip = computed(() => !props.skeleton && !props.disabled && props.hasPermission && hasSlotContent(slots["tooltipContent"]));
38
- const hasPermissionTooltip = computed(() => !props.skeleton && !(!props.disabled && props.hasPermission) && hasSlotContent(slots["invalidPermissionTooltipContent"]));
40
+ const hasTooltip = computed(() => !props.skeleton && !props.disabled && props.hasPermission && (hasSlotContent(slots["tooltipContent"]) || props.tooltipMessage));
41
+ const hasDisabledTooltip = computed(() => !props.skeleton && props.disabled && props.hasPermission);
42
+ const hasPermissionTooltip = computed(() => !props.skeleton && !props.hasPermission);
39
43
  </script>
40
44
 
41
45
  <template>
@@ -60,15 +64,46 @@ const hasPermissionTooltip = computed(() => !props.skeleton && !(!props.disabled
60
64
  <slot />
61
65
 
62
66
  <template #tooltip-content>
63
- <slot
64
- v-if="hasTooltip"
65
- name="tooltipContent"
66
- />
67
+ <div v-if="hasPermissionTooltip">
68
+ <slot
69
+ v-if="hasSlotContent(slots['invalidPermissionTooltipContent'])"
70
+ name="invalidPermissionTooltipContent"
71
+ />
67
72
 
68
- <slot
69
- v-if="hasPermissionTooltip"
70
- name="invalidPermissionTooltipContent"
71
- />
73
+ <div v-else-if="invalidPermissionTooltipMessage">
74
+ {{ invalidPermissionTooltipMessage }}
75
+ </div>
76
+
77
+ <div v-else>
78
+ [Platzhalter]
79
+ </div>
80
+ </div>
81
+
82
+ <div v-if="hasDisabledTooltip">
83
+ <slot
84
+ v-if="hasSlotContent(slots['disabledTooltipContent'])"
85
+ name="disabledTooltipContent"
86
+ />
87
+
88
+ <div v-else-if="disabledTooltipMessage">
89
+ {{ disabledTooltipMessage }}
90
+ </div>
91
+
92
+ <div v-else>
93
+ [Platzhalter]
94
+ </div>
95
+ </div>
96
+
97
+ <div v-if="hasTooltip">
98
+ <slot
99
+ v-if="hasSlotContent(slots['tooltipContent'])"
100
+ name="tooltipContent"
101
+ />
102
+
103
+ <div v-if="tooltipMessage">
104
+ {{ tooltipMessage }}
105
+ </div>
106
+ </div>
72
107
  </template>
73
108
  </AntButton>
74
109
  </template>
@@ -20,14 +20,19 @@ type __VLS_Props = {
20
20
  tooltipDelay?: number;
21
21
  submit?: boolean;
22
22
  dataE2e?: string;
23
+ tooltipMessage?: string;
24
+ disabledTooltipMessage?: string;
25
+ invalidPermissionTooltipMessage?: string;
23
26
  };
24
- declare var __VLS_11: {}, __VLS_14: {}, __VLS_16: {};
27
+ declare var __VLS_11: {}, __VLS_14: {}, __VLS_16: {}, __VLS_18: {};
25
28
  type __VLS_Slots = {} & {
26
29
  default?: (props: typeof __VLS_11) => any;
27
30
  } & {
28
- tooltipContent?: (props: typeof __VLS_14) => any;
31
+ invalidPermissionTooltipContent?: (props: typeof __VLS_14) => any;
29
32
  } & {
30
- invalidPermissionTooltipContent?: (props: typeof __VLS_16) => any;
33
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
34
+ } & {
35
+ tooltipContent?: (props: typeof __VLS_18) => any;
31
36
  };
32
37
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
38
  blur: (...args: any[]) => void;
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canCreate?: boolean;
10
10
  tooltipPosition?: Position;
11
- createTooltipMessage?: string;
12
11
  tooltipState?: InputState;
12
+ tooltipMessage?: string;
13
+ disabledTooltipMessage?: string;
14
+ invalidPermissionTooltipMessage?: string;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canCreate: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -23,8 +23,10 @@ defineProps({
23
23
  expanded: { type: Boolean, required: false },
24
24
  canCreate: { type: Boolean, required: false, default: true },
25
25
  tooltipPosition: { type: String, required: false },
26
- createTooltipMessage: { type: String, required: false },
27
- tooltipState: { type: String, required: false }
26
+ tooltipState: { type: String, required: false },
27
+ tooltipMessage: { type: String, required: false },
28
+ disabledTooltipMessage: { type: String, required: false },
29
+ invalidPermissionTooltipMessage: { type: String, required: false }
28
30
  });
29
31
  </script>
30
32
 
@@ -41,6 +43,9 @@ defineProps({
41
43
  :has-permission="canCreate"
42
44
  :tooltip-position="tooltipPosition"
43
45
  :tooltip-state="tooltipState"
46
+ :tooltip-message="tooltipMessage"
47
+ :disabled-tooltip-message="disabledTooltipMessage"
48
+ :invalid-permission-tooltip-message="invalidPermissionTooltipMessage"
44
49
  data-e2e="create-button"
45
50
  @click="$emit('click')"
46
51
  @blur="$emit('blur')"
@@ -52,16 +57,16 @@ defineProps({
52
57
  Erstellen
53
58
  </template>
54
59
 
55
- <template #invalidPermissionTooltipContent>
56
- <div>
57
- <template v-if="createTooltipMessage">
58
- {{ createTooltipMessage }}
59
- </template>
60
+ <template #tooltipContent>
61
+ <slot name="tooltipContent" />
62
+ </template>
60
63
 
61
- <template v-else>
62
- Du hast keine Berechtigung um Einträge zu erstellen.<br> Bitte kontaktiere deinen Administrator
63
- </template>
64
- </div>
64
+ <template #disabledTooltipContent>
65
+ <slot name="disabledTooltipContent" />
66
+ </template>
67
+
68
+ <template #invalidPermissionTooltipContent>
69
+ <slot name="invalidPermissionTooltipContent" />
65
70
  </template>
66
71
  </ActionButton>
67
72
  </template>
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canCreate?: boolean;
10
10
  tooltipPosition?: Position;
11
- createTooltipMessage?: string;
12
11
  tooltipState?: InputState;
12
+ tooltipMessage?: string;
13
+ disabledTooltipMessage?: string;
14
+ invalidPermissionTooltipMessage?: string;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canCreate: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canDelete?: boolean;
10
10
  tooltipPosition?: Position;
11
- deleteTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canDelete: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -23,7 +23,9 @@ defineProps({
23
23
  expanded: { type: Boolean, required: false },
24
24
  canDelete: { type: Boolean, required: false, default: true },
25
25
  tooltipPosition: { type: String, required: false },
26
- deleteTooltipMessage: { type: String, required: false },
26
+ tooltipMessage: { type: String, required: false },
27
+ disabledTooltipMessage: { type: String, required: false },
28
+ invalidPermissionTooltipMessage: { type: String, required: false },
27
29
  tooltipState: { type: String, required: false }
28
30
  });
29
31
  </script>
@@ -41,6 +43,9 @@ defineProps({
41
43
  :has-permission="canDelete"
42
44
  :tooltip-position="tooltipPosition"
43
45
  :tooltip-state="tooltipState"
46
+ :tooltip-message="tooltipMessage"
47
+ :disabled-tooltip-message="disabledTooltipMessage"
48
+ :invalid-permission-tooltip-message="invalidPermissionTooltipMessage"
44
49
  data-e2e="delete-button"
45
50
  @click="$emit('click')"
46
51
  @blur="$emit('blur')"
@@ -52,16 +57,16 @@ defineProps({
52
57
  Löschen
53
58
  </template>
54
59
 
55
- <template #invalidPermissionTooltipContent>
56
- <div>
57
- <template v-if="deleteTooltipMessage">
58
- {{ deleteTooltipMessage }}
59
- </template>
60
+ <template #tooltipContent>
61
+ <slot name="tooltipContent" />
62
+ </template>
60
63
 
61
- <template v-else>
62
- Du hast keine Berechtigung um Einträge zu löschen.<br> Bitte kontaktiere deinen Administrator
63
- </template>
64
- </div>
64
+ <template #disabledTooltipContent>
65
+ <slot name="disabledTooltipContent" />
66
+ </template>
67
+
68
+ <template #invalidPermissionTooltipContent>
69
+ <slot name="invalidPermissionTooltipContent" />
65
70
  </template>
66
71
  </ActionButton>
67
72
  </template>
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canDelete?: boolean;
10
10
  tooltipPosition?: Position;
11
- deleteTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canDelete: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canDuplicate?: boolean;
10
10
  tooltipPosition?: Position;
11
- duplicateTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canDuplicate: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -23,7 +23,9 @@ defineProps({
23
23
  expanded: { type: Boolean, required: false },
24
24
  canDuplicate: { type: Boolean, required: false, default: true },
25
25
  tooltipPosition: { type: String, required: false },
26
- duplicateTooltipMessage: { type: String, required: false },
26
+ tooltipMessage: { type: String, required: false },
27
+ disabledTooltipMessage: { type: String, required: false },
28
+ invalidPermissionTooltipMessage: { type: String, required: false },
27
29
  tooltipState: { type: String, required: false }
28
30
  });
29
31
  </script>
@@ -41,6 +43,9 @@ defineProps({
41
43
  :has-permission="canDuplicate"
42
44
  :tooltip-position="tooltipPosition"
43
45
  :tooltip-state="tooltipState"
46
+ :tooltip-message="tooltipMessage"
47
+ :disabled-tooltip-message="disabledTooltipMessage"
48
+ :invalid-permission-tooltip-message="invalidPermissionTooltipMessage"
44
49
  data-e2e="duplicate-button"
45
50
  @click="$emit('click')"
46
51
  @blur="$emit('blur')"
@@ -52,16 +57,16 @@ defineProps({
52
57
  Duplizieren
53
58
  </template>
54
59
 
55
- <template #invalidPermissionTooltipContent>
56
- <div>
57
- <template v-if="duplicateTooltipMessage">
58
- {{ duplicateTooltipMessage }}
59
- </template>
60
+ <template #tooltipContent>
61
+ <slot name="tooltipContent" />
62
+ </template>
60
63
 
61
- <template v-else>
62
- Du hast keine Berechtigung um Einträge zu duplizieren.<br> Bitte kontaktiere deinen Administrator
63
- </template>
64
- </div>
64
+ <template #disabledTooltipContent>
65
+ <slot name="disabledTooltipContent" />
66
+ </template>
67
+
68
+ <template #invalidPermissionTooltipContent>
69
+ <slot name="invalidPermissionTooltipContent" />
65
70
  </template>
66
71
  </ActionButton>
67
72
  </template>
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canDuplicate?: boolean;
10
10
  tooltipPosition?: Position;
11
- duplicateTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canDuplicate: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canEdit?: boolean;
10
10
  tooltipPosition?: Position;
11
- editTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canEdit: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -23,7 +23,9 @@ defineProps({
23
23
  expanded: { type: Boolean, required: false },
24
24
  canEdit: { type: Boolean, required: false, default: true },
25
25
  tooltipPosition: { type: String, required: false },
26
- editTooltipMessage: { type: String, required: false },
26
+ tooltipMessage: { type: String, required: false },
27
+ disabledTooltipMessage: { type: String, required: false },
28
+ invalidPermissionTooltipMessage: { type: String, required: false },
27
29
  tooltipState: { type: String, required: false }
28
30
  });
29
31
  </script>
@@ -41,6 +43,9 @@ defineProps({
41
43
  :has-permission="canEdit"
42
44
  :tooltip-position="tooltipPosition"
43
45
  :tooltip-state="tooltipState"
46
+ :tooltip-message="tooltipMessage"
47
+ :disabled-tooltip-message="disabledTooltipMessage"
48
+ :invalid-permission-tooltip-message="invalidPermissionTooltipMessage"
44
49
  data-e2e="edit-button"
45
50
  @click="$emit('click')"
46
51
  @blur="$emit('blur')"
@@ -52,16 +57,16 @@ defineProps({
52
57
  Bearbeiten
53
58
  </template>
54
59
 
55
- <template #invalidPermissionTooltipContent>
56
- <div>
57
- <template v-if="editTooltipMessage">
58
- {{ editTooltipMessage }}
59
- </template>
60
+ <template #tooltipContent>
61
+ <slot name="tooltipContent" />
62
+ </template>
60
63
 
61
- <template v-else>
62
- Du hast keine Berechtigung um Einträge zu bearbeiten.<br> Bitte kontaktiere deinen Administrator
63
- </template>
64
- </div>
64
+ <template #disabledTooltipContent>
65
+ <slot name="disabledTooltipContent" />
66
+ </template>
67
+
68
+ <template #invalidPermissionTooltipContent>
69
+ <slot name="invalidPermissionTooltipContent" />
65
70
  </template>
66
71
  </ActionButton>
67
72
  </template>
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canEdit?: boolean;
10
10
  tooltipPosition?: Position;
11
- editTooltipMessage?: string;
11
+ tooltipMessage?: string;
12
+ disabledTooltipMessage?: string;
13
+ invalidPermissionTooltipMessage?: string;
12
14
  tooltipState?: InputState;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canEdit: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -8,10 +8,20 @@ type __VLS_Props = {
8
8
  expanded?: boolean;
9
9
  canSave?: boolean;
10
10
  tooltipPosition?: Position;
11
- saveTooltipMessage?: string;
12
11
  tooltipState?: InputState;
12
+ tooltipMessage?: string;
13
+ disabledTooltipMessage?: string;
14
+ invalidPermissionTooltipMessage?: string;
13
15
  };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_13: {}, __VLS_16: {}, __VLS_19: {};
17
+ type __VLS_Slots = {} & {
18
+ tooltipContent?: (props: typeof __VLS_13) => any;
19
+ } & {
20
+ disabledTooltipContent?: (props: typeof __VLS_16) => any;
21
+ } & {
22
+ invalidPermissionTooltipContent?: (props: typeof __VLS_19) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
25
  blur: (...args: any[]) => void;
16
26
  click: (...args: any[]) => void;
17
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -21,5 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
31
  iconVariant: boolean;
22
32
  canSave: boolean;
23
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
35
  declare const _default: typeof __VLS_export;
25
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };