jsf.js_next_gen 4.0.1-beta.5 → 4.0.1-beta.7
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/docs/assets/style.css +4 -5
- package/dist/window/faces-development.js +111 -91
- 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 +111 -91
- 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 +10 -10
- package/src/main/typescript/impl/util/XhrQueueController.ts +3 -17
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +94 -51
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +126 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +60 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/bootstrap-icons.css +15 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/tobago.css +15 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +15 -0
- package/src/main/typescript/test/myfaces/{OnLoadSpec.ts → OnLoad.spec.ts} +2 -2
- package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +136 -0
- package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +9 -12
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +18 -0
- package/target/AssocArray.js +281 -0
- package/target/AssocArray.js.map +1 -0
- package/target/Config.js +235 -0
- package/target/Config.js.map +1 -0
- package/target/CryptoExtensions.js +112 -0
- package/target/CryptoExtensions.js.map +1 -0
- package/target/DomQuery.js +1963 -0
- package/target/DomQuery.js.map +1 -0
- package/target/Es2019Array.js +117 -0
- package/target/Es2019Array.js.map +1 -0
- package/target/Global.js +38 -0
- package/target/Global.js.map +1 -0
- package/target/IDomQuery.js +3 -0
- package/target/IDomQuery.js.map +1 -0
- package/target/Lang.js +183 -0
- package/target/Lang.js.map +1 -0
- package/target/Messaging.js +645 -0
- package/target/Messaging.js.map +1 -0
- package/target/Monad.js +330 -0
- package/target/Monad.js.map +1 -0
- package/target/Promise.js +296 -0
- package/target/Promise.js.map +1 -0
- package/target/PromiseShim.js +30 -0
- package/target/PromiseShim.js.map +1 -0
- package/target/SourcesCollectors.js +444 -0
- package/target/SourcesCollectors.js.map +1 -0
- package/target/Stream.js +562 -0
- package/target/Stream.js.map +1 -0
- package/target/TagBuilder.js +178 -0
- package/target/TagBuilder.js.map +1 -0
- package/target/XmlQuery.js +84 -0
- package/target/XmlQuery.js.map +1 -0
- package/target/impl/util/XhrQueueController.js +3 -18
- package/target/impl/util/XhrQueueController.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +89 -45
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/index.js +80 -0
- package/target/index.js.map +1 -0
- package/target/index_core.js +76 -0
- package/target/index_core.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +124 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +57 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/myfaces/OnLoad.spec.js +57 -0
- package/target/test/myfaces/OnLoad.spec.js.map +1 -0
- package/target/test/myfaces/OnLoadSpec.js +2 -2
- package/target/test/myfaces/OnLoadSpec.js.map +1 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js +156 -0
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -0
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +8 -5
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +13 -0
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/types/main/typescript/AssocArray.d.ts +86 -0
- package/target/types/main/typescript/Config.d.ts +94 -0
- package/target/types/main/typescript/CryptoExtensions.d.ts +87 -0
- package/target/types/main/typescript/DomQuery.d.ts +587 -0
- package/target/types/main/typescript/Es2019Array.d.ts +30 -0
- package/target/types/main/typescript/Global.d.ts +23 -0
- package/target/types/main/typescript/IDomQuery.d.ts +480 -0
- package/target/types/main/typescript/Lang.d.ts +97 -0
- package/target/types/main/typescript/Messaging.d.ts +285 -0
- package/target/types/main/typescript/Monad.d.ts +161 -0
- package/target/types/main/typescript/Promise.d.ts +58 -0
- package/target/types/main/typescript/PromiseShim.d.ts +22 -0
- package/target/types/main/typescript/SourcesCollectors.d.ts +280 -0
- package/target/types/main/typescript/Stream.d.ts +284 -0
- package/target/types/main/typescript/TagBuilder.d.ts +50 -0
- package/target/types/main/typescript/XmlQuery.d.ts +31 -0
- package/target/types/main/typescript/api/_api.d.ts +182 -0
- package/target/types/main/typescript/api/faces.d.ts +17 -0
- package/target/types/main/typescript/api/jsf.d.ts +17 -0
- package/target/types/main/typescript/impl/AjaxImpl.d.ts +164 -0
- package/target/types/main/typescript/impl/PushImpl.d.ts +38 -0
- package/target/types/main/typescript/impl/core/Const.d.ts +138 -0
- package/target/types/main/typescript/impl/core/ImplTypes.d.ts +16 -0
- package/target/types/main/typescript/impl/i18n/Messages.d.ts +102 -0
- package/target/types/main/typescript/impl/util/Assertions.d.ts +46 -0
- package/target/types/main/typescript/impl/util/AsyncRunnable.d.ts +112 -0
- package/target/types/main/typescript/impl/util/ExtDomQuery.d.ts +100 -0
- package/target/types/main/typescript/impl/util/FileUtils.d.ts +25 -0
- package/target/types/main/typescript/impl/util/HiddenInputBuilder.d.ts +37 -0
- package/target/types/main/typescript/impl/util/IListener.d.ts +18 -0
- package/target/types/main/typescript/impl/util/Lang.d.ts +138 -0
- package/target/types/main/typescript/impl/util/XhrQueueController.d.ts +51 -0
- package/target/types/main/typescript/impl/xhrCore/ErrorData.d.ts +37 -0
- package/target/types/main/typescript/impl/xhrCore/EventData.d.ts +25 -0
- package/target/types/main/typescript/impl/xhrCore/IResponseProcessor.d.ts +136 -0
- package/target/types/main/typescript/impl/xhrCore/RequestDataResolver.d.ts +84 -0
- package/target/types/main/typescript/impl/xhrCore/ResonseDataResolver.d.ts +60 -0
- package/target/types/main/typescript/impl/xhrCore/Response.d.ts +29 -0
- package/target/types/main/typescript/impl/xhrCore/ResponseProcessor.d.ts +208 -0
- package/target/types/main/typescript/impl/xhrCore/XhrFormData.d.ts +83 -0
- package/target/types/main/typescript/impl/xhrCore/XhrRequest.d.ts +102 -0
- package/target/types/main/typescript/index.d.ts +34 -0
- package/target/types/main/typescript/index_core.d.ts +29 -0
- package/target/types/main/typescript/myfaces/OamSubmit.d.ts +53 -0
- package/target/types/main/typescript/test/frameworkBase/LangTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.d.ts +39 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.d.ts +16 -0
- 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 +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/StandardInits.d.ts +63 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.d.ts +23 -0
- package/target/types/main/typescript/test/impl/ImplTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/impl/ImplTest_23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/impl/SeparatorCharsTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/myfaces/OamSubmit.spec.d.ts +16 -0
- package/target/types/main/typescript/test/myfaces/OnLoad.spec.d.ts +16 -0
- package/target/types/main/typescript/test/queue/AsynchronousProbe.d.ts +38 -0
- package/target/types/main/typescript/test/queue/AsynchronousQueueTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ClientWindow.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/ErrorChainTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/EventTests.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/FakeWebsocket.d.ts +24 -0
- package/target/types/main/typescript/test/xhrCore/FileUploadTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/NamespacesRequestTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/OamSubmitTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/RequestParamsTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/RequestTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/RequestTest_23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ResponseTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ResponseTest23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ShadowDomTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/WebsocketTest.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/XhrFormDataTest.spec.d.ts +16 -0
- package/target/types/test/typescript/AssocArrayTest.spec.d.ts +1 -0
- package/target/types/test/typescript/DomQueryTest.spec.d.ts +1 -0
- package/target/types/test/typescript/ExtendedArrayTest.spec.d.ts +1 -0
- package/target/types/test/typescript/LangTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MappingProbes.d.ts +24 -0
- package/target/types/test/typescript/MappingTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MessagingTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MonadTest.spec.d.ts +16 -0
- package/target/types/test/typescript/PromiseTest.spec.d.ts +1 -0
- package/target/types/test/typescript/StreamTest.spec.d.ts +1 -0
- package/target/types/test/typescript/XmlQueryTest.spec.d.ts +1 -0
- package/target/types/test/typescript/markups/tobago-with-header.d.ts +1 -0
- package/target/types/test/typescript/markups/tobago-without-header.d.ts +1 -0
- package/webpack.config.js +1 -1
- package/webpack.config.js.map +1 -1
- package/.nyc_output/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
- package/.nyc_output/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
- package/.nyc_output/processinfo/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
- package/.nyc_output/processinfo/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/src/test.html +0 -75
- package/src/tmp/test.html +0 -16
- package/tmp.xml +0 -36
|
@@ -0,0 +1,280 @@
|
|
|
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 { DomQuery } from "./DomQuery";
|
|
18
|
+
import { Config } from "./Config";
|
|
19
|
+
/**
|
|
20
|
+
* special status of the datasource location pointer
|
|
21
|
+
* if an access, outside - of the possible data boundaries is happening
|
|
22
|
+
* (example for instance current without a first next call, or next
|
|
23
|
+
* which goes over the last possible dataset), an iteration status return
|
|
24
|
+
* value is returned marking this boundary instead of a classical element
|
|
25
|
+
*
|
|
26
|
+
* Note this is only internally used but must be implemented to fulfill
|
|
27
|
+
* internal contracts, the end user will never see those values if he uses
|
|
28
|
+
* streams!
|
|
29
|
+
*/
|
|
30
|
+
export declare enum ITERATION_STATUS {
|
|
31
|
+
EO_STRM = "__EO_STRM__",
|
|
32
|
+
BEF_STRM = "___BEF_STRM__"
|
|
33
|
+
}
|
|
34
|
+
export declare function calculateSkips(next_strm: IStreamDataSource<any>): number;
|
|
35
|
+
/**
|
|
36
|
+
* Every data source wich feeds data into the lazy stream
|
|
37
|
+
* or stream generally must implement this interface
|
|
38
|
+
*
|
|
39
|
+
* It is basically an iteratable to the core
|
|
40
|
+
*/
|
|
41
|
+
export interface IStreamDataSource<T> {
|
|
42
|
+
/**
|
|
43
|
+
* @returns true if additional data is present false if not
|
|
44
|
+
*/
|
|
45
|
+
hasNext(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* returns the next element in the stream
|
|
48
|
+
*/
|
|
49
|
+
next(): T | ITERATION_STATUS;
|
|
50
|
+
/**
|
|
51
|
+
* looks ahead cnt without changing the internal data "pointers" of the data source
|
|
52
|
+
* (this is mostly needed by possibly infinite constructs like lazy streams,
|
|
53
|
+
* because they do not know by definition their
|
|
54
|
+
* boundaries)
|
|
55
|
+
*
|
|
56
|
+
* @param cnt the elements to look ahead
|
|
57
|
+
* @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before
|
|
58
|
+
* finding the "cnt" element
|
|
59
|
+
*/
|
|
60
|
+
lookAhead(cnt?: number): T | ITERATION_STATUS;
|
|
61
|
+
/**
|
|
62
|
+
* returns the current element, returns the same element as the previous next call
|
|
63
|
+
* if there is no next before current called then we will call next as initial element
|
|
64
|
+
*/
|
|
65
|
+
current(): T | ITERATION_STATUS;
|
|
66
|
+
/**
|
|
67
|
+
* resets the position to the beginning
|
|
68
|
+
*/
|
|
69
|
+
reset(): void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A collector, needs to be implemented
|
|
73
|
+
*/
|
|
74
|
+
export interface ICollector<T, S> {
|
|
75
|
+
/**
|
|
76
|
+
* this method basically takes a single stream element
|
|
77
|
+
* and does something with it (collecting it one way or the other
|
|
78
|
+
* in most cases)
|
|
79
|
+
*
|
|
80
|
+
* @param element
|
|
81
|
+
*/
|
|
82
|
+
collect(element: T): any;
|
|
83
|
+
/**
|
|
84
|
+
* the final result after all the collecting is done
|
|
85
|
+
*/
|
|
86
|
+
finalValue: S;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A data source which combines multiple streams sequentially into one
|
|
90
|
+
* (this is used internally by flatmap, but also can be used externally)
|
|
91
|
+
*/
|
|
92
|
+
export declare class MultiStreamDatasource<T> implements IStreamDataSource<T> {
|
|
93
|
+
private first;
|
|
94
|
+
private activeStrm;
|
|
95
|
+
private selectedPos;
|
|
96
|
+
private strms;
|
|
97
|
+
constructor(first: any, ...strms: Array<IStreamDataSource<T>>);
|
|
98
|
+
current(): any;
|
|
99
|
+
hasNext(): boolean;
|
|
100
|
+
private findNextStrm;
|
|
101
|
+
lookAhead(cnt?: number): T | ITERATION_STATUS;
|
|
102
|
+
next(): any;
|
|
103
|
+
reset(): void;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* defines a sequence of numbers for our stream input
|
|
107
|
+
*/
|
|
108
|
+
export declare class SequenceDataSource implements IStreamDataSource<number> {
|
|
109
|
+
start: number;
|
|
110
|
+
total: number;
|
|
111
|
+
value: number;
|
|
112
|
+
constructor(start: number, total: number);
|
|
113
|
+
hasNext(): boolean;
|
|
114
|
+
next(): number | ITERATION_STATUS;
|
|
115
|
+
lookAhead(cnt?: number): number | ITERATION_STATUS;
|
|
116
|
+
reset(): void;
|
|
117
|
+
current(): number | ITERATION_STATUS;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* implementation of a datasource on top of a standard array
|
|
121
|
+
*/
|
|
122
|
+
export declare class ArrayStreamDataSource<T> implements IStreamDataSource<T> {
|
|
123
|
+
value: Array<T>;
|
|
124
|
+
dataPos: number;
|
|
125
|
+
constructor(...value: Array<T>);
|
|
126
|
+
lookAhead(cnt?: number): T | ITERATION_STATUS;
|
|
127
|
+
hasNext(): boolean;
|
|
128
|
+
next(): T | ITERATION_STATUS;
|
|
129
|
+
reset(): void;
|
|
130
|
+
current(): T;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* an intermediate data source which prefilters
|
|
134
|
+
* incoming stream data
|
|
135
|
+
* and lets only the data out which
|
|
136
|
+
* passes the filter function check
|
|
137
|
+
*/
|
|
138
|
+
export declare class FilteredStreamDatasource<T> implements IStreamDataSource<T> {
|
|
139
|
+
filterFunc: (T: any) => boolean;
|
|
140
|
+
inputDataSource: IStreamDataSource<T>;
|
|
141
|
+
_current: T | ITERATION_STATUS;
|
|
142
|
+
_filterIdx: {};
|
|
143
|
+
_unfilteredPos: number;
|
|
144
|
+
constructor(filterFunc: (T: any) => boolean, parent: IStreamDataSource<T>);
|
|
145
|
+
/**
|
|
146
|
+
* in order to filter we have to make a look ahead until the
|
|
147
|
+
* first next allowed element
|
|
148
|
+
* hence we prefetch the element and then
|
|
149
|
+
* serve it via next
|
|
150
|
+
*/
|
|
151
|
+
hasNext(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* serve the next element
|
|
154
|
+
*/
|
|
155
|
+
next(): T | ITERATION_STATUS;
|
|
156
|
+
/**
|
|
157
|
+
* looks ahead cnt without changing the internal data "pointers" of the data source
|
|
158
|
+
* (this is mostly needed by LazyStreams, because they do not know by definition their
|
|
159
|
+
* boundaries)
|
|
160
|
+
*
|
|
161
|
+
* @param cnt the elements to look ahead
|
|
162
|
+
* @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before
|
|
163
|
+
* finding the "cnt" element
|
|
164
|
+
*/
|
|
165
|
+
lookAhead(cnt?: number): ITERATION_STATUS | T;
|
|
166
|
+
current(): T | ITERATION_STATUS;
|
|
167
|
+
reset(): void;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* an intermediate datasource which maps the items from
|
|
171
|
+
* one into another
|
|
172
|
+
*/
|
|
173
|
+
export declare class MappedStreamDataSource<T, S> implements IStreamDataSource<S> {
|
|
174
|
+
mapFunc: (T: any) => S;
|
|
175
|
+
inputDataSource: IStreamDataSource<T>;
|
|
176
|
+
constructor(mapFunc: (T: any) => S, parent: IStreamDataSource<T>);
|
|
177
|
+
hasNext(): boolean;
|
|
178
|
+
next(): S;
|
|
179
|
+
reset(): void;
|
|
180
|
+
current(): S;
|
|
181
|
+
lookAhead(cnt?: number): ITERATION_STATUS | S;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* For the time being we only need one collector
|
|
185
|
+
* a collector which collects a stream back into arrays
|
|
186
|
+
*/
|
|
187
|
+
export declare class ShimArrayCollector<S> implements ICollector<S, Array<S>> {
|
|
188
|
+
private data;
|
|
189
|
+
collect(element: S): void;
|
|
190
|
+
get finalValue(): Array<S>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* collects the values as inverse array
|
|
194
|
+
*/
|
|
195
|
+
export declare class InverseArrayCollector<S> implements ICollector<S, Array<S>> {
|
|
196
|
+
private data;
|
|
197
|
+
collect(element: S): void;
|
|
198
|
+
get finalValue(): Array<S>;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* collects an tuple array stream into an assoc array with elements being collected into arrays
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
export declare class ArrayAssocArrayCollector<S> implements ICollector<[string, S] | string, {
|
|
205
|
+
[key: string]: S;
|
|
206
|
+
}> {
|
|
207
|
+
finalValue: {
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
};
|
|
210
|
+
collect(element: [string, S] | string): void;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* dummy collector which just triggers a run
|
|
214
|
+
* on lazy streams without collecting anything
|
|
215
|
+
*/
|
|
216
|
+
export declare class Run<S> implements ICollector<S, any> {
|
|
217
|
+
collect(element: S): void;
|
|
218
|
+
get finalValue(): any;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* collects an assoc stream back to an assoc array
|
|
222
|
+
*/
|
|
223
|
+
export declare class AssocArrayCollector<S> implements ICollector<[string, S] | string, {
|
|
224
|
+
[key: string]: S;
|
|
225
|
+
}> {
|
|
226
|
+
finalValue: {
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
};
|
|
229
|
+
collect(element: [string, S] | string): void;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A Config collector similar to the FormDFata Collector
|
|
233
|
+
*/
|
|
234
|
+
export declare class ConfigCollector implements ICollector<{
|
|
235
|
+
key: string;
|
|
236
|
+
value: any;
|
|
237
|
+
}, Config> {
|
|
238
|
+
finalValue: Config;
|
|
239
|
+
collect(element: {
|
|
240
|
+
key: string;
|
|
241
|
+
value: any;
|
|
242
|
+
}): void;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Form data collector for key value pair streams
|
|
246
|
+
*/
|
|
247
|
+
export declare class FormDataCollector implements ICollector<{
|
|
248
|
+
key: string;
|
|
249
|
+
value: any;
|
|
250
|
+
}, FormData> {
|
|
251
|
+
finalValue: FormData;
|
|
252
|
+
collect(element: {
|
|
253
|
+
key: string;
|
|
254
|
+
value: any;
|
|
255
|
+
}): void;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Form data collector for DomQuery streams
|
|
259
|
+
*/
|
|
260
|
+
export declare class QueryFormDataCollector implements ICollector<DomQuery, FormData> {
|
|
261
|
+
finalValue: FormData;
|
|
262
|
+
collect(element: DomQuery): void;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Encoded String collector from dom query streams
|
|
266
|
+
*/
|
|
267
|
+
export declare class QueryFormStringCollector implements ICollector<DomQuery, string> {
|
|
268
|
+
formData: [[string, string]];
|
|
269
|
+
collect(element: DomQuery): void;
|
|
270
|
+
get finalValue(): string;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* For the time being we only need one collector
|
|
274
|
+
* a collector which collects a stream back into arrays
|
|
275
|
+
*/
|
|
276
|
+
export declare class ArrayCollector<S> implements ICollector<S, Array<S>> {
|
|
277
|
+
private data;
|
|
278
|
+
collect(element: S): void;
|
|
279
|
+
get finalValue(): Array<S>;
|
|
280
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
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 { IMonad, IValueHolder, Optional } from "./Monad";
|
|
18
|
+
import { ICollector, IStreamDataSource, ITERATION_STATUS } from "./SourcesCollectors";
|
|
19
|
+
import { DomQuery } from "./DomQuery";
|
|
20
|
+
import { Config } from "./Config";
|
|
21
|
+
export type StreamMapper<T> = (data: T) => IStreamDataSource<any>;
|
|
22
|
+
export type ArrayMapper<T> = (data: T) => Array<any>;
|
|
23
|
+
export type IteratableConsumer<T> = (data: T, pos?: number) => void | boolean;
|
|
24
|
+
export type Reducable<T, V> = (val1: T | V, val2: T) => V;
|
|
25
|
+
export type Matchable<T> = (data: T) => boolean;
|
|
26
|
+
export type Mappable<T, R> = (data: T) => R;
|
|
27
|
+
export type Comparator<T> = (el1: T, el2: T) => number;
|
|
28
|
+
/**
|
|
29
|
+
* Same for flatmap to deal with element -> stream mappings
|
|
30
|
+
*/
|
|
31
|
+
export declare class FlatMapStreamDataSource<T, S> implements IStreamDataSource<S> {
|
|
32
|
+
mapFunc: StreamMapper<T>;
|
|
33
|
+
inputDataSource: IStreamDataSource<T>;
|
|
34
|
+
/**
|
|
35
|
+
* the currently active stream
|
|
36
|
+
* coming from an incoming element
|
|
37
|
+
* once the end of this one is reached
|
|
38
|
+
* it is swapped out by another one
|
|
39
|
+
* from the next element
|
|
40
|
+
*/
|
|
41
|
+
activeDataSource: IStreamDataSource<S>;
|
|
42
|
+
walkedDataSources: any[];
|
|
43
|
+
_currPos: number;
|
|
44
|
+
constructor(func: StreamMapper<T>, parent: IStreamDataSource<T>);
|
|
45
|
+
hasNext(): boolean;
|
|
46
|
+
private resolveActiveHasNext;
|
|
47
|
+
lookAhead(cnt?: number): ITERATION_STATUS | S;
|
|
48
|
+
private toDatasource;
|
|
49
|
+
private resolveNextHasNext;
|
|
50
|
+
next(): S | ITERATION_STATUS;
|
|
51
|
+
reset(): void;
|
|
52
|
+
current(): S | ITERATION_STATUS;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Generic interface defining a stream
|
|
56
|
+
*/
|
|
57
|
+
export interface IStream<T> {
|
|
58
|
+
/**
|
|
59
|
+
* Perform the operation fn on a single element in the stream at a time
|
|
60
|
+
* then pass the stream over for further processing
|
|
61
|
+
* This is basically an intermediate point in the stream
|
|
62
|
+
* with further processing happening later, do not use
|
|
63
|
+
* this method to gather data or iterate over all date for processing
|
|
64
|
+
* (for the second case each has to be used)
|
|
65
|
+
*
|
|
66
|
+
* @param fn the processing function, if it returns false, further processing is stopped
|
|
67
|
+
*/
|
|
68
|
+
onElem(fn: IteratableConsumer<T>): IStream<T>;
|
|
69
|
+
/**
|
|
70
|
+
* Iterate over all elements in the stream and do some processing via fn
|
|
71
|
+
*
|
|
72
|
+
* @param fn takes a single element and if it returns false
|
|
73
|
+
* then further processing is stopped
|
|
74
|
+
*/
|
|
75
|
+
each(fn: IteratableConsumer<T>): void;
|
|
76
|
+
/**
|
|
77
|
+
* maps a single element into another via fn
|
|
78
|
+
* @param fn function which takes one element in and returns another
|
|
79
|
+
*/
|
|
80
|
+
map<R>(fn?: Mappable<T, R>): IStream<R>;
|
|
81
|
+
/**
|
|
82
|
+
* Takes an element in and returns a set of something
|
|
83
|
+
* the set then is flatted into a single stream to be further processed
|
|
84
|
+
*
|
|
85
|
+
* @param fn
|
|
86
|
+
*/
|
|
87
|
+
flatMap<R>(fn?: StreamMapper<T> | ArrayMapper<T>): IStream<R>;
|
|
88
|
+
/**
|
|
89
|
+
* filtering, takes an element in and is processed by fn.
|
|
90
|
+
* If it returns false then further processing on this element is skipped
|
|
91
|
+
* if it returns true it is passed down the chain.
|
|
92
|
+
*
|
|
93
|
+
* @param fn
|
|
94
|
+
*/
|
|
95
|
+
filter(fn?: Matchable<T>): IStream<T>;
|
|
96
|
+
/**
|
|
97
|
+
* functional reduce... takes two elements in the stream and reduces to
|
|
98
|
+
* one from left to right
|
|
99
|
+
*
|
|
100
|
+
* @param fn the reduction function for instance (val1,val2) => val1l+val2
|
|
101
|
+
* @param startVal an optional starting value, if provided the the processing starts with this element
|
|
102
|
+
* and further goes down into the stream, if not, then the first two elements are taken as reduction starting point
|
|
103
|
+
*/
|
|
104
|
+
reduce<V>(fn: Reducable<T, V>, startVal: T | V): Optional<T | V>;
|
|
105
|
+
/**
|
|
106
|
+
* returns the first element in the stream is given as Optional
|
|
107
|
+
*/
|
|
108
|
+
first(): Optional<T>;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the last stream element (note in endless streams without filtering and limiting you will never reach that
|
|
111
|
+
* point hence producing an endless loop)
|
|
112
|
+
*/
|
|
113
|
+
last(): Optional<T>;
|
|
114
|
+
/**
|
|
115
|
+
* returns true if there is at least one element where a call fn(element) produces true
|
|
116
|
+
*
|
|
117
|
+
* @param fn
|
|
118
|
+
*/
|
|
119
|
+
anyMatch(fn: Matchable<T>): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* returns true if all elmements produce true on a call to fn(element)
|
|
122
|
+
*
|
|
123
|
+
* @param fn
|
|
124
|
+
*/
|
|
125
|
+
allMatch(fn: Matchable<T>): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* returns true if no elmements produce true on a call to fn(element)
|
|
128
|
+
*
|
|
129
|
+
* @param fn
|
|
130
|
+
*/
|
|
131
|
+
noneMatch(fn: Matchable<T>): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Collect the elements with a collector given
|
|
134
|
+
* There are a number of collectors provided
|
|
135
|
+
*
|
|
136
|
+
* @param collector
|
|
137
|
+
*/
|
|
138
|
+
collect(collector: ICollector<T, any>): any;
|
|
139
|
+
/**
|
|
140
|
+
* sort on the stream, this is a special case
|
|
141
|
+
* of an endpoint, so your data which is fed in needs
|
|
142
|
+
* to be limited otherwise it will fail
|
|
143
|
+
* it still returns a stream for further processing
|
|
144
|
+
*
|
|
145
|
+
* @param comparator
|
|
146
|
+
*/
|
|
147
|
+
sort(comparator: Comparator<T>): IStream<T>;
|
|
148
|
+
/**
|
|
149
|
+
* Limits the stream to a certain number of elements
|
|
150
|
+
*
|
|
151
|
+
* @param end the limit of the stream
|
|
152
|
+
*/
|
|
153
|
+
limits(end: number): IStream<T>;
|
|
154
|
+
concat(...toAppend: Array<IStream<T>>): IStream<T>;
|
|
155
|
+
/**
|
|
156
|
+
* returns the stream collected into an array (90% use-case abbreviation
|
|
157
|
+
*/
|
|
158
|
+
value: Array<T>;
|
|
159
|
+
/**
|
|
160
|
+
* returns the currently element selected in the stream
|
|
161
|
+
*/
|
|
162
|
+
current(): T | ITERATION_STATUS;
|
|
163
|
+
/**
|
|
164
|
+
* returns an observable of the given stream
|
|
165
|
+
*/
|
|
166
|
+
[Symbol.iterator](): Iterator<T>;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A simple typescript based reimplementation of streams
|
|
170
|
+
*
|
|
171
|
+
* This is the early eval version
|
|
172
|
+
* for a lazy eval version check, LazyStream, which is api compatible
|
|
173
|
+
* to this implementation, however with the benefit of being able
|
|
174
|
+
* to provide infinite data sources and generic data providers, the downside
|
|
175
|
+
* is, it might be a tad slower in some situations
|
|
176
|
+
*/
|
|
177
|
+
export declare class Stream<T> implements IMonad<T, Stream<any>>, IValueHolder<Array<T>>, IStream<T>, IStreamDataSource<T> {
|
|
178
|
+
value: Array<T>;
|
|
179
|
+
_limits: number;
|
|
180
|
+
private pos;
|
|
181
|
+
constructor(...value: T[]);
|
|
182
|
+
static of<T>(...data: Array<T>): Stream<T>;
|
|
183
|
+
static ofAssoc<T>(data: {
|
|
184
|
+
[key: string]: T;
|
|
185
|
+
}): Stream<[string, T]>;
|
|
186
|
+
static ofDataSource<T>(dataSource: IStreamDataSource<T>): Stream<T>;
|
|
187
|
+
static ofDomQuery(value: DomQuery): Stream<DomQuery>;
|
|
188
|
+
static ofConfig(value: Config): Stream<[string, any]>;
|
|
189
|
+
current(): T | ITERATION_STATUS;
|
|
190
|
+
limits(end: number): Stream<T>;
|
|
191
|
+
/**
|
|
192
|
+
* concat for streams, so that you can concat two streams together
|
|
193
|
+
* @param toAppend
|
|
194
|
+
*/
|
|
195
|
+
concat(...toAppend: Array<IStream<T>>): Stream<T>;
|
|
196
|
+
onElem(fn: (data: T, pos?: number) => void | boolean): Stream<T>;
|
|
197
|
+
each(fn: (data: T, pos?: number) => void | boolean): void;
|
|
198
|
+
map<R>(fn?: (data: T) => R): Stream<R>;
|
|
199
|
+
flatMap<IStreamDataSource>(fn: (data: T) => IStreamDataSource | Array<any>): Stream<any>;
|
|
200
|
+
filter(fn?: (data: T) => boolean): Stream<T>;
|
|
201
|
+
reduce<V>(fn: Reducable<T, V | T>, startVal?: V): Optional<V | T>;
|
|
202
|
+
first(): Optional<T>;
|
|
203
|
+
last(): Optional<T>;
|
|
204
|
+
anyMatch(fn: Matchable<T>): boolean;
|
|
205
|
+
allMatch(fn: Matchable<T>): boolean;
|
|
206
|
+
noneMatch(fn: Matchable<T>): boolean;
|
|
207
|
+
sort(comparator: Comparator<T>): IStream<T>;
|
|
208
|
+
collect(collector: ICollector<T, any>): any;
|
|
209
|
+
hasNext(): boolean;
|
|
210
|
+
next(): T;
|
|
211
|
+
lookAhead(cnt?: number): T | ITERATION_STATUS;
|
|
212
|
+
[Symbol.iterator](): Iterator<T>;
|
|
213
|
+
reset(): void;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Lazy implementation of a Stream
|
|
217
|
+
* The idea is to connect the intermediate
|
|
218
|
+
* streams as datasources like a linked list
|
|
219
|
+
* with reverse referencing and for special
|
|
220
|
+
* operations like filtering flatmapping
|
|
221
|
+
* have intermediate datasources in the list
|
|
222
|
+
* with specialized functions.
|
|
223
|
+
*
|
|
224
|
+
* Sort of a modified pipe valve pattern
|
|
225
|
+
* the streams are the pipes the intermediate
|
|
226
|
+
* data sources are the valves
|
|
227
|
+
*
|
|
228
|
+
* We then can use passed in functions to control
|
|
229
|
+
* the flow in the valves
|
|
230
|
+
*
|
|
231
|
+
* That way we can have a lazy evaluating stream
|
|
232
|
+
*
|
|
233
|
+
* So if an endpoint requests data
|
|
234
|
+
* a callback trace goes back the stream list
|
|
235
|
+
* which triggers an operation upwards
|
|
236
|
+
* which sends data down the drain which then is processed
|
|
237
|
+
* and filtered until one element hits the endpoint.
|
|
238
|
+
*
|
|
239
|
+
* That is repeated, until all elements are processed
|
|
240
|
+
* or an internal limit is hit.
|
|
241
|
+
*
|
|
242
|
+
*/
|
|
243
|
+
export declare class LazyStream<T> implements IStreamDataSource<T>, IStream<T>, IMonad<T, LazyStream<any>> {
|
|
244
|
+
protected dataSource: IStreamDataSource<T>;
|
|
245
|
+
_limits: number;
|
|
246
|
+
pos: number;
|
|
247
|
+
static of<T>(...values: Array<T>): LazyStream<T>;
|
|
248
|
+
static ofAssoc<T>(data: {
|
|
249
|
+
[key: string]: T;
|
|
250
|
+
}): LazyStream<[string, T]>;
|
|
251
|
+
static ofStreamDataSource<T>(value: IStreamDataSource<T>): LazyStream<T>;
|
|
252
|
+
static ofDomQuery(value: DomQuery): LazyStream<DomQuery>;
|
|
253
|
+
static ofConfig(value: Config): LazyStream<[string, any]>;
|
|
254
|
+
constructor(parent: IStreamDataSource<T>);
|
|
255
|
+
hasNext(): boolean;
|
|
256
|
+
next(): T | ITERATION_STATUS;
|
|
257
|
+
lookAhead(cnt?: number): ITERATION_STATUS | T;
|
|
258
|
+
current(): T | ITERATION_STATUS;
|
|
259
|
+
reset(): void;
|
|
260
|
+
/**
|
|
261
|
+
* concat for streams, so that you can concat two streams together
|
|
262
|
+
* @param toAppend
|
|
263
|
+
*/
|
|
264
|
+
concat(...toAppend: Array<IStream<T>>): LazyStream<T>;
|
|
265
|
+
nextFilter(fn: Matchable<T>): T;
|
|
266
|
+
limits(max: number): LazyStream<T>;
|
|
267
|
+
collect(collector: ICollector<T, any>): any;
|
|
268
|
+
onElem(fn: IteratableConsumer<T>): LazyStream<T>;
|
|
269
|
+
filter(fn: Matchable<T>): LazyStream<T>;
|
|
270
|
+
map<R>(fn: Mappable<T, R>): LazyStream<any>;
|
|
271
|
+
flatMap<StreamMapper>(fn: StreamMapper | ArrayMapper<any>): LazyStream<any>;
|
|
272
|
+
each(fn: IteratableConsumer<T>): void;
|
|
273
|
+
reduce<V>(fn: Reducable<T, V>, startVal?: T | V): Optional<T | V>;
|
|
274
|
+
last(): Optional<T>;
|
|
275
|
+
first(): Optional<T>;
|
|
276
|
+
anyMatch(fn: Matchable<T>): boolean;
|
|
277
|
+
allMatch(fn: Matchable<T>): boolean;
|
|
278
|
+
noneMatch(fn: Matchable<T>): boolean;
|
|
279
|
+
sort(comparator: Comparator<T>): IStream<T>;
|
|
280
|
+
get value(): Array<T>;
|
|
281
|
+
[Symbol.iterator](): Iterator<T>;
|
|
282
|
+
private stop;
|
|
283
|
+
private isOverLimits;
|
|
284
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* beginning custom tag support
|
|
19
|
+
*
|
|
20
|
+
* This api is still experimental
|
|
21
|
+
* and might be interwoven with DomQuery
|
|
22
|
+
* so it is bound to change
|
|
23
|
+
*
|
|
24
|
+
* it follows a builder pattern to allow easier creations
|
|
25
|
+
* with less code of custom tags
|
|
26
|
+
*/
|
|
27
|
+
export declare class TagBuilder {
|
|
28
|
+
tagName: string;
|
|
29
|
+
connectedCallback?: Function;
|
|
30
|
+
clazz?: CustomElementConstructor;
|
|
31
|
+
extendsType: CustomElementConstructor;
|
|
32
|
+
theOptions: ElementDefinitionOptions | null;
|
|
33
|
+
markup: string;
|
|
34
|
+
disconnectedCallback?: Function;
|
|
35
|
+
adoptedCallback?: Function;
|
|
36
|
+
attributeChangedCallback?: Function;
|
|
37
|
+
observedAttrs: string[];
|
|
38
|
+
static withTagName(tagName: any): TagBuilder;
|
|
39
|
+
constructor(tagName: string);
|
|
40
|
+
withObservedAttributes(...oAttrs: any[]): void;
|
|
41
|
+
withConnectedCallback(callback: Function): this;
|
|
42
|
+
withDisconnectedCallback(callback: Function): this;
|
|
43
|
+
withAdoptedCallback(callback: Function): this;
|
|
44
|
+
withAttributeChangedCallback(callback: Function): this;
|
|
45
|
+
withExtendsType(extendsType: CustomElementConstructor): this;
|
|
46
|
+
withOptions(theOptions: any): this;
|
|
47
|
+
withClass(clazz: any): this;
|
|
48
|
+
withMarkup(markup: any): this;
|
|
49
|
+
register(): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { DomQuery } from "./DomQuery";
|
|
18
|
+
/**
|
|
19
|
+
* xml query as specialized case for DomQuery
|
|
20
|
+
*/
|
|
21
|
+
export declare class XMLQuery extends DomQuery {
|
|
22
|
+
constructor(rootNode: Document | string | DomQuery, docType?: string);
|
|
23
|
+
isXMLParserError(): boolean;
|
|
24
|
+
toString(): string;
|
|
25
|
+
parserErrorText(joinstr: string): string;
|
|
26
|
+
static parseXML(txt: string): XMLQuery;
|
|
27
|
+
static parseHTML(txt: string): XMLQuery;
|
|
28
|
+
static fromString(txt: string, parseType?: string): XMLQuery;
|
|
29
|
+
}
|
|
30
|
+
export declare const XQ: typeof XMLQuery;
|
|
31
|
+
export type XQ = XMLQuery;
|