@bynder/compact-view 5.1.3 → 5.2.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 (385) 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 +4 -2
  10. package/App.js +93 -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 +138 -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_new.js +148 -0
  29. package/Autocomplete_new.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 +266 -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_new.js +50 -0
  110. package/Option_new.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_new.js +86 -0
  140. package/SmartFilterSelect_new.js.map +1 -0
  141. package/Smartfilters_new.js +190 -0
  142. package/Smartfilters_new.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/getFilterOptions.d.ts +9 -0
  166. package/api/getFilters.d.ts +2 -2
  167. package/api/getFilters_new.d.ts +7 -0
  168. package/api/getSimilarityAssets.d.ts +1 -1
  169. package/api/index.d.ts +3 -3
  170. package/api/rest/autocomplete.d.ts +1 -1
  171. package/api/rest/getAssetCounts.d.ts +2 -2
  172. package/api/rest/getInitialFilters.d.ts +2 -2
  173. package/api/rest/getMetapropertiesOptions.d.ts +1 -1
  174. package/api/types/getFilters_new.d.ts +56 -0
  175. package/app-config/ConfigContext.d.ts +4 -5
  176. package/app-config/appConfig.type.d.ts +2 -0
  177. package/app-config/appConfig.type.guard.d.ts +1 -1
  178. package/asset.type.js +31 -0
  179. package/asset.type.js.map +1 -0
  180. package/asyncDebounce.js +14 -0
  181. package/asyncDebounce.js.map +1 -0
  182. package/auth.js +35 -0
  183. package/auth.js.map +1 -0
  184. package/autocomplete.js +25 -0
  185. package/autocomplete.js.map +1 -0
  186. package/base64Converter.js +15 -0
  187. package/base64Converter.js.map +1 -0
  188. package/chunk.js +10 -0
  189. package/chunk.js.map +1 -0
  190. package/class.js +7 -0
  191. package/class.js.map +1 -0
  192. package/combineFilters.js +9 -0
  193. package/combineFilters.js.map +1 -0
  194. package/combineMetaproperties.js +25 -0
  195. package/combineMetaproperties.js.map +1 -0
  196. package/common/components/CardSkeleton.d.ts +1 -1
  197. package/common/components/Checkbox.styles.d.ts +4 -4
  198. package/common/components/Chip.d.ts +1 -1
  199. package/common/components/DocumentIcon.d.ts +1 -1
  200. package/common/components/DragSelect.d.ts +1 -1
  201. package/common/components/HorizontalScroll.d.ts +1 -1
  202. package/common/components/InfiniteScroll.d.ts +1 -1
  203. package/common/components/LeftArrow.d.ts +1 -1
  204. package/common/components/Modal.d.ts +1 -1
  205. package/common/components/NoResults.d.ts +1 -1
  206. package/common/components/RightArrow.d.ts +1 -1
  207. package/common/components/Skeleton.d.ts +1 -1
  208. package/common/components/Spinner.d.ts +1 -1
  209. package/common/components/Tooltip.d.ts +1 -1
  210. package/common/components/dropdown/Dropdown.d.ts +1 -1
  211. package/common/components/dropdown/DropdownContent.d.ts +1 -1
  212. package/common/components/dropdown/DropdownListItem.d.ts +1 -1
  213. package/common/hooks/useClickOutside.d.ts +1 -1
  214. package/constants.js +15 -0
  215. package/constants.js.map +1 -0
  216. package/createSelectors.js +11 -0
  217. package/createSelectors.js.map +1 -0
  218. package/crypto.js +21 -0
  219. package/crypto.js.map +1 -0
  220. package/error-handling/ErrorIcon.d.ts +1 -1
  221. package/error-handling/ErrorMessage.d.ts +1 -1
  222. package/error-handling/Oops.d.ts +1 -1
  223. package/error-handling/ReportModal.d.ts +1 -1
  224. package/error-handling/Shield.d.ts +1 -1
  225. package/filter/AssetFilter.d.ts +1 -1
  226. package/filter/AssetFilterContext.d.ts +3 -3
  227. package/filter/active-filters/ActiveFilter.d.ts +1 -1
  228. package/filter/active-filters/ActiveFilters.d.ts +1 -1
  229. package/filter/filters/advanced/Advanced.d.ts +1 -1
  230. package/filter/filters/advanced/AssetTypeItem.d.ts +1 -1
  231. package/filter/filters/metaproperty/Metaproperty.d.ts +1 -1
  232. package/filter/filters/metaproperty/MetapropertyFilterContent.d.ts +1 -1
  233. package/filter/filters/metaproperty/MetapropertyOption.d.ts +1 -1
  234. package/filter/filters/metaproperty/SmartFilterContent.d.ts +1 -1
  235. package/filter/filters/smartfilters/Metaproperties/Autocomplete.d.ts +3 -3
  236. package/filter/filters/smartfilters/Metaproperties/Autocomplete_new.d.ts +15 -0
  237. package/filter/filters/smartfilters/Metaproperties/Option.d.ts +2 -2
  238. package/filter/filters/smartfilters/Metaproperties/Option_new.d.ts +13 -0
  239. package/filter/filters/smartfilters/Metaproperties/SmartFilterSelect.d.ts +2 -2
  240. package/filter/filters/smartfilters/Metaproperties/SmartFilterSelect_new.d.ts +13 -0
  241. package/filter/filters/smartfilters/Smartfilters.d.ts +2 -2
  242. package/filter/filters/smartfilters/Smartfilters_new.d.ts +7 -0
  243. package/filter/filters/tags/TagItem.d.ts +1 -1
  244. package/filter/filters/tags/Tags.d.ts +1 -1
  245. package/filterAssets.js +177 -0
  246. package/filterAssets.js.map +1 -0
  247. package/getAsset.js +70 -0
  248. package/getAsset.js.map +1 -0
  249. package/getAssetCounts.js +27 -0
  250. package/getAssetCounts.js.map +1 -0
  251. package/getAssets.js +137 -0
  252. package/getAssets.js.map +1 -0
  253. package/getCollections.js +79 -0
  254. package/getCollections.js.map +1 -0
  255. package/getFilterOptions.js +57 -0
  256. package/getFilterOptions.js.map +1 -0
  257. package/getFilters.js +85 -0
  258. package/getFilters.js.map +1 -0
  259. package/getFilters_new.js +73 -0
  260. package/getFilters_new.js.map +1 -0
  261. package/getLimitedUseThumbnails.js +26 -0
  262. package/getLimitedUseThumbnails.js.map +1 -0
  263. package/getSimilarityAssets.js +141 -0
  264. package/getSimilarityAssets.js.map +1 -0
  265. package/handlers.js +7 -0
  266. package/handlers.js.map +1 -0
  267. package/helpers.js +7 -0
  268. package/helpers.js.map +1 -0
  269. package/index.js +9 -1162
  270. package/index.js.map +1 -0
  271. package/index2.js +18 -0
  272. package/index2.js.map +1 -0
  273. package/index3.js +56 -0
  274. package/index3.js.map +1 -0
  275. package/index4.js +20 -0
  276. package/index4.js.map +1 -0
  277. package/logger.js +7 -0
  278. package/logger.js.map +1 -0
  279. package/login/LoginComponent.d.ts +1 -1
  280. package/login/LoginContext.d.ts +1 -1
  281. package/login/components/ConnectButton.d.ts +1 -1
  282. package/login/components/Container.d.ts +1 -1
  283. package/login/components/DomainInput.d.ts +1 -1
  284. package/login/components/Header.d.ts +1 -1
  285. package/login/components/RefreshingSpinner.d.ts +1 -1
  286. package/loginwindow.js +84 -0
  287. package/loginwindow.js.map +1 -0
  288. package/normalizeResponse.js +31 -0
  289. package/normalizeResponse.js.map +1 -0
  290. package/oauth2.js +87 -0
  291. package/oauth2.js.map +1 -0
  292. package/order/DirectionSelect.d.ts +1 -1
  293. package/order/FieldSelect.d.ts +2 -2
  294. package/package.json +2 -9
  295. package/result.type.js +25 -0
  296. package/result.type.js.map +1 -0
  297. package/router/RouterContext.d.ts +1 -1
  298. package/search/SearchInput.d.ts +1 -1
  299. package/search/SwitchNLS.d.ts +1 -1
  300. package/search/index.d.ts +0 -2
  301. package/select/FileSelector.d.ts +1 -1
  302. package/select/SelectionContext.d.ts +1 -1
  303. package/select/SelectionFooter.d.ts +1 -1
  304. package/select/add-media/AddMedia.d.ts +1 -1
  305. package/select/add-media/ButtonAction.d.ts +1 -1
  306. package/select/current-selection/AssetItem.d.ts +1 -1
  307. package/select/current-selection/CollectionItem.d.ts +1 -1
  308. package/select/current-selection/SelectedItemContainer.d.ts +1 -1
  309. package/select/current-selection/SelectedItems.d.ts +1 -1
  310. package/store/useDatStore.d.ts +73 -0
  311. package/store/useOrderingStore.d.ts +2 -2
  312. package/store/useRouterStore.d.ts +4 -4
  313. package/store/useSearchStore.d.ts +69 -0
  314. package/store/useSimilaritySearchStore.d.ts +67 -0
  315. package/style/DesignSystemContext.d.ts +1 -1
  316. package/style/RootElementContext.d.ts +1 -1
  317. package/style/Theming.d.ts +1 -1
  318. package/style/shadowroot/ShadowRoot.d.ts +1 -1
  319. package/style/shadowroot/ShadowRootInternal.d.ts +1 -1
  320. package/text.js +9 -0
  321. package/text.js.map +1 -0
  322. package/toolbar/Toolbar.d.ts +1 -1
  323. package/toolbar/ViewSwitch.d.ts +1 -1
  324. package/trimMetapropertyValue.js +6 -0
  325. package/trimMetapropertyValue.js.map +1 -0
  326. package/url.js +7 -0
  327. package/url.js.map +1 -0
  328. package/useAccountDomain.js +33 -0
  329. package/useAccountDomain.js.map +1 -0
  330. package/useAuthInformation.js +42 -0
  331. package/useAuthInformation.js.map +1 -0
  332. package/useClickOutside.js +16 -0
  333. package/useClickOutside.js.map +1 -0
  334. package/useDatStore.js +62 -0
  335. package/useDatStore.js.map +1 -0
  336. package/useDimensions.js +31 -0
  337. package/useDimensions.js.map +1 -0
  338. package/useOrderingStore.js +27 -0
  339. package/useOrderingStore.js.map +1 -0
  340. package/useRouterStore.js +21 -0
  341. package/useRouterStore.js.map +1 -0
  342. package/useSearchStore.js +49 -0
  343. package/useSearchStore.js.map +1 -0
  344. package/useSimilaritySearchStore.js +28 -0
  345. package/useSimilaritySearchStore.js.map +1 -0
  346. package/utils/base64Converter.d.ts +1 -1
  347. package/utils/combineFilters.d.ts +1 -1
  348. package/utils/combineMetaproperties.d.ts +2 -2
  349. package/utils/filterEmptyMetaproperties.d.ts +1 -1
  350. package/utils/getLimitedUseThumbnails.d.ts +2 -0
  351. package/utils/getMetaPropertiesForFilter.d.ts +1 -1
  352. package/utils/normalizeResponse.d.ts +1 -1
  353. package/utils.js +49 -0
  354. package/utils.js.map +1 -0
  355. package/utils2.js +51 -0
  356. package/utils2.js.map +1 -0
  357. package/views/asset/AssetList.d.ts +5 -3
  358. package/views/asset/AssetsView.d.ts +1 -1
  359. package/views/asset/StatefulAssetList.d.ts +2 -2
  360. package/views/asset/asset-card/AssetCard.d.ts +1 -1
  361. package/views/asset/asset-card/AssetCardMetaproperties.d.ts +3 -3
  362. package/views/asset/asset-card/ContextAction.d.ts +1 -1
  363. package/views/collection/CollectionView.d.ts +1 -1
  364. package/views/collections/CollectionCard.d.ts +1 -1
  365. package/views/collections/CollectionList.d.ts +1 -1
  366. package/views/collections/CollectionsView.d.ts +1 -1
  367. package/Dat/DatContext.d.ts +0 -12
  368. package/__tests__/utils/index.d.ts +0 -116
  369. package/api/__tests__/testMocks/mocks.d.ts +0 -14
  370. package/api/__tests__/utils.d.ts +0 -10
  371. package/common/components/__mocks__/Tooltip.d.ts +0 -6
  372. package/common/components/__tests__/utils.d.ts +0 -34
  373. package/error-handling/__tests__/utils.d.ts +0 -56
  374. package/filter/__tests__/utils.d.ts +0 -13
  375. package/index.mjs +0 -1163
  376. package/login/__tests__/mocks.d.ts +0 -1
  377. package/login/__tests__/utils.d.ts +0 -41
  378. package/search/SearchContext.d.ts +0 -25
  379. package/search/SimilaritySearchContext.d.ts +0 -21
  380. package/search/__mocks__/SimilaritySearchContext.d.ts +0 -5
  381. package/select/__tests__/utils.d.ts +0 -11
  382. package/style/shadowroot/__mocks__/ShadowRoot.d.ts +0 -4
  383. package/utils/__mocks__/logger.d.ts +0 -4
  384. package/views/asset/__tests__/utils.d.ts +0 -7
  385. package/views/collections/__tests__/utils.d.ts +0 -5
@@ -0,0 +1,25 @@
1
+ import { getRequest as a } from "./index4.js";
2
+ import { handlers as m } from "./handlers.js";
3
+ import { ensureValidUrl as d } from "./url.js";
4
+ const f = async ({
5
+ metapropertyId: t,
6
+ auth: o,
7
+ searchTerm: n,
8
+ page: i = 1
9
+ }) => {
10
+ if (!o) throw new Error("No authentication provided");
11
+ let e = o.accountDomain !== void 0 ? d(o.accountDomain.trim()) : `https://${window.location.host}`;
12
+ e.charAt(e.length - 1) === "/" && (e = e.slice(0, -1));
13
+ const r = o.getAccessToken && o.getAccessToken(), s = r === void 0 ? {} : { Authorization: `Bearer ${r}` }, c = await a(
14
+ `${e}${m.autocomplete}?metaPropertyId=${t}&term=${n}&page=${i}&isMicrofrontend=true`,
15
+ { headers: s }
16
+ );
17
+ return {
18
+ id: t,
19
+ ...c
20
+ };
21
+ };
22
+ export {
23
+ f as getAutocompleteOptions
24
+ };
25
+ //# sourceMappingURL=autocomplete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.js","sources":["../../src/api/rest/autocomplete.ts"],"sourcesContent":["import { getRequest } from '.';\nimport { handlers } from './handlers';\nimport { AuthInformationState } from '@src/auth/useAuthInformation';\nimport { ensureValidUrl } from '@src/utils/url';\n\ntype AutocompleteOption = {\n\ticon: string;\n\tid: string;\n\tisSelected: boolean;\n\tlabel: string;\n\tname: string;\n};\ninterface Response {\n\thasNextPage?: boolean;\n\tmetapropertyOptions?: Array<AutocompleteOption>;\n}\nexport interface AutocompleteOptions extends Response {\n\tid?: string;\n}\n\nexport const getAutocompleteOptions = async ({\n\tmetapropertyId,\n\tauth,\n\tsearchTerm,\n\tpage = 1,\n}: {\n\tmetapropertyId: string;\n\tauth: AuthInformationState | null;\n\tsearchTerm: string;\n\tpage?: number;\n}): Promise<AutocompleteOptions> => {\n\tif (!auth) throw new Error('No authentication provided');\n\n\tlet host =\n\t\tauth.accountDomain !== undefined\n\t\t\t? ensureValidUrl(auth.accountDomain.trim())\n\t\t\t: `https://${window.location.host}`;\n\n\t// For the sake of consistency, check if last char is a slash\n\t// and remove it\n\tif (host.charAt(host.length - 1) === '/') {\n\t\thost = host.slice(0, -1);\n\t}\n\n\tconst accessToken = auth.getAccessToken && auth.getAccessToken();\n\n\tconst headers = accessToken === undefined ? {} : { Authorization: `Bearer ${accessToken}` };\n\n\t// page is used for pagination and starts with 1\n\t// isMicrofrontend=true is used to indicate that the request is coming from a microfrontend and is default parameter, set by Discover team\n\t// Perform the request\n\tconst response = (await getRequest(\n\t\t`${host}${handlers.autocomplete}?metaPropertyId=${metapropertyId}&term=${searchTerm}&page=${page}&isMicrofrontend=true`,\n\t\t{ headers },\n\t)) as Response;\n\n\treturn {\n\t\tid: metapropertyId,\n\t\t...response,\n\t};\n};\n"],"names":["getAutocompleteOptions","metapropertyId","auth","searchTerm","page","host","ensureValidUrl","accessToken","headers","response","getRequest","handlers"],"mappings":";;;AAoBO,MAAMA,IAAyB,OAAO;AAAA,EAC5C,gBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AACR,MAKoC;AACnC,MAAI,CAACF,EAAM,OAAM,IAAI,MAAM,4BAA4B;AAEvD,MAAIG,IACHH,EAAK,kBAAkB,SACpBI,EAAeJ,EAAK,cAAc,KAAA,CAAM,IACxC,WAAW,OAAO,SAAS,IAAI;AAInC,EAAIG,EAAK,OAAOA,EAAK,SAAS,CAAC,MAAM,QACpCA,IAAOA,EAAK,MAAM,GAAG,EAAE;AAGxB,QAAME,IAAcL,EAAK,kBAAkBA,EAAK,eAAA,GAE1CM,IAAUD,MAAgB,SAAY,CAAA,IAAK,EAAE,eAAe,UAAUA,CAAW,GAAA,GAKjFE,IAAY,MAAMC;AAAA,IACvB,GAAGL,CAAI,GAAGM,EAAS,YAAY,mBAAmBV,CAAc,SAASE,CAAU,SAASC,CAAI;AAAA,IAChG,EAAE,SAAAI,EAAA;AAAA,EAAQ;AAGX,SAAO;AAAA,IACN,IAAIP;AAAA,IACJ,GAAGQ;AAAA,EAAA;AAEL;"}
@@ -0,0 +1,15 @@
1
+ const r = ({
2
+ metapropertyName: t,
3
+ id: e
4
+ }) => window.btoa(`(Metaproperty_option_id(${t} ${e}))`), s = (t) => {
5
+ if (t)
6
+ return Object.values(t).reduce((e, o) => {
7
+ const n = Object.values(o).map(r);
8
+ return [...e, ...n];
9
+ }, []);
10
+ }, c = (t) => window.btoa(`(Asset_id ${t})`);
11
+ export {
12
+ c as convertAssetIdToBase64,
13
+ s as convertOptionsToBase64
14
+ };
15
+ //# sourceMappingURL=base64Converter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64Converter.js","sources":["../../src/utils/base64Converter.ts"],"sourcesContent":["import { selectedSmartfilterOptionsType } from '@src/api/rest/types';\n\nconst convertOptionToBase64 = ({\n\tmetapropertyName,\n\tid,\n}: {\n\tmetapropertyName: string;\n\tid: string;\n}) => {\n\treturn window.btoa(`(Metaproperty_option_id(${metapropertyName} ${id}))`);\n};\n\nexport const convertOptionsToBase64 = (\n\toptions: selectedSmartfilterOptionsType | undefined,\n): string[] | undefined => {\n\tif (!options) {\n\t\treturn undefined;\n\t}\n\n\treturn Object.values(options).reduce((acc: string[], optionsArray) => {\n\t\tconst convertedOptions = Object.values(optionsArray).map(convertOptionToBase64);\n\n\t\treturn [...acc, ...convertedOptions];\n\t}, []);\n};\n\nexport const convertAssetIdToBase64 = (assetId: string): string => {\n\treturn window.btoa(`(Asset_id ${assetId})`);\n};\n"],"names":["convertOptionToBase64","metapropertyName","id","convertOptionsToBase64","options","acc","optionsArray","convertedOptions","convertAssetIdToBase64","assetId"],"mappings":"AAEA,MAAMA,IAAwB,CAAC;AAAA,EAC9B,kBAAAC;AAAA,EACA,IAAAC;AACD,MAIQ,OAAO,KAAK,2BAA2BD,CAAgB,IAAIC,CAAE,IAAI,GAG5DC,IAAyB,CACrCC,MAC0B;AAC1B,MAAKA;AAIL,WAAO,OAAO,OAAOA,CAAO,EAAE,OAAO,CAACC,GAAeC,MAAiB;AACrE,YAAMC,IAAmB,OAAO,OAAOD,CAAY,EAAE,IAAIN,CAAqB;AAE9E,aAAO,CAAC,GAAGK,GAAK,GAAGE,CAAgB;AAAA,IACpC,GAAG,CAAA,CAAE;AACN,GAEaC,IAAyB,CAACC,MAC/B,OAAO,KAAK,aAAaA,CAAO,GAAG;"}
package/chunk.js ADDED
@@ -0,0 +1,10 @@
1
+ const o = (e, s) => {
2
+ const n = [];
3
+ for (let t = 0; t < e.length; t += s)
4
+ n.push(e.slice(t, t + s));
5
+ return n;
6
+ };
7
+ export {
8
+ o as chunk
9
+ };
10
+ //# sourceMappingURL=chunk.js.map
package/chunk.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk.js","sources":["../../src/utils/chunk.ts"],"sourcesContent":["export const chunk = <T>(arr: T[], chunkSize: number): T[][] => {\n\tconst res: T[][] = [];\n\n\tfor (let i = 0; i < arr.length; i += chunkSize) {\n\t\tres.push(arr.slice(i, i + chunkSize));\n\t}\n\n\treturn res;\n};\n"],"names":["chunk","arr","chunkSize","res","i"],"mappings":"AAAO,MAAMA,IAAQ,CAAIC,GAAUC,MAA6B;AAC/D,QAAMC,IAAa,CAAA;AAEnB,WAASC,IAAI,GAAGA,IAAIH,EAAI,QAAQG,KAAKF;AACpC,IAAAC,EAAI,KAAKF,EAAI,MAAMG,GAAGA,IAAIF,CAAS,CAAC;AAGrC,SAAOC;AACR;"}
package/class.js ADDED
@@ -0,0 +1,7 @@
1
+ function o(...n) {
2
+ return n.filter(Boolean).join(" ");
3
+ }
4
+ export {
5
+ o as concatClasses
6
+ };
7
+ //# sourceMappingURL=class.js.map
package/class.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class.js","sources":["../../src/utils/class.ts"],"sourcesContent":["/**\n * Concatenates the list of classes given into a single class string.\n *\n * If a parameter is `false` or `undefined`, then it will be ignored. This\n * is useful for building a single class string out of several classes,\n * some of which are conditionally included.\n *\n * @example\n * // When isActive is true, returns \"link active\"\n * // When isActive is false, returns \"link inactive\"\n * concatClasses(\n * \"link\",\n * isActive && \"active\",\n * !isActive && \"inactive\"\n * )\n *\n * @example\n * // Ehen props.icon is defined, returns \"base with-icon\"\n * // When props.icon is undefined, returns \"base\"\n * concatClasses(\n * \"base\",\n * props.icon && \"with-icon\"\n * )\n */\nexport function concatClasses(...classes: (string | false | undefined)[]): string {\n\treturn classes.filter(Boolean).join(' ');\n}\n"],"names":["concatClasses","classes"],"mappings":"AAwBO,SAASA,KAAiBC,GAAiD;AACjF,SAAOA,EAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;"}
@@ -0,0 +1,9 @@
1
+ const t = ({
2
+ filters: n,
3
+ predefinedFilters: o,
4
+ showToolbar: r
5
+ }) => r ? n?.length ? Array.from(/* @__PURE__ */ new Set([...o || [], ...n])) : o : n?.length ? n : o;
6
+ export {
7
+ t as combineFilters
8
+ };
9
+ //# sourceMappingURL=combineFilters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combineFilters.js","sources":["../../src/utils/combineFilters.ts"],"sourcesContent":["import { AssetType } from '@src/views/asset/asset.type';\n\ntype AssetTypeFiltersParams = {\n\tfilters?: string[] | AssetType[];\n\tpredefinedFilters?: string[] | AssetType[];\n\tshowToolbar?: boolean;\n};\n\nexport const combineFilters = ({\n\tfilters,\n\tpredefinedFilters,\n\tshowToolbar,\n}: AssetTypeFiltersParams): string[] | AssetType[] | undefined => {\n\tif (showToolbar) {\n\t\treturn filters?.length\n\t\t\t? Array.from(new Set([...(predefinedFilters || []), ...filters]))\n\t\t\t: predefinedFilters;\n\t} else if (filters?.length) {\n\t\treturn filters;\n\t}\n\n\treturn predefinedFilters;\n};\n"],"names":["combineFilters","filters","predefinedFilters","showToolbar"],"mappings":"AAQO,MAAMA,IAAiB,CAAC;AAAA,EAC9B,SAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,aAAAC;AACD,MACKA,IACIF,GAAS,SACb,MAAM,yBAAS,IAAI,CAAC,GAAIC,KAAqB,CAAA,GAAK,GAAGD,CAAO,CAAC,CAAC,IAC9DC,IACOD,GAAS,SACZA,IAGDC;"}
@@ -0,0 +1,25 @@
1
+ import { DATE_METAPROPERTY_TYPE as T, DATE_METAPROPERTY_LOCALE as l, DATE_METAPROPERTY_OPTIONS as p } from "./constants.js";
2
+ const z = (e, n) => e.zIndex && !n.zIndex ? -1 : !e.zIndex && n.zIndex ? 1 : !e.zIndex && !n.zIndex ? 0 : e.zIndex - n.zIndex, E = (e) => e ? isNaN(Date.parse(e)) ? e : new Intl.DateTimeFormat(l, p).format(
3
+ new Date(new Date(e).valueOf() + new Date(e).getTimezoneOffset() * 60 * 1e3)
4
+ ) : "", x = (e = [], n = []) => {
5
+ const m = e.map(({ label: t, options: r, zIndex: a }) => {
6
+ const o = r.map((i) => i.label).join(", ");
7
+ return {
8
+ label: t,
9
+ value: o,
10
+ zIndex: a
11
+ };
12
+ }), u = n.map(({ label: t, value: r, type: a, zIndex: o }) => {
13
+ const i = a === T ? E(r) : r;
14
+ return {
15
+ label: t,
16
+ value: i,
17
+ zIndex: o
18
+ };
19
+ });
20
+ return [...m, ...u].sort(z);
21
+ };
22
+ export {
23
+ x as combineMetaproperties
24
+ };
25
+ //# sourceMappingURL=combineMetaproperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combineMetaproperties.js","sources":["../../src/utils/combineMetaproperties.ts"],"sourcesContent":["import { MetapropertyType } from '@src/filter/filters/metaproperty/MetapropertyFilterContent';\nimport { TextMetapropertiesType } from '@src/views/asset/asset.type';\nimport {\n\tDATE_METAPROPERTY_LOCALE,\n\tDATE_METAPROPERTY_OPTIONS,\n\tDATE_METAPROPERTY_TYPE,\n} from '@src/constants';\n\ninterface ReturnType {\n\tlabel: string;\n\tvalue: string;\n\tzIndex: number;\n}\n\nconst sortMetaproperties = (first: ReturnType, second: ReturnType) => {\n\tif (first.zIndex && !second.zIndex) {\n\t\treturn -1;\n\t} else if (!first.zIndex && second.zIndex) {\n\t\treturn 1;\n\t} else if (!first.zIndex && !second.zIndex) {\n\t\treturn 0;\n\t}\n\n\treturn first.zIndex - second.zIndex;\n};\n\nconst normalizeDate = (date: string) => {\n\tif (!date) {\n\t\treturn '';\n\t}\n\n\tif (isNaN(Date.parse(date))) {\n\t\treturn date;\n\t}\n\n\treturn new Intl.DateTimeFormat(DATE_METAPROPERTY_LOCALE, DATE_METAPROPERTY_OPTIONS).format(\n\t\tnew Date(new Date(date).valueOf() + new Date(date).getTimezoneOffset() * 60 * 1000),\n\t);\n};\n\nexport const combineMetaproperties = (\n\tmetaproperties: MetapropertyType[] = [],\n\ttextMetaproperties: TextMetapropertiesType[] = [],\n): ReturnType[] => {\n\tconst normalizedMeta = metaproperties.map(({ label, options, zIndex }) => {\n\t\tconst metapropertyOptionValue = options.map((option) => option.label).join(', ');\n\n\t\treturn {\n\t\t\tlabel,\n\t\t\tvalue: metapropertyOptionValue,\n\t\t\tzIndex,\n\t\t};\n\t});\n\tconst normalizedTextMeta = textMetaproperties.map(({ label, value, type, zIndex }) => {\n\t\tconst normalizedValue = type === DATE_METAPROPERTY_TYPE ? normalizeDate(value) : value;\n\n\t\treturn {\n\t\t\tlabel,\n\t\t\tvalue: normalizedValue,\n\t\t\tzIndex,\n\t\t};\n\t});\n\n\treturn [...normalizedMeta, ...normalizedTextMeta].sort(sortMetaproperties);\n};\n"],"names":["sortMetaproperties","first","second","normalizeDate","date","DATE_METAPROPERTY_LOCALE","DATE_METAPROPERTY_OPTIONS","combineMetaproperties","metaproperties","textMetaproperties","normalizedMeta","label","options","zIndex","metapropertyOptionValue","option","normalizedTextMeta","value","type","normalizedValue","DATE_METAPROPERTY_TYPE"],"mappings":";AAcA,MAAMA,IAAqB,CAACC,GAAmBC,MAC1CD,EAAM,UAAU,CAACC,EAAO,SACpB,KACG,CAACD,EAAM,UAAUC,EAAO,SAC3B,IACG,CAACD,EAAM,UAAU,CAACC,EAAO,SAC5B,IAGDD,EAAM,SAASC,EAAO,QAGxBC,IAAgB,CAACC,MACjBA,IAID,MAAM,KAAK,MAAMA,CAAI,CAAC,IAClBA,IAGD,IAAI,KAAK,eAAeC,GAA0BC,CAAyB,EAAE;AAAA,EACnF,IAAI,KAAK,IAAI,KAAKF,CAAI,EAAE,QAAA,IAAY,IAAI,KAAKA,CAAI,EAAE,kBAAA,IAAsB,KAAK,GAAI;AAAA,IAR3E,IAYIG,IAAwB,CACpCC,IAAqC,IACrCC,IAA+C,CAAA,MAC7B;AAClB,QAAMC,IAAiBF,EAAe,IAAI,CAAC,EAAE,OAAAG,GAAO,SAAAC,GAAS,QAAAC,QAAa;AACzE,UAAMC,IAA0BF,EAAQ,IAAI,CAACG,MAAWA,EAAO,KAAK,EAAE,KAAK,IAAI;AAE/E,WAAO;AAAA,MACN,OAAAJ;AAAA,MACA,OAAOG;AAAA,MACP,QAAAD;AAAA,IAAA;AAAA,EAEF,CAAC,GACKG,IAAqBP,EAAmB,IAAI,CAAC,EAAE,OAAAE,GAAO,OAAAM,GAAO,MAAAC,GAAM,QAAAL,QAAa;AACrF,UAAMM,IAAkBD,MAASE,IAAyBjB,EAAcc,CAAK,IAAIA;AAEjF,WAAO;AAAA,MACN,OAAAN;AAAA,MACA,OAAOQ;AAAA,MACP,QAAAN;AAAA,IAAA;AAAA,EAEF,CAAC;AAED,SAAO,CAAC,GAAGH,GAAgB,GAAGM,CAAkB,EAAE,KAAKhB,CAAkB;AAC1E;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  title?: React.ReactNode;
4
4
  rows: number;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledCheckboxWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ export declare const StyledCheckboxWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  $isLoading?: boolean | undefined;
4
4
  $isChecked: boolean;
5
5
  $isFlex?: boolean | undefined;
6
6
  }>> & string;
7
- export declare const ListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
8
- export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
7
+ export declare const ListItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
8
+ export declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
9
9
  $isChecked: boolean;
10
10
  }>> & string;
11
- export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
11
+ export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  loading?: boolean;
4
4
  active?: boolean;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function DocumentIcon(): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type DragAction = 'select' | 'inverse';
3
3
  type Rect = {
4
4
  left: number;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  static?: React.ReactNode;
4
4
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  isLoading: boolean;
4
4
  hasNextPage: boolean;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function LeftArrow(props: Readonly<{
3
3
  isDisabled: boolean;
4
4
  onClick: () => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare const useModalContext: () => {
3
3
  onClose: () => void;
4
4
  } | null;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  onReset: () => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function RightArrow(props: Readonly<{
3
3
  isDisabled: boolean;
4
4
  onClick: () => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  width?: number;
4
4
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  isRelative?: boolean;
4
4
  isHidden?: boolean;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
3
3
  type TooltipMargin = 'top' | 'bottom' | 'left' | 'right';
4
4
  type TooltipMarginAmount = 'spacing1' | 'spacing2' | 'spacing3' | 'spacing4' | 'spacing5';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  className?: string;
4
4
  fadeIn?: boolean;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface DropdownContentProps {
3
3
  onClickOutside: () => void;
4
4
  direction: 'Down' | 'Up';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface ListItemProps {
3
3
  className?: string;
4
4
  onClick?: () => void;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function useClickOutside(targetRefs: React.MutableRefObject<Element | null>[], handler: () => void): void;
package/constants.js ADDED
@@ -0,0 +1,15 @@
1
+ const E = "transformBaseURL", T = "transformBaseUrl", _ = "date", A = "en-GB", R = {
2
+ year: "numeric",
3
+ month: "long",
4
+ day: "2-digit"
5
+ }, n = 100, t = 280;
6
+ export {
7
+ T as BYNDER_TRANSFORM_BASE_URL_NAME,
8
+ A as DATE_METAPROPERTY_LOCALE,
9
+ R as DATE_METAPROPERTY_OPTIONS,
10
+ _ as DATE_METAPROPERTY_TYPE,
11
+ t as MAX_GET_ASSETS_LIMIT,
12
+ n as MAX_METAPROPERTY_LENGTH,
13
+ E as WEBDAM_TRANSFORM_BASE_URL_NAME
14
+ };
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../src/constants.ts"],"sourcesContent":["export const WEBDAM_TRANSFORM_BASE_URL_NAME = 'transformBaseURL';\nexport const BYNDER_TRANSFORM_BASE_URL_NAME = 'transformBaseUrl';\nexport const DATE_METAPROPERTY_TYPE = 'date';\nexport const DATE_METAPROPERTY_LOCALE = 'en-GB'; // en-GB locale provides date format like \"1 January 2021\"\nexport const DATE_METAPROPERTY_OPTIONS: Intl.DateTimeFormatOptions = {\n\tyear: 'numeric',\n\tmonth: 'long',\n\tday: '2-digit',\n};\nexport const MAX_METAPROPERTY_LENGTH = 100;\nexport const MAX_GET_ASSETS_LIMIT = 280; // This is the limitation of the Asset APIs. GET method can`t handle more than 280 assets IDs at once\n"],"names":["WEBDAM_TRANSFORM_BASE_URL_NAME","BYNDER_TRANSFORM_BASE_URL_NAME","DATE_METAPROPERTY_TYPE","DATE_METAPROPERTY_LOCALE","DATE_METAPROPERTY_OPTIONS","MAX_METAPROPERTY_LENGTH","MAX_GET_ASSETS_LIMIT"],"mappings":"AAAO,MAAMA,IAAiC,oBACjCC,IAAiC,oBACjCC,IAAyB,QACzBC,IAA2B,SAC3BC,IAAwD;AAAA,EACpE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AACN,GACaC,IAA0B,KAC1BC,IAAuB;"}
@@ -0,0 +1,11 @@
1
+ const r = (o) => {
2
+ const e = o;
3
+ e.use = {};
4
+ for (const t of Object.keys(e.getState()))
5
+ e.use[t] = () => e((s) => s[t]);
6
+ return e;
7
+ };
8
+ export {
9
+ r as createSelectors
10
+ };
11
+ //# sourceMappingURL=createSelectors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSelectors.js","sources":["../../src/store/utils/createSelectors.ts"],"sourcesContent":["import { StoreApi, UseBoundStore } from 'zustand';\n\ntype WithSelectors<S> = S extends { getState: () => infer T }\n\t? S & { use: { [K in keyof T]: () => T[K] } }\n\t: never;\n\nexport const createSelectors = <S extends UseBoundStore<StoreApi<object>>>(_store: S) => {\n\tconst store = _store as WithSelectors<typeof _store>;\n\tstore.use = {};\n\n\tfor (const k of Object.keys(store.getState())) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t(store.use as any)[k] = () => store((s) => s[k as keyof typeof s]);\n\t}\n\n\treturn store;\n};\n"],"names":["createSelectors","_store","store","k"],"mappings":"AAMO,MAAMA,IAAkB,CAA4CC,MAAc;AACxF,QAAMC,IAAQD;AACd,EAAAC,EAAM,MAAM,CAAA;AAEZ,aAAWC,KAAK,OAAO,KAAKD,EAAM,SAAA,CAAU;AAE1C,IAAAA,EAAM,IAAYC,CAAC,IAAI,MAAMD,EAAM,CAAC,MAAM,EAAEC,CAAmB,CAAC;AAGlE,SAAOD;AACR;"}
package/crypto.js ADDED
@@ -0,0 +1,21 @@
1
+ function n(e) {
2
+ return btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(e)))).replace(/\+/g, "-").replace(/\//g, "_").replace(/[=]+$/, "");
3
+ }
4
+ function s(e) {
5
+ if (!window.crypto?.subtle)
6
+ return Promise.reject(
7
+ "Access to the WebCrypto API is restricted to secure origins. Compact View requires HTTPS when used outside localhost (for development)."
8
+ );
9
+ const r = new TextEncoder().encode(e);
10
+ return window.crypto.subtle.digest("SHA-256", r);
11
+ }
12
+ function c() {
13
+ const e = new Uint32Array(28), r = window.crypto.getRandomValues(e);
14
+ return Array.from(r).map((t) => `0${t.toString(16)}`.substr(-2)).join("");
15
+ }
16
+ export {
17
+ n as base64URLEncode,
18
+ c as randomString,
19
+ s as sha256
20
+ };
21
+ //# sourceMappingURL=crypto.js.map
package/crypto.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.js","sources":["../../src/auth/crypto.ts"],"sourcesContent":["export function base64URLEncode(str: ArrayBuffer): string {\n\treturn btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(str))))\n\t\t.replace(/\\+/g, '-')\n\t\t.replace(/\\//g, '_')\n\t\t.replace(/[=]+$/, '');\n}\n\nexport function sha256(s: string) {\n\tif (!window.crypto?.subtle) {\n\t\treturn Promise.reject(\n\t\t\t'Access to the WebCrypto API is restricted to secure origins. Compact View requires HTTPS when used outside localhost (for development).',\n\t\t);\n\t}\n\n\tconst encodedText = new TextEncoder().encode(s);\n\n\treturn window.crypto.subtle.digest('SHA-256', encodedText);\n}\n\nexport function randomString(): string {\n\tconst emptyArray = new Uint32Array(28);\n\tconst randomValues = window.crypto.getRandomValues(emptyArray);\n\n\tconst values = Array.from(randomValues).map((n) => `0${n.toString(16)}`.substr(-2));\n\n\treturn values.join('');\n}\n"],"names":["base64URLEncode","str","sha256","s","encodedText","randomString","emptyArray","randomValues","n"],"mappings":"AAAO,SAASA,EAAgBC,GAA0B;AACzD,SAAO,KAAK,OAAO,aAAa,MAAM,MAAM,MAAM,KAAK,IAAI,WAAWA,CAAG,CAAC,CAAC,CAAC,EAC1E,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,GAAG,EAClB,QAAQ,SAAS,EAAE;AACtB;AAEO,SAASC,EAAOC,GAAW;AACjC,MAAI,CAAC,OAAO,QAAQ;AACnB,WAAO,QAAQ;AAAA,MACd;AAAA,IAAA;AAIF,QAAMC,IAAc,IAAI,cAAc,OAAOD,CAAC;AAE9C,SAAO,OAAO,OAAO,OAAO,OAAO,WAAWC,CAAW;AAC1D;AAEO,SAASC,IAAuB;AACtC,QAAMC,IAAa,IAAI,YAAY,EAAE,GAC/BC,IAAe,OAAO,OAAO,gBAAgBD,CAAU;AAI7D,SAFe,MAAM,KAAKC,CAAY,EAAE,IAAI,CAACC,MAAM,IAAIA,EAAE,SAAS,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAEpE,KAAK,EAAE;AACtB;"}
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function ErrorIcon(): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function ErrorMessage(props: {
3
3
  isReportSent: boolean;
4
4
  onClickSend: () => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { BrowserClient } from '@sentry/browser';
3
3
  interface Props {
4
4
  error: Error;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function ReportModal(props: {
3
3
  isOpen: boolean;
4
4
  error: Error;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { BrowserClient } from '@sentry/browser';
3
3
  interface Props {
4
4
  children: React.ReactNode;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function AssetFilter(): React.JSX.Element | null;
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { AssetType } from '../views/asset/asset.type';
3
3
  import { MetapropertyOptionType as MetapropertyOption } from './filters/metaproperty/MetapropertyOption';
4
- import { AssetFilterJson } from '@src/filter/assetFilter.type';
5
- import { AutcompleteResponseOption, SmartfilterOption, selectedSmartfilterOptionsType, AssetCountType } from '@src/api/rest/types';
4
+ import { AssetFilterJson } from './assetFilter.type';
5
+ import { AutcompleteResponseOption, SmartfilterOption, selectedSmartfilterOptionsType, AssetCountType } from '../api/rest/types';
6
6
  export interface Filter {
7
7
  assetTypes: AssetType[];
8
8
  metaproperties: MetapropertyOption[];
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function ActiveFilter(props: {
3
3
  onClick?: () => void;
4
4
  title: string;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export declare function ActiveFilters(): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  interface Count {
3
3
  audio: number;
4
4
  document: number;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { AssetType } from '../../../views/asset/asset.type';
3
3
  export declare function AssetTypeItem(props: {
4
4
  type: AssetType;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { MetapropertyType } from './MetapropertyFilterContent';
3
3
  import { SmartfilterType } from './SmartFilterContent';
4
4
  interface Props {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { MetapropertyOptionType } from './MetapropertyOption';
3
3
  export interface MetapropertyType {
4
4
  __typename: 'Metaproperty';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export interface MetapropertyOptionType {
3
3
  id: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { MetapropertyType } from './MetapropertyFilterContent';
3
3
  import { MetapropertyOptionType } from './MetapropertyOption';
4
4
  export interface SmartfilterType {
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { AutocompleteOptions } from '@src/api/rest/autocomplete';
3
- import { SmartfilterSelectedOptionType, SmartfilterMetaproperty, AutocompleteOption } from '@src/api/rest/types';
1
+ import { default as React } from 'react';
2
+ import { AutocompleteOptions } from '../../../../api/rest/autocomplete';
3
+ import { SmartfilterSelectedOptionType, SmartfilterMetaproperty, AutocompleteOption } from '../../../../api/rest/types';
4
4
  type Props = {
5
5
  metaproperty: SmartfilterMetaproperty;
6
6
  value: string;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { AutocompleteOptions } from '../../../../api/rest/autocomplete';
3
+ import { Metaproperty, MetapropertyOption } from '../../../../api/types/getFilters_new';
4
+ import { SmartfilterSelectedOptionType, AutocompleteOption } from '../../../../api/rest/types';
5
+ type Props = {
6
+ metaproperty: Metaproperty;
7
+ value: string;
8
+ onChange: (metapropertyId: string, value: string) => void;
9
+ onOptionSelect: (metapropertyName: string, option: MetapropertyOption | AutocompleteOption, isMultifilter: boolean) => void;
10
+ autocompleteOptions: AutocompleteOptions;
11
+ isLoading: boolean;
12
+ selectedOptions: Record<string, Record<string, SmartfilterSelectedOptionType>>;
13
+ };
14
+ export declare const Autocomplete: ({ metaproperty, value, onChange, onOptionSelect, autocompleteOptions, isLoading, selectedOptions, }: Props) => React.JSX.Element;
15
+ export {};
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { SmartfilterOption } from '@src/api/rest/types';
1
+ import { default as React } from 'react';
2
+ import { SmartfilterOption } from '../../../../api/rest/types';
3
3
  type Props = {
4
4
  option: SmartfilterOption;
5
5
  onClick: (metapropertyName: string, option: SmartfilterOption, metapropertyMultifilter: boolean) => void;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { MetapropertyOption } from '../../../../api/types/getFilters_new';
3
+ type Props = {
4
+ option: MetapropertyOption;
5
+ onClick: (metapropertyName: string, option: MetapropertyOption, metapropertyMultifilter: boolean) => void;
6
+ metapropertyName: string;
7
+ isSelected: boolean;
8
+ metapropertyMultifilter: boolean;
9
+ showCount?: boolean;
10
+ count?: number;
11
+ };
12
+ declare const OptionComponent: ({ option, onClick, metapropertyName, isSelected, metapropertyMultifilter, showCount, count, }: Props) => React.JSX.Element;
13
+ export { OptionComponent };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { SmartfilterMetaproperty, SmartfilterOption, SmartfilterSelectedOptionType } from '@src/api/rest/types';
1
+ import { default as React } from 'react';
2
+ import { SmartfilterMetaproperty, SmartfilterOption, SmartfilterSelectedOptionType } from '../../../../api/rest/types';
3
3
  type Props = {
4
4
  metaproperty: SmartfilterMetaproperty;
5
5
  smartfilterId: string;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { Metaproperty, MetapropertyOption } from '../../../../api/types/getFilters_new';
3
+ import { SmartfilterSelectedOptionType } from '../../../../api/rest/types';
4
+ type Props = {
5
+ metaproperty: Metaproperty;
6
+ smartfilterId: string;
7
+ onOptionSelect: (metapropertyName: string, option: MetapropertyOption, isMultifilter: boolean) => void;
8
+ selectedOptions: Record<string, Record<string, SmartfilterSelectedOptionType>>;
9
+ filteredMetaproperty: Record<string, number>;
10
+ metapropertyCursor?: string;
11
+ };
12
+ declare const SmartFilterSelect: ({ metaproperty, smartfilterId, onOptionSelect, selectedOptions, filteredMetaproperty, metapropertyCursor, }: Props) => React.JSX.Element;
13
+ export { SmartFilterSelect };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Smartfilter as SmartfilterType, SmartfilterMetaproperty } from '@src/api/rest/types';
1
+ import { default as React } from 'react';
2
+ import { Smartfilter as SmartfilterType, SmartfilterMetaproperty } from '../../../api/rest/types';
3
3
  type Props = {
4
4
  smartfilters: SmartfilterType[];
5
5
  metaproperties: Record<string, Record<string, SmartfilterMetaproperty>>;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { FilterData } from '../../../api/types/getFilters_new';
3
+ type Props = {
4
+ filterData: FilterData;
5
+ };
6
+ declare const Smartfilter: ({ filterData }: Props) => React.JSX.Element;
7
+ export { Smartfilter };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Tag } from '../metaproperty/MetapropertyFilterContent';
3
3
  export declare function TagItem(props: {
4
4
  tag: Tag;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { Tag } from '../metaproperty/MetapropertyFilterContent';
3
3
  interface Props {
4
4
  tags: Tag[];