@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
15 lines • 685 B
JavaScript
/**
* 2024-09-07: Migrated from the same folder in fps-library-v2/banner/features/WebPartHistory/...
*/
import { createWebpartHistory, upgradeV1History } from "./Functions";
export function getWebPartHistoryOnInit(userDisplayName, webpartHistory) {
//ADDED FOR WEBPART HISTORY: This sets the webpartHistory
const thisHistoryInstance = createWebpartHistory('onInit', 'new', userDisplayName);
const priorHistory = webpartHistory ? upgradeV1History(webpartHistory).history : [];
const newWebPartHistory = {
thisInstance: thisHistoryInstance,
history: priorHistory,
};
return newWebPartHistory;
}
//# sourceMappingURL=OnInit.js.map