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,480 +0,0 @@
|
|
|
1
|
-
import { Optional, ValueEmbedder } from "./Monad";
|
|
2
|
-
import { XMLQuery } from "./XmlQuery";
|
|
3
|
-
import { DomQuery, ElementAttribute, Style, WAIT_OPTS } from "./DomQuery";
|
|
4
|
-
export interface IDomQuery {
|
|
5
|
-
/**
|
|
6
|
-
* reference to the systems global object
|
|
7
|
-
* (globalThis, window, global, depending on the environment)
|
|
8
|
-
*/
|
|
9
|
-
readonly global: any;
|
|
10
|
-
/**
|
|
11
|
-
* reads the first element if it exists and returns an optional
|
|
12
|
-
*/
|
|
13
|
-
readonly value: Optional<Element>;
|
|
14
|
-
/**
|
|
15
|
-
* All elements as array
|
|
16
|
-
*/
|
|
17
|
-
readonly values: Element[];
|
|
18
|
-
/**
|
|
19
|
-
* returns the id as settable value (See also ValueEmbedder)
|
|
20
|
-
*/
|
|
21
|
-
readonly id: ValueEmbedder<string>;
|
|
22
|
-
/**
|
|
23
|
-
* returns the length of embedded nodes (top level)
|
|
24
|
-
*/
|
|
25
|
-
readonly length: number;
|
|
26
|
-
/**
|
|
27
|
-
* the tag name of the first element
|
|
28
|
-
*/
|
|
29
|
-
readonly tagName: Optional<string>;
|
|
30
|
-
/**
|
|
31
|
-
* the node name of the first element
|
|
32
|
-
*/
|
|
33
|
-
readonly nodeName: Optional<string>;
|
|
34
|
-
/**
|
|
35
|
-
* the type of the first element
|
|
36
|
-
*/
|
|
37
|
-
readonly type: Optional<string>;
|
|
38
|
-
/**
|
|
39
|
-
* The name as changeable value
|
|
40
|
-
*/
|
|
41
|
-
readonly name: ValueEmbedder<string>;
|
|
42
|
-
/**
|
|
43
|
-
* The value in case of inputs as changeable value
|
|
44
|
-
*/
|
|
45
|
-
readonly inputValue: ValueEmbedder<string | boolean>;
|
|
46
|
-
/**
|
|
47
|
-
* accumulated top element offsetWidth
|
|
48
|
-
*/
|
|
49
|
-
readonly offsetWidth: number;
|
|
50
|
-
/**
|
|
51
|
-
* accumulated top element offsetHeight
|
|
52
|
-
*/
|
|
53
|
-
readonly offsetHeight: number;
|
|
54
|
-
/**
|
|
55
|
-
* accumulated top element offsetLeft
|
|
56
|
-
*/
|
|
57
|
-
readonly offsetLeft: number;
|
|
58
|
-
/**
|
|
59
|
-
* accumulated top element offsetTop
|
|
60
|
-
*/
|
|
61
|
-
readonly offsetTop: number;
|
|
62
|
-
/**
|
|
63
|
-
* abbreviation for inputValue\.value to make
|
|
64
|
-
* the code terser
|
|
65
|
-
*/
|
|
66
|
-
val: string | boolean;
|
|
67
|
-
/**
|
|
68
|
-
* the underlying form elements as DomQuery object
|
|
69
|
-
*/
|
|
70
|
-
readonly elements: DomQuery;
|
|
71
|
-
/**
|
|
72
|
-
* settable flag for disabled
|
|
73
|
-
*/
|
|
74
|
-
disabled: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* The child nodes of this node collection as readonly attribute
|
|
77
|
-
*/
|
|
78
|
-
readonly childNodes: DomQuery;
|
|
79
|
-
/**
|
|
80
|
-
* an early stream representation for this DomQuery
|
|
81
|
-
*/
|
|
82
|
-
readonly stream: any;
|
|
83
|
-
/**
|
|
84
|
-
* lazy stream representation for this DomQuery
|
|
85
|
-
*/
|
|
86
|
-
readonly lazyStream: any;
|
|
87
|
-
/**
|
|
88
|
-
* transform this node collection to an array
|
|
89
|
-
*/
|
|
90
|
-
readonly asArray: Array<DomQuery>;
|
|
91
|
-
/**
|
|
92
|
-
* inner html property
|
|
93
|
-
* setter and getter which works directly on strings
|
|
94
|
-
*/
|
|
95
|
-
innerHTML: string;
|
|
96
|
-
/**
|
|
97
|
-
* same as innerHTML
|
|
98
|
-
* will be removed once
|
|
99
|
-
* my code is transitioned
|
|
100
|
-
* @deprecated do not use anymore, user innerHTML instead
|
|
101
|
-
*/
|
|
102
|
-
innerHtml: string;
|
|
103
|
-
/**
|
|
104
|
-
* convenience for dq.id.value to make the code a little tighter
|
|
105
|
-
*/
|
|
106
|
-
nodeId: string;
|
|
107
|
-
/**
|
|
108
|
-
* returns true if the elements have the tag *tagName* as tag embedded ( highest level )
|
|
109
|
-
* @param tagName
|
|
110
|
-
*/
|
|
111
|
-
isTag(tagName: string): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* returns the nth element as DomQuery
|
|
114
|
-
* from the internal elements
|
|
115
|
-
* note if you try to reach a non-existing element position
|
|
116
|
-
* you will get back an absent entry
|
|
117
|
-
*
|
|
118
|
-
* @param index the nth index
|
|
119
|
-
*/
|
|
120
|
-
get(index: number): DomQuery;
|
|
121
|
-
/**
|
|
122
|
-
* returns the nth element as optional of an Element object
|
|
123
|
-
* @param index the number from the index
|
|
124
|
-
* @param defaults the default value if the index is overrun default Optional\.absent
|
|
125
|
-
*/
|
|
126
|
-
getAsElem(index: number, defaults: Optional<any>): Optional<Element>;
|
|
127
|
-
/**
|
|
128
|
-
* returns the value array< of all elements
|
|
129
|
-
*/
|
|
130
|
-
allElems(): Array<Element>;
|
|
131
|
-
/**
|
|
132
|
-
* absent no values reached?
|
|
133
|
-
*/
|
|
134
|
-
isAbsent(): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* should make the code clearer
|
|
137
|
-
* note if you pass a function
|
|
138
|
-
* this refers to the active DomQuery object
|
|
139
|
-
*/
|
|
140
|
-
isPresent(presentRunnable?: (elem?: DomQuery) => void): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* should make the code clearer
|
|
143
|
-
* note if you pass a function
|
|
144
|
-
* this refers to the active DomQuery object
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* @param presentRunnable
|
|
148
|
-
*/
|
|
149
|
-
ifPresentLazy(presentRunnable: (elem?: DomQuery) => void): DomQuery;
|
|
150
|
-
/**
|
|
151
|
-
* remove all affected nodes from this query object from the dom tree
|
|
152
|
-
*/
|
|
153
|
-
delete(): void;
|
|
154
|
-
/**
|
|
155
|
-
* query selector all on the existing dom query object
|
|
156
|
-
*
|
|
157
|
-
* @param selector the standard selector
|
|
158
|
-
* @return a DomQuery with the results
|
|
159
|
-
*/
|
|
160
|
-
querySelectorAll(selector: any): DomQuery;
|
|
161
|
-
/**
|
|
162
|
-
* closest, walks up the dom tree to fid the closest element to match
|
|
163
|
-
*
|
|
164
|
-
* @param selector the standard selector
|
|
165
|
-
* @return a DomQuery with the results
|
|
166
|
-
*/
|
|
167
|
-
querySelectorAll(selector: any): DomQuery;
|
|
168
|
-
/**
|
|
169
|
-
* core byId method
|
|
170
|
-
* @param id the id to search for
|
|
171
|
-
* @param includeRoot also match the root element?
|
|
172
|
-
*/
|
|
173
|
-
byId(id: string, includeRoot?: boolean): DomQuery;
|
|
174
|
-
/**
|
|
175
|
-
* same as byId just for the tag name
|
|
176
|
-
* @param tagName
|
|
177
|
-
* @param includeRoot
|
|
178
|
-
*/
|
|
179
|
-
byTagName(tagName: string, includeRoot?: boolean): DomQuery;
|
|
180
|
-
/**
|
|
181
|
-
* attr accessor, usage myQuery.attr("class").value = "bla"
|
|
182
|
-
* or let value myQuery.attr("class").value
|
|
183
|
-
* @param attr the attribute to set
|
|
184
|
-
* @param defaultValue the default value in case nothing is presented (defaults to null)
|
|
185
|
-
*/
|
|
186
|
-
attr(attr: string, defaultValue: string): ElementAttribute;
|
|
187
|
-
/**
|
|
188
|
-
* style accessor
|
|
189
|
-
* @param defaultValue the default value in case nothing is presented (defaults to null)
|
|
190
|
-
* @param cssProperty
|
|
191
|
-
*/
|
|
192
|
-
style(cssProperty: string, defaultValue: string): Style;
|
|
193
|
-
/**
|
|
194
|
-
* Checks for an existing class in the class attributes
|
|
195
|
-
*
|
|
196
|
-
* @param clazz the class to search for
|
|
197
|
-
*/
|
|
198
|
-
hasClass(clazz: string): boolean;
|
|
199
|
-
/**
|
|
200
|
-
* appends a class string if not already in the element(s)
|
|
201
|
-
*
|
|
202
|
-
* @param clazz the style class to append
|
|
203
|
-
*/
|
|
204
|
-
addClass(clazz: string): DomQuery;
|
|
205
|
-
/**
|
|
206
|
-
* remove the style class if in the class definitions
|
|
207
|
-
*
|
|
208
|
-
* @param clazz
|
|
209
|
-
*/
|
|
210
|
-
removeClass(clazz: string): DomQuery;
|
|
211
|
-
/**
|
|
212
|
-
* checks whether we have a multipart element in our children
|
|
213
|
-
*/
|
|
214
|
-
isMultipartCandidate(): boolean;
|
|
215
|
-
/**
|
|
216
|
-
* innerHtml
|
|
217
|
-
* equivalent to jQueries html
|
|
218
|
-
* as setter the html is set and the
|
|
219
|
-
* DomQuery is given back
|
|
220
|
-
* as getter the html string is returned
|
|
221
|
-
*
|
|
222
|
-
* @param newInnerHTML
|
|
223
|
-
*/
|
|
224
|
-
html(newInnerHTML?: string): DomQuery | Optional<string>;
|
|
225
|
-
/**
|
|
226
|
-
* dispatch event on all children
|
|
227
|
-
* just a delegated dispatchEvent from the standard
|
|
228
|
-
* dom working on all queried elements in the monad level
|
|
229
|
-
*
|
|
230
|
-
* @param evt the event to be dispatched
|
|
231
|
-
*/
|
|
232
|
-
dispatchEvent(evt: Event): DomQuery;
|
|
233
|
-
/**
|
|
234
|
-
* easy node traversal, you can pass
|
|
235
|
-
* a set of node selectors which are joined as direct children
|
|
236
|
-
*
|
|
237
|
-
* Note! The root nodes are not in the getIf, those are always the child nodes
|
|
238
|
-
*
|
|
239
|
-
* @param nodeSelector
|
|
240
|
-
*/
|
|
241
|
-
getIf(...nodeSelector: Array<string>): DomQuery;
|
|
242
|
-
/**
|
|
243
|
-
* iterate over each element and perform something on the element
|
|
244
|
-
* (Dom element is passed instead of DomQuery)
|
|
245
|
-
* @param func
|
|
246
|
-
*/
|
|
247
|
-
eachElem(func: (item: Element, cnt?: number) => any): DomQuery;
|
|
248
|
-
/**
|
|
249
|
-
* perform an operation on the first element
|
|
250
|
-
* returns a DomQuery on the first element only
|
|
251
|
-
* @param func
|
|
252
|
-
*/
|
|
253
|
-
firstElem(func: (item: Element, cnt?: number) => any): DomQuery;
|
|
254
|
-
/**
|
|
255
|
-
* perform an operation on the first element
|
|
256
|
-
* returns a DomQuery on the first element only
|
|
257
|
-
* @param func
|
|
258
|
-
*/
|
|
259
|
-
lastElem(func: (item: Element, cnt?: number) => any): DomQuery;
|
|
260
|
-
/**
|
|
261
|
-
* same as eachElem, but a DomQuery object is passed down
|
|
262
|
-
*
|
|
263
|
-
* @param func
|
|
264
|
-
*/
|
|
265
|
-
each(func: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
266
|
-
/**
|
|
267
|
-
* returns a new dom query containing only the first element max
|
|
268
|
-
*
|
|
269
|
-
* @param func a an optional callback function to perform an operation on the first element
|
|
270
|
-
*/
|
|
271
|
-
first(func: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
272
|
-
/**
|
|
273
|
-
* returns a new dom query containing only the first element max
|
|
274
|
-
*
|
|
275
|
-
* @param func a an optional callback function to perform an operation on the first element
|
|
276
|
-
*/
|
|
277
|
-
last(func: (item: DomQuery, cnt?: number) => any): DomQuery;
|
|
278
|
-
/**
|
|
279
|
-
* filter function which filters a subset
|
|
280
|
-
*
|
|
281
|
-
* @param func
|
|
282
|
-
*/
|
|
283
|
-
filter(func: (item: DomQuery) => boolean): DomQuery;
|
|
284
|
-
/**
|
|
285
|
-
* global eval head appendix method
|
|
286
|
-
* no other methods are supported anymore
|
|
287
|
-
* @param code the code to be evaluated
|
|
288
|
-
* @param nonce optional nonce key for higher security
|
|
289
|
-
*/
|
|
290
|
-
globalEval(code: string, nonce?: string): DomQuery;
|
|
291
|
-
/**
|
|
292
|
-
* Runs an eval and keeps the evaluated code in the head
|
|
293
|
-
* This is a corner condition, where we want to update the head with custom
|
|
294
|
-
* code and leave the code in (instead of deleting ig)
|
|
295
|
-
*
|
|
296
|
-
* @param code the code to be evaluated
|
|
297
|
-
* @param nonce optional nonce key for higher security
|
|
298
|
-
*/
|
|
299
|
-
globalEvalSticky(code: string, nonce?: string): DomQuery;
|
|
300
|
-
/**
|
|
301
|
-
* detaches a set of nodes from their parent elements
|
|
302
|
-
* in a browser independent manner
|
|
303
|
-
* @return {DomQuery} DomQuery of nodes with the detached dom nodes
|
|
304
|
-
*/
|
|
305
|
-
detach(): DomQuery;
|
|
306
|
-
/**
|
|
307
|
-
* appends the current set of elements
|
|
308
|
-
* to the element or first element passed via elem
|
|
309
|
-
* @param elem
|
|
310
|
-
*/
|
|
311
|
-
appendTo(elem: DomQuery | string): DomQuery;
|
|
312
|
-
/**
|
|
313
|
-
* appends the passed elements to our existing queries
|
|
314
|
-
* note, double appends can happen if you are not careful
|
|
315
|
-
*
|
|
316
|
-
* @param elem to append
|
|
317
|
-
*/
|
|
318
|
-
append(elem: DomQuery): DomQuery;
|
|
319
|
-
/**
|
|
320
|
-
* replace convenience function replaces the domquery elements with the
|
|
321
|
-
* elements passed as parameter
|
|
322
|
-
* @param toReplace the replacement elements
|
|
323
|
-
* @return a reference on the replacement elements
|
|
324
|
-
*/
|
|
325
|
-
replace(toReplace: DomQuery): DomQuery;
|
|
326
|
-
/**
|
|
327
|
-
* appends the passed elements to our existing queries
|
|
328
|
-
* note, double appends can happen if you are not careful
|
|
329
|
-
*
|
|
330
|
-
* @param elem to append
|
|
331
|
-
*/
|
|
332
|
-
prepend(elem: DomQuery): DomQuery;
|
|
333
|
-
/**
|
|
334
|
-
* prepend equivalent to appendTo
|
|
335
|
-
*
|
|
336
|
-
* @param elem the element to prepend to
|
|
337
|
-
*/
|
|
338
|
-
prependTo(elem: DomQuery): DomQuery;
|
|
339
|
-
/**
|
|
340
|
-
* loads and evaluates a script from a source uri
|
|
341
|
-
*
|
|
342
|
-
* @param src the source to be loaded and evaluated
|
|
343
|
-
* @param delay in milliseconds execution default (0 == no delay)
|
|
344
|
-
* @param charSet
|
|
345
|
-
*/
|
|
346
|
-
loadScriptEval(src: string, delay: number, charSet: string): void;
|
|
347
|
-
/**
|
|
348
|
-
* insert toInsert after the current element
|
|
349
|
-
*
|
|
350
|
-
* @param toInsert an array of DomQuery objects
|
|
351
|
-
*/
|
|
352
|
-
insertAfter(...toInsert: Array<DomQuery>): DomQuery;
|
|
353
|
-
/**
|
|
354
|
-
* inserts the elements before the current element
|
|
355
|
-
*
|
|
356
|
-
* @param toInsert
|
|
357
|
-
*/
|
|
358
|
-
insertBefore(...toInsert: Array<DomQuery>): DomQuery;
|
|
359
|
-
/**
|
|
360
|
-
* in case the DomQuery is pointing to nothing the else value is taken into consideration
|
|
361
|
-
* als alternative
|
|
362
|
-
*
|
|
363
|
-
* @param elseValue the else value
|
|
364
|
-
*/
|
|
365
|
-
orElse(...elseValue: any): DomQuery;
|
|
366
|
-
/**
|
|
367
|
-
* the same with lazy evaluation for cases where getting the else value
|
|
368
|
-
* is a heavy operation
|
|
369
|
-
*
|
|
370
|
-
* @param func the else provider function
|
|
371
|
-
*/
|
|
372
|
-
orElseLazy(func: () => any): DomQuery;
|
|
373
|
-
/**
|
|
374
|
-
* find all parents in the hierarchy for which the selector matches
|
|
375
|
-
* @param selector
|
|
376
|
-
*/
|
|
377
|
-
allParents(selector: string): DomQuery;
|
|
378
|
-
/**
|
|
379
|
-
* first parents with a matching selector
|
|
380
|
-
* @param selector
|
|
381
|
-
*/
|
|
382
|
-
firstParent(selector: string): DomQuery;
|
|
383
|
-
/**
|
|
384
|
-
* all parents until the selector match stops
|
|
385
|
-
* @param selector
|
|
386
|
-
*/
|
|
387
|
-
parentsWhileMatch(selector: string): DomQuery;
|
|
388
|
-
/**
|
|
389
|
-
* the parent of the elements
|
|
390
|
-
*/
|
|
391
|
-
parent(): DomQuery;
|
|
392
|
-
/**
|
|
393
|
-
* copy all attributes of sourceItem to this DomQuery items
|
|
394
|
-
*
|
|
395
|
-
* @param sourceItem the source item to copy over (can be another DomQuery or a parsed XML Query item)
|
|
396
|
-
*/
|
|
397
|
-
copyAttrs(sourceItem: DomQuery | XMLQuery): DomQuery;
|
|
398
|
-
/**
|
|
399
|
-
* outerHTML convenience method
|
|
400
|
-
* browsers only support innerHTML but
|
|
401
|
-
* for instance for your jsf.js we have a full
|
|
402
|
-
* replace pattern which needs outerHTML processing
|
|
403
|
-
*
|
|
404
|
-
* @param markup
|
|
405
|
-
* @param runEmbeddedScripts
|
|
406
|
-
* @param runEmbeddedCss
|
|
407
|
-
*/
|
|
408
|
-
outerHTML(markup: string, runEmbeddedScripts?: boolean, runEmbeddedCss?: boolean): DomQuery;
|
|
409
|
-
/**
|
|
410
|
-
* Run through the given nodes in the DomQuery execute the inline scripts
|
|
411
|
-
* @param sticky if set to true the element must be left in the head after eval default === false
|
|
412
|
-
* @param whiteListed: optional whitelist function which can filter out script tags which are not processed
|
|
413
|
-
* defaults to the standard jsf.js exclusion (we use this code for myfaces)
|
|
414
|
-
*/
|
|
415
|
-
runScripts(sticky?: boolean, whiteListed?: (val: string) => boolean): DomQuery;
|
|
416
|
-
/**
|
|
417
|
-
* runs the embedded css
|
|
418
|
-
*/
|
|
419
|
-
runCss(): DomQuery;
|
|
420
|
-
/**
|
|
421
|
-
* fires a click event on the underlying dom elements
|
|
422
|
-
*/
|
|
423
|
-
click(): DomQuery;
|
|
424
|
-
/**
|
|
425
|
-
* adds an event listener
|
|
426
|
-
*
|
|
427
|
-
* @param type
|
|
428
|
-
* @param listener
|
|
429
|
-
* @param options
|
|
430
|
-
*/
|
|
431
|
-
addEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery;
|
|
432
|
-
/**
|
|
433
|
-
* removes an event listener
|
|
434
|
-
*
|
|
435
|
-
* @param type
|
|
436
|
-
* @param listener
|
|
437
|
-
* @param options
|
|
438
|
-
*/
|
|
439
|
-
removeEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery;
|
|
440
|
-
/**
|
|
441
|
-
* fires an event
|
|
442
|
-
*/
|
|
443
|
-
fireEvent(eventName: string): void;
|
|
444
|
-
textContent(joinString?: string): string;
|
|
445
|
-
innerText(joinString?: string): string;
|
|
446
|
-
/**
|
|
447
|
-
* encodes all input elements properly into respective
|
|
448
|
-
* config entries, this can be used
|
|
449
|
-
* for legacy systems, for newer use-cases, use the
|
|
450
|
-
* HTML5 Form class which all newer browsers provide
|
|
451
|
-
*
|
|
452
|
-
* @param toMerge optional config which can be merged in
|
|
453
|
-
* @return a copy pf
|
|
454
|
-
*/
|
|
455
|
-
encodeFormElement(toMerge: any): {
|
|
456
|
-
[key: string]: any;
|
|
457
|
-
};
|
|
458
|
-
/**
|
|
459
|
-
* fetches the sub-nodes from ... to..
|
|
460
|
-
* @param from
|
|
461
|
-
* @param to
|
|
462
|
-
*/
|
|
463
|
-
subNodes(from: number, to?: number): DomQuery;
|
|
464
|
-
/**
|
|
465
|
-
* attach shadow elements
|
|
466
|
-
* 1:1 mapping from attach shadow
|
|
467
|
-
*
|
|
468
|
-
* @param modeParams
|
|
469
|
-
*/
|
|
470
|
-
attachShadow(modeParams: {
|
|
471
|
-
[key: string]: string;
|
|
472
|
-
}): DomQuery;
|
|
473
|
-
/**
|
|
474
|
-
* wait until a condition on the dom is reached
|
|
475
|
-
*
|
|
476
|
-
* @return a promise on the affected elements where the condition
|
|
477
|
-
* @throws an error in case of a timeout
|
|
478
|
-
*/
|
|
479
|
-
waitUntilDom(condition: (element: DomQuery) => boolean, options: WAIT_OPTS): Promise<DomQuery>;
|
|
480
|
-
}
|
|
@@ -1,97 +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 } from "./Monad";
|
|
18
|
-
/**
|
|
19
|
-
* Lang helpers crossported from the apache myfaces project
|
|
20
|
-
*/
|
|
21
|
-
export declare module Lang {
|
|
22
|
-
/**
|
|
23
|
-
* helper function to safely resolve anything
|
|
24
|
-
* this is not an elvis operator, it resolves
|
|
25
|
-
* a value without exception in a tree and if
|
|
26
|
-
* it is not resolvable then an optional of
|
|
27
|
-
* a default value is restored or Optional.empty
|
|
28
|
-
* if none is given
|
|
29
|
-
*
|
|
30
|
-
* usage
|
|
31
|
-
* <code>
|
|
32
|
-
* let var: Optiona<string> = saveResolve(() => a.b.c.d.e, "foobaz")
|
|
33
|
-
* </code>
|
|
34
|
-
*
|
|
35
|
-
* @param resolverProducer a lambda which can produce the value
|
|
36
|
-
* @param defaultValue an optional default value if the producer failes to produce anything
|
|
37
|
-
* @returns an Optional of the produced value
|
|
38
|
-
*/
|
|
39
|
-
function saveResolve<T>(resolverProducer: () => T, defaultValue?: T): Optional<T>;
|
|
40
|
-
/**
|
|
41
|
-
* lazy resolve... aka the function is called on resolve and a default value also
|
|
42
|
-
* is a producing function (called only if the original producer does not produce any result)
|
|
43
|
-
* @param resolverProducer the producer for the resolve
|
|
44
|
-
* @param defaultValue the default value producer function
|
|
45
|
-
*/
|
|
46
|
-
function saveResolveLazy<T>(resolverProducer: () => T, defaultValue?: () => T): Optional<T>;
|
|
47
|
-
/**
|
|
48
|
-
* String to array function performs a string to array transformation
|
|
49
|
-
* @param {String} it the string which has to be changed into an array
|
|
50
|
-
* @param {RegExp} splitter our splitter reglar expression
|
|
51
|
-
* @return a trimmed array of the splitted string
|
|
52
|
-
*/
|
|
53
|
-
function strToArray(it: string, splitter?: string | RegExp): Array<string>;
|
|
54
|
-
/**
|
|
55
|
-
* hyperfast trim
|
|
56
|
-
* http://blog.stevenlevithan.com/archives/faster-trim-javascript
|
|
57
|
-
* crossported from dojo
|
|
58
|
-
*/
|
|
59
|
-
function trim(str: string): string;
|
|
60
|
-
/**
|
|
61
|
-
* generic object arrays like dom definitions to array conversion method which
|
|
62
|
-
* transforms any object to something array like
|
|
63
|
-
* @param obj
|
|
64
|
-
* @param offset
|
|
65
|
-
* @param pack
|
|
66
|
-
* @returns an array converted from the object
|
|
67
|
-
*/
|
|
68
|
-
function objToArray<T>(obj: any, offset?: number, pack?: Array<T>): Array<T>;
|
|
69
|
-
/**
|
|
70
|
-
* equalsIgnoreCase, case-insensitive comparison of two strings
|
|
71
|
-
*
|
|
72
|
-
* @param source
|
|
73
|
-
* @param destination
|
|
74
|
-
*/
|
|
75
|
-
function equalsIgnoreCase(source?: string, destination?: string): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* runtime type assertion
|
|
78
|
-
*
|
|
79
|
-
* @param probe the probe to be tested for a type
|
|
80
|
-
* @param theType the type to be tested for
|
|
81
|
-
*/
|
|
82
|
-
function assertType(probe: any, theType: any): boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Back ported from Dojo
|
|
85
|
-
* a failsafe string determination method
|
|
86
|
-
* (since in javascript String != "" typeof alone fails!)
|
|
87
|
-
* @param it {|Object|} the object to be checked for being a string
|
|
88
|
-
* @return true in case of being a string false otherwise
|
|
89
|
-
*/
|
|
90
|
-
function isString(it?: any): boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Back-ported, a failsafe determination code for checking whether an object is a function
|
|
93
|
-
* @param it the object to check for being a function
|
|
94
|
-
*/
|
|
95
|
-
function isFunc(it: any): boolean;
|
|
96
|
-
function objAssign(target: any, ...theArgs: any): any;
|
|
97
|
-
}
|