jsf.js_next_gen 4.0.1-beta.9 → 4.0.2-beta.2
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/dist/window/faces-development.js +12 -2
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +12 -2
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +2 -2
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +11 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +22 -0
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +2 -1
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +45 -0
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +3 -3
- package/target/impl/util/HiddenInputBuilder.js +2 -2
- package/target/impl/util/HiddenInputBuilder.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +10 -0
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +20 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +2 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +36 -0
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +3 -3
- package/target/AssocArray.js +0 -281
- package/target/AssocArray.js.map +0 -1
- package/target/Config.js +0 -235
- package/target/Config.js.map +0 -1
- package/target/CryptoExtensions.js +0 -112
- package/target/CryptoExtensions.js.map +0 -1
- package/target/DomQuery.js +0 -1963
- package/target/DomQuery.js.map +0 -1
- package/target/Es2019Array.js +0 -117
- package/target/Es2019Array.js.map +0 -1
- package/target/Global.js +0 -38
- package/target/Global.js.map +0 -1
- package/target/IDomQuery.js +0 -3
- package/target/IDomQuery.js.map +0 -1
- package/target/Lang.js +0 -183
- package/target/Lang.js.map +0 -1
- package/target/Messaging.js +0 -645
- package/target/Messaging.js.map +0 -1
- package/target/Monad.js +0 -330
- package/target/Monad.js.map +0 -1
- package/target/Promise.js +0 -296
- package/target/Promise.js.map +0 -1
- package/target/PromiseShim.js +0 -30
- package/target/PromiseShim.js.map +0 -1
- package/target/SourcesCollectors.js +0 -444
- package/target/SourcesCollectors.js.map +0 -1
- package/target/Stream.js +0 -562
- package/target/Stream.js.map +0 -1
- package/target/TagBuilder.js +0 -178
- package/target/TagBuilder.js.map +0 -1
- package/target/XmlQuery.js +0 -84
- package/target/XmlQuery.js.map +0 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/impl/core/Context.js +0 -10
- package/target/impl/core/Context.js.map +0 -1
- package/target/impl/util/AsyncQueue.js +0 -109
- package/target/impl/util/AsyncQueue.js.map +0 -1
- package/target/impl/util/HiddenElementBuilder.js +0 -7
- package/target/impl/util/HiddenElementBuilder.js.map +0 -1
- package/target/impl/util/IAsyncRunnable.js +0 -27
- package/target/impl/util/IAsyncRunnable.js.map +0 -1
- package/target/impl/util/URLCodec.js +0 -77
- package/target/impl/util/URLCodec.js.map +0 -1
- package/target/impl/xhrCore/RequestContext.js +0 -11
- package/target/impl/xhrCore/RequestContext.js.map +0 -1
- package/target/impl/xhrCore/XhrQueHandler.js +0 -11
- package/target/impl/xhrCore/XhrQueHandler.js.map +0 -1
- package/target/impl/xhrCore/XhrQueueController.js +0 -62
- package/target/impl/xhrCore/XhrQueueController.js.map +0 -1
- package/target/index.js +0 -80
- package/target/index.js.map +0 -1
- package/target/index_core.js +0 -76
- package/target/index_core.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/ExtendedArrayTest.spec.js +0 -76
- package/target/test/frameworkBase/_ext/monadish/ExtendedArrayTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +0 -178
- package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +0 -1
- package/target/test/myfaces/OnLoadSpec.js +0 -57
- package/target/test/myfaces/OnLoadSpec.js.map +0 -1
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +0 -24
- package/target/test-classes/jsf-development.js +0 -3559
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +0 -1
- package/target/test-classes/jsf.js +0 -3
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/target/types/main/typescript/AssocArray.d.ts +0 -86
- package/target/types/main/typescript/Config.d.ts +0 -94
- package/target/types/main/typescript/CryptoExtensions.d.ts +0 -87
- package/target/types/main/typescript/DomQuery.d.ts +0 -587
- package/target/types/main/typescript/Es2019Array.d.ts +0 -30
- package/target/types/main/typescript/Global.d.ts +0 -23
- package/target/types/main/typescript/IDomQuery.d.ts +0 -480
- package/target/types/main/typescript/Lang.d.ts +0 -97
- package/target/types/main/typescript/Messaging.d.ts +0 -285
- package/target/types/main/typescript/Monad.d.ts +0 -161
- package/target/types/main/typescript/Promise.d.ts +0 -58
- package/target/types/main/typescript/PromiseShim.d.ts +0 -22
- package/target/types/main/typescript/SourcesCollectors.d.ts +0 -280
- package/target/types/main/typescript/Stream.d.ts +0 -284
- package/target/types/main/typescript/TagBuilder.d.ts +0 -50
- package/target/types/main/typescript/XmlQuery.d.ts +0 -31
- package/target/types/main/typescript/api/_api.d.ts +0 -182
- package/target/types/main/typescript/api/faces.d.ts +0 -17
- package/target/types/main/typescript/api/jsf.d.ts +0 -17
- package/target/types/main/typescript/impl/AjaxImpl.d.ts +0 -164
- package/target/types/main/typescript/impl/PushImpl.d.ts +0 -38
- package/target/types/main/typescript/impl/core/Const.d.ts +0 -138
- package/target/types/main/typescript/impl/core/ImplTypes.d.ts +0 -16
- package/target/types/main/typescript/impl/i18n/Messages.d.ts +0 -102
- package/target/types/main/typescript/impl/util/Assertions.d.ts +0 -46
- package/target/types/main/typescript/impl/util/AsyncRunnable.d.ts +0 -112
- package/target/types/main/typescript/impl/util/ExtDomQuery.d.ts +0 -100
- package/target/types/main/typescript/impl/util/FileUtils.d.ts +0 -25
- package/target/types/main/typescript/impl/util/HiddenInputBuilder.d.ts +0 -37
- package/target/types/main/typescript/impl/util/IListener.d.ts +0 -18
- package/target/types/main/typescript/impl/util/Lang.d.ts +0 -138
- package/target/types/main/typescript/impl/util/XhrQueueController.d.ts +0 -51
- package/target/types/main/typescript/impl/xhrCore/ErrorData.d.ts +0 -37
- package/target/types/main/typescript/impl/xhrCore/EventData.d.ts +0 -25
- package/target/types/main/typescript/impl/xhrCore/IResponseProcessor.d.ts +0 -136
- package/target/types/main/typescript/impl/xhrCore/RequestDataResolver.d.ts +0 -84
- package/target/types/main/typescript/impl/xhrCore/ResonseDataResolver.d.ts +0 -60
- package/target/types/main/typescript/impl/xhrCore/Response.d.ts +0 -29
- package/target/types/main/typescript/impl/xhrCore/ResponseProcessor.d.ts +0 -208
- package/target/types/main/typescript/impl/xhrCore/XhrFormData.d.ts +0 -83
- package/target/types/main/typescript/impl/xhrCore/XhrRequest.d.ts +0 -102
- package/target/types/main/typescript/index.d.ts +0 -34
- package/target/types/main/typescript/index_core.d.ts +0 -29
- package/target/types/main/typescript/myfaces/OamSubmit.d.ts +0 -53
- package/target/types/main/typescript/test/frameworkBase/LangTest.spec.d.ts +0 -1
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.d.ts +0 -1
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.d.ts +0 -39
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.d.ts +0 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.d.ts +0 -1
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.d.ts +0 -1
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/StandardInits.d.ts +0 -63
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.d.ts +0 -23
- package/target/types/main/typescript/test/impl/ImplTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/impl/ImplTest_23.spec.d.ts +0 -16
- package/target/types/main/typescript/test/impl/SeparatorCharsTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/myfaces/OamSubmit.spec.d.ts +0 -16
- package/target/types/main/typescript/test/myfaces/OnLoad.spec.d.ts +0 -16
- package/target/types/main/typescript/test/queue/AsynchronousProbe.d.ts +0 -38
- package/target/types/main/typescript/test/queue/AsynchronousQueueTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/ClientWindow.spec.d.ts +0 -1
- package/target/types/main/typescript/test/xhrCore/ErrorChainTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/EventTests.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/FakeWebsocket.d.ts +0 -24
- package/target/types/main/typescript/test/xhrCore/FileUploadTest.spec.d.ts +0 -1
- package/target/types/main/typescript/test/xhrCore/NamespacesRequestTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/OamSubmitTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/RequestParamsTest.spec.d.ts +0 -1
- package/target/types/main/typescript/test/xhrCore/RequestTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/RequestTest_23.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/ResponseTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/ResponseTest23.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/ShadowDomTest.spec.d.ts +0 -16
- package/target/types/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.d.ts +0 -1
- package/target/types/main/typescript/test/xhrCore/WebsocketTest.d.ts +0 -1
- package/target/types/main/typescript/test/xhrCore/XhrFormDataTest.spec.d.ts +0 -16
- package/target/types/test/typescript/AssocArrayTest.spec.d.ts +0 -1
- package/target/types/test/typescript/DomQueryTest.spec.d.ts +0 -1
- package/target/types/test/typescript/ExtendedArrayTest.spec.d.ts +0 -1
- package/target/types/test/typescript/LangTest.spec.d.ts +0 -1
- package/target/types/test/typescript/MappingProbes.d.ts +0 -24
- package/target/types/test/typescript/MappingTest.spec.d.ts +0 -1
- package/target/types/test/typescript/MessagingTest.spec.d.ts +0 -1
- package/target/types/test/typescript/MonadTest.spec.d.ts +0 -16
- package/target/types/test/typescript/PromiseTest.spec.d.ts +0 -1
- package/target/types/test/typescript/StreamTest.spec.d.ts +0 -1
- package/target/types/test/typescript/XmlQueryTest.spec.d.ts +0 -1
- package/target/types/test/typescript/markups/tobago-with-header.d.ts +0 -1
- package/target/types/test/typescript/markups/tobago-without-header.d.ts +0 -1
|
@@ -1,587 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
-
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
-
* this work for additional information regarding copyright ownership.
|
|
5
|
-
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
6
|
-
* (the "License"); you may not use this file except in compliance with
|
|
7
|
-
* the License. You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http:// www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { Optional, ValueEmbedder } from "./Monad";
|
|
18
|
-
import { XMLQuery } from "./XmlQuery";
|
|
19
|
-
import { ICollector, IStreamDataSource, ITERATION_STATUS } from "./SourcesCollectors";
|
|
20
|
-
import { _global$ } from "./Global";
|
|
21
|
-
import { IDomQuery } from "./IDomQuery";
|
|
22
|
-
/**
|
|
23
|
-
* in order to poss custom parameters we need to extend the mutation observer init
|
|
24
|
-
*/
|
|
25
|
-
export interface WAIT_OPTS extends MutationObserverInit {
|
|
26
|
-
timeout?: number;
|
|
27
|
-
/**
|
|
28
|
-
* interval on non legacy browsers
|
|
29
|
-
*/
|
|
30
|
-
interval?: number;
|
|
31
|
-
}
|
|
32
|
-
export declare class ElementAttribute extends ValueEmbedder<string> {
|
|
33
|
-
private element;
|
|
34
|
-
private name;
|
|
35
|
-
private defaultVal;
|
|
36
|
-
constructor(element: DomQuery, name: string, defaultVal?: string);
|
|
37
|
-
get value(): string;
|
|
38
|
-
set value(value: string);
|
|
39
|
-
protected getClass(): any;
|
|
40
|
-
static fromNullable<ElementAttribute, T>(value?: any, valueKey?: string): ElementAttribute;
|
|
41
|
-
}
|
|
42
|
-
export declare class Style extends ValueEmbedder<string> {
|
|
43
|
-
private element;
|
|
44
|
-
private name;
|
|
45
|
-
private defaultVal;
|
|
46
|
-
constructor(element: DomQuery, name: string, defaultVal?: string);
|
|
47
|
-
get value(): string;
|
|
48
|
-
set value(value: string);
|
|
49
|
-
protected getClass(): any;
|
|
50
|
-
static fromNullable<ElementAttribute, T>(value?: any, valueKey?: string): ElementAttribute;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Monadic DomNode representation, ala jquery
|
|
54
|
-
* This is a thin wrapper over querySelectorAll
|
|
55
|
-
* to get slim monadic support
|
|
56
|
-
* to reduce implementation code on the users side.
|
|
57
|
-
* This is vital for frameworks which want to rely on
|
|
58
|
-
* plain dom but still do not want to lose
|
|
59
|
-
* the reduced code footprint of querying dom trees and traversing
|
|
60
|
-
* by using functional patterns.
|
|
61
|
-
*
|
|
62
|
-
* Also, a few convenience methods are added to reduce
|
|
63
|
-
* the code footprint of standard dom processing
|
|
64
|
-
* operations like eval
|
|
65
|
-
*
|
|
66
|
-
* in most older systems
|
|
67
|
-
* Note parts of this code still stem from the Dom.js I have written 10 years
|
|
68
|
-
* ago, those parts look a bit ancient and will be replaced over time.
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
71
|
-
export declare class DomQuery implements IDomQuery, IStreamDataSource<DomQuery>, Iterable<DomQuery> {
|
|
72
|
-
static absent: DomQuery;
|
|
73
|
-
/**
|
|
74
|
-
* reference to the environmental global object
|
|
75
|
-
*/
|
|
76
|
-
static global: typeof _global$;
|
|
77
|
-
private rootNode;
|
|
78
|
-
pos: number;
|
|
79
|
-
constructor(...rootNode: Array<Element | ShadowRoot | DomQuery | Document | Array<any> | string>);
|
|
80
|
-
/**
|
|
81
|
-
* returns the first element
|
|
82
|
-
*/
|
|
83
|
-
get value(): Optional<Element>;
|
|
84
|
-
get values(): Element[];
|
|
85
|
-
get global(): any;
|
|
86
|
-
get stream(): any;
|
|
87
|
-
get lazyStream(): any;
|
|
88
|
-
/**
|
|
89
|
-
* returns the id of the first element
|
|
90
|
-
*/
|
|
91
|
-
get id(): ValueEmbedder<string>;
|
|
92
|
-
/**
|
|
93
|
-
* length of the entire query set
|
|
94
|
-
*/
|
|
95
|
-
get length(): number;
|
|
96
|
-
/**
|
|
97
|
-
* convenience method for tagName
|
|
98
|
-
*/
|
|
99
|
-
get tagName(): Optional<string>;
|
|
100
|
-
/**
|
|
101
|
-
* convenience method for nodeName
|
|
102
|
-
*/
|
|
103
|
-
get nodeName(): Optional<string>;
|
|
104
|
-
isTag(tagName: string): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* convenience property for type
|
|
107
|
-
*
|
|
108
|
-
* returns null in case of no type existing otherwise
|
|
109
|
-
* the type of the first element
|
|
110
|
-
*/
|
|
111
|
-
get type(): Optional<string>;
|
|
112
|
-
/**
|
|
113
|
-
* convenience property for name
|
|
114
|
-
*
|
|
115
|
-
* returns null in case of no type existing otherwise
|
|
116
|
-
* the name of the first element
|
|
117
|
-
*/
|
|
118
|
-
get name(): ValueEmbedder<string>;
|
|
119
|
-
/**
|
|
120
|
-
* convenience property for value
|
|
121
|
-
*
|
|
122
|
-
* returns null in case of no type existing otherwise
|
|
123
|
-
* the value of the first element
|
|
124
|
-
*/
|
|
125
|
-
get inputValue(): ValueEmbedder<string | boolean>;
|
|
126
|
-
get val(): string | boolean;
|
|
127
|
-
set val(value: string | boolean);
|
|
128
|
-
get nodeId(): string;
|
|
129
|
-
set nodeId(value: string);
|
|
130
|
-
get checked(): boolean;
|
|
131
|
-
set checked(newChecked: boolean);
|
|
132
|
-
get elements(): DomQuery;
|
|
133
|
-
get deepElements(): DomQuery;
|
|
134
|
-
/**
|
|
135
|
-
* a deep search which treats the single isolated shadow dom areas
|
|
136
|
-
* separately and runs the query on each shadow dom
|
|
137
|
-
* @param queryStr
|
|
138
|
-
*/
|
|
139
|
-
querySelectorAllDeep(queryStr: string): DomQuery;
|
|
140
|
-
/**
|
|
141
|
-
* disabled flag
|
|
142
|
-
*/
|
|
143
|
-
get disabled(): boolean;
|
|
144
|
-
set disabled(disabled: boolean);
|
|
145
|
-
removeAttribute(name: string): void;
|
|
146
|
-
get childNodes(): DomQuery;
|
|
147
|
-
get asArray(): DomQuery[];
|
|
148
|
-
get offsetWidth(): number;
|
|
149
|
-
get offsetHeight(): number;
|
|
150
|
-
get offsetLeft(): number;
|
|
151
|
-
get offsetTop(): number;
|
|
152
|
-
get asNodeArray(): Array<Element>;
|
|
153
|
-
static querySelectorAllDeep(selector: string): DomQuery;
|
|
154
|
-
/**
|
|
155
|
-
* easy query selector all producer
|
|
156
|
-
*
|
|
157
|
-
* @param selector the selector
|
|
158
|
-
* @returns a results dom query object
|
|
159
|
-
*/
|
|
160
|
-
static querySelectorAll(selector: string): DomQuery;
|
|
161
|
-
/**
|
|
162
|
-
* byId producer
|
|
163
|
-
*
|
|
164
|
-
* @param selector id
|
|
165
|
-
* @param deep true if you want to go into shadow areas
|
|
166
|
-
* @return a DomQuery containing the found elements
|
|
167
|
-
*/
|
|
168
|
-
static byId(selector: string | DomQuery | Element, deep?: boolean): DomQuery;
|
|
169
|
-
/**
|
|
170
|
-
* byTagName producer
|
|
171
|
-
*
|
|
172
|
-
* @param selector name
|
|
173
|
-
* @return a DomQuery containing the found elements
|
|
174
|
-
*/
|
|
175
|
-
static byTagName(selector: string | DomQuery | Element): DomQuery;
|
|
176
|
-
static globalEval(code: string, nonce?: string): DomQuery;
|
|
177
|
-
static globalEvalSticky(code: string, nonce?: string): DomQuery;
|
|
178
|
-
/**
|
|
179
|
-
* builds the ie nodes properly in a placeholder
|
|
180
|
-
* and bypasses a non script insert bug that way
|
|
181
|
-
* @param markup the markup code to be executed from
|
|
182
|
-
*/
|
|
183
|
-
static fromMarkup(markup: string): DomQuery;
|
|
184
|
-
/**
|
|
185
|
-
* returns the nth element as DomQuery
|
|
186
|
-
* from the internal elements
|
|
187
|
-
* note if you try to reach a non-existing element position
|
|
188
|
-
* you will get back an absent entry
|
|
189
|
-
*
|
|
190
|
-
* @param index the nth index
|
|
191
|
-
*/
|
|
192
|
-
get(index: number): DomQuery;
|
|
193
|
-
/**
|
|
194
|
-
* returns the nth element as optional of an Element object
|
|
195
|
-
* @param index the number from the index
|
|
196
|
-
* @param defaults the default value if the index is overrun default Optional\.absent
|
|
197
|
-
*/
|
|
198
|
-
getAsElem(index: number, defaults?: Optional<any>): Optional<Element>;
|
|
199
|
-
/**
|
|
200
|
-
* returns the files from a given element
|
|
201
|
-
* @param index
|
|
202
|
-
*/
|
|
203
|
-
filesFromElem(index: number): Array<any>;
|
|
204
|
-
/**
|
|
205
|
-
* returns the value array< of all elements
|
|
206
|
-
*/
|
|
207
|
-
allElems(): Array<Element>;
|
|
208
|
-
/**
|
|
209
|
-
* absent no values reached?
|
|
210
|
-
*/
|
|
211
|
-
isAbsent(): boolean;
|
|
212
|
-
/**
|
|
213
|
-
* should make the code clearer
|
|
214
|
-
* note if you pass a function
|
|
215
|
-
* this refers to the active DomQuery object
|
|
216
|
-
*/
|
|
217
|
-
isPresent(presentRunnable?: (elem?: DomQuery) => void): boolean;
|
|
218
|
-
/**
|
|
219
|
-
* should make the code clearer
|
|
220
|
-
* note if you pass a function
|
|
221
|
-
* this refers to the active DomQuery object
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
* @param presentRunnable
|
|
225
|
-
*/
|
|
226
|
-
ifPresentLazy(presentRunnable?: (elem?: DomQuery) => void): DomQuery;
|
|
227
|
-
/**
|
|
228
|
-
* remove all affected nodes from this query object from the dom tree
|
|
229
|
-
*/
|
|
230
|
-
delete(): void;
|
|
231
|
-
querySelectorAll(selector: any): DomQuery;
|
|
232
|
-
closest(selector: any): DomQuery;
|
|
233
|
-
/**
|
|
234
|
-
* core byId method
|
|
235
|
-
* @param id the id to search for
|
|
236
|
-
* @param includeRoot also match the root element?
|
|
237
|
-
*/
|
|
238
|
-
byId(id: string, includeRoot?: boolean): DomQuery;
|
|
239
|
-
byIdDeep(id: string, includeRoot?: boolean): DomQuery;
|
|
240
|
-
/**
|
|
241
|
-
* same as byId just for the tag name
|
|
242
|
-
* @param tagName the tag-name to search for
|
|
243
|
-
* @param includeRoot shall the root element be part of this search
|
|
244
|
-
* @param deep do we also want to go into shadow dom areas
|
|
245
|
-
*/
|
|
246
|
-
byTagName(tagName: string, includeRoot?: boolean, deep?: boolean): DomQuery;
|
|
247
|
-
/**
|
|
248
|
-
* attr accessor, usage myQuery.attr("class").value = "bla"
|
|
249
|
-
* or let value myQuery.attr("class").value
|
|
250
|
-
* @param attr the attribute to set
|
|
251
|
-
* @param defaultValue the default value in case nothing is presented (defaults to null)
|
|
252
|
-
*/
|
|
253
|
-
attr(attr: string, defaultValue?: string): ElementAttribute;
|
|
254
|
-
style(cssProperty: string, defaultValue?: string): Style;
|
|
255
|
-
/**
|
|
256
|
-
* Checks for an existing class in the class attributes
|
|
257
|
-
*
|
|
258
|
-
* @param clazz the class to search for
|
|
259
|
-
*/
|
|
260
|
-
hasClass(clazz: string): boolean;
|
|
261
|
-
/**
|
|
262
|
-
* appends a class string if not already in the element(s)
|
|
263
|
-
*
|
|
264
|
-
* @param clazz the style class to append
|
|
265
|
-
*/
|
|
266
|
-
addClass(clazz: string): DomQuery;
|
|
267
|
-
/**
|
|
268
|
-
* remove the style class if in the class definitions
|
|
269
|
-
*
|
|
270
|
-
* @param clazz
|
|
271
|
-
*/
|
|
272
|
-
removeClass(clazz: string): DomQuery;
|
|
273
|
-
/**
|
|
274
|
-
* checks whether we have a multipart element in our children
|
|
275
|
-
* or are one
|
|
276
|
-
*/
|
|
277
|
-
isMultipartCandidate(deep?: boolean): boolean;
|
|
278
|
-
/**
|
|
279
|
-
* innerHtml
|
|
280
|
-
* equivalent to jQueries html
|
|
281
|
-
* as setter the html is set and the
|
|
282
|
-
* DomQuery is given back
|
|
283
|
-
* as getter the html string is returned
|
|
284
|
-
*
|
|
285
|
-
* @param newInnerHTML the inner html to be inserted
|
|
286
|
-
*/
|
|
287
|
-
html(newInnerHTML?: string): DomQuery | Optional<string>;
|
|
288
|
-
/**
|
|
289
|
-
* Standard dispatch event method, delegated from node
|
|
290
|
-
*/
|
|
291
|
-
dispatchEvent(evt: Event): DomQuery;
|
|
292
|
-
/**
|
|
293
|
-
* abbreviation property to use innerHTML directly like on the dom tree
|
|
294
|
-
* @param newInnerHTML the new inner html which should be attached to "this" domQuery
|
|
295
|
-
*/
|
|
296
|
-
set innerHTML(newInnerHTML: string);
|
|
297
|
-
/**
|
|
298
|
-
* getter abbreviation to use innerHTML directly
|
|
299
|
-
*/
|
|
300
|
-
get innerHTML(): string;
|
|
301
|
-
/**
|
|
302
|
-
* since the dom allows both innerHTML and innerHtml we also have to implement both
|
|
303
|
-
* @param newInnerHtml see above
|
|
304
|
-
*/
|
|
305
|
-
set innerHtml(newInnerHtml: string);
|
|
306
|
-
/**
|
|
307
|
-
* same here, getter for allowing innerHtml directly
|
|
308
|
-
*/
|
|
309
|
-
get innerHtml(): string;
|
|
310
|
-
/**
|
|
311
|
-
* filters the current dom query elements
|
|
312
|
-
* upon a given selector
|
|
313
|
-
*
|
|
314
|
-
* @param selector
|
|
315
|
-
*/
|
|
316
|
-
filterSelector(selector: string): DomQuery;
|
|
317
|
-
/**
|
|
318
|
-
* checks whether any item in this domQuery level matches the selector
|
|
319
|
-
* if there is one element only attached, as root the match is only
|
|
320
|
-
* performed on this element.
|
|
321
|
-
* @param selector
|
|
322
|
-
*/
|
|
323
|
-
matchesSelector(selector: string): boolean;
|
|
324
|
-
/**
|
|
325
|
-
* easy node traversal, you can pass
|
|
326
|
-
* a set of node selectors which are joined as direct children
|
|
327
|
-
*
|
|
328
|
-
* Note!!! The root nodes are not in the getIf, those are always the child nodes
|
|
329
|
-
*
|
|
330
|
-
* @param nodeSelector
|
|
331
|
-
*/
|
|
332
|
-
getIf(...nodeSelector: Array<string>): DomQuery;
|
|
333
|
-
eachElem(func: (item: Element, cnt?: number) => any): DomQuery;
|
|
334
|
-
firstElem(func?: (item: Element, cnt?: number) => any): DomQuery;
|
|
335
|
-
lastElem(func?: (item: Element, cnt?: number) => any): DomQuery;
|
|
336
|
-
each(func: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
337
|
-
/**
|
|
338
|
-
* replace convenience function, replaces one or more elements with
|
|
339
|
-
* a set of elements passed as DomQuery
|
|
340
|
-
* @param toReplace the replaced nodes as reference (original node has been replaced)
|
|
341
|
-
*/
|
|
342
|
-
replace(toReplace: DomQuery): DomQuery;
|
|
343
|
-
/**
|
|
344
|
-
* returns a new dom query containing only the first element max
|
|
345
|
-
*
|
|
346
|
-
* @param func a an optional callback function to perform an operation on the first element
|
|
347
|
-
*/
|
|
348
|
-
first(func?: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
349
|
-
/**
|
|
350
|
-
* returns a new dom query containing only the first element max
|
|
351
|
-
*
|
|
352
|
-
* @param func a an optional callback function to perform an operation on the first element
|
|
353
|
-
*/
|
|
354
|
-
last(func?: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
355
|
-
/**
|
|
356
|
-
* filter function which filters a subset
|
|
357
|
-
*
|
|
358
|
-
* @param func
|
|
359
|
-
*/
|
|
360
|
-
filter(func: (item: DomQuery) => boolean): DomQuery;
|
|
361
|
-
/**
|
|
362
|
-
* global eval head appendix method
|
|
363
|
-
* no other methods are supported anymore
|
|
364
|
-
* @param code the code to be evaluated
|
|
365
|
-
* @param nonce optional nonce key for higher security
|
|
366
|
-
*/
|
|
367
|
-
globalEval(code: string, nonce?: string): DomQuery;
|
|
368
|
-
/**
|
|
369
|
-
* global eval head appendix method
|
|
370
|
-
* no other methods are supported anymore
|
|
371
|
-
* @param code the code to be evaluated
|
|
372
|
-
* @param nonce optional nonce key for higher security
|
|
373
|
-
*/
|
|
374
|
-
globalEvalSticky(code: string, nonce?: string): DomQuery;
|
|
375
|
-
/**
|
|
376
|
-
* detaches a set of nodes from their parent elements
|
|
377
|
-
* in a browser independent manner
|
|
378
|
-
* @return {Array} an array of nodes with the detached dom nodes
|
|
379
|
-
*/
|
|
380
|
-
detach(): DomQuery;
|
|
381
|
-
/**
|
|
382
|
-
* appends the current set of elements
|
|
383
|
-
* to the element or first element passed via elem
|
|
384
|
-
* @param elem
|
|
385
|
-
*/
|
|
386
|
-
appendTo(elem: DomQuery | string): DomQuery;
|
|
387
|
-
/**
|
|
388
|
-
* loads and evaluates a script from a source uri
|
|
389
|
-
*
|
|
390
|
-
* @param src the source to be loaded and evaluated
|
|
391
|
-
* @param delay in milliseconds execution default (0 == no delay)
|
|
392
|
-
* @param nonce optional nonce value to allow increased security via nonce crypto token
|
|
393
|
-
*/
|
|
394
|
-
loadScriptEval(src: string, delay?: number, nonce?: string): this;
|
|
395
|
-
/**
|
|
396
|
-
* loads and evaluates a script from a source uri
|
|
397
|
-
*
|
|
398
|
-
* @param src the source to be loaded and evaluated
|
|
399
|
-
* @param delay in milliseconds execution default (0 == no delay)
|
|
400
|
-
* @param nonce optional nonce parameter for increased security via nonce crypto token
|
|
401
|
-
*/
|
|
402
|
-
loadScriptEvalSticky(src: string, delay?: number, nonce?: string): this;
|
|
403
|
-
insertAfter(...toInsertParams: Array<DomQuery>): DomQuery;
|
|
404
|
-
insertBefore(...toInsertParams: Array<DomQuery>): DomQuery;
|
|
405
|
-
orElse(...elseValue: any): DomQuery;
|
|
406
|
-
orElseLazy(func: () => any): DomQuery;
|
|
407
|
-
/**
|
|
408
|
-
* find all parents in the hierarchy for which the selector matches
|
|
409
|
-
* @param selector
|
|
410
|
-
*/
|
|
411
|
-
allParents(selector: string): DomQuery;
|
|
412
|
-
/**
|
|
413
|
-
* finds the first parent in the hierarchy for which the selector matches
|
|
414
|
-
* @param selector
|
|
415
|
-
*/
|
|
416
|
-
firstParent(selector: string): DomQuery;
|
|
417
|
-
/**
|
|
418
|
-
* fetches all parents as long as the filter criterium matches
|
|
419
|
-
* @param selector
|
|
420
|
-
*/
|
|
421
|
-
parentsWhileMatch(selector: string): DomQuery;
|
|
422
|
-
parent(): DomQuery;
|
|
423
|
-
copyAttrs(sourceItem: DomQuery | XMLQuery): DomQuery;
|
|
424
|
-
/**
|
|
425
|
-
* outerHTML convenience method
|
|
426
|
-
* browsers only support innerHTML but
|
|
427
|
-
* for instance for your jsf.js we have a full
|
|
428
|
-
* replace pattern which needs outerHTML processing
|
|
429
|
-
*
|
|
430
|
-
* @param markup the markup which should replace the root element
|
|
431
|
-
* @param runEmbeddedScripts if true the embedded scripts are executed
|
|
432
|
-
* @param runEmbeddedCss if true the embedded css are executed
|
|
433
|
-
* @param deep should this also work for shadow dom (run scripts etc...)
|
|
434
|
-
*/
|
|
435
|
-
outerHTML(markup: string, runEmbeddedScripts?: boolean, runEmbeddedCss?: boolean, deep?: boolean): DomQuery;
|
|
436
|
-
/**
|
|
437
|
-
* Run through the given nodes in the DomQuery execute the inline scripts
|
|
438
|
-
* @param sticky if set to true the evaluated elements will stick to the head, default false
|
|
439
|
-
* @param whitelisted: optional whitelist function which can filter out script tags which are not processed
|
|
440
|
-
* defaults to the standard jsf.js exclusion (we use this code for myfaces)
|
|
441
|
-
*/
|
|
442
|
-
runScripts(sticky?: boolean, whitelisted?: (val: string) => boolean): DomQuery;
|
|
443
|
-
runCss(): DomQuery;
|
|
444
|
-
/**
|
|
445
|
-
* fires a click event on the underlying dom elements
|
|
446
|
-
*/
|
|
447
|
-
click(): DomQuery;
|
|
448
|
-
addEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery;
|
|
449
|
-
removeEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery;
|
|
450
|
-
/**
|
|
451
|
-
* fires an event
|
|
452
|
-
*/
|
|
453
|
-
fireEvent(eventName: string, options?: {
|
|
454
|
-
[key: string]: any;
|
|
455
|
-
}): void;
|
|
456
|
-
textContent(joinString?: string): string;
|
|
457
|
-
innerText(joinString?: string): string;
|
|
458
|
-
/**
|
|
459
|
-
* encodes all input elements properly into respective
|
|
460
|
-
* config entries, this can be used
|
|
461
|
-
* for legacy systems, for newer use-cases, use the
|
|
462
|
-
* HTML5 Form class which all newer browsers provide
|
|
463
|
-
*
|
|
464
|
-
* @param toMerge optional config which can be merged in
|
|
465
|
-
* @return a copy pf
|
|
466
|
-
*/
|
|
467
|
-
encodeFormElement(toMerge?: {}): {
|
|
468
|
-
[key: string]: any;
|
|
469
|
-
};
|
|
470
|
-
get cDATAAsString(): string;
|
|
471
|
-
subNodes(from: number, to?: number): DomQuery;
|
|
472
|
-
_limits: number;
|
|
473
|
-
limits(end: number): DomQuery;
|
|
474
|
-
hasNext(): boolean;
|
|
475
|
-
next(): DomQuery;
|
|
476
|
-
lookAhead(cnt?: number): ITERATION_STATUS | DomQuery;
|
|
477
|
-
current(): DomQuery | ITERATION_STATUS;
|
|
478
|
-
reset(): void;
|
|
479
|
-
attachShadow(params?: {
|
|
480
|
-
[key: string]: string;
|
|
481
|
-
}): DomQuery;
|
|
482
|
-
/**
|
|
483
|
-
* helper to fix a common dom problem
|
|
484
|
-
* we have to wait until a certain condition is met, in most of the cases we just want to know whether an element is present in the sub dom-tree before being able to proceed
|
|
485
|
-
* @param condition
|
|
486
|
-
* @param options
|
|
487
|
-
*/
|
|
488
|
-
waitUntilDom(condition: (element: DomQuery) => boolean, options?: WAIT_OPTS): Promise<DomQuery>;
|
|
489
|
-
/**
|
|
490
|
-
* returns the embedded shadow elements
|
|
491
|
-
*/
|
|
492
|
-
get shadowElements(): DomQuery;
|
|
493
|
-
get shadowRoot(): DomQuery;
|
|
494
|
-
get hasShadow(): boolean;
|
|
495
|
-
static getCaretPosition(ctrl: any): number;
|
|
496
|
-
/**
|
|
497
|
-
* sets the caret position
|
|
498
|
-
*
|
|
499
|
-
* @param ctrl the control to set the caret position to
|
|
500
|
-
* @param pos the position to set
|
|
501
|
-
*
|
|
502
|
-
* note if the control does not have any selectable and focusable behavior
|
|
503
|
-
* calling this method does nothing (silent fail)
|
|
504
|
-
*
|
|
505
|
-
*/
|
|
506
|
-
static setCaretPosition(ctrl: any, pos: number): void;
|
|
507
|
-
/**
|
|
508
|
-
* Implementation of an iterator
|
|
509
|
-
* to allow loops over dom query collections
|
|
510
|
-
*/
|
|
511
|
-
[Symbol.iterator](): Iterator<DomQuery>;
|
|
512
|
-
/**
|
|
513
|
-
* Concatenates the elements of two Dom Queries into a single one
|
|
514
|
-
* @param toAttach the elements to attach
|
|
515
|
-
* @param filterDoubles filter out possible double elements (aka same markup)
|
|
516
|
-
*/
|
|
517
|
-
concat(toAttach: DomQuery, filterDoubles?: boolean): DomQuery;
|
|
518
|
-
append(elem: DomQuery): DomQuery;
|
|
519
|
-
prependTo(elem: DomQuery): DomQuery;
|
|
520
|
-
prepend(elem: DomQuery): DomQuery;
|
|
521
|
-
/**
|
|
522
|
-
* query selector all on the existing dom queryX object
|
|
523
|
-
*
|
|
524
|
-
* @param selector the standard selector
|
|
525
|
-
* @return a DomQuery with the results
|
|
526
|
-
*/
|
|
527
|
-
private _querySelectorAll;
|
|
528
|
-
private _querySelectorAllDeep;
|
|
529
|
-
/**
|
|
530
|
-
* query selector all on the existing dom queryX object
|
|
531
|
-
*
|
|
532
|
-
* @param selector the standard selector
|
|
533
|
-
* @return a DomQuery with the results
|
|
534
|
-
*/
|
|
535
|
-
private _closest;
|
|
536
|
-
private _closestDeep;
|
|
537
|
-
/**
|
|
538
|
-
* matches selector call in a browser independent manner
|
|
539
|
-
*
|
|
540
|
-
* @param toMatch
|
|
541
|
-
* @param selector
|
|
542
|
-
* @private
|
|
543
|
-
*/
|
|
544
|
-
private _mozMatchesSelector;
|
|
545
|
-
/**
|
|
546
|
-
* sticky non-sticky unified code of the load script eval
|
|
547
|
-
* implementation if programmatic >script src="... loading
|
|
548
|
-
*
|
|
549
|
-
* @param sticky if set to true a head element is left in the dom tree after the script has loaded
|
|
550
|
-
*
|
|
551
|
-
* @param src the sec to load
|
|
552
|
-
* @param delay delay the script loading x ms (default immediately === 0)
|
|
553
|
-
* @param nonce optional nonce token to be passed into the script tag
|
|
554
|
-
* @private
|
|
555
|
-
*/
|
|
556
|
-
private _loadScriptEval;
|
|
557
|
-
/**
|
|
558
|
-
* resolves an attribute holder compared
|
|
559
|
-
* @param attrName the attribute name
|
|
560
|
-
*/
|
|
561
|
-
private resolveAttributeHolder;
|
|
562
|
-
private createSourceNode;
|
|
563
|
-
private applyNonce;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Various collectors
|
|
567
|
-
* which can be used in conjunction with Streams
|
|
568
|
-
*/
|
|
569
|
-
/**
|
|
570
|
-
* A collector which bundles a full dom query stream into a single dom query element
|
|
571
|
-
*
|
|
572
|
-
* This connects basically our stream back into DomQuery
|
|
573
|
-
*/
|
|
574
|
-
export declare class DomQueryCollector implements ICollector<DomQuery, DomQuery> {
|
|
575
|
-
data: DomQuery[];
|
|
576
|
-
collect(element: DomQuery): void;
|
|
577
|
-
get finalValue(): DomQuery;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* abbreviation for DomQuery
|
|
581
|
-
*/
|
|
582
|
-
export declare const DQ: typeof DomQuery;
|
|
583
|
-
export type DQ = DomQuery;
|
|
584
|
-
/**
|
|
585
|
-
* replacement for the jquery $
|
|
586
|
-
*/
|
|
587
|
-
export declare const DQ$: typeof DomQuery.querySelectorAll;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extended array
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Extended array which adds various es 2019 shim functions to the normal array
|
|
6
|
-
* We must remap all array producing functions in order to keep
|
|
7
|
-
* the delegation active, once we are in!
|
|
8
|
-
*/
|
|
9
|
-
declare class Es2019Array_<T> extends Array<T> {
|
|
10
|
-
_another: T[];
|
|
11
|
-
constructor(...another: T[]);
|
|
12
|
-
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
|
13
|
-
concat(...items: any[]): T[];
|
|
14
|
-
reverse(): T[];
|
|
15
|
-
slice(start?: number, end?: number): T[];
|
|
16
|
-
splice(start: number, deleteCount?: number): T[];
|
|
17
|
-
filter<S extends T>(predicate: (value: T, index: number, array: T[]) => any, thisArg?: any): S[];
|
|
18
|
-
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
|
|
19
|
-
private _flat;
|
|
20
|
-
private _flatResolve;
|
|
21
|
-
private _flatMap;
|
|
22
|
-
}
|
|
23
|
-
export declare function _Es2019Array<T>(...data: T[]): Es2019Array_<T>;
|
|
24
|
-
/**
|
|
25
|
-
* this is the switch between normal array and our shim
|
|
26
|
-
* the shim is only provided in case the native browser
|
|
27
|
-
* does not yet have flatMap support on arrays
|
|
28
|
-
*/
|
|
29
|
-
export declare var Es2019Array: any;
|
|
30
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* various environments handle the global variable different
|
|
21
|
-
* we have to deal with this.
|
|
22
|
-
*/
|
|
23
|
-
export declare function _global$(): any | null;
|