surveysparrow-ionic-plugin 0.0.4 → 0.0.6
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/README.md +0 -809
- package/android/src/main/java/com/surveysparrow/plugins/ionic/SurveySparrowIonicPlugin.java +2 -7
- package/android/src/main/java/com/surveysparrow/plugins/ionic/SurveySparrowIonicPluginPlugin.java +17 -17
- package/ios/Sources/SurveySparrowIonicPluginPlugin/SurveySparrowIonicPluginPlugin.swift +6 -6
- package/ios/Tests/SurveySparrowIonicPluginPluginTests/SurveySparrowIonicPluginPluginTests.swift +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,812 +47,3 @@ loadFullScreenSurveyWithValidation(options: { domain: String; token: String; par
|
|
|
47
47
|
| **`options`** | <code>{ domain: <a href="#string">String</a>; token: <a href="#string">String</a>; params: <a href="#object">Object</a>; properties: <a href="#object">Object</a>; }</code> |
|
|
48
48
|
|
|
49
49
|
--------------------
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Interfaces
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
#### String
|
|
56
|
-
|
|
57
|
-
Allows manipulation and formatting of text strings and determination and location of substrings within strings.
|
|
58
|
-
|
|
59
|
-
| Prop | Type | Description |
|
|
60
|
-
| ------------ | ------------------- | ------------------------------------------------------------ |
|
|
61
|
-
| **`length`** | <code>number</code> | Returns the length of a <a href="#string">String</a> object. |
|
|
62
|
-
|
|
63
|
-
| Method | Signature | Description |
|
|
64
|
-
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
-
| **toString** | () => string | Returns a string representation of a string. |
|
|
66
|
-
| **charAt** | (pos: number) => string | Returns the character at the specified index. |
|
|
67
|
-
| **charCodeAt** | (index: number) => number | Returns the Unicode value of the character at the specified location. |
|
|
68
|
-
| **concat** | (...strings: string[]) => string | Returns a string that contains the concatenation of two or more strings. |
|
|
69
|
-
| **indexOf** | (searchString: string, position?: number \| undefined) => number | Returns the position of the first occurrence of a substring. |
|
|
70
|
-
| **lastIndexOf** | (searchString: string, position?: number \| undefined) => number | Returns the last occurrence of a substring in the string. |
|
|
71
|
-
| **localeCompare** | (that: string) => number | Determines whether two strings are equivalent in the current locale. |
|
|
72
|
-
| **match** | (regexp: string \| <a href="#regexp">RegExp</a>) => <a href="#regexpmatcharray">RegExpMatchArray</a> \| null | Matches a string with a regular expression, and returns an array containing the results of that search. |
|
|
73
|
-
| **replace** | (searchValue: string \| <a href="#regexp">RegExp</a>, replaceValue: string) => string | Replaces text in a string, using a regular expression or search string. |
|
|
74
|
-
| **replace** | (searchValue: string \| <a href="#regexp">RegExp</a>, replacer: (substring: string, ...args: any[]) => string) => string | Replaces text in a string, using a regular expression or search string. |
|
|
75
|
-
| **search** | (regexp: string \| <a href="#regexp">RegExp</a>) => number | Finds the first substring match in a regular expression search. |
|
|
76
|
-
| **slice** | (start?: number \| undefined, end?: number \| undefined) => string | Returns a section of a string. |
|
|
77
|
-
| **split** | (separator: string \| <a href="#regexp">RegExp</a>, limit?: number \| undefined) => string[] | Split a string into substrings using the specified separator and return them as an array. |
|
|
78
|
-
| **substring** | (start: number, end?: number \| undefined) => string | Returns the substring at the specified location within a <a href="#string">String</a> object. |
|
|
79
|
-
| **toLowerCase** | () => string | Converts all the alphabetic characters in a string to lowercase. |
|
|
80
|
-
| **toLocaleLowerCase** | (locales?: string \| string[] \| undefined) => string | Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. |
|
|
81
|
-
| **toUpperCase** | () => string | Converts all the alphabetic characters in a string to uppercase. |
|
|
82
|
-
| **toLocaleUpperCase** | (locales?: string \| string[] \| undefined) => string | Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. |
|
|
83
|
-
| **trim** | () => string | Removes the leading and trailing white space and line terminator characters from a string. |
|
|
84
|
-
| **substr** | (from: number, length?: number \| undefined) => string | Gets a substring beginning at the specified location and having the specified length. |
|
|
85
|
-
| **valueOf** | () => string | Returns the primitive value of the specified object. |
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#### RegExpMatchArray
|
|
89
|
-
|
|
90
|
-
| Prop | Type |
|
|
91
|
-
| ----------- | ------------------- |
|
|
92
|
-
| **`index`** | <code>number</code> |
|
|
93
|
-
| **`input`** | <code>string</code> |
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#### RegExp
|
|
97
|
-
|
|
98
|
-
| Prop | Type | Description |
|
|
99
|
-
| ---------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
100
|
-
| **`source`** | <code>string</code> | Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. |
|
|
101
|
-
| **`global`** | <code>boolean</code> | Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. |
|
|
102
|
-
| **`ignoreCase`** | <code>boolean</code> | Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. |
|
|
103
|
-
| **`multiline`** | <code>boolean</code> | Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. |
|
|
104
|
-
| **`lastIndex`** | <code>number</code> | |
|
|
105
|
-
|
|
106
|
-
| Method | Signature | Description |
|
|
107
|
-
| ----------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
-
| **exec** | (string: string) => <a href="#regexpexecarray">RegExpExecArray</a> \| null | Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. |
|
|
109
|
-
| **test** | (string: string) => boolean | Returns a Boolean value that indicates whether or not a pattern exists in a searched string. |
|
|
110
|
-
| **compile** | () => this | |
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
#### RegExpExecArray
|
|
114
|
-
|
|
115
|
-
| Prop | Type |
|
|
116
|
-
| ----------- | ------------------- |
|
|
117
|
-
| **`index`** | <code>number</code> |
|
|
118
|
-
| **`input`** | <code>string</code> |
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
#### Object
|
|
122
|
-
|
|
123
|
-
Provides functionality common to all JavaScript objects.
|
|
124
|
-
|
|
125
|
-
| Prop | Type | Description |
|
|
126
|
-
| ----------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
127
|
-
| **`constructor`** | <code><a href="#function">Function</a></code> | The initial value of <a href="#object">Object</a>.prototype.constructor is the standard built-in <a href="#object">Object</a> constructor. |
|
|
128
|
-
|
|
129
|
-
| Method | Signature | Description |
|
|
130
|
-
| ------------------------ | --------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
131
|
-
| **toString** | () => string | Returns a string representation of an object. |
|
|
132
|
-
| **toLocaleString** | () => string | Returns a date converted to a string using the current locale. |
|
|
133
|
-
| **valueOf** | () => <a href="#object">Object</a> | Returns the primitive value of the specified object. |
|
|
134
|
-
| **hasOwnProperty** | (v: <a href="#propertykey">PropertyKey</a>) => boolean | Determines whether an object has a property with the specified name. |
|
|
135
|
-
| **isPrototypeOf** | (v: <a href="#object">Object</a>) => boolean | Determines whether an object exists in another object's prototype chain. |
|
|
136
|
-
| **propertyIsEnumerable** | (v: <a href="#propertykey">PropertyKey</a>) => boolean | Determines whether a specified property is enumerable. |
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
#### Function
|
|
140
|
-
|
|
141
|
-
Creates a new function.
|
|
142
|
-
|
|
143
|
-
| Prop | Type |
|
|
144
|
-
| --------------- | --------------------------------------------- |
|
|
145
|
-
| **`prototype`** | <code>any</code> |
|
|
146
|
-
| **`length`** | <code>number</code> |
|
|
147
|
-
| **`arguments`** | <code>any</code> |
|
|
148
|
-
| **`caller`** | <code><a href="#function">Function</a></code> |
|
|
149
|
-
|
|
150
|
-
| Method | Signature | Description |
|
|
151
|
-
| ------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
-
| **apply** | (this: <a href="#function">Function</a>, thisArg: any, argArray?: any) => any | Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. |
|
|
153
|
-
| **call** | (this: <a href="#function">Function</a>, thisArg: any, ...argArray: any[]) => any | Calls a method of an object, substituting another object for the current object. |
|
|
154
|
-
| **bind** | (this: <a href="#function">Function</a>, thisArg: any, ...argArray: any[]) => any | For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters. |
|
|
155
|
-
| **toString** | () => string | Returns a string representation of a function. |
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
#### FunctionDeclaration
|
|
159
|
-
|
|
160
|
-
| Prop | Type | Description |
|
|
161
|
-
| -------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
162
|
-
| **`id`** | <code><a href="#identifier">Identifier</a></code> | It is null when a function declaration is a part of the `export default function` statement |
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
#### Identifier
|
|
166
|
-
|
|
167
|
-
| Prop | Type |
|
|
168
|
-
| ---------- | --------------------------------------------------- |
|
|
169
|
-
| **`type`** | <code>'<a href="#identifier">Identifier</a>'</code> |
|
|
170
|
-
| **`name`** | <code>string</code> |
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
#### FunctionExpression
|
|
174
|
-
|
|
175
|
-
| Prop | Type |
|
|
176
|
-
| ---------- | ------------------------------------------------------------------- |
|
|
177
|
-
| **`id`** | <code><a href="#identifier">Identifier</a> \| null</code> |
|
|
178
|
-
| **`type`** | <code>'<a href="#functionexpression">FunctionExpression</a>'</code> |
|
|
179
|
-
| **`body`** | <code><a href="#blockstatement">BlockStatement</a></code> |
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
#### BlockStatement
|
|
183
|
-
|
|
184
|
-
| Prop | Type |
|
|
185
|
-
| ------------------- | ----------------------------------------------------------- |
|
|
186
|
-
| **`type`** | <code>'<a href="#blockstatement">BlockStatement</a>'</code> |
|
|
187
|
-
| **`body`** | <code>Statement[]</code> |
|
|
188
|
-
| **`innerComments`** | <code>Comment[]</code> |
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#### ExpressionStatement
|
|
192
|
-
|
|
193
|
-
| Prop | Type |
|
|
194
|
-
| ---------------- | --------------------------------------------------------------------- |
|
|
195
|
-
| **`type`** | <code>'<a href="#expressionstatement">ExpressionStatement</a>'</code> |
|
|
196
|
-
| **`expression`** | <code><a href="#expression">Expression</a></code> |
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
#### ExpressionMap
|
|
200
|
-
|
|
201
|
-
| Prop | Type |
|
|
202
|
-
| ------------------------------ | ----------------------------------------------------------------------------- |
|
|
203
|
-
| **`ArrayExpression`** | <code><a href="#arrayexpression">ArrayExpression</a></code> |
|
|
204
|
-
| **`ArrowFunctionExpression`** | <code><a href="#arrowfunctionexpression">ArrowFunctionExpression</a></code> |
|
|
205
|
-
| **`AssignmentExpression`** | <code><a href="#assignmentexpression">AssignmentExpression</a></code> |
|
|
206
|
-
| **`AwaitExpression`** | <code><a href="#awaitexpression">AwaitExpression</a></code> |
|
|
207
|
-
| **`BinaryExpression`** | <code><a href="#binaryexpression">BinaryExpression</a></code> |
|
|
208
|
-
| **`CallExpression`** | <code><a href="#callexpression">CallExpression</a></code> |
|
|
209
|
-
| **`ChainExpression`** | <code><a href="#chainexpression">ChainExpression</a></code> |
|
|
210
|
-
| **`ClassExpression`** | <code><a href="#classexpression">ClassExpression</a></code> |
|
|
211
|
-
| **`ConditionalExpression`** | <code><a href="#conditionalexpression">ConditionalExpression</a></code> |
|
|
212
|
-
| **`FunctionExpression`** | <code><a href="#functionexpression">FunctionExpression</a></code> |
|
|
213
|
-
| **`Identifier`** | <code><a href="#identifier">Identifier</a></code> |
|
|
214
|
-
| **`ImportExpression`** | <code><a href="#importexpression">ImportExpression</a></code> |
|
|
215
|
-
| **`Literal`** | <code><a href="#literal">Literal</a></code> |
|
|
216
|
-
| **`LogicalExpression`** | <code><a href="#logicalexpression">LogicalExpression</a></code> |
|
|
217
|
-
| **`MemberExpression`** | <code><a href="#memberexpression">MemberExpression</a></code> |
|
|
218
|
-
| **`MetaProperty`** | <code><a href="#metaproperty">MetaProperty</a></code> |
|
|
219
|
-
| **`NewExpression`** | <code><a href="#newexpression">NewExpression</a></code> |
|
|
220
|
-
| **`ObjectExpression`** | <code><a href="#objectexpression">ObjectExpression</a></code> |
|
|
221
|
-
| **`SequenceExpression`** | <code><a href="#sequenceexpression">SequenceExpression</a></code> |
|
|
222
|
-
| **`TaggedTemplateExpression`** | <code><a href="#taggedtemplateexpression">TaggedTemplateExpression</a></code> |
|
|
223
|
-
| **`TemplateLiteral`** | <code><a href="#templateliteral">TemplateLiteral</a></code> |
|
|
224
|
-
| **`ThisExpression`** | <code><a href="#thisexpression">ThisExpression</a></code> |
|
|
225
|
-
| **`UnaryExpression`** | <code><a href="#unaryexpression">UnaryExpression</a></code> |
|
|
226
|
-
| **`UpdateExpression`** | <code><a href="#updateexpression">UpdateExpression</a></code> |
|
|
227
|
-
| **`YieldExpression`** | <code><a href="#yieldexpression">YieldExpression</a></code> |
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
#### ArrayExpression
|
|
231
|
-
|
|
232
|
-
| Prop | Type |
|
|
233
|
-
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
234
|
-
| **`type`** | <code>'<a href="#arrayexpression">ArrayExpression</a>'</code> |
|
|
235
|
-
| **`elements`** | <code><a href="#array">Array</a><<a href="#expression">Expression</a> \| <a href="#spreadelement">SpreadElement</a> \| null></code> |
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
#### Array
|
|
239
|
-
|
|
240
|
-
| Prop | Type | Description |
|
|
241
|
-
| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
242
|
-
| **`length`** | <code>number</code> | Gets or sets the length of the array. This is a number one higher than the highest index in the array. |
|
|
243
|
-
|
|
244
|
-
| Method | Signature | Description |
|
|
245
|
-
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
246
|
-
| **toString** | () => string | Returns a string representation of an array. |
|
|
247
|
-
| **toLocaleString** | () => string | Returns a string representation of an array. The elements are converted to string using their toLocalString methods. |
|
|
248
|
-
| **pop** | () => T \| undefined | Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
|
|
249
|
-
| **push** | (...items: T[]) => number | Appends new elements to the end of an array, and returns the new length of the array. |
|
|
250
|
-
| **concat** | (...items: <a href="#concatarray">ConcatArray</a><T>[]) => T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
|
|
251
|
-
| **concat** | (...items: (T \| <a href="#concatarray">ConcatArray</a><T>)[]) => T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
|
|
252
|
-
| **join** | (separator?: string \| undefined) => string | Adds all the elements of an array into a string, separated by the specified separator string. |
|
|
253
|
-
| **reverse** | () => T[] | Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array. |
|
|
254
|
-
| **shift** | () => T \| undefined | Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
|
|
255
|
-
| **slice** | (start?: number \| undefined, end?: number \| undefined) => T[] | Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array. |
|
|
256
|
-
| **sort** | (compareFn?: ((a: T, b: T) => number) \| undefined) => this | Sorts an array in place. This method mutates the array and returns a reference to the same array. |
|
|
257
|
-
| **splice** | (start: number, deleteCount?: number \| undefined) => T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
|
|
258
|
-
| **splice** | (start: number, deleteCount: number, ...items: T[]) => T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
|
|
259
|
-
| **unshift** | (...items: T[]) => number | Inserts new elements at the start of an array, and returns the new length of the array. |
|
|
260
|
-
| **indexOf** | (searchElement: T, fromIndex?: number \| undefined) => number | Returns the index of the first occurrence of a value in an array, or -1 if it is not present. |
|
|
261
|
-
| **lastIndexOf** | (searchElement: T, fromIndex?: number \| undefined) => number | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. |
|
|
262
|
-
| **every** | <S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => this is S[] | Determines whether all the members of an array satisfy the specified test. |
|
|
263
|
-
| **every** | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean | Determines whether all the members of an array satisfy the specified test. |
|
|
264
|
-
| **some** | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean | Determines whether the specified callback function returns true for any element of an array. |
|
|
265
|
-
| **forEach** | (callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any) => void | Performs the specified action for each element in an array. |
|
|
266
|
-
| **map** | <U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] | Calls a defined callback function on each element of an array, and returns an array that contains the results. |
|
|
267
|
-
| **filter** | <S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => S[] | Returns the elements of an array that meet the condition specified in a callback function. |
|
|
268
|
-
| **filter** | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => T[] | Returns the elements of an array that meet the condition specified in a callback function. |
|
|
269
|
-
| **reduce** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
270
|
-
| **reduce** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T | |
|
|
271
|
-
| **reduce** | <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
272
|
-
| **reduceRight** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
273
|
-
| **reduceRight** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T | |
|
|
274
|
-
| **reduceRight** | <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
#### ConcatArray
|
|
278
|
-
|
|
279
|
-
| Prop | Type |
|
|
280
|
-
| ------------ | ------------------- |
|
|
281
|
-
| **`length`** | <code>number</code> |
|
|
282
|
-
|
|
283
|
-
| Method | Signature |
|
|
284
|
-
| --------- | ------------------------------------------------------------------ |
|
|
285
|
-
| **join** | (separator?: string \| undefined) => string |
|
|
286
|
-
| **slice** | (start?: number \| undefined, end?: number \| undefined) => T[] |
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
#### SpreadElement
|
|
290
|
-
|
|
291
|
-
| Prop | Type |
|
|
292
|
-
| -------------- | --------------------------------------------------------- |
|
|
293
|
-
| **`type`** | <code>'<a href="#spreadelement">SpreadElement</a>'</code> |
|
|
294
|
-
| **`argument`** | <code><a href="#expression">Expression</a></code> |
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
#### ArrowFunctionExpression
|
|
298
|
-
|
|
299
|
-
| Prop | Type |
|
|
300
|
-
| ---------------- | ------------------------------------------------------------------------------------------------- |
|
|
301
|
-
| **`type`** | <code>'<a href="#arrowfunctionexpression">ArrowFunctionExpression</a>'</code> |
|
|
302
|
-
| **`expression`** | <code>boolean</code> |
|
|
303
|
-
| **`body`** | <code><a href="#expression">Expression</a> \| <a href="#blockstatement">BlockStatement</a></code> |
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
#### AssignmentExpression
|
|
307
|
-
|
|
308
|
-
| Prop | Type |
|
|
309
|
-
| -------------- | ----------------------------------------------------------------------- |
|
|
310
|
-
| **`type`** | <code>'<a href="#assignmentexpression">AssignmentExpression</a>'</code> |
|
|
311
|
-
| **`operator`** | <code><a href="#assignmentoperator">AssignmentOperator</a></code> |
|
|
312
|
-
| **`left`** | <code><a href="#pattern">Pattern</a></code> |
|
|
313
|
-
| **`right`** | <code><a href="#expression">Expression</a></code> |
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
#### ObjectPattern
|
|
317
|
-
|
|
318
|
-
| Prop | Type |
|
|
319
|
-
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
320
|
-
| **`type`** | <code>'<a href="#objectpattern">ObjectPattern</a>'</code> |
|
|
321
|
-
| **`properties`** | <code><a href="#array">Array</a><<a href="#assignmentproperty">AssignmentProperty</a> \| <a href="#restelement">RestElement</a>></code> |
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
#### AssignmentProperty
|
|
325
|
-
|
|
326
|
-
| Prop | Type |
|
|
327
|
-
| ------------ | ------------------------------------------- |
|
|
328
|
-
| **`value`** | <code><a href="#pattern">Pattern</a></code> |
|
|
329
|
-
| **`kind`** | <code>'init'</code> |
|
|
330
|
-
| **`method`** | <code>boolean</code> |
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
#### RestElement
|
|
334
|
-
|
|
335
|
-
| Prop | Type |
|
|
336
|
-
| -------------- | ----------------------------------------------------- |
|
|
337
|
-
| **`type`** | <code>'<a href="#restelement">RestElement</a>'</code> |
|
|
338
|
-
| **`argument`** | <code><a href="#pattern">Pattern</a></code> |
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
#### ArrayPattern
|
|
342
|
-
|
|
343
|
-
| Prop | Type |
|
|
344
|
-
| -------------- | ------------------------------------------------------------------------------------- |
|
|
345
|
-
| **`type`** | <code>'<a href="#arraypattern">ArrayPattern</a>'</code> |
|
|
346
|
-
| **`elements`** | <code><a href="#array">Array</a><<a href="#pattern">Pattern</a> \| null></code> |
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
#### AssignmentPattern
|
|
350
|
-
|
|
351
|
-
| Prop | Type |
|
|
352
|
-
| ----------- | ----------------------------------------------------------------- |
|
|
353
|
-
| **`type`** | <code>'<a href="#assignmentpattern">AssignmentPattern</a>'</code> |
|
|
354
|
-
| **`left`** | <code><a href="#pattern">Pattern</a></code> |
|
|
355
|
-
| **`right`** | <code><a href="#expression">Expression</a></code> |
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
#### MemberExpression
|
|
359
|
-
|
|
360
|
-
| Prop | Type |
|
|
361
|
-
| -------------- | ------------------------------------------------------------------------------------------------------- |
|
|
362
|
-
| **`type`** | <code>'<a href="#memberexpression">MemberExpression</a>'</code> |
|
|
363
|
-
| **`object`** | <code><a href="#expression">Expression</a> \| <a href="#super">Super</a></code> |
|
|
364
|
-
| **`property`** | <code><a href="#expression">Expression</a> \| <a href="#privateidentifier">PrivateIdentifier</a></code> |
|
|
365
|
-
| **`computed`** | <code>boolean</code> |
|
|
366
|
-
| **`optional`** | <code>boolean</code> |
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
#### Super
|
|
370
|
-
|
|
371
|
-
| Prop | Type |
|
|
372
|
-
| ---------- | ----------------------------------------- |
|
|
373
|
-
| **`type`** | <code>'<a href="#super">Super</a>'</code> |
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
#### PrivateIdentifier
|
|
377
|
-
|
|
378
|
-
| Prop | Type |
|
|
379
|
-
| ---------- | ----------------------------------------------------------------- |
|
|
380
|
-
| **`type`** | <code>'<a href="#privateidentifier">PrivateIdentifier</a>'</code> |
|
|
381
|
-
| **`name`** | <code>string</code> |
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
#### AwaitExpression
|
|
385
|
-
|
|
386
|
-
| Prop | Type |
|
|
387
|
-
| -------------- | ------------------------------------------------------------- |
|
|
388
|
-
| **`type`** | <code>'<a href="#awaitexpression">AwaitExpression</a>'</code> |
|
|
389
|
-
| **`argument`** | <code><a href="#expression">Expression</a></code> |
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
#### BinaryExpression
|
|
393
|
-
|
|
394
|
-
| Prop | Type |
|
|
395
|
-
| -------------- | ------------------------------------------------------------------------------------------------------- |
|
|
396
|
-
| **`type`** | <code>'<a href="#binaryexpression">BinaryExpression</a>'</code> |
|
|
397
|
-
| **`operator`** | <code><a href="#binaryoperator">BinaryOperator</a></code> |
|
|
398
|
-
| **`left`** | <code><a href="#expression">Expression</a> \| <a href="#privateidentifier">PrivateIdentifier</a></code> |
|
|
399
|
-
| **`right`** | <code><a href="#expression">Expression</a></code> |
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
#### SimpleCallExpression
|
|
403
|
-
|
|
404
|
-
| Prop | Type |
|
|
405
|
-
| -------------- | ----------------------------------------------------------- |
|
|
406
|
-
| **`type`** | <code>'<a href="#callexpression">CallExpression</a>'</code> |
|
|
407
|
-
| **`optional`** | <code>boolean</code> |
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
#### NewExpression
|
|
411
|
-
|
|
412
|
-
| Prop | Type |
|
|
413
|
-
| ---------- | --------------------------------------------------------- |
|
|
414
|
-
| **`type`** | <code>'<a href="#newexpression">NewExpression</a>'</code> |
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
#### ChainExpression
|
|
418
|
-
|
|
419
|
-
| Prop | Type |
|
|
420
|
-
| ---------------- | ------------------------------------------------------------- |
|
|
421
|
-
| **`type`** | <code>'<a href="#chainexpression">ChainExpression</a>'</code> |
|
|
422
|
-
| **`expression`** | <code><a href="#chainelement">ChainElement</a></code> |
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
#### ClassExpression
|
|
426
|
-
|
|
427
|
-
| Prop | Type |
|
|
428
|
-
| ---------- | ------------------------------------------------------------- |
|
|
429
|
-
| **`type`** | <code>'<a href="#classexpression">ClassExpression</a>'</code> |
|
|
430
|
-
| **`id`** | <code><a href="#identifier">Identifier</a> \| null</code> |
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
#### ConditionalExpression
|
|
434
|
-
|
|
435
|
-
| Prop | Type |
|
|
436
|
-
| ---------------- | ------------------------------------------------------------------------- |
|
|
437
|
-
| **`type`** | <code>'<a href="#conditionalexpression">ConditionalExpression</a>'</code> |
|
|
438
|
-
| **`test`** | <code><a href="#expression">Expression</a></code> |
|
|
439
|
-
| **`alternate`** | <code><a href="#expression">Expression</a></code> |
|
|
440
|
-
| **`consequent`** | <code><a href="#expression">Expression</a></code> |
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
#### ImportExpression
|
|
444
|
-
|
|
445
|
-
| Prop | Type |
|
|
446
|
-
| ------------ | --------------------------------------------------------------- |
|
|
447
|
-
| **`type`** | <code>'<a href="#importexpression">ImportExpression</a>'</code> |
|
|
448
|
-
| **`source`** | <code><a href="#expression">Expression</a></code> |
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
#### SimpleLiteral
|
|
452
|
-
|
|
453
|
-
| Prop | Type |
|
|
454
|
-
| ----------- | ------------------------------------------------ |
|
|
455
|
-
| **`type`** | <code>'<a href="#literal">Literal</a>'</code> |
|
|
456
|
-
| **`value`** | <code>string \| number \| boolean \| null</code> |
|
|
457
|
-
| **`raw`** | <code>string</code> |
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
#### RegExpLiteral
|
|
461
|
-
|
|
462
|
-
| Prop | Type |
|
|
463
|
-
| ----------- | ------------------------------------------------- |
|
|
464
|
-
| **`type`** | <code>'<a href="#literal">Literal</a>'</code> |
|
|
465
|
-
| **`value`** | <code><a href="#regexp">RegExp</a> \| null</code> |
|
|
466
|
-
| **`regex`** | <code>{ pattern: string; flags: string; }</code> |
|
|
467
|
-
| **`raw`** | <code>string</code> |
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
#### BigIntLiteral
|
|
471
|
-
|
|
472
|
-
| Prop | Type |
|
|
473
|
-
| ------------ | --------------------------------------------- |
|
|
474
|
-
| **`type`** | <code>'<a href="#literal">Literal</a>'</code> |
|
|
475
|
-
| **`value`** | <code>bigint \| null</code> |
|
|
476
|
-
| **`bigint`** | <code>string</code> |
|
|
477
|
-
| **`raw`** | <code>string</code> |
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
#### LogicalExpression
|
|
481
|
-
|
|
482
|
-
| Prop | Type |
|
|
483
|
-
| -------------- | ----------------------------------------------------------------- |
|
|
484
|
-
| **`type`** | <code>'<a href="#logicalexpression">LogicalExpression</a>'</code> |
|
|
485
|
-
| **`operator`** | <code><a href="#logicaloperator">LogicalOperator</a></code> |
|
|
486
|
-
| **`left`** | <code><a href="#expression">Expression</a></code> |
|
|
487
|
-
| **`right`** | <code><a href="#expression">Expression</a></code> |
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
#### MetaProperty
|
|
491
|
-
|
|
492
|
-
| Prop | Type |
|
|
493
|
-
| -------------- | ------------------------------------------------------- |
|
|
494
|
-
| **`type`** | <code>'<a href="#metaproperty">MetaProperty</a>'</code> |
|
|
495
|
-
| **`meta`** | <code><a href="#identifier">Identifier</a></code> |
|
|
496
|
-
| **`property`** | <code><a href="#identifier">Identifier</a></code> |
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
#### ObjectExpression
|
|
500
|
-
|
|
501
|
-
| Prop | Type |
|
|
502
|
-
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
503
|
-
| **`type`** | <code>'<a href="#objectexpression">ObjectExpression</a>'</code> |
|
|
504
|
-
| **`properties`** | <code><a href="#array">Array</a><<a href="#property">Property</a> \| <a href="#spreadelement">SpreadElement</a>></code> |
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
#### Property
|
|
508
|
-
|
|
509
|
-
| Prop | Type |
|
|
510
|
-
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
511
|
-
| **`type`** | <code>'<a href="#property">Property</a>'</code> |
|
|
512
|
-
| **`key`** | <code><a href="#expression">Expression</a> \| <a href="#privateidentifier">PrivateIdentifier</a></code> |
|
|
513
|
-
| **`value`** | <code><a href="#classexpression">ClassExpression</a> \| <a href="#arrayexpression">ArrayExpression</a> \| <a href="#arrowfunctionexpression">ArrowFunctionExpression</a> \| <a href="#assignmentexpression">AssignmentExpression</a> \| <a href="#awaitexpression">AwaitExpression</a> \| <a href="#binaryexpression">BinaryExpression</a> \| <a href="#simplecallexpression">SimpleCallExpression</a> \| <a href="#newexpression">NewExpression</a> \| <a href="#chainexpression">ChainExpression</a> \| <a href="#conditionalexpression">ConditionalExpression</a> \| <a href="#functionexpression">FunctionExpression</a> \| <a href="#identifier">Identifier</a> \| <a href="#importexpression">ImportExpression</a> \| <a href="#simpleliteral">SimpleLiteral</a> \| <a href="#regexpliteral">RegExpLiteral</a> \| <a href="#bigintliteral">BigIntLiteral</a> \| <a href="#logicalexpression">LogicalExpression</a> \| <a href="#memberexpression">MemberExpression</a> \| <a href="#metaproperty">MetaProperty</a> \| <a href="#objectexpression">ObjectExpression</a> \| <a href="#sequenceexpression">SequenceExpression</a> \| <a href="#taggedtemplateexpression">TaggedTemplateExpression</a> \| <a href="#templateliteral">TemplateLiteral</a> \| <a href="#thisexpression">ThisExpression</a> \| <a href="#unaryexpression">UnaryExpression</a> \| <a href="#updateexpression">UpdateExpression</a> \| <a href="#yieldexpression">YieldExpression</a> \| <a href="#objectpattern">ObjectPattern</a> \| <a href="#arraypattern">ArrayPattern</a> \| <a href="#restelement">RestElement</a> \| <a href="#assignmentpattern">AssignmentPattern</a></code> |
|
|
514
|
-
| **`kind`** | <code>'init' \| 'get' \| 'set'</code> |
|
|
515
|
-
| **`method`** | <code>boolean</code> |
|
|
516
|
-
| **`shorthand`** | <code>boolean</code> |
|
|
517
|
-
| **`computed`** | <code>boolean</code> |
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
#### SequenceExpression
|
|
521
|
-
|
|
522
|
-
| Prop | Type |
|
|
523
|
-
| ----------------- | ------------------------------------------------------------------- |
|
|
524
|
-
| **`type`** | <code>'<a href="#sequenceexpression">SequenceExpression</a>'</code> |
|
|
525
|
-
| **`expressions`** | <code>Expression[]</code> |
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
#### TaggedTemplateExpression
|
|
529
|
-
|
|
530
|
-
| Prop | Type |
|
|
531
|
-
| ----------- | ------------------------------------------------------------------------------- |
|
|
532
|
-
| **`type`** | <code>'<a href="#taggedtemplateexpression">TaggedTemplateExpression</a>'</code> |
|
|
533
|
-
| **`tag`** | <code><a href="#expression">Expression</a></code> |
|
|
534
|
-
| **`quasi`** | <code><a href="#templateliteral">TemplateLiteral</a></code> |
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
#### TemplateLiteral
|
|
538
|
-
|
|
539
|
-
| Prop | Type |
|
|
540
|
-
| ----------------- | ------------------------------------------------------------- |
|
|
541
|
-
| **`type`** | <code>'<a href="#templateliteral">TemplateLiteral</a>'</code> |
|
|
542
|
-
| **`quasis`** | <code>TemplateElement[]</code> |
|
|
543
|
-
| **`expressions`** | <code>Expression[]</code> |
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
#### TemplateElement
|
|
547
|
-
|
|
548
|
-
| Prop | Type |
|
|
549
|
-
| ----------- | ------------------------------------------------------------- |
|
|
550
|
-
| **`type`** | <code>'<a href="#templateelement">TemplateElement</a>'</code> |
|
|
551
|
-
| **`tail`** | <code>boolean</code> |
|
|
552
|
-
| **`value`** | <code>{ cooked?: string \| null; raw: string; }</code> |
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
#### ThisExpression
|
|
556
|
-
|
|
557
|
-
| Prop | Type |
|
|
558
|
-
| ---------- | ----------------------------------------------------------- |
|
|
559
|
-
| **`type`** | <code>'<a href="#thisexpression">ThisExpression</a>'</code> |
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
#### UnaryExpression
|
|
563
|
-
|
|
564
|
-
| Prop | Type |
|
|
565
|
-
| -------------- | ------------------------------------------------------------- |
|
|
566
|
-
| **`type`** | <code>'<a href="#unaryexpression">UnaryExpression</a>'</code> |
|
|
567
|
-
| **`operator`** | <code><a href="#unaryoperator">UnaryOperator</a></code> |
|
|
568
|
-
| **`prefix`** | <code>true</code> |
|
|
569
|
-
| **`argument`** | <code><a href="#expression">Expression</a></code> |
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
#### UpdateExpression
|
|
573
|
-
|
|
574
|
-
| Prop | Type |
|
|
575
|
-
| -------------- | --------------------------------------------------------------- |
|
|
576
|
-
| **`type`** | <code>'<a href="#updateexpression">UpdateExpression</a>'</code> |
|
|
577
|
-
| **`operator`** | <code><a href="#updateoperator">UpdateOperator</a></code> |
|
|
578
|
-
| **`argument`** | <code><a href="#expression">Expression</a></code> |
|
|
579
|
-
| **`prefix`** | <code>boolean</code> |
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
#### YieldExpression
|
|
583
|
-
|
|
584
|
-
| Prop | Type |
|
|
585
|
-
| -------------- | ------------------------------------------------------------- |
|
|
586
|
-
| **`type`** | <code>'<a href="#yieldexpression">YieldExpression</a>'</code> |
|
|
587
|
-
| **`argument`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
588
|
-
| **`delegate`** | <code>boolean</code> |
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
#### StaticBlock
|
|
592
|
-
|
|
593
|
-
| Prop | Type |
|
|
594
|
-
| ---------- | ----------------------------------------------------- |
|
|
595
|
-
| **`type`** | <code>'<a href="#staticblock">StaticBlock</a>'</code> |
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
#### EmptyStatement
|
|
599
|
-
|
|
600
|
-
| Prop | Type |
|
|
601
|
-
| ---------- | ----------------------------------------------------------- |
|
|
602
|
-
| **`type`** | <code>'<a href="#emptystatement">EmptyStatement</a>'</code> |
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
#### DebuggerStatement
|
|
606
|
-
|
|
607
|
-
| Prop | Type |
|
|
608
|
-
| ---------- | ----------------------------------------------------------------- |
|
|
609
|
-
| **`type`** | <code>'<a href="#debuggerstatement">DebuggerStatement</a>'</code> |
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
#### WithStatement
|
|
613
|
-
|
|
614
|
-
| Prop | Type |
|
|
615
|
-
| ------------ | --------------------------------------------------------- |
|
|
616
|
-
| **`type`** | <code>'<a href="#withstatement">WithStatement</a>'</code> |
|
|
617
|
-
| **`object`** | <code><a href="#expression">Expression</a></code> |
|
|
618
|
-
| **`body`** | <code><a href="#statement">Statement</a></code> |
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
#### ReturnStatement
|
|
622
|
-
|
|
623
|
-
| Prop | Type |
|
|
624
|
-
| -------------- | ------------------------------------------------------------- |
|
|
625
|
-
| **`type`** | <code>'<a href="#returnstatement">ReturnStatement</a>'</code> |
|
|
626
|
-
| **`argument`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
#### LabeledStatement
|
|
630
|
-
|
|
631
|
-
| Prop | Type |
|
|
632
|
-
| ----------- | --------------------------------------------------------------- |
|
|
633
|
-
| **`type`** | <code>'<a href="#labeledstatement">LabeledStatement</a>'</code> |
|
|
634
|
-
| **`label`** | <code><a href="#identifier">Identifier</a></code> |
|
|
635
|
-
| **`body`** | <code><a href="#statement">Statement</a></code> |
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
#### BreakStatement
|
|
639
|
-
|
|
640
|
-
| Prop | Type |
|
|
641
|
-
| ----------- | ----------------------------------------------------------- |
|
|
642
|
-
| **`type`** | <code>'<a href="#breakstatement">BreakStatement</a>'</code> |
|
|
643
|
-
| **`label`** | <code><a href="#identifier">Identifier</a> \| null</code> |
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
#### ContinueStatement
|
|
647
|
-
|
|
648
|
-
| Prop | Type |
|
|
649
|
-
| ----------- | ----------------------------------------------------------------- |
|
|
650
|
-
| **`type`** | <code>'<a href="#continuestatement">ContinueStatement</a>'</code> |
|
|
651
|
-
| **`label`** | <code><a href="#identifier">Identifier</a> \| null</code> |
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
#### IfStatement
|
|
655
|
-
|
|
656
|
-
| Prop | Type |
|
|
657
|
-
| ---------------- | ------------------------------------------------------- |
|
|
658
|
-
| **`type`** | <code>'<a href="#ifstatement">IfStatement</a>'</code> |
|
|
659
|
-
| **`test`** | <code><a href="#expression">Expression</a></code> |
|
|
660
|
-
| **`consequent`** | <code><a href="#statement">Statement</a></code> |
|
|
661
|
-
| **`alternate`** | <code><a href="#statement">Statement</a> \| null</code> |
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
#### SwitchStatement
|
|
665
|
-
|
|
666
|
-
| Prop | Type |
|
|
667
|
-
| ------------------ | ------------------------------------------------------------- |
|
|
668
|
-
| **`type`** | <code>'<a href="#switchstatement">SwitchStatement</a>'</code> |
|
|
669
|
-
| **`discriminant`** | <code><a href="#expression">Expression</a></code> |
|
|
670
|
-
| **`cases`** | <code>SwitchCase[]</code> |
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
#### SwitchCase
|
|
674
|
-
|
|
675
|
-
| Prop | Type |
|
|
676
|
-
| ---------------- | --------------------------------------------------------- |
|
|
677
|
-
| **`type`** | <code>'<a href="#switchcase">SwitchCase</a>'</code> |
|
|
678
|
-
| **`test`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
679
|
-
| **`consequent`** | <code>Statement[]</code> |
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
#### ThrowStatement
|
|
683
|
-
|
|
684
|
-
| Prop | Type |
|
|
685
|
-
| -------------- | ----------------------------------------------------------- |
|
|
686
|
-
| **`type`** | <code>'<a href="#throwstatement">ThrowStatement</a>'</code> |
|
|
687
|
-
| **`argument`** | <code><a href="#expression">Expression</a></code> |
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
#### TryStatement
|
|
691
|
-
|
|
692
|
-
| Prop | Type |
|
|
693
|
-
| --------------- | ----------------------------------------------------------------- |
|
|
694
|
-
| **`type`** | <code>'<a href="#trystatement">TryStatement</a>'</code> |
|
|
695
|
-
| **`block`** | <code><a href="#blockstatement">BlockStatement</a></code> |
|
|
696
|
-
| **`handler`** | <code><a href="#catchclause">CatchClause</a> \| null</code> |
|
|
697
|
-
| **`finalizer`** | <code><a href="#blockstatement">BlockStatement</a> \| null</code> |
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
#### CatchClause
|
|
701
|
-
|
|
702
|
-
| Prop | Type |
|
|
703
|
-
| ----------- | --------------------------------------------------------- |
|
|
704
|
-
| **`type`** | <code>'<a href="#catchclause">CatchClause</a>'</code> |
|
|
705
|
-
| **`param`** | <code><a href="#pattern">Pattern</a> \| null</code> |
|
|
706
|
-
| **`body`** | <code><a href="#blockstatement">BlockStatement</a></code> |
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
#### WhileStatement
|
|
710
|
-
|
|
711
|
-
| Prop | Type |
|
|
712
|
-
| ---------- | ----------------------------------------------------------- |
|
|
713
|
-
| **`type`** | <code>'<a href="#whilestatement">WhileStatement</a>'</code> |
|
|
714
|
-
| **`test`** | <code><a href="#expression">Expression</a></code> |
|
|
715
|
-
| **`body`** | <code><a href="#statement">Statement</a></code> |
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
#### DoWhileStatement
|
|
719
|
-
|
|
720
|
-
| Prop | Type |
|
|
721
|
-
| ---------- | --------------------------------------------------------------- |
|
|
722
|
-
| **`type`** | <code>'<a href="#dowhilestatement">DoWhileStatement</a>'</code> |
|
|
723
|
-
| **`body`** | <code><a href="#statement">Statement</a></code> |
|
|
724
|
-
| **`test`** | <code><a href="#expression">Expression</a></code> |
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
#### ForStatement
|
|
728
|
-
|
|
729
|
-
| Prop | Type |
|
|
730
|
-
| ------------ | ------------------------------------------------------------------------------------------------------------------- |
|
|
731
|
-
| **`type`** | <code>'<a href="#forstatement">ForStatement</a>'</code> |
|
|
732
|
-
| **`init`** | <code><a href="#expression">Expression</a> \| <a href="#variabledeclaration">VariableDeclaration</a> \| null</code> |
|
|
733
|
-
| **`test`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
734
|
-
| **`update`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
735
|
-
| **`body`** | <code><a href="#statement">Statement</a></code> |
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
#### VariableDeclaration
|
|
739
|
-
|
|
740
|
-
| Prop | Type |
|
|
741
|
-
| ------------------ | --------------------------------------------------------------------- |
|
|
742
|
-
| **`type`** | <code>'<a href="#variabledeclaration">VariableDeclaration</a>'</code> |
|
|
743
|
-
| **`declarations`** | <code>VariableDeclarator[]</code> |
|
|
744
|
-
| **`kind`** | <code>'var' \| 'let' \| 'const'</code> |
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
#### VariableDeclarator
|
|
748
|
-
|
|
749
|
-
| Prop | Type |
|
|
750
|
-
| ---------- | ------------------------------------------------------------------- |
|
|
751
|
-
| **`type`** | <code>'<a href="#variabledeclarator">VariableDeclarator</a>'</code> |
|
|
752
|
-
| **`id`** | <code><a href="#pattern">Pattern</a></code> |
|
|
753
|
-
| **`init`** | <code><a href="#expression">Expression</a> \| null</code> |
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
#### ForInStatement
|
|
757
|
-
|
|
758
|
-
| Prop | Type |
|
|
759
|
-
| ---------- | ----------------------------------------------------------- |
|
|
760
|
-
| **`type`** | <code>'<a href="#forinstatement">ForInStatement</a>'</code> |
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
#### ForOfStatement
|
|
764
|
-
|
|
765
|
-
| Prop | Type |
|
|
766
|
-
| ----------- | ----------------------------------------------------------- |
|
|
767
|
-
| **`type`** | <code>'<a href="#forofstatement">ForOfStatement</a>'</code> |
|
|
768
|
-
| **`await`** | <code>boolean</code> |
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
#### ClassDeclaration
|
|
772
|
-
|
|
773
|
-
| Prop | Type | Description |
|
|
774
|
-
| -------- | ------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
775
|
-
| **`id`** | <code><a href="#identifier">Identifier</a></code> | It is null when a class declaration is a part of the `export default class` statement |
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
#### Comment
|
|
779
|
-
|
|
780
|
-
| Prop | Type |
|
|
781
|
-
| ----------- | ------------------------------ |
|
|
782
|
-
| **`type`** | <code>'Line' \| 'Block'</code> |
|
|
783
|
-
| **`value`** | <code>string</code> |
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
### Type Aliases
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
#### PropertyKey
|
|
790
|
-
|
|
791
|
-
<code>string | number | symbol</code>
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
#### Function
|
|
795
|
-
|
|
796
|
-
<code><a href="#functiondeclaration">FunctionDeclaration</a> | <a href="#functionexpression">FunctionExpression</a> | <a href="#arrowfunctionexpression">ArrowFunctionExpression</a></code>
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
#### Statement
|
|
800
|
-
|
|
801
|
-
<code><a href="#expressionstatement">ExpressionStatement</a> | <a href="#blockstatement">BlockStatement</a> | <a href="#staticblock">StaticBlock</a> | <a href="#emptystatement">EmptyStatement</a> | <a href="#debuggerstatement">DebuggerStatement</a> | <a href="#withstatement">WithStatement</a> | <a href="#returnstatement">ReturnStatement</a> | <a href="#labeledstatement">LabeledStatement</a> | <a href="#breakstatement">BreakStatement</a> | <a href="#continuestatement">ContinueStatement</a> | <a href="#ifstatement">IfStatement</a> | <a href="#switchstatement">SwitchStatement</a> | <a href="#throwstatement">ThrowStatement</a> | <a href="#trystatement">TryStatement</a> | <a href="#whilestatement">WhileStatement</a> | <a href="#dowhilestatement">DoWhileStatement</a> | <a href="#forstatement">ForStatement</a> | <a href="#forinstatement">ForInStatement</a> | <a href="#forofstatement">ForOfStatement</a> | <a href="#declaration">Declaration</a></code>
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
#### Expression
|
|
805
|
-
|
|
806
|
-
<code>ExpressionMap[keyof ExpressionMap]</code>
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
#### AssignmentOperator
|
|
810
|
-
|
|
811
|
-
<code>"=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??="</code>
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
#### Pattern
|
|
815
|
-
|
|
816
|
-
<code><a href="#identifier">Identifier</a> | <a href="#objectpattern">ObjectPattern</a> | <a href="#arraypattern">ArrayPattern</a> | <a href="#restelement">RestElement</a> | <a href="#assignmentpattern">AssignmentPattern</a> | <a href="#memberexpression">MemberExpression</a></code>
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
#### BinaryOperator
|
|
820
|
-
|
|
821
|
-
<code>"==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof"</code>
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
#### CallExpression
|
|
825
|
-
|
|
826
|
-
<code><a href="#simplecallexpression">SimpleCallExpression</a> | <a href="#newexpression">NewExpression</a></code>
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
#### ChainElement
|
|
830
|
-
|
|
831
|
-
<code><a href="#simplecallexpression">SimpleCallExpression</a> | <a href="#memberexpression">MemberExpression</a></code>
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
#### Literal
|
|
835
|
-
|
|
836
|
-
<code><a href="#simpleliteral">SimpleLiteral</a> | <a href="#regexpliteral">RegExpLiteral</a> | <a href="#bigintliteral">BigIntLiteral</a></code>
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
#### LogicalOperator
|
|
840
|
-
|
|
841
|
-
<code>"||" | "&&" | "??"</code>
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
#### UnaryOperator
|
|
845
|
-
|
|
846
|
-
<code>"-" | "+" | "!" | "~" | "typeof" | "void" | "delete"</code>
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
#### UpdateOperator
|
|
850
|
-
|
|
851
|
-
<code>"++" | "--"</code>
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
#### Declaration
|
|
855
|
-
|
|
856
|
-
<code><a href="#functiondeclaration">FunctionDeclaration</a> | <a href="#variabledeclaration">VariableDeclaration</a> | <a href="#classdeclaration">ClassDeclaration</a></code>
|
|
857
|
-
|
|
858
|
-
</docgen-api>
|
|
@@ -17,13 +17,8 @@ public class SurveySparrowIonicPlugin implements OnSsValidateSurveyEventListener
|
|
|
17
17
|
|
|
18
18
|
private static final int SURVEY_REQUEST_CODE = 1;
|
|
19
19
|
private static final int SURVEY_SCHEDULE_REQUEST_CODE = 2;
|
|
20
|
-
private AppCompatActivity activity;
|
|
21
20
|
|
|
22
|
-
public
|
|
23
|
-
activity = activity;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public void loadFullScreenSurvey(String domain, String token, CustomParam[] params, HashMap properties) {
|
|
21
|
+
public void loadFullScreenSurvey(String domain, String token, CustomParam[] params, HashMap properties, AppCompatActivity activity) {
|
|
27
22
|
if(activity == null) {
|
|
28
23
|
throw new RuntimeException("Activity is null. Error fetching activity.");
|
|
29
24
|
}
|
|
@@ -36,7 +31,7 @@ public class SurveySparrowIonicPlugin implements OnSsValidateSurveyEventListener
|
|
|
36
31
|
surveySparrow.startSurveyForResult(SURVEY_REQUEST_CODE);
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
public void loadFullScreenSurveyWithValidation(String domain, String token, CustomParam[] params, HashMap properties) {
|
|
34
|
+
public void loadFullScreenSurveyWithValidation(String domain, String token, CustomParam[] params, HashMap properties, AppCompatActivity activity) {
|
|
40
35
|
SsSurvey survey = new SsSurvey(domain, token, params, properties);
|
|
41
36
|
SurveySparrow surveySparrow = new SurveySparrow(activity, survey)
|
|
42
37
|
.enableBackButton(true)
|
package/android/src/main/java/com/surveysparrow/plugins/ionic/SurveySparrowIonicPluginPlugin.java
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
package com.surveysparrow.plugins.ionic;
|
|
2
2
|
|
|
3
|
-
import com.getcapacitor.JSArray;
|
|
4
3
|
import com.getcapacitor.JSObject;
|
|
5
4
|
import com.getcapacitor.Plugin;
|
|
6
5
|
import com.getcapacitor.PluginCall;
|
|
@@ -8,14 +7,16 @@ import com.getcapacitor.PluginMethod;
|
|
|
8
7
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
9
8
|
|
|
10
9
|
import com.surveysparrow.ss_android_sdk.SsSurvey.CustomParam;
|
|
11
|
-
|
|
10
|
+
|
|
11
|
+
import java.util.List;
|
|
12
|
+
import java.util.ArrayList;
|
|
12
13
|
import java.util.HashMap;
|
|
13
14
|
import java.util.Iterator;
|
|
14
15
|
|
|
15
16
|
@CapacitorPlugin(name = "SurveySparrowIonicPlugin")
|
|
16
17
|
public class SurveySparrowIonicPluginPlugin extends Plugin {
|
|
17
18
|
|
|
18
|
-
private final SurveySparrowIonicPlugin implementation = new SurveySparrowIonicPlugin(
|
|
19
|
+
private final SurveySparrowIonicPlugin implementation = new SurveySparrowIonicPlugin();
|
|
19
20
|
|
|
20
21
|
@PluginMethod
|
|
21
22
|
public void loadFullScreenSurvey(PluginCall call) {
|
|
@@ -24,7 +25,7 @@ public class SurveySparrowIonicPluginPlugin extends Plugin {
|
|
|
24
25
|
CustomParam[] params = parseParams(call.getObject("params"));
|
|
25
26
|
HashMap<String, String> properties = parseProperties(call.getObject("properties"));
|
|
26
27
|
|
|
27
|
-
implementation.loadFullScreenSurvey(domain, token, params, properties);
|
|
28
|
+
implementation.loadFullScreenSurvey(domain, token, params, properties, this.getActivity());
|
|
28
29
|
call.resolve();
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -35,29 +36,25 @@ public class SurveySparrowIonicPluginPlugin extends Plugin {
|
|
|
35
36
|
CustomParam[] params = parseParams(call.getObject("params"));
|
|
36
37
|
HashMap<String, String> properties = parseProperties(call.getObject("properties"));
|
|
37
38
|
|
|
38
|
-
implementation.loadFullScreenSurveyWithValidation(domain, token, params, properties);
|
|
39
|
+
implementation.loadFullScreenSurveyWithValidation(domain, token, params, properties, this.getActivity());
|
|
39
40
|
call.resolve();
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
private CustomParam[] parseParams(JSObject jsParams) {
|
|
43
|
-
if (jsParams == null
|
|
44
|
+
if (jsParams == null) {
|
|
44
45
|
return new CustomParam[0];
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
String
|
|
48
|
-
CustomParam
|
|
48
|
+
Iterator<String> keysIterator = jsParams.keys();
|
|
49
|
+
List<CustomParam> paramsList = new ArrayList<>();
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
params[i] = new CustomParam(key, value);
|
|
55
|
-
} catch (JSONException e) {
|
|
56
|
-
throw new RuntimeException("Invalid parameter for key: " + keys[i], e);
|
|
57
|
-
}
|
|
51
|
+
while (keysIterator.hasNext()) {
|
|
52
|
+
String key = keysIterator.next();
|
|
53
|
+
String value = jsParams.getString(key);
|
|
54
|
+
paramsList.add(new CustomParam(key, value));
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
return
|
|
57
|
+
return paramsList.toArray(new CustomParam[0]);
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
private HashMap<String, String> parseProperties(JSObject jsProperties) {
|
|
@@ -68,6 +65,9 @@ public class SurveySparrowIonicPluginPlugin extends Plugin {
|
|
|
68
65
|
properties.put(key, jsProperties.getString(key));
|
|
69
66
|
}
|
|
70
67
|
}
|
|
68
|
+
if (!properties.containsKey("langCode")) {
|
|
69
|
+
properties.put("langCode", "en");
|
|
70
|
+
}
|
|
71
71
|
return properties;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -15,10 +15,10 @@ public class SurveySparrowIonicPluginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
15
15
|
|
|
16
16
|
@objc public func loadFullScreenSurvey(_ call: CAPPluginCall) {
|
|
17
17
|
|
|
18
|
-
let domain = call.getString("domain")
|
|
19
|
-
let token = call.getString("token")
|
|
18
|
+
let domain = call.getString("domain")
|
|
19
|
+
let token = call.getString("token")
|
|
20
20
|
let params = call.getObject("params") as? [String : String]
|
|
21
|
-
let properties = call.getObject("properties")
|
|
21
|
+
let properties = call.getObject("properties")
|
|
22
22
|
|
|
23
23
|
guard let domain = domain, let token = token, let params = params, let properties = properties else {
|
|
24
24
|
call.reject("Invalid or missing parameters")
|
|
@@ -33,10 +33,10 @@ public class SurveySparrowIonicPluginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
33
33
|
|
|
34
34
|
@objc public func loadFullScreenSurveyWithValidation(_ call: CAPPluginCall) {
|
|
35
35
|
|
|
36
|
-
let domain = call.getString("domain")
|
|
37
|
-
let token = call.getString("token")
|
|
36
|
+
let domain = call.getString("domain")
|
|
37
|
+
let token = call.getString("token")
|
|
38
38
|
let params = call.getObject("params") as? [String : String]
|
|
39
|
-
let properties = call.getObject("properties")
|
|
39
|
+
let properties = call.getObject("properties")
|
|
40
40
|
|
|
41
41
|
guard let domain = domain, let token = token, let params = params, let properties = properties else {
|
|
42
42
|
call.reject("Invalid or missing parameters")
|
package/ios/Tests/SurveySparrowIonicPluginPluginTests/SurveySparrowIonicPluginPluginTests.swift
CHANGED
|
@@ -24,7 +24,7 @@ class SurveySparrowIonicPluginPluginTests: XCTestCase {
|
|
|
24
24
|
let token = "tt-ChaSVQWRDF7"
|
|
25
25
|
let params: [String: String] = ["emailaddress": "email@email.com", "email": "email@email.com"]
|
|
26
26
|
let properties: [String: Any] = [
|
|
27
|
-
"
|
|
27
|
+
"langCode": "en",
|
|
28
28
|
"isCloseButtonEnabled": true
|
|
29
29
|
]
|
|
30
30
|
|
|
@@ -50,7 +50,7 @@ class SurveySparrowIonicPluginPluginTests: XCTestCase {
|
|
|
50
50
|
let token = "tt-ChaSVQWRDF7"
|
|
51
51
|
let params: [String: String] = ["emailaddress": "email@email.com", "email": "email@email.com"]
|
|
52
52
|
let properties: [String: Any] = [
|
|
53
|
-
"
|
|
53
|
+
"langCode": "en",
|
|
54
54
|
"isCloseButtonEnabled": true
|
|
55
55
|
]
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "surveysparrow-ionic-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "SurveySparrow SDK enables you to collect feedback from your mobile app. Embed the Classic, Chat & NPS surveys in your ionic application seamlessly with few lines of code.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|