@progress/kendo-vue-dropdowns 5.3.0-dev.202409130647 → 5.3.0-develop.1

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 (273) hide show
  1. package/AutoComplete/AutoComplete.js +8 -0
  2. package/AutoComplete/AutoComplete.mjs +526 -0
  3. package/ComboBox/ComboBox.js +8 -0
  4. package/ComboBox/ComboBox.mjs +776 -0
  5. package/DropDownList/DropDownList.js +8 -0
  6. package/DropDownList/DropDownList.mjs +781 -0
  7. package/DropDownTree/DropDownTree.js +8 -0
  8. package/DropDownTree/DropDownTree.mjs +709 -0
  9. package/DropDownTree/ListNoData.js +8 -0
  10. package/DropDownTree/ListNoData.mjs +21 -0
  11. package/MultiSelect/MultiSelect.js +8 -0
  12. package/MultiSelect/MultiSelect.mjs +872 -0
  13. package/MultiSelect/TagList.js +8 -0
  14. package/MultiSelect/TagList.mjs +119 -0
  15. package/MultiSelectTree/MultiSelectTree.js +8 -0
  16. package/MultiSelectTree/MultiSelectTree.mjs +759 -0
  17. package/MultiSelectTree/utils.js +8 -0
  18. package/MultiSelectTree/utils.mjs +73 -0
  19. package/README.md +28 -43
  20. package/common/ClearButton.js +8 -0
  21. package/common/ClearButton.mjs +54 -0
  22. package/common/DropDownBase.js +8 -0
  23. package/common/DropDownBase.mjs +193 -0
  24. package/common/GroupStickyHeader.js +8 -0
  25. package/common/GroupStickyHeader.mjs +38 -0
  26. package/common/List.js +8 -0
  27. package/common/List.mjs +139 -0
  28. package/common/ListContainer.js +8 -0
  29. package/common/ListContainer.mjs +103 -0
  30. package/common/ListDefaultItem.js +8 -0
  31. package/common/ListDefaultItem.mjs +47 -0
  32. package/common/ListFilter.js +8 -0
  33. package/common/ListFilter.mjs +147 -0
  34. package/common/ListGroupItem.js +8 -0
  35. package/common/ListGroupItem.mjs +46 -0
  36. package/common/ListItem.js +8 -0
  37. package/common/ListItem.mjs +73 -0
  38. package/common/Navigation.js +8 -0
  39. package/common/Navigation.mjs +28 -0
  40. package/common/SearchBar.js +8 -0
  41. package/common/SearchBar.mjs +129 -0
  42. package/common/VirtualScroll.js +8 -0
  43. package/common/VirtualScroll.mjs +95 -0
  44. package/common/constants.js +8 -0
  45. package/common/constants.mjs +12 -0
  46. package/common/settings.js +8 -0
  47. package/common/settings.mjs +11 -0
  48. package/common/utils.js +8 -0
  49. package/common/utils.mjs +104 -0
  50. package/dist/cdn/js/kendo-vue-dropdowns.js +8 -1
  51. package/index.d.mts +4037 -0
  52. package/index.d.ts +4037 -0
  53. package/index.js +8 -0
  54. package/index.mjs +25 -0
  55. package/messages/main.js +8 -0
  56. package/messages/main.mjs +26 -0
  57. package/package-metadata.js +8 -0
  58. package/package-metadata.mjs +18 -0
  59. package/package.json +24 -58
  60. package/dist/es/AutoComplete/AutoComplete.d.ts +0 -107
  61. package/dist/es/AutoComplete/AutoComplete.js +0 -825
  62. package/dist/es/AutoComplete/AutoCompleteProps.d.ts +0 -234
  63. package/dist/es/AutoComplete/AutoCompleteProps.js +0 -2
  64. package/dist/es/ComboBox/ComboBox.d.ts +0 -99
  65. package/dist/es/ComboBox/ComboBox.js +0 -1315
  66. package/dist/es/ComboBox/ComboBoxProps.d.ts +0 -277
  67. package/dist/es/ComboBox/ComboBoxProps.js +0 -2
  68. package/dist/es/DropDownList/DropDownList.d.ts +0 -103
  69. package/dist/es/DropDownList/DropDownList.js +0 -1314
  70. package/dist/es/DropDownList/DropDownListProps.d.ts +0 -307
  71. package/dist/es/DropDownList/DropDownListProps.js +0 -2
  72. package/dist/es/DropDownTree/DropDownTree.d.ts +0 -49
  73. package/dist/es/DropDownTree/DropDownTree.js +0 -1090
  74. package/dist/es/DropDownTree/DropDownTreeProps.d.ts +0 -301
  75. package/dist/es/DropDownTree/DropDownTreeProps.js +0 -2
  76. package/dist/es/DropDownTree/ListNoData.d.ts +0 -42
  77. package/dist/es/DropDownTree/ListNoData.js +0 -32
  78. package/dist/es/MultiSelect/MultiSelect.d.ts +0 -115
  79. package/dist/es/MultiSelect/MultiSelect.js +0 -1515
  80. package/dist/es/MultiSelect/MultiSelectProps.d.ts +0 -290
  81. package/dist/es/MultiSelect/MultiSelectProps.js +0 -2
  82. package/dist/es/MultiSelect/TagList.d.ts +0 -54
  83. package/dist/es/MultiSelect/TagList.js +0 -176
  84. package/dist/es/MultiSelectTree/MultiSelectTree.d.ts +0 -48
  85. package/dist/es/MultiSelectTree/MultiSelectTree.js +0 -1220
  86. package/dist/es/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
  87. package/dist/es/MultiSelectTree/MultiSelectTreeProps.js +0 -2
  88. package/dist/es/MultiSelectTree/utils.d.ts +0 -17
  89. package/dist/es/MultiSelectTree/utils.js +0 -109
  90. package/dist/es/additionalTypes.ts +0 -21
  91. package/dist/es/common/ClearButton.d.ts +0 -21
  92. package/dist/es/common/ClearButton.js +0 -73
  93. package/dist/es/common/DropDownBase.d.ts +0 -95
  94. package/dist/es/common/DropDownBase.js +0 -298
  95. package/dist/es/common/GroupStickyHeader.d.ts +0 -32
  96. package/dist/es/common/GroupStickyHeader.js +0 -60
  97. package/dist/es/common/List.d.ts +0 -60
  98. package/dist/es/common/List.js +0 -201
  99. package/dist/es/common/ListContainer.d.ts +0 -40
  100. package/dist/es/common/ListContainer.js +0 -161
  101. package/dist/es/common/ListDefaultItem.d.ts +0 -29
  102. package/dist/es/common/ListDefaultItem.js +0 -60
  103. package/dist/es/common/ListFilter.d.ts +0 -49
  104. package/dist/es/common/ListFilter.js +0 -175
  105. package/dist/es/common/ListGroupItem.d.ts +0 -41
  106. package/dist/es/common/ListGroupItem.js +0 -71
  107. package/dist/es/common/ListItem.d.ts +0 -71
  108. package/dist/es/common/ListItem.js +0 -101
  109. package/dist/es/common/Navigation.d.ts +0 -12
  110. package/dist/es/common/Navigation.js +0 -34
  111. package/dist/es/common/SearchBar.d.ts +0 -66
  112. package/dist/es/common/SearchBar.js +0 -177
  113. package/dist/es/common/VirtualScroll.d.ts +0 -42
  114. package/dist/es/common/VirtualScroll.js +0 -163
  115. package/dist/es/common/constants.d.ts +0 -4
  116. package/dist/es/common/constants.js +0 -4
  117. package/dist/es/common/events.d.ts +0 -63
  118. package/dist/es/common/events.js +0 -1
  119. package/dist/es/common/filterDescriptor.d.ts +0 -41
  120. package/dist/es/common/filterDescriptor.js +0 -2
  121. package/dist/es/common/settings.d.ts +0 -107
  122. package/dist/es/common/settings.js +0 -8
  123. package/dist/es/common/utils.d.ts +0 -70
  124. package/dist/es/common/utils.js +0 -202
  125. package/dist/es/main.d.ts +0 -18
  126. package/dist/es/main.js +0 -10
  127. package/dist/es/messages/main.d.ts +0 -40
  128. package/dist/es/messages/main.js +0 -41
  129. package/dist/es/package-metadata.d.ts +0 -5
  130. package/dist/es/package-metadata.js +0 -11
  131. package/dist/esm/AutoComplete/AutoComplete.d.ts +0 -107
  132. package/dist/esm/AutoComplete/AutoComplete.js +0 -825
  133. package/dist/esm/AutoComplete/AutoCompleteProps.d.ts +0 -234
  134. package/dist/esm/AutoComplete/AutoCompleteProps.js +0 -2
  135. package/dist/esm/ComboBox/ComboBox.d.ts +0 -99
  136. package/dist/esm/ComboBox/ComboBox.js +0 -1315
  137. package/dist/esm/ComboBox/ComboBoxProps.d.ts +0 -277
  138. package/dist/esm/ComboBox/ComboBoxProps.js +0 -2
  139. package/dist/esm/DropDownList/DropDownList.d.ts +0 -103
  140. package/dist/esm/DropDownList/DropDownList.js +0 -1314
  141. package/dist/esm/DropDownList/DropDownListProps.d.ts +0 -307
  142. package/dist/esm/DropDownList/DropDownListProps.js +0 -2
  143. package/dist/esm/DropDownTree/DropDownTree.d.ts +0 -49
  144. package/dist/esm/DropDownTree/DropDownTree.js +0 -1090
  145. package/dist/esm/DropDownTree/DropDownTreeProps.d.ts +0 -301
  146. package/dist/esm/DropDownTree/DropDownTreeProps.js +0 -2
  147. package/dist/esm/DropDownTree/ListNoData.d.ts +0 -42
  148. package/dist/esm/DropDownTree/ListNoData.js +0 -32
  149. package/dist/esm/MultiSelect/MultiSelect.d.ts +0 -115
  150. package/dist/esm/MultiSelect/MultiSelect.js +0 -1515
  151. package/dist/esm/MultiSelect/MultiSelectProps.d.ts +0 -290
  152. package/dist/esm/MultiSelect/MultiSelectProps.js +0 -2
  153. package/dist/esm/MultiSelect/TagList.d.ts +0 -54
  154. package/dist/esm/MultiSelect/TagList.js +0 -176
  155. package/dist/esm/MultiSelectTree/MultiSelectTree.d.ts +0 -48
  156. package/dist/esm/MultiSelectTree/MultiSelectTree.js +0 -1220
  157. package/dist/esm/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
  158. package/dist/esm/MultiSelectTree/MultiSelectTreeProps.js +0 -2
  159. package/dist/esm/MultiSelectTree/utils.d.ts +0 -17
  160. package/dist/esm/MultiSelectTree/utils.js +0 -109
  161. package/dist/esm/additionalTypes.ts +0 -21
  162. package/dist/esm/common/ClearButton.d.ts +0 -21
  163. package/dist/esm/common/ClearButton.js +0 -73
  164. package/dist/esm/common/DropDownBase.d.ts +0 -95
  165. package/dist/esm/common/DropDownBase.js +0 -298
  166. package/dist/esm/common/GroupStickyHeader.d.ts +0 -32
  167. package/dist/esm/common/GroupStickyHeader.js +0 -60
  168. package/dist/esm/common/List.d.ts +0 -60
  169. package/dist/esm/common/List.js +0 -201
  170. package/dist/esm/common/ListContainer.d.ts +0 -40
  171. package/dist/esm/common/ListContainer.js +0 -161
  172. package/dist/esm/common/ListDefaultItem.d.ts +0 -29
  173. package/dist/esm/common/ListDefaultItem.js +0 -60
  174. package/dist/esm/common/ListFilter.d.ts +0 -49
  175. package/dist/esm/common/ListFilter.js +0 -175
  176. package/dist/esm/common/ListGroupItem.d.ts +0 -41
  177. package/dist/esm/common/ListGroupItem.js +0 -71
  178. package/dist/esm/common/ListItem.d.ts +0 -71
  179. package/dist/esm/common/ListItem.js +0 -101
  180. package/dist/esm/common/Navigation.d.ts +0 -12
  181. package/dist/esm/common/Navigation.js +0 -34
  182. package/dist/esm/common/SearchBar.d.ts +0 -66
  183. package/dist/esm/common/SearchBar.js +0 -177
  184. package/dist/esm/common/VirtualScroll.d.ts +0 -42
  185. package/dist/esm/common/VirtualScroll.js +0 -163
  186. package/dist/esm/common/constants.d.ts +0 -4
  187. package/dist/esm/common/constants.js +0 -4
  188. package/dist/esm/common/events.d.ts +0 -63
  189. package/dist/esm/common/events.js +0 -1
  190. package/dist/esm/common/filterDescriptor.d.ts +0 -41
  191. package/dist/esm/common/filterDescriptor.js +0 -2
  192. package/dist/esm/common/settings.d.ts +0 -107
  193. package/dist/esm/common/settings.js +0 -8
  194. package/dist/esm/common/utils.d.ts +0 -70
  195. package/dist/esm/common/utils.js +0 -202
  196. package/dist/esm/main.d.ts +0 -18
  197. package/dist/esm/main.js +0 -10
  198. package/dist/esm/messages/main.d.ts +0 -40
  199. package/dist/esm/messages/main.js +0 -41
  200. package/dist/esm/package-metadata.d.ts +0 -5
  201. package/dist/esm/package-metadata.js +0 -11
  202. package/dist/esm/package.json +0 -3
  203. package/dist/npm/AutoComplete/AutoComplete.d.ts +0 -107
  204. package/dist/npm/AutoComplete/AutoComplete.js +0 -832
  205. package/dist/npm/AutoComplete/AutoCompleteProps.d.ts +0 -234
  206. package/dist/npm/AutoComplete/AutoCompleteProps.js +0 -3
  207. package/dist/npm/ComboBox/ComboBox.d.ts +0 -99
  208. package/dist/npm/ComboBox/ComboBox.js +0 -1322
  209. package/dist/npm/ComboBox/ComboBoxProps.d.ts +0 -277
  210. package/dist/npm/ComboBox/ComboBoxProps.js +0 -3
  211. package/dist/npm/DropDownList/DropDownList.d.ts +0 -103
  212. package/dist/npm/DropDownList/DropDownList.js +0 -1321
  213. package/dist/npm/DropDownList/DropDownListProps.d.ts +0 -307
  214. package/dist/npm/DropDownList/DropDownListProps.js +0 -3
  215. package/dist/npm/DropDownTree/DropDownTree.d.ts +0 -49
  216. package/dist/npm/DropDownTree/DropDownTree.js +0 -1095
  217. package/dist/npm/DropDownTree/DropDownTreeProps.d.ts +0 -301
  218. package/dist/npm/DropDownTree/DropDownTreeProps.js +0 -3
  219. package/dist/npm/DropDownTree/ListNoData.d.ts +0 -42
  220. package/dist/npm/DropDownTree/ListNoData.js +0 -39
  221. package/dist/npm/MultiSelect/MultiSelect.d.ts +0 -115
  222. package/dist/npm/MultiSelect/MultiSelect.js +0 -1522
  223. package/dist/npm/MultiSelect/MultiSelectProps.d.ts +0 -290
  224. package/dist/npm/MultiSelect/MultiSelectProps.js +0 -3
  225. package/dist/npm/MultiSelect/TagList.d.ts +0 -54
  226. package/dist/npm/MultiSelect/TagList.js +0 -183
  227. package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +0 -48
  228. package/dist/npm/MultiSelectTree/MultiSelectTree.js +0 -1227
  229. package/dist/npm/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
  230. package/dist/npm/MultiSelectTree/MultiSelectTreeProps.js +0 -3
  231. package/dist/npm/MultiSelectTree/utils.d.ts +0 -17
  232. package/dist/npm/MultiSelectTree/utils.js +0 -114
  233. package/dist/npm/additionalTypes.ts +0 -21
  234. package/dist/npm/common/ClearButton.d.ts +0 -21
  235. package/dist/npm/common/ClearButton.js +0 -80
  236. package/dist/npm/common/DropDownBase.d.ts +0 -95
  237. package/dist/npm/common/DropDownBase.js +0 -303
  238. package/dist/npm/common/GroupStickyHeader.d.ts +0 -32
  239. package/dist/npm/common/GroupStickyHeader.js +0 -67
  240. package/dist/npm/common/List.d.ts +0 -60
  241. package/dist/npm/common/List.js +0 -208
  242. package/dist/npm/common/ListContainer.d.ts +0 -40
  243. package/dist/npm/common/ListContainer.js +0 -168
  244. package/dist/npm/common/ListDefaultItem.d.ts +0 -29
  245. package/dist/npm/common/ListDefaultItem.js +0 -67
  246. package/dist/npm/common/ListFilter.d.ts +0 -49
  247. package/dist/npm/common/ListFilter.js +0 -182
  248. package/dist/npm/common/ListGroupItem.d.ts +0 -41
  249. package/dist/npm/common/ListGroupItem.js +0 -78
  250. package/dist/npm/common/ListItem.d.ts +0 -71
  251. package/dist/npm/common/ListItem.js +0 -108
  252. package/dist/npm/common/Navigation.d.ts +0 -12
  253. package/dist/npm/common/Navigation.js +0 -37
  254. package/dist/npm/common/SearchBar.d.ts +0 -66
  255. package/dist/npm/common/SearchBar.js +0 -184
  256. package/dist/npm/common/VirtualScroll.d.ts +0 -42
  257. package/dist/npm/common/VirtualScroll.js +0 -168
  258. package/dist/npm/common/constants.d.ts +0 -4
  259. package/dist/npm/common/constants.js +0 -10
  260. package/dist/npm/common/events.d.ts +0 -63
  261. package/dist/npm/common/events.js +0 -2
  262. package/dist/npm/common/filterDescriptor.d.ts +0 -41
  263. package/dist/npm/common/filterDescriptor.js +0 -3
  264. package/dist/npm/common/settings.d.ts +0 -107
  265. package/dist/npm/common/settings.js +0 -11
  266. package/dist/npm/common/utils.d.ts +0 -70
  267. package/dist/npm/common/utils.js +0 -221
  268. package/dist/npm/main.d.ts +0 -18
  269. package/dist/npm/main.js +0 -36
  270. package/dist/npm/messages/main.d.ts +0 -40
  271. package/dist/npm/messages/main.js +0 -44
  272. package/dist/npm/package-metadata.d.ts +0 -5
  273. package/dist/npm/package-metadata.js +0 -14
@@ -0,0 +1,709 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { defineComponent as he, h as u, createVNode as i, isVNode as fe } from "vue";
9
+ import { validatePackage as me, guid as B, canUseDOM as ge, getRef as c, getTabIndex as ve, templateRendering as h, getListeners as f, getTemplate as w, Keys as a, noop as P, kendoThemeMaps as be, setRef as m, Icon as W, classNames as A } from "@progress/kendo-vue-common";
10
+ import { Popup as ye } from "@progress/kendo-vue-popup";
11
+ import { provideLocalizationService as we } from "@progress/kendo-vue-intl";
12
+ import { TreeView as K } from "@progress/kendo-vue-treeview";
13
+ import { packageMetadata as ke } from "../package-metadata.mjs";
14
+ import { isPresent as Se, getItemValue as $e, areSame as Fe } from "../common/utils.mjs";
15
+ import { ListNoData as Ve } from "./ListNoData.mjs";
16
+ import { nodata as L, messages as N, clear as z } from "../messages/main.mjs";
17
+ import { FloatingLabel as xe } from "@progress/kendo-vue-labels";
18
+ import { ListFilter as j } from "../common/ListFilter.mjs";
19
+ import { Button as q } from "@progress/kendo-vue-buttons";
20
+ import { xIcon as _, caretAltDownIcon as Re } from "@progress/kendo-svg-icons";
21
+ import { MOBILE_SMALL_DEVICE as G, MOBILE_MEDIUM_DEVICE as Ie } from "../common/constants.mjs";
22
+ import { ActionSheet as De } from "@progress/kendo-vue-layout";
23
+ import Ce from "../common/DropDownBase.mjs";
24
+ function H(e) {
25
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !fe(e);
26
+ }
27
+ const {
28
+ sizeMap: Oe,
29
+ roundedMap: Me
30
+ } = be, Ee = "Please select a value from the list!", U = (e) => e.split("_").map((t) => parseInt(t, 10)), V = (e, t) => {
31
+ const {
32
+ validationMessage: s,
33
+ valid: n,
34
+ required: o
35
+ } = e;
36
+ return {
37
+ customError: s !== void 0,
38
+ valid: !!(n !== void 0 ? n : !o || t),
39
+ valueMissing: !t
40
+ };
41
+ }, Xe = /* @__PURE__ */ he({
42
+ name: "KendoDropDownTree",
43
+ model: {
44
+ event: "changemodel"
45
+ },
46
+ emits: {
47
+ open: null,
48
+ close: null,
49
+ focus: null,
50
+ blur: null,
51
+ change: null,
52
+ filterchange: null,
53
+ expandchange: null,
54
+ changemodel: null,
55
+ "update:modelValue": null
56
+ },
57
+ props: {
58
+ opened: {
59
+ type: Boolean,
60
+ default: void 0
61
+ },
62
+ disabled: Boolean,
63
+ dir: String,
64
+ tabIndex: Number,
65
+ accessKey: String,
66
+ dataItems: {
67
+ type: Array,
68
+ default: function() {
69
+ return [];
70
+ }
71
+ },
72
+ value: {
73
+ type: [Object, String, Number, Boolean],
74
+ default: function() {
75
+ }
76
+ },
77
+ modelValue: {
78
+ type: [Object, String, Number, Boolean],
79
+ default: function() {
80
+ }
81
+ },
82
+ valueMap: Function,
83
+ placeholder: String,
84
+ dataItemKey: {
85
+ type: String,
86
+ required: !0
87
+ },
88
+ textField: {
89
+ type: String,
90
+ required: !0
91
+ },
92
+ selectField: {
93
+ type: String,
94
+ default: "selected"
95
+ },
96
+ expandField: String,
97
+ subItemsField: {
98
+ type: String,
99
+ default: "items"
100
+ },
101
+ className: String,
102
+ label: String,
103
+ validationMessage: String,
104
+ validityStyles: {
105
+ type: Boolean,
106
+ default: !0
107
+ },
108
+ valid: {
109
+ type: Boolean,
110
+ default: void 0
111
+ },
112
+ required: Boolean,
113
+ name: String,
114
+ id: String,
115
+ ariaLabel: {
116
+ type: String,
117
+ default: void 0
118
+ },
119
+ ariaLabelledBy: String,
120
+ ariaDescribedBy: String,
121
+ filterable: Boolean,
122
+ filter: String,
123
+ loading: Boolean,
124
+ popupSettings: {
125
+ type: Object,
126
+ default: function() {
127
+ return {
128
+ animate: !0,
129
+ height: "200px",
130
+ anchor: ""
131
+ };
132
+ }
133
+ },
134
+ size: {
135
+ type: String,
136
+ default: "medium",
137
+ validator: function(e) {
138
+ return [null, "small", "medium", "large"].includes(e);
139
+ }
140
+ },
141
+ rounded: {
142
+ type: String,
143
+ default: "medium",
144
+ validator: function(e) {
145
+ return [null, "small", "medium", "large", "full"].includes(e);
146
+ }
147
+ },
148
+ fillMode: {
149
+ type: String,
150
+ default: "solid",
151
+ validator: function(e) {
152
+ return [null, "flat", "outline", "solid"].includes(e);
153
+ }
154
+ },
155
+ item: [String, Function, Object],
156
+ header: [String, Function, Object],
157
+ footer: [String, Function, Object],
158
+ valueRender: [String, Function, Object],
159
+ listNoData: [String, Function, Object],
160
+ adaptive: {
161
+ type: Boolean,
162
+ default: void 0
163
+ },
164
+ adaptiveTitle: {
165
+ type: String,
166
+ default: void 0
167
+ }
168
+ },
169
+ inject: {
170
+ kendoLocalizationService: {
171
+ default: null
172
+ }
173
+ },
174
+ created() {
175
+ this.observer = null, me(ke), this.base = new Ce(this), this.componentGuid = B(), this.anchor = B();
176
+ },
177
+ data() {
178
+ return {
179
+ currentOpened: !1,
180
+ focused: !1,
181
+ filterState: "",
182
+ currentValue: void 0,
183
+ popupWidth: "200px",
184
+ windowWidth: 0,
185
+ initialAdaptiveRenderingValues: void 0
186
+ };
187
+ },
188
+ computed: {
189
+ wrapperClass() {
190
+ const {
191
+ validationMessage: e,
192
+ valid: t,
193
+ required: s,
194
+ validityStyles: n
195
+ } = this.$props, o = V({
196
+ validationMessage: e,
197
+ valid: t,
198
+ required: s
199
+ }, this.hasValue), d = !n || o.valid, {
200
+ size: r,
201
+ rounded: l,
202
+ fillMode: p
203
+ } = this.$props;
204
+ return {
205
+ "k-dropdowntree": !0,
206
+ "k-picker": !0,
207
+ [this.$props.className]: this.$props.className,
208
+ [`k-picker-${Oe[r] || r}`]: r,
209
+ [`k-rounded-${Me[l] || l}`]: l,
210
+ [`k-picker-${p}`]: p,
211
+ "k-focus": this.focused,
212
+ "k-invalid": !d,
213
+ "k-loading": this.$props.loading,
214
+ "k-required": s,
215
+ "k-disabled": this.$props.disabled
216
+ };
217
+ },
218
+ animationStyles() {
219
+ return this.windowWidth <= G ? {
220
+ top: 0,
221
+ width: "100%",
222
+ height: "100%"
223
+ } : void 0;
224
+ },
225
+ classNameAdaptive() {
226
+ return this.windowWidth <= G ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom";
227
+ },
228
+ adaptiveState() {
229
+ return this.windowWidth <= Ie && this.$props.adaptive;
230
+ },
231
+ isOpen() {
232
+ return this.opened !== void 0 ? this.opened : this.currentOpened;
233
+ },
234
+ computedValue() {
235
+ return this.value !== void 0 ? this.value : this.$props.modelValue !== void 0 ? this.$props.modelValue : this.currentValue;
236
+ },
237
+ hasValue() {
238
+ return Se(this.computedValue);
239
+ },
240
+ currentValueText() {
241
+ return this.hasValue ? $e(this.computedValue, this.$props.textField) : "";
242
+ }
243
+ },
244
+ watch: {
245
+ // This watch gets the state of the data when the adaptive mode is activated
246
+ isOpen: function(e) {
247
+ e && this.value ? this.initialAdaptiveRenderingValues = [...this.value] : this.initialAdaptiveRenderingValues = void 0;
248
+ }
249
+ },
250
+ mounted() {
251
+ this.observer = ge && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.elementRef = c(this, "kendoAnchor"), this.inputRef = c(this, "input"), this.selectRef = c(this, "select"), this.treeViewRef = c(this, "treeView"), this.skipFocusRef = !1, this.popupRef = c(this, "popup"), this.calculatePopupWidth();
252
+ },
253
+ updated() {
254
+ this.inputRef = c(this, "input"), this.treeViewRef = c(this, "treeView"), this.popupRef && this.isOpen && this.hasValue && this.popupRef.reposition(), this.setValidity(), this.calculatePopupWidth();
255
+ },
256
+ render() {
257
+ let e;
258
+ const t = this.$props.id || this.componentGuid, {
259
+ dataItems: s,
260
+ dataItemKey: n,
261
+ popupSettings: o,
262
+ disabled: d,
263
+ placeholder: r,
264
+ label: l,
265
+ name: p,
266
+ selectField: x,
267
+ subItemsField: R,
268
+ validationMessage: J,
269
+ valid: Q,
270
+ required: I,
271
+ validityStyles: X,
272
+ adaptiveTitle: Y
273
+ } = this.$props, k = ve(this.$props.tabIndex, d), D = we(this), Z = V({
274
+ validationMessage: J,
275
+ valid: Q,
276
+ required: I
277
+ }, this.hasValue), C = this.adaptiveState, g = this.$props.dir, O = h.call(this, this.item, f.call(this)), ee = h.call(this, this.valueRender, f.call(this)), te = h.call(this, this.$props.header, f.call(this)), ie = h.call(this, this.$props.footer, f.call(this)), S = w.call(this, {
278
+ h: u,
279
+ template: te
280
+ }), $ = w.call(this, {
281
+ h: u,
282
+ template: ie
283
+ }), se = h.call(this, this.$props.listNoData, f.call(this)), ne = i(Ve, null, H(e = D.toLanguageString(L, N[L])) ? e : {
284
+ default: () => [e]
285
+ }), M = w.call(this, {
286
+ h: u,
287
+ defaultRendering: ne,
288
+ template: se
289
+ }), oe = i("span", {
290
+ class: "k-input-value-text"
291
+ }, [this.currentValueText || r]), ae = w.call(this, {
292
+ h: u,
293
+ defaultRendering: oe,
294
+ template: ee,
295
+ additionalProps: {
296
+ value: this.computedValue
297
+ }
298
+ }), le = () => [i("div", {
299
+ class: "k-actionsheet-titlebar-group k-hbox"
300
+ }, [i("div", {
301
+ class: "k-actionsheet-title"
302
+ }, [i("div", {
303
+ class: "k-text-center"
304
+ }, [Y]), i("div", {
305
+ class: "k-actionsheet-subtitle k-text-center"
306
+ }, [r])]), i("div", {
307
+ class: "k-actionsheet-actions"
308
+ }, [i(q, {
309
+ tabIndex: 1,
310
+ "aria-label": "Cancel",
311
+ "aria-disabled": "false",
312
+ type: "button",
313
+ fillMode: "flat",
314
+ onClick: this.onWrapperClick,
315
+ icon: "x",
316
+ svgIcon: _
317
+ }, null)])]), i("div", {
318
+ class: "k-actionsheet-titlebar-group k-actionsheet-filter"
319
+ }, [this.$props.filterable && i(j, {
320
+ tabIndex: 0,
321
+ value: this.$props.filter === void 0 ? this.filterState : this.$props.filter,
322
+ ref: m(this, "input"),
323
+ onChange: this.onFilterChange,
324
+ onKeydown: this.onInputKeyDown,
325
+ size: v,
326
+ rounded: E,
327
+ fillMode: F,
328
+ onFocus: this.onFocus,
329
+ onBlur: this.onBlur
330
+ }, null)])], re = h.call(this, le, f.call(this)), de = () => {
331
+ const y = this.base.getTemplateDef.call(this, S, u), T = this.base.getTemplateDef.call(this, $, u);
332
+ return [y && i("div", {
333
+ class: "k-list-header"
334
+ }, [y]), s.length > 0 ? i(K, {
335
+ ref: m(this, "treeView"),
336
+ tabIndex: k,
337
+ dataItems: s,
338
+ focusIdField: n,
339
+ textField: this.$props.textField,
340
+ selectField: x,
341
+ expandField: this.$props.expandField,
342
+ childrenField: R,
343
+ expandIcons: !0,
344
+ onItemclick: this.onChange,
345
+ onExpandchange: this.onExpand,
346
+ onFocus: this.onFocus,
347
+ onBlur: this.onBlur,
348
+ onKeydown: this.onWrapperKeyDown,
349
+ size: "large",
350
+ item: O
351
+ }, null) : M, T && i("div", {
352
+ class: "k-list-footer"
353
+ }, [T])];
354
+ }, pe = h.call(this, de, f.call(this)), ue = function() {
355
+ return i(De, {
356
+ expand: this.isOpen,
357
+ animation: !0,
358
+ animationStyles: this.animationStyles,
359
+ className: this.classNameAdaptive,
360
+ header: re,
361
+ content: pe,
362
+ contentClassName: "!k-overflow-hidden",
363
+ onClose: this.onWrapperClick,
364
+ navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
365
+ }, null);
366
+ }, ce = !X || Z.valid, {
367
+ size: v,
368
+ rounded: E,
369
+ fillMode: F
370
+ } = this.$props, b = [u(function() {
371
+ return i("span", {
372
+ class: this.wrapperClass,
373
+ tabindex: k,
374
+ accesskey: this.$props.accessKey,
375
+ id: t,
376
+ dir: g,
377
+ ref: m(this, "kendoAnchor"),
378
+ onKeydown: this.onWrapperKeyDown,
379
+ onClick: this.onWrapperClick,
380
+ onMousedown: this.onWrapperMouseDown,
381
+ onFocusin: this.onFocus,
382
+ onFocusout: this.onBlur,
383
+ role: "combobox",
384
+ "aria-haspopup": "tree",
385
+ "aria-expanded": this.isOpen,
386
+ "aria-disabled": d,
387
+ "aria-label": l || this.$props.ariaLabel,
388
+ "aria-labelledby": this.$props.ariaLabelledBy,
389
+ "aria-describedby": this.$props.ariaDescribedBy,
390
+ "aria-required": I
391
+ }, [
392
+ i("span", {
393
+ class: "k-input-inner"
394
+ }, [ae]),
395
+ this.$props.loading && i(W, {
396
+ class: "k-input-loading-icon",
397
+ name: "loading"
398
+ }, null),
399
+ this.hasValue && !d && i("span", {
400
+ onClick: this.onClear,
401
+ class: "k-clear-value",
402
+ title: D.toLanguageString(z, N[z]),
403
+ role: "button",
404
+ tabindex: -1,
405
+ onMousedown: (y) => y.preventDefault()
406
+ }, [i(W, {
407
+ name: "x",
408
+ icon: _
409
+ }, null)]),
410
+ i(q, {
411
+ tabIndex: -1,
412
+ type: "button",
413
+ "aria-label": "select",
414
+ class: "k-input-button",
415
+ size: v,
416
+ fillMode: F,
417
+ themeColor: "base",
418
+ rounded: null,
419
+ icon: "caret-alt-down",
420
+ svgIcon: Re
421
+ }, null),
422
+ /* Dummy component to support forms */
423
+ i("select", {
424
+ name: p,
425
+ ref: m(this, "select"),
426
+ tabindex: -1,
427
+ "aria-hidden": !0,
428
+ title: l,
429
+ style: {
430
+ opacity: 0,
431
+ width: 1,
432
+ border: 0,
433
+ zIndex: -1,
434
+ position: "absolute",
435
+ left: "50%"
436
+ }
437
+ }, [i("option", {
438
+ value: this.$props.valueMap ? this.$props.valueMap.call(void 0, this.computedValue) : this.computedValue
439
+ }, null)]),
440
+ !C && i(ye, {
441
+ style: {
442
+ width: this.popupWidth,
443
+ direction: g
444
+ },
445
+ ref: m(this, "popup"),
446
+ class: A(o.className, {
447
+ "k-rtl": g === "rtl"
448
+ }),
449
+ popupClass: A(o.popupClass, "k-dropdowntree-popup", "popup-" + this.componentGuid),
450
+ animate: o.animate,
451
+ anchor: this.anchor,
452
+ show: this.isOpen,
453
+ onOpen: this.onPopupOpened,
454
+ onClose: this.onPopupClosed,
455
+ appendTo: o.appendTo
456
+ }, {
457
+ default: () => [this.$props.filterable && i(j, {
458
+ value: this.$props.filter === void 0 ? this.filterState : this.$props.filter,
459
+ ref: m(this, "input"),
460
+ onChange: this.onFilterChange,
461
+ onKeydown: this.onInputKeyDown,
462
+ onBlur: this.onBlur,
463
+ size: v,
464
+ rounded: E,
465
+ fillMode: F
466
+ }, null), S && i("div", {
467
+ class: "k-list-header"
468
+ }, [S]), s.length > 0 ? i(K, {
469
+ ref: m(this, "treeView"),
470
+ tabIndex: k,
471
+ dataItems: s,
472
+ focusIdField: n,
473
+ textField: this.$props.textField,
474
+ selectField: x,
475
+ expandField: this.$props.expandField,
476
+ childrenField: R,
477
+ expandIcons: !0,
478
+ onItemclick: this.onChange,
479
+ onExpandchange: this.onExpand,
480
+ onFocus: this.onFocus,
481
+ onBlur: this.onBlur,
482
+ onKeydown: this.onWrapperKeyDown,
483
+ size: v,
484
+ item: O
485
+ }, null) : M, $ && i("div", {
486
+ class: "k-list-footer"
487
+ }, [$])]
488
+ })
489
+ ]);
490
+ }.call(this), {
491
+ ...this.$attrs
492
+ }), C && ue.call(this)];
493
+ return l ? i(xe, {
494
+ label: l,
495
+ editorValue: this.currentValueText,
496
+ editorPlaceholder: r,
497
+ editorValid: ce,
498
+ editorDisabled: d,
499
+ editorId: t,
500
+ focused: this.focused,
501
+ dir: g
502
+ }, H(b) ? b : {
503
+ default: () => [b]
504
+ }) : b;
505
+ },
506
+ methods: {
507
+ calculateMedia(e) {
508
+ for (let t of e)
509
+ this.windowWidth = t.target.clientWidth;
510
+ },
511
+ calculatePopupWidth() {
512
+ this.elementRef && (this.popupWidth = this.popupSettings.width !== void 0 ? this.popupSettings.width : this.elementRef.offsetWidth + "px");
513
+ },
514
+ focus() {
515
+ this.$el && this.$el.focus();
516
+ },
517
+ setValidity() {
518
+ if (this.selectRef && this.selectRef.setCustomValidity) {
519
+ const {
520
+ validationMessage: e,
521
+ valid: t,
522
+ required: s
523
+ } = this.$props, n = V({
524
+ validationMessage: e,
525
+ valid: t,
526
+ required: s
527
+ }, this.hasValue);
528
+ this.selectRef.setCustomValidity(n.valid ? "" : this.validationMessage === void 0 ? Ee : this.validationMessage);
529
+ }
530
+ },
531
+ openPopup(e) {
532
+ if (!this.isOpen) {
533
+ const t = {
534
+ ...e
535
+ };
536
+ this.$emit("open", t), this.currentOpened = !0;
537
+ }
538
+ },
539
+ closePopup(e) {
540
+ if (this.isOpen) {
541
+ const t = {
542
+ ...e
543
+ };
544
+ this.$emit("close", t), this.currentOpened = !1;
545
+ }
546
+ },
547
+ onWrapperClick(e) {
548
+ if (this.onFilterChange({
549
+ ...e,
550
+ target: {
551
+ value: ""
552
+ }
553
+ }), !e.defaultPrevented && this.$el) {
554
+ this.focused = !0;
555
+ const t = {
556
+ event: e,
557
+ target: this
558
+ };
559
+ (this.isOpen ? this.closePopup : this.openPopup)(t);
560
+ }
561
+ },
562
+ switchFocus(e) {
563
+ this.skipFocusRef = !0, e(), window.setTimeout(() => this.skipFocusRef = !1, 0);
564
+ },
565
+ onWrapperKeyDown(e) {
566
+ const {
567
+ keyCode: t,
568
+ altKey: s
569
+ } = e, n = this.treeViewRef && this.treeViewRef.$el, o = this.inputRef && this.inputRef.input;
570
+ if (this.$props.disabled || e.defaultPrevented && o === e.target)
571
+ return;
572
+ const d = {
573
+ event: e,
574
+ target: this
575
+ };
576
+ if (this.isOpen)
577
+ if (t === a.esc || s && t === a.up)
578
+ e.preventDefault(), this.closePopup(d);
579
+ else if (n && n.querySelector(".k-focus") && (t === a.up || t === a.down || t === a.left || t === a.right || t === a.home || t === a.end)) {
580
+ if (t === a.up && o) {
581
+ const r = Array.from(n.querySelectorAll(".k-treeview-item")), l = [...r].reverse().find((p) => !!(p && p.querySelector(".k-focus")));
582
+ if (l && r.indexOf(l) === 0)
583
+ return this.switchFocus(() => {
584
+ this.focusElement(o);
585
+ });
586
+ }
587
+ this.switchFocus(P);
588
+ } else
589
+ t === a.down && this.switchFocus(() => {
590
+ this.focusElement(o || n);
591
+ });
592
+ else
593
+ s && t === a.down && (e.preventDefault(), this.openPopup(d));
594
+ },
595
+ onInputKeyDown(e) {
596
+ const {
597
+ keyCode: t,
598
+ altKey: s
599
+ } = e;
600
+ if (t === a.esc)
601
+ this.onWrapperClick(e);
602
+ else if (s || t !== a.up && t !== a.down)
603
+ return;
604
+ e.preventDefault(), this.switchFocus(t === a.up ? () => {
605
+ this.focusElement(this.elementRef);
606
+ } : () => {
607
+ this.focusElement(this.treeViewRef && this.treeViewRef.$el);
608
+ });
609
+ },
610
+ focusElement(e) {
611
+ e && this.switchFocus(() => e.focus());
612
+ },
613
+ onPopupOpened() {
614
+ if (!this.focused && this.isOpen && !this.currentOpened)
615
+ this.closePopup({
616
+ target: this
617
+ });
618
+ else if (this.$props.filterable) {
619
+ const e = this.inputRef && this.inputRef.input;
620
+ this.focusElement(e);
621
+ } else
622
+ this.focusElement(this.treeViewRef && this.treeViewRef.$el);
623
+ },
624
+ onPopupClosed() {
625
+ this.focused && this.focusElement(this.elementRef);
626
+ },
627
+ onFocus(e) {
628
+ if (!this.focused && !this.skipFocusRef) {
629
+ this.focused = !0;
630
+ const t = {
631
+ event: e,
632
+ target: this
633
+ };
634
+ this.$emit("focus", t);
635
+ }
636
+ },
637
+ onBlur(e) {
638
+ if (this.focused && !this.skipFocusRef) {
639
+ this.focused = !1;
640
+ const t = {
641
+ event: e,
642
+ target: this
643
+ }, s = {
644
+ ...t
645
+ };
646
+ (!e.relatedTarget || !e.relatedTarget.closest(".popup-" + this.componentGuid)) && !this.adaptiveState && (this.$emit("blur", s), this.closePopup(t));
647
+ }
648
+ },
649
+ onWrapperMouseDown() {
650
+ this.focused && this.switchFocus(P);
651
+ },
652
+ changeValue(e, t, s) {
653
+ const n = {
654
+ value: t,
655
+ level: s ? U(s) : [],
656
+ ...e
657
+ };
658
+ this.$emit("changemodel", t), this.$emit("update:modelValue", t), this.$emit("change", n), this.currentValue = t;
659
+ },
660
+ onChange(e) {
661
+ if (Fe(e.item, this.computedValue, this.dataItemKey) || !this.$el)
662
+ return;
663
+ const {
664
+ item: t,
665
+ itemHierarchicalIndex: s,
666
+ event: n
667
+ } = e, o = {
668
+ event: n,
669
+ target: this
670
+ };
671
+ this.changeValue(o, t, s), this.closePopup(o);
672
+ },
673
+ onClear(e) {
674
+ const t = {
675
+ event: e,
676
+ target: this
677
+ };
678
+ this.changeValue(t, null), this.closePopup(t), e.preventDefault();
679
+ },
680
+ onExpand(e) {
681
+ const {
682
+ item: t,
683
+ itemHierarchicalIndex: s,
684
+ event: n
685
+ } = e, o = {
686
+ level: U(s),
687
+ item: t,
688
+ event: n,
689
+ target: this
690
+ };
691
+ this.$emit("expandchange", o);
692
+ },
693
+ onFilterChange(e) {
694
+ const s = {
695
+ filter: {
696
+ field: this.$props.textField,
697
+ operator: "contains",
698
+ value: e.target.value
699
+ },
700
+ event: e,
701
+ target: this
702
+ };
703
+ this.$emit("filterchange", s), this.$props.filter === void 0 && (this.filterState = e.target.value);
704
+ }
705
+ }
706
+ });
707
+ export {
708
+ Xe as DropDownTree
709
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("@progress/kendo-vue-common"),n=e.defineComponent({name:"KendoListNoData",render(){const t=o.getDefaultSlots(this);return e.createVNode("div",{class:"k-nodata"},[e.createVNode("div",null,[t])])}});exports.ListNoData=n;