@nextcloud/vue 8.0.0-beta.8 → 8.0.0-beta.9

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 (223) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/Components/NcActionButton.cjs +8 -8
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +10 -10
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionInput.cjs +23 -18
  7. package/dist/Components/NcActionInput.cjs.map +1 -1
  8. package/dist/Components/NcActionInput.mjs +20 -14
  9. package/dist/Components/NcActionInput.mjs.map +1 -1
  10. package/dist/Components/NcActionLink.cjs +7 -7
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +4 -4
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRouter.cjs +8 -8
  15. package/dist/Components/NcActionRouter.cjs.map +1 -1
  16. package/dist/Components/NcActionRouter.mjs +4 -4
  17. package/dist/Components/NcActionRouter.mjs.map +1 -1
  18. package/dist/Components/NcActionText.cjs +10 -10
  19. package/dist/Components/NcActionText.cjs.map +1 -1
  20. package/dist/Components/NcActionText.mjs +11 -11
  21. package/dist/Components/NcActionText.mjs.map +1 -1
  22. package/dist/Components/NcActionTextEditable.cjs +1 -1
  23. package/dist/Components/NcActionTextEditable.mjs +1 -1
  24. package/dist/Components/NcActions.cjs +67 -63
  25. package/dist/Components/NcActions.cjs.map +1 -1
  26. package/dist/Components/NcActions.mjs +75 -71
  27. package/dist/Components/NcActions.mjs.map +1 -1
  28. package/dist/Components/NcAppContent.cjs +1 -1
  29. package/dist/Components/NcAppContent.mjs +1 -1
  30. package/dist/Components/NcAppNavigation.cjs +1 -1
  31. package/dist/Components/NcAppNavigation.mjs +1 -1
  32. package/dist/Components/NcAppNavigationItem.cjs +12 -12
  33. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  34. package/dist/Components/NcAppNavigationItem.mjs +15 -15
  35. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  36. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  37. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  38. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  39. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  40. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  41. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  42. package/dist/Components/NcAppSettingsDialog.cjs +57 -108
  43. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  44. package/dist/Components/NcAppSettingsDialog.mjs +59 -110
  45. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  46. package/dist/Components/NcAppSidebar.cjs +5 -5
  47. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  48. package/dist/Components/NcAppSidebar.mjs +5 -5
  49. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  50. package/dist/Components/NcAppSidebarTab.cjs +3 -3
  51. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  52. package/dist/Components/NcAppSidebarTab.mjs +5 -5
  53. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  54. package/dist/Components/NcAvatar.cjs +1 -1
  55. package/dist/Components/NcAvatar.mjs +1 -1
  56. package/dist/Components/NcBreadcrumbs.cjs +2 -2
  57. package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
  58. package/dist/Components/NcBreadcrumbs.mjs +2 -2
  59. package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
  60. package/dist/Components/NcCheckboxRadioSwitch.cjs +157 -42
  61. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  62. package/dist/Components/NcCheckboxRadioSwitch.mjs +168 -53
  63. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  64. package/dist/Components/NcColorPicker.cjs +1 -1
  65. package/dist/Components/NcColorPicker.mjs +1 -1
  66. package/dist/Components/NcDashboardWidget.cjs +1 -1
  67. package/dist/Components/NcDashboardWidget.mjs +2 -2
  68. package/dist/Components/NcDashboardWidgetItem.cjs +11 -11
  69. package/dist/Components/NcDashboardWidgetItem.cjs.map +1 -1
  70. package/dist/Components/NcDashboardWidgetItem.mjs +9 -9
  71. package/dist/Components/NcDashboardWidgetItem.mjs.map +1 -1
  72. package/dist/Components/NcDateTime.cjs +1 -1
  73. package/dist/Components/NcDateTime.mjs +1 -1
  74. package/dist/Components/NcDateTimePicker.cjs +2 -2
  75. package/dist/Components/NcDateTimePicker.mjs +4 -4
  76. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  77. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  78. package/dist/Components/NcDialog.cjs +171 -0
  79. package/dist/Components/NcDialog.cjs.map +1 -0
  80. package/dist/Components/NcDialog.mjs +177 -0
  81. package/dist/Components/NcDialog.mjs.map +1 -0
  82. package/dist/Components/NcDialogButton.cjs +69 -0
  83. package/dist/Components/NcDialogButton.cjs.map +1 -0
  84. package/dist/Components/NcDialogButton.mjs +74 -0
  85. package/dist/Components/NcDialogButton.mjs.map +1 -0
  86. package/dist/Components/NcEmojiPicker.cjs +1 -1
  87. package/dist/Components/NcEmojiPicker.mjs +1 -1
  88. package/dist/Components/NcIconSvgWrapper.cjs +29 -14
  89. package/dist/Components/NcIconSvgWrapper.cjs.map +1 -1
  90. package/dist/Components/NcIconSvgWrapper.mjs +32 -17
  91. package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
  92. package/dist/Components/NcListItem.cjs +3 -3
  93. package/dist/Components/NcListItem.cjs.map +1 -1
  94. package/dist/Components/NcListItem.mjs +3 -3
  95. package/dist/Components/NcListItem.mjs.map +1 -1
  96. package/dist/Components/NcListItemIcon.cjs +20 -12
  97. package/dist/Components/NcListItemIcon.cjs.map +1 -1
  98. package/dist/Components/NcListItemIcon.mjs +21 -13
  99. package/dist/Components/NcListItemIcon.mjs.map +1 -1
  100. package/dist/Components/NcModal.cjs +24 -26
  101. package/dist/Components/NcModal.cjs.map +1 -1
  102. package/dist/Components/NcModal.mjs +54 -56
  103. package/dist/Components/NcModal.mjs.map +1 -1
  104. package/dist/Components/NcNoteCard.cjs +4 -4
  105. package/dist/Components/NcNoteCard.cjs.map +1 -1
  106. package/dist/Components/NcNoteCard.mjs +3 -3
  107. package/dist/Components/NcNoteCard.mjs.map +1 -1
  108. package/dist/Components/NcPasswordField.cjs +49 -38
  109. package/dist/Components/NcPasswordField.cjs.map +1 -1
  110. package/dist/Components/NcPasswordField.mjs +59 -48
  111. package/dist/Components/NcPasswordField.mjs.map +1 -1
  112. package/dist/Components/NcRelatedResourcesPanel.cjs +29 -13
  113. package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
  114. package/dist/Components/NcRelatedResourcesPanel.mjs +41 -25
  115. package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
  116. package/dist/Components/NcRichContenteditable.cjs +2 -2
  117. package/dist/Components/NcRichContenteditable.mjs +2 -2
  118. package/dist/Components/NcRichText.cjs +1 -1
  119. package/dist/Components/NcRichText.mjs +3 -3
  120. package/dist/Components/NcSelect.cjs +34 -29
  121. package/dist/Components/NcSelect.cjs.map +1 -1
  122. package/dist/Components/NcSelect.mjs +48 -43
  123. package/dist/Components/NcSelect.mjs.map +1 -1
  124. package/dist/Components/NcSelectTags.cjs +1 -1
  125. package/dist/Components/NcSelectTags.mjs +1 -1
  126. package/dist/Components/NcSettingsInputText.cjs +1 -1
  127. package/dist/Components/NcSettingsInputText.mjs +1 -1
  128. package/dist/Components/NcSettingsSection.cjs +1 -1
  129. package/dist/Components/NcSettingsSection.mjs +1 -1
  130. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  131. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  132. package/dist/Components/NcTextArea.cjs +167 -0
  133. package/dist/Components/NcTextArea.cjs.map +1 -0
  134. package/dist/Components/NcTextArea.mjs +172 -0
  135. package/dist/Components/NcTextArea.mjs.map +1 -0
  136. package/dist/Components/NcTextField.cjs +37 -13
  137. package/dist/Components/NcTextField.cjs.map +1 -1
  138. package/dist/Components/NcTextField.mjs +45 -21
  139. package/dist/Components/NcTextField.mjs.map +1 -1
  140. package/dist/Components/NcTimezonePicker.cjs +1 -1
  141. package/dist/Components/NcTimezonePicker.mjs +1 -1
  142. package/dist/Components/NcUserBubble.cjs +4 -4
  143. package/dist/Components/NcUserBubble.cjs.map +1 -1
  144. package/dist/Components/NcUserBubble.mjs +4 -4
  145. package/dist/Components/NcUserBubble.mjs.map +1 -1
  146. package/dist/assets/index-236620b0.css +150 -0
  147. package/dist/assets/{index-03ec5f40.css → index-400b48a6.css} +7 -7
  148. package/dist/assets/{index-33da80f0.css → index-4611417f.css} +8 -9
  149. package/dist/assets/{index-01e5adf4.css → index-4b75fe20.css} +11 -11
  150. package/dist/assets/{index-294382c8.css → index-574438d6.css} +43 -38
  151. package/dist/assets/{index-c7905a53.css → index-57b305d3.css} +3 -3
  152. package/dist/assets/{index-de0326c7.css → index-5ee8a575.css} +69 -78
  153. package/dist/assets/{index-9354264c.css → index-6f721577.css} +16 -16
  154. package/dist/assets/{index-fec4bb7b.css → index-73867d38.css} +17 -16
  155. package/dist/assets/{index-becfbea7.css → index-8304db49.css} +23 -22
  156. package/dist/assets/{index-5eff69c7.css → index-9dcf6260.css} +32 -30
  157. package/dist/assets/{index-23e64bbb.css → index-9e44e336.css} +9 -9
  158. package/dist/assets/{index-0557f12a.css → index-9e9587e1.css} +4 -4
  159. package/dist/assets/index-abb90c97.css +164 -0
  160. package/dist/assets/{index-5072b6ee.css → index-af72a30b.css} +11 -10
  161. package/dist/assets/{index-194e9415.css → index-c06ad941.css} +70 -58
  162. package/dist/assets/{index-fbdeb5ab.css → index-c5ae3bc4.css} +11 -11
  163. package/dist/assets/index-dc612aa3.css +112 -0
  164. package/dist/assets/{index-376d2dec.css → index-e7c55791.css} +67 -67
  165. package/dist/assets/{index-165fce0e.css → index-e7eadba7.css} +13 -13
  166. package/dist/assets/{index-6405cd50.css → index-e828b286.css} +4 -4
  167. package/dist/assets/{index-0ab8e182.css → index-eea65531.css} +23 -22
  168. package/dist/assets/{index-1cf8eeb4.css → index-f85aa003.css} +13 -32
  169. package/dist/assets/{referencePickerModal-0acecb5e.css → referencePickerModal-3a127978.css} +55 -55
  170. package/dist/chunks/{NcAppNavigationToggle-960658a0.cjs → NcAppNavigationToggle-841d3015.cjs} +1 -1
  171. package/dist/chunks/{NcAppNavigationToggle-960658a0.cjs.map → NcAppNavigationToggle-841d3015.cjs.map} +1 -1
  172. package/dist/chunks/{NcAppNavigationToggle-d868f651.mjs → NcAppNavigationToggle-e358aa47.mjs} +1 -1
  173. package/dist/chunks/{NcAppNavigationToggle-d868f651.mjs.map → NcAppNavigationToggle-e358aa47.mjs.map} +1 -1
  174. package/dist/chunks/{NcInputConfirmCancel-f881168d.mjs → NcInputConfirmCancel-44052477.mjs} +16 -9
  175. package/dist/chunks/NcInputConfirmCancel-44052477.mjs.map +1 -0
  176. package/dist/chunks/{NcInputConfirmCancel-0c4bee9a.cjs → NcInputConfirmCancel-6bea0fdc.cjs} +11 -4
  177. package/dist/chunks/NcInputConfirmCancel-6bea0fdc.cjs.map +1 -0
  178. package/dist/chunks/{NcRichText-d385dc10.cjs → NcRichText-332fe454.cjs} +2 -2
  179. package/dist/chunks/{NcRichText-1c3d2654.mjs.map → NcRichText-332fe454.cjs.map} +1 -1
  180. package/dist/chunks/{NcRichText-1c3d2654.mjs → NcRichText-8fda53c8.mjs} +9 -9
  181. package/dist/chunks/{NcRichText-d385dc10.cjs.map → NcRichText-8fda53c8.mjs.map} +1 -1
  182. package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs → NcSettingsSelectGroup-a5ff8c36.cjs} +1 -1
  183. package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs.map → NcSettingsSelectGroup-a5ff8c36.cjs.map} +1 -1
  184. package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs → NcSettingsSelectGroup-fdd3309c.mjs} +2 -2
  185. package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs.map → NcSettingsSelectGroup-fdd3309c.mjs.map} +1 -1
  186. package/dist/chunks/{ScopeComponent-97a014a1.mjs → ScopeComponent-9519afcc.mjs} +1 -1
  187. package/dist/chunks/{ScopeComponent-97a014a1.mjs.map → ScopeComponent-9519afcc.mjs.map} +1 -1
  188. package/dist/chunks/{ScopeComponent-1c75ec38.cjs → ScopeComponent-e060526a.cjs} +1 -1
  189. package/dist/chunks/{ScopeComponent-1c75ec38.cjs.map → ScopeComponent-e060526a.cjs.map} +1 -1
  190. package/dist/chunks/{actionText-b0bd6eb7.cjs → actionText-54bc24a6.cjs} +1 -1
  191. package/dist/chunks/{actionText-9f5c55bd.mjs.map → actionText-54bc24a6.cjs.map} +1 -1
  192. package/dist/chunks/{actionText-9f5c55bd.mjs → actionText-a64be267.mjs} +1 -1
  193. package/dist/chunks/{actionText-b0bd6eb7.cjs.map → actionText-a64be267.mjs.map} +1 -1
  194. package/dist/chunks/{index-2a5b8ace.cjs → index-032137a6.cjs} +63 -29
  195. package/dist/chunks/index-032137a6.cjs.map +1 -0
  196. package/dist/chunks/{index-6c221fa0.mjs → index-fb2ee22c.mjs} +72 -38
  197. package/dist/chunks/index-fb2ee22c.mjs.map +1 -0
  198. package/dist/chunks/l10n-05a09c66.mjs +31 -0
  199. package/dist/chunks/l10n-05a09c66.mjs.map +1 -0
  200. package/dist/chunks/{l10n-c5f5f001.mjs → l10n-9aa6482d.mjs} +1 -1
  201. package/dist/chunks/{l10n-c5f5f001.mjs.map → l10n-9aa6482d.mjs.map} +1 -1
  202. package/dist/chunks/l10n-b1d264c7.cjs +29 -0
  203. package/dist/chunks/l10n-b1d264c7.cjs.map +1 -0
  204. package/dist/chunks/{l10n-4326316a.cjs → l10n-c7bd0ea6.cjs} +1 -1
  205. package/dist/chunks/{l10n-4326316a.cjs.map → l10n-c7bd0ea6.cjs.map} +1 -1
  206. package/dist/chunks/{referencePickerModal-9b4ff88d.cjs → referencePickerModal-279a483d.cjs} +2 -2
  207. package/dist/chunks/{referencePickerModal-9b4ff88d.cjs.map → referencePickerModal-279a483d.cjs.map} +1 -1
  208. package/dist/chunks/{referencePickerModal-0fde503d.mjs → referencePickerModal-443a4c57.mjs} +2 -2
  209. package/dist/chunks/{referencePickerModal-0fde503d.mjs.map → referencePickerModal-443a4c57.mjs.map} +1 -1
  210. package/dist/index.cjs +105 -99
  211. package/dist/index.cjs.map +1 -1
  212. package/dist/index.mjs +138 -129
  213. package/dist/index.mjs.map +1 -1
  214. package/package.json +6 -3
  215. package/dist/assets/index-7768d5e5.css +0 -148
  216. package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs.map +0 -1
  217. package/dist/chunks/NcInputConfirmCancel-f881168d.mjs.map +0 -1
  218. package/dist/chunks/index-2a5b8ace.cjs.map +0 -1
  219. package/dist/chunks/index-6c221fa0.mjs.map +0 -1
  220. package/dist/chunks/l10n-27a75c40.mjs +0 -31
  221. package/dist/chunks/l10n-27a75c40.mjs.map +0 -1
  222. package/dist/chunks/l10n-903083c4.cjs +0 -29
  223. package/dist/chunks/l10n-903083c4.cjs.map +0 -1
@@ -1,13 +1,13 @@
1
- import "../assets/index-6405cd50.css";
2
- import a from "@nextcloud/axios";
3
- import { generateOcsUrl as o } from "@nextcloud/router";
4
- import l from "./NcButton.mjs";
5
- import { t as s } from "../chunks/l10n-27a75c40.mjs";
6
- import { n as i } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
7
- const c = {
1
+ import "../assets/index-e828b286.css";
2
+ import o from "@nextcloud/axios";
3
+ import { generateOcsUrl as l } from "@nextcloud/router";
4
+ import a from "./NcButton.mjs";
5
+ import { t as s } from "../chunks/l10n-05a09c66.mjs";
6
+ import { n } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
7
+ const u = {
8
8
  name: "NcResource",
9
9
  components: {
10
- NcButton: l
10
+ NcButton: a
11
11
  },
12
12
  props: {
13
13
  icon: {
@@ -32,14 +32,14 @@ const c = {
32
32
  t: s
33
33
  }
34
34
  };
35
- var u = function() {
35
+ var c = function() {
36
36
  var e = this, t = e._self._c;
37
37
  return t("li", { staticClass: "resource" }, [t("NcButton", { staticClass: "resource__button", attrs: { "aria-label": e.labelTranslated, type: "tertiary", href: e.url }, scopedSlots: e._u([{ key: "icon", fn: function() {
38
38
  return [t("div", { staticClass: "resource__icon" }, [t("img", { attrs: { src: e.icon } })])];
39
39
  }, proxy: !0 }]) }, [e._v(" " + e._s(e.name) + " ")])], 1);
40
- }, d = [], _ = /* @__PURE__ */ i(
41
- c,
40
+ }, d = [], f = /* @__PURE__ */ n(
42
41
  u,
42
+ c,
43
43
  d,
44
44
  !1,
45
45
  null,
@@ -47,11 +47,11 @@ var u = function() {
47
47
  null,
48
48
  null
49
49
  );
50
- const f = _.exports;
51
- const h = {
50
+ const _ = f.exports;
51
+ const p = {
52
52
  name: "NcRelatedResourcesPanel",
53
53
  components: {
54
- NcResource: f
54
+ NcResource: _
55
55
  },
56
56
  props: {
57
57
  /**
@@ -68,6 +68,20 @@ const h = {
68
68
  type: [String, Number],
69
69
  default: null
70
70
  },
71
+ /**
72
+ * Limits to specific resource type. i.e. any provider id implemented with `\OCA\RelatedResources\IRelatedResourceProvider::getProviderId()`
73
+ */
74
+ resourceType: {
75
+ type: String,
76
+ default: null
77
+ },
78
+ /**
79
+ * Set the maximum number of resources to load
80
+ */
81
+ limit: {
82
+ type: Number,
83
+ default: null
84
+ },
71
85
  /**
72
86
  * Only used by the files sidebar
73
87
  *
@@ -109,9 +123,11 @@ const h = {
109
123
  },
110
124
  url() {
111
125
  let r = null, e = null;
112
- return this.isFiles ? (r = "files", e = this.fileInfo.id) : (r = this.providerId, e = this.itemId), o("/apps/related_resources/related/{providerId}?itemId={itemId}&format=json", {
126
+ return this.isFiles ? (r = "files", e = this.fileInfo.id) : (r = this.providerId, e = this.itemId), l("/apps/related_resources/related/{providerId}?itemId={itemId}&resourceType={resourceType}&limit={limit}&format=json", {
113
127
  providerId: r,
114
- itemId: e
128
+ itemId: e,
129
+ resourceType: this.resourceType,
130
+ limit: this.limit
115
131
  });
116
132
  }
117
133
  },
@@ -142,7 +158,7 @@ const h = {
142
158
  if (!(!this.appEnabled || !this.hasResourceInfo)) {
143
159
  this.loading = !0, this.error = null, this.resources = [];
144
160
  try {
145
- const e = await a.get(this.url);
161
+ const e = await o.get(this.url);
146
162
  this.resources = (r = e.data.ocs) == null ? void 0 : r.data;
147
163
  } catch (e) {
148
164
  this.error = e, console.error(e);
@@ -153,22 +169,22 @@ const h = {
153
169
  }
154
170
  }
155
171
  };
156
- var p = function() {
172
+ var h = function() {
157
173
  var e = this, t = e._self._c;
158
- return e.appEnabled && e.isVisible ? t("div", { staticClass: "related-resources" }, [t("div", { staticClass: "related-resources__header" }, [t("h5", [e._v(e._s(e.headerTranslated))]), t("p", [e._v(e._s(e.description))])]), e._l(e.resources, function(n) {
159
- return t("NcResource", { key: n.itemId, staticClass: "related-resources__entry", attrs: { icon: n.icon, name: n.title, url: n.url } });
174
+ return e.appEnabled && e.isVisible ? t("div", { staticClass: "related-resources" }, [t("div", { staticClass: "related-resources__header" }, [t("h5", [e._v(e._s(e.headerTranslated))]), t("p", [e._v(e._s(e.description))])]), e._l(e.resources, function(i) {
175
+ return t("NcResource", { key: i.itemId, staticClass: "related-resources__entry", attrs: { icon: i.icon, name: i.title, url: i.url } });
160
176
  })], 2) : e._e();
161
- }, m = [], v = /* @__PURE__ */ i(
162
- h,
177
+ }, m = [], y = /* @__PURE__ */ n(
163
178
  p,
179
+ h,
164
180
  m,
165
181
  !1,
166
182
  null,
167
- "235fc8aa",
183
+ "01cfeb01",
168
184
  null,
169
185
  null
170
186
  );
171
- const C = v.exports;
187
+ const T = y.exports;
172
188
  export {
173
- C as default
189
+ T as default
174
190
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcRelatedResourcesPanel.mjs","sources":["../../src/components/NcRelatedResourcesPanel/NcResource.vue","../../src/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue"],"sourcesContent":["<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<template>\n\t<li class=\"resource\">\n\t\t<NcButton class=\"resource__button\"\n\t\t\t:aria-label=\"labelTranslated\"\n\t\t\ttype=\"tertiary\"\n\t\t\t:href=\"url\">\n\t\t\t<template #icon>\n\t\t\t\t<div class=\"resource__icon\">\n\t\t\t\t\t<img :src=\"icon\">\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t{{ name }}\n\t\t</NcButton>\n\t</li>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcResource',\n\n\tcomponents: {\n\t\tNcButton,\n\t},\n\n\tprops: {\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\turl: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tlabelTranslated: t('Open link to \"{resourceName}\"', { resourceName: this.name }),\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.resource {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\n\t// Override default NcButton styles\n\t&__button {\n\t\twidth: 100% !important;\n\t\tjustify-content: flex-start !important;\n\t\tpadding: 0 !important;\n\n\t\t&:deep {\n\t\t\t.button-vue__wrapper {\n\t\t\t\tjustify-content: flex-start !important;\n\n\t\t\t\t.button-vue__text {\n\t\t\t\t\tfont-weight: normal !important;\n\t\t\t\t\tmargin-left: 2px !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\timg {\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\t}\n}\n</style>\n","<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Usage\n\nUse this component to display the related resources of a given item.\n\n```\n<template>\n\t<NcRelatedResourcesPanel provider-id=\"talk\"\n\t\t:item-id=\"conversationId\" />\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tconversationId: 1,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div v-if=\"appEnabled && isVisible\" class=\"related-resources\">\n\t\t<div class=\"related-resources__header\">\n\t\t\t<h5>{{ headerTranslated }}</h5>\n\t\t\t<p>{{ description }}</p>\n\t\t</div>\n\n\t\t<NcResource v-for=\"resource in resources\"\n\t\t\t:key=\"resource.itemId\"\n\t\t\tclass=\"related-resources__entry\"\n\t\t\t:icon=\"resource.icon\"\n\t\t\t:name=\"resource.title\"\n\t\t\t:url=\"resource.url\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nimport NcResource from './NcResource.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcRelatedResourcesPanel',\n\n\tcomponents: {\n\t\tNcResource,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The provider id implemented with `\\OCA\\RelatedResources\\IRelatedResourceProvider::getProviderId()`\n\t\t */\n\t\tproviderId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * The item id which uniquely identities the e.g. Calendar event, Deck board, file, Talk room, etc.\n\t\t */\n\t\titemId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Only used by the files sidebar\n\t\t *\n\t\t * File info is passed when registered with `OCA.Sharing.ShareTabSections.registerSection()`\n\t\t */\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'has-error',\n\t\t'has-resources',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tappEnabled: OC?.appswebroots?.related_resources !== undefined,\n\t\t\theaderTranslated: t('Related resources'),\n\t\t\tloading: false,\n\t\t\terror: null,\n\t\t\tresources: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisVisible() {\n\t\t\tif (this.loading) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn this.error ?? this.resources.length > 0\n\t\t},\n\n\t\tdescription() {\n\t\t\tif (this.error) {\n\t\t\t\treturn t('Error getting related resources. Please contact your system administrator if you have any questions.')\n\t\t\t}\n\t\t\treturn t('Anything shared with the same group of people will show up here')\n\t\t},\n\n\t\thasResourceInfo() {\n\t\t\tif (this.providerId !== null && this.itemId !== null) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.fileInfo !== null) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tisFiles() {\n\t\t\treturn this.fileInfo?.id !== undefined\n\t\t},\n\n\t\turl() {\n\t\t\tlet providerId = null\n\t\t\tlet itemId = null\n\n\t\t\tif (this.isFiles) {\n\t\t\t\tproviderId = 'files'\n\t\t\t\titemId = this.fileInfo.id\n\t\t\t} else {\n\t\t\t\tproviderId = this.providerId\n\t\t\t\titemId = this.itemId\n\t\t\t}\n\n\t\t\treturn generateOcsUrl('/apps/related_resources/related/{providerId}?itemId={itemId}&format=json', {\n\t\t\t\tproviderId,\n\t\t\t\titemId,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\tproviderId() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\titemId() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\tfileInfo() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\terror(error) {\n\t\t\t/**\n\t\t\t * Emitted when the error value changes\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('has-error', Boolean(error))\n\t\t},\n\t\tresources(resources) {\n\t\t\t/**\n\t\t\t * Emitted when the resources value changes\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('has-resources', resources.length > 0)\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.fetchRelatedResources()\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tasync fetchRelatedResources() {\n\t\t\tif (!this.appEnabled || !this.hasResourceInfo) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\tthis.error = null\n\t\t\tthis.resources = []\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(this.url)\n\t\t\t\tthis.resources = response.data.ocs?.data\n\t\t\t} catch (e) {\n\t\t\t\tthis.error = e\n\t\t\t\tconsole.error(e)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.related-resources {\n\t&__header {\n\t\tmargin: 0 0 10px 46px;\n\n\t\th5 {\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main$1","NcButton","t","_sfc_main","NcResource","_a","providerId","itemId","generateOcsUrl","error","resources","response","axios"],"mappings":";;;;;;AA2CA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,iBAAAC,EAAA,iCAAA,EAAA,cAAA,KAAA,KAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,GAAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACLA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAA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;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,sBAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,GAAAR;AAAA,IACA,MAAA,wBAAA;;AACA,UAAA,GAAA,KAAA,cAAA,CAAA,KAAA,kBAIA;AAAA,aAAA,UAAA,IACA,KAAA,QAAA,MACA,KAAA,YAAA,CAAA;AACA,YAAA;AACA,gBAAAS,IAAA,MAAAC,EAAA,IAAA,KAAA,GAAA;AACA,eAAA,aAAAP,IAAAM,EAAA,KAAA,QAAA,gBAAAN,EAAA;AAAA,QACA,SAAA,GAAA;AACA,eAAA,QAAA,GACA,QAAA,MAAA,CAAA;AAAA,QACA,UAAA;AACA,eAAA,UAAA;AAAA,QACA;AAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcRelatedResourcesPanel.mjs","sources":["../../src/components/NcRelatedResourcesPanel/NcResource.vue","../../src/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue"],"sourcesContent":["<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<template>\n\t<li class=\"resource\">\n\t\t<NcButton class=\"resource__button\"\n\t\t\t:aria-label=\"labelTranslated\"\n\t\t\ttype=\"tertiary\"\n\t\t\t:href=\"url\">\n\t\t\t<template #icon>\n\t\t\t\t<div class=\"resource__icon\">\n\t\t\t\t\t<img :src=\"icon\">\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t{{ name }}\n\t\t</NcButton>\n\t</li>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcResource',\n\n\tcomponents: {\n\t\tNcButton,\n\t},\n\n\tprops: {\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\turl: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tlabelTranslated: t('Open link to \"{resourceName}\"', { resourceName: this.name }),\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.resource {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\n\t// Override default NcButton styles\n\t&__button {\n\t\twidth: 100% !important;\n\t\tjustify-content: flex-start !important;\n\t\tpadding: 0 !important;\n\n\t\t&:deep {\n\t\t\t.button-vue__wrapper {\n\t\t\t\tjustify-content: flex-start !important;\n\n\t\t\t\t.button-vue__text {\n\t\t\t\t\tfont-weight: normal !important;\n\t\t\t\t\tmargin-left: 2px !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\timg {\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\t}\n}\n</style>\n","<!--\n - @copyright 2022 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Usage\n\nUse this component to display the related resources of a given item.\n\n```\n<template>\n\t<NcRelatedResourcesPanel provider-id=\"talk\"\n\t\t:item-id=\"conversationId\" />\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tconversationId: 1,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div v-if=\"appEnabled && isVisible\" class=\"related-resources\">\n\t\t<div class=\"related-resources__header\">\n\t\t\t<h5>{{ headerTranslated }}</h5>\n\t\t\t<p>{{ description }}</p>\n\t\t</div>\n\n\t\t<NcResource v-for=\"resource in resources\"\n\t\t\t:key=\"resource.itemId\"\n\t\t\tclass=\"related-resources__entry\"\n\t\t\t:icon=\"resource.icon\"\n\t\t\t:name=\"resource.title\"\n\t\t\t:url=\"resource.url\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nimport NcResource from './NcResource.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcRelatedResourcesPanel',\n\n\tcomponents: {\n\t\tNcResource,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The provider id implemented with `\\OCA\\RelatedResources\\IRelatedResourceProvider::getProviderId()`\n\t\t */\n\t\tproviderId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * The item id which uniquely identities the e.g. Calendar event, Deck board, file, Talk room, etc.\n\t\t */\n\t\titemId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Limits to specific resource type. i.e. any provider id implemented with `\\OCA\\RelatedResources\\IRelatedResourceProvider::getProviderId()`\n\t\t */\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Set the maximum number of resources to load\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Only used by the files sidebar\n\t\t *\n\t\t * File info is passed when registered with `OCA.Sharing.ShareTabSections.registerSection()`\n\t\t */\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'has-error',\n\t\t'has-resources',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tappEnabled: OC?.appswebroots?.related_resources !== undefined,\n\t\t\theaderTranslated: t('Related resources'),\n\t\t\tloading: false,\n\t\t\terror: null,\n\t\t\tresources: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisVisible() {\n\t\t\tif (this.loading) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn this.error ?? this.resources.length > 0\n\t\t},\n\n\t\tdescription() {\n\t\t\tif (this.error) {\n\t\t\t\treturn t('Error getting related resources. Please contact your system administrator if you have any questions.')\n\t\t\t}\n\t\t\treturn t('Anything shared with the same group of people will show up here')\n\t\t},\n\n\t\thasResourceInfo() {\n\t\t\tif (this.providerId !== null && this.itemId !== null) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.fileInfo !== null) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tisFiles() {\n\t\t\treturn this.fileInfo?.id !== undefined\n\t\t},\n\n\t\turl() {\n\t\t\tlet providerId = null\n\t\t\tlet itemId = null\n\n\t\t\tif (this.isFiles) {\n\t\t\t\tproviderId = 'files'\n\t\t\t\titemId = this.fileInfo.id\n\t\t\t} else {\n\t\t\t\tproviderId = this.providerId\n\t\t\t\titemId = this.itemId\n\t\t\t}\n\n\t\t\treturn generateOcsUrl('/apps/related_resources/related/{providerId}?itemId={itemId}&resourceType={resourceType}&limit={limit}&format=json', {\n\t\t\t\tproviderId,\n\t\t\t\titemId,\n\t\t\t\tresourceType: this.resourceType,\n\t\t\t\tlimit: this.limit,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\tproviderId() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\titemId() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\tfileInfo() {\n\t\t\tthis.fetchRelatedResources()\n\t\t},\n\t\terror(error) {\n\t\t\t/**\n\t\t\t * Emitted when the error value changes\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('has-error', Boolean(error))\n\t\t},\n\t\tresources(resources) {\n\t\t\t/**\n\t\t\t * Emitted when the resources value changes\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('has-resources', resources.length > 0)\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.fetchRelatedResources()\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tasync fetchRelatedResources() {\n\t\t\tif (!this.appEnabled || !this.hasResourceInfo) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\tthis.error = null\n\t\t\tthis.resources = []\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(this.url)\n\t\t\t\tthis.resources = response.data.ocs?.data\n\t\t\t} catch (e) {\n\t\t\t\tthis.error = e\n\t\t\t\tconsole.error(e)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.related-resources {\n\t&__header {\n\t\tmargin: 0 0 10px 46px;\n\n\t\th5 {\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main$1","NcButton","t","_sfc_main","NcResource","_a","providerId","itemId","generateOcsUrl","error","resources","response","axios"],"mappings":";;;;;;AA2CA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,iBAAAC,EAAA,iCAAA,EAAA,cAAA,KAAA,KAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,GAAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACLA,MAAAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;;AACA,WAAA;AAAA,MACA,cAAAC,IAAA,yBAAA,iBAAA,gBAAAA,EAAA,uBAA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AAA,KAAA,kBAIA;AAAA,aAAA,UAAA,IACA,KAAA,QAAA,MACA,KAAA,YAAA,CAAA;AACA,YAAA;AACA,gBAAAS,IAAA,MAAAC,EAAA,IAAA,KAAA,GAAA;AACA,eAAA,aAAAP,IAAAM,EAAA,KAAA,QAAA,gBAAAN,EAAA;AAAA,QACA,SAAA,GAAA;AACA,eAAA,QAAA,GACA,QAAA,MAAA,CAAA;AAAA,QACA,UAAA;AACA,eAAA,UAAA;AAAA,QACA;AAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  var O = require("../assets/index-793eae6b.css");
2
2
  Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
3
- const p = require("../chunks/index-4398f925.cjs"), f = require("@nextcloud/router"), m = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), l = require("../chunks/l10n-903083c4.cjs");
3
+ const p = require("../chunks/index-4398f925.cjs"), f = require("@nextcloud/router"), m = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), l = require("../chunks/l10n-b1d264c7.cjs");
4
4
  require("../Directives/Tooltip.cjs");
5
- const c = require("../Functions/emoji.cjs"), d = require("../chunks/referencePickerModal-9b4ff88d.cjs");
5
+ const c = require("../Functions/emoji.cjs"), d = require("../chunks/referencePickerModal-279a483d.cjs");
6
6
  require("@nextcloud/axios");
7
7
  require("unist-util-visit");
8
8
  require("unist-builder");
@@ -3,10 +3,10 @@ import { r as c } from "../chunks/index-5f2a5f57.mjs";
3
3
  import { N as ut } from "../chunks/index-5f2a5f57.mjs";
4
4
  import { generateUrl as p } from "@nextcloud/router";
5
5
  import { n as u } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
6
- import { t as r } from "../chunks/l10n-27a75c40.mjs";
6
+ import { t as r } from "../chunks/l10n-05a09c66.mjs";
7
7
  import "../Directives/Tooltip.mjs";
8
8
  import { emojiAddRecent as m, emojiSearch as d } from "../Functions/emoji.mjs";
9
- import { n as h, j as f } from "../chunks/referencePickerModal-0fde503d.mjs";
9
+ import { n as h, j as f } from "../chunks/referencePickerModal-443a4c57.mjs";
10
10
  import "@nextcloud/axios";
11
11
  import "unist-util-visit";
12
12
  import "unist-builder";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
3
- const r = require("../chunks/NcRichText-d385dc10.cjs"), e = require("../chunks/referencePickerModal-9b4ff88d.cjs");
3
+ const r = require("../chunks/NcRichText-332fe454.cjs"), e = require("../chunks/referencePickerModal-279a483d.cjs");
4
4
  /**
5
5
  * @copyright Copyright (c) 2023 Raimund Schlüßler <raimund.schluessler@mailbox.org>
6
6
  *
@@ -1,6 +1,6 @@
1
- import { N as r } from "../chunks/NcRichText-1c3d2654.mjs";
2
- import { a as t } from "../chunks/NcRichText-1c3d2654.mjs";
3
- import { e as c, a as d, b as o, N as n, c as g, k as m, j as P, l as k, m as f, h as N, i as R, f as l, r as u, g as h, d as v, n as W, s as p } from "../chunks/referencePickerModal-0fde503d.mjs";
1
+ import { N as r } from "../chunks/NcRichText-8fda53c8.mjs";
2
+ import { a as t } from "../chunks/NcRichText-8fda53c8.mjs";
3
+ import { e as c, a as d, b as o, N as n, c as g, k as m, j as P, l as k, m as f, h as N, i as R, f as l, r as u, g as h, d as v, n as W, s as p } from "../chunks/referencePickerModal-443a4c57.mjs";
4
4
  /**
5
5
  * @copyright Copyright (c) 2023 Raimund Schlüßler <raimund.schluessler@mailbox.org>
6
6
  *
@@ -1,18 +1,18 @@
1
1
  var w = require("../assets/index-1beccc92.css");
2
2
  const c = require("@nextcloud/vue-select");
3
3
  require("@nextcloud/vue-select/dist/vue-select.css");
4
- const r = require("@floating-ui/dom"), p = require("vue-material-design-icons/ChevronDown.vue"), f = require("vue-material-design-icons/Close.vue"), d = require("./NcEllipsisedOption.cjs"), _ = require("./NcListItemIcon.cjs"), y = require("./NcLoadingIcon.cjs"), m = require("../chunks/l10n-4326316a.cjs"), h = require("../chunks/GenRandomId-c214d235.cjs"), g = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), i = (t) => t && t.__esModule ? t : { default: t }, S = /* @__PURE__ */ i(p), b = /* @__PURE__ */ i(f);
5
- const C = {
4
+ const a = require("@floating-ui/dom"), f = require("vue-material-design-icons/ChevronDown.vue"), d = require("vue-material-design-icons/Close.vue"), _ = require("./NcEllipsisedOption.cjs"), m = require("./NcListItemIcon.cjs"), y = require("./NcLoadingIcon.cjs"), h = require("../chunks/l10n-c7bd0ea6.cjs"), g = require("../chunks/GenRandomId-c214d235.cjs"), S = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), u = (t) => t && t.__esModule ? t : { default: t }, b = /* @__PURE__ */ u(f), C = /* @__PURE__ */ u(d);
5
+ const L = {
6
6
  name: "NcSelect",
7
7
  components: {
8
- ChevronDown: S.default,
9
- NcEllipsisedOption: d,
10
- NcListItemIcon: _,
8
+ ChevronDown: b.default,
9
+ NcEllipsisedOption: _,
10
+ NcListItemIcon: m,
11
11
  NcLoadingIcon: y,
12
12
  VueSelect: c.VueSelect
13
13
  },
14
14
  mixins: [
15
- m.l10n
15
+ h.l10n
16
16
  ],
17
17
  props: {
18
18
  // Add VueSelect props to $props
@@ -59,7 +59,7 @@ const C = {
59
59
  type: Object,
60
60
  default: () => ({
61
61
  Deselect: {
62
- render: (t) => t(b.default, {
62
+ render: (t) => t(C.default, {
63
63
  props: {
64
64
  size: 20,
65
65
  fillColor: "var(--vs-controls-color)"
@@ -236,7 +236,7 @@ const C = {
236
236
  */
237
237
  uid: {
238
238
  type: String,
239
- default: () => "-" + h.GenRandomId()
239
+ default: () => "-" + g.GenRandomId()
240
240
  },
241
241
  /**
242
242
  * When `appendToBody` is true, this sets the placement of the dropdown
@@ -306,47 +306,52 @@ const C = {
306
306
  t.style.width = n;
307
307
  const l = {
308
308
  name: "addClass",
309
- fn(s) {
309
+ fn(r) {
310
310
  return t.classList.add("vs__dropdown-menu--floating"), {};
311
311
  }
312
312
  }, o = {
313
313
  name: "togglePlacementClass",
314
- fn({ placement: s }) {
314
+ fn({ placement: r }) {
315
315
  return e.$el.classList.toggle(
316
316
  "select--drop-up",
317
- s === "top"
317
+ r === "top"
318
318
  ), t.classList.toggle(
319
319
  "vs__dropdown-menu--floating-placement-top",
320
- s === "top"
320
+ r === "top"
321
321
  ), {};
322
322
  }
323
- }, a = () => {
324
- r.computePosition(e.$refs.toggle, t, {
323
+ }, s = () => {
324
+ a.computePosition(e.$refs.toggle, t, {
325
325
  placement: this.placement,
326
326
  middleware: [
327
- r.offset(-1),
327
+ a.offset(-1),
328
328
  l,
329
329
  o,
330
330
  // Match popperjs default collision prevention behavior by appending the following middleware in order
331
- r.flip(),
332
- r.shift({ limiter: r.limitShift() })
331
+ a.flip(),
332
+ a.shift({ limiter: a.limitShift() })
333
333
  ]
334
- }).then(({ x: s, y: u }) => {
334
+ }).then(({ x: r, y: p }) => {
335
335
  Object.assign(t.style, {
336
- left: `${s}px`,
337
- top: `${u}px`
336
+ left: `${r}px`,
337
+ top: `${p}px`
338
338
  });
339
339
  });
340
340
  };
341
- return r.autoUpdate(
341
+ return a.autoUpdate(
342
342
  e.$refs.toggle,
343
343
  t,
344
- a
344
+ s
345
345
  );
346
346
  };
347
347
  },
348
348
  localFilterBy() {
349
- return this.filterBy !== null ? this.filterBy : this.userSelect ? (t, e, n) => (`${e} ${t.subname}` || "").toLocaleLowerCase().indexOf(n.toLocaleLowerCase()) > -1 : c.VueSelect.props.filterBy.default;
349
+ const t = /[^<]*<([^>]+)/;
350
+ return this.filterBy !== null ? this.filterBy : this.userSelect ? (e, n, l) => {
351
+ var s, i, r;
352
+ const o = l.match(t);
353
+ return o && ((r = (i = (s = e.subname) == null ? void 0 : s.toLocaleLowerCase) == null ? void 0 : i.call(s)) == null ? void 0 : r.indexOf(o[1].toLocaleLowerCase())) > -1 || `${n} ${e.subname}`.toLocaleLowerCase().indexOf(l.toLocaleLowerCase()) > -1;
354
+ } : c.VueSelect.props.filterBy.default;
350
355
  },
351
356
  localLabel() {
352
357
  return this.label !== null ? this.label : this.userSelect ? "displayName" : c.VueSelect.props.label.default;
@@ -371,7 +376,7 @@ const C = {
371
376
  }
372
377
  }
373
378
  };
374
- var L = function() {
379
+ var N = function() {
375
380
  var e = this, n = e._self._c;
376
381
  return n("VueSelect", e._g(e._b({ staticClass: "select", class: {
377
382
  "select--no-wrap": e.noWrap
@@ -388,13 +393,13 @@ var L = function() {
388
393
  } }, { key: "no-options", fn: function() {
389
394
  return [e._v(" " + e._s(e.t("No results")) + " ")];
390
395
  }, proxy: !0 }, e._l(e.$scopedSlots, function(l, o) {
391
- return { key: o, fn: function(a) {
392
- return [e._t(o, null, null, a)];
396
+ return { key: o, fn: function(s) {
397
+ return [e._t(o, null, null, s)];
393
398
  } };
394
399
  })], null, !0) }, "VueSelect", e.propsToForward, !1), e.$listeners));
395
- }, v = [], N = /* @__PURE__ */ g.normalizeComponent(
396
- C,
400
+ }, v = [], I = /* @__PURE__ */ S.normalizeComponent(
397
401
  L,
402
+ N,
398
403
  v,
399
404
  !1,
400
405
  null,
@@ -402,5 +407,5 @@ var L = function() {
402
407
  null,
403
408
  null
404
409
  );
405
- const B = N.exports;
410
+ const B = I.exports;
406
411
  module.exports = B;
@@ -1 +1 @@
1
- {"version":3,"file":"NcSelect.cjs","sources":["../../src/components/NcSelect/NcSelect.vue"],"sourcesContent":["<!--\n\t- @copyright 2022 Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @author Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @license AGPL-3.0-or-later\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<docs>\n### Description\n\nGeneral purpose multiselect component.\n\n### Basic examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'Simple',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Simple (top placement)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tplacement: 'top',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (with placeholder)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tplaceholder: 'Select multiple options',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (objects, pre-selected, stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'baz',\n\t\t\t\t\tlabel: 'Baz',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'qux',\n\t\t\t\t\tlabel: 'Qux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'quux',\n\t\t\t\t\tlabel: 'Quux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'corge',\n\t\t\t\t\tlabel: 'Corge',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'grault',\n\t\t\t\t\tlabel: 'Grault',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'garply',\n\t\t\t\t\tlabel: 'Garply',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'waldo',\n\t\t\t\t\tlabel: 'Waldo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'fred',\n\t\t\t\t\tlabel: 'Fred',\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalue: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(2, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### No wrap example\n\nThe `noWrap` prop is set to `true` and the `max-width` of the multiselect\nparent container is limited to `350px`\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data1.props.inputId\">{{ data1.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"false\"\n\t\t\t\tv-bind=\"data1.props\"\n\t\t\t\tv-model=\"data1.props.value\" />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data2.props.inputId\">{{ data2.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"true\"\n\t\t\t\tv-bind=\"data2.props\"\n\t\t\t\tv-model=\"data2.props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst data1 = {\n\tname: 'Wrapped (Default)',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nconst data2 = {\n\tname: 'Not wrapped',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdata1,\n\t\t\tdata2,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tmax-width: 350px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### User select examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport AccountGroup from '@mdi/svg/svg/account-group.svg?raw'\nimport Email from '@mdi/svg/svg/email.svg?raw'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'User select',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple user select (stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 500px);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<VueSelect class=\"select\"\n\t\t:class=\"{\n\t\t\t'select--no-wrap': noWrap,\n\t\t}\"\n\t\tv-bind=\"propsToForward\"\n\t\tv-on=\"$listeners\"\n\t\t@search=\"searchString => search = searchString\">\n\t\t<template #search=\"{ attributes, events }\">\n\t\t\t<input :class=\"['vs__search', inputClass]\"\n\t\t\t\tv-bind=\"attributes\"\n\t\t\t\tv-on=\"events\">\n\t\t</template>\n\t\t<template #open-indicator=\"{ attributes }\">\n\t\t\t<ChevronDown v-bind=\"attributes\"\n\t\t\t\tfill-color=\"var(--vs-controls-color)\"\n\t\t\t\t:size=\"26\" />\n\t\t\t\t<!-- Set size to 26 to make up for the increased padding of this icon -->\n\t\t</template>\n\t\t<template #option=\"option\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"option\"\n\t\t\t\t:name=\"option[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(option[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"selectedOption\"\n\t\t\t\t:name=\"selectedOption[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(selectedOption[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #spinner=\"spinner\">\n\t\t\t<NcLoadingIcon v-if=\"spinner.loading\" />\n\t\t</template>\n\t\t<template #no-options>\n\t\t\t{{ t('No results') }}\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</VueSelect>\n</template>\n\n<script>\nimport { VueSelect } from '@nextcloud/vue-select'\nimport '@nextcloud/vue-select/dist/vue-select.css'\nimport {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\tlimitShift,\n\toffset,\n\tshift,\n} from '@floating-ui/dom'\n\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\n\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcListItemIcon from '../NcListItemIcon/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nimport l10n from '../../mixins/l10n.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSelect',\n\n\tcomponents: {\n\t\tChevronDown,\n\t\tNcEllipsisedOption,\n\t\tNcListItemIcon,\n\t\tNcLoadingIcon,\n\t\tVueSelect,\n\t},\n\n\tmixins: [\n\t\tl10n,\n\t],\n\n\tprops: {\n\t\t// Add VueSelect props to $props\n\t\t...VueSelect.props,\n\n\t\t/**\n\t\t * Append the dropdown element to the end of the body\n\t\t * and size/position it dynamically.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#appendtobody\n\t\t */\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this function is responsible for\n\t\t * positioning the drop down list.\n\t\t *\n\t\t * If a function is returned from `calculatePosition`, it will\n\t\t * be called when the drop down list is removed from the DOM.\n\t\t * This allows for any garbage collection you may need to do.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#calculateposition\n\t\t */\n\t\tcalculatePosition: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Close the dropdown when selecting an option\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#closeonselect\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Replace default vue-select components\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#components\n\t\t */\n\t\tcomponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tDeselect: {\n\t\t\t\t\trender: createElement => createElement(Close, {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t\tfillColor: 'var(--vs-controls-color)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of options to display in the dropdown list\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Disable the component\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#disabled\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Determines whether the dropdown should be open.\n\t\t * Receives the component instance as the only argument.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#dropdownshouldopen\n\t\t */\n\t\tdropdownShouldOpen: {\n\t\t\ttype: Function,\n\t\t\tdefault: ({ noDrop, open }) => {\n\t\t\t\treturn noDrop ? false : open\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Callback to determine if the provided option should\n\t\t * match the current search text. Used to determine\n\t\t * if the option should be displayed.\n\t\t *\n\t\t * Defaults to the internal vue-select function documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to filter by the\n\t\t * `displayName` and `subname` properties of the user option object\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#filterby\n\t\t */\n\t\tfilterBy: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Class for the `input`\n\t\t *\n\t\t * Necessary for use in NcActionInput\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Input element id\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#inputid\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Display a visible border around dropdown options\n\t\t * which have keyboard focus\n\t\t */\n\t\tkeyboardFocusBorder: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Key of the displayed label for object options\n\t\t *\n\t\t * Defaults to the internal vue-select string documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to `'displayName'`\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#label\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Show the loading icon\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#loading\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Disable automatic wrapping when selected options overflow the width\n\t\t */\n\t\tnoWrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Array of options\n\t\t *\n\t\t * @type {Array<string | number | Record<string | number, any>>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#options\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Customized component's response to keydown events while the search input has focus\n\t\t *\n\t\t * @see https://vue-select.org/guide/keydown.html#mapkeydown\n\t\t */\n\t\tmapKeydown: {\n\t\t\ttype: Function,\n\t\t\t/**\n\t\t\t * Patched Vue-Select keydown events handlers map to stop Escape propagation in open select\n\t\t\t *\n\t\t\t * @param {Record<number, Function>} map - Mapped keyCode to handlers { <keyCode>:<callback> }\n\t\t\t * @param {import('@nextcloud/vue-select').VueSelect} vm - VueSelect instance\n\t\t\t * @return {Record<number, Function>} patched keydown event handlers\n\t\t\t */\n\t\t\tdefault(map, vm) {\n\t\t\t\treturn {\n\t\t\t\t\t...map,\n\t\t\t\t\t/**\n\t\t\t\t\t * Patched Escape handler to stop propagation from open select\n\t\t\t\t\t *\n\t\t\t\t\t * @param {KeyboardEvent} event - default keydown event handler\n\t\t\t\t\t */\n\t\t\t\t\t27: (event) => {\n\t\t\t\t\t\tif (vm.open) {\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Default VueSelect's handler\n\t\t\t\t\t\tmap[27](event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * A unique identifier used to generate IDs and DOM attributes. Must be unique for every instance of the component.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#uid\n\t\t */\n\t\tuid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => '-' + GenRandomId(),\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this sets the placement of the dropdown\n\t\t *\n\t\t * @type {'bottom' | 'top'}\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * If false, the focused dropdown option will not be reset when filtered\n\t\t * options change\n\t\t */\n\t\tresetFocusOnOptionsChange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Enable the user selector with avatars\n\t\t *\n\t\t * Objects must contain the data expected by the\n\t\t * [NcListItemIcon](#/Components/NcListItemIcon) and\n\t\t * [NcAvatar](#/Components/NcAvatar) components\n\t\t */\n\t\tuserSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t *\n\t\t * The `v-model` directive may be used for two-way data binding\n\t\t *\n\t\t * @type {string | number | Record<string | number, any> | Array<any>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number, Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlocalCalculatePosition() {\n\t\t\tif (this.calculatePosition !== null) {\n\t\t\t\treturn this.calculatePosition\n\t\t\t}\n\n\t\t\treturn (dropdownMenu, component, { width }) => {\n\t\t\t\tdropdownMenu.style.width = width\n\n\t\t\t\tconst addClass = {\n\t\t\t\t\tname: 'addClass',\n\t\t\t\t\tfn(_middlewareArgs) {\n\t\t\t\t\t\tdropdownMenu.classList.add('vs__dropdown-menu--floating')\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst togglePlacementClass = {\n\t\t\t\t\tname: 'togglePlacementClass',\n\t\t\t\t\tfn({ placement }) {\n\t\t\t\t\t\tcomponent.$el.classList.toggle(\n\t\t\t\t\t\t\t'select--drop-up',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\tdropdownMenu.classList.toggle(\n\t\t\t\t\t\t\t'vs__dropdown-menu--floating-placement-top',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst updatePosition = () => {\n\t\t\t\t\tcomputePosition(component.$refs.toggle, dropdownMenu, {\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tmiddleware: [\n\t\t\t\t\t\t\toffset(-1),\n\t\t\t\t\t\t\taddClass,\n\t\t\t\t\t\t\ttogglePlacementClass,\n\t\t\t\t\t\t\t// Match popperjs default collision prevention behavior by appending the following middleware in order\n\t\t\t\t\t\t\tflip(),\n\t\t\t\t\t\t\tshift({ limiter: limitShift() }),\n\t\t\t\t\t\t],\n\t\t\t\t\t}).then(({ x, y }) => {\n\t\t\t\t\t\tObject.assign(dropdownMenu.style, {\n\t\t\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = autoUpdate(\n\t\t\t\t\tcomponent.$refs.toggle,\n\t\t\t\t\tdropdownMenu,\n\t\t\t\t\tupdatePosition,\n\t\t\t\t)\n\n\t\t\t\treturn cleanup\n\t\t\t}\n\t\t},\n\n\t\tlocalFilterBy() {\n\t\t\tif (this.filterBy !== null) {\n\t\t\t\treturn this.filterBy\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn (option, label, search) => {\n\t\t\t\t\treturn (`${label} ${option.subname}` || '')\n\t\t\t\t\t\t.toLocaleLowerCase()\n\t\t\t\t\t\t.indexOf(search.toLocaleLowerCase()) > -1\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn VueSelect.props.filterBy.default\n\t\t},\n\n\t\tlocalLabel() {\n\t\t\tif (this.label !== null) {\n\t\t\t\treturn this.label\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn 'displayName'\n\t\t\t}\n\t\t\treturn VueSelect.props.label.default\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tinputClass,\n\t\t\t\tnoWrap,\n\t\t\t\tplacement,\n\t\t\t\tuserSelect,\n\t\t\t\t// Props to forward\n\t\t\t\t...initialPropsToForward\n\t\t\t} = this.$props\n\n\t\t\tconst propsToForward = {\n\t\t\t\t...initialPropsToForward,\n\t\t\t\t// Custom overrides of vue-select props\n\t\t\t\tcalculatePosition: this.localCalculatePosition,\n\t\t\t\tfilterBy: this.localFilterBy,\n\t\t\t\tlabel: this.localLabel,\n\t\t\t}\n\n\t\t\treturn propsToForward\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\t/**\n\t * Set custom vue-select CSS variables.\n\t * Needs to be on the body (not :root) for theming to apply (see nextcloud/server#36462)\n\t */\n\n\t/* Search Input */\n\t--vs-search-input-color: var(--color-main-text);\n\t--vs-search-input-bg: var(--color-main-background);\n\t--vs-search-input-placeholder-color: var(--color-text-maxcontrast);\n\n\t/* Font */\n\t--vs-font-size: var(--default-font-size);\n\t--vs-line-height: var(--default-line-height);\n\n\t/* Disabled State */\n\t--vs-state-disabled-bg: var(--color-background-hover);\n\t--vs-state-disabled-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-controls-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-cursor: not-allowed;\n\t--vs-disabled-bg: var(--color-background-hover);\n\t--vs-disabled-color: var(--color-text-maxcontrast);\n\t--vs-disabled-cursor: not-allowed;\n\n\t/* Borders */\n\t--vs-border-color: var(--color-border-maxcontrast);\n\t--vs-border-width: 2px;\n\t--vs-border-style: solid;\n\t--vs-border-radius: var(--border-radius-large);\n\n\t/* Component Controls: Clear, Open Indicator */\n\t--vs-controls-color: var(--color-text-maxcontrast);\n\n\t/* Selected */\n\t--vs-selected-bg: var(--color-background-dark);\n\t--vs-selected-color: var(--color-main-text);\n\t--vs-selected-border-color: var(--vs-border-color);\n\t--vs-selected-border-style: var(--vs-border-style);\n\t--vs-selected-border-width: var(--vs-border-width);\n\n\t/* Dropdown */\n\t--vs-dropdown-bg: var(--color-main-background);\n\t--vs-dropdown-color: var(--color-main-text);\n\t--vs-dropdown-z-index: 9999;\n\t--vs-dropdown-box-shadow: 0px 2px 2px 0px var(--color-box-shadow);\n\n\t/* Options */\n\t--vs-dropdown-option-padding: 8px 20px;\n\n\t/* Active State */\n\t--vs-dropdown-option--active-bg: var(--color-background-hover);\n\t--vs-dropdown-option--active-color: var(--color-main-text);\n\n\t/* Keyboard Focus State */\n\t--vs-dropdown-option--kb-focus-box-shadow: inset 0px 0px 0px 2px var(--vs-border-color);\n\n\t/* Deselect State */\n\t--vs-dropdown-option--deselect-bg: var(--color-error);\n\t--vs-dropdown-option--deselect-color: #fff;\n\n\t/* Transitions */\n\t--vs-transition-duration: 0ms;\n}\n\n.v-select.select {\n\t/* Override default vue-select styles */\n\tmin-height: $clickable-area;\n\tmin-width: 260px;\n\tmargin: 0;\n\n\t.vs__selected {\n\t\tmin-height: 36px;\n\t\tpadding: 0 0.5em;\n\t\tborder-radius: calc(var(--vs-border-radius) - 4px) !important;\n\t}\n\n\t.vs__clear {\n\t\tmargin-right: 2px;\n\t}\n\n\t&.vs--open .vs__dropdown-toggle {\n\t\tborder-color: var(--color-primary-element);\n\t\tborder-bottom-color: transparent;\n\t}\n\n\t&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {\n\t\tborder-color: var(--color-primary-element);\n\t}\n\n\t&.vs--disabled {\n\t\t.vs__search,\n\t\t.vs__selected {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.vs__clear,\n\t\t.vs__deselect {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t&--no-wrap {\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t\toverflow: auto;\n\t\t\tmin-width: unset;\n\t\t\t.vs__selected {\n\t\t\t\tmin-width: unset;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--drop-up {\n\t\t&.vs--open {\n\t\t\t.vs__dropdown-toggle {\n\t\t\t\tborder-radius: 0 0 var(--vs-border-radius) var(--vs-border-radius);\n\t\t\t\tborder-top-color: transparent;\n\t\t\t\tborder-bottom-color: var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.vs__selected-options {\n\t\t// If search is hidden, ensure that the height of the search is the same\n\t\tmin-height: 40px; // 36px search height + 4px search margin\n\n\t\t// Hide search from dom if unused to prevent unneeded flex wrap\n\t\t.vs__selected ~ .vs__search[readonly] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n\n\t&.vs--single {\n\t\t&.vs--loading,\n\t\t&.vs--open {\n\t\t\t.vs__selected {\n\t\t\t\t// Fix `max-width` for `position: absolute`\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t}\n\t}\n}\n\n.vs__dropdown-menu {\n\tborder-color: var(--color-primary-element) !important;\n\tpadding: 4px !important;\n\n\t&--floating {\n\t\t/* Fallback styles overidden by programmatically set inline styles */\n\t\twidth: max-content;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\n\t\t&-placement-top {\n\t\t\tborder-radius: var(--vs-border-radius) var(--vs-border-radius) 0 0 !important;\n\t\t\tborder-top-style: var(--vs-border-style) !important;\n\t\t\tborder-bottom-style: none !important;\n\t\t\tbox-shadow: 0px -1px 1px 0px var(--color-box-shadow) !important;\n\t\t}\n\t}\n\n\t.vs__dropdown-option {\n\t\tborder-radius: 6px !important;\n\t}\n\n\t.vs__no-options {\n\t\tcolor: var(--color-text-lighter) !important;\n\t}\n}\n</style>\n"],"names":["_sfc_main","ChevronDown__default","Components_NcEllipsisedOption","Components_NcListItemIcon","Components_NcLoadingIcon","vueSelect","l10n","createElement","Close__default","noDrop","open","map","vm","event","GenRandomId","dropdownMenu","component","width","addClass","_middlewareArgs","togglePlacementClass","placement","updatePosition","dom","x","y","option","label","search","inputClass","noWrap","userSelect","initialPropsToForward"],"m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AU;AAAA;AAAA,QAEA,GAAAC;AAAA,MACA,IAAA,KAAA;AAUA,aARA;AAAA,QACA,GAAAA;AAAA;AAAA,QAEA,mBAAA,KAAA;AAAA,QACA,UAAA,KAAA;AAAA,QACA,OAAA,KAAA;AAAA,MACA;AAAA,IAGA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcSelect.cjs","sources":["../../src/components/NcSelect/NcSelect.vue"],"sourcesContent":["<!--\n\t- @copyright 2022 Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @author Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @license AGPL-3.0-or-later\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<docs>\n### Description\n\nGeneral purpose multiselect component.\n\n### Basic examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'Simple',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Simple (top placement)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tplacement: 'top',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (with placeholder)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tplaceholder: 'Select multiple options',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (objects, pre-selected, stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'baz',\n\t\t\t\t\tlabel: 'Baz',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'qux',\n\t\t\t\t\tlabel: 'Qux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'quux',\n\t\t\t\t\tlabel: 'Quux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'corge',\n\t\t\t\t\tlabel: 'Corge',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'grault',\n\t\t\t\t\tlabel: 'Grault',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'garply',\n\t\t\t\t\tlabel: 'Garply',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'waldo',\n\t\t\t\t\tlabel: 'Waldo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'fred',\n\t\t\t\t\tlabel: 'Fred',\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalue: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(2, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### No wrap example\n\nThe `noWrap` prop is set to `true` and the `max-width` of the multiselect\nparent container is limited to `350px`\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data1.props.inputId\">{{ data1.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"false\"\n\t\t\t\tv-bind=\"data1.props\"\n\t\t\t\tv-model=\"data1.props.value\" />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data2.props.inputId\">{{ data2.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"true\"\n\t\t\t\tv-bind=\"data2.props\"\n\t\t\t\tv-model=\"data2.props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst data1 = {\n\tname: 'Wrapped (Default)',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nconst data2 = {\n\tname: 'Not wrapped',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdata1,\n\t\t\tdata2,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tmax-width: 350px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### User select examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport AccountGroup from '@mdi/svg/svg/account-group.svg?raw'\nimport Email from '@mdi/svg/svg/email.svg?raw'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'User select',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t\t// Example of how to show the user status within the option\n\t\t\t\t\tuser: '0-john',\n\t\t\t\t\tpreloadedUserStatus: {\n\t\t\t\t\t\ticon: '',\n\t\t\t\t\t\tstatus: 'online',\n\t\t\t\t\t\tmessage: 'I am online',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple user select (stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 500px);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<VueSelect class=\"select\"\n\t\t:class=\"{\n\t\t\t'select--no-wrap': noWrap,\n\t\t}\"\n\t\tv-bind=\"propsToForward\"\n\t\tv-on=\"$listeners\"\n\t\t@search=\"searchString => search = searchString\">\n\t\t<template #search=\"{ attributes, events }\">\n\t\t\t<input :class=\"['vs__search', inputClass]\"\n\t\t\t\tv-bind=\"attributes\"\n\t\t\t\tv-on=\"events\">\n\t\t</template>\n\t\t<template #open-indicator=\"{ attributes }\">\n\t\t\t<ChevronDown v-bind=\"attributes\"\n\t\t\t\tfill-color=\"var(--vs-controls-color)\"\n\t\t\t\t:size=\"26\" />\n\t\t\t\t<!-- Set size to 26 to make up for the increased padding of this icon -->\n\t\t</template>\n\t\t<template #option=\"option\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"option\"\n\t\t\t\t:name=\"option[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(option[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"selectedOption\"\n\t\t\t\t:name=\"selectedOption[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(selectedOption[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #spinner=\"spinner\">\n\t\t\t<NcLoadingIcon v-if=\"spinner.loading\" />\n\t\t</template>\n\t\t<template #no-options>\n\t\t\t{{ t('No results') }}\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</VueSelect>\n</template>\n\n<script>\nimport { VueSelect } from '@nextcloud/vue-select'\nimport '@nextcloud/vue-select/dist/vue-select.css'\nimport {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\tlimitShift,\n\toffset,\n\tshift,\n} from '@floating-ui/dom'\n\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\n\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcListItemIcon from '../NcListItemIcon/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nimport l10n from '../../mixins/l10n.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSelect',\n\n\tcomponents: {\n\t\tChevronDown,\n\t\tNcEllipsisedOption,\n\t\tNcListItemIcon,\n\t\tNcLoadingIcon,\n\t\tVueSelect,\n\t},\n\n\tmixins: [\n\t\tl10n,\n\t],\n\n\tprops: {\n\t\t// Add VueSelect props to $props\n\t\t...VueSelect.props,\n\n\t\t/**\n\t\t * Append the dropdown element to the end of the body\n\t\t * and size/position it dynamically.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#appendtobody\n\t\t */\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this function is responsible for\n\t\t * positioning the drop down list.\n\t\t *\n\t\t * If a function is returned from `calculatePosition`, it will\n\t\t * be called when the drop down list is removed from the DOM.\n\t\t * This allows for any garbage collection you may need to do.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#calculateposition\n\t\t */\n\t\tcalculatePosition: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Close the dropdown when selecting an option\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#closeonselect\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Replace default vue-select components\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#components\n\t\t */\n\t\tcomponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tDeselect: {\n\t\t\t\t\trender: createElement => createElement(Close, {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t\tfillColor: 'var(--vs-controls-color)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of options to display in the dropdown list\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Disable the component\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#disabled\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Determines whether the dropdown should be open.\n\t\t * Receives the component instance as the only argument.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#dropdownshouldopen\n\t\t */\n\t\tdropdownShouldOpen: {\n\t\t\ttype: Function,\n\t\t\tdefault: ({ noDrop, open }) => {\n\t\t\t\treturn noDrop ? false : open\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Callback to determine if the provided option should\n\t\t * match the current search text. Used to determine\n\t\t * if the option should be displayed.\n\t\t *\n\t\t * Defaults to the internal vue-select function documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to filter by the\n\t\t * `displayName` and `subname` properties of the user option object\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#filterby\n\t\t */\n\t\tfilterBy: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Class for the `input`\n\t\t *\n\t\t * Necessary for use in NcActionInput\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Input element id\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#inputid\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Display a visible border around dropdown options\n\t\t * which have keyboard focus\n\t\t */\n\t\tkeyboardFocusBorder: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Key of the displayed label for object options\n\t\t *\n\t\t * Defaults to the internal vue-select string documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to `'displayName'`\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#label\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Show the loading icon\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#loading\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Disable automatic wrapping when selected options overflow the width\n\t\t */\n\t\tnoWrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Array of options\n\t\t *\n\t\t * @type {Array<string | number | Record<string | number, any>>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#options\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Customized component's response to keydown events while the search input has focus\n\t\t *\n\t\t * @see https://vue-select.org/guide/keydown.html#mapkeydown\n\t\t */\n\t\tmapKeydown: {\n\t\t\ttype: Function,\n\t\t\t/**\n\t\t\t * Patched Vue-Select keydown events handlers map to stop Escape propagation in open select\n\t\t\t *\n\t\t\t * @param {Record<number, Function>} map - Mapped keyCode to handlers { <keyCode>:<callback> }\n\t\t\t * @param {import('@nextcloud/vue-select').VueSelect} vm - VueSelect instance\n\t\t\t * @return {Record<number, Function>} patched keydown event handlers\n\t\t\t */\n\t\t\tdefault(map, vm) {\n\t\t\t\treturn {\n\t\t\t\t\t...map,\n\t\t\t\t\t/**\n\t\t\t\t\t * Patched Escape handler to stop propagation from open select\n\t\t\t\t\t *\n\t\t\t\t\t * @param {KeyboardEvent} event - default keydown event handler\n\t\t\t\t\t */\n\t\t\t\t\t27: (event) => {\n\t\t\t\t\t\tif (vm.open) {\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Default VueSelect's handler\n\t\t\t\t\t\tmap[27](event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * A unique identifier used to generate IDs and DOM attributes. Must be unique for every instance of the component.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#uid\n\t\t */\n\t\tuid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => '-' + GenRandomId(),\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this sets the placement of the dropdown\n\t\t *\n\t\t * @type {'bottom' | 'top'}\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * If false, the focused dropdown option will not be reset when filtered\n\t\t * options change\n\t\t */\n\t\tresetFocusOnOptionsChange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Enable the user selector with avatars\n\t\t *\n\t\t * Objects must contain the data expected by the\n\t\t * [NcListItemIcon](#/Components/NcListItemIcon) and\n\t\t * [NcAvatar](#/Components/NcAvatar) components\n\t\t */\n\t\tuserSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t *\n\t\t * The `v-model` directive may be used for two-way data binding\n\t\t *\n\t\t * @type {string | number | Record<string | number, any> | Array<any>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number, Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlocalCalculatePosition() {\n\t\t\tif (this.calculatePosition !== null) {\n\t\t\t\treturn this.calculatePosition\n\t\t\t}\n\n\t\t\treturn (dropdownMenu, component, { width }) => {\n\t\t\t\tdropdownMenu.style.width = width\n\n\t\t\t\tconst addClass = {\n\t\t\t\t\tname: 'addClass',\n\t\t\t\t\tfn(_middlewareArgs) {\n\t\t\t\t\t\tdropdownMenu.classList.add('vs__dropdown-menu--floating')\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst togglePlacementClass = {\n\t\t\t\t\tname: 'togglePlacementClass',\n\t\t\t\t\tfn({ placement }) {\n\t\t\t\t\t\tcomponent.$el.classList.toggle(\n\t\t\t\t\t\t\t'select--drop-up',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\tdropdownMenu.classList.toggle(\n\t\t\t\t\t\t\t'vs__dropdown-menu--floating-placement-top',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst updatePosition = () => {\n\t\t\t\t\tcomputePosition(component.$refs.toggle, dropdownMenu, {\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tmiddleware: [\n\t\t\t\t\t\t\toffset(-1),\n\t\t\t\t\t\t\taddClass,\n\t\t\t\t\t\t\ttogglePlacementClass,\n\t\t\t\t\t\t\t// Match popperjs default collision prevention behavior by appending the following middleware in order\n\t\t\t\t\t\t\tflip(),\n\t\t\t\t\t\t\tshift({ limiter: limitShift() }),\n\t\t\t\t\t\t],\n\t\t\t\t\t}).then(({ x, y }) => {\n\t\t\t\t\t\tObject.assign(dropdownMenu.style, {\n\t\t\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = autoUpdate(\n\t\t\t\t\tcomponent.$refs.toggle,\n\t\t\t\t\tdropdownMenu,\n\t\t\t\t\tupdatePosition,\n\t\t\t\t)\n\n\t\t\t\treturn cleanup\n\t\t\t}\n\t\t},\n\n\t\tlocalFilterBy() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /[^<]*<([^>]+)/\n\n\t\t\tif (this.filterBy !== null) {\n\t\t\t\treturn this.filterBy\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn (option, label, search) => {\n\t\t\t\t\tconst match = search.match(EMAIL_NOTATION)\n\t\t\t\t\treturn (match && option.subname?.toLocaleLowerCase?.()?.indexOf(match[1].toLocaleLowerCase()) > -1)\n\t\t\t\t\t\t|| (`${label} ${option.subname}`\n\t\t\t\t\t\t\t.toLocaleLowerCase()\n\t\t\t\t\t\t\t.indexOf(search.toLocaleLowerCase()) > -1)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn VueSelect.props.filterBy.default\n\t\t},\n\n\t\tlocalLabel() {\n\t\t\tif (this.label !== null) {\n\t\t\t\treturn this.label\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn 'displayName'\n\t\t\t}\n\t\t\treturn VueSelect.props.label.default\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tinputClass,\n\t\t\t\tnoWrap,\n\t\t\t\tplacement,\n\t\t\t\tuserSelect,\n\t\t\t\t// Props to forward\n\t\t\t\t...initialPropsToForward\n\t\t\t} = this.$props\n\n\t\t\tconst propsToForward = {\n\t\t\t\t...initialPropsToForward,\n\t\t\t\t// Custom overrides of vue-select props\n\t\t\t\tcalculatePosition: this.localCalculatePosition,\n\t\t\t\tfilterBy: this.localFilterBy,\n\t\t\t\tlabel: this.localLabel,\n\t\t\t}\n\n\t\t\treturn propsToForward\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\t/**\n\t * Set custom vue-select CSS variables.\n\t * Needs to be on the body (not :root) for theming to apply (see nextcloud/server#36462)\n\t */\n\n\t/* Search Input */\n\t--vs-search-input-color: var(--color-main-text);\n\t--vs-search-input-bg: var(--color-main-background);\n\t--vs-search-input-placeholder-color: var(--color-text-maxcontrast);\n\n\t/* Font */\n\t--vs-font-size: var(--default-font-size);\n\t--vs-line-height: var(--default-line-height);\n\n\t/* Disabled State */\n\t--vs-state-disabled-bg: var(--color-background-hover);\n\t--vs-state-disabled-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-controls-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-cursor: not-allowed;\n\t--vs-disabled-bg: var(--color-background-hover);\n\t--vs-disabled-color: var(--color-text-maxcontrast);\n\t--vs-disabled-cursor: not-allowed;\n\n\t/* Borders */\n\t--vs-border-color: var(--color-border-maxcontrast);\n\t--vs-border-width: 2px;\n\t--vs-border-style: solid;\n\t--vs-border-radius: var(--border-radius-large);\n\n\t/* Component Controls: Clear, Open Indicator */\n\t--vs-controls-color: var(--color-text-maxcontrast);\n\n\t/* Selected */\n\t--vs-selected-bg: var(--color-background-dark);\n\t--vs-selected-color: var(--color-main-text);\n\t--vs-selected-border-color: var(--vs-border-color);\n\t--vs-selected-border-style: var(--vs-border-style);\n\t--vs-selected-border-width: var(--vs-border-width);\n\n\t/* Dropdown */\n\t--vs-dropdown-bg: var(--color-main-background);\n\t--vs-dropdown-color: var(--color-main-text);\n\t--vs-dropdown-z-index: 9999;\n\t--vs-dropdown-box-shadow: 0px 2px 2px 0px var(--color-box-shadow);\n\n\t/* Options */\n\t--vs-dropdown-option-padding: 8px 20px;\n\n\t/* Active State */\n\t--vs-dropdown-option--active-bg: var(--color-background-hover);\n\t--vs-dropdown-option--active-color: var(--color-main-text);\n\n\t/* Keyboard Focus State */\n\t--vs-dropdown-option--kb-focus-box-shadow: inset 0px 0px 0px 2px var(--vs-border-color);\n\n\t/* Deselect State */\n\t--vs-dropdown-option--deselect-bg: var(--color-error);\n\t--vs-dropdown-option--deselect-color: #fff;\n\n\t/* Transitions */\n\t--vs-transition-duration: 0ms;\n}\n\n.v-select.select {\n\t/* Override default vue-select styles */\n\tmin-height: $clickable-area;\n\tmin-width: 260px;\n\tmargin: 0;\n\n\t.vs__selected {\n\t\tmin-height: 36px;\n\t\tpadding: 0 0.5em;\n\t\tborder-radius: calc(var(--vs-border-radius) - 4px) !important;\n\t}\n\n\t.vs__clear {\n\t\tmargin-right: 2px;\n\t}\n\n\t&.vs--open .vs__dropdown-toggle {\n\t\tborder-color: var(--color-primary-element);\n\t\tborder-bottom-color: transparent;\n\t}\n\n\t&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {\n\t\tborder-color: var(--color-primary-element);\n\t}\n\n\t&.vs--disabled {\n\t\t.vs__search,\n\t\t.vs__selected {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.vs__clear,\n\t\t.vs__deselect {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t&--no-wrap {\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t\toverflow: auto;\n\t\t\tmin-width: unset;\n\t\t\t.vs__selected {\n\t\t\t\tmin-width: unset;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--drop-up {\n\t\t&.vs--open {\n\t\t\t.vs__dropdown-toggle {\n\t\t\t\tborder-radius: 0 0 var(--vs-border-radius) var(--vs-border-radius);\n\t\t\t\tborder-top-color: transparent;\n\t\t\t\tborder-bottom-color: var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.vs__selected-options {\n\t\t// If search is hidden, ensure that the height of the search is the same\n\t\tmin-height: 40px; // 36px search height + 4px search margin\n\n\t\t// Hide search from dom if unused to prevent unneeded flex wrap\n\t\t.vs__selected ~ .vs__search[readonly] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n\n\t&.vs--single {\n\t\t&.vs--loading,\n\t\t&.vs--open {\n\t\t\t.vs__selected {\n\t\t\t\t// Fix `max-width` for `position: absolute`\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t}\n\t}\n}\n\n.vs__dropdown-menu {\n\tborder-color: var(--color-primary-element) !important;\n\tpadding: 4px !important;\n\n\t&--floating {\n\t\t/* Fallback styles overidden by programmatically set inline styles */\n\t\twidth: max-content;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\n\t\t&-placement-top {\n\t\t\tborder-radius: var(--vs-border-radius) var(--vs-border-radius) 0 0 !important;\n\t\t\tborder-top-style: var(--vs-border-style) !important;\n\t\t\tborder-bottom-style: none !important;\n\t\t\tbox-shadow: 0px -1px 1px 0px var(--color-box-shadow) !important;\n\t\t}\n\t}\n\n\t.vs__dropdown-option {\n\t\tborder-radius: 6px !important;\n\t}\n\n\t.vs__no-options {\n\t\tcolor: var(--color-text-lighter) !important;\n\t}\n}\n</style>\n"],"names":["_sfc_main","ChevronDown__default","Components_NcEllipsisedOption","Components_NcListItemIcon","Components_NcLoadingIcon","vueSelect","l10n","createElement","Close__default","noDrop","open","map","vm","event","GenRandomId","dropdownMenu","component","width","addClass","_middlewareArgs","togglePlacementClass","placement","updatePosition","dom","x","y","EMAIL_NOTATION","option","label","search","match","_c","_b","_a","inputClass","noWrap","userSelect","initialPropsToForward"],"mappings":";;;;AA6iBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC,EAAA;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC,EAAA;AAAA,EACA;AAAA,EAEA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