@thecb/components 4.0.2 → 4.0.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/index.cjs.js +240 -193
- package/package.json +1 -1
- package/src/components/molecules/obligation/Obligation.js +9 -1
- package/src/components/molecules/obligation/modules/AmountModule.js +5 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +22 -8
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +9 -2
- package/.tool-versions +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -275,21 +275,47 @@ function __spreadArrays() {
|
|
|
275
275
|
return r;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
/*! *****************************************************************************
|
|
279
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
280
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
281
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
282
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
283
|
+
|
|
284
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
285
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
286
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
287
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
288
|
+
|
|
289
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
290
|
+
and limitations under the License.
|
|
291
|
+
***************************************************************************** */
|
|
292
|
+
|
|
293
|
+
var __assign$1 = function() {
|
|
294
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
295
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
296
|
+
s = arguments[i];
|
|
297
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
298
|
+
}
|
|
299
|
+
return t;
|
|
300
|
+
};
|
|
301
|
+
return __assign$1.apply(this, arguments);
|
|
302
|
+
};
|
|
303
|
+
|
|
278
304
|
var clamp = function (min, max) { return function (v) {
|
|
279
305
|
return Math.max(Math.min(v, max), min);
|
|
280
306
|
}; };
|
|
281
307
|
var sanitize = function (v) { return (v % 1 ? Number(v.toFixed(5)) : v); };
|
|
282
308
|
var floatRegex = /(-)?(\d[\d\.]*)/g;
|
|
283
|
-
var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((
|
|
284
|
-
var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((
|
|
309
|
+
var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
|
|
310
|
+
var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i;
|
|
285
311
|
|
|
286
312
|
var number = {
|
|
287
313
|
test: function (v) { return typeof v === 'number'; },
|
|
288
314
|
parse: parseFloat,
|
|
289
315
|
transform: function (v) { return v; }
|
|
290
316
|
};
|
|
291
|
-
var alpha = __assign(__assign({}, number), { transform: clamp(0, 1) });
|
|
292
|
-
var scale = __assign(__assign({}, number), { default: 1 });
|
|
317
|
+
var alpha = __assign$1(__assign$1({}, number), { transform: clamp(0, 1) });
|
|
318
|
+
var scale = __assign$1(__assign$1({}, number), { default: 1 });
|
|
293
319
|
|
|
294
320
|
var createUnitType = function (unit) { return ({
|
|
295
321
|
test: function (v) {
|
|
@@ -303,7 +329,7 @@ var percent = createUnitType('%');
|
|
|
303
329
|
var px = createUnitType('px');
|
|
304
330
|
var vh = createUnitType('vh');
|
|
305
331
|
var vw = createUnitType('vw');
|
|
306
|
-
var progressPercentage = __assign(__assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
332
|
+
var progressPercentage = __assign$1(__assign$1({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
307
333
|
|
|
308
334
|
var getValueFromFunctionString = function (value) {
|
|
309
335
|
return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
|
|
@@ -311,17 +337,12 @@ var getValueFromFunctionString = function (value) {
|
|
|
311
337
|
var clampRgbUnit = clamp(0, 255);
|
|
312
338
|
var isRgba = function (v) { return v.red !== undefined; };
|
|
313
339
|
var isHsla = function (v) { return v.hue !== undefined; };
|
|
314
|
-
function getValuesAsArray(value) {
|
|
315
|
-
return getValueFromFunctionString(value)
|
|
316
|
-
.replace(/(,|\/)/g, ' ')
|
|
317
|
-
.split(/ \s*/);
|
|
318
|
-
}
|
|
319
340
|
var splitColorValues = function (terms) {
|
|
320
341
|
return function (v) {
|
|
321
342
|
if (typeof v !== 'string')
|
|
322
343
|
return v;
|
|
323
344
|
var values = {};
|
|
324
|
-
var valuesArray =
|
|
345
|
+
var valuesArray = getValueFromFunctionString(v).split(/,\s*/);
|
|
325
346
|
for (var i = 0; i < 4; i++) {
|
|
326
347
|
values[terms[i]] =
|
|
327
348
|
valuesArray[i] !== undefined ? parseFloat(valuesArray[i]) : 1;
|
|
@@ -330,14 +351,14 @@ var splitColorValues = function (terms) {
|
|
|
330
351
|
};
|
|
331
352
|
};
|
|
332
353
|
var rgbaTemplate = function (_a) {
|
|
333
|
-
var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
334
|
-
return "rgba(" + red + ", " + green + ", " + blue + ", " + alpha + ")";
|
|
354
|
+
var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha$$1 = _b === void 0 ? 1 : _b;
|
|
355
|
+
return "rgba(" + red + ", " + green + ", " + blue + ", " + alpha$$1 + ")";
|
|
335
356
|
};
|
|
336
357
|
var hslaTemplate = function (_a) {
|
|
337
|
-
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
338
|
-
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
|
|
358
|
+
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha$$1 = _b === void 0 ? 1 : _b;
|
|
359
|
+
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha$$1 + ")";
|
|
339
360
|
};
|
|
340
|
-
var rgbUnit = __assign(__assign({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
361
|
+
var rgbUnit = __assign$1(__assign$1({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
341
362
|
function isColorString(color, colorType) {
|
|
342
363
|
return color.startsWith(colorType) && singleColorRegex.test(color);
|
|
343
364
|
}
|
|
@@ -345,12 +366,12 @@ var rgba = {
|
|
|
345
366
|
test: function (v) { return (typeof v === 'string' ? isColorString(v, 'rgb') : isRgba(v)); },
|
|
346
367
|
parse: splitColorValues(['red', 'green', 'blue', 'alpha']),
|
|
347
368
|
transform: function (_a) {
|
|
348
|
-
var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha
|
|
369
|
+
var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha$$1 = _b === void 0 ? 1 : _b;
|
|
349
370
|
return rgbaTemplate({
|
|
350
371
|
red: rgbUnit.transform(red),
|
|
351
372
|
green: rgbUnit.transform(green),
|
|
352
373
|
blue: rgbUnit.transform(blue),
|
|
353
|
-
alpha: sanitize(alpha.transform(alpha
|
|
374
|
+
alpha: sanitize(alpha.transform(alpha$$1))
|
|
354
375
|
});
|
|
355
376
|
}
|
|
356
377
|
};
|
|
@@ -358,16 +379,16 @@ var hsla = {
|
|
|
358
379
|
test: function (v) { return (typeof v === 'string' ? isColorString(v, 'hsl') : isHsla(v)); },
|
|
359
380
|
parse: splitColorValues(['hue', 'saturation', 'lightness', 'alpha']),
|
|
360
381
|
transform: function (_a) {
|
|
361
|
-
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha
|
|
382
|
+
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha$$1 = _b === void 0 ? 1 : _b;
|
|
362
383
|
return hslaTemplate({
|
|
363
384
|
hue: Math.round(hue),
|
|
364
385
|
saturation: percent.transform(sanitize(saturation)),
|
|
365
386
|
lightness: percent.transform(sanitize(lightness)),
|
|
366
|
-
alpha: sanitize(alpha.transform(alpha
|
|
387
|
+
alpha: sanitize(alpha.transform(alpha$$1))
|
|
367
388
|
});
|
|
368
389
|
}
|
|
369
390
|
};
|
|
370
|
-
var hex = __assign(__assign({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
391
|
+
var hex = __assign$1(__assign$1({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
371
392
|
var r = '';
|
|
372
393
|
var g = '';
|
|
373
394
|
var b = '';
|
|
@@ -501,134 +522,140 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
501
522
|
};
|
|
502
523
|
}
|
|
503
524
|
|
|
504
|
-
var prevTime = 0;
|
|
505
|
-
var onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined
|
|
506
|
-
return window.requestAnimationFrame(callback);
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return callback(prevTime);
|
|
513
|
-
}, timeToCall);
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
var createStep = function (setRunNextFrame) {
|
|
517
|
-
var processToRun = [];
|
|
518
|
-
var processToRunNextFrame = [];
|
|
519
|
-
var numThisFrame = 0;
|
|
520
|
-
var isProcessing = false;
|
|
521
|
-
var i = 0;
|
|
522
|
-
var cancelled = new WeakSet();
|
|
523
|
-
var toKeepAlive = new WeakSet();
|
|
524
|
-
var renderStep = {
|
|
525
|
-
cancel: function (process) {
|
|
526
|
-
var indexOfCallback = processToRunNextFrame.indexOf(process);
|
|
527
|
-
cancelled.add(process);
|
|
528
|
-
if (indexOfCallback !== -1) {
|
|
529
|
-
processToRunNextFrame.splice(indexOfCallback, 1);
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
process: function (frame) {
|
|
533
|
-
var _a;
|
|
534
|
-
isProcessing = true;
|
|
535
|
-
_a = [processToRunNextFrame, processToRun], processToRun = _a[0], processToRunNextFrame = _a[1];
|
|
536
|
-
processToRunNextFrame.length = 0;
|
|
537
|
-
numThisFrame = processToRun.length;
|
|
538
|
-
if (numThisFrame) {
|
|
539
|
-
var process_1;
|
|
540
|
-
for (i = 0; i < numThisFrame; i++) {
|
|
541
|
-
process_1 = processToRun[i];
|
|
542
|
-
process_1(frame);
|
|
543
|
-
if (toKeepAlive.has(process_1) === true && !cancelled.has(process_1)) {
|
|
544
|
-
renderStep.schedule(process_1);
|
|
545
|
-
setRunNextFrame(true);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
isProcessing = false;
|
|
550
|
-
},
|
|
551
|
-
schedule: function (process, keepAlive, immediate) {
|
|
552
|
-
if (keepAlive === void 0) {
|
|
553
|
-
keepAlive = false;
|
|
554
|
-
}
|
|
555
|
-
if (immediate === void 0) {
|
|
556
|
-
immediate = false;
|
|
557
|
-
}
|
|
558
|
-
invariant(typeof process === "function", "Argument must be a function");
|
|
559
|
-
var addToCurrentBuffer = immediate && isProcessing;
|
|
560
|
-
var buffer = addToCurrentBuffer ? processToRun : processToRunNextFrame;
|
|
561
|
-
cancelled.delete(process);
|
|
562
|
-
if (keepAlive) toKeepAlive.add(process);
|
|
563
|
-
if (buffer.indexOf(process) === -1) {
|
|
564
|
-
buffer.push(process);
|
|
565
|
-
if (addToCurrentBuffer) numThisFrame = processToRun.length;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
525
|
+
var prevTime = 0;
|
|
526
|
+
var onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined
|
|
527
|
+
? function (callback) { return window.requestAnimationFrame(callback); }
|
|
528
|
+
: function (callback) {
|
|
529
|
+
var timestamp = Date.now();
|
|
530
|
+
var timeToCall = Math.max(0, 16.7 - (timestamp - prevTime));
|
|
531
|
+
prevTime = timestamp + timeToCall;
|
|
532
|
+
setTimeout(function () { return callback(prevTime); }, timeToCall);
|
|
568
533
|
};
|
|
569
|
-
return renderStep;
|
|
570
|
-
};
|
|
571
534
|
|
|
572
|
-
var
|
|
573
|
-
var
|
|
574
|
-
var
|
|
575
|
-
var
|
|
576
|
-
var isProcessing = false;
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
var
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
|
|
535
|
+
var createStep = (function (setRunNextFrame) {
|
|
536
|
+
var processToRun = [];
|
|
537
|
+
var processToRunNextFrame = [];
|
|
538
|
+
var numThisFrame = 0;
|
|
539
|
+
var isProcessing = false;
|
|
540
|
+
var i = 0;
|
|
541
|
+
var cancelled = new WeakSet();
|
|
542
|
+
var toKeepAlive = new WeakSet();
|
|
543
|
+
var renderStep = {
|
|
544
|
+
cancel: function (process) {
|
|
545
|
+
var indexOfCallback = processToRunNextFrame.indexOf(process);
|
|
546
|
+
cancelled.add(process);
|
|
547
|
+
if (indexOfCallback !== -1) {
|
|
548
|
+
processToRunNextFrame.splice(indexOfCallback, 1);
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
process: function (frame) {
|
|
552
|
+
var _a;
|
|
553
|
+
isProcessing = true;
|
|
554
|
+
_a = [
|
|
555
|
+
processToRunNextFrame,
|
|
556
|
+
processToRun
|
|
557
|
+
], processToRun = _a[0], processToRunNextFrame = _a[1];
|
|
558
|
+
processToRunNextFrame.length = 0;
|
|
559
|
+
numThisFrame = processToRun.length;
|
|
560
|
+
if (numThisFrame) {
|
|
561
|
+
var process_1;
|
|
562
|
+
for (i = 0; i < numThisFrame; i++) {
|
|
563
|
+
process_1 = processToRun[i];
|
|
564
|
+
process_1(frame);
|
|
565
|
+
if (toKeepAlive.has(process_1) === true && !cancelled.has(process_1)) {
|
|
566
|
+
renderStep.schedule(process_1);
|
|
567
|
+
setRunNextFrame(true);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
isProcessing = false;
|
|
572
|
+
},
|
|
573
|
+
schedule: function (process, keepAlive, immediate) {
|
|
574
|
+
if (keepAlive === void 0) { keepAlive = false; }
|
|
575
|
+
if (immediate === void 0) { immediate = false; }
|
|
576
|
+
invariant(typeof process === 'function', 'Argument must be a function');
|
|
577
|
+
var addToCurrentBuffer = immediate && isProcessing;
|
|
578
|
+
var buffer = addToCurrentBuffer ? processToRun : processToRunNextFrame;
|
|
579
|
+
cancelled.delete(process);
|
|
580
|
+
if (keepAlive)
|
|
581
|
+
toKeepAlive.add(process);
|
|
582
|
+
if (buffer.indexOf(process) === -1) {
|
|
583
|
+
buffer.push(process);
|
|
584
|
+
if (addToCurrentBuffer)
|
|
585
|
+
numThisFrame = processToRun.length;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
return renderStep;
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
var StepId;
|
|
593
|
+
(function (StepId) {
|
|
594
|
+
StepId["Read"] = "read";
|
|
595
|
+
StepId["Update"] = "update";
|
|
596
|
+
StepId["Render"] = "render";
|
|
597
|
+
StepId["PostRender"] = "postRender";
|
|
598
|
+
StepId["FixedUpdate"] = "fixedUpdate";
|
|
599
|
+
})(StepId || (StepId = {}));
|
|
600
|
+
|
|
601
|
+
var maxElapsed = 40;
|
|
602
|
+
var defaultElapsed = (1 / 60) * 1000;
|
|
603
|
+
var useDefaultElapsed = true;
|
|
604
|
+
var willRunNextFrame = false;
|
|
605
|
+
var isProcessing = false;
|
|
606
|
+
var frame = {
|
|
607
|
+
delta: 0,
|
|
608
|
+
timestamp: 0
|
|
609
|
+
};
|
|
610
|
+
var stepsOrder = [
|
|
611
|
+
StepId.Read,
|
|
612
|
+
StepId.Update,
|
|
613
|
+
StepId.Render,
|
|
614
|
+
StepId.PostRender
|
|
615
|
+
];
|
|
616
|
+
var setWillRunNextFrame = function (willRun) { return (willRunNextFrame = willRun); };
|
|
617
|
+
var _a = stepsOrder.reduce(function (acc, key) {
|
|
618
|
+
var step = createStep(setWillRunNextFrame);
|
|
619
|
+
acc.sync[key] = function (process, keepAlive, immediate) {
|
|
620
|
+
if (keepAlive === void 0) { keepAlive = false; }
|
|
621
|
+
if (immediate === void 0) { immediate = false; }
|
|
622
|
+
if (!willRunNextFrame)
|
|
623
|
+
startLoop();
|
|
624
|
+
step.schedule(process, keepAlive, immediate);
|
|
625
|
+
return process;
|
|
626
|
+
};
|
|
627
|
+
acc.cancelSync[key] = function (process) { return step.cancel(process); };
|
|
628
|
+
acc.steps[key] = step;
|
|
629
|
+
return acc;
|
|
630
|
+
}, {
|
|
631
|
+
steps: {},
|
|
632
|
+
sync: {},
|
|
633
|
+
cancelSync: {}
|
|
634
|
+
}), steps = _a.steps, sync = _a.sync, cancelSync = _a.cancelSync;
|
|
635
|
+
var processStep = function (stepId) { return steps[stepId].process(frame); };
|
|
636
|
+
var processFrame = function (timestamp) {
|
|
637
|
+
willRunNextFrame = false;
|
|
638
|
+
frame.delta = useDefaultElapsed
|
|
639
|
+
? defaultElapsed
|
|
640
|
+
: Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
|
|
641
|
+
if (!useDefaultElapsed)
|
|
642
|
+
defaultElapsed = frame.delta;
|
|
643
|
+
frame.timestamp = timestamp;
|
|
644
|
+
isProcessing = true;
|
|
645
|
+
stepsOrder.forEach(processStep);
|
|
646
|
+
isProcessing = false;
|
|
647
|
+
if (willRunNextFrame) {
|
|
648
|
+
useDefaultElapsed = false;
|
|
649
|
+
onNextFrame(processFrame);
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
var startLoop = function () {
|
|
653
|
+
willRunNextFrame = true;
|
|
654
|
+
useDefaultElapsed = true;
|
|
655
|
+
if (!isProcessing)
|
|
656
|
+
onNextFrame(processFrame);
|
|
657
|
+
};
|
|
658
|
+
var getFrameData = function () { return frame; };
|
|
632
659
|
|
|
633
660
|
var DEFAULT_OVERSHOOT_STRENGTH = 1.525;
|
|
634
661
|
var reversed = function (easing) {
|
|
@@ -903,15 +930,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
903
930
|
and limitations under the License.
|
|
904
931
|
***************************************************************************** */
|
|
905
932
|
|
|
906
|
-
var __assign$
|
|
907
|
-
__assign$
|
|
933
|
+
var __assign$2 = function() {
|
|
934
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
908
935
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
909
936
|
s = arguments[i];
|
|
910
937
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
911
938
|
}
|
|
912
939
|
return t;
|
|
913
940
|
};
|
|
914
|
-
return __assign$
|
|
941
|
+
return __assign$2.apply(this, arguments);
|
|
915
942
|
};
|
|
916
943
|
|
|
917
944
|
var mixLinearColor = function (from, to, v) {
|
|
@@ -934,7 +961,7 @@ var mixColor = (function (from, to) {
|
|
|
934
961
|
invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');
|
|
935
962
|
var fromColor = fromColorType.parse(from);
|
|
936
963
|
var toColor = toColorType.parse(to);
|
|
937
|
-
var blended = __assign$
|
|
964
|
+
var blended = __assign$2({}, fromColor);
|
|
938
965
|
var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
939
966
|
return function (v) {
|
|
940
967
|
for (var key in blended) {
|
|
@@ -979,7 +1006,7 @@ var mixArray = function (from, to) {
|
|
|
979
1006
|
};
|
|
980
1007
|
};
|
|
981
1008
|
var mixObject = function (origin, target) {
|
|
982
|
-
var output = __assign$
|
|
1009
|
+
var output = __assign$2({}, origin, target);
|
|
983
1010
|
var blendValue = {};
|
|
984
1011
|
for (var key in output) {
|
|
985
1012
|
if (origin[key] !== undefined && target[key] !== undefined) {
|
|
@@ -3369,15 +3396,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
3369
3396
|
and limitations under the License.
|
|
3370
3397
|
***************************************************************************** */
|
|
3371
3398
|
|
|
3372
|
-
var __assign$
|
|
3373
|
-
__assign$
|
|
3399
|
+
var __assign$3 = function () {
|
|
3400
|
+
__assign$3 = Object.assign || function __assign(t) {
|
|
3374
3401
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3375
3402
|
s = arguments[i];
|
|
3376
3403
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3377
3404
|
}
|
|
3378
3405
|
return t;
|
|
3379
3406
|
};
|
|
3380
|
-
return __assign$
|
|
3407
|
+
return __assign$3.apply(this, arguments);
|
|
3381
3408
|
};
|
|
3382
3409
|
|
|
3383
3410
|
function __rest$1(s, e) {
|
|
@@ -3497,12 +3524,12 @@ var intelligentTransition = {
|
|
|
3497
3524
|
opacity: linearTween,
|
|
3498
3525
|
default: tween
|
|
3499
3526
|
};
|
|
3500
|
-
var dragAction = /*#__PURE__*/__assign$
|
|
3527
|
+
var dragAction = /*#__PURE__*/__assign$3( /*#__PURE__*/__assign$3({}, intelligentTransition), { x: /*#__PURE__*/createPointer(pointerX, 'left', 'right', BoundingBoxDimension.width), y: /*#__PURE__*/createPointer(pointerY, 'top', 'bottom', BoundingBoxDimension.height) });
|
|
3501
3528
|
var justAxis = function (_a) {
|
|
3502
3529
|
var from = _a.from;
|
|
3503
3530
|
return just(from);
|
|
3504
3531
|
};
|
|
3505
|
-
var intelligentDragEnd = /*#__PURE__*/__assign$
|
|
3532
|
+
var intelligentDragEnd = /*#__PURE__*/__assign$3( /*#__PURE__*/__assign$3({}, intelligentTransition), { x: justAxis, y: justAxis });
|
|
3506
3533
|
var defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);
|
|
3507
3534
|
|
|
3508
3535
|
var animationLookup = {
|
|
@@ -3597,7 +3624,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3597
3624
|
velocity: velocity,
|
|
3598
3625
|
ease: ease
|
|
3599
3626
|
} : { ease: ease };
|
|
3600
|
-
return animationLookup[type](__assign$
|
|
3627
|
+
return animationLookup[type](__assign$3(__assign$3({}, baseProps), def));
|
|
3601
3628
|
};
|
|
3602
3629
|
var isAction = function (action$$1) {
|
|
3603
3630
|
return typeof action$$1.start !== 'undefined';
|
|
@@ -3976,7 +4003,7 @@ var convertPositionalUnits = function (state, nextPose) {
|
|
|
3976
4003
|
changedPositionalKeys.push(key);
|
|
3977
4004
|
if (!applyAtEndHasBeenCopied) {
|
|
3978
4005
|
applyAtEndHasBeenCopied = true;
|
|
3979
|
-
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$
|
|
4006
|
+
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$3({}, nextPose.applyAtEnd) : {};
|
|
3980
4007
|
}
|
|
3981
4008
|
nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];
|
|
3982
4009
|
setValue(state, key, to);
|
|
@@ -4033,7 +4060,7 @@ var createPoseConfig = function (element, _a) {
|
|
|
4033
4060
|
pressable = _a.pressable,
|
|
4034
4061
|
dragBounds = _a.dragBounds,
|
|
4035
4062
|
config = __rest$1(_a, ["onDragStart", "onDragEnd", "onPressStart", "onPressEnd", "draggable", "hoverable", "focusable", "pressable", "dragBounds"]);
|
|
4036
|
-
var poseConfig = __assign$
|
|
4063
|
+
var poseConfig = __assign$3(__assign$3({ flip: {} }, config), { props: __assign$3(__assign$3({}, config.props), { onDragStart: onDragStart,
|
|
4037
4064
|
onDragEnd: onDragEnd,
|
|
4038
4065
|
onPressStart: onPressStart,
|
|
4039
4066
|
onPressEnd: onPressEnd,
|
|
@@ -4047,8 +4074,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4047
4074
|
var _b = dragPoses(draggable),
|
|
4048
4075
|
drag = _b.drag,
|
|
4049
4076
|
dragEnd = _b.dragEnd;
|
|
4050
|
-
poseConfig.drag = __assign$
|
|
4051
|
-
poseConfig.dragEnd = __assign$
|
|
4077
|
+
poseConfig.drag = __assign$3(__assign$3({}, drag), poseConfig.drag);
|
|
4078
|
+
poseConfig.dragEnd = __assign$3(__assign$3({}, dragEnd), poseConfig.dragEnd);
|
|
4052
4079
|
}
|
|
4053
4080
|
return poseConfig;
|
|
4054
4081
|
};
|
|
@@ -4094,7 +4121,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4094
4121
|
var props = _a.props,
|
|
4095
4122
|
activeActions = _a.activeActions;
|
|
4096
4123
|
var measure = props.dimensions.measure;
|
|
4097
|
-
var poserApi = __assign$
|
|
4124
|
+
var poserApi = __assign$3(__assign$3({}, api), { addChild: function (element, childConfig) {
|
|
4098
4125
|
return api._addChild(createPoseConfig(element, childConfig), domPose);
|
|
4099
4126
|
}, measure: measure, flip: function (op) {
|
|
4100
4127
|
if (op) {
|
|
@@ -4164,7 +4191,7 @@ var pickAssign = function (shouldPick, sources) {
|
|
|
4164
4191
|
}, {});
|
|
4165
4192
|
};
|
|
4166
4193
|
|
|
4167
|
-
var _a = React.createContext({}), PoseParentConsumer = _a.Consumer, PoseParentProvider = _a.Provider;
|
|
4194
|
+
var _a$1 = React.createContext({}), PoseParentConsumer = _a$1.Consumer, PoseParentProvider = _a$1.Provider;
|
|
4168
4195
|
var calcPopFromFlowStyle = function (el) {
|
|
4169
4196
|
var offsetTop = el.offsetTop, offsetLeft = el.offsetLeft, offsetWidth = el.offsetWidth, offsetHeight = el.offsetHeight;
|
|
4170
4197
|
return {
|
|
@@ -10042,11 +10069,9 @@ function usePanGesture(_a, ref) {
|
|
|
10042
10069
|
onPanEnd && onPanEnd(event, info);
|
|
10043
10070
|
},
|
|
10044
10071
|
};
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
}
|
|
10049
|
-
});
|
|
10072
|
+
if (panSession.current !== null) {
|
|
10073
|
+
panSession.current.updateHandlers(handlers);
|
|
10074
|
+
}
|
|
10050
10075
|
function onPointerDown(event) {
|
|
10051
10076
|
panSession.current = new PanSession(event, handlers, {
|
|
10052
10077
|
transformPagePoint: transformPagePoint,
|
|
@@ -11087,7 +11112,7 @@ function useForceUpdate() {
|
|
|
11087
11112
|
|
|
11088
11113
|
var SyncLayoutContext = React.createContext(null);
|
|
11089
11114
|
|
|
11090
|
-
var _a$
|
|
11115
|
+
var _a$2;
|
|
11091
11116
|
var StepName;
|
|
11092
11117
|
(function (StepName) {
|
|
11093
11118
|
StepName["Prepare"] = "prepare";
|
|
@@ -11125,12 +11150,12 @@ var createUseSyncEffect = function (stepName) { return function (callback) {
|
|
|
11125
11150
|
jobsNeedProcessing = true;
|
|
11126
11151
|
jobs[stepName].push(callback);
|
|
11127
11152
|
}; };
|
|
11128
|
-
var layoutSync = (_a$
|
|
11129
|
-
_a$
|
|
11130
|
-
_a$
|
|
11131
|
-
_a$
|
|
11132
|
-
_a$
|
|
11133
|
-
_a$
|
|
11153
|
+
var layoutSync = (_a$2 = {},
|
|
11154
|
+
_a$2[StepName.Prepare] = createUseSyncEffect(StepName.Prepare),
|
|
11155
|
+
_a$2[StepName.Read] = createUseSyncEffect(StepName.Read),
|
|
11156
|
+
_a$2[StepName.Render] = createUseSyncEffect(StepName.Render),
|
|
11157
|
+
_a$2.flush = flushAllJobs,
|
|
11158
|
+
_a$2);
|
|
11134
11159
|
|
|
11135
11160
|
function isHTMLElement$1(element) {
|
|
11136
11161
|
return element instanceof HTMLElement;
|
|
@@ -36053,20 +36078,23 @@ var fallbackValues$t = {
|
|
|
36053
36078
|
var AutopayModal = function AutopayModal(_ref) {
|
|
36054
36079
|
var autoPayActive = _ref.autoPayActive,
|
|
36055
36080
|
autoPaySchedule = _ref.autoPaySchedule,
|
|
36081
|
+
paymentPlanSchedule = _ref.paymentPlanSchedule,
|
|
36056
36082
|
toggleModal = _ref.toggleModal,
|
|
36057
36083
|
modalOpen = _ref.modalOpen,
|
|
36058
36084
|
deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
|
|
36059
36085
|
navigateToSettings = _ref.navigateToSettings,
|
|
36060
36086
|
buttonLinkType = _ref.buttonLinkType,
|
|
36061
36087
|
isMobile = _ref.isMobile,
|
|
36062
|
-
themeValues = _ref.themeValues
|
|
36088
|
+
themeValues = _ref.themeValues,
|
|
36089
|
+
isPaymentPlan = _ref.isPaymentPlan;
|
|
36090
|
+
var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
36063
36091
|
var modalExtraProps = {
|
|
36064
|
-
modalHeaderText: autoPayActive ? "Deactivate
|
|
36065
|
-
modalBodyText: autoPayActive ? "Are you sure you want to deactivate autopay? You will need to manually make your next payment." : "To set up autopay you must save a payment method and address in your profile. Do you want to save these now?",
|
|
36066
|
-
continueButtonText: autoPayActive ? "Disable
|
|
36092
|
+
modalHeaderText: autoPayActive ? "Deactivate ".concat(planType) : "Set Up ".concat(planType),
|
|
36093
|
+
modalBodyText: autoPayActive ? "Are you sure you want to deactivate ".concat(isPaymentPlan ? "your payment plan" : "autopay", "? You will need to manually make your next payment.") : "To set up ".concat(isPaymentPlan ? "a payment plan" : "autopay", " you must save a payment method and address in your profile. Do you want to save these now?"),
|
|
36094
|
+
continueButtonText: autoPayActive ? "Disable ".concat(planType) : "Add to Profile",
|
|
36067
36095
|
useDangerButton: autoPayActive,
|
|
36068
36096
|
continueAction: autoPayActive ? function () {
|
|
36069
|
-
deactivatePaymentSchedule(autoPaySchedule);
|
|
36097
|
+
deactivatePaymentSchedule(isPaymentPlan ? paymentPlanSchedule : autoPaySchedule, isPaymentPlan);
|
|
36070
36098
|
toggleModal(false);
|
|
36071
36099
|
} : navigateToSettings
|
|
36072
36100
|
};
|
|
@@ -36076,7 +36104,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
36076
36104
|
return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
|
|
36077
36105
|
ModalLink: function ModalLink() {
|
|
36078
36106
|
return buttonLinkType ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36079
|
-
text: autoPayActive ? "Manage
|
|
36107
|
+
text: autoPayActive ? "Manage ".concat(planType) : "Set Up ".concat(planType),
|
|
36080
36108
|
variant: "tertiary",
|
|
36081
36109
|
action: function action() {
|
|
36082
36110
|
toggleModal(true);
|
|
@@ -36095,7 +36123,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
36095
36123
|
justify: isMobile ? "flex-start" : "flex-end",
|
|
36096
36124
|
align: "center"
|
|
36097
36125
|
}, /*#__PURE__*/React__default.createElement(AutopayOnIcon$1, null), /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36098
|
-
text: "
|
|
36126
|
+
text: "".concat(planType, " On"),
|
|
36099
36127
|
variant: "smallGhost",
|
|
36100
36128
|
dataQa: "Autopay On",
|
|
36101
36129
|
textExtraStyles: "font-size: 0.875rem; ",
|
|
@@ -36120,7 +36148,9 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
36120
36148
|
isMobile = _ref.isMobile,
|
|
36121
36149
|
deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
|
|
36122
36150
|
navigateToSettings = _ref.navigateToSettings,
|
|
36123
|
-
autoPaySchedule = _ref.autoPaySchedule
|
|
36151
|
+
autoPaySchedule = _ref.autoPaySchedule,
|
|
36152
|
+
paymentPlanSchedule = _ref.paymentPlanSchedule,
|
|
36153
|
+
isPaymentPlan = _ref.isPaymentPlan;
|
|
36124
36154
|
|
|
36125
36155
|
var _useState = React.useState(false),
|
|
36126
36156
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -36145,7 +36175,9 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
36145
36175
|
modalOpen: modalOpen,
|
|
36146
36176
|
navigateToSettings: navigateToSettings,
|
|
36147
36177
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36148
|
-
isMobile: isMobile
|
|
36178
|
+
isMobile: isMobile,
|
|
36179
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36180
|
+
isPaymentPlan: isPaymentPlan
|
|
36149
36181
|
})));
|
|
36150
36182
|
};
|
|
36151
36183
|
|
|
@@ -36159,7 +36191,10 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36159
36191
|
handleAutopayAction = _ref.handleAutopayAction,
|
|
36160
36192
|
deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
|
|
36161
36193
|
navigateToSettings = _ref.navigateToSettings,
|
|
36162
|
-
autoPaySchedule = _ref.autoPaySchedule
|
|
36194
|
+
autoPaySchedule = _ref.autoPaySchedule,
|
|
36195
|
+
paymentPlanSchedule = _ref.paymentPlanSchedule,
|
|
36196
|
+
isPaymentPlan = _ref.isPaymentPlan;
|
|
36197
|
+
var planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
36163
36198
|
|
|
36164
36199
|
var _useState = React.useState(false),
|
|
36165
36200
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -36211,7 +36246,9 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36211
36246
|
isMobile: isMobile,
|
|
36212
36247
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36213
36248
|
navigateToSettings: navigateToSettings,
|
|
36214
|
-
autoPaySchedule: autoPaySchedule
|
|
36249
|
+
autoPaySchedule: autoPaySchedule,
|
|
36250
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36251
|
+
isPaymentPlan: isPaymentPlan
|
|
36215
36252
|
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
36216
36253
|
padding: isMobile ? "16px" : "0"
|
|
36217
36254
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -36232,7 +36269,7 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36232
36269
|
extraStyles: isMobile && "flex-grow: 1;"
|
|
36233
36270
|
}, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36234
36271
|
variant: "tertiary",
|
|
36235
|
-
text: "Set Up
|
|
36272
|
+
text: "Set Up ".concat(planType),
|
|
36236
36273
|
action: function action() {
|
|
36237
36274
|
setDetailedObligation(obligations, config);
|
|
36238
36275
|
handleAutopayAction();
|
|
@@ -36247,7 +36284,9 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36247
36284
|
navigateToSettings: navigateToSettings,
|
|
36248
36285
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36249
36286
|
buttonLinkType: true,
|
|
36250
|
-
isMobile: isMobile
|
|
36287
|
+
isMobile: isMobile,
|
|
36288
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36289
|
+
isPaymentPlan: isPaymentPlan
|
|
36251
36290
|
})), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
36252
36291
|
padding: isMobile ? "0 0 0 8px" : "8px",
|
|
36253
36292
|
extraStyles: isMobile && "flex-grow: 1;"
|
|
@@ -36284,8 +36323,10 @@ var Obligation = function Obligation(_ref) {
|
|
|
36284
36323
|
handleAutopayAction = _ref.handleAutopayAction,
|
|
36285
36324
|
deactivatePaymentSchedule = _ref.deactivatePaymentSchedule,
|
|
36286
36325
|
autoPaySchedule = _ref.autoPaySchedule,
|
|
36326
|
+
paymentPlanSchedule = _ref.paymentPlanSchedule,
|
|
36287
36327
|
navigateToSettings = _ref.navigateToSettings,
|
|
36288
|
-
isMobile = _ref.isMobile
|
|
36328
|
+
isMobile = _ref.isMobile,
|
|
36329
|
+
isPaymentPlan = _ref.isPaymentPlan;
|
|
36289
36330
|
var obligation = obligations[0];
|
|
36290
36331
|
var customAttributes = obligation.customAttributes;
|
|
36291
36332
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -36329,7 +36370,9 @@ var Obligation = function Obligation(_ref) {
|
|
|
36329
36370
|
isMobile: isMobile,
|
|
36330
36371
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36331
36372
|
navigateToSettings: navigateToSettings,
|
|
36332
|
-
autoPaySchedule: autoPaySchedule
|
|
36373
|
+
autoPaySchedule: autoPaySchedule,
|
|
36374
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36375
|
+
isPaymentPlan: isPaymentPlan
|
|
36333
36376
|
}))), !isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
|
|
36334
36377
|
obligations: obligations,
|
|
36335
36378
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -36337,10 +36380,12 @@ var Obligation = function Obligation(_ref) {
|
|
|
36337
36380
|
handleAutopayAction: handleAutopayAction,
|
|
36338
36381
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36339
36382
|
autoPaySchedule: autoPaySchedule,
|
|
36383
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36340
36384
|
navigateToSettings: navigateToSettings,
|
|
36341
36385
|
config: config,
|
|
36342
36386
|
actions: actions,
|
|
36343
|
-
isMobile: isMobile
|
|
36387
|
+
isMobile: isMobile,
|
|
36388
|
+
isPaymentPlan: isPaymentPlan
|
|
36344
36389
|
}))), isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
|
|
36345
36390
|
obligations: obligations,
|
|
36346
36391
|
autoPayEnabled: autoPayEnabled,
|
|
@@ -36348,10 +36393,12 @@ var Obligation = function Obligation(_ref) {
|
|
|
36348
36393
|
handleAutopayAction: handleAutopayAction,
|
|
36349
36394
|
deactivatePaymentSchedule: deactivatePaymentSchedule,
|
|
36350
36395
|
autoPaySchedule: autoPaySchedule,
|
|
36396
|
+
paymentPlanSchedule: paymentPlanSchedule,
|
|
36351
36397
|
navigateToSettings: navigateToSettings,
|
|
36352
36398
|
config: config,
|
|
36353
36399
|
actions: actions,
|
|
36354
|
-
isMobile: isMobile
|
|
36400
|
+
isMobile: isMobile,
|
|
36401
|
+
isPaymentPlan: isPaymentPlan
|
|
36355
36402
|
}));
|
|
36356
36403
|
};
|
|
36357
36404
|
|
package/package.json
CHANGED
|
@@ -17,8 +17,10 @@ const Obligation = ({
|
|
|
17
17
|
handleAutopayAction,
|
|
18
18
|
deactivatePaymentSchedule,
|
|
19
19
|
autoPaySchedule,
|
|
20
|
+
paymentPlanSchedule,
|
|
20
21
|
navigateToSettings,
|
|
21
|
-
isMobile
|
|
22
|
+
isMobile,
|
|
23
|
+
isPaymentPlan
|
|
22
24
|
}) => {
|
|
23
25
|
const obligation = obligations[0];
|
|
24
26
|
const { customAttributes } = obligation;
|
|
@@ -67,6 +69,8 @@ const Obligation = ({
|
|
|
67
69
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
68
70
|
navigateToSettings={navigateToSettings}
|
|
69
71
|
autoPaySchedule={autoPaySchedule}
|
|
72
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
73
|
+
isPaymentPlan={isPaymentPlan}
|
|
70
74
|
/>
|
|
71
75
|
)}
|
|
72
76
|
</Cluster>
|
|
@@ -79,10 +83,12 @@ const Obligation = ({
|
|
|
79
83
|
handleAutopayAction={handleAutopayAction}
|
|
80
84
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
81
85
|
autoPaySchedule={autoPaySchedule}
|
|
86
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
82
87
|
navigateToSettings={navigateToSettings}
|
|
83
88
|
config={config}
|
|
84
89
|
actions={actions}
|
|
85
90
|
isMobile={isMobile}
|
|
91
|
+
isPaymentPlan={isPaymentPlan}
|
|
86
92
|
/>
|
|
87
93
|
)}
|
|
88
94
|
</Stack>
|
|
@@ -95,10 +101,12 @@ const Obligation = ({
|
|
|
95
101
|
handleAutopayAction={handleAutopayAction}
|
|
96
102
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
97
103
|
autoPaySchedule={autoPaySchedule}
|
|
104
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
98
105
|
navigateToSettings={navigateToSettings}
|
|
99
106
|
config={config}
|
|
100
107
|
actions={actions}
|
|
101
108
|
isMobile={isMobile}
|
|
109
|
+
isPaymentPlan={isPaymentPlan}
|
|
102
110
|
/>
|
|
103
111
|
)}
|
|
104
112
|
</Box>
|
|
@@ -12,7 +12,9 @@ const AmountModule = ({
|
|
|
12
12
|
isMobile,
|
|
13
13
|
deactivatePaymentSchedule,
|
|
14
14
|
navigateToSettings,
|
|
15
|
-
autoPaySchedule
|
|
15
|
+
autoPaySchedule,
|
|
16
|
+
paymentPlanSchedule,
|
|
17
|
+
isPaymentPlan
|
|
16
18
|
}) => {
|
|
17
19
|
const [modalOpen, toggleModal] = useState(false);
|
|
18
20
|
return (
|
|
@@ -38,6 +40,8 @@ const AmountModule = ({
|
|
|
38
40
|
navigateToSettings={navigateToSettings}
|
|
39
41
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
40
42
|
isMobile={isMobile}
|
|
43
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
44
|
+
isPaymentPlan={isPaymentPlan}
|
|
41
45
|
/>
|
|
42
46
|
)}
|
|
43
47
|
</Stack>
|
|
@@ -9,24 +9,38 @@ import { themeComponent } from "../../../../util/themeUtils";
|
|
|
9
9
|
const AutopayModal = ({
|
|
10
10
|
autoPayActive,
|
|
11
11
|
autoPaySchedule,
|
|
12
|
+
paymentPlanSchedule,
|
|
12
13
|
toggleModal,
|
|
13
14
|
modalOpen,
|
|
14
15
|
deactivatePaymentSchedule,
|
|
15
16
|
navigateToSettings,
|
|
16
17
|
buttonLinkType,
|
|
17
18
|
isMobile,
|
|
18
|
-
themeValues
|
|
19
|
+
themeValues,
|
|
20
|
+
isPaymentPlan
|
|
19
21
|
}) => {
|
|
22
|
+
const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
20
23
|
const modalExtraProps = {
|
|
21
|
-
modalHeaderText: autoPayActive
|
|
24
|
+
modalHeaderText: autoPayActive
|
|
25
|
+
? `Deactivate ${planType}`
|
|
26
|
+
: `Set Up ${planType}`,
|
|
22
27
|
modalBodyText: autoPayActive
|
|
23
|
-
?
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
? `Are you sure you want to deactivate ${
|
|
29
|
+
isPaymentPlan ? "your payment plan" : "autopay"
|
|
30
|
+
}? You will need to manually make your next payment.`
|
|
31
|
+
: `To set up ${
|
|
32
|
+
isPaymentPlan ? "a payment plan" : "autopay"
|
|
33
|
+
} you must save a payment method and address in your profile. Do you want to save these now?`,
|
|
34
|
+
continueButtonText: autoPayActive
|
|
35
|
+
? `Disable ${planType}`
|
|
36
|
+
: "Add to Profile",
|
|
26
37
|
useDangerButton: autoPayActive,
|
|
27
38
|
continueAction: autoPayActive
|
|
28
39
|
? () => {
|
|
29
|
-
deactivatePaymentSchedule(
|
|
40
|
+
deactivatePaymentSchedule(
|
|
41
|
+
isPaymentPlan ? paymentPlanSchedule : autoPaySchedule,
|
|
42
|
+
isPaymentPlan
|
|
43
|
+
);
|
|
30
44
|
toggleModal(false);
|
|
31
45
|
}
|
|
32
46
|
: navigateToSettings
|
|
@@ -50,7 +64,7 @@ const AutopayModal = ({
|
|
|
50
64
|
ModalLink={() =>
|
|
51
65
|
buttonLinkType ? (
|
|
52
66
|
<ButtonWithAction
|
|
53
|
-
text={autoPayActive ?
|
|
67
|
+
text={autoPayActive ? `Manage ${planType}` : `Set Up ${planType}`}
|
|
54
68
|
variant="tertiary"
|
|
55
69
|
action={() => {
|
|
56
70
|
toggleModal(true);
|
|
@@ -74,7 +88,7 @@ const AutopayModal = ({
|
|
|
74
88
|
>
|
|
75
89
|
<AutopayOnIcon />
|
|
76
90
|
<ButtonWithAction
|
|
77
|
-
text=
|
|
91
|
+
text={`${planType} On`}
|
|
78
92
|
variant="smallGhost"
|
|
79
93
|
dataQa="Autopay On"
|
|
80
94
|
textExtraStyles={`font-size: 0.875rem; `}
|
|
@@ -15,8 +15,11 @@ const PaymentDetailsActions = ({
|
|
|
15
15
|
handleAutopayAction,
|
|
16
16
|
deactivatePaymentSchedule,
|
|
17
17
|
navigateToSettings,
|
|
18
|
-
autoPaySchedule
|
|
18
|
+
autoPaySchedule,
|
|
19
|
+
paymentPlanSchedule,
|
|
20
|
+
isPaymentPlan
|
|
19
21
|
}) => {
|
|
22
|
+
const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
20
23
|
const [isLoading, setIsLoading] = useState(false);
|
|
21
24
|
const [modalOpen, toggleModal] = useState(false);
|
|
22
25
|
const { obligationSlug } = config;
|
|
@@ -64,6 +67,8 @@ const PaymentDetailsActions = ({
|
|
|
64
67
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
65
68
|
navigateToSettings={navigateToSettings}
|
|
66
69
|
autoPaySchedule={autoPaySchedule}
|
|
70
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
71
|
+
isPaymentPlan={isPaymentPlan}
|
|
67
72
|
/>
|
|
68
73
|
</Cluster>
|
|
69
74
|
</Box>
|
|
@@ -97,7 +102,7 @@ const PaymentDetailsActions = ({
|
|
|
97
102
|
{autoPayAvailable && !autoPayEnabled ? (
|
|
98
103
|
<ButtonWithAction
|
|
99
104
|
variant="tertiary"
|
|
100
|
-
text=
|
|
105
|
+
text={`Set Up ${planType}`}
|
|
101
106
|
action={() => {
|
|
102
107
|
setDetailedObligation(obligations, config);
|
|
103
108
|
handleAutopayAction();
|
|
@@ -115,6 +120,8 @@ const PaymentDetailsActions = ({
|
|
|
115
120
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
116
121
|
buttonLinkType
|
|
117
122
|
isMobile={isMobile}
|
|
123
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
124
|
+
isPaymentPlan={isPaymentPlan}
|
|
118
125
|
/>
|
|
119
126
|
)}
|
|
120
127
|
</Box>
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|