@antify/template-module 0.0.2
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/README.md +163 -0
- package/dist/module.d.mts +10 -0
- package/dist/module.d.ts +10 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +101 -0
- package/dist/runtime/assets/antify.css +1 -0
- package/dist/runtime/components/Main.mdx +6 -0
- package/dist/runtime/components/buttons/ActionButton.d.vue.ts +52 -0
- package/dist/runtime/components/buttons/ActionButton.vue +74 -0
- package/dist/runtime/components/buttons/ActionButton.vue.d.ts +52 -0
- package/dist/runtime/components/buttons/CreateButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/CreateButton.vue +67 -0
- package/dist/runtime/components/buttons/CreateButton.vue.d.ts +25 -0
- package/dist/runtime/components/buttons/DeleteButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/DeleteButton.vue +67 -0
- package/dist/runtime/components/buttons/DeleteButton.vue.d.ts +25 -0
- package/dist/runtime/components/buttons/DuplicateButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/DuplicateButton.vue +67 -0
- package/dist/runtime/components/buttons/DuplicateButton.vue.d.ts +25 -0
- package/dist/runtime/components/buttons/EditButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/EditButton.vue +67 -0
- package/dist/runtime/components/buttons/EditButton.vue.d.ts +25 -0
- package/dist/runtime/components/buttons/SaveAndNewButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/SaveAndNewButton.vue +70 -0
- package/dist/runtime/components/buttons/SaveAndNewButton.vue.d.ts +25 -0
- package/dist/runtime/components/buttons/SaveButton.d.vue.ts +25 -0
- package/dist/runtime/components/buttons/SaveButton.vue +68 -0
- package/dist/runtime/components/buttons/SaveButton.vue.d.ts +25 -0
- package/dist/runtime/components/crud/Crud.d.vue.ts +24 -0
- package/dist/runtime/components/crud/Crud.vue +43 -0
- package/dist/runtime/components/crud/Crud.vue.d.ts +24 -0
- package/dist/runtime/components/crud/CrudDetail.d.vue.ts +17 -0
- package/dist/runtime/components/crud/CrudDetail.vue +14 -0
- package/dist/runtime/components/crud/CrudDetail.vue.d.ts +17 -0
- package/dist/runtime/components/crud/CrudDetailActions.d.vue.ts +40 -0
- package/dist/runtime/components/crud/CrudDetailActions.vue +72 -0
- package/dist/runtime/components/crud/CrudDetailActions.vue.d.ts +40 -0
- package/dist/runtime/components/crud/CrudDetailNav.d.vue.ts +40 -0
- package/dist/runtime/components/crud/CrudDetailNav.vue +65 -0
- package/dist/runtime/components/crud/CrudDetailNav.vue.d.ts +40 -0
- package/dist/runtime/components/crud/CrudTableFilter.d.vue.ts +48 -0
- package/dist/runtime/components/crud/CrudTableFilter.vue +153 -0
- package/dist/runtime/components/crud/CrudTableFilter.vue.d.ts +48 -0
- package/dist/runtime/components/crud/CrudTableNav.d.vue.ts +23 -0
- package/dist/runtime/components/crud/CrudTableNav.vue +121 -0
- package/dist/runtime/components/crud/CrudTableNav.vue.d.ts +23 -0
- package/dist/runtime/components/dialogs/DeleteDialog.d.vue.ts +15 -0
- package/dist/runtime/components/dialogs/DeleteDialog.vue +64 -0
- package/dist/runtime/components/dialogs/DeleteDialog.vue.d.ts +15 -0
- package/dist/runtime/components/index.d.ts +15 -0
- package/dist/runtime/components/index.js +30 -0
- package/dist/runtime/composables/useUiClient.d.ts +90 -0
- package/dist/runtime/composables/useUiClient.js +151 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/plugins/template-module.d.ts +48 -0
- package/dist/runtime/plugins/template-module.js +14 -0
- package/dist/runtime/types.d.ts +1 -0
- package/dist/runtime/types.js +0 -0
- package/dist/runtime/utils.d.ts +15 -0
- package/dist/runtime/utils.js +22 -0
- package/dist/types.d.mts +9 -0
- package/package.json +60 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionButton from "./ActionButton.vue";
|
|
3
|
+
import {
|
|
4
|
+
Position,
|
|
5
|
+
Size,
|
|
6
|
+
Grouped,
|
|
7
|
+
State,
|
|
8
|
+
InputState
|
|
9
|
+
} from "@antify/ui";
|
|
10
|
+
import {
|
|
11
|
+
faTrash
|
|
12
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
defineEmits([
|
|
14
|
+
"click",
|
|
15
|
+
"blur"
|
|
16
|
+
]);
|
|
17
|
+
defineProps({
|
|
18
|
+
iconVariant: { type: Boolean, required: false, default: false },
|
|
19
|
+
size: { type: String, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
grouped: { type: String, required: false },
|
|
22
|
+
skeleton: { type: Boolean, required: false },
|
|
23
|
+
expanded: { type: Boolean, required: false },
|
|
24
|
+
canDelete: { type: Boolean, required: false, default: true },
|
|
25
|
+
tooltipPosition: { type: String, required: false },
|
|
26
|
+
deleteTooltipMessage: { type: String, required: false },
|
|
27
|
+
tooltipState: { type: String, required: false }
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<ActionButton
|
|
33
|
+
:filled="false"
|
|
34
|
+
:state="State.danger"
|
|
35
|
+
:size="size"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
:icon-left="iconVariant ? faTrash : void 0"
|
|
38
|
+
:grouped="grouped"
|
|
39
|
+
:skeleton="skeleton"
|
|
40
|
+
:expanded="expanded"
|
|
41
|
+
:has-permission="canDelete"
|
|
42
|
+
:tooltip-position="tooltipPosition"
|
|
43
|
+
:tooltip-state="tooltipState"
|
|
44
|
+
data-e2e="delete-button"
|
|
45
|
+
@click="$emit('click')"
|
|
46
|
+
@blur="$emit('blur')"
|
|
47
|
+
>
|
|
48
|
+
<template
|
|
49
|
+
v-if="!iconVariant"
|
|
50
|
+
#default
|
|
51
|
+
>
|
|
52
|
+
Löschen
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #invalidPermissionTooltipContent>
|
|
56
|
+
<div>
|
|
57
|
+
<template v-if="deleteTooltipMessage">
|
|
58
|
+
{{ deleteTooltipMessage }}
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template v-else>
|
|
62
|
+
Du hast keine Berechtigung um Einträge zu löschen.<br> Bitte kontaktiere deinen Administrator
|
|
63
|
+
</template>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</ActionButton>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canDelete?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
deleteTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canDelete: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canDuplicate?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
duplicateTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canDuplicate: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionButton from "./ActionButton.vue";
|
|
3
|
+
import {
|
|
4
|
+
Position,
|
|
5
|
+
Size,
|
|
6
|
+
Grouped,
|
|
7
|
+
State,
|
|
8
|
+
InputState
|
|
9
|
+
} from "@antify/ui";
|
|
10
|
+
import {
|
|
11
|
+
faCopy
|
|
12
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
defineEmits([
|
|
14
|
+
"click",
|
|
15
|
+
"blur"
|
|
16
|
+
]);
|
|
17
|
+
defineProps({
|
|
18
|
+
iconVariant: { type: Boolean, required: false, default: false },
|
|
19
|
+
size: { type: String, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
grouped: { type: String, required: false },
|
|
22
|
+
skeleton: { type: Boolean, required: false },
|
|
23
|
+
expanded: { type: Boolean, required: false },
|
|
24
|
+
canDuplicate: { type: Boolean, required: false, default: true },
|
|
25
|
+
tooltipPosition: { type: String, required: false },
|
|
26
|
+
duplicateTooltipMessage: { type: String, required: false },
|
|
27
|
+
tooltipState: { type: String, required: false }
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<ActionButton
|
|
33
|
+
:filled="false"
|
|
34
|
+
:state="State.base"
|
|
35
|
+
:size="size"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
:icon-left="iconVariant ? faCopy : void 0"
|
|
38
|
+
:grouped="grouped"
|
|
39
|
+
:skeleton="skeleton"
|
|
40
|
+
:expanded="expanded"
|
|
41
|
+
:has-permission="canDuplicate"
|
|
42
|
+
:tooltip-position="tooltipPosition"
|
|
43
|
+
:tooltip-state="tooltipState"
|
|
44
|
+
data-e2e="duplicate-button"
|
|
45
|
+
@click="$emit('click')"
|
|
46
|
+
@blur="$emit('blur')"
|
|
47
|
+
>
|
|
48
|
+
<template
|
|
49
|
+
v-if="!iconVariant"
|
|
50
|
+
#default
|
|
51
|
+
>
|
|
52
|
+
Duplizieren
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #invalidPermissionTooltipContent>
|
|
56
|
+
<div>
|
|
57
|
+
<template v-if="duplicateTooltipMessage">
|
|
58
|
+
{{ duplicateTooltipMessage }}
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template v-else>
|
|
62
|
+
Du hast keine Berechtigung um Einträge zu duplizieren.<br> Bitte kontaktiere deinen Administrator
|
|
63
|
+
</template>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</ActionButton>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canDuplicate?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
duplicateTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canDuplicate: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canEdit?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
editTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canEdit: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionButton from "./ActionButton.vue";
|
|
3
|
+
import {
|
|
4
|
+
Position,
|
|
5
|
+
Size,
|
|
6
|
+
Grouped,
|
|
7
|
+
State,
|
|
8
|
+
InputState
|
|
9
|
+
} from "@antify/ui";
|
|
10
|
+
import {
|
|
11
|
+
faPencil
|
|
12
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
defineEmits([
|
|
14
|
+
"click",
|
|
15
|
+
"blur"
|
|
16
|
+
]);
|
|
17
|
+
defineProps({
|
|
18
|
+
iconVariant: { type: Boolean, required: false, default: false },
|
|
19
|
+
size: { type: String, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
grouped: { type: String, required: false },
|
|
22
|
+
skeleton: { type: Boolean, required: false },
|
|
23
|
+
expanded: { type: Boolean, required: false },
|
|
24
|
+
canEdit: { type: Boolean, required: false, default: true },
|
|
25
|
+
tooltipPosition: { type: String, required: false },
|
|
26
|
+
editTooltipMessage: { type: String, required: false },
|
|
27
|
+
tooltipState: { type: String, required: false }
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<ActionButton
|
|
33
|
+
:filled="false"
|
|
34
|
+
:state="State.base"
|
|
35
|
+
:size="size"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
:icon-left="iconVariant ? faPencil : void 0"
|
|
38
|
+
:grouped="grouped"
|
|
39
|
+
:skeleton="skeleton"
|
|
40
|
+
:expanded="expanded"
|
|
41
|
+
:has-permission="canEdit"
|
|
42
|
+
:tooltip-position="tooltipPosition"
|
|
43
|
+
:tooltip-state="tooltipState"
|
|
44
|
+
data-e2e="edit-button"
|
|
45
|
+
@click="$emit('click')"
|
|
46
|
+
@blur="$emit('blur')"
|
|
47
|
+
>
|
|
48
|
+
<template
|
|
49
|
+
v-if="!iconVariant"
|
|
50
|
+
#default
|
|
51
|
+
>
|
|
52
|
+
Bearbeiten
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #invalidPermissionTooltipContent>
|
|
56
|
+
<div>
|
|
57
|
+
<template v-if="editTooltipMessage">
|
|
58
|
+
{{ editTooltipMessage }}
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template v-else>
|
|
62
|
+
Du hast keine Berechtigung um Einträge zu bearbeiten.<br> Bitte kontaktiere deinen Administrator
|
|
63
|
+
</template>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</ActionButton>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canEdit?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
editTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canEdit: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canSave?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
saveTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canSave: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionButton from "./ActionButton.vue";
|
|
3
|
+
import {
|
|
4
|
+
Position,
|
|
5
|
+
Size,
|
|
6
|
+
Grouped,
|
|
7
|
+
State,
|
|
8
|
+
InputState
|
|
9
|
+
} from "@antify/ui";
|
|
10
|
+
import {
|
|
11
|
+
faFloppyDisk,
|
|
12
|
+
faPlus
|
|
13
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
14
|
+
defineEmits([
|
|
15
|
+
"click",
|
|
16
|
+
"blur"
|
|
17
|
+
]);
|
|
18
|
+
defineProps({
|
|
19
|
+
iconVariant: { type: Boolean, required: false, default: false },
|
|
20
|
+
size: { type: String, required: false },
|
|
21
|
+
disabled: { type: Boolean, required: false },
|
|
22
|
+
grouped: { type: String, required: false },
|
|
23
|
+
skeleton: { type: Boolean, required: false },
|
|
24
|
+
expanded: { type: Boolean, required: false },
|
|
25
|
+
canSave: { type: Boolean, required: false, default: true },
|
|
26
|
+
tooltipPosition: { type: String, required: false },
|
|
27
|
+
saveTooltipMessage: { type: String, required: false },
|
|
28
|
+
tooltipState: { type: String, required: false }
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<ActionButton
|
|
34
|
+
:filled="true"
|
|
35
|
+
:state="State.primary"
|
|
36
|
+
:size="size"
|
|
37
|
+
:disabled="disabled"
|
|
38
|
+
:icon-left="iconVariant ? faFloppyDisk : void 0"
|
|
39
|
+
:icon-right="iconVariant ? faPlus : void 0"
|
|
40
|
+
:grouped="grouped"
|
|
41
|
+
:skeleton="skeleton"
|
|
42
|
+
:expanded="expanded"
|
|
43
|
+
:submit="true"
|
|
44
|
+
:has-permission="canSave"
|
|
45
|
+
:tooltip-position="tooltipPosition"
|
|
46
|
+
:tooltip-state="tooltipState"
|
|
47
|
+
data-e2e="save-and-new-button"
|
|
48
|
+
@click="$emit('click')"
|
|
49
|
+
@blur="$emit('blur')"
|
|
50
|
+
>
|
|
51
|
+
<template
|
|
52
|
+
v-if="!iconVariant"
|
|
53
|
+
#default
|
|
54
|
+
>
|
|
55
|
+
Speichern und neu
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<template #invalidPermissionTooltipContent>
|
|
59
|
+
<div>
|
|
60
|
+
<template v-if="saveTooltipMessage">
|
|
61
|
+
{{ saveTooltipMessage }}
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<template v-else>
|
|
65
|
+
Du hast keine Berechtigung um Einträge zu speichern.<br> Bitte kontaktiere deinen Administrator
|
|
66
|
+
</template>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
</ActionButton>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canSave?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
saveTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canSave: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canSave?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
saveTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canSave: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionButton from "./ActionButton.vue";
|
|
3
|
+
import {
|
|
4
|
+
Position,
|
|
5
|
+
Size,
|
|
6
|
+
Grouped,
|
|
7
|
+
State,
|
|
8
|
+
InputState
|
|
9
|
+
} from "@antify/ui";
|
|
10
|
+
import {
|
|
11
|
+
faFloppyDisk
|
|
12
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
defineEmits([
|
|
14
|
+
"click",
|
|
15
|
+
"blur"
|
|
16
|
+
]);
|
|
17
|
+
defineProps({
|
|
18
|
+
iconVariant: { type: Boolean, required: false, default: false },
|
|
19
|
+
size: { type: String, required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
grouped: { type: String, required: false },
|
|
22
|
+
skeleton: { type: Boolean, required: false },
|
|
23
|
+
expanded: { type: Boolean, required: false },
|
|
24
|
+
canSave: { type: Boolean, required: false, default: true },
|
|
25
|
+
tooltipPosition: { type: String, required: false },
|
|
26
|
+
saveTooltipMessage: { type: String, required: false },
|
|
27
|
+
tooltipState: { type: String, required: false }
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<ActionButton
|
|
33
|
+
:filled="true"
|
|
34
|
+
:state="State.primary"
|
|
35
|
+
:size="size"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
:icon-left="iconVariant ? faFloppyDisk : void 0"
|
|
38
|
+
:grouped="grouped"
|
|
39
|
+
:skeleton="skeleton"
|
|
40
|
+
:expanded="expanded"
|
|
41
|
+
:submit="true"
|
|
42
|
+
:has-permission="canSave"
|
|
43
|
+
:tooltip-position="tooltipPosition"
|
|
44
|
+
:tooltip-state="tooltipState"
|
|
45
|
+
data-e2e="save-button"
|
|
46
|
+
@click="$emit('click')"
|
|
47
|
+
@blur="$emit('blur')"
|
|
48
|
+
>
|
|
49
|
+
<template
|
|
50
|
+
v-if="!iconVariant"
|
|
51
|
+
#default
|
|
52
|
+
>
|
|
53
|
+
Speichern
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<template #invalidPermissionTooltipContent>
|
|
57
|
+
<div>
|
|
58
|
+
<template v-if="saveTooltipMessage">
|
|
59
|
+
{{ saveTooltipMessage }}
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<template v-else>
|
|
63
|
+
Du hast keine Berechtigung um Einträge zu speichern.<br> Bitte kontaktiere deinen Administrator
|
|
64
|
+
</template>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
</ActionButton>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Position, Size, Grouped, InputState } from '@antify/ui';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
iconVariant?: boolean;
|
|
4
|
+
size?: Size;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
grouped?: Grouped;
|
|
7
|
+
skeleton?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
canSave?: boolean;
|
|
10
|
+
tooltipPosition?: Position;
|
|
11
|
+
saveTooltipMessage?: string;
|
|
12
|
+
tooltipState?: InputState;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
blur: (...args: any[]) => void;
|
|
16
|
+
click: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
iconVariant: boolean;
|
|
22
|
+
canSave: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showDetail?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_13: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
'search-section'?: (props: typeof __VLS_1) => any;
|
|
7
|
+
} & {
|
|
8
|
+
'table-section'?: (props: typeof __VLS_3) => any;
|
|
9
|
+
} & {
|
|
10
|
+
'table-nav-section'?: (props: typeof __VLS_5) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_13) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
showDetail: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
showDetail: { type: Boolean, required: false, default: false }
|
|
4
|
+
});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div
|
|
9
|
+
class="flex w-full h-full"
|
|
10
|
+
data-e2e="crud"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
class="left-content h-full flex flex-col bg-base-300 gap-px overflow-hidden"
|
|
14
|
+
:class="{ 'w-[40rem]': showDetail, 'w-full': !showDetail }"
|
|
15
|
+
>
|
|
16
|
+
<div class="bg-white">
|
|
17
|
+
<slot name="search-section" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="bg-white grow h-px overflow-hidden">
|
|
21
|
+
<slot name="table-section" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="bg-white">
|
|
25
|
+
<slot name="table-nav-section" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<Transition name="right-content">
|
|
30
|
+
<div
|
|
31
|
+
v-if="showDetail"
|
|
32
|
+
class="flex flex-col gap-px border-l border-base-300 overflow-hidden"
|
|
33
|
+
:class="{ 'w-full': showDetail }"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</div>
|
|
37
|
+
</Transition>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
.left-content{transition:width .5s ease-in-out,opacity .5s ease}.right-content-enter-active{transition:width .5s ease-in-out,opacity .5s ease .3s}.right-content-enter-from{opacity:0;width:0}.right-content-enter-to{opacity:1;width:100%}.right-content-leave-active{transition:width .5s ease-in-out,opacity .2s ease}.right-content-leave-from{opacity:1;width:100%}.right-content-leave-to{opacity:0;width:0}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showDetail?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_13: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
'search-section'?: (props: typeof __VLS_1) => any;
|
|
7
|
+
} & {
|
|
8
|
+
'table-section'?: (props: typeof __VLS_3) => any;
|
|
9
|
+
} & {
|
|
10
|
+
'table-nav-section'?: (props: typeof __VLS_5) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_13) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
showDetail: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|