UNPKG

@mikezimm/fps-core-v7

Version:

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

90 lines (89 loc) 4.58 kB
/** * CodeAnalizerComment: Updated 1 imports on 2024-09-22 02:56:43 * Update:: import { changePageStyle } to '@mikezimm/fps-core-v7/lib/banner/features/PageStyle/Interfaces;' */ /* eslint-disable @typescript-eslint/no-explicit-any */ /*** * d888888b .88b d88. d8888b. .d88b. d8888b. d888888b .d88b. d88888b d88888b d888888b .o88b. d888888b .d8b. db * `88' 88'YbdP`88 88 `8D .8P Y8. 88 `8D `~~88~~' .8P Y8. 88' 88' `88' d8P Y8 `88' d8' `8b 88 * 88 88 88 88 88oodD' 88 88 88oobY' 88 88 88 88ooo 88ooo 88 8P 88 88ooo88 88 * 88 88 88 88 88~~~ 88 88 88`8b 88 88 88 88~~~ 88~~~ 88 8b 88 88~~~88 88 * .88. 88 88 88 88 `8b d8' 88 `88. 88 `8b d8' 88 88 .88. Y8b d8 .88. 88 88 88booo. * Y888888P YP YP YP 88 `Y88P' 88 YD YP `Y88P' YP YP Y888888P `Y88P' Y888888P YP YP Y88888P * * */ // import { changeEasyIcons } from "../../../components/atoms/EasyIcons/interfaces/IEasyIconsWPProps"; import { changeEasyIcons } from '../../../components/atoms/easy-icons/interfaces/IEasyIconsWPProps'; import { changeEasyPages } from '../../../components/atoms/easy-pages/interfaces/epTypes'; import { changeFullBackground } from '../../../components/molecules/FullPageBackGround/interfaces/IFPSPageBGWPProps'; import { check4This, Check4 } from '../../../logic/Links/CheckSearch'; // import { changeEasyPages } from '../../components/EasyPages/interfaces/epTypes'; import { changeCustomHelp } from '../../components/VisitorPanel/Interfaces'; import { changeBannerBasics, changeBannerNav } from '../../interfaces/MinWP/IMinBannerUIProps'; import { changeBannerUtility } from '../../interfaces/MinWP/IMinBannerUtilityProps'; import { changeBannerTheme } from '../../interfaces/Theme/Interfaces'; import { changeExpando } from '../Expando/Interfaces'; import { changeLockProps } from '../LockProps/Interfaces'; import { changePageStyle } from '../../../banner/features/PageStyle/Interfaces'; import { changePinMe } from '../PinMe/Interfaces'; import { createExportObject, } from './ExportFunctions'; import { exportIgnorePropsFPS } from './IgnoreBlockProps'; // import { check4This } from '@mikezimm/fps-pnp2/lib/services/sp/CheckSearch'; /** * These are properties to export BOTH to analytics AND the panel */ const exportFPSAnalytics = { Visitor: changeCustomHelp, easyPages: changeEasyPages, easyIcons: changeEasyIcons, BannerBasics: changeBannerBasics, BannerNav: changeBannerNav, FullBackGround: changeFullBackground, BannerTheme: changeBannerTheme, BannerOther: changeBannerUtility, fpsOptions1: changePageStyle, Expando: changeExpando, pinMe: changePinMe, LockProps: changeLockProps, }; /** For props to export to panel but NOT save in analytics */ const exportFPSPanel = {}; /** * This will create total export object for the panel in order of: * 'Start items that are always there' * Then adding wpAnalyticsChanges and wpPanelChanges if usage === Panel * Followed by: exportFPSAnalytics and exportFPSPanel if usage === Panel * * @param wpProps * @param wpInstanceID * @param currentWeb * @param wpAnalyticsChanges * @param wpPanelChanges * @returns */ export function buildExportPropsX(usage, wpProps, wpInstanceID, currentWeb, wpAnalyticsChanges, wpPanelChanges, importBlockPropsWP, _FPSId) { /** * NOTE: IF YOU ADD ANYTHING ELSE TO exportStart * BE SURE TO ALSO UPDATE if logic in createExportObject * */ const exportStart = { wpInstanceID: wpInstanceID, _FPSId: _FPSId, currentWeb: currentWeb, easyMode: wpProps.propsEasyMode, }; const exportStructure = usage === 'Panel' ? { ...exportStart, ...wpAnalyticsChanges, ...wpPanelChanges, ...exportFPSAnalytics, ...exportFPSPanel } : { ...exportStart, ...wpAnalyticsChanges, ...exportFPSAnalytics, }; const exportIgnoreProps = [...exportIgnorePropsFPS, ...importBlockPropsWP]; const exportObject = createExportObject(exportStructure, wpProps, exportIgnoreProps, false); // https://github.com/mikezimm/fps-library-v2/issues/39 if (check4This(Check4.buildExportPropsX_Eq_true) === true && usage === 'Panel') console.log('Exportable Props:', exportObject); return exportObject; } //# sourceMappingURL=BuildExportPropsX.js.map