@bynder/compact-view 5.1.3 → 5.1.4

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 (376) hide show
  1. package/ActiveFilter.js +33 -0
  2. package/ActiveFilter.js.map +1 -0
  3. package/ActiveFilters.js +81 -0
  4. package/ActiveFilters.js.map +1 -0
  5. package/AddMedia.js +90 -0
  6. package/AddMedia.js.map +1 -0
  7. package/Advanced.js +66 -0
  8. package/Advanced.js.map +1 -0
  9. package/App.d.ts +1 -1
  10. package/App.js +89 -0
  11. package/App.js.map +1 -0
  12. package/AssetCard.js +172 -0
  13. package/AssetCard.js.map +1 -0
  14. package/AssetCardMetaproperties.js +47 -0
  15. package/AssetCardMetaproperties.js.map +1 -0
  16. package/AssetFilter.js +158 -0
  17. package/AssetFilter.js.map +1 -0
  18. package/AssetFilterContext.js +162 -0
  19. package/AssetFilterContext.js.map +1 -0
  20. package/AssetItem.js +40 -0
  21. package/AssetItem.js.map +1 -0
  22. package/AssetList.js +158 -0
  23. package/AssetList.js.map +1 -0
  24. package/AssetTypeItem.js +34 -0
  25. package/AssetTypeItem.js.map +1 -0
  26. package/AssetsView.js +61 -0
  27. package/AssetsView.js.map +1 -0
  28. package/Autocomplete.js +148 -0
  29. package/Autocomplete.js.map +1 -0
  30. package/ButtonAction.js +14 -0
  31. package/ButtonAction.js.map +1 -0
  32. package/CardSkeleton.js +31 -0
  33. package/CardSkeleton.js.map +1 -0
  34. package/Checkbox.styles.js +38 -0
  35. package/Checkbox.styles.js.map +1 -0
  36. package/Chip.js +43 -0
  37. package/Chip.js.map +1 -0
  38. package/CollectionCard.js +56 -0
  39. package/CollectionCard.js.map +1 -0
  40. package/CollectionItem.js +41 -0
  41. package/CollectionItem.js.map +1 -0
  42. package/CollectionList.js +53 -0
  43. package/CollectionList.js.map +1 -0
  44. package/CollectionView.js +73 -0
  45. package/CollectionView.js.map +1 -0
  46. package/CollectionsView.js +58 -0
  47. package/CollectionsView.js.map +1 -0
  48. package/ConfigContext.js +18 -0
  49. package/ConfigContext.js.map +1 -0
  50. package/ConnectButton.js +20 -0
  51. package/ConnectButton.js.map +1 -0
  52. package/Container.js +52 -0
  53. package/Container.js.map +1 -0
  54. package/ContextAction.js +42 -0
  55. package/ContextAction.js.map +1 -0
  56. package/Dat/Dat.d.ts +2 -12
  57. package/Dat/DatDropdownItem.d.ts +1 -1
  58. package/Dat/index.d.ts +0 -1
  59. package/Dat.js +90 -0
  60. package/Dat.js.map +1 -0
  61. package/DatDropdownItem.js +47 -0
  62. package/DatDropdownItem.js.map +1 -0
  63. package/DesignSystemContext.js +12 -0
  64. package/DesignSystemContext.js.map +1 -0
  65. package/DirectionSelect.js +43 -0
  66. package/DirectionSelect.js.map +1 -0
  67. package/DocumentIcon.js +69 -0
  68. package/DocumentIcon.js.map +1 -0
  69. package/DomainInput.js +39 -0
  70. package/DomainInput.js.map +1 -0
  71. package/DragSelect.js +144 -0
  72. package/DragSelect.js.map +1 -0
  73. package/Dropdown.js +72 -0
  74. package/Dropdown.js.map +1 -0
  75. package/DropdownContent.js +59 -0
  76. package/DropdownContent.js.map +1 -0
  77. package/DropdownListItem.js +52 -0
  78. package/DropdownListItem.js.map +1 -0
  79. package/ErrorIcon.js +48 -0
  80. package/ErrorIcon.js.map +1 -0
  81. package/ErrorMessage.js +40 -0
  82. package/ErrorMessage.js.map +1 -0
  83. package/FieldSelect.js +74 -0
  84. package/FieldSelect.js.map +1 -0
  85. package/FileSelector.js +239 -0
  86. package/FileSelector.js.map +1 -0
  87. package/Header.js +42 -0
  88. package/Header.js.map +1 -0
  89. package/HorizontalScroll.js +51 -0
  90. package/HorizontalScroll.js.map +1 -0
  91. package/InfiniteScroll.js +26 -0
  92. package/InfiniteScroll.js.map +1 -0
  93. package/LeftArrow.js +31 -0
  94. package/LeftArrow.js.map +1 -0
  95. package/LoginComponent.js +32 -0
  96. package/LoginComponent.js.map +1 -0
  97. package/LoginContext.js +85 -0
  98. package/LoginContext.js.map +1 -0
  99. package/MetapropertyFilterContent.js +25 -0
  100. package/MetapropertyFilterContent.js.map +1 -0
  101. package/MetapropertyOption.js +24 -0
  102. package/MetapropertyOption.js.map +1 -0
  103. package/Modal.js +48 -0
  104. package/Modal.js.map +1 -0
  105. package/NoResults.js +51 -0
  106. package/NoResults.js.map +1 -0
  107. package/Oops.js +54 -0
  108. package/Oops.js.map +1 -0
  109. package/Option.js +50 -0
  110. package/Option.js.map +1 -0
  111. package/RefreshingSpinner.js +22 -0
  112. package/RefreshingSpinner.js.map +1 -0
  113. package/ReportModal.js +51 -0
  114. package/ReportModal.js.map +1 -0
  115. package/RightArrow.js +31 -0
  116. package/RightArrow.js.map +1 -0
  117. package/RootElementContext.js +12 -0
  118. package/RootElementContext.js.map +1 -0
  119. package/SearchInput.js +76 -0
  120. package/SearchInput.js.map +1 -0
  121. package/SelectedItemContainer.js +44 -0
  122. package/SelectedItemContainer.js.map +1 -0
  123. package/SelectedItems.js +27 -0
  124. package/SelectedItems.js.map +1 -0
  125. package/SelectionContext.js +144 -0
  126. package/SelectionContext.js.map +1 -0
  127. package/SelectionFooter.js +65 -0
  128. package/SelectionFooter.js.map +1 -0
  129. package/ShadowRoot.js +11 -0
  130. package/ShadowRoot.js.map +1 -0
  131. package/ShadowRootInternal.js +78 -0
  132. package/ShadowRootInternal.js.map +1 -0
  133. package/Shield.js +25 -0
  134. package/Shield.js.map +1 -0
  135. package/Skeleton.js +43 -0
  136. package/Skeleton.js.map +1 -0
  137. package/SmartFilterContent.js +11 -0
  138. package/SmartFilterContent.js.map +1 -0
  139. package/SmartFilterSelect.js +91 -0
  140. package/SmartFilterSelect.js.map +1 -0
  141. package/Smartfilters.js +186 -0
  142. package/Smartfilters.js.map +1 -0
  143. package/Spinner.js +32 -0
  144. package/Spinner.js.map +1 -0
  145. package/StatefulAssetList.js +100 -0
  146. package/StatefulAssetList.js.map +1 -0
  147. package/Styles.css.js +5 -0
  148. package/Styles.css.js.map +1 -0
  149. package/SwitchNLS.js +80 -0
  150. package/SwitchNLS.js.map +1 -0
  151. package/TagItem.js +38 -0
  152. package/TagItem.js.map +1 -0
  153. package/Tags.js +48 -0
  154. package/Tags.js.map +1 -0
  155. package/Theming.js +30 -0
  156. package/Theming.js.map +1 -0
  157. package/Toolbar.js +53 -0
  158. package/Toolbar.js.map +1 -0
  159. package/Tooltip.js +81 -0
  160. package/Tooltip.js.map +1 -0
  161. package/ViewSwitch.js +45 -0
  162. package/ViewSwitch.js.map +1 -0
  163. package/api/filterAssets.d.ts +1 -1
  164. package/api/getCollections.d.ts +1 -1
  165. package/api/getFilters.d.ts +1 -1
  166. package/api/getSimilarityAssets.d.ts +1 -1
  167. package/api/index.d.ts +2 -2
  168. package/api/rest/autocomplete.d.ts +1 -1
  169. package/api/rest/getAssetCounts.d.ts +2 -2
  170. package/api/rest/getInitialFilters.d.ts +2 -2
  171. package/api/rest/getMetapropertiesOptions.d.ts +1 -1
  172. package/app-config/ConfigContext.d.ts +3 -4
  173. package/app-config/appConfig.type.guard.d.ts +1 -1
  174. package/asset.type.js +31 -0
  175. package/asset.type.js.map +1 -0
  176. package/asyncDebounce.js +14 -0
  177. package/asyncDebounce.js.map +1 -0
  178. package/auth.js +35 -0
  179. package/auth.js.map +1 -0
  180. package/autocomplete2.js +25 -0
  181. package/autocomplete2.js.map +1 -0
  182. package/base64Converter.js +15 -0
  183. package/base64Converter.js.map +1 -0
  184. package/chunk.js +10 -0
  185. package/chunk.js.map +1 -0
  186. package/class.js +7 -0
  187. package/class.js.map +1 -0
  188. package/combineFilters.js +9 -0
  189. package/combineFilters.js.map +1 -0
  190. package/combineMetaproperties.js +25 -0
  191. package/combineMetaproperties.js.map +1 -0
  192. package/common/components/CardSkeleton.d.ts +1 -1
  193. package/common/components/Checkbox.styles.d.ts +4 -4
  194. package/common/components/Chip.d.ts +1 -1
  195. package/common/components/DocumentIcon.d.ts +1 -1
  196. package/common/components/DragSelect.d.ts +1 -1
  197. package/common/components/HorizontalScroll.d.ts +1 -1
  198. package/common/components/InfiniteScroll.d.ts +1 -1
  199. package/common/components/LeftArrow.d.ts +1 -1
  200. package/common/components/Modal.d.ts +1 -1
  201. package/common/components/NoResults.d.ts +1 -1
  202. package/common/components/RightArrow.d.ts +1 -1
  203. package/common/components/Skeleton.d.ts +1 -1
  204. package/common/components/Spinner.d.ts +1 -1
  205. package/common/components/Tooltip.d.ts +1 -1
  206. package/common/components/dropdown/Dropdown.d.ts +1 -1
  207. package/common/components/dropdown/DropdownContent.d.ts +1 -1
  208. package/common/components/dropdown/DropdownListItem.d.ts +1 -1
  209. package/common/hooks/useClickOutside.d.ts +1 -1
  210. package/constants.js +15 -0
  211. package/constants.js.map +1 -0
  212. package/createSelectors.js +11 -0
  213. package/createSelectors.js.map +1 -0
  214. package/crypto.js +21 -0
  215. package/crypto.js.map +1 -0
  216. package/error-handling/ErrorIcon.d.ts +1 -1
  217. package/error-handling/ErrorMessage.d.ts +1 -1
  218. package/error-handling/Oops.d.ts +1 -1
  219. package/error-handling/ReportModal.d.ts +1 -1
  220. package/error-handling/Shield.d.ts +1 -1
  221. package/filter/AssetFilter.d.ts +1 -1
  222. package/filter/AssetFilterContext.d.ts +3 -3
  223. package/filter/active-filters/ActiveFilter.d.ts +1 -1
  224. package/filter/active-filters/ActiveFilters.d.ts +1 -1
  225. package/filter/filters/advanced/Advanced.d.ts +1 -1
  226. package/filter/filters/advanced/AssetTypeItem.d.ts +1 -1
  227. package/filter/filters/metaproperty/Metaproperty.d.ts +1 -1
  228. package/filter/filters/metaproperty/MetapropertyFilterContent.d.ts +1 -1
  229. package/filter/filters/metaproperty/MetapropertyOption.d.ts +1 -1
  230. package/filter/filters/metaproperty/SmartFilterContent.d.ts +1 -1
  231. package/filter/filters/smartfilters/Metaproperties/Autocomplete.d.ts +3 -3
  232. package/filter/filters/smartfilters/Metaproperties/Option.d.ts +2 -2
  233. package/filter/filters/smartfilters/Metaproperties/SmartFilterSelect.d.ts +2 -2
  234. package/filter/filters/smartfilters/Smartfilters.d.ts +2 -2
  235. package/filter/filters/tags/TagItem.d.ts +1 -1
  236. package/filter/filters/tags/Tags.d.ts +1 -1
  237. package/filterAssets.js +175 -0
  238. package/filterAssets.js.map +1 -0
  239. package/filterEmptyMetaproperties.js +11 -0
  240. package/filterEmptyMetaproperties.js.map +1 -0
  241. package/getAsset.js +70 -0
  242. package/getAsset.js.map +1 -0
  243. package/getAssetCounts.js +27 -0
  244. package/getAssetCounts.js.map +1 -0
  245. package/getAssets.js +137 -0
  246. package/getAssets.js.map +1 -0
  247. package/getCollections.js +78 -0
  248. package/getCollections.js.map +1 -0
  249. package/getFilters.js +84 -0
  250. package/getFilters.js.map +1 -0
  251. package/getInitialFilters.js +51 -0
  252. package/getInitialFilters.js.map +1 -0
  253. package/getMetapropertiesOptions.js +31 -0
  254. package/getMetapropertiesOptions.js.map +1 -0
  255. package/getSimilarityAssets.js +141 -0
  256. package/getSimilarityAssets.js.map +1 -0
  257. package/handlers.js +11 -0
  258. package/handlers.js.map +1 -0
  259. package/helpers.js +7 -0
  260. package/helpers.js.map +1 -0
  261. package/index.js +9 -1162
  262. package/index.js.map +1 -0
  263. package/index2.js +18 -0
  264. package/index2.js.map +1 -0
  265. package/index3.js +36 -0
  266. package/index3.js.map +1 -0
  267. package/index4.js +20 -0
  268. package/index4.js.map +1 -0
  269. package/logger.js +7 -0
  270. package/logger.js.map +1 -0
  271. package/login/LoginComponent.d.ts +1 -1
  272. package/login/LoginContext.d.ts +1 -1
  273. package/login/components/ConnectButton.d.ts +1 -1
  274. package/login/components/Container.d.ts +1 -1
  275. package/login/components/DomainInput.d.ts +1 -1
  276. package/login/components/Header.d.ts +1 -1
  277. package/login/components/RefreshingSpinner.d.ts +1 -1
  278. package/loginwindow.js +84 -0
  279. package/loginwindow.js.map +1 -0
  280. package/normalizeResponse.js +31 -0
  281. package/normalizeResponse.js.map +1 -0
  282. package/oauth2.js +87 -0
  283. package/oauth2.js.map +1 -0
  284. package/order/DirectionSelect.d.ts +1 -1
  285. package/order/FieldSelect.d.ts +2 -2
  286. package/package.json +2 -9
  287. package/result.type.js +25 -0
  288. package/result.type.js.map +1 -0
  289. package/router/RouterContext.d.ts +1 -1
  290. package/search/SearchInput.d.ts +1 -1
  291. package/search/SwitchNLS.d.ts +1 -1
  292. package/search/index.d.ts +0 -2
  293. package/select/FileSelector.d.ts +1 -1
  294. package/select/SelectionContext.d.ts +1 -1
  295. package/select/SelectionFooter.d.ts +1 -1
  296. package/select/add-media/AddMedia.d.ts +1 -1
  297. package/select/add-media/ButtonAction.d.ts +1 -1
  298. package/select/current-selection/AssetItem.d.ts +1 -1
  299. package/select/current-selection/CollectionItem.d.ts +1 -1
  300. package/select/current-selection/SelectedItemContainer.d.ts +1 -1
  301. package/select/current-selection/SelectedItems.d.ts +1 -1
  302. package/store/useDatStore.d.ts +73 -0
  303. package/store/useOrderingStore.d.ts +2 -2
  304. package/store/useRouterStore.d.ts +4 -4
  305. package/store/useSearchStore.d.ts +69 -0
  306. package/store/useSimilaritySearchStore.d.ts +67 -0
  307. package/style/DesignSystemContext.d.ts +1 -1
  308. package/style/RootElementContext.d.ts +1 -1
  309. package/style/Theming.d.ts +1 -1
  310. package/style/shadowroot/ShadowRoot.d.ts +1 -1
  311. package/style/shadowroot/ShadowRootInternal.d.ts +1 -1
  312. package/text.js +9 -0
  313. package/text.js.map +1 -0
  314. package/toolbar/Toolbar.d.ts +1 -1
  315. package/toolbar/ViewSwitch.d.ts +1 -1
  316. package/trimMetapropertyValue.js +6 -0
  317. package/trimMetapropertyValue.js.map +1 -0
  318. package/url.js +7 -0
  319. package/url.js.map +1 -0
  320. package/useAccountDomain.js +33 -0
  321. package/useAccountDomain.js.map +1 -0
  322. package/useAuthInformation.js +42 -0
  323. package/useAuthInformation.js.map +1 -0
  324. package/useClickOutside.js +16 -0
  325. package/useClickOutside.js.map +1 -0
  326. package/useDatStore.js +62 -0
  327. package/useDatStore.js.map +1 -0
  328. package/useDimensions.js +31 -0
  329. package/useDimensions.js.map +1 -0
  330. package/useOrderingStore.js +27 -0
  331. package/useOrderingStore.js.map +1 -0
  332. package/useRouterStore.js +21 -0
  333. package/useRouterStore.js.map +1 -0
  334. package/useSearchStore.js +49 -0
  335. package/useSearchStore.js.map +1 -0
  336. package/useSimilaritySearchStore.js +28 -0
  337. package/useSimilaritySearchStore.js.map +1 -0
  338. package/utils/base64Converter.d.ts +1 -1
  339. package/utils/combineFilters.d.ts +1 -1
  340. package/utils/combineMetaproperties.d.ts +2 -2
  341. package/utils/filterEmptyMetaproperties.d.ts +1 -1
  342. package/utils/getMetaPropertiesForFilter.d.ts +1 -1
  343. package/utils/normalizeResponse.d.ts +1 -1
  344. package/utils.js +49 -0
  345. package/utils.js.map +1 -0
  346. package/utils2.js +51 -0
  347. package/utils2.js.map +1 -0
  348. package/views/asset/AssetList.d.ts +5 -3
  349. package/views/asset/AssetsView.d.ts +1 -1
  350. package/views/asset/StatefulAssetList.d.ts +2 -2
  351. package/views/asset/asset-card/AssetCard.d.ts +1 -1
  352. package/views/asset/asset-card/AssetCardMetaproperties.d.ts +3 -3
  353. package/views/asset/asset-card/ContextAction.d.ts +1 -1
  354. package/views/collection/CollectionView.d.ts +1 -1
  355. package/views/collections/CollectionCard.d.ts +1 -1
  356. package/views/collections/CollectionList.d.ts +1 -1
  357. package/views/collections/CollectionsView.d.ts +1 -1
  358. package/Dat/DatContext.d.ts +0 -12
  359. package/__tests__/utils/index.d.ts +0 -116
  360. package/api/__tests__/testMocks/mocks.d.ts +0 -14
  361. package/api/__tests__/utils.d.ts +0 -10
  362. package/common/components/__mocks__/Tooltip.d.ts +0 -6
  363. package/common/components/__tests__/utils.d.ts +0 -34
  364. package/error-handling/__tests__/utils.d.ts +0 -56
  365. package/filter/__tests__/utils.d.ts +0 -13
  366. package/index.mjs +0 -1163
  367. package/login/__tests__/mocks.d.ts +0 -1
  368. package/login/__tests__/utils.d.ts +0 -41
  369. package/search/SearchContext.d.ts +0 -25
  370. package/search/SimilaritySearchContext.d.ts +0 -21
  371. package/search/__mocks__/SimilaritySearchContext.d.ts +0 -5
  372. package/select/__tests__/utils.d.ts +0 -11
  373. package/style/shadowroot/__mocks__/ShadowRoot.d.ts +0 -4
  374. package/utils/__mocks__/logger.d.ts +0 -4
  375. package/views/asset/__tests__/utils.d.ts +0 -7
  376. package/views/collections/__tests__/utils.d.ts +0 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSearchStore.js","sources":["../../src/store/useSearchStore.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { devtools } from 'zustand/middleware';\nimport { create } from 'zustand';\nimport { createSelectors } from './utils/createSelectors';\nimport { useRouterSelectors } from './useRouterStore';\n\ntype Page = 'assets' | 'collections' | 'collection';\n\ninterface State {\n\tassets: string;\n\tcollection: string;\n\tcollections: string;\n\tisLoading: boolean;\n}\n\ninterface Actions {\n\tsetSearch: (page: Page, value: string) => void;\n\tsetIsLoading: (isLoading: boolean) => void;\n\tclear: () => void;\n}\n\ntype SearchStore = State & Actions;\n\nconst initialState: State = {\n\tassets: '',\n\tcollection: '',\n\tcollections: '',\n\tisLoading: false,\n};\n\nexport const useSearchStore = create<SearchStore>()(\n\tdevtools(\n\t\t(set) => ({\n\t\t\t...initialState,\n\n\t\t\tsetSearch: (page, value) => {\n\t\t\t\tconst isLoading = value !== '';\n\t\t\t\tset((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\t[page]: value,\n\t\t\t\t\tisLoading,\n\t\t\t\t}));\n\t\t\t},\n\n\t\t\tsetIsLoading: (isLoading) => set((state) => ({ ...state, isLoading })),\n\n\t\t\tclear: () => set(() => ({ ...initialState })),\n\t\t}),\n\t\t{ name: 'SearchStore', enabled: process.env.NODE_ENV === 'development' },\n\t),\n);\n\nexport const useSearchSelectors = createSelectors(useSearchStore);\n\nexport function useSearchStateByPage(page: Page) {\n\tconst value = useSearchStore((state) => state[page]);\n\tconst { isLoading, setSearch, setIsLoading } = useSearchStore();\n\n\treturn {\n\t\tvalue,\n\t\tisLoading,\n\t\tsetSearch: (newValue: string) => setSearch(page, newValue),\n\t\tsetIsLoading,\n\t};\n}\n\nexport function useClearCollectionOnPageChange(\n\tpage?: ReturnType<typeof useRouterSelectors.use.page>,\n) {\n\tconst setSearch = useSearchStore((state) => state.setSearch);\n\n\tuseEffect(() => {\n\t\tsetSearch('collection', '');\n\t}, [page, setSearch]);\n}\n"],"names":["initialState","useSearchStore","create","devtools","set","page","value","isLoading","state","createSelectors","useSearchStateByPage","setSearch","setIsLoading","newValue","useClearCollectionOnPageChange","useEffect"],"mappings":";;;;AAuBA,MAAMA,IAAsB;AAAA,EAC3B,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,WAAW;AACZ,GAEaC,IAAiBC,EAAA;AAAA,EAC7BC;AAAA,IACC,CAACC,OAAS;AAAA,MACT,GAAGJ;AAAA,MAEH,WAAW,CAACK,GAAMC,MAAU;AAC3B,cAAMC,IAAYD,MAAU;AAC5B,QAAAF,EAAI,CAACI,OAAW;AAAA,UACf,GAAGA;AAAA,UACH,CAACH,CAAI,GAAGC;AAAA,UACR,WAAAC;AAAA,QAAA,EACC;AAAA,MACH;AAAA,MAEA,cAAc,CAACA,MAAcH,EAAI,CAACI,OAAW,EAAE,GAAGA,GAAO,WAAAD,EAAA,EAAY;AAAA,MAErE,OAAO,MAAMH,EAAI,OAAO,EAAE,GAAGJ,IAAe;AAAA,IAAA;AAAA,IAE7C,EAAE,MAAM,eAAe,SAAS,GAAA;AAAA,EAAuC;AAEzE;AAEkCS,EAAgBR,CAAc;AAEzD,SAASS,EAAqBL,GAAY;AAChD,QAAMC,IAAQL,EAAe,CAACO,MAAUA,EAAMH,CAAI,CAAC,GAC7C,EAAE,WAAAE,GAAW,WAAAI,GAAW,cAAAC,EAAA,IAAiBX,EAAA;AAE/C,SAAO;AAAA,IACN,OAAAK;AAAA,IACA,WAAAC;AAAA,IACA,WAAW,CAACM,MAAqBF,EAAUN,GAAMQ,CAAQ;AAAA,IACzD,cAAAD;AAAA,EAAA;AAEF;AAEO,SAASE,EACfT,GACC;AACD,QAAMM,IAAYV,EAAe,CAACO,MAAUA,EAAM,SAAS;AAE3D,EAAAO,EAAU,MAAM;AACf,IAAAJ,EAAU,cAAc,EAAE;AAAA,EAC3B,GAAG,CAACN,GAAMM,CAAS,CAAC;AACrB;"}
@@ -0,0 +1,28 @@
1
+ import { create as s } from "zustand";
2
+ import { devtools as i } from "zustand/middleware";
3
+ import { createSelectors as l } from "./createSelectors.js";
4
+ const r = s()(
5
+ i(
6
+ (t) => ({
7
+ isEnabled: !1,
8
+ isSelected: !1,
9
+ isNLSSelected: !1,
10
+ NLSSearchText: void 0,
11
+ similarityAssetsData: { tag: "Loading", value: null },
12
+ setIsEnabled: (e) => t({ isEnabled: e }),
13
+ setIsSelected: (e) => t({ isSelected: e }),
14
+ setIsNLSSelected: (e) => t({ isNLSSelected: e }),
15
+ setNLSSearchText: (e) => t({ NLSSearchText: e }),
16
+ setSimilarityAssetsData: (e) => t({ similarityAssetsData: e }),
17
+ updateSimilarityAssetsData: (e) => {
18
+ t((a) => ({ similarityAssetsData: e(a.similarityAssetsData) }));
19
+ }
20
+ }),
21
+ { name: "SimilaritySearchStore", enabled: !1 }
22
+ )
23
+ );
24
+ l(r);
25
+ export {
26
+ r as useSimilaritySearchStore
27
+ };
28
+ //# sourceMappingURL=useSimilaritySearchStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSimilaritySearchStore.js","sources":["../../src/store/useSimilaritySearchStore.ts"],"sourcesContent":["import { create } from 'zustand';\nimport { devtools } from 'zustand/middleware';\nimport { createSelectors } from './utils/createSelectors';\nimport { GraphqlResponse } from '@src/api/filterAssets';\nimport { Data } from '@src/api/graphql.types';\n\ninterface SimilaritySearchState {\n\tisEnabled: boolean;\n\tisSelected: boolean;\n\tisNLSSelected: boolean;\n\tNLSSearchText?: string;\n\tsetIsEnabled: (isEnabled: boolean) => void;\n\tsetIsSelected: (isSelected: boolean) => void;\n\tsetIsNLSSelected: (isNLSSelected: boolean) => void;\n\tsetNLSSearchText: (NLSSearchText?: string) => void;\n\tsetSimilarityAssetsData: (similarityAssetsData: Data<GraphqlResponse>) => void;\n\tsimilarityAssetsData: Data<GraphqlResponse>;\n\tupdateSimilarityAssetsData: (\n\t\tfn: (prev: Data<GraphqlResponse>) => Data<GraphqlResponse>,\n\t) => void;\n}\n\nexport const useSimilaritySearchStore = create<SimilaritySearchState>()(\n\tdevtools(\n\t\t(set) => ({\n\t\t\tisEnabled: false,\n\t\t\tisSelected: false,\n\t\t\tisNLSSelected: false,\n\t\t\tNLSSearchText: <string | undefined>undefined,\n\t\t\tsimilarityAssetsData: <Data<GraphqlResponse>>{ tag: 'Loading', value: null },\n\n\t\t\tsetIsEnabled: (isEnabled: boolean) => set({ isEnabled }),\n\t\t\tsetIsSelected: (isSelected: boolean) => set({ isSelected }),\n\t\t\tsetIsNLSSelected: (isNLSSelected: boolean) => set({ isNLSSelected }),\n\t\t\tsetNLSSearchText: (NLSSearchText?: string) => set({ NLSSearchText }),\n\t\t\tsetSimilarityAssetsData: (similarityAssetsData: Data<GraphqlResponse>) =>\n\t\t\t\tset({ similarityAssetsData }),\n\t\t\tupdateSimilarityAssetsData: (\n\t\t\t\tfn: (prev: Data<GraphqlResponse>) => Data<GraphqlResponse>,\n\t\t\t) => {\n\t\t\t\tset((state) => ({ similarityAssetsData: fn(state.similarityAssetsData) }));\n\t\t\t},\n\t\t}),\n\t\t{ name: 'SimilaritySearchStore', enabled: process.env.NODE_ENV === 'development' },\n\t),\n);\n\nexport const useSimilaritySearchSelectors = createSelectors(useSimilaritySearchStore);\n"],"names":["useSimilaritySearchStore","create","devtools","set","isEnabled","isSelected","isNLSSelected","NLSSearchText","similarityAssetsData","fn","state","createSelectors"],"mappings":";;;AAsBO,MAAMA,IAA2BC,EAAA;AAAA,EACvCC;AAAA,IACC,CAACC,OAAS;AAAA,MACT,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,eAAmC;AAAA,MACnC,sBAA6C,EAAE,KAAK,WAAW,OAAO,KAAA;AAAA,MAEtE,cAAc,CAACC,MAAuBD,EAAI,EAAE,WAAAC,GAAW;AAAA,MACvD,eAAe,CAACC,MAAwBF,EAAI,EAAE,YAAAE,GAAY;AAAA,MAC1D,kBAAkB,CAACC,MAA2BH,EAAI,EAAE,eAAAG,GAAe;AAAA,MACnE,kBAAkB,CAACC,MAA2BJ,EAAI,EAAE,eAAAI,GAAe;AAAA,MACnE,yBAAyB,CAACC,MACzBL,EAAI,EAAE,sBAAAK,GAAsB;AAAA,MAC7B,4BAA4B,CAC3BC,MACI;AACJ,QAAAN,EAAI,CAACO,OAAW,EAAE,sBAAsBD,EAAGC,EAAM,oBAAoB,IAAI;AAAA,MAC1E;AAAA,IAAA;AAAA,IAED,EAAE,MAAM,yBAAyB,SAAS,GAAA;AAAA,EAAuC;AAEnF;AAE4CC,EAAgBX,CAAwB;"}
@@ -1,3 +1,3 @@
1
- import { selectedSmartfilterOptionsType } from '@src/api/rest/types';
1
+ import { selectedSmartfilterOptionsType } from '../api/rest/types';
2
2
  export declare const convertOptionsToBase64: (options: selectedSmartfilterOptionsType | undefined) => string[] | undefined;
3
3
  export declare const convertAssetIdToBase64: (assetId: string) => string;
@@ -1,4 +1,4 @@
1
- import { AssetType } from '@src/views/asset/asset.type';
1
+ import { AssetType } from '../views/asset/asset.type';
2
2
  type AssetTypeFiltersParams = {
3
3
  filters?: string[] | AssetType[];
4
4
  predefinedFilters?: string[] | AssetType[];
@@ -1,5 +1,5 @@
1
- import { MetapropertyType } from '@src/filter/filters/metaproperty/MetapropertyFilterContent';
2
- import { TextMetapropertiesType } from '@src/views/asset/asset.type';
1
+ import { MetapropertyType } from '../filter/filters/metaproperty/MetapropertyFilterContent';
2
+ import { TextMetapropertiesType } from '../views/asset/asset.type';
3
3
  interface ReturnType {
4
4
  label: string;
5
5
  value: string;
@@ -1,2 +1,2 @@
1
- import { SmartfilterMetaproperty } from '@src/api/rest/types';
1
+ import { SmartfilterMetaproperty } from '../api/rest/types';
2
2
  export declare const filterEmptyMetaproperties: (metaproperties: Record<string, Record<string, SmartfilterMetaproperty>>) => {};
@@ -1,2 +1,2 @@
1
- import { MetapropertyOptionType } from '@src/filter/filters/metaproperty/MetapropertyOption';
1
+ import { MetapropertyOptionType } from '../filter/filters/metaproperty/MetapropertyOption';
2
2
  export declare const getMetaProperties: (metaproperties: MetapropertyOptionType[] | undefined) => string[] | undefined;
@@ -1,3 +1,3 @@
1
- import { File } from '@src/select/file.type';
1
+ import { File } from '../select/file.type';
2
2
  export declare function normalizeFilesResponse(files: Record<string, File>): Record<string, File>;
3
3
  export declare function normalizeAssetsResponse(response: any): any;
package/utils.js ADDED
@@ -0,0 +1,49 @@
1
+ import { __ as i } from "./index2.js";
2
+ const s = [
3
+ "xls",
4
+ "xlsx",
5
+ "ppt",
6
+ "pdf",
7
+ "pptx",
8
+ "indd",
9
+ "mp4",
10
+ "wav",
11
+ "docx",
12
+ "doc",
13
+ "numbers",
14
+ "pages",
15
+ "otf",
16
+ "txt",
17
+ "ttf",
18
+ "mov",
19
+ "avi",
20
+ "mpeg",
21
+ "webm",
22
+ "fla",
23
+ "aiff",
24
+ "mp3",
25
+ "m4r",
26
+ "zip",
27
+ "rar"
28
+ ];
29
+ function m(e) {
30
+ if (e.derivatives.thumbnail)
31
+ return e.derivatives.thumbnail;
32
+ const t = e.extensions[0];
33
+ return s.includes(t) ? `https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/${t}.jpg` : t === "aif" ? "https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/aiff.jpg" : t === "m4a" ? "https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/m4r.jpg" : "https://d8ejoa1fys2rk.cloudfront.net/includes/img/common/no-image.png";
34
+ }
35
+ function a(e) {
36
+ const t = e.isArchived && i("archived"), n = e.isWatermarked && i("watermarked"), r = e.isLimitedUse && i("limited");
37
+ return [t, n, r].filter((o) => o).join(", ");
38
+ }
39
+ function u(e) {
40
+ const t = e.extensions[0];
41
+ return t?.toUpperCase() === "JPG" ? "JPEG" : t?.toUpperCase();
42
+ }
43
+ export {
44
+ u as getExtension,
45
+ a as getStatusText,
46
+ m as getThumbnail,
47
+ s as supportedExtensionsWithThumbnails
48
+ };
49
+ //# sourceMappingURL=utils.js.map
package/utils.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../src/views/asset/asset-card/utils.ts"],"sourcesContent":["import { __ } from '../../../localization';\nimport { Asset } from '../asset.type';\n\nexport const supportedExtensionsWithThumbnails = [\n\t'xls',\n\t'xlsx',\n\t'ppt',\n\t'pdf',\n\t'pptx',\n\t'indd',\n\t'mp4',\n\t'wav',\n\t'docx',\n\t'doc',\n\t'numbers',\n\t'pages',\n\t'otf',\n\t'txt',\n\t'ttf',\n\t'mov',\n\t'avi',\n\t'mpeg',\n\t'webm',\n\t'fla',\n\t'aiff',\n\t'mp3',\n\t'm4r',\n\t'zip',\n\t'rar',\n];\n\nexport function getThumbnail(asset: Asset) {\n\tif (asset.derivatives.thumbnail) {\n\t\treturn asset.derivatives.thumbnail;\n\t}\n\n\tconst extension = asset.extensions[0];\n\n\tif (supportedExtensionsWithThumbnails.includes(extension)) {\n\t\treturn `${process.env.BYNDER_THEMES_CLOUDFRONT_URL}/includes/img/placeholder/medium/${extension}.jpg`;\n\t} else if (extension === 'aif') {\n\t\treturn `${process.env.BYNDER_THEMES_CLOUDFRONT_URL}/includes/img/placeholder/medium/aiff.jpg`;\n\t} else if (extension === 'm4a') {\n\t\treturn `${process.env.BYNDER_THEMES_CLOUDFRONT_URL}/includes/img/placeholder/medium/m4r.jpg`;\n\t}\n\n\treturn `${process.env.BYNDER_THEMES_CLOUDFRONT_URL}/includes/img/common/no-image.png`;\n}\n\nexport function getStatusText(asset: Asset): string {\n\tconst archived = asset.isArchived && __('archived');\n\tconst watermarked = asset.isWatermarked && __('watermarked');\n\tconst limitedUse = asset.isLimitedUse && __('limited');\n\n\treturn [archived, watermarked, limitedUse].filter((val) => val).join(', ');\n}\n\nexport function getExtension(asset: Asset) {\n\tconst extension = asset.extensions[0];\n\n\tif (extension?.toUpperCase() === 'JPG') {\n\t\treturn 'JPEG';\n\t}\n\n\treturn extension?.toUpperCase();\n}\n"],"names":["supportedExtensionsWithThumbnails","getThumbnail","asset","extension","getStatusText","archived","__","watermarked","limitedUse","val","getExtension"],"mappings":";AAGO,MAAMA,IAAoC;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEO,SAASC,EAAaC,GAAc;AAC1C,MAAIA,EAAM,YAAY;AACrB,WAAOA,EAAM,YAAY;AAG1B,QAAMC,IAAYD,EAAM,WAAW,CAAC;AAEpC,SAAIF,EAAkC,SAASG,CAAS,IAChD,wEAA+EA,CAAS,SACrFA,MAAc,QACjB,kFACGA,MAAc,QACjB,iFAGD;AACR;AAEO,SAASC,EAAcF,GAAsB;AACnD,QAAMG,IAAWH,EAAM,cAAcI,EAAG,UAAU,GAC5CC,IAAcL,EAAM,iBAAiBI,EAAG,aAAa,GACrDE,IAAaN,EAAM,gBAAgBI,EAAG,SAAS;AAErD,SAAO,CAACD,GAAUE,GAAaC,CAAU,EAAE,OAAO,CAACC,MAAQA,CAAG,EAAE,KAAK,IAAI;AAC1E;AAEO,SAASC,EAAaR,GAAc;AAC1C,QAAMC,IAAYD,EAAM,WAAW,CAAC;AAEpC,SAAIC,GAAW,YAAA,MAAkB,QACzB,SAGDA,GAAW,YAAA;AACnB;"}
package/utils2.js ADDED
@@ -0,0 +1,51 @@
1
+ function l(t) {
2
+ return "adaptiveVideo" in t ? "adaptiveVideo" : "transformBaseUrl" in t ? "transformBaseUrl" : "original" in t ? "original" : "webImage";
3
+ }
4
+ function c(t) {
5
+ return t.replace(
6
+ /([a-z0-9])([A-Z])/g,
7
+ (n, i, e) => `${i} ${e}`
8
+ );
9
+ }
10
+ function u(t) {
11
+ if (!t) return;
12
+ const n = a(t);
13
+ return n || s(t);
14
+ }
15
+ function a(t) {
16
+ const n = t.match(/filename=(.*?)&/);
17
+ if (n) {
18
+ const e = /(?:\.([^.]+))?$/.exec(n[1]);
19
+ if (e && e[1])
20
+ return e[1];
21
+ }
22
+ }
23
+ function s(t) {
24
+ const n = t.split("/"), e = n[n.length - 1].split(".");
25
+ if (e.length <= 1) return;
26
+ const r = e[e.length - 1], o = r.indexOf("?");
27
+ return o !== -1 ? r.substring(0, o) : r;
28
+ }
29
+ function f(t) {
30
+ if (t < 1)
31
+ return "0 Bytes";
32
+ const n = 1024, i = Math.floor(Math.log(t) / Math.log(n)), e = (t / Math.pow(n, i)).toFixed(1), o = {
33
+ 0: "Bytes",
34
+ 1: "kB",
35
+ 2: "MB",
36
+ 3: "GB",
37
+ 4: "TB",
38
+ 5: "PB",
39
+ 6: "EB",
40
+ 7: "ZB",
41
+ 8: "YB"
42
+ }[i];
43
+ return `${e} ${o}`;
44
+ }
45
+ export {
46
+ l as getDefaultKey,
47
+ f as getHumanReadableFileSize,
48
+ u as getUrlExtension,
49
+ c as splitByCamelCase
50
+ };
51
+ //# sourceMappingURL=utils2.js.map
package/utils2.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils2.js","sources":["../../src/select/utils.ts"],"sourcesContent":["import { File } from './file.type';\n\nexport function getDefaultKey(\n\tfiles: Record<string, File>,\n): 'transformBaseUrl' | 'original' | 'webImage' | 'adaptiveVideo' {\n\tif ('adaptiveVideo' in files) {\n\t\treturn 'adaptiveVideo';\n\t} else if ('transformBaseUrl' in files) {\n\t\treturn 'transformBaseUrl';\n\t} else if ('original' in files) {\n\t\treturn 'original';\n\t}\n\n\treturn 'webImage';\n}\n\nexport function splitByCamelCase(str: string): string {\n\treturn str.replace(\n\t\t/([a-z0-9])([A-Z])/g,\n\t\t(fullMatch, firstCaptureGroup, secondCaptureGroup) =>\n\t\t\t`${firstCaptureGroup} ${secondCaptureGroup}`,\n\t);\n}\n\nexport function getUrlExtension(url: string): string | undefined {\n\tif (!url) return;\n\n\tconst extensionInQueryString = geExtensionByQueryString(url);\n\n\t// If we can find the filename in the url querystring, use\n\t// that value to get the extension.\n\tif (extensionInQueryString) {\n\t\treturn extensionInQueryString;\n\t}\n\n\t// Otherwise get extension from last part of the /url\n\treturn getExtensionByLastPartUrl(url);\n}\n\nfunction geExtensionByQueryString(url: string): string | undefined {\n\tconst filenameMatch = url.match(/filename=(.*?)&/);\n\n\tif (filenameMatch) {\n\t\tconst extensionRegex = /(?:\\.([^.]+))?$/;\n\t\tconst extension = extensionRegex.exec(filenameMatch[1]);\n\n\t\tif (extension && extension[1]) {\n\t\t\treturn extension[1];\n\t\t}\n\t}\n}\n\nfunction getExtensionByLastPartUrl(url: string): string | undefined {\n\tconst urlSplitBySlash = url.split('/');\n\tconst lastUrlPart = urlSplitBySlash[urlSplitBySlash.length - 1];\n\tconst lastUrlPartSplitByDot = lastUrlPart.split('.');\n\n\tif (lastUrlPartSplitByDot.length <= 1) return;\n\n\tconst extension = lastUrlPartSplitByDot[lastUrlPartSplitByDot.length - 1];\n\tconst indexOfParams = extension.indexOf('?');\n\n\treturn indexOfParams !== -1 ? extension.substring(0, indexOfParams) : extension;\n}\n\nexport function getHumanReadableFileSize(bytes: number): string {\n\tif (bytes < 1) {\n\t\treturn '0 Bytes';\n\t}\n\n\tconst k = 1024;\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\n\tconst size = (bytes / Math.pow(k, i)).toFixed(1);\n\n\tconst iToUnitString = {\n\t\t0: 'Bytes',\n\t\t1: 'kB',\n\t\t2: 'MB',\n\t\t3: 'GB',\n\t\t4: 'TB',\n\t\t5: 'PB',\n\t\t6: 'EB',\n\t\t7: 'ZB',\n\t\t8: 'YB',\n\t};\n\n\tconst unit = iToUnitString[i];\n\n\treturn `${size} ${unit}`;\n}\n"],"names":["getDefaultKey","files","splitByCamelCase","str","fullMatch","firstCaptureGroup","secondCaptureGroup","getUrlExtension","url","extensionInQueryString","geExtensionByQueryString","getExtensionByLastPartUrl","filenameMatch","extension","urlSplitBySlash","lastUrlPartSplitByDot","indexOfParams","getHumanReadableFileSize","bytes","k","size","unit"],"mappings":"AAEO,SAASA,EACfC,GACiE;AACjE,SAAI,mBAAmBA,IACf,kBACG,sBAAsBA,IACzB,qBACG,cAAcA,IACjB,aAGD;AACR;AAEO,SAASC,EAAiBC,GAAqB;AACrD,SAAOA,EAAI;AAAA,IACV;AAAA,IACA,CAACC,GAAWC,GAAmBC,MAC9B,GAAGD,CAAiB,IAAIC,CAAkB;AAAA,EAAA;AAE7C;AAEO,SAASC,EAAgBC,GAAiC;AAChE,MAAI,CAACA,EAAK;AAEV,QAAMC,IAAyBC,EAAyBF,CAAG;AAI3D,SAAIC,KAKGE,EAA0BH,CAAG;AACrC;AAEA,SAASE,EAAyBF,GAAiC;AAClE,QAAMI,IAAgBJ,EAAI,MAAM,iBAAiB;AAEjD,MAAII,GAAe;AAElB,UAAMC,IADiB,kBACU,KAAKD,EAAc,CAAC,CAAC;AAEtD,QAAIC,KAAaA,EAAU,CAAC;AAC3B,aAAOA,EAAU,CAAC;AAAA,EAEpB;AACD;AAEA,SAASF,EAA0BH,GAAiC;AACnE,QAAMM,IAAkBN,EAAI,MAAM,GAAG,GAE/BO,IADcD,EAAgBA,EAAgB,SAAS,CAAC,EACpB,MAAM,GAAG;AAEnD,MAAIC,EAAsB,UAAU,EAAG;AAEvC,QAAMF,IAAYE,EAAsBA,EAAsB,SAAS,CAAC,GAClEC,IAAgBH,EAAU,QAAQ,GAAG;AAE3C,SAAOG,MAAkB,KAAKH,EAAU,UAAU,GAAGG,CAAa,IAAIH;AACvE;AAEO,SAASI,EAAyBC,GAAuB;AAC/D,MAAIA,IAAQ;AACX,WAAO;AAGR,QAAMC,IAAI,MACJ,IAAI,KAAK,MAAM,KAAK,IAAID,CAAK,IAAI,KAAK,IAAIC,CAAC,CAAC,GAE5CC,KAAQF,IAAQ,KAAK,IAAIC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAczCE,IAZgB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EAAA,EAGuB,CAAC;AAE5B,SAAO,GAAGD,CAAI,IAAIC,CAAI;AACvB;"}
@@ -1,6 +1,7 @@
1
- import React from 'react';
2
- import { SelectionMode } from '@src/app-config/appConfig.type';
3
- import { Theme } from '@src/style/Theming';
1
+ import { default as React } from 'react';
2
+ import { SelectionMode } from '../../app-config/appConfig.type';
3
+ import { Dimensions } from '../../common/hooks/useDimensions';
4
+ import { Theme } from '../../style/Theming';
4
5
  import { Asset, AssetData } from './asset.type';
5
6
  interface Props {
6
7
  assets: AssetData;
@@ -17,4 +18,5 @@ interface Props {
17
18
  children?: React.ReactNode;
18
19
  }
19
20
  export declare function AssetList({ assets, count, hasNextPage, isLoading, loadMore, onSelect, onToggle, emptyStateElement, selectedAssetIds, selectionMode, theme, children, }: Props): React.JSX.Element;
21
+ export declare function calculateAssetsInDimensions(count: number | undefined, dimensions: Dimensions | undefined): [number, number];
20
22
  export {};
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function AssetsView(): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Connection } from '@src/api/graphql.types';
1
+ import { default as React } from 'react';
2
+ import { Connection } from '../../api/graphql.types';
3
3
  import { Asset } from './asset.type';
4
4
  interface DataValue {
5
5
  searchAssets: {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Asset } from '../asset.type';
3
3
  interface Props {
4
4
  className?: string;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { MetapropertyType } from '@src/filter/filters/metaproperty/MetapropertyFilterContent';
3
- import { TextMetapropertiesType } from '@src/views/asset/asset.type';
1
+ import { default as React } from 'react';
2
+ import { MetapropertyType } from '../../../filter/filters/metaproperty/MetapropertyFilterContent';
3
+ import { TextMetapropertiesType } from '../asset.type';
4
4
  interface Props {
5
5
  metaproperties?: MetapropertyType[];
6
6
  textMetaproperties?: TextMetapropertiesType[];
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  transformBaseUrl?: string;
4
4
  portalUrl: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Collection } from './collection.types';
3
3
  interface Props {
4
4
  collection: Collection;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Collection as CollectionType } from '../collection/collection.types';
3
3
  interface Props {
4
4
  collection: CollectionType;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Connection } from '../../api/graphql.types';
3
3
  import { GraphqlResponse as GraphqlCollections } from '../../api/getCollections';
4
4
  interface Props {
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function CollectionsView(): React.JSX.Element;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Asset } from '../views/asset/asset.type';
3
- import { Transformation } from './types';
4
- export declare function DatProvider(props: {
5
- children: React.ReactNode;
6
- }): React.JSX.Element;
7
- export declare function useTransformations(): {
8
- transformation?: Transformation | undefined;
9
- setTransformation: (transformation?: Transformation | undefined) => void;
10
- openDat: (url: string, asset: Asset, name: string) => void;
11
- closeDat: () => void;
12
- };
@@ -1,116 +0,0 @@
1
- import { Collection } from '../../views/collection/collection.types';
2
- import { Asset } from '../../views/asset/asset.type';
3
- import { MetapropertyType as Metaproperty, Tag } from '../../filter/filters/metaproperty/MetapropertyFilterContent';
4
- import { MetapropertyOptionType as MetapropertyOption } from '../../filter/filters/metaproperty/MetapropertyOption';
5
- import { SmartfilterType as Smartfilter } from '../../filter/filters/metaproperty/SmartFilterContent';
6
- import { File } from '../../select/file.type';
7
- export declare function mockLocalisation(): void;
8
- export declare function makeFilterAssetsResponse(...assets: Asset[]): {
9
- data: {
10
- tag: string;
11
- value: {
12
- searchAssets: {
13
- assets: {
14
- nodes: Asset[];
15
- totalCount: number;
16
- };
17
- };
18
- };
19
- };
20
- };
21
- export declare function makeAsset(properties: {
22
- id: string;
23
- } & Partial<Asset>): Asset;
24
- export declare function makeFetchFiltersResponse({ assetTypeCounts, metaproperties, tags, isLoading, }: {
25
- assetTypeCounts?: {
26
- audio?: number;
27
- document?: number;
28
- image?: number;
29
- video?: number;
30
- archive?: number;
31
- };
32
- metaproperties?: (Metaproperty | Smartfilter)[];
33
- tags?: Tag[];
34
- isLoading?: boolean;
35
- }): {
36
- data: {
37
- tag: string;
38
- value: {
39
- searchAssets: {
40
- count: {
41
- assetType: {
42
- audio: number;
43
- document: number;
44
- image: number;
45
- video: number;
46
- archive: number;
47
- };
48
- };
49
- metapropertyFilters: {
50
- nodes: (Metaproperty | Smartfilter)[];
51
- };
52
- tags: {
53
- nodes: Tag[];
54
- };
55
- };
56
- };
57
- };
58
- isLoading: boolean;
59
- };
60
- export declare function makeMetapropertyFilter(properties: {
61
- id: string;
62
- } & Partial<Metaproperty>): {
63
- id: string;
64
- __typename: "Metaproperty";
65
- label: string;
66
- zIndex?: number | undefined;
67
- options: MetapropertyOption[];
68
- showInGridView: boolean;
69
- showInListView: boolean;
70
- };
71
- export declare function makeMetapropertyOption(properties: {
72
- id: string;
73
- } & Partial<MetapropertyOption>): {
74
- id: string;
75
- label: string;
76
- assetCount: number;
77
- };
78
- export declare function makeSmartFilter(properties: {
79
- id: string;
80
- } & Partial<Smartfilter>): Smartfilter;
81
- export declare function makeTag(properties: {
82
- id: string;
83
- } & Partial<Tag>): {
84
- id: string;
85
- name: string;
86
- assetCount: number;
87
- };
88
- export declare function makeFetchCollectionsResponse(...collections: Collection[]): {
89
- data: {
90
- tag: string;
91
- value: {
92
- collections: {
93
- nodes: Collection[];
94
- totalCount: number;
95
- };
96
- };
97
- };
98
- };
99
- export declare function makeCollection(properties: {
100
- id: string;
101
- } & Partial<Collection>): Collection;
102
- export declare function makeGetAssetResponse(asset: {
103
- files: Record<string, File>;
104
- id?: string;
105
- }): Promise<import("../../auth/result.type").Ok<{
106
- files: Record<string, File>;
107
- id?: string | undefined;
108
- }>>;
109
- export declare function makeGetAssetsResponse(...assets: Array<{
110
- files: Record<string, File>;
111
- id?: string;
112
- }>): Promise<import("../../auth/result.type").Ok<{
113
- files: Record<string, File>;
114
- id?: string | undefined;
115
- }[]>>;
116
- export declare function clickCard(card: HTMLElement, options?: any): void;
@@ -1,14 +0,0 @@
1
- import { Asset } from '@src/views/asset/asset.type';
2
- type NonCollectionNode = {
3
- __typename: 'Image';
4
- } & Asset;
5
- export declare const testMock: {
6
- data: {
7
- searchAssets: {
8
- assets: {
9
- nodes: NonCollectionNode[];
10
- };
11
- };
12
- };
13
- };
14
- export {};
@@ -1,10 +0,0 @@
1
- import { AuthInformationState } from '../../auth/useAuthInformation';
2
- export declare const mockAuth: AuthInformationState;
3
- export declare const errorResponse: {
4
- errors: {
5
- message: string;
6
- }[];
7
- };
8
- export declare const getSuccessfulResponse: (data: any) => {
9
- data: any;
10
- };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare const Tooltip: ({ text, children }: {
3
- text: any;
4
- children: any;
5
- }) => React.JSX.Element;
6
- export { Tooltip };
@@ -1,34 +0,0 @@
1
- export declare const mockConfig: {
2
- theme: {
3
- colorPrimary: string;
4
- colorButtonPrimary: string;
5
- colorButtonPrimaryLabel: string;
6
- colorButtonPrimaryActive: string;
7
- colorButtonPrimaryHover: string;
8
- colorButtonPrimaryHoverLabel: string;
9
- };
10
- assetTypes: import("../../..").assetType[];
11
- language: string;
12
- onSuccess: import("../../..").OnSuccessCallback;
13
- assetFieldSelection?: string | undefined;
14
- assetFilter?: import("../../..").assetFilter | undefined;
15
- mode?: import("../../..").selectionMode | undefined;
16
- hideExternalAccess?: boolean | undefined;
17
- __shouldAddOriginal__?: boolean | undefined;
18
- hideSwitch?: boolean | undefined;
19
- noCache?: boolean | undefined;
20
- selectAllOption?: boolean | undefined;
21
- selectionMode: import("../../..").selectionMode;
22
- };
23
- export declare const regularButtonStyle: {
24
- background: string;
25
- color: string;
26
- };
27
- export declare const hoverButtonStyle: {
28
- background: string;
29
- color: string;
30
- };
31
- export declare const activeButtonStyle: {
32
- background: string;
33
- color: string;
34
- };
@@ -1,56 +0,0 @@
1
- export declare function renderShield(options: any, sentryClient?: any): {
2
- rerender: (rerenderOptions: any) => any;
3
- container: HTMLElement;
4
- baseElement: HTMLElement;
5
- debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
6
- unmount: () => void;
7
- asFragment: () => DocumentFragment;
8
- getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
9
- getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
10
- queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
11
- queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
12
- findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
13
- findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
14
- getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
15
- getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
16
- queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
17
- queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
18
- findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
19
- findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
20
- getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
21
- getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
22
- queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
23
- queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
24
- findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
25
- findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
26
- getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
27
- getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
28
- queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
29
- queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
30
- findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
31
- findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
32
- getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
33
- getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
34
- queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
35
- queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
36
- findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
37
- findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
38
- getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
39
- getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
40
- queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
41
- queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
42
- findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
43
- findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
44
- getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
45
- getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
46
- queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
47
- queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
48
- findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
49
- findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
50
- getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
51
- getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
52
- queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
53
- queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
54
- findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
55
- findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
56
- };
@@ -1,13 +0,0 @@
1
- export declare function renderAssetFilter({ options, predefinedFilters, assetIds, withExtension, }: {
2
- options?: any;
3
- predefinedFilters?: any;
4
- assetIds?: string[];
5
- withExtension?: boolean;
6
- }): void;
7
- export declare const customAssetFilterRender: (ui: any, { predefinedFilter, providedProps, assetIds, withExtension, ...renderOptions }: {
8
- [x: string]: any;
9
- predefinedFilter: any;
10
- providedProps: any;
11
- assetIds?: never[] | undefined;
12
- withExtension?: boolean | undefined;
13
- }) => void;