@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.
- package/ActiveFilter.js +33 -0
- package/ActiveFilter.js.map +1 -0
- package/ActiveFilters.js +81 -0
- package/ActiveFilters.js.map +1 -0
- package/AddMedia.js +90 -0
- package/AddMedia.js.map +1 -0
- package/Advanced.js +66 -0
- package/Advanced.js.map +1 -0
- package/App.d.ts +1 -1
- package/App.js +89 -0
- package/App.js.map +1 -0
- package/AssetCard.js +172 -0
- package/AssetCard.js.map +1 -0
- package/AssetCardMetaproperties.js +47 -0
- package/AssetCardMetaproperties.js.map +1 -0
- package/AssetFilter.js +158 -0
- package/AssetFilter.js.map +1 -0
- package/AssetFilterContext.js +162 -0
- package/AssetFilterContext.js.map +1 -0
- package/AssetItem.js +40 -0
- package/AssetItem.js.map +1 -0
- package/AssetList.js +158 -0
- package/AssetList.js.map +1 -0
- package/AssetTypeItem.js +34 -0
- package/AssetTypeItem.js.map +1 -0
- package/AssetsView.js +61 -0
- package/AssetsView.js.map +1 -0
- package/Autocomplete.js +148 -0
- package/Autocomplete.js.map +1 -0
- package/ButtonAction.js +14 -0
- package/ButtonAction.js.map +1 -0
- package/CardSkeleton.js +31 -0
- package/CardSkeleton.js.map +1 -0
- package/Checkbox.styles.js +38 -0
- package/Checkbox.styles.js.map +1 -0
- package/Chip.js +43 -0
- package/Chip.js.map +1 -0
- package/CollectionCard.js +56 -0
- package/CollectionCard.js.map +1 -0
- package/CollectionItem.js +41 -0
- package/CollectionItem.js.map +1 -0
- package/CollectionList.js +53 -0
- package/CollectionList.js.map +1 -0
- package/CollectionView.js +73 -0
- package/CollectionView.js.map +1 -0
- package/CollectionsView.js +58 -0
- package/CollectionsView.js.map +1 -0
- package/ConfigContext.js +18 -0
- package/ConfigContext.js.map +1 -0
- package/ConnectButton.js +20 -0
- package/ConnectButton.js.map +1 -0
- package/Container.js +52 -0
- package/Container.js.map +1 -0
- package/ContextAction.js +42 -0
- package/ContextAction.js.map +1 -0
- package/Dat/Dat.d.ts +2 -12
- package/Dat/DatDropdownItem.d.ts +1 -1
- package/Dat/index.d.ts +0 -1
- package/Dat.js +90 -0
- package/Dat.js.map +1 -0
- package/DatDropdownItem.js +47 -0
- package/DatDropdownItem.js.map +1 -0
- package/DesignSystemContext.js +12 -0
- package/DesignSystemContext.js.map +1 -0
- package/DirectionSelect.js +43 -0
- package/DirectionSelect.js.map +1 -0
- package/DocumentIcon.js +69 -0
- package/DocumentIcon.js.map +1 -0
- package/DomainInput.js +39 -0
- package/DomainInput.js.map +1 -0
- package/DragSelect.js +144 -0
- package/DragSelect.js.map +1 -0
- package/Dropdown.js +72 -0
- package/Dropdown.js.map +1 -0
- package/DropdownContent.js +59 -0
- package/DropdownContent.js.map +1 -0
- package/DropdownListItem.js +52 -0
- package/DropdownListItem.js.map +1 -0
- package/ErrorIcon.js +48 -0
- package/ErrorIcon.js.map +1 -0
- package/ErrorMessage.js +40 -0
- package/ErrorMessage.js.map +1 -0
- package/FieldSelect.js +74 -0
- package/FieldSelect.js.map +1 -0
- package/FileSelector.js +239 -0
- package/FileSelector.js.map +1 -0
- package/Header.js +42 -0
- package/Header.js.map +1 -0
- package/HorizontalScroll.js +51 -0
- package/HorizontalScroll.js.map +1 -0
- package/InfiniteScroll.js +26 -0
- package/InfiniteScroll.js.map +1 -0
- package/LeftArrow.js +31 -0
- package/LeftArrow.js.map +1 -0
- package/LoginComponent.js +32 -0
- package/LoginComponent.js.map +1 -0
- package/LoginContext.js +85 -0
- package/LoginContext.js.map +1 -0
- package/MetapropertyFilterContent.js +25 -0
- package/MetapropertyFilterContent.js.map +1 -0
- package/MetapropertyOption.js +24 -0
- package/MetapropertyOption.js.map +1 -0
- package/Modal.js +48 -0
- package/Modal.js.map +1 -0
- package/NoResults.js +51 -0
- package/NoResults.js.map +1 -0
- package/Oops.js +54 -0
- package/Oops.js.map +1 -0
- package/Option.js +50 -0
- package/Option.js.map +1 -0
- package/RefreshingSpinner.js +22 -0
- package/RefreshingSpinner.js.map +1 -0
- package/ReportModal.js +51 -0
- package/ReportModal.js.map +1 -0
- package/RightArrow.js +31 -0
- package/RightArrow.js.map +1 -0
- package/RootElementContext.js +12 -0
- package/RootElementContext.js.map +1 -0
- package/SearchInput.js +76 -0
- package/SearchInput.js.map +1 -0
- package/SelectedItemContainer.js +44 -0
- package/SelectedItemContainer.js.map +1 -0
- package/SelectedItems.js +27 -0
- package/SelectedItems.js.map +1 -0
- package/SelectionContext.js +144 -0
- package/SelectionContext.js.map +1 -0
- package/SelectionFooter.js +65 -0
- package/SelectionFooter.js.map +1 -0
- package/ShadowRoot.js +11 -0
- package/ShadowRoot.js.map +1 -0
- package/ShadowRootInternal.js +78 -0
- package/ShadowRootInternal.js.map +1 -0
- package/Shield.js +25 -0
- package/Shield.js.map +1 -0
- package/Skeleton.js +43 -0
- package/Skeleton.js.map +1 -0
- package/SmartFilterContent.js +11 -0
- package/SmartFilterContent.js.map +1 -0
- package/SmartFilterSelect.js +91 -0
- package/SmartFilterSelect.js.map +1 -0
- package/Smartfilters.js +186 -0
- package/Smartfilters.js.map +1 -0
- package/Spinner.js +32 -0
- package/Spinner.js.map +1 -0
- package/StatefulAssetList.js +100 -0
- package/StatefulAssetList.js.map +1 -0
- package/Styles.css.js +5 -0
- package/Styles.css.js.map +1 -0
- package/SwitchNLS.js +80 -0
- package/SwitchNLS.js.map +1 -0
- package/TagItem.js +38 -0
- package/TagItem.js.map +1 -0
- package/Tags.js +48 -0
- package/Tags.js.map +1 -0
- package/Theming.js +30 -0
- package/Theming.js.map +1 -0
- package/Toolbar.js +53 -0
- package/Toolbar.js.map +1 -0
- package/Tooltip.js +81 -0
- package/Tooltip.js.map +1 -0
- package/ViewSwitch.js +45 -0
- package/ViewSwitch.js.map +1 -0
- package/api/filterAssets.d.ts +1 -1
- package/api/getCollections.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/getSimilarityAssets.d.ts +1 -1
- package/api/index.d.ts +2 -2
- package/api/rest/autocomplete.d.ts +1 -1
- package/api/rest/getAssetCounts.d.ts +2 -2
- package/api/rest/getInitialFilters.d.ts +2 -2
- package/api/rest/getMetapropertiesOptions.d.ts +1 -1
- package/app-config/ConfigContext.d.ts +3 -4
- package/app-config/appConfig.type.guard.d.ts +1 -1
- package/asset.type.js +31 -0
- package/asset.type.js.map +1 -0
- package/asyncDebounce.js +14 -0
- package/asyncDebounce.js.map +1 -0
- package/auth.js +35 -0
- package/auth.js.map +1 -0
- package/autocomplete2.js +25 -0
- package/autocomplete2.js.map +1 -0
- package/base64Converter.js +15 -0
- package/base64Converter.js.map +1 -0
- package/chunk.js +10 -0
- package/chunk.js.map +1 -0
- package/class.js +7 -0
- package/class.js.map +1 -0
- package/combineFilters.js +9 -0
- package/combineFilters.js.map +1 -0
- package/combineMetaproperties.js +25 -0
- package/combineMetaproperties.js.map +1 -0
- package/common/components/CardSkeleton.d.ts +1 -1
- package/common/components/Checkbox.styles.d.ts +4 -4
- package/common/components/Chip.d.ts +1 -1
- package/common/components/DocumentIcon.d.ts +1 -1
- package/common/components/DragSelect.d.ts +1 -1
- package/common/components/HorizontalScroll.d.ts +1 -1
- package/common/components/InfiniteScroll.d.ts +1 -1
- package/common/components/LeftArrow.d.ts +1 -1
- package/common/components/Modal.d.ts +1 -1
- package/common/components/NoResults.d.ts +1 -1
- package/common/components/RightArrow.d.ts +1 -1
- package/common/components/Skeleton.d.ts +1 -1
- package/common/components/Spinner.d.ts +1 -1
- package/common/components/Tooltip.d.ts +1 -1
- package/common/components/dropdown/Dropdown.d.ts +1 -1
- package/common/components/dropdown/DropdownContent.d.ts +1 -1
- package/common/components/dropdown/DropdownListItem.d.ts +1 -1
- package/common/hooks/useClickOutside.d.ts +1 -1
- package/constants.js +15 -0
- package/constants.js.map +1 -0
- package/createSelectors.js +11 -0
- package/createSelectors.js.map +1 -0
- package/crypto.js +21 -0
- package/crypto.js.map +1 -0
- package/error-handling/ErrorIcon.d.ts +1 -1
- package/error-handling/ErrorMessage.d.ts +1 -1
- package/error-handling/Oops.d.ts +1 -1
- package/error-handling/ReportModal.d.ts +1 -1
- package/error-handling/Shield.d.ts +1 -1
- package/filter/AssetFilter.d.ts +1 -1
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filter/active-filters/ActiveFilter.d.ts +1 -1
- package/filter/active-filters/ActiveFilters.d.ts +1 -1
- package/filter/filters/advanced/Advanced.d.ts +1 -1
- package/filter/filters/advanced/AssetTypeItem.d.ts +1 -1
- package/filter/filters/metaproperty/Metaproperty.d.ts +1 -1
- package/filter/filters/metaproperty/MetapropertyFilterContent.d.ts +1 -1
- package/filter/filters/metaproperty/MetapropertyOption.d.ts +1 -1
- package/filter/filters/metaproperty/SmartFilterContent.d.ts +1 -1
- package/filter/filters/smartfilters/Metaproperties/Autocomplete.d.ts +3 -3
- package/filter/filters/smartfilters/Metaproperties/Option.d.ts +2 -2
- package/filter/filters/smartfilters/Metaproperties/SmartFilterSelect.d.ts +2 -2
- package/filter/filters/smartfilters/Smartfilters.d.ts +2 -2
- package/filter/filters/tags/TagItem.d.ts +1 -1
- package/filter/filters/tags/Tags.d.ts +1 -1
- package/filterAssets.js +175 -0
- package/filterAssets.js.map +1 -0
- package/filterEmptyMetaproperties.js +11 -0
- package/filterEmptyMetaproperties.js.map +1 -0
- package/getAsset.js +70 -0
- package/getAsset.js.map +1 -0
- package/getAssetCounts.js +27 -0
- package/getAssetCounts.js.map +1 -0
- package/getAssets.js +137 -0
- package/getAssets.js.map +1 -0
- package/getCollections.js +78 -0
- package/getCollections.js.map +1 -0
- package/getFilters.js +84 -0
- package/getFilters.js.map +1 -0
- package/getInitialFilters.js +51 -0
- package/getInitialFilters.js.map +1 -0
- package/getMetapropertiesOptions.js +31 -0
- package/getMetapropertiesOptions.js.map +1 -0
- package/getSimilarityAssets.js +141 -0
- package/getSimilarityAssets.js.map +1 -0
- package/handlers.js +11 -0
- package/handlers.js.map +1 -0
- package/helpers.js +7 -0
- package/helpers.js.map +1 -0
- package/index.js +9 -1162
- package/index.js.map +1 -0
- package/index2.js +18 -0
- package/index2.js.map +1 -0
- package/index3.js +36 -0
- package/index3.js.map +1 -0
- package/index4.js +20 -0
- package/index4.js.map +1 -0
- package/logger.js +7 -0
- package/logger.js.map +1 -0
- package/login/LoginComponent.d.ts +1 -1
- package/login/LoginContext.d.ts +1 -1
- package/login/components/ConnectButton.d.ts +1 -1
- package/login/components/Container.d.ts +1 -1
- package/login/components/DomainInput.d.ts +1 -1
- package/login/components/Header.d.ts +1 -1
- package/login/components/RefreshingSpinner.d.ts +1 -1
- package/loginwindow.js +84 -0
- package/loginwindow.js.map +1 -0
- package/normalizeResponse.js +31 -0
- package/normalizeResponse.js.map +1 -0
- package/oauth2.js +87 -0
- package/oauth2.js.map +1 -0
- package/order/DirectionSelect.d.ts +1 -1
- package/order/FieldSelect.d.ts +2 -2
- package/package.json +2 -9
- package/result.type.js +25 -0
- package/result.type.js.map +1 -0
- package/router/RouterContext.d.ts +1 -1
- package/search/SearchInput.d.ts +1 -1
- package/search/SwitchNLS.d.ts +1 -1
- package/search/index.d.ts +0 -2
- package/select/FileSelector.d.ts +1 -1
- package/select/SelectionContext.d.ts +1 -1
- package/select/SelectionFooter.d.ts +1 -1
- package/select/add-media/AddMedia.d.ts +1 -1
- package/select/add-media/ButtonAction.d.ts +1 -1
- package/select/current-selection/AssetItem.d.ts +1 -1
- package/select/current-selection/CollectionItem.d.ts +1 -1
- package/select/current-selection/SelectedItemContainer.d.ts +1 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/store/useDatStore.d.ts +73 -0
- package/store/useOrderingStore.d.ts +2 -2
- package/store/useRouterStore.d.ts +4 -4
- package/store/useSearchStore.d.ts +69 -0
- package/store/useSimilaritySearchStore.d.ts +67 -0
- package/style/DesignSystemContext.d.ts +1 -1
- package/style/RootElementContext.d.ts +1 -1
- package/style/Theming.d.ts +1 -1
- package/style/shadowroot/ShadowRoot.d.ts +1 -1
- package/style/shadowroot/ShadowRootInternal.d.ts +1 -1
- package/text.js +9 -0
- package/text.js.map +1 -0
- package/toolbar/Toolbar.d.ts +1 -1
- package/toolbar/ViewSwitch.d.ts +1 -1
- package/trimMetapropertyValue.js +6 -0
- package/trimMetapropertyValue.js.map +1 -0
- package/url.js +7 -0
- package/url.js.map +1 -0
- package/useAccountDomain.js +33 -0
- package/useAccountDomain.js.map +1 -0
- package/useAuthInformation.js +42 -0
- package/useAuthInformation.js.map +1 -0
- package/useClickOutside.js +16 -0
- package/useClickOutside.js.map +1 -0
- package/useDatStore.js +62 -0
- package/useDatStore.js.map +1 -0
- package/useDimensions.js +31 -0
- package/useDimensions.js.map +1 -0
- package/useOrderingStore.js +27 -0
- package/useOrderingStore.js.map +1 -0
- package/useRouterStore.js +21 -0
- package/useRouterStore.js.map +1 -0
- package/useSearchStore.js +49 -0
- package/useSearchStore.js.map +1 -0
- package/useSimilaritySearchStore.js +28 -0
- package/useSimilaritySearchStore.js.map +1 -0
- package/utils/base64Converter.d.ts +1 -1
- package/utils/combineFilters.d.ts +1 -1
- package/utils/combineMetaproperties.d.ts +2 -2
- package/utils/filterEmptyMetaproperties.d.ts +1 -1
- package/utils/getMetaPropertiesForFilter.d.ts +1 -1
- package/utils/normalizeResponse.d.ts +1 -1
- package/utils.js +49 -0
- package/utils.js.map +1 -0
- package/utils2.js +51 -0
- package/utils2.js.map +1 -0
- package/views/asset/AssetList.d.ts +5 -3
- package/views/asset/AssetsView.d.ts +1 -1
- package/views/asset/StatefulAssetList.d.ts +2 -2
- package/views/asset/asset-card/AssetCard.d.ts +1 -1
- package/views/asset/asset-card/AssetCardMetaproperties.d.ts +3 -3
- package/views/asset/asset-card/ContextAction.d.ts +1 -1
- package/views/collection/CollectionView.d.ts +1 -1
- package/views/collections/CollectionCard.d.ts +1 -1
- package/views/collections/CollectionList.d.ts +1 -1
- package/views/collections/CollectionsView.d.ts +1 -1
- package/Dat/DatContext.d.ts +0 -12
- package/__tests__/utils/index.d.ts +0 -116
- package/api/__tests__/testMocks/mocks.d.ts +0 -14
- package/api/__tests__/utils.d.ts +0 -10
- package/common/components/__mocks__/Tooltip.d.ts +0 -6
- package/common/components/__tests__/utils.d.ts +0 -34
- package/error-handling/__tests__/utils.d.ts +0 -56
- package/filter/__tests__/utils.d.ts +0 -13
- package/index.mjs +0 -1163
- package/login/__tests__/mocks.d.ts +0 -1
- package/login/__tests__/utils.d.ts +0 -41
- package/search/SearchContext.d.ts +0 -25
- package/search/SimilaritySearchContext.d.ts +0 -21
- package/search/__mocks__/SimilaritySearchContext.d.ts +0 -5
- package/select/__tests__/utils.d.ts +0 -11
- package/style/shadowroot/__mocks__/ShadowRoot.d.ts +0 -4
- package/utils/__mocks__/logger.d.ts +0 -4
- package/views/asset/__tests__/utils.d.ts +0 -7
- 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 '
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { MetapropertyType } from '
|
|
2
|
-
import { TextMetapropertiesType } from '
|
|
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 '
|
|
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 '
|
|
1
|
+
import { MetapropertyOptionType } from '../filter/filters/metaproperty/MetapropertyOption';
|
|
2
2
|
export declare const getMetaProperties: (metaproperties: MetapropertyOptionType[] | undefined) => string[] | undefined;
|
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 '
|
|
3
|
-
import {
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MetapropertyType } from '
|
|
3
|
-
import { TextMetapropertiesType } from '
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export declare function CollectionsView(): React.JSX.Element;
|
package/Dat/DatContext.d.ts
DELETED
|
@@ -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 {};
|
package/api/__tests__/utils.d.ts
DELETED
|
@@ -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,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;
|