mount-observer 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Synthesizer.js
CHANGED
|
@@ -49,6 +49,7 @@ export class Synthesizer extends HTMLElement {
|
|
|
49
49
|
activate(mose) {
|
|
50
50
|
if (!this.checkIfAllowed(mose))
|
|
51
51
|
return;
|
|
52
|
+
mose.dispatchEvent(new LoadEvent());
|
|
52
53
|
const { init, do: d } = mose;
|
|
53
54
|
const mi = {
|
|
54
55
|
do: d,
|
|
@@ -116,3 +117,9 @@ export class SynthesizeEvent extends Event {
|
|
|
116
117
|
this.mountObserverElement = mountObserverElement;
|
|
117
118
|
}
|
|
118
119
|
}
|
|
120
|
+
export class LoadEvent extends Event {
|
|
121
|
+
static eventName = 'load';
|
|
122
|
+
constructor() {
|
|
123
|
+
super(LoadEvent.eventName);
|
|
124
|
+
}
|
|
125
|
+
}
|
package/getWhereAttrSelector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export async function getWhereAttrSelector(whereAttr, withoutAttrs) {
|
|
2
2
|
const { hasBase, hasBranchIn, hasRootIn } = whereAttr;
|
|
3
|
-
|
|
3
|
+
let fullListOfAttrs = [];
|
|
4
4
|
const partitionedAttrs = [];
|
|
5
5
|
if (hasBase !== undefined) {
|
|
6
6
|
const hasRootInGuaranteed = hasRootIn || [{
|
|
@@ -72,6 +72,7 @@ export async function getWhereAttrSelector(whereAttr, withoutAttrs) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
fullListOfAttrs = Array.from(new Set(fullListOfAttrs));
|
|
75
76
|
const listOfSelectors = fullListOfAttrs.map(s => `${withoutAttrs}[${s}]`);
|
|
76
77
|
const calculatedSelector = listOfSelectors.join(',');
|
|
77
78
|
return {
|
package/getWhereAttrSelector.ts
CHANGED
|
@@ -2,13 +2,13 @@ import {AttrParts, RootCnfg, WhereAttr} from './ts-refs/mount-observer/types';
|
|
|
2
2
|
export async function getWhereAttrSelector(whereAttr: WhereAttr, withoutAttrs: string){
|
|
3
3
|
const {hasBase, hasBranchIn, hasRootIn} = whereAttr;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
let fullListOfAttrs: Array<string> = [];
|
|
6
6
|
const partitionedAttrs: Array<AttrParts> = [];
|
|
7
7
|
if(hasBase !== undefined){
|
|
8
8
|
const hasRootInGuaranteed: Array<RootCnfg> = hasRootIn || [{
|
|
9
9
|
start: '',
|
|
10
10
|
context: 'Both'
|
|
11
|
-
} as RootCnfg]
|
|
11
|
+
} as RootCnfg];
|
|
12
12
|
|
|
13
13
|
let prefixLessMatches: Array<{
|
|
14
14
|
rootToBaseDelimiter: string,
|
|
@@ -80,7 +80,7 @@ export async function getWhereAttrSelector(whereAttr: WhereAttr, withoutAttrs: s
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
fullListOfAttrs = Array.from(new Set(fullListOfAttrs));
|
|
84
84
|
const listOfSelectors = fullListOfAttrs.map(s => `${withoutAttrs}[${s}]`);
|
|
85
85
|
const calculatedSelector = listOfSelectors.join(',');
|
|
86
86
|
return {
|
package/package.json
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import {BEAllProps, IEnhancement} from '../trans-render/be/types';
|
|
1
|
+
import {BEAllProps, EventListenerOrFn, IEnhancement} from '../trans-render/be/types';
|
|
2
2
|
import {StringWithAutocompleteOptions} from '../trans-render/types';
|
|
3
3
|
import { Specifier } from '../trans-render/dss/types';
|
|
4
4
|
import {AbsorbingObject} from '../trans-render/asmr/types';
|
|
5
5
|
|
|
6
6
|
export interface EndUserProps extends IEnhancement<HTMLElement>{
|
|
7
7
|
forAttr?: string,
|
|
8
|
-
|
|
9
|
-
//onChange?: string,
|
|
10
|
-
//onLoad?: string,
|
|
11
|
-
//assignTo?: Array<Specifier>,
|
|
12
|
-
nameOfCalculator: string,
|
|
8
|
+
handler: string
|
|
13
9
|
eventArg: string,
|
|
14
10
|
}
|
|
15
11
|
|
|
16
12
|
export interface AllProps extends EndUserProps{
|
|
17
|
-
calculator: {new: () => EventListenerObject},
|
|
13
|
+
//calculator: {new: () => EventListenerObject},
|
|
18
14
|
// value: any;
|
|
19
15
|
// isParsed: boolean;
|
|
20
16
|
// attrExpr?: string | null;
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
//publishEventType: 'input' | 'change' | 'load',
|
|
18
|
+
handlerObj?: EventListenerOrFn,
|
|
23
19
|
defaultEventType: StringWithAutocompleteOptions<
|
|
24
20
|
| 'input'
|
|
25
21
|
| 'change'
|
|
@@ -32,7 +28,7 @@ export interface AllProps extends EndUserProps{
|
|
|
32
28
|
categorized?: boolean,
|
|
33
29
|
remSpecifierLen?: number,
|
|
34
30
|
propToAO: {[key: string] : AbsorbingObject},
|
|
35
|
-
|
|
31
|
+
checkedRegistry: boolean,
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
export type AP = AllProps;
|
|
@@ -59,10 +55,11 @@ export type BAP = AP & BEAllProps;
|
|
|
59
55
|
|
|
60
56
|
export interface Actions{
|
|
61
57
|
categorizeEl(self: BAP): PAP;
|
|
58
|
+
getEvtHandler(self: BAP): PAP;
|
|
62
59
|
parseForAttr(self: BAP): PAP;
|
|
63
60
|
getDefltEvtType(self: BAP): PAP;
|
|
64
|
-
findScriptEl(self: BAP): PAP;
|
|
65
|
-
importSymbols(self: BAP): ProPAP;
|
|
61
|
+
// findScriptEl(self: BAP): PAP;
|
|
62
|
+
// importSymbols(self: BAP): ProPAP;
|
|
66
63
|
genRemoteSpecifiers(self: BAP): PAP;
|
|
67
64
|
seek(self: BAP): ProPAP;
|
|
68
65
|
hydrate(self: BAP): ProPAP;
|