@progress/kendo-vue-dropdowns 5.3.0-dev.202410141143 → 5.3.0-develop.2

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