mount-observer 0.0.104 → 0.0.106
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/Events.js +42 -0
- package/Events.ts +45 -0
- package/MountObserver.js +62 -94
- package/MountObserver.ts +63 -87
- package/package.json +5 -1
- package/readAttrs.ts +60 -0
- package/refid/ism.js +80 -0
- package/refid/ism.ts +82 -0
- package/refid/itemprops.js +1 -1
- package/refid/itemprops.ts +1 -1
- package/refid/stdVal.js +15 -0
- package/refid/stdVal.ts +15 -0
- package/ts-refs/be-consoling/types.d.ts +25 -0
- package/ts-refs/be-evanescent/types.d.ts +20 -0
- package/ts-refs/be-fetching/types.d.ts +73 -0
- package/ts-refs/be-gone/types.d.ts +24 -0
- package/ts-refs/be-intersectional/types.d.ts +37 -0
- package/ts-refs/be-lazy/types.d.ts +29 -0
- package/ts-refs/be-parsing/types.d.ts +37 -0
- package/ts-refs/do-invoke/types.d.ts +3 -3
- package/ts-refs/fetch-for/types.d.ts +37 -0
- package/ts-refs/for-fetch/doc.d.ts +98 -0
- package/ts-refs/for-fetch/types.d.ts +4 -96
- package/ts-refs/soak-up/types.d.ts +36 -0
- package/ts-refs/trans-render/froop/types.d.ts +14 -5
- package/ts-refs/trans-render/types.d.ts +4 -3
- package/ts-refs/wc-info/SimpleWCInfo.d.ts +15 -0
|
@@ -1,91 +1,12 @@
|
|
|
1
1
|
import { JSONObject } from '../trans-render/lib/types';
|
|
2
2
|
import { Specifier } from '../trans-render/dss/types';
|
|
3
3
|
import { URLBuilder } from '../../URLBuilder';
|
|
4
|
-
|
|
4
|
+
import {SimpleWCInfo} from '../wc-info/SimpleWCInfo';
|
|
5
|
+
import {EndUserProps} from './doc';
|
|
6
|
+
export {EndUserProps} from './doc';
|
|
5
7
|
|
|
6
8
|
declare class WeakRef<TProps = any>{}
|
|
7
|
-
/**
|
|
8
|
-
* fetch-for props
|
|
9
|
-
*/
|
|
10
|
-
export interface EndUserProps{
|
|
11
|
-
|
|
12
|
-
accept?: string,
|
|
13
|
-
/**
|
|
14
|
-
* Url to invoke
|
|
15
|
-
* @readonly true
|
|
16
|
-
*/
|
|
17
|
-
src?: string,
|
|
18
|
-
|
|
19
|
-
':src': string,
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Specifier for list of form associated or contentEditable peer elements that
|
|
23
|
-
* should partake in forming the URL.
|
|
24
|
-
*/
|
|
25
|
-
for?: string,
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Indicates whether to treat the response as HTML or JSON or Text
|
|
29
|
-
*/
|
|
30
|
-
as?: 'html' | 'json' | 'text',
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The http verb to be used for the request
|
|
34
|
-
*/
|
|
35
|
-
method?:
|
|
36
|
-
| 'GET'
|
|
37
|
-
| 'HEAD'
|
|
38
|
-
| 'POST'
|
|
39
|
-
| 'PUT'
|
|
40
|
-
| 'DELETE'
|
|
41
|
-
| 'OPTIONS'
|
|
42
|
-
| 'TRACE'
|
|
43
|
-
| 'PATCH',
|
|
44
|
-
/**
|
|
45
|
-
* Either the JSON stringified or the parsed JSON object
|
|
46
|
-
* If parsed, the web component will stringify it.
|
|
47
|
-
*/
|
|
48
|
-
body?: any,
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Request credentials
|
|
52
|
-
*/
|
|
53
|
-
credentials?: RequestCredentials,
|
|
54
9
|
|
|
55
|
-
/**
|
|
56
|
-
* Directed Scoped Specifier to the
|
|
57
|
-
* DOM element where the retrieved content should be applied.
|
|
58
|
-
*/
|
|
59
|
-
target?: string,
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* If as=html, specify whether to (stream) the contents into an attached shadow DOM or not.
|
|
63
|
-
*/
|
|
64
|
-
shadow?: ShadowRootMode,
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Do not cache results even if the url has been invoked before.
|
|
68
|
-
*/
|
|
69
|
-
noCache?: boolean,
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Stream the contents into the target element
|
|
73
|
-
*/
|
|
74
|
-
stream?: boolean,
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Directed Scoped Specifier to a
|
|
78
|
-
* (button) element, to delay submitting the fetch request until that button is clicked.
|
|
79
|
-
*/
|
|
80
|
-
when?: string,
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Directed Scoped Specifier to a form element
|
|
84
|
-
* that we should use to form the url and body from.
|
|
85
|
-
*/
|
|
86
|
-
form?: string,
|
|
87
|
-
|
|
88
|
-
}
|
|
89
10
|
|
|
90
11
|
export interface OverridableGetters{
|
|
91
12
|
//request$: RequestInit,
|
|
@@ -138,7 +59,7 @@ export interface Actions{
|
|
|
138
59
|
parseTarget(self: this): ProPP;
|
|
139
60
|
// listenForInput(self: this): ProPP;
|
|
140
61
|
// doInitialLoad(self: this): ProPP;
|
|
141
|
-
initializeWhen(self: this): Promise<
|
|
62
|
+
initializeWhen(self: this): Promise<PAP | undefined>;
|
|
142
63
|
// onForm(self: this): ProPP;
|
|
143
64
|
// onFormSpecifier(self: this): ProPP;
|
|
144
65
|
// onFormRef(self: this): Promise<void>,
|
|
@@ -159,17 +80,4 @@ export interface EventForFetch {
|
|
|
159
80
|
|
|
160
81
|
export type ForData = {[key: string]: HTMLInputElement}
|
|
161
82
|
|
|
162
|
-
// /**
|
|
163
|
-
// * fetch-for web component
|
|
164
|
-
// */
|
|
165
|
-
// export abstract class ForFetchInfo implements SimpleWCInfo {
|
|
166
|
-
// src: './for-fetch.js';
|
|
167
|
-
// tagName: 'for-fetch';
|
|
168
|
-
// props: EndUserProps;
|
|
169
|
-
// cssParts: {
|
|
170
|
-
|
|
171
|
-
// }
|
|
172
|
-
// }
|
|
173
|
-
|
|
174
|
-
// export type Package = [ForFetchInfo];
|
|
175
83
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {IEnhancement, BEAllProps, EMC} from '../trans-render/be/types';
|
|
2
|
+
import { Specifier } from "../trans-render/dss/types";
|
|
3
|
+
|
|
4
|
+
export interface EndUserProps extends IEnhancement{
|
|
5
|
+
soakUpRules: SoakUpRule[]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AllProps extends EndUserProps{
|
|
9
|
+
|
|
10
|
+
fullyParsed?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type AP = AllProps;
|
|
14
|
+
|
|
15
|
+
export type PAP = Partial<AP>;
|
|
16
|
+
|
|
17
|
+
export type ProPAP = Promise<PAP>;
|
|
18
|
+
|
|
19
|
+
export type BAP = AP & BEAllProps;
|
|
20
|
+
|
|
21
|
+
export interface Actions{
|
|
22
|
+
fullyParse(self: BAP): PAP;
|
|
23
|
+
hydrate(self: BAP): ProPAP;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface PropMap {
|
|
27
|
+
srcProp: string,
|
|
28
|
+
destProp?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface SoakUpRule {
|
|
32
|
+
propMap: string
|
|
33
|
+
sourceSpecifier: Specifier
|
|
34
|
+
sourceSpecifierString: string
|
|
35
|
+
parsedPropMap: PropMap[]
|
|
36
|
+
}
|
|
@@ -115,8 +115,11 @@ export interface OConfig<TProps = any, TActions = TProps, ETProps = TProps> exte
|
|
|
115
115
|
export type Positractions<TProps = any, TActions = TProps> =
|
|
116
116
|
| Array<Positraction<TProps, TActions>>;
|
|
117
117
|
|
|
118
|
-
export interface Positraction<TProps = any, TActions = TProps> extends LogicOp<TProps> {
|
|
119
|
-
do:
|
|
118
|
+
export interface Positraction<TProps = any, TActions = TProps> extends LogicOp<TProps, TActions> {
|
|
119
|
+
do:
|
|
120
|
+
| Function
|
|
121
|
+
| (keyof TActions & string)
|
|
122
|
+
| PropsToProps<TProps>
|
|
120
123
|
ifKeyIn?: Array<keyof TProps & string>,
|
|
121
124
|
ifAllOf?: Array<keyof TProps & string>,
|
|
122
125
|
//ifNoneOf: Array<keyof TProps & string>,
|
|
@@ -149,7 +152,7 @@ export interface ExtHandlerOptions {
|
|
|
149
152
|
}
|
|
150
153
|
|
|
151
154
|
export type ExtHandlers<ETProps = any> =
|
|
152
|
-
| Partial<{[key in `inc_${keyof
|
|
155
|
+
| Partial<{[key in `inc_${keyof ETProps & string}` & string]: ExtHandlerOptions}>
|
|
153
156
|
;
|
|
154
157
|
|
|
155
158
|
export type Handlers<ETProps = any, TActions = ETProps> =
|
|
@@ -162,7 +165,9 @@ export type ListOfLogicalExpressions<MCProps = any> = (keyof MCProps | LogicOp<M
|
|
|
162
165
|
export type LogicOpProp<MCProps = any> =
|
|
163
166
|
|LogicOp<MCProps> | (keyof MCProps & string)[];
|
|
164
167
|
|
|
165
|
-
|
|
168
|
+
type PropsToProps<Props> = (x: Props) => (Promise<Partial<Props>> | Partial<Props>)
|
|
169
|
+
|
|
170
|
+
export interface LogicOp<Props = any, TActions = Props>{
|
|
166
171
|
/**
|
|
167
172
|
* Supported by trans-render
|
|
168
173
|
*/
|
|
@@ -182,7 +187,10 @@ export interface LogicOp<Props = any>{
|
|
|
182
187
|
|
|
183
188
|
delay?: number,
|
|
184
189
|
|
|
185
|
-
do?:
|
|
190
|
+
do?:
|
|
191
|
+
| Function
|
|
192
|
+
| (keyof TActions & string)
|
|
193
|
+
| PropsToProps<Props>
|
|
186
194
|
|
|
187
195
|
}
|
|
188
196
|
|
|
@@ -242,6 +250,7 @@ export interface PropInfo<TProps=any, TActions=any> extends IshPropInfo<TProps,
|
|
|
242
250
|
parse?: boolean;
|
|
243
251
|
def?: any;
|
|
244
252
|
attrName?: string;
|
|
253
|
+
reflect?: boolean;
|
|
245
254
|
/**
|
|
246
255
|
* form associated read only property
|
|
247
256
|
* https://web.dev/articles/more-capable-form-controls#:~:text=Form-associated%20custom%20elements%20aim%20to%20bridge%20the%20gap,associated%20with%20the%20form%2C%20like%20a%20browser-provided%20control.
|
|
@@ -55,7 +55,7 @@ export type DerivationCriteria<TProps, TMethods> = {
|
|
|
55
55
|
//TODO
|
|
56
56
|
as?: ConvertOptions,
|
|
57
57
|
//TODO - applicable to arrays
|
|
58
|
-
filter?: keyof
|
|
58
|
+
filter?: keyof TMethods & string | ((val: any) => boolean),
|
|
59
59
|
//TODO
|
|
60
60
|
//map?: keyof TModhods & string | ((val: any) => any,
|
|
61
61
|
};
|
|
@@ -317,7 +317,7 @@ export interface UnitOfWork<TProps, TMethods = TProps, TElement = {}>{
|
|
|
317
317
|
/**
|
|
318
318
|
* two way bind the listed props to data- attributes
|
|
319
319
|
*/
|
|
320
|
-
data?: Array<keyof
|
|
320
|
+
data?: Array<keyof TProps & string>
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
323
|
* negate to
|
|
@@ -568,7 +568,8 @@ export type StringWithAutocompleteOptions<TOptions> =
|
|
|
568
568
|
| TOptions;
|
|
569
569
|
|
|
570
570
|
export interface Clone$Options{
|
|
571
|
-
ish: HasIshList,
|
|
571
|
+
//ish: HasIshList,
|
|
572
|
+
ish: any,
|
|
572
573
|
ishContainer: Element,
|
|
573
574
|
seedEl: Element,
|
|
574
575
|
idxStart: number,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SimpleWCInfo<TProps = any, TPublicMethods = any>{
|
|
2
|
+
tagName: string;
|
|
3
|
+
cssParts?: {[key: string]: string};
|
|
4
|
+
props?: any;
|
|
5
|
+
methods?: any;
|
|
6
|
+
nonAttribProps?: (keyof TProps)[];
|
|
7
|
+
cssProps?: {[key: string]: string};
|
|
8
|
+
slots?: {[key: string]: string};
|
|
9
|
+
events?: {[key: string]: string};
|
|
10
|
+
name: string,
|
|
11
|
+
description: string,
|
|
12
|
+
homepage: string,
|
|
13
|
+
license: string,
|
|
14
|
+
|
|
15
|
+
}
|