PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / AutoLaunch / templates / registries.js

registries.js in Extendify 3.2.1, at src/AutoLaunch/templates/registries.js

36 lines 964 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {
2 CHOICE_PAGES,
3 DESCRIPTION_PAGES,
4 MODAL_PAGES,
5 PROGRESS_PAGES,
6 } from './index';
7 import {
8 choiceManifests,
9 descriptionManifests,
10 modalManifests,
11 progressManifests,
12 } from './manifests';
13
14 /**
15 * Every layout a screen can draw, paired with the manifest describing it.
16 *
17 * Nothing in the flow reads this: the flow draws one layout and asks `index`
18 * for it. Importing it here would pull all 15 manifests into the bundle.
19 */
20 const entriesFrom = (pages) => (manifest) => {
21 const id = manifest.$id.split('/').pop();
22 return { id, label: manifest.title, Page: pages[id] };
23 };
24
25 export const descriptionTemplates = () =>
26 descriptionManifests().map(entriesFrom(DESCRIPTION_PAGES));
27
28 export const progressTemplates = () =>
29 progressManifests().map(entriesFrom(PROGRESS_PAGES));
30
31 export const choiceTemplates = () =>
32 choiceManifests().map(entriesFrom(CHOICE_PAGES));
33
34 export const modalTemplates = () =>
35 modalManifests().map(entriesFrom(MODAL_PAGES));
36