@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
48 lines • 1.8 kB
JavaScript
/**
* 2024-09-06: Migrated from same folder fps-library-v2\src\pnpjs\SourceItems
*/
import { makeid } from '../../../../../logic/Strings/guids';
import { CurrentTenant } from '../../WindowLocationConstants';
import { ModernSitePagesColumns, ModernSitePagesSearch, ExtraFetchModernPage } from '../../SitePages/ModernSitePagesColumns';
/**
* DO NOT FORGET TO ASSIGN fpsSpService!
*/
export const NewsLinksSource = {
fpsSpService: null,
refreshId: makeid(5),
key: 'news',
defType: 'news',
fpsContentType: ['item', 'file', 'page'],
tenant: CurrentTenant,
webUrl: ``,
listTitle: 'Site Pages',
webRelativeLink: 'SitePages',
searchSource: '',
searchSourceDesc: '',
columns: ModernSitePagesColumns,
searchProps: ModernSitePagesSearch,
selectThese: [...ModernSitePagesColumns],
itemFetchCol: ExtraFetchModernPage,
isModern: true,
// https://sharepoint.stackexchange.com/a/284672
// NOTE: This may need to be encoded if you are not using pnp.... https://sharepoint.stackexchange.com/a/273356
// you'll need to encode this to use it. Change your spaces to %20 and your single quotes to %27
// restFilter: `PromotedState%20eq%202%20and%20ContentType%20eq%20%27Repost%20Page%27`,
restFilter: `PromotedState eq 2 and ContentType eq 'Repost Page'`,
evalFilter: ``,
defSearchButtons: [],
fetchCount: 200,
//Might be best to sort by Published Date
orderBy: {
prop: 'Title',
order: 'asc',
asc: true,
},
meta0: [],
meta1: [],
meta2: [],
meta3: [],
metaX: [],
performanceSettings: { label: 'NewsLinks', updateMiliseconds: true, includeMsStr: true, op: 'fetch' },
};
//# sourceMappingURL=NewsLinksSource.js.map