@webitel/ui-sdk 3.1.7 → 3.1.8
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/ui-sdk.common.js +5761 -1
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +5761 -1
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +27 -4
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/index.js +2 -0
- package/src/components/organisms/wt-page-header/__tests__/wt-page-header.spec.js +9 -0
- package/src/components/organisms/wt-page-header/wt-page-header.vue +74 -0
package/package.json
CHANGED
package/src/components/index.js
CHANGED
|
@@ -53,6 +53,7 @@ import WtTable from './organisms/wt-table/wt-table.vue';
|
|
|
53
53
|
import WtTableActions from './organisms/wt-table-actions/wt-table-actions.vue';
|
|
54
54
|
import WtTableColumnSelect from './organisms/wt-table-column-select/wt-table-column-select.vue';
|
|
55
55
|
import WtIconAction from './organisms/wt-icon-action/wt-icon-action.vue';
|
|
56
|
+
import WtPageHeader from './organisms/wt-page-header/wt-page-header.vue';
|
|
56
57
|
|
|
57
58
|
const Components = {
|
|
58
59
|
WtAvatar,
|
|
@@ -107,6 +108,7 @@ const Components = {
|
|
|
107
108
|
WtCopyAction,
|
|
108
109
|
WtLoadBar,
|
|
109
110
|
WtIconAction,
|
|
111
|
+
WtPageHeader,
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
export default Components;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtPageHeader from '../wt-page-header.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtPageHeader', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtPageHeader);
|
|
7
|
+
expect(wrapper.isVisible()).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-headline>
|
|
3
|
+
<template v-slot:title-wrapper>
|
|
4
|
+
<slot>
|
|
5
|
+
<template slot="title">
|
|
6
|
+
<slot name="title"></slot>
|
|
7
|
+
</template>
|
|
8
|
+
</slot>
|
|
9
|
+
</template>
|
|
10
|
+
<template v-slot:actions>
|
|
11
|
+
<slot name="actions"></slot>
|
|
12
|
+
<slot name="primary-action">
|
|
13
|
+
<wt-button
|
|
14
|
+
v-if="!hidePrimary"
|
|
15
|
+
:disabled="primaryDisabled"
|
|
16
|
+
@click="primaryAction"
|
|
17
|
+
>
|
|
18
|
+
{{ primaryText || t('reusable.add') }}
|
|
19
|
+
</wt-button>
|
|
20
|
+
</slot>
|
|
21
|
+
<wt-button
|
|
22
|
+
v-if="!hideSecondary"
|
|
23
|
+
color="secondary"
|
|
24
|
+
@click="secondaryAction"
|
|
25
|
+
>
|
|
26
|
+
{{ t('reusable.delete') }}
|
|
27
|
+
</wt-button>
|
|
28
|
+
</template>
|
|
29
|
+
</wt-headline>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup>
|
|
33
|
+
import { useI18n } from 'vue-i18n';
|
|
34
|
+
import { computed } from 'vue';
|
|
35
|
+
|
|
36
|
+
const { t } = useI18n();
|
|
37
|
+
|
|
38
|
+
const props = defineProps({
|
|
39
|
+
hidePrimary: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
primaryText: {
|
|
44
|
+
type: String,
|
|
45
|
+
},
|
|
46
|
+
primaryAction: {
|
|
47
|
+
type: Function,
|
|
48
|
+
},
|
|
49
|
+
primaryDisabled: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
secondaryText: {
|
|
54
|
+
type: String,
|
|
55
|
+
},
|
|
56
|
+
secondaryAction: {
|
|
57
|
+
type: Function,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const hideSecondary = computed(() => !(props.secondaryAction || props.secondaryText));
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="scss" scoped>
|
|
65
|
+
.wt-headline {
|
|
66
|
+
.wt-button {
|
|
67
|
+
margin-left: var(--spacing-sm);
|
|
68
|
+
|
|
69
|
+
&:first-child {
|
|
70
|
+
margin-left: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|