@ng-formworks/core 19.6.3 → 20.6.4
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 +2 -1
- package/fesm2022/ng-formworks-core.mjs +209 -209
- package/fesm2022/ng-formworks-core.mjs.map +1 -1
- package/index.d.ts +2772 -3
- package/package.json +11 -6
- package/lib/framework-library/framework-library.service.d.ts +0 -53
- package/lib/framework-library/framework.d.ts +0 -13
- package/lib/framework-library/no-framework.component.d.ts +0 -8
- package/lib/framework-library/no-framework.module.d.ts +0 -9
- package/lib/framework-library/no.framework.d.ts +0 -10
- package/lib/json-schema-form.component.d.ts +0 -225
- package/lib/json-schema-form.module.d.ts +0 -11
- package/lib/json-schema-form.service.d.ts +0 -150
- package/lib/locale/de-validation-messages.d.ts +0 -1
- package/lib/locale/en-validation-messages.d.ts +0 -1
- package/lib/locale/es-validation-messages.d.ts +0 -1
- package/lib/locale/fr-validation-messages.d.ts +0 -1
- package/lib/locale/index.d.ts +0 -7
- package/lib/locale/it-validation-messages.d.ts +0 -1
- package/lib/locale/pt-validation-messages.d.ts +0 -1
- package/lib/locale/zh-validation-messages.d.ts +0 -1
- package/lib/shared/convert-schema-to-draft6.function.d.ts +0 -21
- package/lib/shared/form-group.functions.d.ts +0 -128
- package/lib/shared/format-regex.constants.d.ts +0 -20
- package/lib/shared/index.d.ts +0 -9
- package/lib/shared/json-schema.functions.d.ts +0 -214
- package/lib/shared/json.validators.d.ts +0 -441
- package/lib/shared/jsonpointer.functions.d.ts +0 -416
- package/lib/shared/layout.functions.d.ts +0 -83
- package/lib/shared/merge-schemas.function.d.ts +0 -19
- package/lib/shared/utility.functions.d.ts +0 -180
- package/lib/shared/validator.functions.d.ts +0 -364
- package/lib/widget-library/add-reference.component.d.ts +0 -18
- package/lib/widget-library/button.component.d.ts +0 -20
- package/lib/widget-library/checkbox.component.d.ts +0 -23
- package/lib/widget-library/checkboxes.component.d.ts +0 -24
- package/lib/widget-library/element-attribute.directive.d.ts +0 -13
- package/lib/widget-library/file.component.d.ts +0 -20
- package/lib/widget-library/hidden.component.d.ts +0 -18
- package/lib/widget-library/index.d.ts +0 -29
- package/lib/widget-library/input.component.d.ts +0 -22
- package/lib/widget-library/message.component.d.ts +0 -13
- package/lib/widget-library/none.component.d.ts +0 -8
- package/lib/widget-library/number.component.d.ts +0 -27
- package/lib/widget-library/one-of.component.d.ts +0 -21
- package/lib/widget-library/orderable.directive.d.ts +0 -41
- package/lib/widget-library/radios.component.d.ts +0 -22
- package/lib/widget-library/root.component.d.ts +0 -23
- package/lib/widget-library/section.component.d.ts +0 -17
- package/lib/widget-library/select-framework.component.d.ts +0 -15
- package/lib/widget-library/select-widget.component.d.ts +0 -15
- package/lib/widget-library/select.component.d.ts +0 -25
- package/lib/widget-library/selectcheckbox.component.d.ts +0 -55
- package/lib/widget-library/submit.component.d.ts +0 -22
- package/lib/widget-library/tab.component.d.ts +0 -12
- package/lib/widget-library/tabs.component.d.ts +0 -18
- package/lib/widget-library/template.component.d.ts +0 -15
- package/lib/widget-library/textarea.component.d.ts +0 -20
- package/lib/widget-library/widget-library.module.d.ts +0 -34
- package/lib/widget-library/widget-library.service.d.ts +0 -22
- package/public_api.d.ts +0 -9
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* 'JsonPointer' class
|
|
4
|
-
*
|
|
5
|
-
* Some utilities for using JSON Pointers with JSON objects
|
|
6
|
-
* https://tools.ietf.org/html/rfc6901
|
|
7
|
-
*
|
|
8
|
-
* get, getCopy, getFirst, set, setCopy, insert, insertCopy, remove, has, dict,
|
|
9
|
-
* forEachDeep, forEachDeepCopy, escape, unescape, parse, compile, toKey,
|
|
10
|
-
* isJsonPointer, isSubPointer, toIndexedPointer, toGenericPointer,
|
|
11
|
-
* toControlPointer, toSchemaPointer, toDataPointer, parseObjectPath
|
|
12
|
-
*
|
|
13
|
-
* Some functions based on manuelstofer's json-pointer utilities
|
|
14
|
-
* https://github.com/manuelstofer/json-pointer
|
|
15
|
-
*/
|
|
16
|
-
export type Pointer = string | string[];
|
|
17
|
-
export declare class JsonPointer {
|
|
18
|
-
/**
|
|
19
|
-
* 'get' function
|
|
20
|
-
*
|
|
21
|
-
* Uses a JSON Pointer to retrieve a value from an object.
|
|
22
|
-
*
|
|
23
|
-
* // { object } object - Object to get value from
|
|
24
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
25
|
-
* // { number = 0 } startSlice - Zero-based index of first Pointer key to use
|
|
26
|
-
* // { number } endSlice - Zero-based index of last Pointer key to use
|
|
27
|
-
* // { boolean = false } getBoolean - Return only true or false?
|
|
28
|
-
* // { boolean = false } errors - Show error if not found?
|
|
29
|
-
* // { object } - Located value (or true or false if getBoolean = true)
|
|
30
|
-
*/
|
|
31
|
-
static get(object: any, pointer: any, startSlice?: number, endSlice?: number, getBoolean?: boolean, errors?: boolean): any;
|
|
32
|
-
private static logErrors;
|
|
33
|
-
/**
|
|
34
|
-
* Evaluates conditional expression in form of `model.<property>==<value>` or
|
|
35
|
-
* `model.<property>!=<value>` where the first one means that the value must match to be
|
|
36
|
-
* shown in a form, while the former shows the property only when the property value is not
|
|
37
|
-
* set, or does not equal the given value.
|
|
38
|
-
*
|
|
39
|
-
* // { subObject } subObject - an object containing the data values of properties
|
|
40
|
-
* // { key } key - the key from the for loop in a form of `<property>==<value>`
|
|
41
|
-
*
|
|
42
|
-
* Returns the object with two properties. The property passed informs whether
|
|
43
|
-
* the expression evaluated successfully and the property key returns either the same
|
|
44
|
-
* key if it is not contained inside the subObject or the key of the property if it is contained.
|
|
45
|
-
*/
|
|
46
|
-
static evaluateExpression(subObject: Object, key: any): any;
|
|
47
|
-
/**
|
|
48
|
-
* Performs the actual evaluation on the given expression with given values and keys.
|
|
49
|
-
* // { cleanedValue } cleanedValue - the given valued cleaned of quotes if it had any
|
|
50
|
-
* // { subObject } subObject - the object with properties values
|
|
51
|
-
* // { keysAndExpression } keysAndExpression - an object holding the expressions with
|
|
52
|
-
*/
|
|
53
|
-
private static performExpressionOnValue;
|
|
54
|
-
private static doComparisonByExpressionType;
|
|
55
|
-
/**
|
|
56
|
-
* Does the checks when the parsed key is actually no a property inside subObject.
|
|
57
|
-
* That would mean that the equal comparison makes no sense and thus the negative result
|
|
58
|
-
* is returned, and the not equal comparison is not necessary because it doesn't equal
|
|
59
|
-
* obviously. Returns null when the given key is a real property inside the subObject.
|
|
60
|
-
* // { subObject } subObject - the object with properties values
|
|
61
|
-
* // { keysAndExpression } keysAndExpression - an object holding the expressions with
|
|
62
|
-
* the associated keys.
|
|
63
|
-
*/
|
|
64
|
-
private static doOwnCheckResult;
|
|
65
|
-
/**
|
|
66
|
-
* Does the basic checks and tries to parse an expression and a pair
|
|
67
|
-
* of key and value.
|
|
68
|
-
* // { key } key - the original for loop created value containing key and value in one string
|
|
69
|
-
* // { subObject } subObject - the object with properties values
|
|
70
|
-
*/
|
|
71
|
-
private static parseKeysAndExpression;
|
|
72
|
-
private static keyOrSubObjEmpty;
|
|
73
|
-
/**
|
|
74
|
-
* 'getCopy' function
|
|
75
|
-
*
|
|
76
|
-
* Uses a JSON Pointer to deeply clone a value from an object.
|
|
77
|
-
*
|
|
78
|
-
* // { object } object - Object to get value from
|
|
79
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
80
|
-
* // { number = 0 } startSlice - Zero-based index of first Pointer key to use
|
|
81
|
-
* // { number } endSlice - Zero-based index of last Pointer key to use
|
|
82
|
-
* // { boolean = false } getBoolean - Return only true or false?
|
|
83
|
-
* // { boolean = false } errors - Show error if not found?
|
|
84
|
-
* // { object } - Located value (or true or false if getBoolean = true)
|
|
85
|
-
*/
|
|
86
|
-
static getCopy(object: any, pointer: any, startSlice?: number, endSlice?: number, getBoolean?: boolean, errors?: boolean): any;
|
|
87
|
-
/**
|
|
88
|
-
* 'getFirst' function
|
|
89
|
-
*
|
|
90
|
-
* Takes an array of JSON Pointers and objects,
|
|
91
|
-
* checks each object for a value specified by the pointer,
|
|
92
|
-
* and returns the first value found.
|
|
93
|
-
*
|
|
94
|
-
* // { [object, pointer][] } items - Array of objects and pointers to check
|
|
95
|
-
* // { any = null } defaultValue - Value to return if nothing found
|
|
96
|
-
* // { boolean = false } getCopy - Return a copy instead?
|
|
97
|
-
* // - First value found
|
|
98
|
-
*/
|
|
99
|
-
static getFirst(items: any, defaultValue?: any, getCopy?: boolean): any;
|
|
100
|
-
/**
|
|
101
|
-
* 'getFirstCopy' function
|
|
102
|
-
*
|
|
103
|
-
* Similar to getFirst, but always returns a copy.
|
|
104
|
-
*
|
|
105
|
-
* // { [object, pointer][] } items - Array of objects and pointers to check
|
|
106
|
-
* // { any = null } defaultValue - Value to return if nothing found
|
|
107
|
-
* // - Copy of first value found
|
|
108
|
-
*/
|
|
109
|
-
static getFirstCopy(items: any, defaultValue?: any): any;
|
|
110
|
-
/**
|
|
111
|
-
* 'set' function
|
|
112
|
-
*
|
|
113
|
-
* Uses a JSON Pointer to set a value on an object.
|
|
114
|
-
* Also creates any missing sub objects or arrays to contain that value.
|
|
115
|
-
*
|
|
116
|
-
* If the optional fourth parameter is TRUE and the inner-most container
|
|
117
|
-
* is an array, the function will insert the value as a new item at the
|
|
118
|
-
* specified location in the array, rather than overwriting the existing
|
|
119
|
-
* value (if any) at that location.
|
|
120
|
-
*
|
|
121
|
-
* So set([1, 2, 3], '/1', 4) => [1, 4, 3]
|
|
122
|
-
* and
|
|
123
|
-
* So set([1, 2, 3], '/1', 4, true) => [1, 4, 2, 3]
|
|
124
|
-
*
|
|
125
|
-
* // { object } object - The object to set value in
|
|
126
|
-
* // { Pointer } pointer - The JSON Pointer (string or array)
|
|
127
|
-
* // value - The new value to set
|
|
128
|
-
* // { boolean } insert - insert value?
|
|
129
|
-
* // { object } - The original object, modified with the set value
|
|
130
|
-
*/
|
|
131
|
-
static set(object: any, pointer: any, value: any, insert?: boolean): any;
|
|
132
|
-
/**
|
|
133
|
-
* 'setCopy' function
|
|
134
|
-
*
|
|
135
|
-
* Copies an object and uses a JSON Pointer to set a value on the copy.
|
|
136
|
-
* Also creates any missing sub objects or arrays to contain that value.
|
|
137
|
-
*
|
|
138
|
-
* If the optional fourth parameter is TRUE and the inner-most container
|
|
139
|
-
* is an array, the function will insert the value as a new item at the
|
|
140
|
-
* specified location in the array, rather than overwriting the existing value.
|
|
141
|
-
*
|
|
142
|
-
* // { object } object - The object to copy and set value in
|
|
143
|
-
* // { Pointer } pointer - The JSON Pointer (string or array)
|
|
144
|
-
* // value - The value to set
|
|
145
|
-
* // { boolean } insert - insert value?
|
|
146
|
-
* // { object } - The new object with the set value
|
|
147
|
-
*/
|
|
148
|
-
static setCopy(object: any, pointer: any, value: any, insert?: boolean): any;
|
|
149
|
-
/**
|
|
150
|
-
* 'insert' function
|
|
151
|
-
*
|
|
152
|
-
* Calls 'set' with insert = TRUE
|
|
153
|
-
*
|
|
154
|
-
* // { object } object - object to insert value in
|
|
155
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
156
|
-
* // value - value to insert
|
|
157
|
-
* // { object }
|
|
158
|
-
*/
|
|
159
|
-
static insert(object: any, pointer: any, value: any): any;
|
|
160
|
-
/**
|
|
161
|
-
* 'insertCopy' function
|
|
162
|
-
*
|
|
163
|
-
* Calls 'setCopy' with insert = TRUE
|
|
164
|
-
*
|
|
165
|
-
* // { object } object - object to insert value in
|
|
166
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
167
|
-
* // value - value to insert
|
|
168
|
-
* // { object }
|
|
169
|
-
*/
|
|
170
|
-
static insertCopy(object: any, pointer: any, value: any): any;
|
|
171
|
-
/**
|
|
172
|
-
* 'remove' function
|
|
173
|
-
*
|
|
174
|
-
* Uses a JSON Pointer to remove a key and its attribute from an object
|
|
175
|
-
*
|
|
176
|
-
* // { object } object - object to delete attribute from
|
|
177
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
178
|
-
* // { object }
|
|
179
|
-
*/
|
|
180
|
-
static remove(object: any, pointer: any): any;
|
|
181
|
-
/**
|
|
182
|
-
* 'has' function
|
|
183
|
-
*
|
|
184
|
-
* Tests if an object has a value at the location specified by a JSON Pointer
|
|
185
|
-
*
|
|
186
|
-
* // { object } object - object to chek for value
|
|
187
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
188
|
-
* // { boolean }
|
|
189
|
-
*/
|
|
190
|
-
static has(object: any, pointer: any): any;
|
|
191
|
-
/**
|
|
192
|
-
* 'dict' function
|
|
193
|
-
*
|
|
194
|
-
* Returns a (pointer -> value) dictionary for an object
|
|
195
|
-
*
|
|
196
|
-
* // { object } object - The object to create a dictionary from
|
|
197
|
-
* // { object } - The resulting dictionary object
|
|
198
|
-
*/
|
|
199
|
-
static dict(object: any): any;
|
|
200
|
-
/**
|
|
201
|
-
* 'forEachDeep' function
|
|
202
|
-
*
|
|
203
|
-
* Iterates over own enumerable properties of an object or items in an array
|
|
204
|
-
* and invokes an iteratee function for each key/value or index/value pair.
|
|
205
|
-
* By default, iterates over items within objects and arrays after calling
|
|
206
|
-
* the iteratee function on the containing object or array itself.
|
|
207
|
-
*
|
|
208
|
-
* The iteratee is invoked with three arguments: (value, pointer, rootObject),
|
|
209
|
-
* where pointer is a JSON pointer indicating the location of the current
|
|
210
|
-
* value within the root object, and rootObject is the root object initially
|
|
211
|
-
* submitted to th function.
|
|
212
|
-
*
|
|
213
|
-
* If a third optional parameter 'bottomUp' is set to TRUE, the iterator
|
|
214
|
-
* function will be called on sub-objects and arrays after being
|
|
215
|
-
* called on their contents, rather than before, which is the default.
|
|
216
|
-
*
|
|
217
|
-
* This function can also optionally be called directly on a sub-object by
|
|
218
|
-
* including optional 4th and 5th parameterss to specify the initial
|
|
219
|
-
* root object and pointer.
|
|
220
|
-
*
|
|
221
|
-
* // { object } object - the initial object or array
|
|
222
|
-
* // { (v: any, p?: string, o?: any) => any } function - iteratee function
|
|
223
|
-
* // { boolean = false } bottomUp - optional, set to TRUE to reverse direction
|
|
224
|
-
* // { object = object } rootObject - optional, root object or array
|
|
225
|
-
* // { string = '' } pointer - optional, JSON Pointer to object within rootObject
|
|
226
|
-
* // { object } - The modified object
|
|
227
|
-
*/
|
|
228
|
-
static forEachDeep(object: any, fn?: (v: any, p?: string, o?: any) => any, bottomUp?: boolean, pointer?: string, rootObject?: any): void;
|
|
229
|
-
/**
|
|
230
|
-
* 'forEachDeepCopy' function
|
|
231
|
-
*
|
|
232
|
-
* Similar to forEachDeep, but returns a copy of the original object, with
|
|
233
|
-
* the same keys and indexes, but with values replaced with the result of
|
|
234
|
-
* the iteratee function.
|
|
235
|
-
*
|
|
236
|
-
* // { object } object - the initial object or array
|
|
237
|
-
* // { (v: any, k?: string, o?: any, p?: any) => any } function - iteratee function
|
|
238
|
-
* // { boolean = false } bottomUp - optional, set to TRUE to reverse direction
|
|
239
|
-
* // { object = object } rootObject - optional, root object or array
|
|
240
|
-
* // { string = '' } pointer - optional, JSON Pointer to object within rootObject
|
|
241
|
-
* // { object } - The copied object
|
|
242
|
-
*/
|
|
243
|
-
static forEachDeepCopy(object: any, fn?: (v: any, p?: string, o?: any) => any, bottomUp?: boolean, pointer?: string, rootObject?: any): any;
|
|
244
|
-
/**
|
|
245
|
-
* 'escape' function
|
|
246
|
-
*
|
|
247
|
-
* Escapes a string reference key
|
|
248
|
-
*
|
|
249
|
-
* // { string } key - string key to escape
|
|
250
|
-
* // { string } - escaped key
|
|
251
|
-
*/
|
|
252
|
-
static escape(key: any): any;
|
|
253
|
-
/**
|
|
254
|
-
* 'unescape' function
|
|
255
|
-
*
|
|
256
|
-
* Unescapes a string reference key
|
|
257
|
-
*
|
|
258
|
-
* // { string } key - string key to unescape
|
|
259
|
-
* // { string } - unescaped key
|
|
260
|
-
*/
|
|
261
|
-
static unescape(key: any): any;
|
|
262
|
-
/**
|
|
263
|
-
* 'parse' function
|
|
264
|
-
*
|
|
265
|
-
* Converts a string JSON Pointer into a array of keys
|
|
266
|
-
* (if input is already an an array of keys, it is returned unchanged)
|
|
267
|
-
*
|
|
268
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
269
|
-
* // { boolean = false } errors - Show error if invalid pointer?
|
|
270
|
-
* // { string[] } - JSON Pointer array of keys
|
|
271
|
-
*/
|
|
272
|
-
static parse(pointer: any, errors?: boolean): any[];
|
|
273
|
-
/**
|
|
274
|
-
* 'compile' function
|
|
275
|
-
*
|
|
276
|
-
* Converts an array of keys into a JSON Pointer string
|
|
277
|
-
* (if input is already a string, it is normalized and returned)
|
|
278
|
-
*
|
|
279
|
-
* The optional second parameter is a default which will replace any empty keys.
|
|
280
|
-
*
|
|
281
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
282
|
-
* // { string | number = '' } defaultValue - Default value
|
|
283
|
-
* // { boolean = false } errors - Show error if invalid pointer?
|
|
284
|
-
* // { string } - JSON Pointer string
|
|
285
|
-
*/
|
|
286
|
-
static compile(pointer: any, defaultValue?: string, errors?: boolean): any;
|
|
287
|
-
/**
|
|
288
|
-
* 'toKey' function
|
|
289
|
-
*
|
|
290
|
-
* Extracts name of the final key from a JSON Pointer.
|
|
291
|
-
*
|
|
292
|
-
* // { Pointer } pointer - JSON Pointer (string or array)
|
|
293
|
-
* // { boolean = false } errors - Show error if invalid pointer?
|
|
294
|
-
* // { string } - the extracted key
|
|
295
|
-
*/
|
|
296
|
-
static toKey(pointer: any, errors?: boolean): any;
|
|
297
|
-
/**
|
|
298
|
-
* 'isJsonPointer' function
|
|
299
|
-
*
|
|
300
|
-
* Checks a string or array value to determine if it is a valid JSON Pointer.
|
|
301
|
-
* Returns true if a string is empty, or starts with '/' or '#/'.
|
|
302
|
-
* Returns true if an array contains only string values.
|
|
303
|
-
*
|
|
304
|
-
* // value - value to check
|
|
305
|
-
* // { boolean } - true if value is a valid JSON Pointer, otherwise false
|
|
306
|
-
*/
|
|
307
|
-
static isJsonPointer(value: any): any;
|
|
308
|
-
/**
|
|
309
|
-
* 'isSubPointer' function
|
|
310
|
-
*
|
|
311
|
-
* Checks whether one JSON Pointer is a subset of another.
|
|
312
|
-
*
|
|
313
|
-
* // { Pointer } shortPointer - potential subset JSON Pointer
|
|
314
|
-
* // { Pointer } longPointer - potential superset JSON Pointer
|
|
315
|
-
* // { boolean = false } trueIfMatching - return true if pointers match?
|
|
316
|
-
* // { boolean = false } errors - Show error if invalid pointer?
|
|
317
|
-
* // { boolean } - true if shortPointer is a subset of longPointer, false if not
|
|
318
|
-
*/
|
|
319
|
-
static isSubPointer(shortPointer: any, longPointer: any, trueIfMatching?: boolean, errors?: boolean): boolean;
|
|
320
|
-
/**
|
|
321
|
-
* 'toIndexedPointer' function
|
|
322
|
-
*
|
|
323
|
-
* Merges an array of numeric indexes and a generic pointer to create an
|
|
324
|
-
* indexed pointer for a specific item.
|
|
325
|
-
*
|
|
326
|
-
* For example, merging the generic pointer '/foo/-/bar/-/baz' and
|
|
327
|
-
* the array [4, 2] would result in the indexed pointer '/foo/4/bar/2/baz'
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
* // { Pointer } genericPointer - The generic pointer
|
|
331
|
-
* // { number[] } indexArray - The array of numeric indexes
|
|
332
|
-
* // { Map<string, number> } arrayMap - An optional array map
|
|
333
|
-
* // { string } - The merged pointer with indexes
|
|
334
|
-
*/
|
|
335
|
-
static toIndexedPointer(genericPointer: any, indexArray: any, arrayMap?: Map<string, number>): any;
|
|
336
|
-
/**
|
|
337
|
-
* 'toGenericPointer' function
|
|
338
|
-
*
|
|
339
|
-
* Compares an indexed pointer to an array map and removes list array
|
|
340
|
-
* indexes (but leaves tuple arrray indexes and all object keys, including
|
|
341
|
-
* numeric keys) to create a generic pointer.
|
|
342
|
-
*
|
|
343
|
-
* For example, using the indexed pointer '/foo/1/bar/2/baz/3' and
|
|
344
|
-
* the arrayMap [['/foo', 0], ['/foo/-/bar', 3], ['/foo/-/bar/-/baz', 0]]
|
|
345
|
-
* would result in the generic pointer '/foo/-/bar/2/baz/-'
|
|
346
|
-
* Using the indexed pointer '/foo/1/bar/4/baz/3' and the same arrayMap
|
|
347
|
-
* would result in the generic pointer '/foo/-/bar/-/baz/-'
|
|
348
|
-
* (the bar array has 3 tuple items, so index 2 is retained, but 4 is removed)
|
|
349
|
-
*
|
|
350
|
-
* The structure of the arrayMap is: [['path to array', number of tuple items]...]
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* // { Pointer } indexedPointer - The indexed pointer (array or string)
|
|
354
|
-
* // { Map<string, number> } arrayMap - The optional array map (for preserving tuple indexes)
|
|
355
|
-
* // { string } - The generic pointer with indexes removed
|
|
356
|
-
*/
|
|
357
|
-
static toGenericPointer(indexedPointer: any, arrayMap?: Map<string, number>): any;
|
|
358
|
-
/**
|
|
359
|
-
* 'toControlPointer' function
|
|
360
|
-
*
|
|
361
|
-
* Accepts a JSON Pointer for a data object and returns a JSON Pointer for the
|
|
362
|
-
* matching control in an Angular FormGroup.
|
|
363
|
-
*
|
|
364
|
-
* // { Pointer } dataPointer - JSON Pointer (string or array) to a data object
|
|
365
|
-
* // { FormGroup } formGroup - Angular FormGroup to get value from
|
|
366
|
-
* // { boolean = false } controlMustExist - Only return if control exists?
|
|
367
|
-
* // { Pointer } - JSON Pointer (string) to the formGroup object
|
|
368
|
-
*/
|
|
369
|
-
static toControlPointer(dataPointer: any, formGroup: any, controlMustExist?: boolean): any;
|
|
370
|
-
/**
|
|
371
|
-
* 'toSchemaPointer' function
|
|
372
|
-
*
|
|
373
|
-
* Accepts a JSON Pointer to a value inside a data object and a JSON schema
|
|
374
|
-
* for that object.
|
|
375
|
-
*
|
|
376
|
-
* Returns a Pointer to the sub-schema for the value inside the object's schema.
|
|
377
|
-
*
|
|
378
|
-
* // { Pointer } dataPointer - JSON Pointer (string or array) to an object
|
|
379
|
-
* // schema - JSON schema for the object
|
|
380
|
-
* // { Pointer } - JSON Pointer (string) to the object's schema
|
|
381
|
-
*/
|
|
382
|
-
static toSchemaPointer(dataPointer: any, schema: any): any;
|
|
383
|
-
/**
|
|
384
|
-
* 'toDataPointer' function
|
|
385
|
-
*
|
|
386
|
-
* Accepts a JSON Pointer to a sub-schema inside a JSON schema and the schema.
|
|
387
|
-
*
|
|
388
|
-
* If possible, returns a generic Pointer to the corresponding value inside
|
|
389
|
-
* the data object described by the JSON schema.
|
|
390
|
-
*
|
|
391
|
-
* Returns null if the sub-schema is in an ambiguous location (such as
|
|
392
|
-
* definitions or additionalProperties) where the corresponding value
|
|
393
|
-
* location cannot be determined.
|
|
394
|
-
*
|
|
395
|
-
* // { Pointer } schemaPointer - JSON Pointer (string or array) to a JSON schema
|
|
396
|
-
* // schema - the JSON schema
|
|
397
|
-
* // { boolean = false } errors - Show errors?
|
|
398
|
-
* // { Pointer } - JSON Pointer (string) to the value in the data object
|
|
399
|
-
*/
|
|
400
|
-
static toDataPointer(schemaPointer: any, schema: any, errors?: boolean): any;
|
|
401
|
-
/**
|
|
402
|
-
* 'parseObjectPath' function
|
|
403
|
-
*
|
|
404
|
-
* Parses a JavaScript object path into an array of keys, which
|
|
405
|
-
* can then be passed to compile() to convert into a string JSON Pointer.
|
|
406
|
-
*
|
|
407
|
-
* Based on mike-marcacci's excellent objectpath parse function:
|
|
408
|
-
* https://github.com/mike-marcacci/objectpath
|
|
409
|
-
*
|
|
410
|
-
* // { Pointer } path - The object path to parse
|
|
411
|
-
* // { string[] } - The resulting array of keys
|
|
412
|
-
*/
|
|
413
|
-
static parseObjectPath(path: any): any[];
|
|
414
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<JsonPointer, never>;
|
|
415
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<JsonPointer>;
|
|
416
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { TitleMapItem } from '../json-schema-form.service';
|
|
2
|
-
/**
|
|
3
|
-
* Layout function library:
|
|
4
|
-
*
|
|
5
|
-
* buildLayout: Builds a complete layout from an input layout and schema
|
|
6
|
-
*
|
|
7
|
-
* buildLayoutFromSchema: Builds a complete layout entirely from an input schema
|
|
8
|
-
*
|
|
9
|
-
* mapLayout:
|
|
10
|
-
*
|
|
11
|
-
* getLayoutNode:
|
|
12
|
-
*
|
|
13
|
-
* buildTitleMap:
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* 'buildLayout' function
|
|
17
|
-
*
|
|
18
|
-
* // jsf
|
|
19
|
-
* // widgetLibrary
|
|
20
|
-
* //
|
|
21
|
-
*/
|
|
22
|
-
export declare function buildLayout_original(jsf: any, widgetLibrary: any): any[];
|
|
23
|
-
export declare function buildLayout(jsf: any, widgetLibrary: any): any[];
|
|
24
|
-
/**
|
|
25
|
-
* 'buildLayoutFromSchema' function
|
|
26
|
-
*
|
|
27
|
-
* // jsf -
|
|
28
|
-
* // widgetLibrary -
|
|
29
|
-
* // nodeValue -
|
|
30
|
-
* // { string = '' } schemaPointer -
|
|
31
|
-
* // { string = '' } dataPointer -
|
|
32
|
-
* // { boolean = false } arrayItem -
|
|
33
|
-
* // { string = null } arrayItemType -
|
|
34
|
-
* // { boolean = null } removable -
|
|
35
|
-
* // { boolean = false } forRefLibrary -
|
|
36
|
-
* // { string = '' } dataPointerPrefix -
|
|
37
|
-
* //
|
|
38
|
-
*/
|
|
39
|
-
export declare function buildLayoutFromSchema(jsf: any, widgetLibrary: any, nodeValue?: any, schemaPointer?: string, dataPointer?: string, arrayItem?: boolean, arrayItemType?: string, removable?: boolean, forRefLibrary?: boolean, dataPointerPrefix?: string, jsonSchema?: any): any;
|
|
40
|
-
/**
|
|
41
|
-
* 'mapLayout' function
|
|
42
|
-
*
|
|
43
|
-
* Creates a new layout by running each element in an existing layout through
|
|
44
|
-
* an iteratee. Recursively maps within array elements 'items' and 'tabs'.
|
|
45
|
-
* The iteratee is invoked with four arguments: (value, index, layout, path)
|
|
46
|
-
*
|
|
47
|
-
* The returned layout may be longer (or shorter) then the source layout.
|
|
48
|
-
*
|
|
49
|
-
* If an item from the source layout returns multiple items (as '*' usually will),
|
|
50
|
-
* this function will keep all returned items in-line with the surrounding items.
|
|
51
|
-
*
|
|
52
|
-
* If an item from the source layout causes an error and returns null, it is
|
|
53
|
-
* skipped without error, and the function will still return all non-null items.
|
|
54
|
-
*
|
|
55
|
-
* // layout - the layout to map
|
|
56
|
-
* // { (v: any, i?: number, l?: any, p?: string) => any }
|
|
57
|
-
* function - the funciton to invoke on each element
|
|
58
|
-
* // { string|string[] = '' } layoutPointer - the layoutPointer to layout, inside rootLayout
|
|
59
|
-
* // { any[] = layout } rootLayout - the root layout, which conatins layout
|
|
60
|
-
* //
|
|
61
|
-
*/
|
|
62
|
-
export declare function mapLayout(layout: any, fn: any, layoutPointer?: string, rootLayout?: any): any[];
|
|
63
|
-
/**
|
|
64
|
-
* 'getLayoutNode' function
|
|
65
|
-
* Copy a new layoutNode from layoutRefLibrary
|
|
66
|
-
*
|
|
67
|
-
* // refNode -
|
|
68
|
-
* // layoutRefLibrary -
|
|
69
|
-
* // { any = null } widgetLibrary -
|
|
70
|
-
* // { any = null } nodeValue -
|
|
71
|
-
* // copied layoutNode
|
|
72
|
-
*/
|
|
73
|
-
export declare function getLayoutNode(refNode: any, jsf: any, widgetLibrary?: any, nodeValue?: any): any;
|
|
74
|
-
/**
|
|
75
|
-
* 'buildTitleMap' function
|
|
76
|
-
*
|
|
77
|
-
* // titleMap -
|
|
78
|
-
* // enumList -
|
|
79
|
-
* // { boolean = true } fieldRequired -
|
|
80
|
-
* // { boolean = true } flatList -
|
|
81
|
-
* // { TitleMapItem[] }
|
|
82
|
-
*/
|
|
83
|
-
export declare function buildTitleMap(titleMap: any, enumList: any, fieldRequired?: boolean, flatList?: boolean): TitleMapItem[];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 'mergeSchemas' function
|
|
3
|
-
*
|
|
4
|
-
* Merges multiple JSON schemas into a single schema with combined rules.
|
|
5
|
-
*
|
|
6
|
-
* If able to logically merge properties from all schemas,
|
|
7
|
-
* returns a single schema object containing all merged properties.
|
|
8
|
-
*
|
|
9
|
-
* Example: ({ a: b, max: 1 }, { c: d, max: 2 }) => { a: b, c: d, max: 1 }
|
|
10
|
-
*
|
|
11
|
-
* If unable to logically merge, returns an allOf schema object containing
|
|
12
|
-
* an array of the original schemas;
|
|
13
|
-
*
|
|
14
|
-
* Example: ({ a: b }, { a: d }) => { allOf: [ { a: b }, { a: d } ] }
|
|
15
|
-
*
|
|
16
|
-
* // schemas - one or more input schemas
|
|
17
|
-
* // - merged schema
|
|
18
|
-
*/
|
|
19
|
-
export declare function mergeSchemas(...schemas: any[]): any;
|