UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

47 lines (46 loc) 2.1 kB
/** * CodeAnalizerComment: Updated 2 imports on 2024-09-22 14:49:52 * Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;' * Update:: import { processSharedItems } to '@mikezimm/fps-core-v7/lib/components/atoms/SharedItems/processSharedItems;' */ import { processSharedItems } from "../../../components/atoms/SharedItems/processSharedItems"; import { filterSharedItems, SharedWithExpand, SharedWithItemsSelect } from "../../../components/molecules/AnyContent/IFPSFileObject"; import { CurrentTenant } from "../../../components/molecules/source-props/WindowLocationConstants"; import { makeid } from "../../../logic/Strings/guids"; import { getSourceItemsAPI } from "./getSourceItemsAPI"; // eslint-disable-next-line @typescript-eslint/no-explicit-any /** * 2024-12-15: Migrated from fps-library-v2: src\components\atoms\SharedItems\getOnlySharedItems.ts * As of now, not tested, but might be used for PivotTiles where it was originally based from * * @param doThis was originally passed as doThis: IShowPermissionPage in PivotTiles so just casting as flexability * @param webURL * @param listTitle * @param addTheseItemsToState * @returns */ export async function getOnlySharedItems(refObj, webURL, listTitle, callBack, // such as addTheseItemsToState fpsSpService) { const SourceProps = { tenant: CurrentTenant, refreshId: makeid(5), webUrl: webURL, listTitle: listTitle, fetchCount: null, selectThese: SharedWithItemsSelect, expandThese: SharedWithExpand, restFilter: filterSharedItems, fpsSpService: fpsSpService, orderBy: { prop: 'Id', order: 'desc', asc: false, }, }; const getItems = await getSourceItemsAPI(SourceProps, false, false, true); getItems.items = processSharedItems(getItems.items); if (callBack) callBack(getItems, refObj, ''); return getItems; } //# sourceMappingURL=getOnlySharedItems.js.map