@uzum-tech/ui 1.12.17 → 1.12.19

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 (48) hide show
  1. package/dist/index.js +146 -35
  2. package/dist/index.prod.js +3 -3
  3. package/es/chat/src/ChatParts/ChatAttachment.d.ts +6 -5
  4. package/es/chat/src/ChatParts/ChatAttachment.js +3 -3
  5. package/es/data-table/src/DataTable.d.ts +2 -0
  6. package/es/data-table/src/DataTable.js +1 -0
  7. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  8. package/es/data-table/src/TableParts/Body.js +3 -2
  9. package/es/data-table/src/TableParts/Cell.d.ts +2 -0
  10. package/es/data-table/src/TableParts/Cell.js +62 -9
  11. package/es/data-table/src/interface.d.ts +2 -0
  12. package/es/data-table/src/interface.js +1 -1
  13. package/es/header/src/Header.d.ts +24 -6
  14. package/es/header/src/Header.js +36 -11
  15. package/es/header/src/HeaderActions.d.ts +54 -42
  16. package/es/header/src/HeaderActions.js +67 -38
  17. package/es/header/src/HeaderNavigation.d.ts +3 -1
  18. package/es/header/src/HeaderNavigation.js +6 -4
  19. package/es/header/src/interface.d.ts +24 -1
  20. package/es/header/src/utils.d.ts +1 -1
  21. package/es/header/src/utils.js +1 -1
  22. package/es/version.d.ts +1 -1
  23. package/es/version.js +1 -1
  24. package/lib/chat/src/ChatParts/ChatAttachment.d.ts +6 -5
  25. package/lib/chat/src/ChatParts/ChatAttachment.js +3 -3
  26. package/lib/data-table/src/DataTable.d.ts +2 -0
  27. package/lib/data-table/src/DataTable.js +1 -0
  28. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  29. package/lib/data-table/src/TableParts/Body.js +3 -2
  30. package/lib/data-table/src/TableParts/Cell.d.ts +2 -0
  31. package/lib/data-table/src/TableParts/Cell.js +62 -9
  32. package/lib/data-table/src/interface.d.ts +2 -0
  33. package/lib/data-table/src/interface.js +1 -1
  34. package/lib/header/src/Header.d.ts +24 -6
  35. package/lib/header/src/Header.js +35 -10
  36. package/lib/header/src/HeaderActions.d.ts +54 -42
  37. package/lib/header/src/HeaderActions.js +67 -38
  38. package/lib/header/src/HeaderNavigation.d.ts +3 -1
  39. package/lib/header/src/HeaderNavigation.js +6 -4
  40. package/lib/header/src/interface.d.ts +24 -1
  41. package/lib/header/src/utils.d.ts +1 -1
  42. package/lib/header/src/utils.js +1 -1
  43. package/lib/version.d.ts +1 -1
  44. package/lib/version.js +1 -1
  45. package/package.json +1 -1
  46. package/volar.d.ts +22 -22
  47. package/web-types.json +80 -12
  48. package/README.md +0 -73
@@ -1,68 +1,76 @@
1
- import { type PropType, type CSSProperties } from 'vue';
2
- import type { LangOption, HeaderSearchResult, HeaderSearchHandler } from './interface';
1
+ import { type PropType, VNodeChild } from 'vue';
2
+ import type { HeaderSearchResult, HeaderActionsProps } from './interface';
3
3
  export declare const headerActionsProps: {
4
4
  readonly langOptions: {
5
- readonly type: PropType<LangOption[]>;
5
+ readonly type: PropType<HeaderActionsProps["langOptions"]>;
6
6
  readonly required: true;
7
7
  };
8
8
  readonly currentLang: {
9
- readonly type: PropType<LangOption>;
9
+ readonly type: PropType<HeaderActionsProps["currentLang"]>;
10
10
  readonly required: true;
11
11
  };
12
12
  readonly mergedClsPrefix: {
13
- readonly type: StringConstructor;
13
+ readonly type: PropType<HeaderActionsProps["mergedClsPrefix"]>;
14
14
  readonly required: true;
15
15
  };
16
16
  readonly responsive: {
17
- readonly type: BooleanConstructor;
17
+ readonly type: PropType<HeaderActionsProps["responsive"]>;
18
18
  readonly default: false;
19
19
  };
20
20
  readonly isMobile: {
21
- readonly type: BooleanConstructor;
21
+ readonly type: PropType<HeaderActionsProps["isMobile"]>;
22
22
  readonly default: false;
23
23
  };
24
24
  readonly mobileActionsCollapse: {
25
- readonly type: BooleanConstructor;
25
+ readonly type: PropType<HeaderActionsProps["mobileActionsCollapse"]>;
26
26
  readonly default: true;
27
27
  };
28
- readonly cssVars: PropType<CSSProperties>;
29
- readonly onSearch: PropType<HeaderSearchHandler>;
30
- readonly onPreview: PropType<() => void>;
31
- readonly onLogout: PropType<() => void>;
32
- readonly onLanguageSelect: PropType<(key: string | number) => void>;
33
- readonly onSearchResultSelect: PropType<(result: HeaderSearchResult) => void>;
28
+ readonly actionsVisibility: {
29
+ readonly type: PropType<HeaderActionsProps["actionsVisibility"]>;
30
+ readonly required: false;
31
+ };
32
+ readonly cssVars: PropType<HeaderActionsProps["cssVars"]>;
33
+ readonly onSearch: PropType<HeaderActionsProps["onSearch"]>;
34
+ readonly onPreview: PropType<HeaderActionsProps["onPreview"]>;
35
+ readonly onLogout: PropType<HeaderActionsProps["onLogout"]>;
36
+ readonly onLanguageSelect: PropType<HeaderActionsProps["onLanguageSelect"]>;
37
+ readonly onSearchResultSelect: PropType<HeaderActionsProps["onSearchResultSelect"]>;
34
38
  };
35
39
  declare const _default: import("vue").DefineComponent<{
36
40
  readonly langOptions: {
37
- readonly type: PropType<LangOption[]>;
41
+ readonly type: PropType<HeaderActionsProps["langOptions"]>;
38
42
  readonly required: true;
39
43
  };
40
44
  readonly currentLang: {
41
- readonly type: PropType<LangOption>;
45
+ readonly type: PropType<HeaderActionsProps["currentLang"]>;
42
46
  readonly required: true;
43
47
  };
44
48
  readonly mergedClsPrefix: {
45
- readonly type: StringConstructor;
49
+ readonly type: PropType<HeaderActionsProps["mergedClsPrefix"]>;
46
50
  readonly required: true;
47
51
  };
48
52
  readonly responsive: {
49
- readonly type: BooleanConstructor;
53
+ readonly type: PropType<HeaderActionsProps["responsive"]>;
50
54
  readonly default: false;
51
55
  };
52
56
  readonly isMobile: {
53
- readonly type: BooleanConstructor;
57
+ readonly type: PropType<HeaderActionsProps["isMobile"]>;
54
58
  readonly default: false;
55
59
  };
56
60
  readonly mobileActionsCollapse: {
57
- readonly type: BooleanConstructor;
61
+ readonly type: PropType<HeaderActionsProps["mobileActionsCollapse"]>;
58
62
  readonly default: true;
59
63
  };
60
- readonly cssVars: PropType<CSSProperties>;
61
- readonly onSearch: PropType<HeaderSearchHandler>;
62
- readonly onPreview: PropType<() => void>;
63
- readonly onLogout: PropType<() => void>;
64
- readonly onLanguageSelect: PropType<(key: string | number) => void>;
65
- readonly onSearchResultSelect: PropType<(result: HeaderSearchResult) => void>;
64
+ readonly actionsVisibility: {
65
+ readonly type: PropType<HeaderActionsProps["actionsVisibility"]>;
66
+ readonly required: false;
67
+ };
68
+ readonly cssVars: PropType<HeaderActionsProps["cssVars"]>;
69
+ readonly onSearch: PropType<HeaderActionsProps["onSearch"]>;
70
+ readonly onPreview: PropType<HeaderActionsProps["onPreview"]>;
71
+ readonly onLogout: PropType<HeaderActionsProps["onLogout"]>;
72
+ readonly onLanguageSelect: PropType<HeaderActionsProps["onLanguageSelect"]>;
73
+ readonly onSearchResultSelect: PropType<HeaderActionsProps["onSearchResultSelect"]>;
66
74
  }, {
67
75
  searchVisible: import("vue").Ref<boolean>;
68
76
  searchValue: import("vue").Ref<string>;
@@ -70,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{
70
78
  key: string | number;
71
79
  label: string;
72
80
  description?: string | undefined;
73
- icon?: (() => import("vue").VNodeChild) | undefined;
81
+ icon?: (() => VNodeChild) | undefined;
74
82
  extra?: string | undefined;
75
83
  onClick?: (() => void) | undefined;
76
84
  disabled?: boolean | undefined;
@@ -83,38 +91,42 @@ declare const _default: import("vue").DefineComponent<{
83
91
  handleResultSelect: (result: HeaderSearchResult) => void;
84
92
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
85
93
  readonly langOptions: {
86
- readonly type: PropType<LangOption[]>;
94
+ readonly type: PropType<HeaderActionsProps["langOptions"]>;
87
95
  readonly required: true;
88
96
  };
89
97
  readonly currentLang: {
90
- readonly type: PropType<LangOption>;
98
+ readonly type: PropType<HeaderActionsProps["currentLang"]>;
91
99
  readonly required: true;
92
100
  };
93
101
  readonly mergedClsPrefix: {
94
- readonly type: StringConstructor;
102
+ readonly type: PropType<HeaderActionsProps["mergedClsPrefix"]>;
95
103
  readonly required: true;
96
104
  };
97
105
  readonly responsive: {
98
- readonly type: BooleanConstructor;
106
+ readonly type: PropType<HeaderActionsProps["responsive"]>;
99
107
  readonly default: false;
100
108
  };
101
109
  readonly isMobile: {
102
- readonly type: BooleanConstructor;
110
+ readonly type: PropType<HeaderActionsProps["isMobile"]>;
103
111
  readonly default: false;
104
112
  };
105
113
  readonly mobileActionsCollapse: {
106
- readonly type: BooleanConstructor;
114
+ readonly type: PropType<HeaderActionsProps["mobileActionsCollapse"]>;
107
115
  readonly default: true;
108
116
  };
109
- readonly cssVars: PropType<CSSProperties>;
110
- readonly onSearch: PropType<HeaderSearchHandler>;
111
- readonly onPreview: PropType<() => void>;
112
- readonly onLogout: PropType<() => void>;
113
- readonly onLanguageSelect: PropType<(key: string | number) => void>;
114
- readonly onSearchResultSelect: PropType<(result: HeaderSearchResult) => void>;
117
+ readonly actionsVisibility: {
118
+ readonly type: PropType<HeaderActionsProps["actionsVisibility"]>;
119
+ readonly required: false;
120
+ };
121
+ readonly cssVars: PropType<HeaderActionsProps["cssVars"]>;
122
+ readonly onSearch: PropType<HeaderActionsProps["onSearch"]>;
123
+ readonly onPreview: PropType<HeaderActionsProps["onPreview"]>;
124
+ readonly onLogout: PropType<HeaderActionsProps["onLogout"]>;
125
+ readonly onLanguageSelect: PropType<HeaderActionsProps["onLanguageSelect"]>;
126
+ readonly onSearchResultSelect: PropType<HeaderActionsProps["onSearchResultSelect"]>;
115
127
  }>>, {
116
- readonly responsive: boolean;
117
- readonly isMobile: boolean;
118
- readonly mobileActionsCollapse: boolean;
128
+ readonly responsive: boolean | undefined;
129
+ readonly isMobile: boolean | undefined;
130
+ readonly mobileActionsCollapse: boolean | undefined;
119
131
  }, {}>;
120
132
  export default _default;
@@ -40,6 +40,10 @@ export const headerActionsProps = {
40
40
  type: Boolean,
41
41
  default: true
42
42
  },
43
+ actionsVisibility: {
44
+ type: Object,
45
+ required: false
46
+ },
43
47
  cssVars: Object,
44
48
  onSearch: Function,
45
49
  onPreview: Function,
@@ -116,51 +120,76 @@ export default defineComponent({
116
120
  };
117
121
  },
118
122
  render() {
123
+ const { $slots } = this;
119
124
  const blockClass = `${this.mergedClsPrefix}-header`;
120
125
  if (this.responsive && this.isMobile && this.mobileActionsCollapse) {
121
126
  return (h("div", { class: `${blockClass}__actions` },
122
- h(UFlex, { size: 32 }, { default: () => { var _a, _b; return (_b = (_a = this.$slots).mobile) === null || _b === void 0 ? void 0 : _b.call(_a); } })));
127
+ h(UFlex, { size: 32 }, { default: () => { var _a; return (_a = $slots.mobile) === null || _a === void 0 ? void 0 : _a.call($slots); } })));
123
128
  }
129
+ const langNode = () => {
130
+ var _a;
131
+ if (((_a = this.actionsVisibility) === null || _a === void 0 ? void 0 : _a.lang) === false)
132
+ return null;
133
+ return $slots.lang ? ($slots.lang()) : (h(UDropdown, { options: this.langOptions, onSelect: this.onLanguageSelect }, {
134
+ default: () => (h(UButton, { "icon-placement": "right", text: true, renderIcon: () => (h(UIcon, null, { default: () => h(ChevronDownOutline, null) })) }, {
135
+ default: () => {
136
+ var _a, _b, _c;
137
+ return (h("span", { class: `${blockClass}__lang-trigger` },
138
+ h("span", { class: `${blockClass}__lang-icon` }, (_b = (_a = this.currentLang) === null || _a === void 0 ? void 0 : _a.icon) === null || _b === void 0 ? void 0 : _b.call(_a)),
139
+ h("span", null, (_c = this.currentLang) === null || _c === void 0 ? void 0 : _c.label)));
140
+ }
141
+ }))
142
+ }));
143
+ };
144
+ const searchNode = () => {
145
+ var _a;
146
+ if (((_a = this.actionsVisibility) === null || _a === void 0 ? void 0 : _a.search) === false)
147
+ return null;
148
+ return $slots.search ? ($slots.search()) : (h("div", { class: `${blockClass}__search-wrapper` },
149
+ h(UButton, { text: true, onClick: this.handleSearchClick }, {
150
+ default: () => (h(UIcon, { size: 24 }, { default: () => h(SearchIcon, null) }))
151
+ }),
152
+ h(Transition, { name: "fade-in-scale-up" }, {
153
+ default: () => this.searchVisible
154
+ ? h(HeaderSearchDesktop, {
155
+ searchValue: this.searchValue,
156
+ searchResults: this.searchResults,
157
+ searchLoading: this.searchLoading,
158
+ mergedClsPrefix: this.mergedClsPrefix,
159
+ cssVars: this.cssVars,
160
+ onSearchInput: this.handleSearchInput,
161
+ onSearchClose: this.handleSearchClose,
162
+ onSearchSubmit: () => {
163
+ void this.handleSearch();
164
+ },
165
+ onResultSelect: this.handleResultSelect
166
+ })
167
+ : null
168
+ })));
169
+ };
170
+ const accessibilityNode = () => {
171
+ var _a;
172
+ if (((_a = this.actionsVisibility) === null || _a === void 0 ? void 0 : _a.accessibility) === false)
173
+ return null;
174
+ return $slots.accessibility ? ($slots.accessibility()) : (h(UButton, { text: true, onClick: this.onPreview }, {
175
+ default: () => (h(UIcon, { size: 24 }, { default: () => h(EyeIcon, null) }))
176
+ }));
177
+ };
178
+ const logoutNode = () => {
179
+ var _a;
180
+ if (((_a = this.actionsVisibility) === null || _a === void 0 ? void 0 : _a.logout) === false)
181
+ return null;
182
+ return $slots.logout ? ($slots.logout()) : (h(UButton, { text: true, onClick: this.onLogout }, {
183
+ default: () => (h(UIcon, { size: 24 }, { default: () => h(LogoutIcon, null) }))
184
+ }));
185
+ };
124
186
  return (h("div", { class: `${blockClass}__actions` },
125
187
  h(UFlex, { class: `${blockClass}__actions-block`, size: 32 }, {
126
188
  default: () => (h(Fragment, null,
127
- h(UDropdown, { options: this.langOptions, onSelect: this.onLanguageSelect }, {
128
- default: () => (h(UButton, { "icon-placement": "right", text: true, renderIcon: () => (h(UIcon, null, { default: () => h(ChevronDownOutline, null) })) }, {
129
- default: () => {
130
- var _a, _b, _c;
131
- return (h("span", { class: `${blockClass}__lang-trigger` },
132
- h("span", { class: `${blockClass}__lang-icon` }, (_b = (_a = this.currentLang) === null || _a === void 0 ? void 0 : _a.icon) === null || _b === void 0 ? void 0 : _b.call(_a)),
133
- h("span", null, (_c = this.currentLang) === null || _c === void 0 ? void 0 : _c.label)));
134
- }
135
- }))
136
- }),
137
- h("div", { class: `${blockClass}__search-wrapper` },
138
- h(UButton, { text: true, onClick: this.handleSearchClick }, {
139
- default: () => (h(UIcon, { size: 24 }, { default: () => h(SearchIcon, null) }))
140
- }),
141
- h(Transition, { name: "fade-in-scale-up" }, {
142
- default: () => this.searchVisible
143
- ? h(HeaderSearchDesktop, {
144
- searchValue: this.searchValue,
145
- searchResults: this.searchResults,
146
- searchLoading: this.searchLoading,
147
- mergedClsPrefix: this.mergedClsPrefix,
148
- cssVars: this.cssVars,
149
- onSearchInput: this.handleSearchInput,
150
- onSearchClose: this.handleSearchClose,
151
- onSearchSubmit: () => {
152
- void this.handleSearch();
153
- },
154
- onResultSelect: this.handleResultSelect
155
- })
156
- : null
157
- })),
158
- h(UButton, { text: true, onClick: this.onPreview }, {
159
- default: () => (h(UIcon, { size: 24 }, { default: () => h(EyeIcon, null) }))
160
- }),
161
- h(UButton, { text: true, onClick: this.onLogout }, {
162
- default: () => (h(UIcon, { size: 24 }, { default: () => h(LogoutIcon, null) }))
163
- })))
189
+ langNode(),
190
+ searchNode(),
191
+ accessibilityNode(),
192
+ logoutNode()))
164
193
  })));
165
194
  }
166
195
  });
@@ -45,6 +45,7 @@ export declare const headerNavigationProps: {
45
45
  };
46
46
  readonly 'onUpdate:menuValue': PropType<MaybeArray<(value: string | number | null) => void>>;
47
47
  readonly onUpdateMenuValue: PropType<MaybeArray<(value: string | number | null) => void>>;
48
+ readonly onUpdateActiveMenuKey: PropType<(value: string | number | null) => void>;
48
49
  };
49
50
  declare const _default: import("vue").DefineComponent<{
50
51
  readonly menuOptions: {
@@ -86,6 +87,7 @@ declare const _default: import("vue").DefineComponent<{
86
87
  };
87
88
  readonly 'onUpdate:menuValue': PropType<MaybeArray<(value: string | number | null) => void>>;
88
89
  readonly onUpdateMenuValue: PropType<MaybeArray<(value: string | number | null) => void>>;
90
+ readonly onUpdateActiveMenuKey: PropType<(value: string | number | null) => void>;
89
91
  }, {
90
92
  normalizedMenuItems: import("vue").ComputedRef<InternalMenuItem[]>;
91
93
  handleMenuValueUpdate: (value: string | number | null) => void;
@@ -1687,7 +1689,6 @@ declare const _default: import("vue").DefineComponent<{
1687
1689
  "vector-effect"?: import("csstype").Property.VectorEffect | undefined;
1688
1690
  }>;
1689
1691
  hoveredKey: import("vue").Ref<string | number | null>;
1690
- activeMenuKey: import("vue").Ref<string> | import("vue").Ref<number> | import("vue").Ref<null>;
1691
1692
  setActiveMenuKey: (key?: string | number | null) => void;
1692
1693
  handleMenuItemClick: (option: HeaderMenuOption) => void;
1693
1694
  checkedTopMenuKey: import("vue").ComputedRef<string | number | undefined>;
@@ -1731,6 +1732,7 @@ declare const _default: import("vue").DefineComponent<{
1731
1732
  };
1732
1733
  readonly 'onUpdate:menuValue': PropType<MaybeArray<(value: string | number | null) => void>>;
1733
1734
  readonly onUpdateMenuValue: PropType<MaybeArray<(value: string | number | null) => void>>;
1735
+ readonly onUpdateActiveMenuKey: PropType<(value: string | number | null) => void>;
1734
1736
  }>>, {
1735
1737
  readonly menuOptions: HeaderMenuOption[];
1736
1738
  readonly menuPlacement: HeaderMenuPlacement;
@@ -60,7 +60,8 @@ export const headerNavigationProps = {
60
60
  default: null
61
61
  },
62
62
  'onUpdate:menuValue': [Function, Array],
63
- onUpdateMenuValue: [Function, Array]
63
+ onUpdateMenuValue: [Function, Array],
64
+ onUpdateActiveMenuKey: Function
64
65
  };
65
66
  export default defineComponent({
66
67
  name: 'HeaderNavigation',
@@ -77,7 +78,7 @@ export default defineComponent({
77
78
  navRef.value = el;
78
79
  };
79
80
  const hoveredKeyRef = ref(null);
80
- const activeMenuKeyRef = toRef(props.activeMenuKey);
81
+ const activeMenuKeyRef = toRef(props, 'activeMenuKey');
81
82
  const tabRefs = ref({});
82
83
  const indicatorStyleRef = ref({
83
84
  width: '0px',
@@ -127,7 +128,9 @@ export default defineComponent({
127
128
  call(_onUpdateMenuValue, value);
128
129
  }
129
130
  function setActiveMenuKey(key = null) {
130
- activeMenuKeyRef.value = key;
131
+ if (props.onUpdateActiveMenuKey) {
132
+ props.onUpdateActiveMenuKey(key);
133
+ }
131
134
  }
132
135
  function handleMenuItemClick(option) {
133
136
  setActiveMenuKey(option === null || option === void 0 ? void 0 : option.key);
@@ -166,7 +169,6 @@ export default defineComponent({
166
169
  setTabRef,
167
170
  indicatorStyle: indicatorStyleRef,
168
171
  hoveredKey: hoveredKeyRef,
169
- activeMenuKey: activeMenuKeyRef,
170
172
  setActiveMenuKey,
171
173
  handleMenuItemClick,
172
174
  checkedTopMenuKey
@@ -1,4 +1,4 @@
1
- import { type VNodeChild } from 'vue';
1
+ import { CSSProperties, type VNodeChild } from 'vue';
2
2
  import type { MenuOption as BaseMenuOption, MenuGroupOption, MenuDividerOption, Key } from '../../menu/src/interface';
3
3
  import type { TabsProps } from '../../tabs';
4
4
  import { ImageProps } from '../../image';
@@ -23,8 +23,31 @@ export interface HeaderProps {
23
23
  mobilePrimaryActionText?: string;
24
24
  mobileSecondaryActionText?: string;
25
25
  mobileShowHeaderActions?: boolean;
26
+ actionsProps?: Partial<HeaderActionsProps>;
26
27
  onSearch?: HeaderSearchHandler;
27
28
  onUpdateMenuValue: (value: string | number | null) => void;
29
+ onUpdateActiveMenuKey?: (value: string | number | null) => void;
30
+ }
31
+ export interface HeaderActionsProps {
32
+ langOptions?: LangOption[];
33
+ currentLang?: LangOption;
34
+ mergedClsPrefix: string;
35
+ responsive?: boolean;
36
+ isMobile?: boolean;
37
+ mobileActionsCollapse?: boolean;
38
+ actionsVisibility?: ActionsVisibility;
39
+ cssVars?: CSSProperties;
40
+ onSearch: HeaderSearchHandler;
41
+ onPreview: VoidFunction;
42
+ onLogout: VoidFunction;
43
+ onLanguageSelect: (key: string | number) => void;
44
+ onSearchResultSelect: (result: HeaderSearchResult) => void;
45
+ }
46
+ export interface ActionsVisibility {
47
+ lang?: boolean;
48
+ search?: boolean;
49
+ accessibility?: boolean;
50
+ logout?: boolean;
28
51
  }
29
52
  export interface HeaderMenuColumnOption {
30
53
  type: 'column';
@@ -11,4 +11,4 @@ export declare function isColumnOption(option: HeaderMenuChildOption): option is
11
11
  export declare function isNotNull<T>(value: T | null): value is T;
12
12
  export declare function resolvePlacement(placement: HeaderMenuPlacement): TabsProps['placement'];
13
13
  export declare function isLeafMenuOption(option: HeaderMenuChildOption): option is Exclude<HeaderMenuChildOption, HeaderMenuColumnOption>;
14
- export declare function resolveTopLevelMenuKey(menuOptions: HeaderMenuOption[], activeMenuKey: string | number | null | undefined): string | number | null;
14
+ export declare function resolveTopLevelMenuKey(menuOptions: HeaderMenuOption[], activeMenuKey?: string | number | null): string | number | null;
@@ -71,7 +71,7 @@ function isMenuValueInChildren(children, value) {
71
71
  export function resolveTopLevelMenuKey(menuOptions, activeMenuKey) {
72
72
  if (activeMenuKey === null || activeMenuKey === undefined)
73
73
  return null;
74
- for (let index = 0; index < menuOptions.length; index += 1) {
74
+ for (let index = 0; index < menuOptions.length; index++) {
75
75
  const option = menuOptions[index];
76
76
  const optionKey = getMenuItemKey(option, index);
77
77
  if (optionKey === activeMenuKey)
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.12.17";
1
+ declare const _default: "1.12.19";
2
2
  export default _default;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.12.17';
1
+ export default '1.12.19';
@@ -1,4 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
+ import { UploadProps } from '../../../upload';
2
3
  import { ChatAttachment as ChatAttachmentType, ChatMessageData } from '../interface';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  message: {
@@ -10,8 +11,8 @@ declare const _default: import("vue").DefineComponent<{
10
11
  required: true;
11
12
  };
12
13
  uploadProps: {
13
- type: PropType<Record<string, any>>;
14
- default: () => {};
14
+ type: PropType<Partial<UploadProps>>;
15
+ default: undefined;
15
16
  };
16
17
  withPadding: {
17
18
  type: BooleanConstructor;
@@ -29,15 +30,15 @@ declare const _default: import("vue").DefineComponent<{
29
30
  required: true;
30
31
  };
31
32
  uploadProps: {
32
- type: PropType<Record<string, any>>;
33
- default: () => {};
33
+ type: PropType<Partial<UploadProps>>;
34
+ default: undefined;
34
35
  };
35
36
  withPadding: {
36
37
  type: BooleanConstructor;
37
38
  default: boolean;
38
39
  };
39
40
  }>>, {
40
- uploadProps: Record<string, any>;
41
+ uploadProps: Partial<UploadProps>;
41
42
  withPadding: boolean;
42
43
  }, {}>;
43
44
  export default _default;
@@ -25,7 +25,7 @@ exports.default = (0, vue_1.defineComponent)({
25
25
  },
26
26
  uploadProps: {
27
27
  type: Object,
28
- default: () => ({})
28
+ default: undefined
29
29
  },
30
30
  withPadding: {
31
31
  type: Boolean,
@@ -70,7 +70,7 @@ exports.default = (0, vue_1.defineComponent)({
70
70
  batchId: null
71
71
  });
72
72
  });
73
- const uploadComponent = ((0, vue_1.h)(upload_1.UUpload, Object.assign({ abstract: true }, props.uploadProps, { fileList: fileList, fileListStyle: props.withPadding
73
+ const uploadComponent = ((0, vue_1.h)(upload_1.UUpload, Object.assign({ abstract: true, fileList: fileList, fileListStyle: props.withPadding
74
74
  ? {
75
75
  display: 'flex',
76
76
  flexDirection: 'column',
@@ -79,7 +79,7 @@ exports.default = (0, vue_1.defineComponent)({
79
79
  }
80
80
  : undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((attachment) => attachment.status === interface_1.ChatAttachmentStatus.FINISHED &&
81
81
  attachment.url &&
82
- attachment.url !== '#'), showRetryButton: props.attachments.some((attachment) => attachment.status === interface_1.ChatAttachmentStatus.ERROR), onDownload: handleDownload }), {
82
+ attachment.url !== '#'), showRetryButton: props.attachments.some((attachment) => attachment.status === interface_1.ChatAttachmentStatus.ERROR), onDownload: handleDownload }, props.uploadProps), {
83
83
  default: () => ((0, vue_1.h)(upload_1.UUploadFileList, null, {
84
84
  'upload-file-title': slots['upload-file-title']
85
85
  ? ({ file }) => { var _a; return (_a = slots['upload-file-title']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
@@ -86,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
86
86
  };
87
87
  readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
88
88
  readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
89
+ readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
89
90
  readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
90
91
  readonly spinProps: {
91
92
  readonly type: import("vue").PropType<import("../../_internal").BaseLoadingExposedProps>;
@@ -4498,6 +4499,7 @@ declare const _default: import("vue").DefineComponent<{
4498
4499
  };
4499
4500
  readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
4500
4501
  readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
4502
+ readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
4501
4503
  readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
4502
4504
  readonly spinProps: {
4503
4505
  readonly type: import("vue").PropType<import("../../_internal").BaseLoadingExposedProps>;
@@ -305,6 +305,7 @@ exports.default = (0, vue_1.defineComponent)({
305
305
  handleTableBodyScroll,
306
306
  setHeaderScrollLeft,
307
307
  renderCell: (0, vue_1.toRef)(props, 'renderCell'),
308
+ defaultEmptyValueRef: (0, vue_1.toRef)(props, 'defaultEmptyValue'),
308
309
  emptyPropsRef: (0, vue_1.toRef)(props, 'emptyProps'),
309
310
  handleEdit
310
311
  });
@@ -1474,6 +1474,7 @@ declare const _default: import("vue").DefineComponent<{
1474
1474
  }) => void;
1475
1475
  handleUpdateExpanded: (key: RowKey, tmNode: TmNode | null) => void;
1476
1476
  renderCell: import("vue").Ref<((value: any, rowData: object, column: import("../interface").TableBaseColumn) => import("vue").VNodeChild) | undefined>;
1477
+ defaultEmptyValueRef: import("vue").Ref<string | (() => import("vue").VNodeChild) | undefined>;
1477
1478
  emptyPropsRef: import("vue").Ref<Partial<import("../../../empty").EmptyProps> | undefined>;
1478
1479
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "edit"[], "edit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1479
1480
  onEdit: PropType<(value: string, row: string, key: string) => void>;
@@ -99,7 +99,7 @@ exports.default = (0, vue_1.defineComponent)({
99
99
  bodyStyle: Object
100
100
  },
101
101
  setup(props) {
102
- const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, loadingSkeletonRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, summaryPlacementRef, treeMateRef, scrollbarPropsRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell, emptyPropsRef
102
+ const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, loadingSkeletonRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, summaryPlacementRef, treeMateRef, scrollbarPropsRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell, defaultEmptyValueRef, emptyPropsRef
103
103
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
104
104
  } = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
105
105
  const scrollbarInstRef = (0, vue_1.ref)(null);
@@ -348,6 +348,7 @@ exports.default = (0, vue_1.defineComponent)({
348
348
  handleRadioUpdateChecked,
349
349
  handleUpdateExpanded,
350
350
  renderCell,
351
+ defaultEmptyValueRef,
351
352
  emptyPropsRef }, exposedMethods);
352
353
  },
353
354
  render() {
@@ -591,7 +592,7 @@ exports.default = (0, vue_1.defineComponent)({
591
592
  } }))) : null) : column.type === 'expand' ? (!isSummary ? (!column.expandable ||
592
593
  ((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? ((0, vue_1.h)(ExpandTrigger_1.default, { clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, onClick: () => {
593
594
  handleUpdateExpanded(rowKey, null);
594
- } })) : null) : null) : ((0, vue_1.h)(Cell_1.default, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell, onEdit: (value, row, key) => {
595
+ } })) : null) : null) : ((0, vue_1.h)(Cell_1.default, { clsPrefix: mergedClsPrefix, index: actualRowIndex, row: rowData, column: column, isSummary: isSummary, mergedTheme: mergedTheme, renderCell: this.renderCell, defaultEmptyValue: this.defaultEmptyValueRef, onEdit: (value, row, key) => {
595
596
  this.$emit('edit', value, row, key);
596
597
  } }))));
597
598
  })));
@@ -25,6 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  required: true;
26
26
  };
27
27
  renderCell: PropType<(value: any, rowData: object, column: any) => VNodeChild>;
28
+ defaultEmptyValue: PropType<string | (() => VNodeChild) | undefined>;
28
29
  }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "edit"[], "edit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
29
30
  clsPrefix: {
30
31
  type: StringConstructor;
@@ -48,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
48
49
  required: true;
49
50
  };
50
51
  renderCell: PropType<(value: any, rowData: object, column: any) => VNodeChild>;
52
+ defaultEmptyValue: PropType<string | (() => VNodeChild) | undefined>;
51
53
  }>> & {
52
54
  onEdit?: ((...args: any[]) => any) | undefined;
53
55
  }, {