Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
37 lines
1.6 KiB
Plaintext
37 lines
1.6 KiB
Plaintext
import { genImportMapIterateFields } from './iterateFields.js';
|
|
export function iterateGlobals({ addToImportMap, baseDir, config, globals, importMap, imports }) {
|
|
for (const global of globals){
|
|
genImportMapIterateFields({
|
|
addToImportMap,
|
|
baseDir,
|
|
config,
|
|
fields: global.fields,
|
|
importMap,
|
|
imports
|
|
});
|
|
addToImportMap(global.admin?.components?.elements?.beforeDocumentControls);
|
|
addToImportMap(global.admin?.components?.elements?.Description);
|
|
addToImportMap(global.admin?.components?.elements?.PreviewButton);
|
|
addToImportMap(global.admin?.components?.elements?.PublishButton);
|
|
addToImportMap(global.admin?.components?.elements?.SaveButton);
|
|
addToImportMap(global.admin?.components?.elements?.SaveDraftButton);
|
|
addToImportMap(global.admin?.components?.elements?.Status);
|
|
addToImportMap(global.admin?.components?.elements?.UnpublishButton);
|
|
if (global.admin?.components?.views?.edit) {
|
|
for (const editViewConfig of Object.values(global.admin?.components?.views?.edit)){
|
|
if ('Component' in editViewConfig) {
|
|
addToImportMap(editViewConfig?.Component);
|
|
}
|
|
if ('actions' in editViewConfig) {
|
|
addToImportMap(editViewConfig?.actions);
|
|
}
|
|
if ('tab' in editViewConfig) {
|
|
addToImportMap(editViewConfig?.tab?.Component);
|
|
addToImportMap(editViewConfig?.tab?.Pill);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=iterateGlobals.js.map |