@norges-domstoler/dds-components 10.1.0 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rollupPluginBabelHelpers.js +292 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1629 -588
- package/dist/components/DescriptionList/DescriptionList.js +1 -1
- package/dist/components/FileUploader/ErrorList.js +28 -0
- package/dist/components/FileUploader/File.js +69 -0
- package/dist/components/FileUploader/FileUploader.js +153 -0
- package/dist/components/FileUploader/FileUploader.tokens.js +31 -0
- package/dist/components/FileUploader/fileUploaderReducer.js +35 -0
- package/dist/components/FileUploader/useFileUploader.js +202 -0
- package/dist/components/FileUploader/utils.js +32 -0
- package/dist/components/FormGenerator/FormGenerator.js +239 -0
- package/dist/components/FormGenerator/FormGenerator.styles.js +39 -0
- package/dist/components/FormGenerator/FormGenerator.tokens.js +21 -0
- package/dist/components/Search/SearchSuggestions.js +1 -1
- package/dist/components/SkipToContent/SkipToContent.js +1 -1
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/hooks/useScreenSize.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
|
@@ -1,3 +1,294 @@
|
|
|
1
|
+
function _regeneratorRuntime() {
|
|
2
|
+
_regeneratorRuntime = function () {
|
|
3
|
+
return exports;
|
|
4
|
+
};
|
|
5
|
+
var exports = {},
|
|
6
|
+
Op = Object.prototype,
|
|
7
|
+
hasOwn = Op.hasOwnProperty,
|
|
8
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
9
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
10
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
11
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
12
|
+
function define(obj, key, value) {
|
|
13
|
+
return Object.defineProperty(obj, key, {
|
|
14
|
+
value: value,
|
|
15
|
+
enumerable: !0,
|
|
16
|
+
configurable: !0,
|
|
17
|
+
writable: !0
|
|
18
|
+
}), obj[key];
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
define({}, "");
|
|
22
|
+
} catch (err) {
|
|
23
|
+
define = function (obj, key, value) {
|
|
24
|
+
return obj[key] = value;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
28
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
29
|
+
generator = Object.create(protoGenerator.prototype),
|
|
30
|
+
context = new Context(tryLocsList || []);
|
|
31
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
32
|
+
var state = "suspendedStart";
|
|
33
|
+
return function (method, arg) {
|
|
34
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
35
|
+
if ("completed" === state) {
|
|
36
|
+
if ("throw" === method) throw arg;
|
|
37
|
+
return doneResult();
|
|
38
|
+
}
|
|
39
|
+
for (context.method = method, context.arg = arg;;) {
|
|
40
|
+
var delegate = context.delegate;
|
|
41
|
+
if (delegate) {
|
|
42
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
43
|
+
if (delegateResult) {
|
|
44
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
45
|
+
return delegateResult;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
49
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
50
|
+
context.dispatchException(context.arg);
|
|
51
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
52
|
+
state = "executing";
|
|
53
|
+
var record = tryCatch(innerFn, self, context);
|
|
54
|
+
if ("normal" === record.type) {
|
|
55
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
56
|
+
return {
|
|
57
|
+
value: record.arg,
|
|
58
|
+
done: context.done
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}(innerFn, self, context), generator;
|
|
65
|
+
}
|
|
66
|
+
function tryCatch(fn, obj, arg) {
|
|
67
|
+
try {
|
|
68
|
+
return {
|
|
69
|
+
type: "normal",
|
|
70
|
+
arg: fn.call(obj, arg)
|
|
71
|
+
};
|
|
72
|
+
} catch (err) {
|
|
73
|
+
return {
|
|
74
|
+
type: "throw",
|
|
75
|
+
arg: err
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.wrap = wrap;
|
|
80
|
+
var ContinueSentinel = {};
|
|
81
|
+
function Generator() {}
|
|
82
|
+
function GeneratorFunction() {}
|
|
83
|
+
function GeneratorFunctionPrototype() {}
|
|
84
|
+
var IteratorPrototype = {};
|
|
85
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
86
|
+
return this;
|
|
87
|
+
});
|
|
88
|
+
var getProto = Object.getPrototypeOf,
|
|
89
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
90
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
91
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
92
|
+
function defineIteratorMethods(prototype) {
|
|
93
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
94
|
+
define(prototype, method, function (arg) {
|
|
95
|
+
return this._invoke(method, arg);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
100
|
+
function invoke(method, arg, resolve, reject) {
|
|
101
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
102
|
+
if ("throw" !== record.type) {
|
|
103
|
+
var result = record.arg,
|
|
104
|
+
value = result.value;
|
|
105
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
106
|
+
invoke("next", value, resolve, reject);
|
|
107
|
+
}, function (err) {
|
|
108
|
+
invoke("throw", err, resolve, reject);
|
|
109
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
110
|
+
result.value = unwrapped, resolve(result);
|
|
111
|
+
}, function (error) {
|
|
112
|
+
return invoke("throw", error, resolve, reject);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
reject(record.arg);
|
|
116
|
+
}
|
|
117
|
+
var previousPromise;
|
|
118
|
+
this._invoke = function (method, arg) {
|
|
119
|
+
function callInvokeWithMethodAndArg() {
|
|
120
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
121
|
+
invoke(method, arg, resolve, reject);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
128
|
+
var method = delegate.iterator[context.method];
|
|
129
|
+
if (undefined === method) {
|
|
130
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
131
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
132
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
133
|
+
}
|
|
134
|
+
return ContinueSentinel;
|
|
135
|
+
}
|
|
136
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
137
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
138
|
+
var info = record.arg;
|
|
139
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
140
|
+
}
|
|
141
|
+
function pushTryEntry(locs) {
|
|
142
|
+
var entry = {
|
|
143
|
+
tryLoc: locs[0]
|
|
144
|
+
};
|
|
145
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
146
|
+
}
|
|
147
|
+
function resetTryEntry(entry) {
|
|
148
|
+
var record = entry.completion || {};
|
|
149
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
150
|
+
}
|
|
151
|
+
function Context(tryLocsList) {
|
|
152
|
+
this.tryEntries = [{
|
|
153
|
+
tryLoc: "root"
|
|
154
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
155
|
+
}
|
|
156
|
+
function values(iterable) {
|
|
157
|
+
if (iterable) {
|
|
158
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
159
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
160
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
161
|
+
if (!isNaN(iterable.length)) {
|
|
162
|
+
var i = -1,
|
|
163
|
+
next = function next() {
|
|
164
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
165
|
+
return next.value = undefined, next.done = !0, next;
|
|
166
|
+
};
|
|
167
|
+
return next.next = next;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
next: doneResult
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function doneResult() {
|
|
175
|
+
return {
|
|
176
|
+
value: undefined,
|
|
177
|
+
done: !0
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
181
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
182
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
183
|
+
}, exports.mark = function (genFun) {
|
|
184
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
185
|
+
}, exports.awrap = function (arg) {
|
|
186
|
+
return {
|
|
187
|
+
__await: arg
|
|
188
|
+
};
|
|
189
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
190
|
+
return this;
|
|
191
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
192
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
193
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
194
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
195
|
+
return result.done ? result.value : iter.next();
|
|
196
|
+
});
|
|
197
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
198
|
+
return this;
|
|
199
|
+
}), define(Gp, "toString", function () {
|
|
200
|
+
return "[object Generator]";
|
|
201
|
+
}), exports.keys = function (object) {
|
|
202
|
+
var keys = [];
|
|
203
|
+
for (var key in object) keys.push(key);
|
|
204
|
+
return keys.reverse(), function next() {
|
|
205
|
+
for (; keys.length;) {
|
|
206
|
+
var key = keys.pop();
|
|
207
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
208
|
+
}
|
|
209
|
+
return next.done = !0, next;
|
|
210
|
+
};
|
|
211
|
+
}, exports.values = values, Context.prototype = {
|
|
212
|
+
constructor: Context,
|
|
213
|
+
reset: function (skipTempReset) {
|
|
214
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
215
|
+
},
|
|
216
|
+
stop: function () {
|
|
217
|
+
this.done = !0;
|
|
218
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
219
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
220
|
+
return this.rval;
|
|
221
|
+
},
|
|
222
|
+
dispatchException: function (exception) {
|
|
223
|
+
if (this.done) throw exception;
|
|
224
|
+
var context = this;
|
|
225
|
+
function handle(loc, caught) {
|
|
226
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
227
|
+
}
|
|
228
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
229
|
+
var entry = this.tryEntries[i],
|
|
230
|
+
record = entry.completion;
|
|
231
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
232
|
+
if (entry.tryLoc <= this.prev) {
|
|
233
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
234
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
235
|
+
if (hasCatch && hasFinally) {
|
|
236
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
237
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
238
|
+
} else if (hasCatch) {
|
|
239
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
240
|
+
} else {
|
|
241
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
242
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
abrupt: function (type, arg) {
|
|
248
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
249
|
+
var entry = this.tryEntries[i];
|
|
250
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
251
|
+
var finallyEntry = entry;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
256
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
257
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
258
|
+
},
|
|
259
|
+
complete: function (record, afterLoc) {
|
|
260
|
+
if ("throw" === record.type) throw record.arg;
|
|
261
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
262
|
+
},
|
|
263
|
+
finish: function (finallyLoc) {
|
|
264
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
265
|
+
var entry = this.tryEntries[i];
|
|
266
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
catch: function (tryLoc) {
|
|
270
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
271
|
+
var entry = this.tryEntries[i];
|
|
272
|
+
if (entry.tryLoc === tryLoc) {
|
|
273
|
+
var record = entry.completion;
|
|
274
|
+
if ("throw" === record.type) {
|
|
275
|
+
var thrown = record.arg;
|
|
276
|
+
resetTryEntry(entry);
|
|
277
|
+
}
|
|
278
|
+
return thrown;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
throw new Error("illegal catch attempt");
|
|
282
|
+
},
|
|
283
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
284
|
+
return this.delegate = {
|
|
285
|
+
iterator: values(iterable),
|
|
286
|
+
resultName: resultName,
|
|
287
|
+
nextLoc: nextLoc
|
|
288
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
289
|
+
}
|
|
290
|
+
}, exports;
|
|
291
|
+
}
|
|
1
292
|
function _typeof(obj) {
|
|
2
293
|
"@babel/helpers - typeof";
|
|
3
294
|
|
|
@@ -130,4 +421,4 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
130
421
|
};
|
|
131
422
|
}
|
|
132
423
|
|
|
133
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
424
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _regeneratorRuntime as regeneratorRuntime, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
package/dist/cjs/index.d.ts
CHANGED