@wix/patterns-fields 1.55.0 → 1.59.0

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 (419) hide show
  1. package/dist/cjs/components/address/input/address-input.st.css.js +3 -3
  2. package/dist/cjs/components/address/input/address-input.st.css.js.map +1 -1
  3. package/dist/cjs/components/address/view/cell-address-view.js +2 -2
  4. package/dist/cjs/components/address/view/cell-address-view.js.map +1 -1
  5. package/dist/cjs/components/audio/actions/actions-button/actions-button.js +2 -2
  6. package/dist/cjs/components/audio/actions/actions-button/actions-button.js.map +1 -1
  7. package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
  8. package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
  9. package/dist/cjs/components/audio/actions/audio-actions.js +5 -5
  10. package/dist/cjs/components/audio/actions/audio-actions.js.map +1 -1
  11. package/dist/cjs/components/audio/audio-field/audio-view.js +2 -2
  12. package/dist/cjs/components/audio/audio-field/audio-view.js.map +1 -1
  13. package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js +4 -4
  14. package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
  15. package/dist/cjs/components/audio/audio-player/audio-player.st.css.js +2 -2
  16. package/dist/cjs/components/audio/audio-player/audio-player.st.css.js.map +1 -1
  17. package/dist/cjs/components/audio/cell-audio-edit.js +4 -4
  18. package/dist/cjs/components/audio/cell-audio-edit.js.map +1 -1
  19. package/dist/cjs/components/audio/cell-audio-view.js +2 -2
  20. package/dist/cjs/components/audio/cell-audio-view.js.map +1 -1
  21. package/dist/cjs/components/color-view/cell-color-view.st.css.js +3 -3
  22. package/dist/cjs/components/color-view/cell-color-view.st.css.js.map +1 -1
  23. package/dist/cjs/components/color-view/color-view.st.css.js +4 -4
  24. package/dist/cjs/components/color-view/color-view.st.css.js.map +1 -1
  25. package/dist/cjs/components/date-input/date-utils.js +15 -2
  26. package/dist/cjs/components/date-input/date-utils.js.map +1 -1
  27. package/dist/cjs/components/date-input/form-date-input.js +14 -15
  28. package/dist/cjs/components/date-input/form-date-input.js.map +1 -1
  29. package/dist/cjs/components/datetime-input/form-date-time.js +11 -9
  30. package/dist/cjs/components/datetime-input/form-date-time.js.map +1 -1
  31. package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js +3 -3
  32. package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
  33. package/dist/cjs/components/document/cell-document-edit.js +10 -10
  34. package/dist/cjs/components/document/cell-document-edit.js.map +1 -1
  35. package/dist/cjs/components/document/cell-document-view.js +2 -2
  36. package/dist/cjs/components/document/cell-document-view.js.map +1 -1
  37. package/dist/cjs/components/document/document-control.js +6 -6
  38. package/dist/cjs/components/document/document-control.js.map +1 -1
  39. package/dist/cjs/components/document/document-view.js +2 -2
  40. package/dist/cjs/components/document/document-view.js.map +1 -1
  41. package/dist/cjs/components/document/form-document-field.st.css.js +7 -7
  42. package/dist/cjs/components/document/form-document-field.st.css.js.map +1 -1
  43. package/dist/cjs/components/exclamation/exclamation.js +2 -2
  44. package/dist/cjs/components/exclamation/exclamation.js.map +1 -1
  45. package/dist/cjs/components/exclamation/exclamation.st.css.js +5 -5
  46. package/dist/cjs/components/exclamation/exclamation.st.css.js.map +1 -1
  47. package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js +5 -5
  48. package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
  49. package/dist/cjs/components/image/cell-image-edit.js +7 -7
  50. package/dist/cjs/components/image/cell-image-edit.js.map +1 -1
  51. package/dist/cjs/components/image/thumbnail-replace-overlay.js +2 -2
  52. package/dist/cjs/components/image/thumbnail-replace-overlay.js.map +1 -1
  53. package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js +3 -3
  54. package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
  55. package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js +2 -2
  56. package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
  57. package/dist/cjs/components/media-control/paste-url-button.st.css.js +4 -4
  58. package/dist/cjs/components/media-control/paste-url-button.st.css.js.map +1 -1
  59. package/dist/cjs/components/media-gallery/cell-media-gallery-edit.js +6 -6
  60. package/dist/cjs/components/media-gallery/cell-media-gallery-edit.js.map +1 -1
  61. package/dist/cjs/components/media-gallery/form-media-gallery-field.js +4 -4
  62. package/dist/cjs/components/media-gallery/form-media-gallery-field.js.map +1 -1
  63. package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
  64. package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
  65. package/dist/cjs/components/media-gallery/media-gallery-dialog/add-media-button.js +2 -2
  66. package/dist/cjs/components/media-gallery/media-gallery-dialog/add-media-button.js.map +1 -1
  67. package/dist/cjs/components/media-gallery/media-gallery-dialog/no-items-view.js +2 -2
  68. package/dist/cjs/components/media-gallery/media-gallery-dialog/no-items-view.js.map +1 -1
  69. package/dist/cjs/components/media-gallery/media-preview-modal.js +4 -4
  70. package/dist/cjs/components/media-gallery/media-preview-modal.js.map +1 -1
  71. package/dist/cjs/components/media-image/media-image.st.css.js +4 -4
  72. package/dist/cjs/components/media-image/media-image.st.css.js.map +1 -1
  73. package/dist/cjs/components/media-image/overlays/custom-url-overlay.js +2 -2
  74. package/dist/cjs/components/media-image/overlays/custom-url-overlay.js.map +1 -1
  75. package/dist/cjs/components/media-image/overlays/overlay.st.css.js +3 -3
  76. package/dist/cjs/components/media-image/overlays/overlay.st.css.js.map +1 -1
  77. package/dist/cjs/components/media-image/overlays/video-indicator-overlay.js +2 -2
  78. package/dist/cjs/components/media-image/overlays/video-indicator-overlay.js.map +1 -1
  79. package/dist/cjs/components/media-loader/media-loader.st.css.js +3 -3
  80. package/dist/cjs/components/media-loader/media-loader.st.css.js.map +1 -1
  81. package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  82. package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
  83. package/dist/cjs/components/multi-document/cell-multi-document-edit.js +12 -12
  84. package/dist/cjs/components/multi-document/cell-multi-document-edit.js.map +1 -1
  85. package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js +3 -3
  86. package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
  87. package/dist/cjs/components/multi-document/cell-multi-document-view.js +2 -2
  88. package/dist/cjs/components/multi-document/cell-multi-document-view.js.map +1 -1
  89. package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
  90. package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  91. package/dist/cjs/components/reference/cell-multi-reference-input.js +14 -44
  92. package/dist/cjs/components/reference/cell-multi-reference-input.js.map +1 -1
  93. package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js +2 -2
  94. package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
  95. package/dist/cjs/components/reference/cell-reference-input.js +15 -45
  96. package/dist/cjs/components/reference/cell-reference-input.js.map +1 -1
  97. package/dist/cjs/components/reference/cell-reference-input.st.css.js +3 -3
  98. package/dist/cjs/components/reference/cell-reference-input.st.css.js.map +1 -1
  99. package/dist/cjs/components/reference/form-multi-reference.js +191 -0
  100. package/dist/cjs/components/reference/form-multi-reference.js.map +1 -0
  101. package/dist/cjs/components/reference/form-reference.js +188 -0
  102. package/dist/cjs/components/reference/form-reference.js.map +1 -0
  103. package/dist/cjs/components/reference/index.js +12 -0
  104. package/dist/cjs/components/reference/index.js.map +1 -1
  105. package/dist/cjs/components/reference/reference-dropdown-footer.js +65 -0
  106. package/dist/cjs/components/reference/reference-dropdown-footer.js.map +1 -0
  107. package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +4 -4
  108. package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
  109. package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
  110. package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
  111. package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
  112. package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
  113. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
  114. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  115. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
  116. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
  117. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.js +3 -3
  118. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.js.map +1 -1
  119. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
  120. package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
  121. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +7 -7
  122. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
  123. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +5 -5
  124. package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  125. package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
  126. package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
  127. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
  128. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
  129. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
  130. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
  131. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/align-dropdown.js +5 -5
  132. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/align-dropdown.js.map +1 -1
  133. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/link-button.js +2 -2
  134. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/link-button.js.map +1 -1
  135. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.js +3 -3
  136. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.js.map +1 -1
  137. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
  138. package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
  139. package/dist/cjs/components/text/text-view.st.css.js +3 -3
  140. package/dist/cjs/components/text/text-view.st.css.js.map +1 -1
  141. package/dist/cjs/components/time-input/form-time-input.js +6 -4
  142. package/dist/cjs/components/time-input/form-time-input.js.map +1 -1
  143. package/dist/cjs/components/time-input/form-time.js +20 -5
  144. package/dist/cjs/components/time-input/form-time.js.map +1 -1
  145. package/dist/cjs/components/url/form-url.js +2 -2
  146. package/dist/cjs/components/url/form-url.js.map +1 -1
  147. package/dist/cjs/components/url/url-view.js +2 -2
  148. package/dist/cjs/components/url/url-view.js.map +1 -1
  149. package/dist/cjs/components/video/cell-video-edit.js +7 -7
  150. package/dist/cjs/components/video/cell-video-edit.js.map +1 -1
  151. package/dist/cjs/components/video/form-video.js +6 -6
  152. package/dist/cjs/components/video/form-video.js.map +1 -1
  153. package/dist/cjs/components/video/video-view-field.js +3 -3
  154. package/dist/cjs/components/video/video-view-field.js.map +1 -1
  155. package/dist/cjs/providers/PatternsFieldsAppContainer.js +1 -1
  156. package/dist/cjs/providers/PatternsFieldsAppContainer.js.map +1 -1
  157. package/dist/cjs/styles.global.css +1 -1
  158. package/dist/cjs/utils/get-image-url.js +24 -4
  159. package/dist/cjs/utils/get-image-url.js.map +1 -1
  160. package/dist/esm/components/address/input/address-input.st.css.js +2 -2
  161. package/dist/esm/components/address/view/cell-address-view.js +1 -1
  162. package/dist/esm/components/address/view/cell-address-view.js.map +1 -1
  163. package/dist/esm/components/audio/actions/actions-button/actions-button.js +1 -1
  164. package/dist/esm/components/audio/actions/actions-button/actions-button.js.map +1 -1
  165. package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js +2 -2
  166. package/dist/esm/components/audio/actions/audio-actions.js +1 -1
  167. package/dist/esm/components/audio/actions/audio-actions.js.map +1 -1
  168. package/dist/esm/components/audio/audio-field/audio-view.js +1 -1
  169. package/dist/esm/components/audio/audio-field/audio-view.js.map +1 -1
  170. package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js +2 -2
  171. package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
  172. package/dist/esm/components/audio/audio-player/audio-player.st.css.js.map +1 -1
  173. package/dist/esm/components/audio/cell-audio-edit.js +1 -1
  174. package/dist/esm/components/audio/cell-audio-edit.js.map +1 -1
  175. package/dist/esm/components/audio/cell-audio-view.js +1 -1
  176. package/dist/esm/components/audio/cell-audio-view.js.map +1 -1
  177. package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
  178. package/dist/esm/components/color-view/color-view.st.css.js +2 -2
  179. package/dist/esm/components/color-view/color-view.st.css.js.map +1 -1
  180. package/dist/esm/components/date-input/date-utils.js +15 -2
  181. package/dist/esm/components/date-input/date-utils.js.map +1 -1
  182. package/dist/esm/components/date-input/form-date-input.js +16 -12
  183. package/dist/esm/components/date-input/form-date-input.js.map +1 -1
  184. package/dist/esm/components/datetime-input/form-date-time.js +8 -3
  185. package/dist/esm/components/datetime-input/form-date-time.js.map +1 -1
  186. package/dist/esm/components/delete-dialog/delete-dialog.st.css.js +2 -2
  187. package/dist/esm/components/document/cell-document-edit.js +1 -1
  188. package/dist/esm/components/document/cell-document-edit.js.map +1 -1
  189. package/dist/esm/components/document/cell-document-view.js +1 -1
  190. package/dist/esm/components/document/cell-document-view.js.map +1 -1
  191. package/dist/esm/components/document/document-control.js +1 -1
  192. package/dist/esm/components/document/document-control.js.map +1 -1
  193. package/dist/esm/components/document/document-view.js +1 -1
  194. package/dist/esm/components/document/document-view.js.map +1 -1
  195. package/dist/esm/components/document/form-document-field.st.css.js +2 -2
  196. package/dist/esm/components/exclamation/exclamation.js +1 -1
  197. package/dist/esm/components/exclamation/exclamation.js.map +1 -1
  198. package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
  199. package/dist/esm/components/exclamation/exclamation.st.css.js.map +1 -1
  200. package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
  201. package/dist/esm/components/image/cell-image-edit.js +1 -1
  202. package/dist/esm/components/image/cell-image-edit.js.map +1 -1
  203. package/dist/esm/components/image/thumbnail-replace-overlay.js +1 -1
  204. package/dist/esm/components/image/thumbnail-replace-overlay.js.map +1 -1
  205. package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
  206. package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
  207. package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
  208. package/dist/esm/components/media-control/paste-url-button.st.css.js.map +1 -1
  209. package/dist/esm/components/media-gallery/cell-media-gallery-edit.js +1 -1
  210. package/dist/esm/components/media-gallery/cell-media-gallery-edit.js.map +1 -1
  211. package/dist/esm/components/media-gallery/form-media-gallery-field.js +1 -1
  212. package/dist/esm/components/media-gallery/form-media-gallery-field.js.map +1 -1
  213. package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
  214. package/dist/esm/components/media-gallery/media-gallery-dialog/add-media-button.js +1 -1
  215. package/dist/esm/components/media-gallery/media-gallery-dialog/add-media-button.js.map +1 -1
  216. package/dist/esm/components/media-gallery/media-gallery-dialog/no-items-view.js +1 -1
  217. package/dist/esm/components/media-gallery/media-gallery-dialog/no-items-view.js.map +1 -1
  218. package/dist/esm/components/media-gallery/media-preview-modal.js +1 -1
  219. package/dist/esm/components/media-gallery/media-preview-modal.js.map +1 -1
  220. package/dist/esm/components/media-image/media-image.st.css.js +3 -3
  221. package/dist/esm/components/media-image/overlays/custom-url-overlay.js +1 -1
  222. package/dist/esm/components/media-image/overlays/custom-url-overlay.js.map +1 -1
  223. package/dist/esm/components/media-image/overlays/overlay.st.css.js +2 -2
  224. package/dist/esm/components/media-image/overlays/overlay.st.css.js.map +1 -1
  225. package/dist/esm/components/media-image/overlays/video-indicator-overlay.js +1 -1
  226. package/dist/esm/components/media-image/overlays/video-indicator-overlay.js.map +1 -1
  227. package/dist/esm/components/media-loader/media-loader.st.css.js +2 -2
  228. package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
  229. package/dist/esm/components/multi-document/cell-multi-document-edit.js +1 -1
  230. package/dist/esm/components/multi-document/cell-multi-document-edit.js.map +1 -1
  231. package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js +2 -2
  232. package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
  233. package/dist/esm/components/multi-document/cell-multi-document-view.js +1 -1
  234. package/dist/esm/components/multi-document/cell-multi-document-view.js.map +1 -1
  235. package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js +2 -2
  236. package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
  237. package/dist/esm/components/reference/cell-multi-reference-input.js +8 -15
  238. package/dist/esm/components/reference/cell-multi-reference-input.js.map +1 -1
  239. package/dist/esm/components/reference/cell-multi-reference-input.st.css.js +2 -2
  240. package/dist/esm/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
  241. package/dist/esm/components/reference/cell-reference-input.js +9 -16
  242. package/dist/esm/components/reference/cell-reference-input.js.map +1 -1
  243. package/dist/esm/components/reference/cell-reference-input.st.css.js +2 -2
  244. package/dist/esm/components/reference/form-multi-reference.js +98 -0
  245. package/dist/esm/components/reference/form-multi-reference.js.map +1 -0
  246. package/dist/esm/components/reference/form-reference.js +96 -0
  247. package/dist/esm/components/reference/form-reference.js.map +1 -0
  248. package/dist/esm/components/reference/index.js +2 -0
  249. package/dist/esm/components/reference/index.js.map +1 -1
  250. package/dist/esm/components/reference/reference-dropdown-footer.js +28 -0
  251. package/dist/esm/components/reference/reference-dropdown-footer.js.map +1 -0
  252. package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +2 -2
  253. package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
  254. package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +2 -2
  255. package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
  256. package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
  257. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +2 -2
  258. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
  259. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +2 -2
  260. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
  261. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.js +1 -1
  262. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.js.map +1 -1
  263. package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
  264. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +2 -2
  265. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +2 -2
  266. package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
  267. package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +2 -2
  268. package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
  269. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +2 -2
  270. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +2 -2
  271. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/align-dropdown.js +1 -1
  272. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/align-dropdown.js.map +1 -1
  273. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/link-button.js +1 -1
  274. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/link-button.js.map +1 -1
  275. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.js +1 -1
  276. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.js.map +1 -1
  277. package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
  278. package/dist/esm/components/text/text-view.st.css.js +2 -2
  279. package/dist/esm/components/text/text-view.st.css.js.map +1 -1
  280. package/dist/esm/components/time-input/form-time-input.js +3 -2
  281. package/dist/esm/components/time-input/form-time-input.js.map +1 -1
  282. package/dist/esm/components/time-input/form-time.js +10 -2
  283. package/dist/esm/components/time-input/form-time.js.map +1 -1
  284. package/dist/esm/components/url/form-url.js +1 -1
  285. package/dist/esm/components/url/form-url.js.map +1 -1
  286. package/dist/esm/components/url/url-view.js +1 -1
  287. package/dist/esm/components/url/url-view.js.map +1 -1
  288. package/dist/esm/components/video/cell-video-edit.js +1 -1
  289. package/dist/esm/components/video/cell-video-edit.js.map +1 -1
  290. package/dist/esm/components/video/form-video.js +1 -1
  291. package/dist/esm/components/video/form-video.js.map +1 -1
  292. package/dist/esm/components/video/video-view-field.js +1 -1
  293. package/dist/esm/components/video/video-view-field.js.map +1 -1
  294. package/dist/esm/providers/PatternsFieldsAppContainer.js +1 -1
  295. package/dist/esm/providers/PatternsFieldsAppContainer.js.map +1 -1
  296. package/dist/esm/styles.global.css +1 -1
  297. package/dist/esm/utils/get-image-url.js +26 -4
  298. package/dist/esm/utils/get-image-url.js.map +1 -1
  299. package/dist/types/components/audio/audio-player/audio-player.st.css.d.ts.map +1 -1
  300. package/dist/types/components/color-view/color-view.st.css.d.ts.map +1 -1
  301. package/dist/types/components/date-input/date-utils.d.ts +2 -2
  302. package/dist/types/components/date-input/date-utils.d.ts.map +1 -1
  303. package/dist/types/components/date-input/form-date-input.d.ts.map +1 -1
  304. package/dist/types/components/datetime-input/form-date-time.d.ts.map +1 -1
  305. package/dist/types/components/exclamation/exclamation.st.css.d.ts.map +1 -1
  306. package/dist/types/components/media-control/paste-url-button.st.css.d.ts.map +1 -1
  307. package/dist/types/components/media-image/overlays/overlay.st.css.d.ts.map +1 -1
  308. package/dist/types/components/multi-document/cell-multi-document-edit.st.css.d.ts.map +1 -1
  309. package/dist/types/components/multi-document/multi-document-input/form-multi-document.st.css.d.ts.map +1 -1
  310. package/dist/types/components/reference/cell-multi-reference-input.d.ts.map +1 -1
  311. package/dist/types/components/reference/cell-multi-reference-input.st.css.d.ts.map +1 -1
  312. package/dist/types/components/reference/cell-reference-input.d.ts.map +1 -1
  313. package/dist/types/components/reference/form-multi-reference.d.ts +29 -0
  314. package/dist/types/components/reference/form-multi-reference.d.ts.map +1 -0
  315. package/dist/types/components/reference/form-reference.d.ts +33 -0
  316. package/dist/types/components/reference/form-reference.d.ts.map +1 -0
  317. package/dist/types/components/reference/index.d.ts +2 -0
  318. package/dist/types/components/reference/index.d.ts.map +1 -1
  319. package/dist/types/components/reference/reference-dropdown-footer.d.ts +16 -0
  320. package/dist/types/components/reference/reference-dropdown-footer.d.ts.map +1 -0
  321. package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.d.ts.map +1 -1
  322. package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.d.ts.map +1 -1
  323. package/dist/types/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.d.ts.map +1 -1
  324. package/dist/types/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.d.ts.map +1 -1
  325. package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
  326. package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.d.ts.map +1 -1
  327. package/dist/types/components/text/text-view.st.css.d.ts.map +1 -1
  328. package/dist/types/components/time-input/form-time-input.d.ts +6 -1
  329. package/dist/types/components/time-input/form-time-input.d.ts.map +1 -1
  330. package/dist/types/components/time-input/form-time.d.ts.map +1 -1
  331. package/dist/types/utils/get-image-url.d.ts.map +1 -1
  332. package/package.json +7 -7
  333. package/src/__tests__/components/date-input/form-date-input.spec.tsx +23 -0
  334. package/src/__tests__/components/datetime-input/form-date-time.spec.tsx +15 -0
  335. package/src/__tests__/components/image/form-image-input.spec.tsx +10 -0
  336. package/src/__tests__/components/reference/form-multi-reference.spec.tsx +254 -0
  337. package/src/__tests__/components/reference/form-reference.spec.tsx +245 -0
  338. package/src/__tests__/components/time-input/form-time.spec.tsx +16 -0
  339. package/src/__tests__/utils/get-image-url.spec.ts +48 -0
  340. package/src/components/address/input/address-input.st.css.ts +2 -2
  341. package/src/components/address/view/cell-address-view.tsx +1 -1
  342. package/src/components/audio/actions/actions-button/actions-button.tsx +1 -1
  343. package/src/components/audio/actions/actions-menu/actions-menu.st.css.ts +2 -2
  344. package/src/components/audio/actions/audio-actions.tsx +1 -1
  345. package/src/components/audio/audio-field/audio-view.tsx +1 -1
  346. package/src/components/audio/audio-field/form-audio-field.st.css.ts +2 -2
  347. package/src/components/audio/audio-player/audio-player.st.css.ts +2 -2
  348. package/src/components/audio/cell-audio-edit.tsx +1 -1
  349. package/src/components/audio/cell-audio-view.tsx +1 -1
  350. package/src/components/color-view/cell-color-view.st.css.ts +2 -2
  351. package/src/components/color-view/color-view.st.css.ts +2 -2
  352. package/src/components/date-input/date-utils.ts +21 -4
  353. package/src/components/date-input/form-date-input.tsx +17 -14
  354. package/src/components/datetime-input/form-date-time.tsx +8 -3
  355. package/src/components/delete-dialog/delete-dialog.st.css.ts +2 -2
  356. package/src/components/document/cell-document-edit.tsx +1 -1
  357. package/src/components/document/cell-document-view.tsx +1 -1
  358. package/src/components/document/document-control.tsx +1 -1
  359. package/src/components/document/document-view.tsx +1 -1
  360. package/src/components/document/form-document-field.st.css.ts +2 -2
  361. package/src/components/exclamation/exclamation.st.css.ts +2 -2
  362. package/src/components/exclamation/exclamation.tsx +1 -1
  363. package/src/components/highlighted-text/highlighted-text.st.css.ts +3 -3
  364. package/src/components/image/cell-image-edit.tsx +1 -1
  365. package/src/components/image/thumbnail-replace-overlay.st.css.ts +2 -2
  366. package/src/components/image/thumbnail-replace-overlay.tsx +1 -1
  367. package/src/components/media-control/cell-media-edit-shell.st.css.ts +2 -2
  368. package/src/components/media-control/paste-url-button.st.css.ts +2 -2
  369. package/src/components/media-gallery/cell-media-gallery-edit.tsx +1 -1
  370. package/src/components/media-gallery/form-media-gallery-field.st.css.ts +2 -2
  371. package/src/components/media-gallery/form-media-gallery-field.tsx +1 -1
  372. package/src/components/media-gallery/media-gallery-dialog/add-media-button.tsx +1 -1
  373. package/src/components/media-gallery/media-gallery-dialog/no-items-view.tsx +1 -1
  374. package/src/components/media-gallery/media-preview-modal.tsx +1 -1
  375. package/src/components/media-image/media-image.st.css.ts +3 -3
  376. package/src/components/media-image/overlays/custom-url-overlay.tsx +1 -1
  377. package/src/components/media-image/overlays/overlay.st.css.ts +2 -2
  378. package/src/components/media-image/overlays/video-indicator-overlay.tsx +1 -1
  379. package/src/components/media-loader/media-loader.st.css.ts +2 -2
  380. package/src/components/media-tag/web-media-tag/media-tag.st.css.ts +2 -2
  381. package/src/components/multi-document/cell-multi-document-edit.st.css.ts +2 -2
  382. package/src/components/multi-document/cell-multi-document-edit.tsx +1 -1
  383. package/src/components/multi-document/cell-multi-document-view.tsx +1 -1
  384. package/src/components/multi-document/multi-document-input/form-multi-document.st.css.ts +2 -2
  385. package/src/components/reference/cell-multi-reference-input.st.css.ts +2 -2
  386. package/src/components/reference/cell-multi-reference-input.tsx +8 -29
  387. package/src/components/reference/cell-reference-input.st.css.ts +2 -2
  388. package/src/components/reference/cell-reference-input.tsx +9 -31
  389. package/src/components/reference/form-multi-reference.tsx +234 -0
  390. package/src/components/reference/form-reference.tsx +211 -0
  391. package/src/components/reference/index.ts +2 -0
  392. package/src/components/reference/reference-dropdown-footer.tsx +51 -0
  393. package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
  394. package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +2 -2
  395. package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts +2 -2
  396. package/src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
  397. package/src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts +2 -2
  398. package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts +2 -2
  399. package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.tsx +1 -1
  400. package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts +2 -2
  401. package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts +2 -2
  402. package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts +2 -2
  403. package/src/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.ts +2 -2
  404. package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +2 -2
  405. package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/align-dropdown.tsx +1 -1
  406. package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/link-button.tsx +1 -1
  407. package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts +2 -2
  408. package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.tsx +1 -1
  409. package/src/components/text/text-view.st.css.ts +2 -2
  410. package/src/components/time-input/form-time-input.tsx +7 -2
  411. package/src/components/time-input/form-time.tsx +12 -1
  412. package/src/components/url/form-url.tsx +1 -1
  413. package/src/components/url/url-view.tsx +1 -1
  414. package/src/components/video/cell-video-edit.tsx +1 -1
  415. package/src/components/video/form-video.tsx +1 -1
  416. package/src/components/video/video-view-field.tsx +1 -1
  417. package/src/providers/PatternsFieldsAppContainer.ts +1 -1
  418. package/src/styles.global.css +1 -1
  419. package/src/utils/get-image-url.ts +31 -4
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_useTranslations","_referenceAvatar","_cellMultiReferenceInputStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ROW_HEIGHT","MAX_NUM_ROWS","CellMultiReferenceInput","exports","React","forwardRef","items","selectedItems","value","onChange","onSelect","onRemoveTag","onBlur","onKeyDown","infiniteScroll","hasMore","loadMore","fixedFooter","onOpenCollection","autoOpen","inputRef","dataHook","ref","useTranslations","msRef","useRef","wrapperRef","useImperativeHandle","focus","_msRef$current","current","hideOptions","_msRef$current2","useEffect","_msRef$current3","requestAnimationFrame","_msRef$current4","showOptions","_wrapperRef$current","el","querySelector","untitled","tags","useMemo","map","item","id","label","name","thumb","createElement","ReferenceAvatar","image","size","__self","__source","fileName","lineNumber","columnNumber","options","listItemSelectBuilder","title","prefix","ellipsis","handleChange","useCallback","target","handleSelect","option","find","String","handleRemoveTag","combinedFooter","undefined","onMouseDown","preventDefault","Divider","ListItemAction","onClick","_msRef$current5","className","st","classes","root","stopPropagation","onKeyDownCapture","MultiSelect","instance","border","predicate","placeholder","length","emptyStateMessage","maxHeightPixels","popoverProps","appendTo","flip","fixed","placement","zIndex","displayName"],"sources":["../../../../src/components/reference/cell-multi-reference-input.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport {\n Divider,\n ListItemAction,\n MultiSelect,\n listItemSelectBuilder,\n} from '@wix/design-system';\nimport { useTranslations } from '../../hooks/use-translations';\nimport { ReferenceAvatar } from './reference-avatar';\nimport type { CellMultiReferenceItem } from './cell-multi-reference-view';\nimport { st, classes } from './cell-multi-reference-input.st.css.js';\n\nexport type { CellMultiReferenceItem };\n\nexport interface CellMultiReferenceInputHandle {\n focus: () => void;\n hideOptions: () => void;\n}\n\nexport interface CellMultiReferenceInputProps {\n /** Dropdown options — already filtered/paginated by the caller. */\n items: CellMultiReferenceItem[];\n /** Currently selected references, rendered as removable chips. */\n selectedItems: CellMultiReferenceItem[];\n /** Text shown in the search input. */\n value: string;\n onChange: (value: string) => void;\n onSelect: (item: CellMultiReferenceItem) => void;\n onRemoveTag: (id: string) => void;\n onBlur?: () => void;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n infiniteScroll?: boolean;\n hasMore?: boolean;\n loadMore?: () => void;\n fixedFooter?: React.ReactNode;\n /** When provided, renders an \"Open Collection\" action at the bottom of the dropdown. */\n onOpenCollection?: () => void;\n /** Open dropdown immediately on mount (single-click / type-to-edit triggers). */\n autoOpen?: boolean;\n inputRef?: React.MutableRefObject<{ focus: () => void } | null | undefined>;\n dataHook?: string;\n}\n\nconst ROW_HEIGHT = 30;\nconst MAX_NUM_ROWS = 7;\n\ninterface MultiSelectHandle {\n focus?: () => void;\n showOptions?: () => void;\n hideOptions?: () => void;\n}\n\nexport const CellMultiReferenceInput = React.forwardRef<\n CellMultiReferenceInputHandle,\n CellMultiReferenceInputProps\n>(\n (\n {\n items,\n selectedItems,\n value,\n onChange,\n onSelect,\n onRemoveTag,\n onBlur,\n onKeyDown,\n infiniteScroll,\n hasMore,\n loadMore,\n fixedFooter,\n onOpenCollection,\n autoOpen,\n inputRef,\n dataHook,\n },\n ref,\n ) => {\n const { t } = useTranslations();\n const msRef = useRef<MultiSelectHandle | null>(null);\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n React.useImperativeHandle(ref, () => ({\n focus: () => msRef.current?.focus?.(),\n hideOptions: () => msRef.current?.hideOptions?.(),\n }));\n\n useEffect(() => {\n if (autoOpen) {\n msRef.current?.focus?.();\n requestAnimationFrame(() => msRef.current?.showOptions?.());\n }\n // Intentionally run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Expose the MultiSelect input element to the framework's inputRef so\n // type-to-edit + framework-level focus management work.\n useEffect(() => {\n if (!inputRef) {\n return;\n }\n const el = wrapperRef.current?.querySelector<HTMLInputElement>('input');\n if (el) {\n inputRef.current = { focus: () => el.focus() };\n }\n }, [inputRef]);\n\n const untitled = t('patterns-fields.reference.untitled');\n\n const tags = useMemo(\n () =>\n selectedItems.map((item) => ({\n id: item.id,\n dataHook: 'multi-reference-edit-tag',\n label: item.name || untitled,\n thumb: (\n <ReferenceAvatar\n name={item.name || untitled}\n image={item.image}\n size=\"size18\"\n />\n ),\n })),\n [selectedItems, untitled],\n );\n\n const options = useMemo(\n () =>\n items.map((item) =>\n listItemSelectBuilder({\n id: item.id,\n title: item.name || untitled,\n label: item.name || untitled,\n prefix: (\n <ReferenceAvatar\n name={item.name || untitled}\n image={item.image}\n />\n ),\n size: 'small',\n ellipsis: true,\n }),\n ),\n [items, untitled],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => onChange(e.target.value),\n [onChange],\n );\n\n const handleSelect = useCallback(\n (option: { id: string | number }) => {\n const item = items.find((i) => i.id === String(option.id));\n if (item) {\n onSelect(item);\n }\n },\n [items, onSelect],\n );\n\n const handleRemoveTag = useCallback(\n (id: string | number) => onRemoveTag(String(id)),\n [onRemoveTag],\n );\n\n const combinedFooter = useMemo(() => {\n if (!fixedFooter && !onOpenCollection) {\n return undefined;\n }\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onMouseDown={(e) => e.preventDefault()}>\n {fixedFooter}\n {onOpenCollection && <Divider />}\n {onOpenCollection && (\n <ListItemAction\n title={t('patterns-fields.reference.open_collection')}\n size=\"small\"\n onClick={() => {\n msRef.current?.hideOptions?.();\n onOpenCollection();\n }}\n dataHook=\"reference-open-collection\"\n />\n )}\n </div>\n );\n }, [fixedFooter, onOpenCollection, t]);\n\n return (\n // Prevent EditableCell's row click/dblclick handlers from firing when\n // the user interacts with the input or dropdown.\n <div\n ref={wrapperRef}\n className={st(classes.root)}\n data-hook={dataHook}\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.stopPropagation()}\n // Capture phase so keys (e.g. Escape) can be intercepted before the\n // WDS MultiSelect handles and stops them on the inner input.\n onKeyDownCapture={onKeyDown}\n >\n <MultiSelect\n ref={(instance: MultiSelectHandle | null) => {\n msRef.current = instance;\n }}\n dataHook=\"multi-reference-input-multiselect\"\n size=\"small\"\n border=\"none\"\n tags={tags}\n options={options}\n predicate={() => true}\n value={value}\n onChange={handleChange}\n onSelect={handleSelect}\n onRemoveTag={handleRemoveTag}\n onBlur={onBlur}\n placeholder={\n selectedItems.length === 0\n ? t('auto-patterns.fields.select_placeholder')\n : ''\n }\n emptyStateMessage={t('auto-patterns.fields.no_results_found')}\n maxHeightPixels={ROW_HEIGHT * MAX_NUM_ROWS}\n infiniteScroll={infiniteScroll}\n hasMore={hasMore}\n loadMore={loadMore}\n fixedFooter={combinedFooter}\n popoverProps={{\n appendTo: 'window',\n flip: true,\n fixed: false,\n placement: 'bottom-start',\n zIndex: 9999,\n }}\n />\n </div>\n );\n },\n);\n\nCellMultiReferenceInput.displayName = 'CellMultiReferenceInput';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAMA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,6BAAA,GAAAJ,OAAA;AAAqE,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAA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,cAAe;MAC5BsB,YAAY,EAAE;QACZC,QAAQ,EAAE,QAAQ;QAClBC,IAAI,EAAE,IAAI;QACVC,KAAK,EAAE,KAAK;QACZC,SAAS,EAAE,cAAc;QACzBC,MAAM,EAAE;MACV,CAAE;MAAA7C,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAA5E,YAAA;QAAA6E,UAAA;QAAAC,YAAA;MAAA;IAAA,CACH,CACE;EAAC;AAEV,CACF,CAAC;AAEDxD,uBAAuB,CAACkG,WAAW,GAAG,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_useTranslations","_referenceAvatar","_referenceDropdownFooter","_cellMultiReferenceInputStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ROW_HEIGHT","MAX_NUM_ROWS","CellMultiReferenceInput","exports","React","forwardRef","items","selectedItems","value","onChange","onSelect","onRemoveTag","onBlur","onKeyDown","infiniteScroll","hasMore","loadMore","fixedFooter","onOpenCollection","autoOpen","inputRef","dataHook","ref","useTranslations","msRef","useRef","wrapperRef","useImperativeHandle","focus","_msRef$current","current","hideOptions","_msRef$current2","useEffect","_msRef$current3","requestAnimationFrame","_msRef$current4","showOptions","_wrapperRef$current","el","querySelector","untitled","tags","useMemo","map","item","id","label","name","thumb","createElement","ReferenceAvatar","image","size","__self","__source","fileName","lineNumber","columnNumber","options","listItemSelectBuilder","title","prefix","ellipsis","handleChange","useCallback","target","handleSelect","option","find","String","handleRemoveTag","_msRef$current5","combinedFooter","useReferenceDropdownFooter","className","st","classes","root","onClick","stopPropagation","onMouseDown","onKeyDownCapture","MultiSelect","instance","border","predicate","placeholder","length","emptyStateMessage","maxHeightPixels","popoverProps","appendTo","flip","fixed","placement","zIndex","displayName"],"sources":["../../../../src/components/reference/cell-multi-reference-input.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { MultiSelect, listItemSelectBuilder } from '@wix/design-system';\nimport { useTranslations } from '../../hooks/use-translations';\nimport { ReferenceAvatar } from './reference-avatar';\nimport { useReferenceDropdownFooter } from './reference-dropdown-footer';\nimport type { CellMultiReferenceItem } from './cell-multi-reference-view';\nimport { st, classes } from './cell-multi-reference-input.st.css.js';\n\nexport type { CellMultiReferenceItem };\n\nexport interface CellMultiReferenceInputHandle {\n focus: () => void;\n hideOptions: () => void;\n}\n\nexport interface CellMultiReferenceInputProps {\n /** Dropdown options — already filtered/paginated by the caller. */\n items: CellMultiReferenceItem[];\n /** Currently selected references, rendered as removable chips. */\n selectedItems: CellMultiReferenceItem[];\n /** Text shown in the search input. */\n value: string;\n onChange: (value: string) => void;\n onSelect: (item: CellMultiReferenceItem) => void;\n onRemoveTag: (id: string) => void;\n onBlur?: () => void;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n infiniteScroll?: boolean;\n hasMore?: boolean;\n loadMore?: () => void;\n fixedFooter?: React.ReactNode;\n /** When provided, renders an \"Open Collection\" action at the bottom of the dropdown. */\n onOpenCollection?: () => void;\n /** Open dropdown immediately on mount (single-click / type-to-edit triggers). */\n autoOpen?: boolean;\n inputRef?: React.MutableRefObject<{ focus: () => void } | null | undefined>;\n dataHook?: string;\n}\n\nconst ROW_HEIGHT = 30;\nconst MAX_NUM_ROWS = 7;\n\ninterface MultiSelectHandle {\n focus?: () => void;\n showOptions?: () => void;\n hideOptions?: () => void;\n}\n\nexport const CellMultiReferenceInput = React.forwardRef<\n CellMultiReferenceInputHandle,\n CellMultiReferenceInputProps\n>(\n (\n {\n items,\n selectedItems,\n value,\n onChange,\n onSelect,\n onRemoveTag,\n onBlur,\n onKeyDown,\n infiniteScroll,\n hasMore,\n loadMore,\n fixedFooter,\n onOpenCollection,\n autoOpen,\n inputRef,\n dataHook,\n },\n ref,\n ) => {\n const { t } = useTranslations();\n const msRef = useRef<MultiSelectHandle | null>(null);\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n React.useImperativeHandle(ref, () => ({\n focus: () => msRef.current?.focus?.(),\n hideOptions: () => msRef.current?.hideOptions?.(),\n }));\n\n useEffect(() => {\n if (autoOpen) {\n msRef.current?.focus?.();\n requestAnimationFrame(() => msRef.current?.showOptions?.());\n }\n // Intentionally run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Expose the MultiSelect input element to the framework's inputRef so\n // type-to-edit + framework-level focus management work.\n useEffect(() => {\n if (!inputRef) {\n return;\n }\n const el = wrapperRef.current?.querySelector<HTMLInputElement>('input');\n if (el) {\n inputRef.current = { focus: () => el.focus() };\n }\n }, [inputRef]);\n\n const untitled = t('patterns-fields.reference.untitled');\n\n const tags = useMemo(\n () =>\n selectedItems.map((item) => ({\n id: item.id,\n dataHook: 'multi-reference-edit-tag',\n label: item.name || untitled,\n thumb: (\n <ReferenceAvatar\n name={item.name || untitled}\n image={item.image}\n size=\"size18\"\n />\n ),\n })),\n [selectedItems, untitled],\n );\n\n const options = useMemo(\n () =>\n items.map((item) =>\n listItemSelectBuilder({\n id: item.id,\n title: item.name || untitled,\n label: item.name || untitled,\n prefix: (\n <ReferenceAvatar\n name={item.name || untitled}\n image={item.image}\n />\n ),\n size: 'small',\n ellipsis: true,\n }),\n ),\n [items, untitled],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => onChange(e.target.value),\n [onChange],\n );\n\n const handleSelect = useCallback(\n (option: { id: string | number }) => {\n const item = items.find((i) => i.id === String(option.id));\n if (item) {\n onSelect(item);\n }\n },\n [items, onSelect],\n );\n\n const handleRemoveTag = useCallback(\n (id: string | number) => onRemoveTag(String(id)),\n [onRemoveTag],\n );\n\n const hideOptions = useCallback(() => msRef.current?.hideOptions?.(), []);\n const combinedFooter = useReferenceDropdownFooter({\n fixedFooter,\n onOpenCollection,\n hideOptions,\n });\n\n return (\n // Prevent EditableCell's row click/dblclick handlers from firing when\n // the user interacts with the input or dropdown.\n <div\n ref={wrapperRef}\n className={st(classes.root)}\n data-hook={dataHook}\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.stopPropagation()}\n // Capture phase so keys (e.g. Escape) can be intercepted before the\n // WDS MultiSelect handles and stops them on the inner input.\n onKeyDownCapture={onKeyDown}\n >\n <MultiSelect\n ref={(instance: MultiSelectHandle | null) => {\n msRef.current = instance;\n }}\n dataHook=\"multi-reference-input-multiselect\"\n size=\"small\"\n border=\"none\"\n tags={tags}\n options={options}\n predicate={() => true}\n value={value}\n onChange={handleChange}\n onSelect={handleSelect}\n onRemoveTag={handleRemoveTag}\n onBlur={onBlur}\n placeholder={\n selectedItems.length === 0\n ? t('auto-patterns.fields.select_placeholder')\n : ''\n }\n emptyStateMessage={t('auto-patterns.fields.no_results_found')}\n maxHeightPixels={ROW_HEIGHT * MAX_NUM_ROWS}\n infiniteScroll={infiniteScroll}\n hasMore={hasMore}\n loadMore={loadMore}\n fixedFooter={combinedFooter}\n popoverProps={{\n appendTo: 'window',\n flip: true,\n fixed: false,\n placement: 'bottom-start',\n zIndex: 9999,\n }}\n />\n </div>\n );\n },\n);\n\nCellMultiReferenceInput.displayName = 'CellMultiReferenceInput';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAEA,IAAAK,6BAAA,GAAAL,OAAA;AAAqE,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAA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ACF,CAAC;AAEDxD,uBAAuB,CAAC+F,WAAW,GAAG,yBAAyB","ignoreList":[]}
@@ -5,14 +5,14 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "cellmultireferenceinput1139021014";
8
+ var _namespace_ = "cellmultireferenceinput838814131";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "cellmultireferenceinput1139021014__root"
15
+ "root": "cellmultireferenceinput838814131__root"
16
16
  };
17
17
  var keyframes = exports.keyframes = {};
18
18
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/reference/cell-multi-reference-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"cellmultireferenceinput1139021014\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"cellmultireferenceinput1139021014__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-input-border-color\":\"--wds-input-border-color\",\"wds-input-border-color-hover\":\"--wds-input-border-color-hover\",\"wds-input-border-color-focus\":\"--wds-input-border-color-focus\",\"wds-input-background-fill-default\":\"--wds-input-background-fill-default\",\"wds-input-background-fill-hover\":\"--wds-input-background-fill-hover\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,mCAAmC;AACrD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAyC,CAAC;AAChE,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,wBAAwB,EAAC,0BAA0B;EAAC,8BAA8B,EAAC,gCAAgC;EAAC,8BAA8B,EAAC,gCAAgC;EAAC,mCAAmC,EAAC,qCAAqC;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,iCAAiC,EAAC;AAAmC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/reference/cell-multi-reference-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"cellmultireferenceinput838814131\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"cellmultireferenceinput838814131__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-input-border-color\":\"--wds-input-border-color\",\"wds-input-border-color-hover\":\"--wds-input-border-color-hover\",\"wds-input-border-color-focus\":\"--wds-input-border-color-focus\",\"wds-input-background-fill-default\":\"--wds-input-background-fill-default\",\"wds-input-background-fill-hover\":\"--wds-input-background-fill-hover\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,kCAAkC;AACpD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAwC,CAAC;AAC/D,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,wBAAwB,EAAC,0BAA0B;EAAC,8BAA8B,EAAC,gCAAgC;EAAC,8BAA8B,EAAC,gCAAgC;EAAC,mCAAmC,EAAC,qCAAqC;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,iCAAiC,EAAC;AAAmC,CAAC","ignoreList":[]}
@@ -6,6 +6,7 @@ var _react = _interopRequireWildcard(require("react"));
6
6
  var _designSystem = require("@wix/design-system");
7
7
  var _useTranslations = require("../../hooks/use-translations");
8
8
  var _referenceAvatar = require("./reference-avatar");
9
+ var _referenceDropdownFooter = require("./reference-dropdown-footer");
9
10
  var _cellReferenceInputStCss = require("./cell-reference-input.st.css.js");
10
11
  var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/fields/dist/cjs/components/reference/cell-reference-input.tsx";
11
12
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
@@ -43,7 +44,7 @@ const CellReferenceInput = exports.CellReferenceInput = /*#__PURE__*/_react.defa
43
44
  __self: void 0,
44
45
  __source: {
45
46
  fileName: _jsxFileName,
46
- lineNumber: 86,
47
+ lineNumber: 81,
47
48
  columnNumber: 21
48
49
  }
49
50
  })
@@ -71,52 +72,21 @@ const CellReferenceInput = exports.CellReferenceInput = /*#__PURE__*/_react.defa
71
72
  // Intentionally run only on mount
72
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
73
74
  }, []);
74
- const combinedFooter = (0, _react.useMemo)(() => {
75
- if (!fixedFooter && !onOpenCollection) {
76
- return undefined;
77
- }
78
- return (
79
- /*#__PURE__*/
80
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
81
- _react.default.createElement("div", {
82
- onMouseDown: e => e.preventDefault(),
83
- __self: void 0,
84
- __source: {
85
- fileName: _jsxFileName,
86
- lineNumber: 113,
87
- columnNumber: 9
88
- }
89
- }, fixedFooter, onOpenCollection && /*#__PURE__*/_react.default.createElement(_designSystem.Divider, {
90
- __self: void 0,
91
- __source: {
92
- fileName: _jsxFileName,
93
- lineNumber: 115,
94
- columnNumber: 32
95
- }
96
- }), onOpenCollection && /*#__PURE__*/_react.default.createElement(_designSystem.ListItemAction, {
97
- title: t('patterns-fields.reference.open_collection'),
98
- size: "small",
99
- onClick: () => {
100
- var _acRef$current5;
101
- (_acRef$current5 = acRef.current) == null || _acRef$current5.hideOptions == null || _acRef$current5.hideOptions();
102
- onOpenCollection();
103
- },
104
- dataHook: "reference-open-collection",
105
- __self: void 0,
106
- __source: {
107
- fileName: _jsxFileName,
108
- lineNumber: 117,
109
- columnNumber: 13
110
- }
111
- }))
112
- );
113
- }, [fixedFooter, onOpenCollection, t]);
75
+ const hideOptions = (0, _react.useCallback)(() => {
76
+ var _acRef$current5;
77
+ return (_acRef$current5 = acRef.current) == null || _acRef$current5.hideOptions == null ? void 0 : _acRef$current5.hideOptions();
78
+ }, []);
79
+ const combinedFooter = (0, _referenceDropdownFooter.useReferenceDropdownFooter)({
80
+ fixedFooter,
81
+ onOpenCollection,
82
+ hideOptions
83
+ });
114
84
  const prefix = selectedItem && !value ? /*#__PURE__*/_react.default.createElement(_designSystem.Input.Affix, {
115
85
  "data-hook": "reference-input-avatar-prefix",
116
86
  __self: void 0,
117
87
  __source: {
118
88
  fileName: _jsxFileName,
119
- lineNumber: 133,
89
+ lineNumber: 111,
120
90
  columnNumber: 9
121
91
  }
122
92
  }, /*#__PURE__*/_react.default.createElement(_referenceAvatar.ReferenceAvatar, {
@@ -125,7 +95,7 @@ const CellReferenceInput = exports.CellReferenceInput = /*#__PURE__*/_react.defa
125
95
  __self: void 0,
126
96
  __source: {
127
97
  fileName: _jsxFileName,
128
- lineNumber: 134,
98
+ lineNumber: 112,
129
99
  columnNumber: 11
130
100
  }
131
101
  })) : undefined;
@@ -140,7 +110,7 @@ const CellReferenceInput = exports.CellReferenceInput = /*#__PURE__*/_react.defa
140
110
  __self: void 0,
141
111
  __source: {
142
112
  fileName: _jsxFileName,
143
- lineNumber: 144,
113
+ lineNumber: 122,
144
114
  columnNumber: 7
145
115
  }
146
116
  }, /*#__PURE__*/_react.default.createElement(_designSystem.AutoComplete, {
@@ -185,7 +155,7 @@ const CellReferenceInput = exports.CellReferenceInput = /*#__PURE__*/_react.defa
185
155
  __self: void 0,
186
156
  __source: {
187
157
  fileName: _jsxFileName,
188
- lineNumber: 149,
158
+ lineNumber: 127,
189
159
  columnNumber: 9
190
160
  }
191
161
  }))
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_useTranslations","_referenceAvatar","_cellReferenceInputStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ROW_HEIGHT","MAX_NUM_ROWS","CellReferenceInput","exports","React","forwardRef","items","value","selectedItem","onChange","onBlur","onSelect","onClear","onKeyDown","clearButton","infiniteScroll","hasMore","loadMore","fixedFooter","onOpenCollection","autoOpen","inputRef","ref","useTranslations","options","useMemo","map","item","listItemSelectBuilder","id","title","name","size","selected","prefix","createElement","ReferenceAvatar","image","__self","__source","fileName","lineNumber","columnNumber","acRef","useRef","useImperativeHandle","focus","_acRef$current","current","hideOptions","_acRef$current2","useEffect","_acRef$current3","requestAnimationFrame","_acRef$current4","showOptions","combinedFooter","undefined","onMouseDown","preventDefault","Divider","ListItemAction","onClick","_acRef$current5","dataHook","Input","Affix","className","st","classes","root","stopPropagation","AutoComplete","autocomplete","border","wdsOption","find","String","placeholder","showOptionsIfEmptyInput","autoSelect","maxHeightPixels","popoverProps","appendTo","flip","fixed","placement","el","displayName"],"sources":["../../../../src/components/reference/cell-reference-input.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef } from 'react';\nimport {\n AutoComplete,\n Divider,\n Input,\n ListItemAction,\n listItemSelectBuilder,\n} from '@wix/design-system';\nimport { useTranslations } from '../../hooks/use-translations';\nimport { ReferenceAvatar } from './reference-avatar';\nimport { st, classes } from './cell-reference-input.st.css.js';\n\nexport interface CellReferenceItem {\n id: string;\n name: string;\n image?: string;\n}\n\nexport interface CellReferenceInputHandle {\n focus: () => void;\n hideOptions: () => void;\n}\n\nexport interface CellReferenceInputProps {\n /** Raw reference items — options are built internally with listItemSelectBuilder. */\n items: CellReferenceItem[];\n /** Text shown inside the input field (search query or selected item title). */\n value: string;\n /** When a reference is selected and there is no search query, show its avatar inside the input. */\n selectedItem?: CellReferenceItem;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onSelect: (item: CellReferenceItem) => void;\n onBlur?: () => void;\n onClear: () => void;\n onKeyDown: (e: React.KeyboardEvent) => void;\n clearButton?: boolean;\n infiniteScroll?: boolean;\n hasMore?: boolean;\n loadMore?: () => void;\n fixedFooter?: React.ReactNode;\n /** When provided, renders an \"Open Collection\" action at the bottom of the dropdown. */\n onOpenCollection?: () => void;\n /** Open dropdown immediately on mount (type-to-edit / Enter triggers). */\n autoOpen?: boolean;\n inputRef?: React.MutableRefObject<{ focus: () => void } | null | undefined>;\n}\n\nconst ROW_HEIGHT = 30;\nconst MAX_NUM_ROWS = 7;\n\nexport const CellReferenceInput = React.forwardRef<\n CellReferenceInputHandle,\n CellReferenceInputProps\n>(\n (\n {\n items,\n value,\n selectedItem,\n onChange,\n onBlur,\n onSelect,\n onClear,\n onKeyDown,\n clearButton,\n infiniteScroll,\n hasMore,\n loadMore,\n fixedFooter,\n onOpenCollection,\n autoOpen,\n inputRef,\n },\n ref,\n ) => {\n const { t } = useTranslations();\n\n const options = useMemo(\n () =>\n items.map((item) =>\n listItemSelectBuilder({\n id: item.id,\n title: item.name || t('patterns-fields.reference.untitled'),\n size: 'small',\n selected: item.id === selectedItem?.id,\n prefix: <ReferenceAvatar name={item.name} image={item.image} />,\n }),\n ),\n [items, selectedItem?.id, t],\n );\n const acRef = useRef<React.ComponentRef<typeof AutoComplete>>(null);\n\n React.useImperativeHandle(ref, () => ({\n focus: () => acRef.current?.focus?.(),\n hideOptions: () => acRef.current?.hideOptions?.(),\n }));\n\n useEffect(() => {\n if (autoOpen) {\n acRef.current?.focus?.();\n requestAnimationFrame(() => acRef.current?.showOptions?.());\n }\n // Intentionally run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const combinedFooter = useMemo(() => {\n if (!fixedFooter && !onOpenCollection) {\n return undefined;\n }\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onMouseDown={(e) => e.preventDefault()}>\n {fixedFooter}\n {onOpenCollection && <Divider />}\n {onOpenCollection && (\n <ListItemAction\n title={t('patterns-fields.reference.open_collection')}\n size=\"small\"\n onClick={() => {\n acRef.current?.hideOptions?.();\n onOpenCollection();\n }}\n dataHook=\"reference-open-collection\"\n />\n )}\n </div>\n );\n }, [fixedFooter, onOpenCollection, t]);\n\n const prefix =\n selectedItem && !value ? (\n <Input.Affix data-hook=\"reference-input-avatar-prefix\">\n <ReferenceAvatar\n name={selectedItem.name}\n image={selectedItem.image}\n />\n </Input.Affix>\n ) : undefined;\n\n return (\n // Prevent EditableCell's row click/dblclick handlers from firing when\n // the user interacts with the input or dropdown.\n <div\n className={st(classes.root)}\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.stopPropagation()}\n >\n <AutoComplete\n ref={acRef}\n dataHook=\"reference-input-autocomplete\"\n className={st(classes.autocomplete)}\n size=\"small\"\n border=\"none\"\n options={options}\n value={value}\n prefix={prefix}\n onChange={onChange}\n onBlur={onBlur}\n onSelect={(wdsOption: { id: string | number }) => {\n const item = items.find((i) => i.id === String(wdsOption.id));\n if (item) {\n onSelect(item);\n }\n }}\n onClear={onClear}\n onKeyDown={onKeyDown}\n clearButton={clearButton}\n infiniteScroll={infiniteScroll}\n hasMore={hasMore}\n loadMore={loadMore}\n fixedFooter={combinedFooter}\n placeholder={t('auto-patterns.fields.select_placeholder')}\n showOptionsIfEmptyInput\n autoSelect={false}\n maxHeightPixels={ROW_HEIGHT * MAX_NUM_ROWS}\n popoverProps={{\n appendTo: 'window',\n flip: true,\n fixed: false,\n placement: 'bottom-start',\n }}\n inputRef={(el: HTMLInputElement) => {\n if (inputRef) {\n inputRef.current = el;\n }\n }}\n />\n </div>\n );\n },\n);\n\nCellReferenceInput.displayName = 'CellReferenceInput';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAOA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAA+D,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC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;MACZ0C,MAAM,EAAC,MAAM;MACblD,OAAO,EAAEA,OAAQ;MACjBjB,KAAK,EAAEA,KAAM;MACb2B,MAAM,EAAEA,MAAO;MACfzB,QAAQ,EAAEA,QAAS;MACnBC,MAAM,EAAEA,MAAO;MACfC,QAAQ,EAAGgE,SAAkC,IAAK;QAChD,MAAMhD,IAAI,GAAGrB,KAAK,CAACsE,IAAI,CAAExF,CAAC,IAAKA,CAAC,CAACyC,EAAE,KAAKgD,MAAM,CAACF,SAAS,CAAC9C,EAAE,CAAC,CAAC;QAC7D,IAAIF,IAAI,EAAE;UACRhB,QAAQ,CAACgB,IAAI,CAAC;QAChB;MACF,CAAE;MACFf,OAAO,EAAEA,OAAQ;MACjBC,SAAS,EAAEA,SAAU;MACrBC,WAAW,EAAEA,WAAY;MACzBC,cAAc,EAAEA,cAAe;MAC/BC,OAAO,EAAEA,OAAQ;MACjBC,QAAQ,EAAEA,QAAS;MACnBC,WAAW,EAAEsC,cAAe;MAC5BsB,WAAW,EAAEhG,CAAC,CAAC,yCAAyC,CAAE;MAC1DiG,uBAAuB;MACvBC,UAAU,EAAE,KAAM;MAClBC,eAAe,EAAEjF,UAAU,GAAGC,YAAa;MAC3CiF,YAAY,EAAE;QACZC,QAAQ,EAAE,QAAQ;QAClBC,IAAI,EAAE,IAAI;QACVC,KAAK,EAAE,KAAK;QACZC,SAAS,EAAE;MACb,CAAE;MACFjE,QAAQ,EAAGkE,EAAoB,IAAK;QAClC,IAAIlE,QAAQ,EAAE;UACZA,QAAQ,CAAC2B,OAAO,GAAGuC,EAAE;QACvB;MACF,CAAE;MAAAjD,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAA5D,YAAA;QAAA6D,UAAA;QAAAC,YAAA;MAAA;IAAA,CACH,CACE;EAAC;AAEV,CACF,CAAC;AAEDxC,kBAAkB,CAACsF,WAAW,GAAG,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_useTranslations","_referenceAvatar","_referenceDropdownFooter","_cellReferenceInputStCss","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ROW_HEIGHT","MAX_NUM_ROWS","CellReferenceInput","exports","React","forwardRef","items","value","selectedItem","onChange","onBlur","onSelect","onClear","onKeyDown","clearButton","infiniteScroll","hasMore","loadMore","fixedFooter","onOpenCollection","autoOpen","inputRef","ref","useTranslations","options","useMemo","map","item","listItemSelectBuilder","id","title","name","size","selected","prefix","createElement","ReferenceAvatar","image","__self","__source","fileName","lineNumber","columnNumber","acRef","useRef","useImperativeHandle","focus","_acRef$current","current","hideOptions","_acRef$current2","useEffect","_acRef$current3","requestAnimationFrame","_acRef$current4","showOptions","useCallback","_acRef$current5","combinedFooter","useReferenceDropdownFooter","Input","Affix","undefined","className","st","classes","root","onClick","stopPropagation","onMouseDown","AutoComplete","dataHook","autocomplete","border","wdsOption","find","String","placeholder","showOptionsIfEmptyInput","autoSelect","maxHeightPixels","popoverProps","appendTo","flip","fixed","placement","el","displayName"],"sources":["../../../../src/components/reference/cell-reference-input.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { AutoComplete, Input, listItemSelectBuilder } from '@wix/design-system';\nimport { useTranslations } from '../../hooks/use-translations';\nimport { ReferenceAvatar } from './reference-avatar';\nimport { useReferenceDropdownFooter } from './reference-dropdown-footer';\nimport { st, classes } from './cell-reference-input.st.css.js';\n\nexport interface CellReferenceItem {\n id: string;\n name: string;\n image?: string;\n}\n\nexport interface CellReferenceInputHandle {\n focus: () => void;\n hideOptions: () => void;\n}\n\nexport interface CellReferenceInputProps {\n /** Raw reference items — options are built internally with listItemSelectBuilder. */\n items: CellReferenceItem[];\n /** Text shown inside the input field (search query or selected item title). */\n value: string;\n /** When a reference is selected and there is no search query, show its avatar inside the input. */\n selectedItem?: CellReferenceItem;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onSelect: (item: CellReferenceItem) => void;\n onBlur?: () => void;\n onClear: () => void;\n onKeyDown: (e: React.KeyboardEvent) => void;\n clearButton?: boolean;\n infiniteScroll?: boolean;\n hasMore?: boolean;\n loadMore?: () => void;\n fixedFooter?: React.ReactNode;\n /** When provided, renders an \"Open Collection\" action at the bottom of the dropdown. */\n onOpenCollection?: () => void;\n /** Open dropdown immediately on mount (type-to-edit / Enter triggers). */\n autoOpen?: boolean;\n inputRef?: React.MutableRefObject<{ focus: () => void } | null | undefined>;\n}\n\nconst ROW_HEIGHT = 30;\nconst MAX_NUM_ROWS = 7;\n\nexport const CellReferenceInput = React.forwardRef<\n CellReferenceInputHandle,\n CellReferenceInputProps\n>(\n (\n {\n items,\n value,\n selectedItem,\n onChange,\n onBlur,\n onSelect,\n onClear,\n onKeyDown,\n clearButton,\n infiniteScroll,\n hasMore,\n loadMore,\n fixedFooter,\n onOpenCollection,\n autoOpen,\n inputRef,\n },\n ref,\n ) => {\n const { t } = useTranslations();\n\n const options = useMemo(\n () =>\n items.map((item) =>\n listItemSelectBuilder({\n id: item.id,\n title: item.name || t('patterns-fields.reference.untitled'),\n size: 'small',\n selected: item.id === selectedItem?.id,\n prefix: <ReferenceAvatar name={item.name} image={item.image} />,\n }),\n ),\n [items, selectedItem?.id, t],\n );\n const acRef = useRef<React.ComponentRef<typeof AutoComplete>>(null);\n\n React.useImperativeHandle(ref, () => ({\n focus: () => acRef.current?.focus?.(),\n hideOptions: () => acRef.current?.hideOptions?.(),\n }));\n\n useEffect(() => {\n if (autoOpen) {\n acRef.current?.focus?.();\n requestAnimationFrame(() => acRef.current?.showOptions?.());\n }\n // Intentionally run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const hideOptions = useCallback(() => acRef.current?.hideOptions?.(), []);\n const combinedFooter = useReferenceDropdownFooter({\n fixedFooter,\n onOpenCollection,\n hideOptions,\n });\n\n const prefix =\n selectedItem && !value ? (\n <Input.Affix data-hook=\"reference-input-avatar-prefix\">\n <ReferenceAvatar\n name={selectedItem.name}\n image={selectedItem.image}\n />\n </Input.Affix>\n ) : undefined;\n\n return (\n // Prevent EditableCell's row click/dblclick handlers from firing when\n // the user interacts with the input or dropdown.\n <div\n className={st(classes.root)}\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.stopPropagation()}\n >\n <AutoComplete\n ref={acRef}\n dataHook=\"reference-input-autocomplete\"\n className={st(classes.autocomplete)}\n size=\"small\"\n border=\"none\"\n options={options}\n value={value}\n prefix={prefix}\n onChange={onChange}\n onBlur={onBlur}\n onSelect={(wdsOption: { id: string | number }) => {\n const item = items.find((i) => i.id === String(wdsOption.id));\n if (item) {\n onSelect(item);\n }\n }}\n onClear={onClear}\n onKeyDown={onKeyDown}\n clearButton={clearButton}\n infiniteScroll={infiniteScroll}\n hasMore={hasMore}\n loadMore={loadMore}\n fixedFooter={combinedFooter}\n placeholder={t('auto-patterns.fields.select_placeholder')}\n showOptionsIfEmptyInput\n autoSelect={false}\n maxHeightPixels={ROW_HEIGHT * MAX_NUM_ROWS}\n popoverProps={{\n appendTo: 'window',\n flip: true,\n fixed: false,\n placement: 'bottom-start',\n }}\n inputRef={(el: HTMLInputElement) => {\n if (inputRef) {\n inputRef.current = el;\n }\n }}\n />\n </div>\n );\n },\n);\n\nCellReferenceInput.displayName = 'CellReferenceInput';\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AAA+D,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC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BC,eAAe,EAAEhF,UAAU,GAAGC,YAAa;MAC3CgF,YAAY,EAAE;QACZC,QAAQ,EAAE,QAAQ;QAClBC,IAAI,EAAE,IAAI;QACVC,KAAK,EAAE,KAAK;QACZC,SAAS,EAAE;MACb,CAAE;MACFhE,QAAQ,EAAGiE,EAAoB,IAAK;QAClC,IAAIjE,QAAQ,EAAE;UACZA,QAAQ,CAAC2B,OAAO,GAAGsC,EAAE;QACvB;MACF,CAAE;MAAAhD,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAA5D,YAAA;QAAA6D,UAAA;QAAAC,YAAA;MAAA;IAAA,CACH,CACE;EAAC;AAEV,CACF,CAAC;AAEDxC,kBAAkB,CAACqF,WAAW,GAAG,oBAAoB","ignoreList":[]}
@@ -5,15 +5,15 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "cellreferenceinput3914857990";
8
+ var _namespace_ = "cellreferenceinput3359134559";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "cellreferenceinput3914857990__root",
16
- "autocomplete": "cellreferenceinput3914857990__autocomplete"
15
+ "root": "cellreferenceinput3359134559__root",
16
+ "autocomplete": "cellreferenceinput3359134559__autocomplete"
17
17
  };
18
18
  var keyframes = exports.keyframes = {};
19
19
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/reference/cell-reference-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"cellreferenceinput3914857990\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"cellreferenceinput3914857990__root\",\"autocomplete\":\"cellreferenceinput3914857990__autocomplete\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,8BAA8B;AAChD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,oCAAoC;EAAC,cAAc,EAAC;AAA4C,CAAC;AACvH,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/reference/cell-reference-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"cellreferenceinput3359134559\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"cellreferenceinput3359134559__root\",\"autocomplete\":\"cellreferenceinput3359134559__autocomplete\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,8BAA8B;AAChD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,oCAAoC;EAAC,cAAc,EAAC;AAA4C,CAAC;AACvH,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.FormMultiReference = void 0;
5
+ var _react = _interopRequireWildcard(require("react"));
6
+ var _designSystem = require("@wix/design-system");
7
+ var _mobxReactLite = require("mobx-react-lite");
8
+ var _react2 = require("@wix/bex-core/react");
9
+ var _form = require("@wix/bex-core/form");
10
+ var _useTranslations = require("../../hooks/use-translations");
11
+ var _referenceAvatar = require("./reference-avatar");
12
+ var _referenceDropdownFooter = require("./reference-dropdown-footer");
13
+ var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/fields/dist/cjs/components/reference/form-multi-reference.tsx";
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ /** Selected references, each stored as `{ [idField], [displayField] }`. */
16
+
17
+ // Data-agnostic like CellMultiReferenceInput: the caller owns fetching, search,
18
+ // and pagination and passes the results in as props. This renderer only wraps
19
+ // them in a FormField with react-hook-form wiring. See remaining-issues.md #2.
20
+
21
+ const _FormMultiReference = props => {
22
+ var _field$validation2, _controller$fieldStat, _field$validation3;
23
+ const {
24
+ field,
25
+ dataHook,
26
+ formControl,
27
+ data,
28
+ items,
29
+ idField,
30
+ displayField,
31
+ imageField,
32
+ searchValue,
33
+ onSearch,
34
+ onClearSearch,
35
+ hasMore,
36
+ loadMore,
37
+ fixedFooter,
38
+ onOpenCollection,
39
+ placeholder
40
+ } = props;
41
+ const {
42
+ translate: t
43
+ } = (0, _react2.useWixPatternsContainer)();
44
+ const {
45
+ t: tf
46
+ } = (0, _useTranslations.useTranslations)();
47
+ const msRef = (0, _react.useRef)(null);
48
+ const controller = (0, _form.useController)({
49
+ name: field.id,
50
+ control: formControl,
51
+ defaultValue: data == null ? void 0 : data[field.id],
52
+ rules: {
53
+ validate: value => {
54
+ var _field$validation;
55
+ const arr = value;
56
+ if ((_field$validation = field.validation) != null && _field$validation.required && (!arr || !arr.length)) {
57
+ return t('cairo.fieldValidation.requiredField');
58
+ }
59
+ return true;
60
+ }
61
+ }
62
+ });
63
+ const selectedValues = (0, _react.useMemo)(() => controller.field.value || [], [controller.field.value]);
64
+ const tags = (0, _react.useMemo)(() => selectedValues.map(item => {
65
+ const selectedId = item[idField];
66
+ // A referenced item with no value in the display field still needs a
67
+ // readable tag — the dropdown options use the same fallback.
68
+ const label = item[displayField] || tf('patterns-fields.reference.untitled');
69
+ const image = imageField ? item[imageField] : undefined;
70
+ return {
71
+ id: selectedId,
72
+ label,
73
+ removable: true,
74
+ size: 'medium',
75
+ thumb: /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
76
+ align: "center",
77
+ verticalAlign: "middle",
78
+ position: "absolute",
79
+ top: "calc(50% - 12px)",
80
+ left: "calc(50% - 12px)",
81
+ __self: void 0,
82
+ __source: {
83
+ fileName: _jsxFileName,
84
+ lineNumber: 114,
85
+ columnNumber: 13
86
+ }
87
+ }, /*#__PURE__*/_react.default.createElement(_referenceAvatar.ReferenceAvatar, {
88
+ name: label,
89
+ image: image,
90
+ __self: void 0,
91
+ __source: {
92
+ fileName: _jsxFileName,
93
+ lineNumber: 121,
94
+ columnNumber: 15
95
+ }
96
+ })),
97
+ dataHook: `multi-reference-tag-${field.id}-${selectedId}`
98
+ };
99
+ }), [selectedValues, idField, displayField, imageField, field.id, tf]);
100
+ const options = (0, _react.useMemo)(() => items.map(item => (0, _designSystem.listItemSelectBuilder)({
101
+ id: item.id,
102
+ title: item.name || tf('patterns-fields.reference.untitled'),
103
+ prefix: /*#__PURE__*/_react.default.createElement(_referenceAvatar.ReferenceAvatar, {
104
+ name: item.name,
105
+ image: item.image,
106
+ __self: void 0,
107
+ __source: {
108
+ fileName: _jsxFileName,
109
+ lineNumber: 136,
110
+ columnNumber: 19
111
+ }
112
+ })
113
+ })), [items, tf]);
114
+ const handleSelect = (0, _react.useCallback)(option => {
115
+ const selectedId = String(option.id);
116
+ if (selectedValues.some(item => item[idField] === selectedId)) {
117
+ onClearSearch == null || onClearSearch();
118
+ return;
119
+ }
120
+ const item = items.find(i => i.id === selectedId);
121
+ controller.field.onChange([...selectedValues, {
122
+ [idField]: selectedId,
123
+ [displayField]: (item == null ? void 0 : item.name) || ''
124
+ }]);
125
+ onClearSearch == null || onClearSearch();
126
+ }, [selectedValues, items, idField, displayField, controller.field, onClearSearch]);
127
+ const handleRemoveTag = (0, _react.useCallback)(tagId => {
128
+ controller.field.onChange(selectedValues.filter(item => item[idField] !== tagId));
129
+ }, [controller.field, selectedValues, idField]);
130
+ const handleChange = (0, _react.useCallback)(e => {
131
+ onSearch(e.target.value);
132
+ }, [onSearch]);
133
+ const handleClear = (0, _react.useCallback)(() => {
134
+ controller.field.onChange([]);
135
+ onClearSearch == null || onClearSearch();
136
+ }, [controller.field, onClearSearch]);
137
+ const handleBlur = (0, _react.useCallback)(() => {
138
+ onClearSearch == null || onClearSearch();
139
+ }, [onClearSearch]);
140
+ const hideOptions = (0, _react.useCallback)(() => {
141
+ var _msRef$current;
142
+ return (_msRef$current = msRef.current) == null || _msRef$current.hideOptions == null ? void 0 : _msRef$current.hideOptions();
143
+ }, []);
144
+ const combinedFooter = (0, _referenceDropdownFooter.useReferenceDropdownFooter)({
145
+ fixedFooter,
146
+ onOpenCollection,
147
+ hideOptions
148
+ });
149
+ return /*#__PURE__*/_react.default.createElement(_designSystem.FormField, {
150
+ label: field.displayName,
151
+ required: (_field$validation2 = field.validation) == null ? void 0 : _field$validation2.required,
152
+ status: controller.fieldState.error ? 'error' : undefined,
153
+ statusMessage: (_controller$fieldStat = controller.fieldState.error) == null ? void 0 : _controller$fieldStat.message,
154
+ dataHook: dataHook,
155
+ __self: void 0,
156
+ __source: {
157
+ fileName: _jsxFileName,
158
+ lineNumber: 199,
159
+ columnNumber: 5
160
+ }
161
+ }, /*#__PURE__*/_react.default.createElement(_designSystem.MultiSelect, {
162
+ ref: instance => {
163
+ msRef.current = instance;
164
+ },
165
+ placeholder: placeholder ?? tf('auto-patterns.fields.select_placeholder'),
166
+ options: options,
167
+ value: searchValue ?? '',
168
+ size: "large",
169
+ tags: tags,
170
+ clearOnBlur: false,
171
+ onChange: handleChange,
172
+ onSelect: handleSelect,
173
+ onRemoveTag: handleRemoveTag,
174
+ onClear: handleClear,
175
+ onBlur: handleBlur,
176
+ clearButton: !((_field$validation3 = field.validation) != null && _field$validation3.required),
177
+ infiniteScroll: !!loadMore,
178
+ hasMore: hasMore,
179
+ loadMore: loadMore,
180
+ fixedFooter: combinedFooter,
181
+ dataHook: `multi-reference-input-${field.id}`,
182
+ __self: void 0,
183
+ __source: {
184
+ fileName: _jsxFileName,
185
+ lineNumber: 206,
186
+ columnNumber: 7
187
+ }
188
+ }));
189
+ };
190
+ const FormMultiReference = exports.FormMultiReference = (0, _mobxReactLite.observer)(_FormMultiReference);
191
+ //# sourceMappingURL=form-multi-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_mobxReactLite","_react2","_form","_useTranslations","_referenceAvatar","_referenceDropdownFooter","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_FormMultiReference","props","_field$validation2","_controller$fieldStat","_field$validation3","field","dataHook","formControl","data","items","idField","displayField","imageField","searchValue","onSearch","onClearSearch","hasMore","loadMore","fixedFooter","onOpenCollection","placeholder","translate","useWixPatternsContainer","tf","useTranslations","msRef","useRef","controller","useController","name","id","control","defaultValue","rules","validate","value","_field$validation","arr","validation","required","length","selectedValues","useMemo","tags","map","item","selectedId","label","image","undefined","removable","size","thumb","createElement","Box","align","verticalAlign","position","top","left","__self","__source","fileName","lineNumber","columnNumber","ReferenceAvatar","options","listItemSelectBuilder","title","prefix","handleSelect","useCallback","option","String","some","find","onChange","handleRemoveTag","tagId","filter","handleChange","target","handleClear","handleBlur","hideOptions","_msRef$current","current","combinedFooter","useReferenceDropdownFooter","FormField","displayName","status","fieldState","error","statusMessage","message","MultiSelect","ref","instance","clearOnBlur","onSelect","onRemoveTag","onClear","onBlur","clearButton","infiniteScroll","FormMultiReference","exports","observer"],"sources":["../../../../src/components/reference/form-multi-reference.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef } from 'react';\nimport {\n Box,\n FormField,\n MultiSelect,\n listItemSelectBuilder,\n type DropdownLayoutValueOption,\n type MultiSelectTag,\n} from '@wix/design-system';\nimport { observer } from 'mobx-react-lite';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useController } from '@wix/bex-core/form';\n\nimport { BaseInputProps } from '../../types/base-input';\nimport { useTranslations } from '../../hooks/use-translations';\nimport { ReferenceAvatar } from './reference-avatar';\nimport { useReferenceDropdownFooter } from './reference-dropdown-footer';\nimport type { FormReferenceItem } from './form-reference';\n\n/** Selected references, each stored as `{ [idField], [displayField] }`. */\nexport type FormMultiReferenceValue = Record<string, unknown>[] | null;\n\n// Data-agnostic like CellMultiReferenceInput: the caller owns fetching, search,\n// and pagination and passes the results in as props. This renderer only wraps\n// them in a FormField with react-hook-form wiring. See remaining-issues.md #2.\nexport interface FormMultiReferenceProps\n extends BaseInputProps<FormMultiReferenceValue> {\n /** Candidate items for the dropdown. */\n items: FormReferenceItem[];\n /** Referenced-item field the selected id is written to. */\n idField: string;\n /** Referenced-item field used as the tag label. */\n displayField: string;\n /** Referenced-item field holding an avatar image, when the schema has one. */\n imageField?: string;\n /** Current search text. The caller owns search state. */\n searchValue?: string;\n onSearch: (query: string) => void;\n onClearSearch?: () => void;\n hasMore?: boolean;\n loadMore?: () => void;\n fixedFooter?: React.ReactNode;\n /** When set, renders an \"Open Collection\" action at the bottom of the dropdown. */\n onOpenCollection?: () => void;\n placeholder?: string;\n}\n\ninterface MultiSelectHandle {\n hideOptions?: () => void;\n}\n\nconst _FormMultiReference = (props: FormMultiReferenceProps) => {\n const {\n field,\n dataHook,\n formControl,\n data,\n items,\n idField,\n displayField,\n imageField,\n searchValue,\n onSearch,\n onClearSearch,\n hasMore,\n loadMore,\n fixedFooter,\n onOpenCollection,\n placeholder,\n } = props;\n\n const { translate: t } = useWixPatternsContainer();\n const { t: tf } = useTranslations();\n const msRef = useRef<MultiSelectHandle | null>(null);\n\n const controller = useController({\n name: field.id,\n control: formControl,\n defaultValue: data?.[field.id],\n rules: {\n validate: (value) => {\n const arr = value as FormMultiReferenceValue;\n if (field.validation?.required && (!arr || !arr.length)) {\n return t('cairo.fieldValidation.requiredField');\n }\n return true;\n },\n },\n });\n\n const selectedValues = useMemo(\n () => (controller.field.value as Record<string, unknown>[]) || [],\n [controller.field.value],\n );\n\n const tags = useMemo<MultiSelectTag[]>(\n () =>\n selectedValues.map((item) => {\n const selectedId = item[idField] as string;\n // A referenced item with no value in the display field still needs a\n // readable tag — the dropdown options use the same fallback.\n const label =\n (item[displayField] as string) ||\n tf('patterns-fields.reference.untitled');\n const image = imageField\n ? (item[imageField] as string | undefined)\n : undefined;\n return {\n id: selectedId,\n label,\n removable: true,\n size: 'medium',\n thumb: (\n <Box\n align=\"center\"\n verticalAlign=\"middle\"\n position=\"absolute\"\n top=\"calc(50% - 12px)\"\n left=\"calc(50% - 12px)\"\n >\n <ReferenceAvatar name={label} image={image} />\n </Box>\n ),\n dataHook: `multi-reference-tag-${field.id}-${selectedId}`,\n };\n }),\n [selectedValues, idField, displayField, imageField, field.id, tf],\n );\n\n const options = useMemo(\n () =>\n items.map((item) =>\n listItemSelectBuilder({\n id: item.id,\n title: item.name || tf('patterns-fields.reference.untitled'),\n prefix: <ReferenceAvatar name={item.name} image={item.image} />,\n }),\n ),\n [items, tf],\n );\n\n const handleSelect = useCallback(\n (option: DropdownLayoutValueOption) => {\n const selectedId = String(option.id);\n if (selectedValues.some((item) => item[idField] === selectedId)) {\n onClearSearch?.();\n return;\n }\n const item = items.find((i) => i.id === selectedId);\n controller.field.onChange([\n ...selectedValues,\n { [idField]: selectedId, [displayField]: item?.name || '' },\n ]);\n onClearSearch?.();\n },\n [\n selectedValues,\n items,\n idField,\n displayField,\n controller.field,\n onClearSearch,\n ],\n );\n\n const handleRemoveTag = useCallback(\n (tagId: string) => {\n controller.field.onChange(\n selectedValues.filter((item) => item[idField] !== tagId),\n );\n },\n [controller.field, selectedValues, idField],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onSearch(e.target.value);\n },\n [onSearch],\n );\n\n const handleClear = useCallback(() => {\n controller.field.onChange([]);\n onClearSearch?.();\n }, [controller.field, onClearSearch]);\n\n const handleBlur = useCallback(() => {\n onClearSearch?.();\n }, [onClearSearch]);\n\n const hideOptions = useCallback(() => msRef.current?.hideOptions?.(), []);\n const combinedFooter = useReferenceDropdownFooter({\n fixedFooter,\n onOpenCollection,\n hideOptions,\n });\n\n return (\n <FormField\n label={field.displayName}\n required={field.validation?.required}\n status={controller.fieldState.error ? 'error' : undefined}\n statusMessage={controller.fieldState.error?.message}\n dataHook={dataHook}\n >\n <MultiSelect\n ref={(instance: MultiSelectHandle | null) => {\n msRef.current = instance;\n }}\n placeholder={\n placeholder ?? tf('auto-patterns.fields.select_placeholder')\n }\n options={options}\n value={searchValue ?? ''}\n size=\"large\"\n tags={tags}\n clearOnBlur={false}\n onChange={handleChange}\n onSelect={handleSelect}\n onRemoveTag={handleRemoveTag}\n onClear={handleClear}\n onBlur={handleBlur}\n clearButton={!field.validation?.required}\n infiniteScroll={!!loadMore}\n hasMore={hasMore}\n loadMore={loadMore}\n fixedFooter={combinedFooter}\n dataHook={`multi-reference-input-${field.id}`}\n />\n </FormField>\n );\n};\n\nexport const FormMultiReference = observer(_FormMultiReference);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAQA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAGA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAP,OAAA;AAAyE,IAAAQ,YAAA;AAAA,SAAAT,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,c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