@copart/ops-tool-kit 1.9.0-alpha.1 → 1.9.0-alpha.3
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/ops-tool-kit.js +282 -304
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +2 -2
package/dist/ops-tool-kit.js
CHANGED
|
@@ -33,7 +33,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
|
33
33
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$e = "@copart/ops-tool-kit";
|
|
36
|
-
const version$3 = "1.9.0-alpha.
|
|
36
|
+
const version$3 = "1.9.0-alpha.3";
|
|
37
37
|
const main = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -90,7 +90,7 @@ const devDependencies = {
|
|
|
90
90
|
};
|
|
91
91
|
const peerDependencies = {
|
|
92
92
|
react: "*",
|
|
93
|
-
"@copart/core-components": "^
|
|
93
|
+
"@copart/core-components": "^2.2.5"
|
|
94
94
|
};
|
|
95
95
|
const dependencies = {
|
|
96
96
|
"@reacting/purist": "0.1.0",
|
|
@@ -2556,24 +2556,29 @@ var isobject = function isObject(val) {
|
|
|
2556
2556
|
};
|
|
2557
2557
|
|
|
2558
2558
|
function isObjectObject(o) {
|
|
2559
|
-
return isobject(o) === true
|
|
2559
|
+
return isobject(o) === true
|
|
2560
|
+
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
2560
2561
|
}
|
|
2561
2562
|
|
|
2562
2563
|
var isPlainObject = function isPlainObject(o) {
|
|
2563
|
-
var ctor,
|
|
2564
|
-
if (isObjectObject(o) === false) return false; // If has modified constructor
|
|
2564
|
+
var ctor,prot;
|
|
2565
2565
|
|
|
2566
|
+
if (isObjectObject(o) === false) return false;
|
|
2567
|
+
|
|
2568
|
+
// If has modified constructor
|
|
2566
2569
|
ctor = o.constructor;
|
|
2567
|
-
if (typeof ctor !== 'function') return false;
|
|
2570
|
+
if (typeof ctor !== 'function') return false;
|
|
2568
2571
|
|
|
2572
|
+
// If has modified prototype
|
|
2569
2573
|
prot = ctor.prototype;
|
|
2570
|
-
if (isObjectObject(prot) === false) return false;
|
|
2574
|
+
if (isObjectObject(prot) === false) return false;
|
|
2571
2575
|
|
|
2576
|
+
// If constructor does not have an Object-specific method
|
|
2572
2577
|
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
2573
2578
|
return false;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2579
|
+
}
|
|
2576
2580
|
|
|
2581
|
+
// Most likely a plain Object
|
|
2577
2582
|
return true;
|
|
2578
2583
|
};
|
|
2579
2584
|
|
|
@@ -2584,13 +2589,11 @@ function set$1(target, path, value, options) {
|
|
|
2584
2589
|
|
|
2585
2590
|
let opts = options || {};
|
|
2586
2591
|
const isArray = Array.isArray(path);
|
|
2587
|
-
|
|
2588
2592
|
if (!isArray && typeof path !== 'string') {
|
|
2589
2593
|
return target;
|
|
2590
2594
|
}
|
|
2591
2595
|
|
|
2592
2596
|
let merge = opts.merge;
|
|
2593
|
-
|
|
2594
2597
|
if (merge && typeof merge !== 'function') {
|
|
2595
2598
|
merge = Object.assign;
|
|
2596
2599
|
}
|
|
@@ -2633,7 +2636,8 @@ function result(target, path, value, merge) {
|
|
|
2633
2636
|
function split(path, options) {
|
|
2634
2637
|
const id = createKey(path, options);
|
|
2635
2638
|
if (set$1.memo[id]) return set$1.memo[id];
|
|
2636
|
-
|
|
2639
|
+
|
|
2640
|
+
const char = (options && options.separator) ? options.separator : '.';
|
|
2637
2641
|
let keys = [];
|
|
2638
2642
|
let res = [];
|
|
2639
2643
|
|
|
@@ -2645,32 +2649,25 @@ function split(path, options) {
|
|
|
2645
2649
|
|
|
2646
2650
|
for (let i = 0; i < keys.length; i++) {
|
|
2647
2651
|
let prop = keys[i];
|
|
2648
|
-
|
|
2649
2652
|
while (prop && prop.slice(-1) === '\\' && keys[i + 1]) {
|
|
2650
2653
|
prop = prop.slice(0, -1) + char + keys[++i];
|
|
2651
2654
|
}
|
|
2652
|
-
|
|
2653
2655
|
res.push(prop);
|
|
2654
2656
|
}
|
|
2655
|
-
|
|
2656
2657
|
set$1.memo[id] = res;
|
|
2657
2658
|
return res;
|
|
2658
2659
|
}
|
|
2659
2660
|
|
|
2660
2661
|
function createKey(pattern, options) {
|
|
2661
2662
|
let id = pattern;
|
|
2662
|
-
|
|
2663
2663
|
if (typeof options === 'undefined') {
|
|
2664
2664
|
return id + '';
|
|
2665
2665
|
}
|
|
2666
|
-
|
|
2667
2666
|
const keys = Object.keys(options);
|
|
2668
|
-
|
|
2669
2667
|
for (let i = 0; i < keys.length; i++) {
|
|
2670
2668
|
const key = keys[i];
|
|
2671
2669
|
id += ';' + key + '=' + String(options[key]);
|
|
2672
2670
|
}
|
|
2673
|
-
|
|
2674
2671
|
return id;
|
|
2675
2672
|
}
|
|
2676
2673
|
|
|
@@ -3204,47 +3201,46 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3204
3201
|
* This source code is licensed under the MIT license found in the
|
|
3205
3202
|
* LICENSE file in the root directory of this source tree.
|
|
3206
3203
|
*/
|
|
3207
|
-
|
|
3208
|
-
!(function(global) {
|
|
3204
|
+
!function (global) {
|
|
3209
3205
|
|
|
3210
3206
|
var Op = Object.prototype;
|
|
3211
3207
|
var hasOwn = Op.hasOwnProperty;
|
|
3212
3208
|
var undefined$1; // More compressible than void 0.
|
|
3209
|
+
|
|
3213
3210
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
3214
3211
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
3215
3212
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
3216
3213
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
3217
3214
|
var runtime = global.regeneratorRuntime;
|
|
3215
|
+
|
|
3218
3216
|
if (runtime) {
|
|
3219
3217
|
{
|
|
3220
3218
|
// If regeneratorRuntime is defined globally and we're in a module,
|
|
3221
3219
|
// make the exports object identical to regeneratorRuntime.
|
|
3222
3220
|
module.exports = runtime;
|
|
3223
|
-
}
|
|
3224
|
-
// Don't bother evaluating the rest of this file if the runtime was
|
|
3221
|
+
} // Don't bother evaluating the rest of this file if the runtime was
|
|
3225
3222
|
// already defined globally.
|
|
3226
|
-
return;
|
|
3227
|
-
}
|
|
3228
3223
|
|
|
3229
|
-
|
|
3224
|
+
|
|
3225
|
+
return;
|
|
3226
|
+
} // Define the runtime globally (as expected by generated code) as either
|
|
3230
3227
|
// module.exports (if we're in a module) or a new, empty object.
|
|
3228
|
+
|
|
3229
|
+
|
|
3231
3230
|
runtime = global.regeneratorRuntime = module.exports ;
|
|
3232
3231
|
|
|
3233
3232
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
3234
3233
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
3235
3234
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
3236
3235
|
var generator = Object.create(protoGenerator.prototype);
|
|
3237
|
-
var context = new Context(tryLocsList || []);
|
|
3238
|
-
|
|
3239
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
3236
|
+
var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
|
|
3240
3237
|
// .throw, and .return methods.
|
|
3241
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
3242
3238
|
|
|
3239
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
3243
3240
|
return generator;
|
|
3244
3241
|
}
|
|
3245
|
-
runtime.wrap = wrap;
|
|
3246
3242
|
|
|
3247
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
3243
|
+
runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
|
|
3248
3244
|
// record like context.tryEntries[i].completion. This interface could
|
|
3249
3245
|
// have been (and was previously) designed to take a closure to be
|
|
3250
3246
|
// invoked without arguments, but in all the cases we care about we
|
|
@@ -3254,121 +3250,126 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3254
3250
|
// in every case, so we don't have to touch the arguments object. The
|
|
3255
3251
|
// only additional allocation required is the completion record, which
|
|
3256
3252
|
// has a stable shape and so hopefully should be cheap to allocate.
|
|
3253
|
+
|
|
3257
3254
|
function tryCatch(fn, obj, arg) {
|
|
3258
3255
|
try {
|
|
3259
|
-
return {
|
|
3256
|
+
return {
|
|
3257
|
+
type: "normal",
|
|
3258
|
+
arg: fn.call(obj, arg)
|
|
3259
|
+
};
|
|
3260
3260
|
} catch (err) {
|
|
3261
|
-
return {
|
|
3261
|
+
return {
|
|
3262
|
+
type: "throw",
|
|
3263
|
+
arg: err
|
|
3264
|
+
};
|
|
3262
3265
|
}
|
|
3263
3266
|
}
|
|
3264
3267
|
|
|
3265
3268
|
var GenStateSuspendedStart = "suspendedStart";
|
|
3266
3269
|
var GenStateSuspendedYield = "suspendedYield";
|
|
3267
3270
|
var GenStateExecuting = "executing";
|
|
3268
|
-
var GenStateCompleted = "completed";
|
|
3269
|
-
|
|
3270
|
-
// Returning this object from the innerFn has the same effect as
|
|
3271
|
+
var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
|
|
3271
3272
|
// breaking out of the dispatch switch statement.
|
|
3272
|
-
var ContinueSentinel = {};
|
|
3273
3273
|
|
|
3274
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
3274
|
+
var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
|
|
3275
3275
|
// .constructor.prototype properties for functions that return Generator
|
|
3276
3276
|
// objects. For full spec compliance, you may wish to configure your
|
|
3277
3277
|
// minifier not to mangle the names of these two functions.
|
|
3278
|
+
|
|
3278
3279
|
function Generator() {}
|
|
3280
|
+
|
|
3279
3281
|
function GeneratorFunction() {}
|
|
3280
|
-
function GeneratorFunctionPrototype() {}
|
|
3281
3282
|
|
|
3282
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
3283
|
+
function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
|
|
3283
3284
|
// don't natively support it.
|
|
3285
|
+
|
|
3286
|
+
|
|
3284
3287
|
var IteratorPrototype = {};
|
|
3288
|
+
|
|
3285
3289
|
IteratorPrototype[iteratorSymbol] = function () {
|
|
3286
3290
|
return this;
|
|
3287
3291
|
};
|
|
3288
3292
|
|
|
3289
3293
|
var getProto = Object.getPrototypeOf;
|
|
3290
3294
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
3295
|
+
|
|
3296
|
+
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
3294
3297
|
// This environment has a native %IteratorPrototype%; use it instead
|
|
3295
3298
|
// of the polyfill.
|
|
3296
3299
|
IteratorPrototype = NativeIteratorPrototype;
|
|
3297
3300
|
}
|
|
3298
3301
|
|
|
3299
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
3300
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
3302
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
3301
3303
|
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
3302
3304
|
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
3303
|
-
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
3304
|
-
GeneratorFunction.displayName = "GeneratorFunction";
|
|
3305
|
-
|
|
3306
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
3305
|
+
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
|
|
3307
3306
|
// Iterator interface in terms of a single ._invoke method.
|
|
3307
|
+
|
|
3308
3308
|
function defineIteratorMethods(prototype) {
|
|
3309
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
3310
|
-
prototype[method] = function(arg) {
|
|
3309
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
3310
|
+
prototype[method] = function (arg) {
|
|
3311
3311
|
return this._invoke(method, arg);
|
|
3312
3312
|
};
|
|
3313
3313
|
});
|
|
3314
3314
|
}
|
|
3315
3315
|
|
|
3316
|
-
runtime.isGeneratorFunction = function(genFun) {
|
|
3316
|
+
runtime.isGeneratorFunction = function (genFun) {
|
|
3317
3317
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
3318
|
-
return ctor
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
// do is to check its .name property.
|
|
3322
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
3323
|
-
: false;
|
|
3318
|
+
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
|
|
3319
|
+
// do is to check its .name property.
|
|
3320
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
3324
3321
|
};
|
|
3325
3322
|
|
|
3326
|
-
runtime.mark = function(genFun) {
|
|
3323
|
+
runtime.mark = function (genFun) {
|
|
3327
3324
|
if (Object.setPrototypeOf) {
|
|
3328
3325
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
3329
3326
|
} else {
|
|
3330
3327
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
3328
|
+
|
|
3331
3329
|
if (!(toStringTagSymbol in genFun)) {
|
|
3332
3330
|
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
3333
3331
|
}
|
|
3334
3332
|
}
|
|
3333
|
+
|
|
3335
3334
|
genFun.prototype = Object.create(Gp);
|
|
3336
3335
|
return genFun;
|
|
3337
|
-
};
|
|
3338
|
-
|
|
3339
|
-
// Within the body of any async function, `await x` is transformed to
|
|
3336
|
+
}; // Within the body of any async function, `await x` is transformed to
|
|
3340
3337
|
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
3341
3338
|
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
3342
3339
|
// meant to be awaited.
|
|
3343
|
-
|
|
3344
|
-
|
|
3340
|
+
|
|
3341
|
+
|
|
3342
|
+
runtime.awrap = function (arg) {
|
|
3343
|
+
return {
|
|
3344
|
+
__await: arg
|
|
3345
|
+
};
|
|
3345
3346
|
};
|
|
3346
3347
|
|
|
3347
3348
|
function AsyncIterator(generator) {
|
|
3348
3349
|
function invoke(method, arg, resolve, reject) {
|
|
3349
3350
|
var record = tryCatch(generator[method], generator, arg);
|
|
3351
|
+
|
|
3350
3352
|
if (record.type === "throw") {
|
|
3351
3353
|
reject(record.arg);
|
|
3352
3354
|
} else {
|
|
3353
3355
|
var result = record.arg;
|
|
3354
3356
|
var value = result.value;
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
return Promise.resolve(value.__await).then(function(value) {
|
|
3357
|
+
|
|
3358
|
+
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
|
|
3359
|
+
return Promise.resolve(value.__await).then(function (value) {
|
|
3359
3360
|
invoke("next", value, resolve, reject);
|
|
3360
|
-
}, function(err) {
|
|
3361
|
+
}, function (err) {
|
|
3361
3362
|
invoke("throw", err, resolve, reject);
|
|
3362
3363
|
});
|
|
3363
3364
|
}
|
|
3364
3365
|
|
|
3365
|
-
return Promise.resolve(value).then(function(unwrapped) {
|
|
3366
|
+
return Promise.resolve(value).then(function (unwrapped) {
|
|
3366
3367
|
// When a yielded Promise is resolved, its final value becomes
|
|
3367
3368
|
// the .value of the Promise<{value,done}> result for the
|
|
3368
3369
|
// current iteration.
|
|
3369
3370
|
result.value = unwrapped;
|
|
3370
3371
|
resolve(result);
|
|
3371
|
-
}, function(error) {
|
|
3372
|
+
}, function (error) {
|
|
3372
3373
|
// If a rejected Promise was yielded, throw the rejection back
|
|
3373
3374
|
// into the async generator function so it can be handled there.
|
|
3374
3375
|
return invoke("throw", error, resolve, reject);
|
|
@@ -3380,61 +3381,53 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3380
3381
|
|
|
3381
3382
|
function enqueue(method, arg) {
|
|
3382
3383
|
function callInvokeWithMethodAndArg() {
|
|
3383
|
-
return new Promise(function(resolve, reject) {
|
|
3384
|
+
return new Promise(function (resolve, reject) {
|
|
3384
3385
|
invoke(method, arg, resolve, reject);
|
|
3385
3386
|
});
|
|
3386
3387
|
}
|
|
3387
3388
|
|
|
3388
|
-
return previousPromise =
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
// invocations of the iterator.
|
|
3405
|
-
callInvokeWithMethodAndArg
|
|
3406
|
-
) : callInvokeWithMethodAndArg();
|
|
3407
|
-
}
|
|
3408
|
-
|
|
3409
|
-
// Define the unified helper method that is used to implement .next,
|
|
3389
|
+
return previousPromise = // If enqueue has been called before, then we want to wait until
|
|
3390
|
+
// all previous Promises have been resolved before calling invoke,
|
|
3391
|
+
// so that results are always delivered in the correct order. If
|
|
3392
|
+
// enqueue has not been called before, then it is important to
|
|
3393
|
+
// call invoke immediately, without waiting on a callback to fire,
|
|
3394
|
+
// so that the async generator function has the opportunity to do
|
|
3395
|
+
// any necessary setup in a predictable way. This predictability
|
|
3396
|
+
// is why the Promise constructor synchronously invokes its
|
|
3397
|
+
// executor callback, and why async functions synchronously
|
|
3398
|
+
// execute code before the first await. Since we implement simple
|
|
3399
|
+
// async functions in terms of async generators, it is especially
|
|
3400
|
+
// important to get this right, even though it requires care.
|
|
3401
|
+
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
|
|
3402
|
+
// invocations of the iterator.
|
|
3403
|
+
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
3404
|
+
} // Define the unified helper method that is used to implement .next,
|
|
3410
3405
|
// .throw, and .return (see defineIteratorMethods).
|
|
3406
|
+
|
|
3407
|
+
|
|
3411
3408
|
this._invoke = enqueue;
|
|
3412
3409
|
}
|
|
3413
3410
|
|
|
3414
3411
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
3412
|
+
|
|
3415
3413
|
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
3416
3414
|
return this;
|
|
3417
3415
|
};
|
|
3418
|
-
runtime.AsyncIterator = AsyncIterator;
|
|
3419
3416
|
|
|
3420
|
-
// Note that simple async functions are implemented on top of
|
|
3417
|
+
runtime.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
3421
3418
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
3422
3419
|
// the final result produced by the iterator.
|
|
3423
|
-
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
|
|
3424
|
-
var iter = new AsyncIterator(
|
|
3425
|
-
wrap(innerFn, outerFn, self, tryLocsList)
|
|
3426
|
-
);
|
|
3427
3420
|
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3421
|
+
runtime.async = function (innerFn, outerFn, self, tryLocsList) {
|
|
3422
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
|
|
3423
|
+
return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
3424
|
+
: iter.next().then(function (result) {
|
|
3425
|
+
return result.done ? result.value : iter.next();
|
|
3426
|
+
});
|
|
3433
3427
|
};
|
|
3434
3428
|
|
|
3435
3429
|
function makeInvokeMethod(innerFn, self, context) {
|
|
3436
3430
|
var state = GenStateSuspendedStart;
|
|
3437
|
-
|
|
3438
3431
|
return function invoke(method, arg) {
|
|
3439
3432
|
if (state === GenStateExecuting) {
|
|
3440
3433
|
throw new Error("Generator is already running");
|
|
@@ -3443,10 +3436,10 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3443
3436
|
if (state === GenStateCompleted) {
|
|
3444
3437
|
if (method === "throw") {
|
|
3445
3438
|
throw arg;
|
|
3446
|
-
}
|
|
3447
|
-
|
|
3448
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
3439
|
+
} // Be forgiving, per 25.3.3.3.3 of the spec:
|
|
3449
3440
|
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
3441
|
+
|
|
3442
|
+
|
|
3450
3443
|
return doneResult();
|
|
3451
3444
|
}
|
|
3452
3445
|
|
|
@@ -3455,8 +3448,10 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3455
3448
|
|
|
3456
3449
|
while (true) {
|
|
3457
3450
|
var delegate = context.delegate;
|
|
3451
|
+
|
|
3458
3452
|
if (delegate) {
|
|
3459
3453
|
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
3454
|
+
|
|
3460
3455
|
if (delegateResult) {
|
|
3461
3456
|
if (delegateResult === ContinueSentinel) continue;
|
|
3462
3457
|
return delegateResult;
|
|
@@ -3467,7 +3462,6 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3467
3462
|
// Setting context._sent for legacy support of Babel's
|
|
3468
3463
|
// function.sent implementation.
|
|
3469
3464
|
context.sent = context._sent = context.arg;
|
|
3470
|
-
|
|
3471
3465
|
} else if (context.method === "throw") {
|
|
3472
3466
|
if (state === GenStateSuspendedStart) {
|
|
3473
3467
|
state = GenStateCompleted;
|
|
@@ -3475,20 +3469,17 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3475
3469
|
}
|
|
3476
3470
|
|
|
3477
3471
|
context.dispatchException(context.arg);
|
|
3478
|
-
|
|
3479
3472
|
} else if (context.method === "return") {
|
|
3480
3473
|
context.abrupt("return", context.arg);
|
|
3481
3474
|
}
|
|
3482
3475
|
|
|
3483
3476
|
state = GenStateExecuting;
|
|
3484
|
-
|
|
3485
3477
|
var record = tryCatch(innerFn, self, context);
|
|
3478
|
+
|
|
3486
3479
|
if (record.type === "normal") {
|
|
3487
3480
|
// If an exception is thrown from innerFn, we leave state ===
|
|
3488
3481
|
// GenStateExecuting and loop back for another invocation.
|
|
3489
|
-
state = context.done
|
|
3490
|
-
? GenStateCompleted
|
|
3491
|
-
: GenStateSuspendedYield;
|
|
3482
|
+
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
3492
3483
|
|
|
3493
3484
|
if (record.arg === ContinueSentinel) {
|
|
3494
3485
|
continue;
|
|
@@ -3498,24 +3489,24 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3498
3489
|
value: record.arg,
|
|
3499
3490
|
done: context.done
|
|
3500
3491
|
};
|
|
3501
|
-
|
|
3502
3492
|
} else if (record.type === "throw") {
|
|
3503
|
-
state = GenStateCompleted;
|
|
3504
|
-
// Dispatch the exception by looping back around to the
|
|
3493
|
+
state = GenStateCompleted; // Dispatch the exception by looping back around to the
|
|
3505
3494
|
// context.dispatchException(context.arg) call above.
|
|
3495
|
+
|
|
3506
3496
|
context.method = "throw";
|
|
3507
3497
|
context.arg = record.arg;
|
|
3508
3498
|
}
|
|
3509
3499
|
}
|
|
3510
3500
|
};
|
|
3511
|
-
}
|
|
3512
|
-
|
|
3513
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
3501
|
+
} // Call delegate.iterator[context.method](context.arg) and handle the
|
|
3514
3502
|
// result, either by returning a { value, done } result from the
|
|
3515
3503
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
3516
3504
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
3505
|
+
|
|
3506
|
+
|
|
3517
3507
|
function maybeInvokeDelegate(delegate, context) {
|
|
3518
3508
|
var method = delegate.iterator[context.method];
|
|
3509
|
+
|
|
3519
3510
|
if (method === undefined$1) {
|
|
3520
3511
|
// A .throw or .return when the delegate iterator has no .throw
|
|
3521
3512
|
// method always terminates the yield* loop.
|
|
@@ -3537,8 +3528,7 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3537
3528
|
}
|
|
3538
3529
|
|
|
3539
3530
|
context.method = "throw";
|
|
3540
|
-
context.arg = new TypeError(
|
|
3541
|
-
"The iterator does not provide a 'throw' method");
|
|
3531
|
+
context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
3542
3532
|
}
|
|
3543
3533
|
|
|
3544
3534
|
return ContinueSentinel;
|
|
@@ -3555,7 +3545,7 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3555
3545
|
|
|
3556
3546
|
var info = record.arg;
|
|
3557
3547
|
|
|
3558
|
-
if (!
|
|
3548
|
+
if (!info) {
|
|
3559
3549
|
context.method = "throw";
|
|
3560
3550
|
context.arg = new TypeError("iterator result is not an object");
|
|
3561
3551
|
context.delegate = null;
|
|
@@ -3565,54 +3555,51 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3565
3555
|
if (info.done) {
|
|
3566
3556
|
// Assign the result of the finished delegate to the temporary
|
|
3567
3557
|
// variable specified by delegate.resultName (see delegateYield).
|
|
3568
|
-
context[delegate.resultName] = info.value;
|
|
3569
|
-
|
|
3570
|
-
// Resume execution at the desired location (see delegateYield).
|
|
3571
|
-
context.next = delegate.nextLoc;
|
|
3558
|
+
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
|
|
3572
3559
|
|
|
3573
|
-
// If context.method was "throw" but the delegate handled the
|
|
3560
|
+
context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
|
|
3574
3561
|
// exception, let the outer generator proceed normally. If
|
|
3575
3562
|
// context.method was "next", forget context.arg since it has been
|
|
3576
3563
|
// "consumed" by the delegate iterator. If context.method was
|
|
3577
3564
|
// "return", allow the original .return call to continue in the
|
|
3578
3565
|
// outer generator.
|
|
3566
|
+
|
|
3579
3567
|
if (context.method !== "return") {
|
|
3580
3568
|
context.method = "next";
|
|
3581
3569
|
context.arg = undefined$1;
|
|
3582
3570
|
}
|
|
3583
|
-
|
|
3584
3571
|
} else {
|
|
3585
3572
|
// Re-yield the result returned by the delegate method.
|
|
3586
3573
|
return info;
|
|
3587
|
-
}
|
|
3588
|
-
|
|
3589
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
3574
|
+
} // The delegate iterator is finished, so forget it and continue with
|
|
3590
3575
|
// the outer generator.
|
|
3576
|
+
|
|
3577
|
+
|
|
3591
3578
|
context.delegate = null;
|
|
3592
3579
|
return ContinueSentinel;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
3580
|
+
} // Define Generator.prototype.{next,throw,return} in terms of the
|
|
3596
3581
|
// unified ._invoke helper method.
|
|
3597
|
-
defineIteratorMethods(Gp);
|
|
3598
3582
|
|
|
3599
|
-
Gp[toStringTagSymbol] = "Generator";
|
|
3600
3583
|
|
|
3601
|
-
|
|
3584
|
+
defineIteratorMethods(Gp);
|
|
3585
|
+
Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
|
|
3602
3586
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
3603
3587
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
3604
3588
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
3605
3589
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
3606
|
-
|
|
3590
|
+
|
|
3591
|
+
Gp[iteratorSymbol] = function () {
|
|
3607
3592
|
return this;
|
|
3608
3593
|
};
|
|
3609
3594
|
|
|
3610
|
-
Gp.toString = function() {
|
|
3595
|
+
Gp.toString = function () {
|
|
3611
3596
|
return "[object Generator]";
|
|
3612
3597
|
};
|
|
3613
3598
|
|
|
3614
3599
|
function pushTryEntry(locs) {
|
|
3615
|
-
var entry = {
|
|
3600
|
+
var entry = {
|
|
3601
|
+
tryLoc: locs[0]
|
|
3602
|
+
};
|
|
3616
3603
|
|
|
3617
3604
|
if (1 in locs) {
|
|
3618
3605
|
entry.catchLoc = locs[1];
|
|
@@ -3637,33 +3624,37 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3637
3624
|
// The root entry object (effectively a try statement without a catch
|
|
3638
3625
|
// or a finally block) gives us a place to store values thrown from
|
|
3639
3626
|
// locations where there is no enclosing try statement.
|
|
3640
|
-
this.tryEntries = [{
|
|
3627
|
+
this.tryEntries = [{
|
|
3628
|
+
tryLoc: "root"
|
|
3629
|
+
}];
|
|
3641
3630
|
tryLocsList.forEach(pushTryEntry, this);
|
|
3642
3631
|
this.reset(true);
|
|
3643
3632
|
}
|
|
3644
3633
|
|
|
3645
|
-
runtime.keys = function(object) {
|
|
3634
|
+
runtime.keys = function (object) {
|
|
3646
3635
|
var keys = [];
|
|
3636
|
+
|
|
3647
3637
|
for (var key in object) {
|
|
3648
3638
|
keys.push(key);
|
|
3649
3639
|
}
|
|
3650
|
-
keys.reverse();
|
|
3651
3640
|
|
|
3652
|
-
// Rather than returning an object with a next method, we keep
|
|
3641
|
+
keys.reverse(); // Rather than returning an object with a next method, we keep
|
|
3653
3642
|
// things simple and return the next function itself.
|
|
3643
|
+
|
|
3654
3644
|
return function next() {
|
|
3655
3645
|
while (keys.length) {
|
|
3656
3646
|
var key = keys.pop();
|
|
3647
|
+
|
|
3657
3648
|
if (key in object) {
|
|
3658
3649
|
next.value = key;
|
|
3659
3650
|
next.done = false;
|
|
3660
3651
|
return next;
|
|
3661
3652
|
}
|
|
3662
|
-
}
|
|
3663
|
-
|
|
3664
|
-
// To avoid creating an additional object, we just hang the .value
|
|
3653
|
+
} // To avoid creating an additional object, we just hang the .value
|
|
3665
3654
|
// and .done properties off the next function object itself. This
|
|
3666
3655
|
// also ensures that the minifier will not anonymize the function.
|
|
3656
|
+
|
|
3657
|
+
|
|
3667
3658
|
next.done = true;
|
|
3668
3659
|
return next;
|
|
3669
3660
|
};
|
|
@@ -3672,6 +3663,7 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3672
3663
|
function values(iterable) {
|
|
3673
3664
|
if (iterable) {
|
|
3674
3665
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
3666
|
+
|
|
3675
3667
|
if (iteratorMethod) {
|
|
3676
3668
|
return iteratorMethod.call(iterable);
|
|
3677
3669
|
}
|
|
@@ -3681,7 +3673,8 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3681
3673
|
}
|
|
3682
3674
|
|
|
3683
3675
|
if (!isNaN(iterable.length)) {
|
|
3684
|
-
var i = -1,
|
|
3676
|
+
var i = -1,
|
|
3677
|
+
next = function next() {
|
|
3685
3678
|
while (++i < iterable.length) {
|
|
3686
3679
|
if (hasOwn.call(iterable, i)) {
|
|
3687
3680
|
next.value = iterable[i];
|
|
@@ -3692,70 +3685,69 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3692
3685
|
|
|
3693
3686
|
next.value = undefined$1;
|
|
3694
3687
|
next.done = true;
|
|
3695
|
-
|
|
3696
3688
|
return next;
|
|
3697
3689
|
};
|
|
3698
3690
|
|
|
3699
3691
|
return next.next = next;
|
|
3700
3692
|
}
|
|
3701
|
-
}
|
|
3693
|
+
} // Return an iterator with no values.
|
|
3694
|
+
|
|
3702
3695
|
|
|
3703
|
-
|
|
3704
|
-
|
|
3696
|
+
return {
|
|
3697
|
+
next: doneResult
|
|
3698
|
+
};
|
|
3705
3699
|
}
|
|
3700
|
+
|
|
3706
3701
|
runtime.values = values;
|
|
3707
3702
|
|
|
3708
3703
|
function doneResult() {
|
|
3709
|
-
return {
|
|
3704
|
+
return {
|
|
3705
|
+
value: undefined$1,
|
|
3706
|
+
done: true
|
|
3707
|
+
};
|
|
3710
3708
|
}
|
|
3711
3709
|
|
|
3712
3710
|
Context.prototype = {
|
|
3713
3711
|
constructor: Context,
|
|
3714
|
-
|
|
3715
|
-
reset: function(skipTempReset) {
|
|
3712
|
+
reset: function (skipTempReset) {
|
|
3716
3713
|
this.prev = 0;
|
|
3717
|
-
this.next = 0;
|
|
3718
|
-
// Resetting context._sent for legacy support of Babel's
|
|
3714
|
+
this.next = 0; // Resetting context._sent for legacy support of Babel's
|
|
3719
3715
|
// function.sent implementation.
|
|
3716
|
+
|
|
3720
3717
|
this.sent = this._sent = undefined$1;
|
|
3721
3718
|
this.done = false;
|
|
3722
3719
|
this.delegate = null;
|
|
3723
|
-
|
|
3724
3720
|
this.method = "next";
|
|
3725
3721
|
this.arg = undefined$1;
|
|
3726
|
-
|
|
3727
3722
|
this.tryEntries.forEach(resetTryEntry);
|
|
3728
3723
|
|
|
3729
3724
|
if (!skipTempReset) {
|
|
3730
3725
|
for (var name in this) {
|
|
3731
3726
|
// Not sure about the optimal order of these conditions:
|
|
3732
|
-
if (name.charAt(0) === "t" &&
|
|
3733
|
-
hasOwn.call(this, name) &&
|
|
3734
|
-
!isNaN(+name.slice(1))) {
|
|
3727
|
+
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
|
|
3735
3728
|
this[name] = undefined$1;
|
|
3736
3729
|
}
|
|
3737
3730
|
}
|
|
3738
3731
|
}
|
|
3739
3732
|
},
|
|
3740
|
-
|
|
3741
|
-
stop: function() {
|
|
3733
|
+
stop: function () {
|
|
3742
3734
|
this.done = true;
|
|
3743
|
-
|
|
3744
3735
|
var rootEntry = this.tryEntries[0];
|
|
3745
3736
|
var rootRecord = rootEntry.completion;
|
|
3737
|
+
|
|
3746
3738
|
if (rootRecord.type === "throw") {
|
|
3747
3739
|
throw rootRecord.arg;
|
|
3748
3740
|
}
|
|
3749
3741
|
|
|
3750
3742
|
return this.rval;
|
|
3751
3743
|
},
|
|
3752
|
-
|
|
3753
|
-
dispatchException: function(exception) {
|
|
3744
|
+
dispatchException: function (exception) {
|
|
3754
3745
|
if (this.done) {
|
|
3755
3746
|
throw exception;
|
|
3756
3747
|
}
|
|
3757
3748
|
|
|
3758
3749
|
var context = this;
|
|
3750
|
+
|
|
3759
3751
|
function handle(loc, caught) {
|
|
3760
3752
|
record.type = "throw";
|
|
3761
3753
|
record.arg = exception;
|
|
@@ -3768,7 +3760,7 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3768
3760
|
context.arg = undefined$1;
|
|
3769
3761
|
}
|
|
3770
3762
|
|
|
3771
|
-
return !!
|
|
3763
|
+
return !!caught;
|
|
3772
3764
|
}
|
|
3773
3765
|
|
|
3774
3766
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
@@ -3792,40 +3784,31 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3792
3784
|
} else if (this.prev < entry.finallyLoc) {
|
|
3793
3785
|
return handle(entry.finallyLoc);
|
|
3794
3786
|
}
|
|
3795
|
-
|
|
3796
3787
|
} else if (hasCatch) {
|
|
3797
3788
|
if (this.prev < entry.catchLoc) {
|
|
3798
3789
|
return handle(entry.catchLoc, true);
|
|
3799
3790
|
}
|
|
3800
|
-
|
|
3801
3791
|
} else if (hasFinally) {
|
|
3802
3792
|
if (this.prev < entry.finallyLoc) {
|
|
3803
3793
|
return handle(entry.finallyLoc);
|
|
3804
3794
|
}
|
|
3805
|
-
|
|
3806
3795
|
} else {
|
|
3807
3796
|
throw new Error("try statement without catch or finally");
|
|
3808
3797
|
}
|
|
3809
3798
|
}
|
|
3810
3799
|
}
|
|
3811
3800
|
},
|
|
3812
|
-
|
|
3813
|
-
abrupt: function(type, arg) {
|
|
3801
|
+
abrupt: function (type, arg) {
|
|
3814
3802
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3815
3803
|
var entry = this.tryEntries[i];
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
this.prev < entry.finallyLoc) {
|
|
3804
|
+
|
|
3805
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
3819
3806
|
var finallyEntry = entry;
|
|
3820
3807
|
break;
|
|
3821
3808
|
}
|
|
3822
3809
|
}
|
|
3823
3810
|
|
|
3824
|
-
if (finallyEntry &&
|
|
3825
|
-
(type === "break" ||
|
|
3826
|
-
type === "continue") &&
|
|
3827
|
-
finallyEntry.tryLoc <= arg &&
|
|
3828
|
-
arg <= finallyEntry.finallyLoc) {
|
|
3811
|
+
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
|
|
3829
3812
|
// Ignore the finally entry if control is not jumping to a
|
|
3830
3813
|
// location outside the try/catch block.
|
|
3831
3814
|
finallyEntry = null;
|
|
@@ -3843,14 +3826,12 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3843
3826
|
|
|
3844
3827
|
return this.complete(record);
|
|
3845
3828
|
},
|
|
3846
|
-
|
|
3847
|
-
complete: function(record, afterLoc) {
|
|
3829
|
+
complete: function (record, afterLoc) {
|
|
3848
3830
|
if (record.type === "throw") {
|
|
3849
3831
|
throw record.arg;
|
|
3850
3832
|
}
|
|
3851
3833
|
|
|
3852
|
-
if (record.type === "break" ||
|
|
3853
|
-
record.type === "continue") {
|
|
3834
|
+
if (record.type === "break" || record.type === "continue") {
|
|
3854
3835
|
this.next = record.arg;
|
|
3855
3836
|
} else if (record.type === "return") {
|
|
3856
3837
|
this.rval = this.arg = record.arg;
|
|
@@ -3862,10 +3843,10 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3862
3843
|
|
|
3863
3844
|
return ContinueSentinel;
|
|
3864
3845
|
},
|
|
3865
|
-
|
|
3866
|
-
finish: function(finallyLoc) {
|
|
3846
|
+
finish: function (finallyLoc) {
|
|
3867
3847
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3868
3848
|
var entry = this.tryEntries[i];
|
|
3849
|
+
|
|
3869
3850
|
if (entry.finallyLoc === finallyLoc) {
|
|
3870
3851
|
this.complete(entry.completion, entry.afterLoc);
|
|
3871
3852
|
resetTryEntry(entry);
|
|
@@ -3873,26 +3854,27 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3873
3854
|
}
|
|
3874
3855
|
}
|
|
3875
3856
|
},
|
|
3876
|
-
|
|
3877
|
-
"catch": function(tryLoc) {
|
|
3857
|
+
"catch": function (tryLoc) {
|
|
3878
3858
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3879
3859
|
var entry = this.tryEntries[i];
|
|
3860
|
+
|
|
3880
3861
|
if (entry.tryLoc === tryLoc) {
|
|
3881
3862
|
var record = entry.completion;
|
|
3863
|
+
|
|
3882
3864
|
if (record.type === "throw") {
|
|
3883
3865
|
var thrown = record.arg;
|
|
3884
3866
|
resetTryEntry(entry);
|
|
3885
3867
|
}
|
|
3868
|
+
|
|
3886
3869
|
return thrown;
|
|
3887
3870
|
}
|
|
3888
|
-
}
|
|
3889
|
-
|
|
3890
|
-
// The context.catch method must only be called with a location
|
|
3871
|
+
} // The context.catch method must only be called with a location
|
|
3891
3872
|
// argument that corresponds to a known catch block.
|
|
3873
|
+
|
|
3874
|
+
|
|
3892
3875
|
throw new Error("illegal catch attempt");
|
|
3893
3876
|
},
|
|
3894
|
-
|
|
3895
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
3877
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
3896
3878
|
this.delegate = {
|
|
3897
3879
|
iterator: values(iterable),
|
|
3898
3880
|
resultName: resultName,
|
|
@@ -3908,14 +3890,12 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3908
3890
|
return ContinueSentinel;
|
|
3909
3891
|
}
|
|
3910
3892
|
};
|
|
3911
|
-
}
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
})() || Function("return this")()
|
|
3918
|
-
);
|
|
3893
|
+
}( // In sloppy mode, unbound `this` refers to the global object, fallback to
|
|
3894
|
+
// Function constructor if we're in global strict mode. That is sadly a form
|
|
3895
|
+
// of indirect eval which violates Content Security Policy.
|
|
3896
|
+
function () {
|
|
3897
|
+
return this || typeof self === "object" && self;
|
|
3898
|
+
}() || Function("return this")());
|
|
3919
3899
|
});
|
|
3920
3900
|
|
|
3921
3901
|
/**
|
|
@@ -3924,24 +3904,19 @@ var runtime = createCommonjsModule(function (module) {
|
|
|
3924
3904
|
* This source code is licensed under the MIT license found in the
|
|
3925
3905
|
* LICENSE file in the root directory of this source tree.
|
|
3926
3906
|
*/
|
|
3927
|
-
|
|
3928
3907
|
// This method of obtaining a reference to the global object needs to be
|
|
3929
3908
|
// kept identical to the way it is obtained in runtime.js
|
|
3930
|
-
var g$1 =
|
|
3931
|
-
return this ||
|
|
3932
|
-
}
|
|
3933
|
-
|
|
3934
|
-
// Use `getOwnPropertyNames` because not all browsers support calling
|
|
3909
|
+
var g$1 = function () {
|
|
3910
|
+
return this || typeof self === "object" && self;
|
|
3911
|
+
}() || Function("return this")(); // Use `getOwnPropertyNames` because not all browsers support calling
|
|
3935
3912
|
// `hasOwnProperty` on the global `self` object in a worker. See #183.
|
|
3936
|
-
var hadRuntime = g$1.regeneratorRuntime &&
|
|
3937
|
-
Object.getOwnPropertyNames(g$1).indexOf("regeneratorRuntime") >= 0;
|
|
3938
3913
|
|
|
3939
|
-
// Save the old regeneratorRuntime in case it needs to be restored later.
|
|
3940
|
-
var oldRuntime = hadRuntime && g$1.regeneratorRuntime;
|
|
3941
3914
|
|
|
3942
|
-
//
|
|
3943
|
-
|
|
3915
|
+
var hadRuntime = g$1.regeneratorRuntime && Object.getOwnPropertyNames(g$1).indexOf("regeneratorRuntime") >= 0; // Save the old regeneratorRuntime in case it needs to be restored later.
|
|
3916
|
+
|
|
3917
|
+
var oldRuntime = hadRuntime && g$1.regeneratorRuntime; // Force reevalutation of runtime.js.
|
|
3944
3918
|
|
|
3919
|
+
g$1.regeneratorRuntime = undefined;
|
|
3945
3920
|
var runtimeModule = runtime;
|
|
3946
3921
|
|
|
3947
3922
|
if (hadRuntime) {
|
|
@@ -3951,7 +3926,7 @@ if (hadRuntime) {
|
|
|
3951
3926
|
// Remove the global property added by runtime.js.
|
|
3952
3927
|
try {
|
|
3953
3928
|
delete g$1.regeneratorRuntime;
|
|
3954
|
-
} catch(e) {
|
|
3929
|
+
} catch (e) {
|
|
3955
3930
|
g$1.regeneratorRuntime = undefined;
|
|
3956
3931
|
}
|
|
3957
3932
|
}
|
|
@@ -30970,7 +30945,7 @@ var GoHome = function GoHome(props) {
|
|
|
30970
30945
|
}, props.reason));
|
|
30971
30946
|
};
|
|
30972
30947
|
|
|
30973
|
-
var css_248z$1 = ".utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer {\n display: flex;\n flex-direction: column;\n position: absolute;\n background: #3A4454;\n min-width: 100px;\n max-width: 100px;\n height: 100%;\n color: #ffffff;\n transition: max-width 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover {\n max-width: 400px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu {\n flex: 1;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu::-webkit-scrollbar { \n display: none;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\n display: flex;\n width: 100%;\n padding: 6px 0px 6px 12px;\n border-radius: 5px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected {\n color: #323130;\n background-color: #fff;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\n margin-left: auto;\n margin-right: 10px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--expandedMenu {\n background-color: #73A6FF;\n transition: background-color 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\n margin-left: auto;\n font-size:
|
|
30948
|
+
var css_248z$1 = ".utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer {\n display: flex;\n flex-direction: column;\n position: absolute;\n background: #3A4454;\n min-width: 100px;\n max-width: 100px;\n height: 100%;\n color: #ffffff;\n font-size: 16px;\n transition: max-width 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover {\n max-width: 400px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu {\n flex: 1;\n overflow-y: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenu::-webkit-scrollbar { \n display: none;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\n display: flex;\n width: 100%;\n padding: 6px 0px 6px 12px;\n border-radius: 5px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--selected {\n color: #323130;\n background-color: #fff;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton {\n margin-left: auto;\n margin-right: 10px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem.utilities_ops-app-frame_NavigationBar_NavigationBar--expandedMenu {\n background-color: #73A6FF;\n transition: background-color 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton i {\n margin-left: auto;\n font-size: 12px;\n color: #fff;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount {\n margin-left: auto;\n margin-right: 10px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\n margin-right: 5px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon i {\n width: 20px;\n color: #fff;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\n max-width: 0;\n overflow: hidden;\n white-space:nowrap;\n margin: 0 5px;\n font-weight: 100;\n cursor: pointer;\n transition: max-width 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer:hover .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\n max-width: 100%;\n margin-right: 10px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName {\n margin: 0 5px 0 0;\n font-weight: 600;\n margin-left: 0px;\n cursor: auto;\n cursor: initial;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon {\n margin-right: 0px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem {\n padding-left: 12px;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1 > .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem .utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName > span {\n display: inline;\n display: initial;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel2 {\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3 {\n margin-left: 10px;\n padding: 0 2px;\n background-color: #232932;\n border-left: 1px solid #8A8886;\n overflow: hidden;\n max-height: 0px;\n transition: max-height 0.5s ease-in-out;\n}\n\n.utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel3.utilities_ops-app-frame_NavigationBar_NavigationBar--expanded {\n max-height: 500px;\n margin-top: 3px;\n}";
|
|
30974
30949
|
styleInject(css_248z$1);
|
|
30975
30950
|
|
|
30976
30951
|
var _styleModuleImportMap = {
|
|
@@ -30991,18 +30966,25 @@ var _styleModuleImportMap = {
|
|
|
30991
30966
|
}
|
|
30992
30967
|
};
|
|
30993
30968
|
|
|
30994
|
-
var
|
|
30969
|
+
var NavIcon = function NavIcon(_ref) {
|
|
30970
|
+
var icon = _ref.icon;
|
|
30971
|
+
return typeof icon === 'string' ? React__default["default"].createElement(coreComponents.IconV2, {
|
|
30972
|
+
name: icon
|
|
30973
|
+
}) : icon;
|
|
30974
|
+
};
|
|
30975
|
+
|
|
30976
|
+
var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref2) {
|
|
30995
30977
|
var _navItem$name;
|
|
30996
30978
|
|
|
30997
|
-
var navItem =
|
|
30998
|
-
isHover =
|
|
30999
|
-
activeSubmenu =
|
|
31000
|
-
setActiveSubmenu =
|
|
31001
|
-
navigateTo =
|
|
31002
|
-
selected =
|
|
31003
|
-
setSelected =
|
|
31004
|
-
defaultRedirect =
|
|
31005
|
-
reloadMenuItems =
|
|
30979
|
+
var navItem = _ref2.navItem,
|
|
30980
|
+
isHover = _ref2.isHover,
|
|
30981
|
+
activeSubmenu = _ref2.activeSubmenu,
|
|
30982
|
+
setActiveSubmenu = _ref2.setActiveSubmenu,
|
|
30983
|
+
navigateTo = _ref2.navigateTo,
|
|
30984
|
+
selected = _ref2.selected,
|
|
30985
|
+
setSelected = _ref2.setSelected,
|
|
30986
|
+
defaultRedirect = _ref2.defaultRedirect,
|
|
30987
|
+
reloadMenuItems = _ref2.reloadMenuItems;
|
|
31006
30988
|
var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
|
|
31007
30989
|
return React__default["default"].createElement("div", {
|
|
31008
30990
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavMenuLevel1"
|
|
@@ -31010,11 +30992,13 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref) {
|
|
|
31010
30992
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItem"
|
|
31011
30993
|
}, React__default["default"].createElement("div", {
|
|
31012
30994
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon"
|
|
31013
|
-
},
|
|
30995
|
+
}, React__default["default"].createElement(NavIcon, {
|
|
30996
|
+
icon: navItem.icon
|
|
30997
|
+
})), React__default["default"].createElement("div", {
|
|
31014
30998
|
className: ((isHover ? 'hovered' : '') ? (isHover ? 'hovered' : '') + " " : "") + "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName"
|
|
31015
30999
|
}, (_navItem$name = navItem.name) === null || _navItem$name === void 0 ? void 0 : _navItem$name.toUpperCase()), React__default["default"].createElement("div", {
|
|
31016
31000
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
|
|
31017
|
-
}, navItem.count)), React__default["default"].createElement("div", null, hasSubMenuItems
|
|
31001
|
+
}, navItem.count)), React__default["default"].createElement("div", null, hasSubMenuItems ? navItem.subMenuItems.map(function (subItem) {
|
|
31018
31002
|
return React__default["default"].createElement(NavigationMenuLevel2, {
|
|
31019
31003
|
key: subItem.name,
|
|
31020
31004
|
isHover: isHover,
|
|
@@ -31027,19 +31011,19 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref) {
|
|
|
31027
31011
|
navigateTo: navigateTo,
|
|
31028
31012
|
reloadMenuItems: reloadMenuItems
|
|
31029
31013
|
});
|
|
31030
|
-
})));
|
|
31014
|
+
}) : null));
|
|
31031
31015
|
};
|
|
31032
31016
|
|
|
31033
|
-
var NavigationMenuLevel2 = function NavigationMenuLevel2(
|
|
31034
|
-
var navItem =
|
|
31035
|
-
isHover =
|
|
31036
|
-
selected =
|
|
31037
|
-
setSelected =
|
|
31038
|
-
defaultRedirect =
|
|
31039
|
-
activeSubmenu =
|
|
31040
|
-
setActiveSubmenu =
|
|
31041
|
-
navigateTo =
|
|
31042
|
-
reloadMenuItems =
|
|
31017
|
+
var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref3) {
|
|
31018
|
+
var navItem = _ref3.navItem,
|
|
31019
|
+
isHover = _ref3.isHover,
|
|
31020
|
+
selected = _ref3.selected,
|
|
31021
|
+
setSelected = _ref3.setSelected,
|
|
31022
|
+
defaultRedirect = _ref3.defaultRedirect,
|
|
31023
|
+
activeSubmenu = _ref3.activeSubmenu,
|
|
31024
|
+
setActiveSubmenu = _ref3.setActiveSubmenu,
|
|
31025
|
+
navigateTo = _ref3.navigateTo,
|
|
31026
|
+
reloadMenuItems = _ref3.reloadMenuItems;
|
|
31043
31027
|
|
|
31044
31028
|
var _useState = React.useState(navItem.count),
|
|
31045
31029
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -31071,19 +31055,21 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref2) {
|
|
|
31071
31055
|
})
|
|
31072
31056
|
}, React__default["default"].createElement("div", {
|
|
31073
31057
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon"
|
|
31074
|
-
},
|
|
31058
|
+
}, React__default["default"].createElement(NavIcon, {
|
|
31059
|
+
icon: navItem.icon
|
|
31060
|
+
})), React__default["default"].createElement("div", {
|
|
31075
31061
|
className: ((isHover ? 'hovered' : '') ? (isHover ? 'hovered' : '') + " " : "") + "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName"
|
|
31076
31062
|
}, navItem.name), hasSubMenuItems ? React__default["default"].createElement("div", {
|
|
31077
31063
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--expandButton"
|
|
31078
|
-
}, React__default["default"].createElement(coreComponents.
|
|
31079
|
-
name: activeSubmenu == navItem.route ? '
|
|
31064
|
+
}, React__default["default"].createElement(coreComponents.IconV2, {
|
|
31065
|
+
name: activeSubmenu == navItem.route ? 'chevron-up' : 'chevron-down'
|
|
31080
31066
|
})) : React__default["default"].createElement("div", {
|
|
31081
31067
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
|
|
31082
31068
|
}, countText)), React__default["default"].createElement("div", {
|
|
31083
31069
|
className: _getClassName("NavMenuLevel3 ".concat(activeSubmenu == navItem.route ? "expanded" : ""), _styleModuleImportMap, {
|
|
31084
31070
|
"handleMissingStyleName": "warn"
|
|
31085
31071
|
})
|
|
31086
|
-
}, hasSubMenuItems
|
|
31072
|
+
}, hasSubMenuItems ? navItem.subMenuItems.map(function (subItem) {
|
|
31087
31073
|
return React__default["default"].createElement(NavigationMenuLevel3, {
|
|
31088
31074
|
key: subItem.name,
|
|
31089
31075
|
isHover: isHover,
|
|
@@ -31093,16 +31079,16 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref2) {
|
|
|
31093
31079
|
defaultRedirect: defaultRedirect,
|
|
31094
31080
|
navigateTo: navigateTo
|
|
31095
31081
|
});
|
|
31096
|
-
})));
|
|
31082
|
+
}) : null));
|
|
31097
31083
|
};
|
|
31098
31084
|
|
|
31099
|
-
var NavigationMenuLevel3 = function NavigationMenuLevel3(
|
|
31100
|
-
var navItem =
|
|
31101
|
-
isHover =
|
|
31102
|
-
selected =
|
|
31103
|
-
setSelected =
|
|
31104
|
-
defaultRedirect =
|
|
31105
|
-
navigateTo =
|
|
31085
|
+
var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref4) {
|
|
31086
|
+
var navItem = _ref4.navItem,
|
|
31087
|
+
isHover = _ref4.isHover,
|
|
31088
|
+
selected = _ref4.selected,
|
|
31089
|
+
setSelected = _ref4.setSelected,
|
|
31090
|
+
defaultRedirect = _ref4.defaultRedirect,
|
|
31091
|
+
navigateTo = _ref4.navigateTo;
|
|
31106
31092
|
|
|
31107
31093
|
var _useState3 = React.useState(navItem.count),
|
|
31108
31094
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -31129,7 +31115,9 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref3) {
|
|
|
31129
31115
|
})
|
|
31130
31116
|
}, React__default["default"].createElement("div", {
|
|
31131
31117
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemIcon"
|
|
31132
|
-
},
|
|
31118
|
+
}, React__default["default"].createElement(NavIcon, {
|
|
31119
|
+
icon: navItem.icon
|
|
31120
|
+
})), React__default["default"].createElement("div", {
|
|
31133
31121
|
className: ((isHover ? 'hovered' : '') ? (isHover ? 'hovered' : '') + " " : "") + "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName"
|
|
31134
31122
|
}, navItem.name), React__default["default"].createElement("div", {
|
|
31135
31123
|
key: isHover,
|
|
@@ -31137,12 +31125,12 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref3) {
|
|
|
31137
31125
|
}, countText));
|
|
31138
31126
|
};
|
|
31139
31127
|
|
|
31140
|
-
var NavigationMenu = function NavigationMenu(
|
|
31141
|
-
var navItems =
|
|
31142
|
-
isHover =
|
|
31143
|
-
navigateTo =
|
|
31144
|
-
configDepth =
|
|
31145
|
-
reloadMenuItems =
|
|
31128
|
+
var NavigationMenu = function NavigationMenu(_ref5) {
|
|
31129
|
+
var navItems = _ref5.navItems,
|
|
31130
|
+
isHover = _ref5.isHover,
|
|
31131
|
+
navigateTo = _ref5.navigateTo,
|
|
31132
|
+
configDepth = _ref5.configDepth,
|
|
31133
|
+
reloadMenuItems = _ref5.reloadMenuItems;
|
|
31146
31134
|
|
|
31147
31135
|
var _useState5 = React.useState(null),
|
|
31148
31136
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -31203,10 +31191,9 @@ var NavigationMenu = function NavigationMenu(_ref4) {
|
|
|
31203
31191
|
}));
|
|
31204
31192
|
};
|
|
31205
31193
|
|
|
31206
|
-
var NavigationBar = function NavigationBar(
|
|
31207
|
-
var getNavItems =
|
|
31208
|
-
|
|
31209
|
-
navigateTo = _ref5.navigateTo;
|
|
31194
|
+
var NavigationBar = function NavigationBar(_ref6) {
|
|
31195
|
+
var getNavItems = _ref6.getNavItems,
|
|
31196
|
+
navigateTo = _ref6.navigateTo;
|
|
31210
31197
|
|
|
31211
31198
|
var _useState9 = React.useState(null),
|
|
31212
31199
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -31228,12 +31215,30 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31228
31215
|
isConfigValid = _useState16[0],
|
|
31229
31216
|
setConfigValid = _useState16[1];
|
|
31230
31217
|
|
|
31218
|
+
React.useEffect(function () {
|
|
31219
|
+
var navItems = getNavItems();
|
|
31220
|
+
|
|
31221
|
+
if (Array.isArray(navItems)) {
|
|
31222
|
+
var isValid = validateConfig(navItems);
|
|
31223
|
+
|
|
31224
|
+
if (isValid) {
|
|
31225
|
+
setConfigDepth(getDepth(navItems));
|
|
31226
|
+
setNavItemsModified(updateRoutes(navItems, ""));
|
|
31227
|
+
setConfigValid(true);
|
|
31228
|
+
} else {
|
|
31229
|
+
setConfigValid(false);
|
|
31230
|
+
}
|
|
31231
|
+
} else {
|
|
31232
|
+
reloadMenuItems();
|
|
31233
|
+
}
|
|
31234
|
+
}, []);
|
|
31235
|
+
|
|
31231
31236
|
var updateRoutes = function updateRoutes(navItems, parentRoute) {
|
|
31232
31237
|
var updatedItems = navItems.map(function (item) {
|
|
31233
31238
|
var updatedItem = _objectSpread2({}, item);
|
|
31234
31239
|
|
|
31235
31240
|
if (updatedItem.route) {
|
|
31236
|
-
updatedItem.route = parentRoute + updatedItem.route;
|
|
31241
|
+
updatedItem.route = parentRoute + '/' + updatedItem.route;
|
|
31237
31242
|
}
|
|
31238
31243
|
|
|
31239
31244
|
if (updatedItem.subMenuItems) {
|
|
@@ -31247,18 +31252,11 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31247
31252
|
|
|
31248
31253
|
var getDepth = function getDepth(navItems) {
|
|
31249
31254
|
var depth = 0;
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
|
|
31254
|
-
|
|
31255
|
-
if (tmpDepth > depth) {
|
|
31256
|
-
depth = tmpDepth;
|
|
31257
|
-
}
|
|
31258
|
-
});
|
|
31259
|
-
}
|
|
31260
|
-
|
|
31261
|
-
return 1 + depth;
|
|
31255
|
+
navItems.forEach(function (navItem) {
|
|
31256
|
+
var subMenuDepth = navItem.subMenuItems ? getDepth(navItem.subMenuItems) : 0;
|
|
31257
|
+
depth = Math.max(depth, 1 + subMenuDepth);
|
|
31258
|
+
});
|
|
31259
|
+
return depth;
|
|
31262
31260
|
};
|
|
31263
31261
|
|
|
31264
31262
|
var validateConfig = function validateConfig(navItems) {
|
|
@@ -31289,7 +31287,7 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31289
31287
|
var isVaild = validateConfig(result);
|
|
31290
31288
|
|
|
31291
31289
|
if (isVaild) {
|
|
31292
|
-
setConfigDepth(getDepth
|
|
31290
|
+
setConfigDepth(getDepth(result));
|
|
31293
31291
|
setNavItemsModified(updateRoutes(result, ""));
|
|
31294
31292
|
setConfigValid(true);
|
|
31295
31293
|
} else {
|
|
@@ -31299,24 +31297,6 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31299
31297
|
}
|
|
31300
31298
|
};
|
|
31301
31299
|
|
|
31302
|
-
React.useEffect(function () {
|
|
31303
|
-
var navItems = getNavItems();
|
|
31304
|
-
|
|
31305
|
-
if (Array.isArray(navItems)) {
|
|
31306
|
-
var isValid = validateConfig(navItems);
|
|
31307
|
-
|
|
31308
|
-
if (isValid) {
|
|
31309
|
-
setConfigDepth(getDepth.apply(void 0, _toConsumableArray(navItems)));
|
|
31310
|
-
setNavItemsModified(updateRoutes(navItems, ""));
|
|
31311
|
-
setConfigValid(true);
|
|
31312
|
-
} else {
|
|
31313
|
-
setConfigValid(false);
|
|
31314
|
-
}
|
|
31315
|
-
} else {
|
|
31316
|
-
reloadMenuItems();
|
|
31317
|
-
}
|
|
31318
|
-
}, []);
|
|
31319
|
-
|
|
31320
31300
|
var onMouseOver = function onMouseOver() {
|
|
31321
31301
|
setHover(true);
|
|
31322
31302
|
};
|
|
@@ -31325,7 +31305,7 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31325
31305
|
setHover(false);
|
|
31326
31306
|
};
|
|
31327
31307
|
|
|
31328
|
-
return
|
|
31308
|
+
return React__default["default"].createElement("div", {
|
|
31329
31309
|
className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavBarContainer",
|
|
31330
31310
|
onMouseOver: onMouseOver,
|
|
31331
31311
|
onMouseLeave: onMouseLeave
|
|
@@ -31335,7 +31315,7 @@ var NavigationBar = function NavigationBar(_ref5) {
|
|
|
31335
31315
|
navigateTo: navigateTo,
|
|
31336
31316
|
configDepth: configDepth,
|
|
31337
31317
|
reloadMenuItems: reloadMenuItems
|
|
31338
|
-
}) : null, !isConfigValid ? React__default["default"].createElement("div", null, "Please check your navigation config") : null)
|
|
31318
|
+
}) : null, !isConfigValid ? React__default["default"].createElement("div", null, "Please check your navigation config") : null);
|
|
31339
31319
|
};
|
|
31340
31320
|
|
|
31341
31321
|
/******************************************************************************
|
|
@@ -45692,20 +45672,18 @@ var AppFrame = function AppFrame(props) {
|
|
|
45692
45672
|
pathname: window.location.pathname
|
|
45693
45673
|
}), React__default["default"].createElement("main", {
|
|
45694
45674
|
className: "utilities_ops-app-frame_AppFrame_AppFrame--AppContainer"
|
|
45695
|
-
},
|
|
45675
|
+
}, props.showNavigation && storage.isAuthenticated ? React__default["default"].createElement(NavigationBar, {
|
|
45696
45676
|
navigateTo: props.navigateTo,
|
|
45697
|
-
showNavigation: props.showNavigation,
|
|
45698
45677
|
getNavItems: props.getNavItems
|
|
45699
45678
|
}) : null, React__default["default"].createElement("div", {
|
|
45700
45679
|
style: {
|
|
45701
|
-
marginLeft: props.
|
|
45680
|
+
marginLeft: props.showNavigation ? '100px' : '0px'
|
|
45702
45681
|
}
|
|
45703
45682
|
}, props.children)))))));
|
|
45704
45683
|
};
|
|
45705
45684
|
AppFrame.defaultProps = {
|
|
45706
|
-
hideNavBar: true,
|
|
45707
45685
|
handleScrolling: true,
|
|
45708
|
-
showNavigation:
|
|
45686
|
+
showNavigation: false,
|
|
45709
45687
|
getNavItems: function getNavItems() {
|
|
45710
45688
|
return [];
|
|
45711
45689
|
}
|