@box/metadata-editor 0.45.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 (252) hide show
  1. package/LICENSE +379 -0
  2. package/chunks/filter-dropdown-menu.module.js +18 -0
  3. package/chunks/types.js +6 -0
  4. package/esm/index.js +33 -0
  5. package/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +44 -0
  6. package/esm/lib/components/add-metadata-template-dropdown/index.js +4 -0
  7. package/esm/lib/components/add-metadata-template-dropdown/messages.js +18 -0
  8. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.js +19 -0
  9. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +20 -0
  10. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.js +20 -0
  11. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.js +22 -0
  12. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.js +19 -0
  13. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +44 -0
  14. package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.js +13 -0
  15. package/esm/lib/components/filter-dropdown-menu/index.js +19 -0
  16. package/esm/lib/components/filter-dropdown-menu/messages.js +14 -0
  17. package/esm/lib/components/interactive-text/interactive-text.js +22 -0
  18. package/esm/lib/components/metadata-editor-fields/components/constants.js +6 -0
  19. package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/date-conversion-utils.js +16 -0
  20. package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +60 -0
  21. package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/use-date-internationalization.js +13 -0
  22. package/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +55 -0
  23. package/esm/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.js +47 -0
  24. package/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +15 -0
  25. package/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +51 -0
  26. package/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +35 -0
  27. package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +30 -0
  28. package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +90 -0
  29. package/esm/lib/components/metadata-editor-fields/editor-field-types.js +26 -0
  30. package/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +52 -0
  31. package/esm/lib/components/metadata-empty-state/messages.js +46 -0
  32. package/esm/lib/components/metadata-empty-state/metadata-empty-state.js +63 -0
  33. package/esm/lib/components/metadata-instance-editor/index.js +10 -0
  34. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +76 -0
  35. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +18 -0
  36. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +58 -0
  37. package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +42 -0
  38. package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +81 -0
  39. package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +38 -0
  40. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/messages.js +1 -0
  41. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +79 -0
  42. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.js +33 -0
  43. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +22 -0
  44. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +50 -0
  45. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +18 -0
  46. package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +40 -0
  47. package/esm/lib/components/metadata-instance-list/index.js +8 -0
  48. package/esm/lib/components/metadata-instance-list/metadata-instance-list.js +22 -0
  49. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +51 -0
  50. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +26 -0
  51. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/convertDate.js +25 -0
  52. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +56 -0
  53. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +14 -0
  54. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +30 -0
  55. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +10 -0
  56. package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +46 -0
  57. package/esm/lib/components/metadata-taxonomy-field/combobox-with-api-pagination.js +188 -0
  58. package/esm/lib/components/metadata-taxonomy-field/index.js +4 -0
  59. package/esm/lib/components/metadata-taxonomy-field/messages.js +34 -0
  60. package/esm/lib/components/metadata-taxonomy-field/request.js +6 -0
  61. package/esm/lib/components/metadata-taxonomy-field/single-level-taxonomy-field.js +19 -0
  62. package/esm/lib/components/metadata-taxonomy-field/use-async-list.js +124 -0
  63. package/esm/lib/components/metadata-taxonomy-field/utils/use-intersection-observer.js +87 -0
  64. package/esm/lib/components/unsaved-changes-modal/index.js +4 -0
  65. package/esm/lib/components/unsaved-changes-modal/messages.js +26 -0
  66. package/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +55 -0
  67. package/esm/lib/components/unsaved-changes-modal/utils.js +6 -0
  68. package/esm/lib/constants.js +4 -0
  69. package/esm/lib/defaults.js +18 -0
  70. package/esm/lib/mappers.js +28 -0
  71. package/esm/lib/messages.js +94 -0
  72. package/esm/lib/metadata-editor.js +15 -0
  73. package/esm/lib/test-utils/formik-wrapper.js +26 -0
  74. package/esm/lib/test-utils/index.js +31 -0
  75. package/esm/lib/test-utils/sample-data.js +281 -0
  76. package/esm/lib/test-utils/test-utils.js +13 -0
  77. package/i18n/bn-IN.js +88 -0
  78. package/i18n/bn-IN.properties +164 -0
  79. package/i18n/da-DK.js +88 -0
  80. package/i18n/da-DK.properties +164 -0
  81. package/i18n/de-DE.js +88 -0
  82. package/i18n/de-DE.properties +164 -0
  83. package/i18n/en-AU.js +88 -0
  84. package/i18n/en-AU.properties +164 -0
  85. package/i18n/en-CA.js +88 -0
  86. package/i18n/en-CA.properties +164 -0
  87. package/i18n/en-GB.js +88 -0
  88. package/i18n/en-GB.properties +164 -0
  89. package/i18n/en-US.js +87 -0
  90. package/i18n/en-US.properties +170 -0
  91. package/i18n/en-x-pseudo.js +88 -0
  92. package/i18n/en-x-pseudo.properties +164 -0
  93. package/i18n/es-419.js +88 -0
  94. package/i18n/es-419.properties +164 -0
  95. package/i18n/es-ES.js +88 -0
  96. package/i18n/es-ES.properties +164 -0
  97. package/i18n/fi-FI.js +88 -0
  98. package/i18n/fi-FI.properties +164 -0
  99. package/i18n/fr-CA.js +88 -0
  100. package/i18n/fr-CA.properties +164 -0
  101. package/i18n/fr-FR.js +88 -0
  102. package/i18n/fr-FR.properties +164 -0
  103. package/i18n/hi-IN.js +88 -0
  104. package/i18n/hi-IN.properties +164 -0
  105. package/i18n/it-IT.js +88 -0
  106. package/i18n/it-IT.properties +164 -0
  107. package/i18n/ja-JP.js +88 -0
  108. package/i18n/ja-JP.properties +164 -0
  109. package/i18n/json/src/lib/components/add-metadata-template-dropdown/messages.json +1 -0
  110. package/i18n/json/src/lib/components/filter-dropdown-menu/messages.json +1 -0
  111. package/i18n/json/src/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.json +1 -0
  112. package/i18n/json/src/lib/components/metadata-empty-state/messages.json +1 -0
  113. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.json +1 -0
  114. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.json +1 -0
  115. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.json +1 -0
  116. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.json +1 -0
  117. package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.json +1 -0
  118. package/i18n/json/src/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.json +1 -0
  119. package/i18n/json/src/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.json +1 -0
  120. package/i18n/json/src/lib/components/metadata-taxonomy-field/messages.json +1 -0
  121. package/i18n/json/src/lib/components/unsaved-changes-modal/messages.json +1 -0
  122. package/i18n/json/src/lib/messages.json +1 -0
  123. package/i18n/ko-KR.js +88 -0
  124. package/i18n/ko-KR.properties +164 -0
  125. package/i18n/nb-NO.js +88 -0
  126. package/i18n/nb-NO.properties +164 -0
  127. package/i18n/nl-NL.js +88 -0
  128. package/i18n/nl-NL.properties +164 -0
  129. package/i18n/pl-PL.js +88 -0
  130. package/i18n/pl-PL.properties +164 -0
  131. package/i18n/pt-BR.js +88 -0
  132. package/i18n/pt-BR.properties +164 -0
  133. package/i18n/ru-RU.js +88 -0
  134. package/i18n/ru-RU.properties +164 -0
  135. package/i18n/sv-SE.js +88 -0
  136. package/i18n/sv-SE.properties +164 -0
  137. package/i18n/tr-TR.js +88 -0
  138. package/i18n/tr-TR.properties +164 -0
  139. package/i18n/zh-CN.js +88 -0
  140. package/i18n/zh-CN.properties +164 -0
  141. package/i18n/zh-TW.js +88 -0
  142. package/i18n/zh-TW.properties +164 -0
  143. package/package.json +55 -0
  144. package/styles/combobox-with-api-pagination.css +1 -0
  145. package/styles/custom-instance-new-field.css +1 -0
  146. package/styles/custom-instance.css +1 -0
  147. package/styles/delete-confirmation-modal.css +1 -0
  148. package/styles/filter-dropdown-menu.css +1 -0
  149. package/styles/metadata-editor-fields.css +1 -0
  150. package/styles/metadata-editor.css +0 -0
  151. package/styles/metadata-instance-content.css +1 -0
  152. package/styles/metadata-instance-entry.css +1 -0
  153. package/styles/metadata-instance-footer.css +1 -0
  154. package/styles/metadata-instance-form-footer.css +1 -0
  155. package/styles/metadata-instance-form-header.css +1 -0
  156. package/styles/metadata-instance-form.css +1 -0
  157. package/styles/metadata-instance-header.css +1 -0
  158. package/styles/metadata-instance-list.css +1 -0
  159. package/styles/metadata-instance.css +1 -0
  160. package/styles/update-mode-field-wrapper.css +1 -0
  161. package/types/index.d.ts +10 -0
  162. package/types/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.d.ts +2 -0
  163. package/types/lib/components/add-metadata-template-dropdown/index.d.ts +2 -0
  164. package/types/lib/components/add-metadata-template-dropdown/messages.d.ts +18 -0
  165. package/types/lib/components/add-metadata-template-dropdown/types.d.ts +6 -0
  166. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.d.ts +9 -0
  167. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.d.ts +8 -0
  168. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.d.ts +9 -0
  169. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.d.ts +9 -0
  170. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.d.ts +9 -0
  171. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.d.ts +9 -0
  172. package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.d.ts +11 -0
  173. package/types/lib/components/filter-dropdown-menu/index.d.ts +36 -0
  174. package/types/lib/components/filter-dropdown-menu/messages.d.ts +13 -0
  175. package/types/lib/components/interactive-text/interactive-text.d.ts +10 -0
  176. package/types/lib/components/metadata-editor-fields/components/constants.d.ts +3 -0
  177. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/date-conversion-utils.d.ts +3 -0
  178. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.d.ts +3 -0
  179. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/types.d.ts +4 -0
  180. package/types/lib/components/metadata-editor-fields/components/metadata-date-field/use-date-internationalization.d.ts +6 -0
  181. package/types/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.d.ts +3 -0
  182. package/types/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.d.ts +3 -0
  183. package/types/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.d.ts +4 -0
  184. package/types/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.d.ts +3 -0
  185. package/types/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.d.ts +6 -0
  186. package/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.d.ts +32 -0
  187. package/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.d.ts +12 -0
  188. package/types/lib/components/metadata-editor-fields/editor-field-types.d.ts +8 -0
  189. package/types/lib/components/metadata-editor-fields/metadata-editor-fields.d.ts +3 -0
  190. package/types/lib/components/metadata-editor-fields/types.d.ts +12 -0
  191. package/types/lib/components/metadata-empty-state/messages.d.ts +53 -0
  192. package/types/lib/components/metadata-empty-state/metadata-empty-state.d.ts +3 -0
  193. package/types/lib/components/metadata-instance-editor/index.d.ts +4 -0
  194. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.d.ts +2 -0
  195. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.d.ts +18 -0
  196. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/types.d.ts +3 -0
  197. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.d.ts +2 -0
  198. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.d.ts +48 -0
  199. package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/types.d.ts +5 -0
  200. package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.d.ts +2 -0
  201. package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.d.ts +43 -0
  202. package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/types.d.ts +6 -0
  203. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/messages.d.ts +0 -0
  204. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.d.ts +2 -0
  205. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +26 -0
  206. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.d.ts +12 -0
  207. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.d.ts +23 -0
  208. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.d.ts +2 -0
  209. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/types.d.ts +5 -0
  210. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.d.ts +18 -0
  211. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +2 -0
  212. package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +6 -0
  213. package/types/lib/components/metadata-instance-editor/types.d.ts +6 -0
  214. package/types/lib/components/metadata-instance-list/index.d.ts +2 -0
  215. package/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +2 -0
  216. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +2 -0
  217. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +7 -0
  218. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +2 -0
  219. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +5 -0
  220. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/convertDate.d.ts +30 -0
  221. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +2 -0
  222. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +8 -0
  223. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.d.ts +13 -0
  224. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.d.ts +2 -0
  225. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/types.d.ts +5 -0
  226. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.d.ts +8 -0
  227. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.d.ts +4 -0
  228. package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/types.d.ts +7 -0
  229. package/types/lib/components/metadata-instance-list/types.d.ts +7 -0
  230. package/types/lib/components/metadata-taxonomy-field/combobox-with-api-pagination.d.ts +15 -0
  231. package/types/lib/components/metadata-taxonomy-field/index.d.ts +2 -0
  232. package/types/lib/components/metadata-taxonomy-field/messages.d.ts +38 -0
  233. package/types/lib/components/metadata-taxonomy-field/request.d.ts +7 -0
  234. package/types/lib/components/metadata-taxonomy-field/single-level-taxonomy-field.d.ts +5 -0
  235. package/types/lib/components/metadata-taxonomy-field/types.d.ts +41 -0
  236. package/types/lib/components/metadata-taxonomy-field/use-async-list.d.ts +63 -0
  237. package/types/lib/components/metadata-taxonomy-field/utils/use-intersection-observer.d.ts +28 -0
  238. package/types/lib/components/unsaved-changes-modal/index.d.ts +1 -0
  239. package/types/lib/components/unsaved-changes-modal/messages.d.ts +28 -0
  240. package/types/lib/components/unsaved-changes-modal/types.d.ts +19 -0
  241. package/types/lib/components/unsaved-changes-modal/unsaved-changes-modal.d.ts +2 -0
  242. package/types/lib/components/unsaved-changes-modal/utils.d.ts +1 -0
  243. package/types/lib/constants.d.ts +1 -0
  244. package/types/lib/defaults.d.ts +13 -0
  245. package/types/lib/mappers.d.ts +16 -0
  246. package/types/lib/messages.d.ts +113 -0
  247. package/types/lib/metadata-editor.d.ts +4 -0
  248. package/types/lib/test-utils/formik-wrapper.d.ts +11 -0
  249. package/types/lib/test-utils/index.d.ts +3 -0
  250. package/types/lib/test-utils/sample-data.d.ts +24 -0
  251. package/types/lib/test-utils/test-utils.d.ts +3 -0
  252. package/types/lib/types.d.ts +63 -0
package/LICENSE ADDED
@@ -0,0 +1,379 @@
1
+ BOX
2
+ SOFTWARE LICENSE AGREEMENT
3
+ (v.20240105)
4
+
5
+ BOX SHARED FEATURES LIBRARY
6
+
7
+ This "Agreement" forms a legally binding agreement between Box (as defined in
8
+ Section 14) and you ("Developer") that governs Developer's right to access and
9
+ use this Library (as defined below).
10
+
11
+ DEVELOPER'S RIGHT TO USE THE LIBRARY IS SUBJECT TO DEVELOPER'S ACCEPTANCE OF AND
12
+ CONTINUING COMPLIANCE WITH THIS AGREEMENT. Developer accepts this Agreement by
13
+ either: (a) clicking an option to "accept" or "agree" to this Agreement, where
14
+ such option is made available by Box; or (b) by actually using the Library, in
15
+ which event Developer hereby agrees that such use constitutes acceptance of
16
+ this Agreement from that time onwards. Developer will not use the Library and will
17
+ not accept this Agreement if Developer is barred from using the Library under the
18
+ laws of the United States or other countries including the country in which
19
+ Developer is a resident or in which Developer access or uses the Library. If the
20
+ individual accepting this Agreement is doing so on behalf of an employer or
21
+ other entity, such individual represents and warrants that such individual has
22
+ full legal authority to bind such employer or other entity to this Agreement;
23
+ and, if the individual does not have the requisite authority, the individual
24
+ may not accept the Agreement or use the Library on behalf of such employer or
25
+ other entity. IF DEVELOPER DOES NOT AGREE TO BE BOUND BY THIS AGREEMENT,
26
+ DEVELOPER MUST NOT USE THE LIBRARY AND MAY NOT OFFER OR CREATE APPLICATIONS OR
27
+ SERVICES THAT INTERACT WITH THE LIBRARY.
28
+
29
+ This Agreement does not govern use of any Box software or services other than
30
+ the Library. See the relevant agreements accompanying the other Box software or
31
+ services for their respective governing terms.
32
+
33
+ 1. General. The "Library" means the Box Shared Features Library, including any
34
+ subsequent updates or upgrades made available to Developer, and any
35
+ associated documentation, software code, or other materials made
36
+ available by Box. This Agreement applies to any Library provided by
37
+ Box or that includes, displays, or links to this Agreement, and to any
38
+ updates, supplements or support services for this Library. This Library is not intended for use separately from Box SDK. Standalone use or use outside of the Box SDK is not supported or warranted.
39
+
40
+ Box reserves the right to discontinue offering the Library (or any updates
41
+ thereto) or to modify the Library at any time in its sole discretion.
42
+ Free/open source software components distributed in this Library are licensed
43
+ to Developer under the terms of the applicable free/open source license
44
+ agreements and such free/open source software licenses, if any, can be found in
45
+ the THIRD_PARTY_LICENSES file in the same source directory as this file.
46
+
47
+ 2. Use Rights & Requirements.
48
+ a. Subject to Developer's compliance with the terms of this Agreement,
49
+ Developer may:
50
+ i. download, install, and use the Library on its devices;
51
+ ii. make a reasonable number of copies of the Library as necessary, provided that Developer
52
+ reproduces complete copies of the Library, including without
53
+ limitation all "read me" files, copyright notices, and other legal
54
+ notices and terms; and
55
+ iii. use, reproduce, modify, and distribute the sample code included in
56
+ the Library only in connection with use of the Box SDK that complies
57
+ with the technical limitations and the Acceptable Use Policy (set
58
+ forth in Exhibit A hereto) ("AUP").
59
+ b. Developer shall ensure that any application that contains, incorporates, or makes use of the Library displays prominently,
60
+ and made apparent to each end-user of such application, the
61
+ following notice and disclaimer in full:
62
+
63
+ "Copyright 2024 Box, Inc. All rights reserved.
64
+
65
+ This product includes software developed by Box, Inc. ("Box")
66
+ (http://www.box.com)
67
+
68
+ ALL BOX SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
69
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
70
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
71
+ IN NO EVENT SHALL BOX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
72
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
73
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
74
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
75
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
77
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78
+
79
+ See the Box license for the specific language governing permissions
80
+ and limitations under the license."
81
+
82
+ 3. Restrictions. Except as set forth above, Developer may not:
83
+ a. distribute, sell, lease, rent, lend, or sublicense the Library (or any copy
84
+ or portion thereof);
85
+ b. use the Library to create, design, or develop anything other than in connection with the Box SDK;
86
+ c. modify or distribute any portion of the Library, or distribute any
87
+ application, in any way that would subject any portion of the
88
+ Library to an Excluded License. An "Excluded License" is a license that
89
+ requires, as a condition of use, modification, or distribution of code
90
+ subject to that license, that the code be disclosed or distributed in
91
+ source code form or that others have the right to modify the code;
92
+ d. create or attempt to create a product that mimics or interferes with
93
+ the communications and commands between Box's API services; or
94
+ e. use the Library: (i) to violate the AUP; (ii) to circumvent any technical
95
+ or licensing restrictions of Box’s cloud-based content collaboration service (“Box Service”); or (iii) in violation of
96
+ any U.S. denied party-list, embargoed country restriction, export law
97
+ or regulation.
98
+
99
+ 4. Contributions. Developer Contributions made by the Developer to the Library shall not be accepted.
100
+
101
+ 5. Feedback. Developer may, from time to time, provide feedback to Box
102
+ concerning the functionality and performance of the Library or Box Service
103
+ including, without limitation, identifying potential errors and
104
+ improvements ("Feedback"). In such event, Box may freely use and exploit
105
+ any such Feedback without any obligation to Developer, unless otherwise
106
+ agreed upon in writing. Developer hereby assigns to Box any proprietary
107
+ right that Developer may have in or to any modification, enhancement,
108
+ improvement or change in or to the Box Service based upon any Feedback from
109
+ Developer.
110
+
111
+ 6. Box Independent Development. Nothing in this Agreement will impair Box's
112
+ right to develop, acquire, license, market, promote or distribute products,
113
+ software or technologies that perform the same or similar functions as, or
114
+ otherwise compete with, any application, products,
115
+ software or technologies making use of the Library that Developer may develop, produce, market, or
116
+ distribute.
117
+
118
+ 7. Support. Box does not provide technical or other support for the Library under
119
+ this Agreement.
120
+
121
+ 8. Termination. This Agreement becomes effective on the date Developer first
122
+ uses the Library and will continue as long as Developer is in compliance with
123
+ the terms specified herein or until otherwise terminated. Either party may
124
+ terminate this Agreement upon thirty days written notice if the other party
125
+ is in material breach of any term of this Agreement. Developer agrees, upon
126
+ termination, to immediately destroy all copies of the Library within the
127
+ Developer’s possession or control. The following Sections survive any
128
+ termination of this Agreement: Sections 4, 5, 9, 11, 12, 13, 15, 16 and 17.
129
+
130
+ 9. Ownership. The Library is licensed, not sold. Box reserves all other rights not
131
+ granted herein. The parties acknowledge that, as between the parties:
132
+ Box or its licensors retain complete ownership of all Intellectual
133
+ Property Rights in and to the Library; and
134
+ b. Developer or its licensors retain complete ownership of all
135
+ Intellectual Property Rights in any application that contains, incorporates, or makes use of the Library (subject
136
+ to Box’s underlying ownership of the Intellectual Property Rights in
137
+ and to the Library).
138
+ Nothing in this Agreement will be construed to transfer or assign any
139
+ Intellectual Property Rights of either party to the other. “Intellectual
140
+ Property Rights” means any and all rights under patent law, copyright law,
141
+ trade secret law, trademark law, and any and all other proprietary rights.
142
+
143
+ 10. Data Privacy. Developer agrees that Box may periodically collect, process
144
+ and store Technical Data. “Technical Data” means technical data and
145
+ related information about the Developer’s use of the Box SDK and Library and Developer's
146
+ device, system, peripherals, account and Developer's use of the Library,
147
+ including without limitation:
148
+ a. internet protocol address;
149
+ b. hardware identification;
150
+ c. operating system;
151
+ d. application software;
152
+ e. peripheral hardware;
153
+ f. number of active plugins and software development kits;
154
+ g. the successful installation and launch of Library;
155
+ h. number and type of API calls; and
156
+ i. Library usage statistics (e.g., as implemented by analytics calls in the
157
+ Library).
158
+
159
+ Box will use Technical Data for internal statistical and analytical
160
+ purposes to facilitate support, invoicing or online services, the
161
+ provisioning of updates, to study usage patterns to improve the Libraries, and
162
+ the development of the Box Service. Box may transfer Technical Data to
163
+ other companies in the Box group from time to time. Developer acknowledges
164
+ that correspondence and log files generated in conjunction with a request
165
+ for support services may contain sensitive, confidential or personal
166
+ information. Developer is solely responsible for taking the steps
167
+ necessary to protect such data, including obfuscating the logs or
168
+ otherwise guarding such information prior to sending it to Box. For each
169
+ application that contains, incorporates, or makes use of the Library, Developer will provide a privacy policy describing
170
+ information collected by such application and Developer's
171
+ privacy practices. Any privacy policy created by Developer for any
172
+ application will be at least as restrictive as Box's
173
+ then-current privacy policy ("Box Privacy Policy") found at
174
+ https://www.box.com/static/html/privacy.html. Developer will comply and
175
+ ensure that the application complies with the Box Privacy Policy
176
+ and any privacy policy it creates for the application.
177
+
178
+ 11. DISCLAIMER OF WARRANTIES. THE LIBRARY IS PROVIDED "AS IS" WITHOUT ANY
179
+ WARRANTIES OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
180
+ BOX MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, WHETHER EXPRESS,
181
+ IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, ANY
182
+ WARRANTY THAT THE SERVICES WILL BE UNINTERRUPTED, ERROR-FREE OR FREE OF
183
+ HARMFUL COMPONENTS, AND ANY IMPLIED WARRANTY OF MERCHANTABILITY,
184
+ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR
185
+ NON-INFRINGEMENT, AND ANY WARRANTY ARISING OUT OF ANY COURSE OF
186
+ PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. SOME JURISDICTIONS
187
+ DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES. IN SUCH AN EVENT THE
188
+ ABOVE EXCLUSION WILL NOT APPLY SOLELY TO THE EXTENT PROHIBITED BY LAW.
189
+
190
+ 12. LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
191
+ LAW, IN NO EVENT WILL BOX BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
192
+ PUNITIVE, COVER OR CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION,
193
+ DAMAGES FOR LOST PROFITS, GOODWILL, USE OR DATA) HOWEVER CAUSED, UNDER ANY
194
+ THEORY OF LIABILITY, INCLUDING, WITHOUT LIMITATION, CONTRACT, TORT,
195
+ WARRANTY, NEGLIGENCE OR OTHERWISE, EVEN IF BOX HAS BEEN ADVISED AS TO THE
196
+ POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL BOX'S TOTAL AND CUMULATIVE
197
+ LIABILITY FOR ALL CLAIMS OF ANY NATURE ARISING OUT OF THIS AGREEMENT
198
+ EXCEED $50.00. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF
199
+ INCIDENTAL, CONSEQUENTIAL OR OTHER DAMAGES. IN SUCH AN EVENT THIS
200
+ LIMITATION WILL NOT APPLY TO THE EXTENT PROHIBITED BY LAW.
201
+
202
+ 13. INDEMNIFICATION. DEVELOPER WILL DEFEND, INDEMNIFY AND HOLD BOX, ITS
203
+ AFFILIATES, OFFICERS, DIRECTORS, EMPLOYEES AND AGENTS HARMLESS, FROM AND
204
+ AGAINST ANY AND ALL THIRD PARTY CLAIMS AND ALL LIABILITIES, ASSESSMENTS,
205
+ LOSSES, COSTS OR DAMAGES RESULTING FROM OR ARISING OUT OF:
206
+ a. DEVELOPER'S BREACH OF THIS AGREEMENT;
207
+ b. APPLICATIONS THAT CONTAIN, INCORPORATE, OR MAKE USE OF THE LIBRARY;
208
+ c. DEVELOPER'S INFRINGEMENT OR VIOLATION OF ANY INTELLECTUAL PROPERTY,
209
+ OTHER RIGHTS OR PRIVACY OF A THIRD PARTY; AND/OR
210
+ d. MISUSE OF ANY OF THE SERVICES BY A THIRD PARTY WHERE SUCH MISUSE WAS
211
+ MADE AVAILABLE BY DEVELOPER'S FAILURE TO TAKE REASONABLE MEASURES TO
212
+ PROTECT DEVELOPER'S USERNAME AND PASSWORD AGAINST MISUSE.
213
+ Developer will not settle any claim, and no settlement of a claim will be
214
+ binding on Box, without Box's prior written consent, which will not be
215
+ unreasonably withheld or delayed.
216
+
217
+ 14. Box Entity. The location of Developer will determine the Box entity with
218
+ which Developer is contracting under this Agreement and to which Developer
219
+ should direct notices under this Agreement, as follows:
220
+
221
+ +---------------+-------------------+----------------------------------+
222
+ | Developer | Box Contracting | Box Notices Sent to |
223
+ | Location | Entity | |
224
+ +---------------+-------------------+----------------------------------+
225
+ | Within | Box, Inc. | LegalOps, Box, Inc. |
226
+ | United States | | 900 Jefferson Avenue |
227
+ | | | Redwood City, California, 94063 |
228
+ | | | United States of America |
229
+ +---------------+-------------------+----------------------------------+
230
+ | Rest of World | Box.com (UK) Ltd. | LegalOps, Box.com (UK) Ltd |
231
+ | | | 64 North Row, 2nd Floor |
232
+ | | | London W1K 7LL |
233
+ | | | United Kingdom |
234
+ +---------------+-------------------+----------------------------------+
235
+
236
+ 15. Confidentiality. "Confidential Information" means all information
237
+ disclosed by one Party ("Disclosing Party") to the other Party ("Receiving
238
+ Party") that is in tangible form and labeled "confidential" or the like,
239
+ or that reasonably should be understood to be confidential given the
240
+ nature of the information and the circumstances of the disclosure. The
241
+ following information will be considered Confidential Information whether
242
+ or not marked or identified as such:
243
+ a. non-public materials regarding the Library or the Box Service;
244
+ b. license keys;
245
+ c. the terms of this Agreement including all orders and pricing thereto;
246
+ and
247
+ d. Box's strategic roadmaps, product plans, product designs and
248
+ architecture, technology and technical information, security audit
249
+ reviews, business and marketing plans, and business processes.
250
+ Confidential Information will not include information that as shown by the
251
+ Receiving Party's records was:
252
+ i. already known to Receiving Party at the time of disclosure by the
253
+ Disclosing Party;
254
+ ii. was disclosed to the Receiving Party by a third party who had the
255
+ right to make such disclosure without any confidentiality
256
+ restrictions;
257
+ iii. is, or through no fault of the Receiving Party has become,
258
+ generally available to the public; or
259
+ iv. was independently developed by Receiving Party without use of the
260
+ Disclosing Party's Confidential Information.
261
+ The Receiving Party will use no less than a reasonable standard of care to
262
+ safeguard the Confidential Information received from the Disclosing Party
263
+ and will only use the Confidential Information of the Disclosing Party to
264
+ exercise its rights and perform its obligations under this Agreement.
265
+ Neither party will disclose Confidential Information in violation of the
266
+ terms and conditions of this Agreement, to any third party, without the
267
+ prior written consent of the other party. Notwithstanding the foregoing
268
+ each party may disclose Confidential Information, including the terms and
269
+ conditions of this Agreement, without the prior written consent of the
270
+ other party:
271
+ A. as compelled by law provided that to the extent legally permissible
272
+ the Receiving Party gives the Disclosing Party prior notice of such
273
+ compelled disclosure and reasonable assistance, at the Disclosing
274
+ Party's expense, if the Disclosing Party seeks to contest such
275
+ disclosure;
276
+ B. in confidence, to legal counsel, accountants, banks, and financing
277
+ sources and their advisors;
278
+ C. in connection with the enforcement of this Agreement or rights
279
+ under this Agreement;
280
+ D. the terms and conditions of this Agreement in confidence, in
281
+ connection with an actual or proposed merger, acquisition, or
282
+ similar transaction; or
283
+ E. to respond to an emergency which Box believes in the good faith
284
+ requires Box to disclose information to assist in preventing the
285
+ death or serious bodily injury of any person.
286
+
287
+ 16. Governing Law/Venue. This Agreement will be construed and enforced in all
288
+ respects in accordance with the laws of the State of California, U.S.A.,
289
+ without reference to its choice of law rules. The parties specifically
290
+ exclude from application to the Agreement the United Nations Convention on
291
+ Contracts for the International Sale of Goods and the Uniform Computer
292
+ Information Transactions Act. Developer hereby irrevocably and
293
+ unconditionally consents to the exclusive jurisdiction and venue in the
294
+ state and federal courts sitting in Santa Clara County, California. In
295
+ any such dispute, the prevailing party will be entitled to recover its
296
+ reasonable attorneys' fees and expenses from the other party.
297
+
298
+ 17. General. Developer will not, directly, indirectly, by operation of law or
299
+ otherwise, assign all or any part of this Agreement or its rights
300
+ hereunder or delegate performance of any of its duties hereunder without
301
+ the prior written consent of Box. This Agreement sets forth the entire
302
+ understanding of the parties and supersedes any and all prior oral and
303
+ written agreements or understandings between the parties regarding the
304
+ subject matter of this Agreement. Any modifications of this Agreement must
305
+ be in writing and signed by both parties hereto. The failure of either
306
+ party to insist upon or enforce strict performance of any of the
307
+ provisions of this Agreement or to exercise any rights or remedies under
308
+ this Agreement will not be construed as a waiver or relinquishment to any
309
+ extent of such party's right to assert or rely upon any such provision,
310
+ right or remedy in that or any other instance; rather, the same will
311
+ remain in full force and effect. In the event that any provision of this
312
+ Agreement or the application thereof, becomes or is declared by a court of
313
+ competent jurisdiction to be illegal, void or unenforceable, the remainder
314
+ of this Agreement will continue in full force and effect. The parties will
315
+ promptly replace such void or unenforceable provision with a valid and
316
+ enforceable provision that will achieve, to the extent possible, the
317
+ economic, business and other purposes of such void or unenforceable
318
+ provision. The parties are entering into this Agreement as independent
319
+ contracting parties. Neither party will have, or hold itself out as
320
+ having, any right or authority to incur any obligation on behalf of the
321
+ other party. This Agreement will not be construed to create an
322
+ association, joint venture or partnership between the parties or to impose
323
+ any partnership liability upon any party. If at any time Developer has any
324
+ questions about this Agreement, the Developer Web Site or the Developer
325
+ Services, Developer should contact Box at
326
+ https://developer.box.com/docs#section-developer-support.
327
+
328
+
329
+ Exhibit A
330
+ BOX SHARED FEATURES LIBRARY ACCEPTABLE USE POLICY
331
+
332
+ Acceptable Use Policy. Developer shall not, and shall not use the Library to:
333
+ a) Do anything illegal, or facilitate, promote or encourage any illegal
334
+ activities (gambling, etc.), or otherwise violate applicable law;
335
+ b) Invade the privacy of any person;
336
+ c) Engage in any activity that interferes with, plagiarizes, copies, or
337
+ disrupts the Box Service or any Box API;
338
+ d) Remove or modify any copyright, trademark or other proprietary rights
339
+ notice, or any specific element or phrase attributing part of the
340
+ technology to Box, on or in the Library or on any materials printed or
341
+ copied off of the Library;
342
+ e) Interfere with the servers or networks connected to the Box Service or
343
+ violate any of the procedures, policies or regulations of networks
344
+ connected to the Box Service including attempting to gain unauthorized
345
+ access to the Box Service, user accounts, computer systems or networks
346
+ connected to the Box Service through hacking, password mining or any
347
+ other means;
348
+ f) Use any robot, spider, service search/retrieval application, or other
349
+ automated device, process or means to maliciously access, retrieve,
350
+ scrape, or index the Box Service;
351
+ g) Upload or otherwise transmit any material containing software viruses
352
+ or other computer code, files or programs designed to interrupt,
353
+ destroy, or limit the functionality of any software or hardware;
354
+ h) Facilitate the transmission or storage of any material depicting or
355
+ promoting sexually explicit or pornographic material, violence, or
356
+ discrimination based on race, sex, religion, nationality, disability,
357
+ sexual orientation or age or that could otherwise give rise to any
358
+ civil or criminal liability under applicable laws or regulations;
359
+ i) Harass, threaten, incite, degrade, intimidate, deceive or mislead
360
+ anyone;
361
+ j) Infringe or violate any rights of Box, or any third party, including
362
+ any intellectual property rights (e.g., patents, copyrights,
363
+ trademarks, trade secrets or other personal or proprietary right),
364
+ rights of privacy or publicity which includes not facilitating or
365
+ engaging in the unauthorized use, distribution, or exploitation of
366
+ copyrighted materials or content;
367
+ k) Collect, or facilitate the collection of, any information or data of
368
+ any kind for any unlawful purpose;
369
+ l) Intercept, monitor, or modify the communications of others;
370
+ m) Disseminate "spam," "junk mail," "phishing," "chain letters," "pyramid
371
+ schemes," illegal contests or sweepstakes, spyware, adware, viruses,
372
+ worms, Trojan horses, time bombs, or any other type of malware or
373
+ malicious code;
374
+ n) Install software: (i) to perform hidden activities without the
375
+ end-user's consent; (ii) that may harm or alter an end-user's system;
376
+ (iii) that is downloaded as a hidden component of other software; or
377
+ (iv) that is automatically downloaded in whole or in part without
378
+ express end-user consent; and
379
+ o) Promote or encourage illegal or controlled products or services.
@@ -0,0 +1,18 @@
1
+ import "../styles/filter-dropdown-menu.css";
2
+ const c = "_content_17su9_1", e = "_scrollableContainer_17su9_20", s = "_item_17su9_25", o = "_option_17su9_35", t = "_search_17su9_56", n = "_searchIcon_17su9_61", _ = "_global_17su9_70", r = "_clearSearchIcon_17su9_75", a = "_searchInput_17su9_83", i = "_firefoxDefaultOpacityFix_17su9_115", l = "_divider_17su9_133", u = "_searchDivider_17su9_137", p = {
3
+ content: c,
4
+ scrollableContainer: e,
5
+ item: s,
6
+ option: o,
7
+ search: t,
8
+ searchIcon: n,
9
+ global: _,
10
+ clearSearchIcon: r,
11
+ searchInput: a,
12
+ firefoxDefaultOpacityFix: i,
13
+ divider: l,
14
+ searchDivider: u
15
+ };
16
+ export {
17
+ p as s
18
+ };
@@ -0,0 +1,6 @@
1
+ let n = /* @__PURE__ */ function(e) {
2
+ return e.ClearAndReplace = "clearAndReplace", e.RemoveEntered = "removeEntered", e.ReplaceEntered = "replaceEntered", e.Append = "append", e;
3
+ }({});
4
+ export {
5
+ n as U
6
+ };
package/esm/index.js ADDED
@@ -0,0 +1,33 @@
1
+ import { AddMetadataTemplateDropdown as a } from "./lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js";
2
+ import { FilterDropdownMenu as r } from "./lib/components/filter-dropdown-menu/index.js";
3
+ import { MetadataEmptyState as n } from "./lib/components/metadata-empty-state/metadata-empty-state.js";
4
+ import { DeleteConfirmationModal as p } from "./lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js";
5
+ import { MetadataInstanceFormHeader as l } from "./lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
+ import { CustomInstanceNewField as i } from "./lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js";
7
+ import { MetadataInstanceForm as s } from "./lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js";
8
+ import { MetadataInstanceList as I } from "./lib/components/metadata-instance-list/metadata-instance-list.js";
9
+ import { MetadataInstanceHeader as F, autofillButtonAriaLabel as L, editButtonAriaLabel as w } from "./lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js";
10
+ import { SingleLevelTaxonomyField as C } from "./lib/components/metadata-taxonomy-field/single-level-taxonomy-field.js";
11
+ import { UnsavedChangesModal as U } from "./lib/components/unsaved-changes-modal/unsaved-changes-modal.js";
12
+ import { defaultInitialValues as g, defaultMetadataValueMap as v } from "./lib/defaults.js";
13
+ import { MetadataEditor as B } from "./lib/metadata-editor.js";
14
+ import { U as H } from "../chunks/types.js";
15
+ export {
16
+ a as AddMetadataTemplateDropdown,
17
+ i as CustomInstanceNewField,
18
+ p as DeleteConfirmationModal,
19
+ r as FilterDropdownMenu,
20
+ B as MetadataEditor,
21
+ n as MetadataEmptyState,
22
+ s as MetadataInstanceForm,
23
+ l as MetadataInstanceFormHeader,
24
+ F as MetadataInstanceHeader,
25
+ I as MetadataInstanceList,
26
+ C as SingleLevelTaxonomyField,
27
+ U as UnsavedChangesModal,
28
+ H as UpdateMode,
29
+ L as autofillButtonAriaLabel,
30
+ g as defaultInitialValues,
31
+ v as defaultMetadataValueMap,
32
+ w as editButtonAriaLabel
33
+ };
@@ -0,0 +1,44 @@
1
+ import { IconButton as M } from "@box/blueprint-web";
2
+ import { Plus as T } from "@box/blueprint-web-assets/icons/Fill";
3
+ import { Space2 as E } from "@box/blueprint-web-assets/tokens/px-tokens";
4
+ import { useState as w, useMemo as y } from "react";
5
+ import { useIntl as C } from "react-intl";
6
+ import { TEMPLATE_CUSTOM_PROPERTIES as I } from "../../constants.js";
7
+ import { FilterDropdownMenu as t } from "../filter-dropdown-menu/index.js";
8
+ import s from "./messages.js";
9
+ import { jsxs as l, jsx as a } from "react/jsx-runtime";
10
+ const L = parseInt(E, 10);
11
+ function j({
12
+ availableTemplates: m,
13
+ onSelect: d,
14
+ selectedTemplates: c
15
+ }) {
16
+ const o = C(), p = o.formatMessage(s.customMetadataName), n = (e) => e.templateKey === I ? p : e.displayName, [r, u] = w(""), i = y(() => m.filter((e) => n(e).toLowerCase().includes(r.toLowerCase())), [m, r]), f = r.length > 0 && i.length === 0, g = (e) => c.some((S) => S.id === e.id), h = (e) => {
17
+ d(e);
18
+ };
19
+ return /* @__PURE__ */ l(t.Root, {
20
+ resetValueOnHide: !0,
21
+ setValue: u,
22
+ children: [/* @__PURE__ */ a(t.Trigger, {
23
+ triggerButton: /* @__PURE__ */ a(M, {
24
+ "aria-label": o.formatMessage(s.addMetadataTemplatesTriggerButtonLabel),
25
+ icon: T,
26
+ size: "x-small"
27
+ })
28
+ }), /* @__PURE__ */ l(t.Content, {
29
+ gutter: L,
30
+ children: [/* @__PURE__ */ a(t.Search, {
31
+ placeholder: o.formatMessage(s.addMetadataTemplatesSearchPlaceholder)
32
+ }), /* @__PURE__ */ a(t.List, {
33
+ children: f ? /* @__PURE__ */ a(t.EmptyState, {}) : i.map((e) => /* @__PURE__ */ a(t.Item, {
34
+ disabled: g(e),
35
+ onClick: () => h(e),
36
+ value: n(e)
37
+ }, e.id))
38
+ })]
39
+ })]
40
+ });
41
+ }
42
+ export {
43
+ j as AddMetadataTemplateDropdown
44
+ };
@@ -0,0 +1,4 @@
1
+ import { AddMetadataTemplateDropdown as e } from "./add-metadata-template-dropdown.js";
2
+ export {
3
+ e as AddMetadataTemplateDropdown
4
+ };
@@ -0,0 +1,18 @@
1
+ import { defineMessages as a } from "react-intl";
2
+ const t = a({
3
+ customMetadataName: {
4
+ id: "metadataEditor.addMetadataTemplate.customMetadataName",
5
+ defaultMessage: "Custom Metadata"
6
+ },
7
+ addMetadataTemplatesSearchPlaceholder: {
8
+ id: "metadataEditor.addMetadataTemplate.search.placeholder",
9
+ defaultMessage: "Search templates"
10
+ },
11
+ addMetadataTemplatesTriggerButtonLabel: {
12
+ id: "metadataEditor.addMetadataTemplate.trigger.label",
13
+ defaultMessage: "Add template"
14
+ }
15
+ });
16
+ export {
17
+ t as default
18
+ };
@@ -0,0 +1,19 @@
1
+ import { Menu as r } from "@ariakit/react";
2
+ import { s as n } from "../../../../chunks/filter-dropdown-menu.module.js";
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ const i = (e) => {
5
+ const {
6
+ children: t,
7
+ ...o
8
+ } = e;
9
+ return /* @__PURE__ */ s(r, {
10
+ ...o,
11
+ className: n.content,
12
+ hideOnHoverOutside: !0,
13
+ children: t
14
+ });
15
+ };
16
+ i.displayName = "FilterDropdownMenuContent";
17
+ export {
18
+ i as FilterDropdownMenuContent
19
+ };
@@ -0,0 +1,20 @@
1
+ import { useIntl as e } from "react-intl";
2
+ import { Text as o } from "@box/blueprint-web";
3
+ import { s } from "../../../../chunks/filter-dropdown-menu.module.js";
4
+ import r from "./messages.js";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ const n = () => {
7
+ const t = e().formatMessage(r.noResultsFound);
8
+ return /* @__PURE__ */ a(o, {
9
+ as: "p",
10
+ className: s.item,
11
+ color: "textOnLightSecondary",
12
+ variant: "bodyDefault",
13
+ children: t
14
+ });
15
+ };
16
+ n.displayName = "FilterDropdownMenuEmptyState";
17
+ export {
18
+ n as FilterDropdownMenuEmptyState,
19
+ n as default
20
+ };
@@ -0,0 +1,20 @@
1
+ import { ComboboxItem as t } from "@ariakit/react";
2
+ import m from "clsx";
3
+ import { s as o } from "../../../../chunks/filter-dropdown-menu.module.js";
4
+ import { jsx as s } from "react/jsx-runtime";
5
+ const i = (e) => {
6
+ const {
7
+ children: n,
8
+ ...r
9
+ } = e;
10
+ return /* @__PURE__ */ s(t, {
11
+ ...r,
12
+ className: m(o.item, o.option),
13
+ focusOnHover: !0,
14
+ setValueOnClick: !1
15
+ });
16
+ };
17
+ i.displayName = "FilterDropdownMenuItem";
18
+ export {
19
+ i as FilterDropdownMenuItem
20
+ };
@@ -0,0 +1,22 @@
1
+ import { ComboboxList as i } from "@ariakit/react";
2
+ import { ScrollableContainer as l } from "@box/blueprint-web";
3
+ import { s as o } from "../../../../chunks/filter-dropdown-menu.module.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ const m = (s) => {
6
+ const {
7
+ children: t,
8
+ ...e
9
+ } = s;
10
+ return /* @__PURE__ */ r(i, {
11
+ className: o.comboboxList,
12
+ ...e,
13
+ children: /* @__PURE__ */ r(l, {
14
+ className: o.scrollableContainer,
15
+ children: t
16
+ })
17
+ });
18
+ };
19
+ m.displayName = "FilterDropdownMenuList";
20
+ export {
21
+ m as FilterDropdownMenuList
22
+ };
@@ -0,0 +1,19 @@
1
+ import { ComboboxProvider as n, MenuProvider as i } from "@ariakit/react";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ const d = (r) => {
4
+ const {
5
+ children: e,
6
+ ...t
7
+ } = r;
8
+ return /* @__PURE__ */ o(n, {
9
+ ...t,
10
+ children: /* @__PURE__ */ o(i, {
11
+ focusLoop: !1,
12
+ children: e
13
+ })
14
+ });
15
+ };
16
+ d.displayName = "FilterDropdownMenuRoot";
17
+ export {
18
+ d as FilterDropdownMenuRoot
19
+ };
@@ -0,0 +1,44 @@
1
+ import { Combobox as c, ComboboxCancel as n } from "@ariakit/react";
2
+ import { IconButton as l, Divider as i } from "@box/blueprint-web";
3
+ import { Search as m, XMark as p } from "@box/blueprint-web-assets/icons/Fill";
4
+ import { IconIconOnLightSecondary as h, IconCtaIcon as u } from "@box/blueprint-web-assets/tokens/tokens";
5
+ import { useIntl as d } from "react-intl";
6
+ import { s as o } from "../../../../chunks/filter-dropdown-menu.module.js";
7
+ import f from "./messages.js";
8
+ import { jsxs as r, Fragment as I, jsx as e } from "react/jsx-runtime";
9
+ const b = () => /* @__PURE__ */ e(p, {
10
+ role: "presentation"
11
+ }), x = (a) => {
12
+ const {
13
+ ...s
14
+ } = a, t = d().formatMessage(f.cancelButtonAriaLabel);
15
+ return /* @__PURE__ */ r(I, {
16
+ children: [/* @__PURE__ */ r("div", {
17
+ className: o.search,
18
+ children: [/* @__PURE__ */ e(m, {
19
+ className: o.searchIcon,
20
+ color: h,
21
+ role: "presentation"
22
+ }), /* @__PURE__ */ e(c, {
23
+ "aria-haspopup": "false",
24
+ autoSelect: !0,
25
+ className: o.searchInput,
26
+ ...s
27
+ }), /* @__PURE__ */ e(n, {
28
+ render: /* @__PURE__ */ e(l, {
29
+ "aria-label": t,
30
+ className: o.clearSearchIcon,
31
+ color: u,
32
+ icon: b,
33
+ size: "x-small"
34
+ })
35
+ })]
36
+ }), /* @__PURE__ */ e(i, {
37
+ className: o.searchDivider
38
+ })]
39
+ });
40
+ };
41
+ x.displayName = "FilterDropdownMenuItem";
42
+ export {
43
+ x as FilterDropdownMenuSearch
44
+ };