-
Notifications
You must be signed in to change notification settings - Fork 0
/
emc.js
47 lines (44 loc) · 1.2 KB
/
emc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// @ts-check
import { BeHive, seed, MountObserver } from 'be-hive/be-hive.js';
/** @import {EMC} from './ts-refs/trans-render/be/types' */
/** @import {Actions, PAP, AP} from './ts-refs/be-reformable/types' */;
/**
* @type {Partial<EMC<any, AP>>}
*/
export const emc = {
hostInstanceOf: [HTMLFormElement],
base: 'be-reformable',
branches: ['', 'base-link', 'path', 'headers', 'submitOptions'],
enhPropKey: 'beReformable',
map: {
'0.0': {
instanceOf: 'Object',
mapsTo: '.',
},
'1.0': {
instanceOf: 'String',
mapsTo: 'baseLink'
},
'2.0': {
instanceOf: 'String',
mapsTo: 'path'
},
'3.0': {
instanceOf: 'Object',
mapsTo: 'headers',
},
'4.0': {
instanceOf: 'Object',
mapsTo: 'submitOptions'
}
},
importEnh: async () => {
const { BeReformable } =
/** @type {{new(): IEnhancement<Element>}} */
/** @type {any} */
(await import('./be-reformable.js'));
return BeReformable;
},
};
const mose = seed(emc);
MountObserver.synthesize(document, BeHive, mose);