@progress/kendo-vue-upload 3.5.0 → 3.5.1-dev.202208100944

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 (128) hide show
  1. package/dist/cdn/js/kendo-vue-upload.js +1 -1
  2. package/dist/es/UploadListMultiItem.js +5 -5
  3. package/dist/es/UploadListSingleItem.js +1 -1
  4. package/dist/es/interfaces/BaseUploadEvent.js +1 -0
  5. package/dist/es/interfaces/FileGroup.js +1 -0
  6. package/dist/es/interfaces/UploadActionsLayout.js +1 -0
  7. package/dist/es/interfaces/UploadAdditionalData.js +1 -0
  8. package/dist/es/interfaces/UploadAsyncProps.js +1 -0
  9. package/dist/es/interfaces/UploadFileInfo.js +1 -0
  10. package/dist/es/interfaces/UploadFileRestrictions.js +1 -0
  11. package/dist/es/interfaces/UploadHttpHeaders.js +1 -0
  12. package/dist/es/interfaces/UploadListItemProps.js +1 -0
  13. package/dist/es/interfaces/UploadOnAddEvent.js +1 -0
  14. package/dist/es/interfaces/UploadOnBeforeRemoveEvent.js +1 -0
  15. package/dist/es/interfaces/UploadOnBeforeUploadEvent.js +1 -0
  16. package/dist/es/interfaces/UploadOnCancelEvent.js +1 -0
  17. package/dist/es/interfaces/UploadOnProgressEvent.js +1 -0
  18. package/dist/es/interfaces/UploadOnRemoveEvent.js +1 -0
  19. package/dist/es/interfaces/UploadOnStatusChangeEvent.js +1 -0
  20. package/dist/es/interfaces/UploadProps.js +1 -0
  21. package/dist/es/interfaces/UploadResponse.js +1 -0
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es/utils/connectionUtils.d.ts +3 -3
  24. package/dist/es/utils/stateUtils.d.ts +3 -3
  25. package/dist/es/utils/utils.d.ts +3 -3
  26. package/dist/es/utils/validationUtils.d.ts +3 -3
  27. package/dist/esm/ExternalDropZone.d.ts +121 -0
  28. package/dist/esm/ExternalDropZone.js +169 -0
  29. package/dist/esm/Upload.d.ts +50 -0
  30. package/dist/esm/Upload.js +787 -0
  31. package/dist/esm/UploadActionButtons.d.ts +59 -0
  32. package/dist/esm/UploadActionButtons.js +165 -0
  33. package/dist/esm/UploadAddButton.d.ts +67 -0
  34. package/dist/esm/UploadAddButton.js +165 -0
  35. package/dist/esm/UploadDropZone.d.ts +61 -0
  36. package/dist/esm/UploadDropZone.js +288 -0
  37. package/dist/esm/UploadInput.d.ts +56 -0
  38. package/dist/esm/UploadInput.js +116 -0
  39. package/dist/esm/UploadList.d.ts +58 -0
  40. package/dist/esm/UploadList.js +103 -0
  41. package/dist/esm/UploadListActionButton.d.ts +56 -0
  42. package/dist/esm/UploadListActionButton.js +176 -0
  43. package/dist/esm/UploadListGroup.d.ts +56 -0
  44. package/dist/esm/UploadListGroup.js +150 -0
  45. package/dist/esm/UploadListMultiItem.d.ts +44 -0
  46. package/dist/esm/UploadListMultiItem.js +172 -0
  47. package/dist/esm/UploadListSingleItem.d.ts +44 -0
  48. package/dist/esm/UploadListSingleItem.js +228 -0
  49. package/dist/esm/UploadNavigation.d.ts +46 -0
  50. package/dist/esm/UploadNavigation.js +348 -0
  51. package/dist/esm/UploadStatus.d.ts +53 -0
  52. package/dist/esm/UploadStatus.js +63 -0
  53. package/dist/esm/UploadUI.d.ts +81 -0
  54. package/dist/esm/UploadUI.js +265 -0
  55. package/dist/esm/additionalTypes.ts +21 -0
  56. package/dist/esm/interfaces/BaseUploadEvent.d.ts +9 -0
  57. package/dist/esm/interfaces/BaseUploadEvent.js +1 -0
  58. package/dist/esm/interfaces/FileGroup.d.ts +7 -0
  59. package/dist/esm/interfaces/FileGroup.js +1 -0
  60. package/dist/esm/interfaces/UploadActionsLayout.d.ts +4 -0
  61. package/dist/esm/interfaces/UploadActionsLayout.js +1 -0
  62. package/dist/esm/interfaces/UploadAdditionalData.d.ts +6 -0
  63. package/dist/esm/interfaces/UploadAdditionalData.js +1 -0
  64. package/dist/esm/interfaces/UploadAsyncProps.d.ts +82 -0
  65. package/dist/esm/interfaces/UploadAsyncProps.js +1 -0
  66. package/dist/esm/interfaces/UploadFileInfo.d.ts +41 -0
  67. package/dist/esm/interfaces/UploadFileInfo.js +1 -0
  68. package/dist/esm/interfaces/UploadFileRestrictions.d.ts +19 -0
  69. package/dist/esm/interfaces/UploadFileRestrictions.js +1 -0
  70. package/dist/esm/interfaces/UploadFileStatus.d.ts +33 -0
  71. package/dist/esm/interfaces/UploadFileStatus.js +34 -0
  72. package/dist/esm/interfaces/UploadHttpHeaders.d.ts +6 -0
  73. package/dist/esm/interfaces/UploadHttpHeaders.js +1 -0
  74. package/dist/esm/interfaces/UploadListItemProps.d.ts +19 -0
  75. package/dist/esm/interfaces/UploadListItemProps.js +1 -0
  76. package/dist/esm/interfaces/UploadOnAddEvent.d.ts +15 -0
  77. package/dist/esm/interfaces/UploadOnAddEvent.js +1 -0
  78. package/dist/esm/interfaces/UploadOnBeforeRemoveEvent.d.ts +21 -0
  79. package/dist/esm/interfaces/UploadOnBeforeRemoveEvent.js +1 -0
  80. package/dist/esm/interfaces/UploadOnBeforeUploadEvent.d.ts +21 -0
  81. package/dist/esm/interfaces/UploadOnBeforeUploadEvent.js +1 -0
  82. package/dist/esm/interfaces/UploadOnCancelEvent.d.ts +10 -0
  83. package/dist/esm/interfaces/UploadOnCancelEvent.js +1 -0
  84. package/dist/esm/interfaces/UploadOnProgressEvent.d.ts +15 -0
  85. package/dist/esm/interfaces/UploadOnProgressEvent.js +1 -0
  86. package/dist/esm/interfaces/UploadOnRemoveEvent.d.ts +20 -0
  87. package/dist/esm/interfaces/UploadOnRemoveEvent.js +1 -0
  88. package/dist/esm/interfaces/UploadOnStatusChangeEvent.d.ts +20 -0
  89. package/dist/esm/interfaces/UploadOnStatusChangeEvent.js +1 -0
  90. package/dist/esm/interfaces/UploadProps.d.ts +114 -0
  91. package/dist/esm/interfaces/UploadProps.js +1 -0
  92. package/dist/esm/interfaces/UploadResponse.d.ts +25 -0
  93. package/dist/esm/interfaces/UploadResponse.js +1 -0
  94. package/dist/esm/main.d.ts +25 -0
  95. package/dist/esm/main.js +9 -0
  96. package/dist/esm/messages/index.d.ts +100 -0
  97. package/dist/esm/messages/index.js +101 -0
  98. package/dist/esm/package-metadata.d.ts +5 -0
  99. package/dist/esm/package-metadata.js +11 -0
  100. package/dist/esm/package.json +3 -0
  101. package/dist/esm/utils/connectionUtils.d.ts +17 -0
  102. package/dist/esm/utils/connectionUtils.js +78 -0
  103. package/dist/esm/utils/stateUtils.d.ts +26 -0
  104. package/dist/esm/utils/stateUtils.js +83 -0
  105. package/dist/esm/utils/utils.d.ts +17 -0
  106. package/dist/esm/utils/utils.js +128 -0
  107. package/dist/esm/utils/validationUtils.d.ts +7 -0
  108. package/dist/esm/utils/validationUtils.js +50 -0
  109. package/dist/npm/ExternalDropZone.js +6 -6
  110. package/dist/npm/Upload.js +5 -5
  111. package/dist/npm/UploadActionButtons.js +4 -4
  112. package/dist/npm/UploadAddButton.js +3 -3
  113. package/dist/npm/UploadDropZone.js +2 -2
  114. package/dist/npm/UploadInput.js +1 -1
  115. package/dist/npm/UploadList.js +1 -1
  116. package/dist/npm/UploadListActionButton.js +3 -3
  117. package/dist/npm/UploadListGroup.js +2 -2
  118. package/dist/npm/UploadListMultiItem.js +8 -8
  119. package/dist/npm/UploadListSingleItem.js +4 -4
  120. package/dist/npm/UploadStatus.js +3 -3
  121. package/dist/npm/UploadUI.js +2 -2
  122. package/dist/npm/package-metadata.js +1 -1
  123. package/dist/npm/utils/connectionUtils.d.ts +3 -3
  124. package/dist/npm/utils/stateUtils.d.ts +3 -3
  125. package/dist/npm/utils/utils.d.ts +3 -3
  126. package/dist/npm/utils/utils.js +2 -2
  127. package/dist/npm/utils/validationUtils.d.ts +3 -3
  128. package/package.json +4 -4
@@ -0,0 +1,59 @@
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
+ declare type DefaultData<V> = object | ((this: V) => UploadActionButtonsData);
3
+ declare type DefaultMethods<V> = {
4
+ [key: string]: (this: V, ...args: any[]) => any;
5
+ };
6
+ /**
7
+ * @hidden
8
+ */
9
+ export interface UploadActionButtonsProps {
10
+ disabled: boolean;
11
+ navigationIndex?: number;
12
+ clearButtonIndex: number;
13
+ uploadButtonIndex: number;
14
+ actionsLayout: string;
15
+ }
16
+ /**
17
+ * @hidden
18
+ */
19
+ export interface UploadActionButtonsMethods {
20
+ [key: string]: any;
21
+ onClearClick: () => any;
22
+ onUploadClick: () => any;
23
+ }
24
+ /**
25
+ * @hidden
26
+ */
27
+ export interface UploadActionButtonsState {
28
+ _prevNavigationIndex?: number;
29
+ _uploadElement: HTMLButtonElement | null;
30
+ _clearElement: HTMLButtonElement | null;
31
+ clearElementRef: any;
32
+ uploadElementRef: any;
33
+ v3: boolean;
34
+ }
35
+ /**
36
+ * @hidden
37
+ */
38
+ export interface UploadActionButtonsData {
39
+ }
40
+ /**
41
+ * @hidden
42
+ */
43
+ export interface UploadActionButtonsComputed {
44
+ [key: string]: any;
45
+ }
46
+ /**
47
+ * @hidden
48
+ */
49
+ export interface UploadActionButtonsAll extends UploadActionButtonsMethods, UploadActionButtonsState, UploadActionButtonsData, UploadActionButtonsComputed, Vue2type {
50
+ }
51
+ /**
52
+ * @hidden
53
+ */
54
+ declare let UploadActionButtonsVue2: ComponentOptions<Vue2type, DefaultData<UploadActionButtonsData>, DefaultMethods<UploadActionButtonsAll>, UploadActionButtonsComputed, RecordPropsDefinition<UploadActionButtonsProps>>;
55
+ /**
56
+ * @hidden
57
+ */
58
+ declare const UploadActionButtons: DefineComponent<UploadActionButtonsProps, any, UploadActionButtonsData, UploadActionButtonsComputed, UploadActionButtonsMethods, {}, {}, {}, string, UploadActionButtonsProps, UploadActionButtonsProps, {}>;
59
+ export { UploadActionButtons, UploadActionButtonsVue2 };
@@ -0,0 +1,165 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ var ref = allVue.ref;
7
+ var inject = allVue.inject;
8
+ import { classNames } from '@progress/kendo-vue-common';
9
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
+ import { Button } from '@progress/kendo-vue-buttons';
11
+ import { messages, clearSelectedFiles, uploadSelectedFiles } from './messages.js';
12
+ /**
13
+ * @hidden
14
+ */
15
+
16
+ var UploadActionButtonsVue2 = {
17
+ name: 'KendoVueUploadActionButtons',
18
+ props: {
19
+ disabled: Boolean,
20
+ navigationIndex: Number,
21
+ clearButtonIndex: Number,
22
+ uploadButtonIndex: Number,
23
+ actionsLayout: String
24
+ },
25
+ inject: {
26
+ kendoLocalizationService: {
27
+ default: null
28
+ }
29
+ },
30
+ // @ts-ignore
31
+ emits: {
32
+ 'clear': null,
33
+ 'click': null,
34
+ 'upload': null
35
+ },
36
+ created: function created() {
37
+ this._prevNavigationIndex = undefined;
38
+ },
39
+ // @ts-ignore
40
+ setup: !isV3 ? undefined : function () {
41
+ var v3 = !!isV3;
42
+ var uploadElementRef = ref(null);
43
+ var clearElementRef = ref(null);
44
+ var kendoLocalizationService = inject('kendoLocalizationService', {});
45
+ return {
46
+ v3: v3,
47
+ uploadElementRef: uploadElementRef,
48
+ clearElementRef: clearElementRef,
49
+ kendoLocalizationService: kendoLocalizationService
50
+ };
51
+ },
52
+ mounted: function mounted() {
53
+ this._clearElement = this.v3 ? this.clearElementRef : this.$refs.clearElement;
54
+ this._uploadElement = this.v3 ? this.uploadElementRef : this.$refs.uploadElement;
55
+ },
56
+ watch: {
57
+ navigationIndex: function navigationIndex(_newNavigationIndex, oldNavigationIndex) {
58
+ this._prevNavigationIndex = oldNavigationIndex;
59
+ }
60
+ },
61
+ updated: function updated() {
62
+ var _a = this.$props,
63
+ navigationIndex = _a.navigationIndex,
64
+ clearButtonIndex = _a.clearButtonIndex,
65
+ uploadButtonIndex = _a.uploadButtonIndex;
66
+
67
+ if (navigationIndex !== this._prevNavigationIndex) {
68
+ if (navigationIndex === clearButtonIndex && this._clearElement) {
69
+ this._clearElement.focus();
70
+ }
71
+
72
+ if (navigationIndex === uploadButtonIndex && this._uploadElement) {
73
+ this._uploadElement.focus();
74
+ }
75
+ }
76
+ },
77
+ methods: {
78
+ onClearClick: function onClearClick() {
79
+ if (this.$props.disabled) {
80
+ return;
81
+ }
82
+
83
+ this.$emit('clear');
84
+ },
85
+ onUploadClick: function onUploadClick() {
86
+ if (this.$props.disabled) {
87
+ return;
88
+ }
89
+
90
+ this.$emit('click', this.$props.uploadButtonIndex);
91
+ this.$emit('upload');
92
+ }
93
+ },
94
+ render: function render(createElement) {
95
+ var _this = this;
96
+
97
+ var h = gh || createElement;
98
+ var _a = this.$props,
99
+ disabled = _a.disabled,
100
+ navigationIndex = _a.navigationIndex,
101
+ clearButtonIndex = _a.clearButtonIndex,
102
+ uploadButtonIndex = _a.uploadButtonIndex,
103
+ actionsLayout = _a.actionsLayout;
104
+ var localizationService = provideLocalizationService(this);
105
+ var wrapperClasses = classNames('k-actions', {
106
+ 'k-actions-start': actionsLayout === 'start',
107
+ 'k-actions-center': actionsLayout === 'center',
108
+ 'k-actions-end': actionsLayout === 'end',
109
+ 'k-actions-stretched': actionsLayout === 'stretched'
110
+ });
111
+ var clearButtonClasses = classNames('k-clear-selected', navigationIndex === clearButtonIndex ? 'k-focus' : '');
112
+ var uploadButtonClasses = classNames('k-upload-selected', navigationIndex === uploadButtonIndex ? 'k-focus' : '');
113
+ return h("div", {
114
+ "class": wrapperClasses
115
+ }, [// @ts-ignore function children
116
+ h(Button, {
117
+ type: "button",
118
+ attrs: this.v3 ? undefined : {
119
+ type: "button",
120
+ disabled: disabled,
121
+ tabIndex: -1
122
+ },
123
+ ref: this.v3 ? function (el) {
124
+ _this.clearElementRef = el;
125
+ } : 'clearElement',
126
+ disabled: disabled,
127
+ "class": clearButtonClasses,
128
+ tabIndex: -1,
129
+ onClick: this.onClearClick,
130
+ on: this.v3 ? undefined : {
131
+ "click": this.onClearClick
132
+ }
133
+ }, this.v3 ? function () {
134
+ return [localizationService.toLanguageString(clearSelectedFiles, messages[clearSelectedFiles])];
135
+ } : [localizationService.toLanguageString(clearSelectedFiles, messages[clearSelectedFiles])]), // @ts-ignore function children
136
+ h(Button, {
137
+ type: "button",
138
+ attrs: this.v3 ? undefined : {
139
+ type: "button",
140
+ disabled: disabled,
141
+ themeColor: 'primary',
142
+ tabIndex: -1
143
+ },
144
+ ref: this.v3 ? function (el) {
145
+ _this.uploadElementRef = el;
146
+ } : 'uploadElement',
147
+ disabled: disabled,
148
+ themeColor: 'primary',
149
+ "class": uploadButtonClasses,
150
+ tabIndex: -1,
151
+ onClick: this.onUploadClick,
152
+ on: this.v3 ? undefined : {
153
+ "click": this.onUploadClick
154
+ }
155
+ }, this.v3 ? function () {
156
+ return [localizationService.toLanguageString(uploadSelectedFiles, messages[uploadSelectedFiles])];
157
+ } : [localizationService.toLanguageString(uploadSelectedFiles, messages[uploadSelectedFiles])])]);
158
+ }
159
+ };
160
+ /**
161
+ * @hidden
162
+ */
163
+
164
+ var UploadActionButtons = UploadActionButtonsVue2;
165
+ export { UploadActionButtons, UploadActionButtonsVue2 };
@@ -0,0 +1,67 @@
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
+ declare type DefaultData<V> = object | ((this: V) => UploadAddButtonData);
3
+ declare type DefaultMethods<V> = {
4
+ [key: string]: (this: V, ...args: any[]) => any;
5
+ };
6
+ import { UploadAsyncProps } from './interfaces/UploadAsyncProps';
7
+ /**
8
+ * @hidden
9
+ */
10
+ export interface UploadAddButtonProps {
11
+ addButtonIndex: number;
12
+ navigationIndex: number | undefined;
13
+ notFocusedIndex: number | undefined;
14
+ tabIndex?: number;
15
+ async: UploadAsyncProps;
16
+ multiple?: boolean;
17
+ disabled?: boolean;
18
+ accept?: string;
19
+ id?: string;
20
+ ariaLabelledBy?: string;
21
+ ariaDescribedBy?: string;
22
+ }
23
+ /**
24
+ * @hidden
25
+ */
26
+ export interface UploadAddButtonMethods {
27
+ [key: string]: any;
28
+ focus: () => any;
29
+ onClick: () => any;
30
+ actionElement: () => any;
31
+ }
32
+ /**
33
+ * @hidden
34
+ */
35
+ export interface UploadAddButtonState {
36
+ _prevNavigationIndex: number;
37
+ element: HTMLDivElement | null;
38
+ uploadInput: any | null;
39
+ elementRef: any;
40
+ uploadInputRef: any;
41
+ v3: boolean;
42
+ }
43
+ /**
44
+ * @hidden
45
+ */
46
+ export interface UploadAddButtonData {
47
+ }
48
+ /**
49
+ * @hidden
50
+ */
51
+ export interface UploadAddButtonComputed {
52
+ [key: string]: any;
53
+ }
54
+ /**
55
+ * @hidden
56
+ */
57
+ export interface UploadAddButtonAll extends UploadAddButtonMethods, UploadAddButtonState, UploadAddButtonData, UploadAddButtonComputed, Vue2type {
58
+ }
59
+ /**
60
+ * @hidden
61
+ */
62
+ declare let UploadAddButtonVue2: ComponentOptions<Vue2type, DefaultData<UploadAddButtonData>, DefaultMethods<UploadAddButtonAll>, UploadAddButtonComputed, RecordPropsDefinition<UploadAddButtonProps>>;
63
+ /**
64
+ * @hidden
65
+ */
66
+ declare const UploadAddButton: DefineComponent<UploadAddButtonProps, any, UploadAddButtonData, UploadAddButtonComputed, UploadAddButtonMethods, {}, {}, {}, string, UploadAddButtonProps, UploadAddButtonProps, {}>;
67
+ export { UploadAddButton, UploadAddButtonVue2 };
@@ -0,0 +1,165 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ var ref = allVue.ref;
7
+ var inject = allVue.inject;
8
+ import { classNames, setRef } from '@progress/kendo-vue-common';
9
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
+ import { messages, select } from './messages.js';
11
+ import { UploadInput } from './UploadInput.js';
12
+ /**
13
+ * @hidden
14
+ */
15
+
16
+ var UploadAddButtonVue2 = {
17
+ name: 'KendoVueUploadAddButton',
18
+ props: {
19
+ addButtonIndex: Number,
20
+ navigationIndex: Number,
21
+ notFocusedIndex: Number,
22
+ tabIndex: Number,
23
+ async: Object,
24
+ multiple: Boolean,
25
+ disabled: Boolean,
26
+ accept: String,
27
+ id: String,
28
+ ariaLabelledBy: String,
29
+ ariaDescribedBy: String
30
+ },
31
+ inject: {
32
+ kendoLocalizationService: {
33
+ default: null
34
+ }
35
+ },
36
+ // @ts-ignore
37
+ emits: {
38
+ 'add': null,
39
+ 'click': null
40
+ },
41
+ // @ts-ignore
42
+ setup: !isV3 ? undefined : function () {
43
+ var v3 = !!isV3;
44
+ var elementRef = ref(null);
45
+ var uploadInputRef = ref(null);
46
+ var kendoLocalizationService = inject('kendoLocalizationService', {});
47
+ return {
48
+ v3: v3,
49
+ elementRef: elementRef,
50
+ uploadInputRef: uploadInputRef,
51
+ kendoLocalizationService: kendoLocalizationService
52
+ };
53
+ },
54
+ mounted: function mounted() {
55
+ this.element = this.v3 ? this.elementRef : this.$refs.element;
56
+ this.uploadInput = this.v3 ? this.uploadInputRef : this.$refs.uploadInput;
57
+ },
58
+ watch: {
59
+ navigationIndex: function navigationIndex(_newNavigationIndex, oldNavigationIndex) {
60
+ this._prevNavigationIndex = oldNavigationIndex;
61
+ }
62
+ },
63
+ updated: function updated() {
64
+ var _a = this.$props,
65
+ navigationIndex = _a.navigationIndex,
66
+ addButtonIndex = _a.addButtonIndex,
67
+ notFocusedIndex = _a.notFocusedIndex;
68
+
69
+ if (navigationIndex !== this._prevNavigationIndex && this._prevNavigationIndex !== notFocusedIndex && navigationIndex === addButtonIndex && this.element) {
70
+ this.element.focus();
71
+ }
72
+ },
73
+ methods: {
74
+ focus: function focus() {
75
+ if (this.element) {
76
+ this.element.focus();
77
+ }
78
+ },
79
+ onClick: function onClick() {
80
+ this.$emit('click', this.$props.addButtonIndex);
81
+ },
82
+ onAdd: function onAdd(files) {
83
+ this.$emit('add', files);
84
+ },
85
+ onInputMouseDown: function onInputMouseDown(e) {
86
+ if (this.element) {
87
+ e.preventDefault();
88
+ this.element.focus();
89
+ }
90
+ },
91
+ actionElement: function actionElement() {
92
+ if (this.uploadInput) {
93
+ return this.uploadInput.actionElement;
94
+ }
95
+ }
96
+ },
97
+ render: function render(createElement) {
98
+ var _this = this;
99
+
100
+ var h = gh || createElement;
101
+ var _a = this.$props,
102
+ navigationIndex = _a.navigationIndex,
103
+ addButtonIndex = _a.addButtonIndex,
104
+ tabIndex = _a.tabIndex,
105
+ id = _a.id,
106
+ ariaLabelledBy = _a.ariaLabelledBy,
107
+ ariaDescribedBy = _a.ariaDescribedBy,
108
+ async = _a.async,
109
+ multiple = _a.multiple,
110
+ disabled = _a.disabled,
111
+ accept = _a.accept;
112
+ var localizationService = provideLocalizationService(this);
113
+ var selectMessage = localizationService.toLanguageString(select, messages[select]);
114
+ var buttonClassName = classNames('k-button', 'k-button-md', 'k-button-solid', 'k-button-solid-base', 'k-rounded-md', 'k-upload-button', navigationIndex === addButtonIndex ? 'k-focus' : '');
115
+ return h("div", {
116
+ id: id,
117
+ attrs: this.v3 ? undefined : {
118
+ id: id,
119
+ role: "button",
120
+ "aria-label": selectMessage,
121
+ "aria-labelledby": ariaLabelledBy,
122
+ "aria-describedby": ariaDescribedBy,
123
+ tabindex: tabIndex
124
+ },
125
+ ref: setRef(this, 'element'),
126
+ role: "button",
127
+ "class": buttonClassName,
128
+ "aria-label": selectMessage,
129
+ "aria-labelledby": ariaLabelledBy,
130
+ "aria-describedby": ariaDescribedBy,
131
+ tabindex: tabIndex,
132
+ onClick: this.onClick,
133
+ on: this.v3 ? undefined : {
134
+ "click": this.onClick
135
+ }
136
+ }, [// @ts-ignore function children
137
+ h(UploadInput, {
138
+ async: async,
139
+ attrs: this.v3 ? undefined : {
140
+ async: async,
141
+ multiple: multiple,
142
+ disabled: disabled,
143
+ accept: accept
144
+ },
145
+ multiple: multiple,
146
+ disabled: disabled,
147
+ accept: accept,
148
+ onMousedown: this.onInputMouseDown,
149
+ on: this.v3 ? undefined : {
150
+ "mousedown": this.onInputMouseDown,
151
+ "add": this.onAdd
152
+ },
153
+ onAdd: this.onAdd,
154
+ ref: this.v3 ? function (el) {
155
+ _this.uploadInputRef = el;
156
+ } : 'uploadInput'
157
+ }), h("span", [selectMessage])]);
158
+ }
159
+ };
160
+ /**
161
+ * @hidden
162
+ */
163
+
164
+ var UploadAddButton = UploadAddButtonVue2;
165
+ export { UploadAddButton, UploadAddButtonVue2 };
@@ -0,0 +1,61 @@
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
+ declare type DefaultData<V> = object | ((this: V) => UploadDropZoneData);
3
+ declare type DefaultMethods<V> = {
4
+ [key: string]: (this: V, ...args: any[]) => any;
5
+ };
6
+ import { GroupedFiles } from './interfaces/FileGroup';
7
+ import { UploadUIProps } from './main';
8
+ /**
9
+ * @hidden
10
+ */
11
+ export interface UploadDropZoneProps extends UploadUIProps {
12
+ async: Object;
13
+ fileGroup: GroupedFiles;
14
+ disabled: boolean | undefined;
15
+ }
16
+ /**
17
+ * @hidden
18
+ */
19
+ export interface UploadDropZoneMethods {
20
+ [key: string]: any;
21
+ focus: () => any;
22
+ onClick: () => any;
23
+ actionElement: () => any;
24
+ }
25
+ /**
26
+ * @hidden
27
+ */
28
+ export interface UploadDropZoneState {
29
+ _documentInterval: any;
30
+ _elementInterval: any;
31
+ _lastDocumentDragOver: Date | null;
32
+ _lastElementDragOver: Date | null;
33
+ v3: boolean;
34
+ }
35
+ /**
36
+ * @hidden
37
+ */
38
+ export interface UploadDropZoneData {
39
+ currentDocumentActive: boolean;
40
+ currentElementActive: boolean;
41
+ }
42
+ /**
43
+ * @hidden
44
+ */
45
+ export interface UploadDropZoneComputed {
46
+ [key: string]: any;
47
+ }
48
+ /**
49
+ * @hidden
50
+ */
51
+ export interface UploadDropZoneAll extends UploadDropZoneMethods, UploadDropZoneState, UploadDropZoneData, UploadDropZoneComputed, Vue2type {
52
+ }
53
+ /**
54
+ * @hidden
55
+ */
56
+ declare let UploadDropZoneVue2: ComponentOptions<Vue2type, DefaultData<UploadDropZoneData>, DefaultMethods<UploadDropZoneAll>, UploadDropZoneComputed, RecordPropsDefinition<UploadDropZoneProps>>;
57
+ /**
58
+ * @hidden
59
+ */
60
+ declare const UploadDropZone: DefineComponent<UploadDropZoneProps, any, UploadDropZoneData, UploadDropZoneComputed, UploadDropZoneMethods, {}, {}, {}, string, UploadDropZoneProps, UploadDropZoneProps, {}>;
61
+ export { UploadDropZone, UploadDropZoneVue2 };