@formio/js 5.0.0-rc.13 → 5.0.0-rc.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/package.json +1 -2
- package/lib/cjs/polyfills/ElementPolyfill.d.ts +0 -0
- package/lib/cjs/polyfills/ElementPolyfill.js +0 -338
- package/lib/cjs/polyfills/index.d.ts +0 -1
- package/lib/cjs/polyfills/index.js +0 -4
- package/lib/mjs/polyfills/ElementPolyfill.d.ts +0 -0
- package/lib/mjs/polyfills/ElementPolyfill.js +0 -338
- package/lib/mjs/polyfills/index.d.ts +0 -1
- package/lib/mjs/polyfills/index.js +0 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.14",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"module": "lib/mjs/index.js",
|
@@ -84,7 +84,6 @@
|
|
84
84
|
"browser-md5-file": "^1.1.1",
|
85
85
|
"compare-versions": "^6.0.0-rc.1",
|
86
86
|
"core-js": "^3.30.2",
|
87
|
-
"custom-event-polyfill": "^1.0.7",
|
88
87
|
"dialog-polyfill": "^0.5.6",
|
89
88
|
"dom-autoscroller": "^2.3.4",
|
90
89
|
"dompurify": "^3.0.3",
|
File without changes
|
@@ -1,338 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// Using polyfill from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
|
3
|
-
/* eslint-disable */
|
4
|
-
if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
|
5
|
-
if (!Element.prototype.matches) {
|
6
|
-
Element.prototype.matches = Element.prototype.msMatchesSelector ||
|
7
|
-
Element.prototype.webkitMatchesSelector;
|
8
|
-
}
|
9
|
-
if (!Element.prototype.closest) {
|
10
|
-
Element.prototype.closest = function (s) {
|
11
|
-
var el = this;
|
12
|
-
do {
|
13
|
-
if (el.matches(s))
|
14
|
-
return el;
|
15
|
-
el = el.parentElement || el.parentNode;
|
16
|
-
} while (el !== null && el.nodeType === 1);
|
17
|
-
return null;
|
18
|
-
};
|
19
|
-
}
|
20
|
-
}
|
21
|
-
// Generated by https://polyfill.io/v3/
|
22
|
-
/* Polyfill service v3.52.1
|
23
|
-
* For detailed credits and licence information see https://github.com/financial-times/polyfill-service.
|
24
|
-
*
|
25
|
-
* Features requested: DOMTokenList
|
26
|
-
*
|
27
|
-
* - Object.defineProperty, License: CC0 (required by "_DOMTokenList", "DOMTokenList")
|
28
|
-
* - _DOMTokenList, License: ISC (required by "DOMTokenList")
|
29
|
-
* - DOMTokenList, License: CC0 */
|
30
|
-
(function (self, undefined) {
|
31
|
-
// Don't try to do polyfills outside of browser context.
|
32
|
-
if (typeof document === 'undefined') {
|
33
|
-
return;
|
34
|
-
}
|
35
|
-
if (!("defineProperty" in Object && function () {
|
36
|
-
try {
|
37
|
-
var e = {};
|
38
|
-
return Object.defineProperty(e, "test", { value: 42 }), !0;
|
39
|
-
}
|
40
|
-
catch (t) {
|
41
|
-
return !1;
|
42
|
-
}
|
43
|
-
}())) {
|
44
|
-
// Object.defineProperty
|
45
|
-
(function (nativeDefineProperty) {
|
46
|
-
var supportsAccessors = Object.prototype.hasOwnProperty.call(Object.prototype, '__defineGetter__');
|
47
|
-
var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
|
48
|
-
var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
|
49
|
-
// Polyfill.io - This does not use CreateMethodProperty because our CreateMethodProperty function uses Object.defineProperty.
|
50
|
-
Object.defineProperty = function defineProperty(object, property, descriptor) {
|
51
|
-
// Where native support exists, assume it
|
52
|
-
if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
|
53
|
-
return nativeDefineProperty(object, property, descriptor);
|
54
|
-
}
|
55
|
-
if (object === null || !(object instanceof Object || typeof object === 'object')) {
|
56
|
-
throw new TypeError('Object.defineProperty called on non-object');
|
57
|
-
}
|
58
|
-
if (!(descriptor instanceof Object)) {
|
59
|
-
throw new TypeError('Property description must be an object');
|
60
|
-
}
|
61
|
-
var propertyString = String(property);
|
62
|
-
var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
|
63
|
-
var getterType = 'get' in descriptor && typeof descriptor.get;
|
64
|
-
var setterType = 'set' in descriptor && typeof descriptor.set;
|
65
|
-
// handle descriptor.get
|
66
|
-
if (getterType) {
|
67
|
-
if (getterType !== 'function') {
|
68
|
-
throw new TypeError('Getter must be a function');
|
69
|
-
}
|
70
|
-
if (!supportsAccessors) {
|
71
|
-
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
|
72
|
-
}
|
73
|
-
if (hasValueOrWritable) {
|
74
|
-
throw new TypeError(ERR_VALUE_ACCESSORS);
|
75
|
-
}
|
76
|
-
Object.__defineGetter__.call(object, propertyString, descriptor.get);
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
object[propertyString] = descriptor.value;
|
80
|
-
}
|
81
|
-
// handle descriptor.set
|
82
|
-
if (setterType) {
|
83
|
-
if (setterType !== 'function') {
|
84
|
-
throw new TypeError('Setter must be a function');
|
85
|
-
}
|
86
|
-
if (!supportsAccessors) {
|
87
|
-
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
|
88
|
-
}
|
89
|
-
if (hasValueOrWritable) {
|
90
|
-
throw new TypeError(ERR_VALUE_ACCESSORS);
|
91
|
-
}
|
92
|
-
Object.__defineSetter__.call(object, propertyString, descriptor.set);
|
93
|
-
}
|
94
|
-
// OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
|
95
|
-
if ('value' in descriptor) {
|
96
|
-
object[propertyString] = descriptor.value;
|
97
|
-
}
|
98
|
-
return object;
|
99
|
-
};
|
100
|
-
}(Object.defineProperty));
|
101
|
-
}
|
102
|
-
// _DOMTokenList
|
103
|
-
/*
|
104
|
-
Copyright (c) 2016, John Gardner
|
105
|
-
|
106
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
107
|
-
|
108
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
109
|
-
*/
|
110
|
-
var _DOMTokenList = (function () {
|
111
|
-
var dpSupport = true;
|
112
|
-
var defineGetter = function (object, name, fn, configurable) {
|
113
|
-
if (Object.defineProperty)
|
114
|
-
Object.defineProperty(object, name, {
|
115
|
-
configurable: false === dpSupport ? true : !!configurable,
|
116
|
-
get: fn
|
117
|
-
});
|
118
|
-
else
|
119
|
-
object.__defineGetter__(name, fn);
|
120
|
-
};
|
121
|
-
/** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */
|
122
|
-
try {
|
123
|
-
defineGetter({}, "support");
|
124
|
-
}
|
125
|
-
catch (e) {
|
126
|
-
dpSupport = false;
|
127
|
-
}
|
128
|
-
var _DOMTokenList = function (el, prop) {
|
129
|
-
var that = this;
|
130
|
-
var tokens = [];
|
131
|
-
var tokenMap = {};
|
132
|
-
var length = 0;
|
133
|
-
var maxLength = 0;
|
134
|
-
var addIndexGetter = function (i) {
|
135
|
-
defineGetter(that, i, function () {
|
136
|
-
preop();
|
137
|
-
return tokens[i];
|
138
|
-
}, false);
|
139
|
-
};
|
140
|
-
var reindex = function () {
|
141
|
-
/** Define getter functions for array-like access to the tokenList's contents. */
|
142
|
-
if (length >= maxLength)
|
143
|
-
for (; maxLength < length; ++maxLength) {
|
144
|
-
addIndexGetter(maxLength);
|
145
|
-
}
|
146
|
-
};
|
147
|
-
/** Helper function called at the start of each class method. Internal use only. */
|
148
|
-
var preop = function () {
|
149
|
-
var error;
|
150
|
-
var i;
|
151
|
-
var args = arguments;
|
152
|
-
var rSpace = /\s+/;
|
153
|
-
/** Validate the token/s passed to an instance method, if any. */
|
154
|
-
if (args.length)
|
155
|
-
for (i = 0; i < args.length; ++i)
|
156
|
-
if (rSpace.test(args[i])) {
|
157
|
-
error = new SyntaxError('String "' + args[i] + '" ' + "contains" + ' an invalid character');
|
158
|
-
error.code = 5;
|
159
|
-
error.name = "InvalidCharacterError";
|
160
|
-
throw error;
|
161
|
-
}
|
162
|
-
/** Split the new value apart by whitespace*/
|
163
|
-
if (typeof el[prop] === "object") {
|
164
|
-
tokens = ("" + el[prop].baseVal).replace(/^\s+|\s+$/g, "").split(rSpace);
|
165
|
-
}
|
166
|
-
else {
|
167
|
-
tokens = ("" + el[prop]).replace(/^\s+|\s+$/g, "").split(rSpace);
|
168
|
-
}
|
169
|
-
/** Avoid treating blank strings as single-item token lists */
|
170
|
-
if ("" === tokens[0])
|
171
|
-
tokens = [];
|
172
|
-
/** Repopulate the internal token lists */
|
173
|
-
tokenMap = {};
|
174
|
-
for (i = 0; i < tokens.length; ++i)
|
175
|
-
tokenMap[tokens[i]] = true;
|
176
|
-
length = tokens.length;
|
177
|
-
reindex();
|
178
|
-
};
|
179
|
-
/** Populate our internal token list if the targeted attribute of the subject element isn't empty. */
|
180
|
-
preop();
|
181
|
-
/** Return the number of tokens in the underlying string. Read-only. */
|
182
|
-
defineGetter(that, "length", function () {
|
183
|
-
preop();
|
184
|
-
return length;
|
185
|
-
});
|
186
|
-
/** Override the default toString/toLocaleString methods to return a space-delimited list of tokens when typecast. */
|
187
|
-
that.toLocaleString =
|
188
|
-
that.toString = function () {
|
189
|
-
preop();
|
190
|
-
return tokens.join(" ");
|
191
|
-
};
|
192
|
-
that.item = function (idx) {
|
193
|
-
preop();
|
194
|
-
return tokens[idx];
|
195
|
-
};
|
196
|
-
that.contains = function (token) {
|
197
|
-
preop();
|
198
|
-
return !!tokenMap[token];
|
199
|
-
};
|
200
|
-
that.add = function () {
|
201
|
-
preop.apply(that, args = arguments);
|
202
|
-
for (var args, token, i = 0, l = args.length; i < l; ++i) {
|
203
|
-
token = args[i];
|
204
|
-
if (!tokenMap[token]) {
|
205
|
-
tokens.push(token);
|
206
|
-
tokenMap[token] = true;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
/** Update the targeted attribute of the attached element if the token list's changed. */
|
210
|
-
if (length !== tokens.length) {
|
211
|
-
length = tokens.length >>> 0;
|
212
|
-
if (typeof el[prop] === "object") {
|
213
|
-
el[prop].baseVal = tokens.join(" ");
|
214
|
-
}
|
215
|
-
else {
|
216
|
-
el[prop] = tokens.join(" ");
|
217
|
-
}
|
218
|
-
reindex();
|
219
|
-
}
|
220
|
-
};
|
221
|
-
that.remove = function () {
|
222
|
-
preop.apply(that, args = arguments);
|
223
|
-
/** Build a hash of token names to compare against when recollecting our token list. */
|
224
|
-
for (var args, ignore = {}, i = 0, t = []; i < args.length; ++i) {
|
225
|
-
ignore[args[i]] = true;
|
226
|
-
delete tokenMap[args[i]];
|
227
|
-
}
|
228
|
-
/** Run through our tokens list and reassign only those that aren't defined in the hash declared above. */
|
229
|
-
for (i = 0; i < tokens.length; ++i)
|
230
|
-
if (!ignore[tokens[i]])
|
231
|
-
t.push(tokens[i]);
|
232
|
-
tokens = t;
|
233
|
-
length = t.length >>> 0;
|
234
|
-
/** Update the targeted attribute of the attached element. */
|
235
|
-
if (typeof el[prop] === "object") {
|
236
|
-
el[prop].baseVal = tokens.join(" ");
|
237
|
-
}
|
238
|
-
else {
|
239
|
-
el[prop] = tokens.join(" ");
|
240
|
-
}
|
241
|
-
reindex();
|
242
|
-
};
|
243
|
-
that.toggle = function (token, force) {
|
244
|
-
preop.apply(that, [token]);
|
245
|
-
/** Token state's being forced. */
|
246
|
-
if (undefined !== force) {
|
247
|
-
if (force) {
|
248
|
-
that.add(token);
|
249
|
-
return true;
|
250
|
-
}
|
251
|
-
else {
|
252
|
-
that.remove(token);
|
253
|
-
return false;
|
254
|
-
}
|
255
|
-
}
|
256
|
-
/** Token already exists in tokenList. Remove it, and return FALSE. */
|
257
|
-
if (tokenMap[token]) {
|
258
|
-
that.remove(token);
|
259
|
-
return false;
|
260
|
-
}
|
261
|
-
/** Otherwise, add the token and return TRUE. */
|
262
|
-
that.add(token);
|
263
|
-
return true;
|
264
|
-
};
|
265
|
-
return that;
|
266
|
-
};
|
267
|
-
return _DOMTokenList;
|
268
|
-
}());
|
269
|
-
if (!("DOMTokenList" in self && function (e) { return !("classList" in e) || !e.classList.toggle("x", !1) && !e.className; }(document.createElement("x")))) {
|
270
|
-
// DOMTokenList
|
271
|
-
/* global _DOMTokenList */
|
272
|
-
(function (global) {
|
273
|
-
var nativeImpl = "DOMTokenList" in global && global.DOMTokenList;
|
274
|
-
if (!nativeImpl ||
|
275
|
-
(!!document.createElementNS &&
|
276
|
-
!!document.createElementNS('http://www.w3.org/2000/svg', 'svg') &&
|
277
|
-
!(document.createElementNS("http://www.w3.org/2000/svg", "svg").classList instanceof DOMTokenList))) {
|
278
|
-
global.DOMTokenList = _DOMTokenList;
|
279
|
-
}
|
280
|
-
// Add second argument to native DOMTokenList.toggle() if necessary
|
281
|
-
(function () {
|
282
|
-
var e = document.createElement('span');
|
283
|
-
if (!('classList' in e))
|
284
|
-
return;
|
285
|
-
e.classList.toggle('x', false);
|
286
|
-
if (!e.classList.contains('x'))
|
287
|
-
return;
|
288
|
-
e.classList.constructor.prototype.toggle = function toggle(token /*, force*/) {
|
289
|
-
var force = arguments[1];
|
290
|
-
if (force === undefined) {
|
291
|
-
var add = !this.contains(token);
|
292
|
-
this[add ? 'add' : 'remove'](token);
|
293
|
-
return add;
|
294
|
-
}
|
295
|
-
force = !!force;
|
296
|
-
this[force ? 'add' : 'remove'](token);
|
297
|
-
return force;
|
298
|
-
};
|
299
|
-
}());
|
300
|
-
// Add multiple arguments to native DOMTokenList.add() if necessary
|
301
|
-
(function () {
|
302
|
-
var e = document.createElement('span');
|
303
|
-
if (!('classList' in e))
|
304
|
-
return;
|
305
|
-
e.classList.add('a', 'b');
|
306
|
-
if (e.classList.contains('b'))
|
307
|
-
return;
|
308
|
-
var native = e.classList.constructor.prototype.add;
|
309
|
-
e.classList.constructor.prototype.add = function () {
|
310
|
-
var args = arguments;
|
311
|
-
var l = arguments.length;
|
312
|
-
for (var i = 0; i < l; i++) {
|
313
|
-
native.call(this, args[i]);
|
314
|
-
}
|
315
|
-
};
|
316
|
-
}());
|
317
|
-
// Add multiple arguments to native DOMTokenList.remove() if necessary
|
318
|
-
(function () {
|
319
|
-
var e = document.createElement('span');
|
320
|
-
if (!('classList' in e))
|
321
|
-
return;
|
322
|
-
e.classList.add('a');
|
323
|
-
e.classList.add('b');
|
324
|
-
e.classList.remove('a', 'b');
|
325
|
-
if (!e.classList.contains('b'))
|
326
|
-
return;
|
327
|
-
var native = e.classList.constructor.prototype.remove;
|
328
|
-
e.classList.constructor.prototype.remove = function () {
|
329
|
-
var args = arguments;
|
330
|
-
var l = arguments.length;
|
331
|
-
for (var i = 0; i < l; i++) {
|
332
|
-
native.call(this, args[i]);
|
333
|
-
}
|
334
|
-
};
|
335
|
-
}());
|
336
|
-
}(self));
|
337
|
-
}
|
338
|
-
})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
File without changes
|