@vc-shell/framework 1.0.281 → 1.0.282
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/CHANGELOG.md +10 -0
- package/dist/framework.js +13040 -12977
- package/dist/index.css +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +4 -4
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/core/notification.d.ts +5 -5
- package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
- package/dist/shared/components/notifications/types/index.d.ts +3 -1
- package/dist/shared/components/notifications/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +34 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +150 -30
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +20 -8
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/notifications/components/notification-container/index.ts +18 -3
- package/shared/components/notifications/core/notification.ts +7 -7
- package/shared/components/notifications/types/index.ts +8 -1
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +23 -1
- package/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue +3 -3
- package/ui/components/molecules/vc-notification/vc-notification.vue +6 -2
- package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +82 -0
- package/ui/components/organisms/vc-table/vc-table.vue +21 -63
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
|
+
|
|
4
|
+
import { VNode, DefineComponent } from "vue";
|
|
5
|
+
|
|
1
6
|
export type NotificationType = "success" | "error" | "warning" | "default";
|
|
2
7
|
|
|
3
8
|
export interface NotificationOptions {
|
|
4
9
|
limit?: number;
|
|
5
10
|
pauseOnHover?: boolean;
|
|
6
11
|
timeout?: number | boolean;
|
|
7
|
-
content?:
|
|
12
|
+
content?: Content;
|
|
8
13
|
notificationId?: number | string;
|
|
9
14
|
type?: NotificationType;
|
|
10
15
|
onOpen?: <T>(payload: T) => void;
|
|
@@ -17,3 +22,5 @@ export interface NotificationOptions {
|
|
|
17
22
|
export interface InternalNotificationOptions extends NotificationOptions {
|
|
18
23
|
closeNotification?(): void;
|
|
19
24
|
}
|
|
25
|
+
|
|
26
|
+
export type Content = string | VNode | DefineComponent<{}, {}, any>;
|
|
@@ -137,7 +137,29 @@
|
|
|
137
137
|
/>
|
|
138
138
|
</template>
|
|
139
139
|
|
|
140
|
-
<!-- Override
|
|
140
|
+
<!-- Override header -->
|
|
141
|
+
<template
|
|
142
|
+
v-if="tableTemplates?.header"
|
|
143
|
+
#header="headerData"
|
|
144
|
+
>
|
|
145
|
+
<component
|
|
146
|
+
:is="tableTemplates.header"
|
|
147
|
+
:context="headerData"
|
|
148
|
+
:blade-context="bladeContext"
|
|
149
|
+
></component>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<!-- Override footer -->
|
|
153
|
+
<template
|
|
154
|
+
v-if="tableTemplates?.footer"
|
|
155
|
+
#footer="footerData"
|
|
156
|
+
>
|
|
157
|
+
<component
|
|
158
|
+
:is="tableTemplates.footer"
|
|
159
|
+
:context="footerData"
|
|
160
|
+
:blade-context="bladeContext"
|
|
161
|
+
></component>
|
|
162
|
+
</template>
|
|
141
163
|
|
|
142
164
|
<template
|
|
143
165
|
v-if="tableTemplates?.mobileView"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
|
|
4
4
|
:style="backgroundImageHandler"
|
|
5
5
|
>
|
|
6
|
-
<
|
|
6
|
+
<ChangePassComponent :forced="forced"> </ChangePassComponent>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
@@ -13,10 +13,10 @@ import { useRouter } from "vue-router";
|
|
|
13
13
|
|
|
14
14
|
const router = useRouter();
|
|
15
15
|
|
|
16
|
-
const forced = router.currentRoute.value.meta?.forced;
|
|
16
|
+
const forced = router.currentRoute.value.meta?.forced as boolean | undefined;
|
|
17
17
|
const bgimage = router.currentRoute.value.meta?.bgimage;
|
|
18
18
|
|
|
19
|
-
import { ChangePassword } from "../../../../components/change-password";
|
|
19
|
+
import { ChangePassword as ChangePassComponent } from "../../../../components/change-password";
|
|
20
20
|
|
|
21
21
|
export interface Props {
|
|
22
22
|
background?: string;
|
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
class="tw-mr-2"
|
|
15
15
|
></VcIcon>
|
|
16
16
|
<div
|
|
17
|
+
v-if="typeof content === 'string'"
|
|
17
18
|
class="vc-notification__content tw-text-[color:var(--notification-content-color)] tw-whitespace-pre-line tw-overflow-auto tw-max-h-[100px]"
|
|
18
19
|
>
|
|
19
20
|
{{ content }}
|
|
20
21
|
</div>
|
|
22
|
+
<div v-else>
|
|
23
|
+
<component :is="content"></component>
|
|
24
|
+
</div>
|
|
21
25
|
</div>
|
|
22
26
|
<VcIcon
|
|
23
27
|
icon="fas fa-times"
|
|
@@ -29,12 +33,12 @@
|
|
|
29
33
|
</template>
|
|
30
34
|
|
|
31
35
|
<script lang="ts" setup>
|
|
32
|
-
import { NotificationType } from "./../../../../shared/components/notifications";
|
|
36
|
+
import { Content, NotificationType } from "./../../../../shared/components/notifications";
|
|
33
37
|
import { VcIcon } from "./../../";
|
|
34
38
|
import { Ref, onMounted, ref, toRefs, watch } from "vue";
|
|
35
39
|
|
|
36
40
|
export interface Props {
|
|
37
|
-
content?:
|
|
41
|
+
content?: Content;
|
|
38
42
|
notificationId?: number | string;
|
|
39
43
|
updateId?: number | string;
|
|
40
44
|
type?: NotificationType;
|
package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-box-border"
|
|
4
|
+
:class="{
|
|
5
|
+
'tw-px-4 tw-py-2 tw-border-[color:#eef0f2] tw-border-solid tw-border-b ': $isMobile.value,
|
|
6
|
+
'tw-p-4': $isDesktop.value,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<!-- Table filter mobile button -->
|
|
10
|
+
<div
|
|
11
|
+
v-if="$isMobile.value && $slots['filters']"
|
|
12
|
+
class="tw-mr-3"
|
|
13
|
+
>
|
|
14
|
+
<VcTableFilter :counter="activeFilterCount">
|
|
15
|
+
<template #default="{ closePanel }">
|
|
16
|
+
<slot
|
|
17
|
+
name="filters"
|
|
18
|
+
:close-panel="closePanel"
|
|
19
|
+
></slot>
|
|
20
|
+
</template>
|
|
21
|
+
</VcTableFilter>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<!-- Table search input -->
|
|
25
|
+
<VcInput
|
|
26
|
+
ref="searchInput"
|
|
27
|
+
class="tw-grow tw-basis-0"
|
|
28
|
+
:placeholder="searchPlaceholder || $t('COMPONENTS.ORGANISMS.VC_TABLE.SEARCH')"
|
|
29
|
+
clearable
|
|
30
|
+
name="table_search"
|
|
31
|
+
:model-value="searchValue"
|
|
32
|
+
@update:model-value="$emit('search:change', $event as string)"
|
|
33
|
+
>
|
|
34
|
+
<template #prepend-inner="{ focus }">
|
|
35
|
+
<VcIcon
|
|
36
|
+
icon="fas fa-search"
|
|
37
|
+
class="tw-text-[color:#d2d4d7]"
|
|
38
|
+
@click="focus?.()"
|
|
39
|
+
></VcIcon>
|
|
40
|
+
</template>
|
|
41
|
+
</VcInput>
|
|
42
|
+
|
|
43
|
+
<!-- Table filter desktop button -->
|
|
44
|
+
<div
|
|
45
|
+
v-if="$isDesktop.value && $slots['filters']"
|
|
46
|
+
class="tw-ml-3"
|
|
47
|
+
>
|
|
48
|
+
<VcTableFilter
|
|
49
|
+
:title="$t('COMPONENTS.ORGANISMS.VC_TABLE.ALL_FILTERS')"
|
|
50
|
+
:counter="activeFilterCount"
|
|
51
|
+
:parent-expanded="expanded"
|
|
52
|
+
>
|
|
53
|
+
<template #default="{ closePanel }">
|
|
54
|
+
<slot
|
|
55
|
+
name="filters"
|
|
56
|
+
:close-panel="closePanel"
|
|
57
|
+
></slot>
|
|
58
|
+
</template>
|
|
59
|
+
</VcTableFilter>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script lang="ts" setup>
|
|
65
|
+
import VcTableFilter from "./../vc-table-filter/vc-table-filter.vue";
|
|
66
|
+
import { VcInput } from "./../../../../molecules";
|
|
67
|
+
export interface Props {
|
|
68
|
+
searchValue?: string;
|
|
69
|
+
searchPlaceholder?: string;
|
|
70
|
+
activeFilterCount?: number;
|
|
71
|
+
expanded?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Emits {
|
|
75
|
+
(event: "search:change", value: string): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const props = defineProps<Props>();
|
|
79
|
+
const emit = defineEmits<Emits>();
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style lang="scss" scoped></style>
|
|
@@ -64,67 +64,9 @@
|
|
|
64
64
|
($slots['header'] || header) && (!columnsInit || searchValue || searchValue === '' || activeFilterCount)
|
|
65
65
|
"
|
|
66
66
|
name="header"
|
|
67
|
+
:header="headerComponent"
|
|
67
68
|
>
|
|
68
|
-
<
|
|
69
|
-
class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-box-border"
|
|
70
|
-
:class="{
|
|
71
|
-
'tw-px-4 tw-py-2 tw-border-[color:#eef0f2] tw-border-solid tw-border-b ': $isMobile.value,
|
|
72
|
-
'tw-p-4': $isDesktop.value,
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
75
|
-
<!-- Table filter mobile button -->
|
|
76
|
-
<div
|
|
77
|
-
v-if="$isMobile.value && $slots['filters']"
|
|
78
|
-
class="tw-mr-3"
|
|
79
|
-
>
|
|
80
|
-
<VcTableFilter :counter="activeFilterCount">
|
|
81
|
-
<template #default="{ closePanel }">
|
|
82
|
-
<slot
|
|
83
|
-
name="filters"
|
|
84
|
-
:close-panel="closePanel"
|
|
85
|
-
></slot>
|
|
86
|
-
</template>
|
|
87
|
-
</VcTableFilter>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<!-- Table search input -->
|
|
91
|
-
<VcInput
|
|
92
|
-
ref="searchInput"
|
|
93
|
-
class="tw-grow tw-basis-0"
|
|
94
|
-
:placeholder="searchPlaceholder || $t('COMPONENTS.ORGANISMS.VC_TABLE.SEARCH')"
|
|
95
|
-
clearable
|
|
96
|
-
name="table_search"
|
|
97
|
-
:model-value="searchValue"
|
|
98
|
-
@update:model-value="$emit('search:change', $event as string)"
|
|
99
|
-
>
|
|
100
|
-
<template #prepend-inner="{ focus }">
|
|
101
|
-
<VcIcon
|
|
102
|
-
icon="fas fa-search"
|
|
103
|
-
class="tw-text-[color:#d2d4d7]"
|
|
104
|
-
@click="focus?.()"
|
|
105
|
-
></VcIcon>
|
|
106
|
-
</template>
|
|
107
|
-
</VcInput>
|
|
108
|
-
|
|
109
|
-
<!-- Table filter desktop button -->
|
|
110
|
-
<div
|
|
111
|
-
v-if="$isDesktop.value && $slots['filters']"
|
|
112
|
-
class="tw-ml-3"
|
|
113
|
-
>
|
|
114
|
-
<VcTableFilter
|
|
115
|
-
:title="t('COMPONENTS.ORGANISMS.VC_TABLE.ALL_FILTERS')"
|
|
116
|
-
:counter="activeFilterCount"
|
|
117
|
-
:parent-expanded="expanded"
|
|
118
|
-
>
|
|
119
|
-
<template #default="{ closePanel }">
|
|
120
|
-
<slot
|
|
121
|
-
name="filters"
|
|
122
|
-
:close-panel="closePanel"
|
|
123
|
-
></slot>
|
|
124
|
-
</template>
|
|
125
|
-
</VcTableFilter>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
69
|
+
<component :is="headerComponent"></component>
|
|
128
70
|
</slot>
|
|
129
71
|
|
|
130
72
|
<div class="tw-flex tw-relative tw-overflow-hidden tw-grow">
|
|
@@ -528,15 +470,16 @@ import {
|
|
|
528
470
|
getCurrentInstance,
|
|
529
471
|
shallowRef,
|
|
530
472
|
useSlots,
|
|
473
|
+
VNode,
|
|
531
474
|
} from "vue";
|
|
532
475
|
import { useI18n } from "vue-i18n";
|
|
533
|
-
import { VcButton, VcCheckbox, VcContainer, VcIcon,
|
|
476
|
+
import { VcButton, VcCheckbox, VcContainer, VcIcon, VcPagination, VcLabel } from "./../../";
|
|
534
477
|
import { IActionBuilderResult, ITableColumns } from "./../../../../core/types";
|
|
535
478
|
import VcTableCell from "./_internal/vc-table-cell/vc-table-cell.vue";
|
|
536
479
|
import VcTableColumnSwitcher from "./_internal/vc-table-column-switcher/vc-table-column-switcher.vue";
|
|
537
480
|
import VcTableCounter from "./_internal/vc-table-counter/vc-table-counter.vue";
|
|
538
|
-
import VcTableFilter from "./_internal/vc-table-filter/vc-table-filter.vue";
|
|
539
481
|
import VcTableMobileItem from "./_internal/vc-table-mobile-item/vc-table-mobile-item.vue";
|
|
482
|
+
import VcTableBaseHeader from "./_internal/vc-table-base-header/vc-table-base-header.vue";
|
|
540
483
|
import * as _ from "lodash-es";
|
|
541
484
|
import "core-js/actual/array/to-spliced";
|
|
542
485
|
import "core-js/actual/array/to-sorted";
|
|
@@ -557,7 +500,7 @@ export interface TableItem {
|
|
|
557
500
|
}
|
|
558
501
|
|
|
559
502
|
defineSlots<{
|
|
560
|
-
header: (props:
|
|
503
|
+
header: (props: { header: VNode }) => any;
|
|
561
504
|
filters: (args: { closePanel: () => void }) => any;
|
|
562
505
|
"mobile-item": (args: { item: T }) => any;
|
|
563
506
|
[key: `header_${string}`]: (props: any) => any;
|
|
@@ -760,6 +703,21 @@ const hasClickListener = typeof instance?.vnode.props?.["onItemClick"] === "func
|
|
|
760
703
|
// return el ? el.offsetWidth : 0;
|
|
761
704
|
// };
|
|
762
705
|
|
|
706
|
+
const headerComponent = h(
|
|
707
|
+
VcTableBaseHeader,
|
|
708
|
+
{
|
|
709
|
+
searchValue: props.searchValue,
|
|
710
|
+
searchPlaceholder: props.searchPlaceholder,
|
|
711
|
+
activeFilterCount: props.activeFilterCount,
|
|
712
|
+
expanded: props.expanded,
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
filters: () => {
|
|
716
|
+
return slots.filters?.({ closePanel: () => {} });
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
);
|
|
720
|
+
|
|
763
721
|
const allColumns = ref([]) as Ref<ITableColumns[]>;
|
|
764
722
|
|
|
765
723
|
const mobileTemplateRenderer = ({ item, index }: { item: TableItem | string; index: number }) => {
|