hplx-feature-library 1.0.68 → 1.0.69
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/Attachments/index.js +10359 -11747
- package/dist/{CustomDropdown-D9OCNP2e.js → CustomDropdown-CiA1c9VP.js} +56 -55
- package/dist/{CustomDropdown-DC-Kvy1B.cjs → CustomDropdown-DOC_x4S1.cjs} +6 -6
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/components/datepicker/DateAndTimePicker.d.ts +18 -0
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6163 -4
- package/dist/parseISO-AwyR5Nhg.cjs +1 -0
- package/dist/parseISO-Cso9HWPX.js +1414 -0
- package/package.json +3 -1
|
@@ -215,7 +215,7 @@ function pt() {
|
|
|
215
215
|
}(Oe)), Oe.exports;
|
|
216
216
|
}
|
|
217
217
|
var Fe;
|
|
218
|
-
function
|
|
218
|
+
function _e() {
|
|
219
219
|
if (Fe) return $;
|
|
220
220
|
Fe = 1, Object.defineProperty($, "__esModule", {
|
|
221
221
|
value: !0
|
|
@@ -233,7 +233,7 @@ function Ve() {
|
|
|
233
233
|
qe = 1, Object.defineProperty(k, "__esModule", {
|
|
234
234
|
value: !0
|
|
235
235
|
}), k.resetState = p, k.log = g, k.assertNodeList = e, k.setElement = O, k.validateElement = h, k.hide = i, k.show = n, k.documentNotReadyOrSSRTesting = u;
|
|
236
|
-
var f = dt(), o = a(f), d =
|
|
236
|
+
var f = dt(), o = a(f), d = _e();
|
|
237
237
|
function a(c) {
|
|
238
238
|
return c && c.__esModule ? c : { default: c };
|
|
239
239
|
}
|
|
@@ -460,9 +460,9 @@ function vt() {
|
|
|
460
460
|
});
|
|
461
461
|
var d = Object.assign || function(l) {
|
|
462
462
|
for (var r = 1; r < arguments.length; r++) {
|
|
463
|
-
var
|
|
464
|
-
for (var t in
|
|
465
|
-
Object.prototype.hasOwnProperty.call(
|
|
463
|
+
var _ = arguments[r];
|
|
464
|
+
for (var t in _)
|
|
465
|
+
Object.prototype.hasOwnProperty.call(_, t) && (l[t] = _[t]);
|
|
466
466
|
}
|
|
467
467
|
return l;
|
|
468
468
|
}, a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
|
|
@@ -470,24 +470,24 @@ function vt() {
|
|
|
470
470
|
} : function(l) {
|
|
471
471
|
return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l;
|
|
472
472
|
}, s = /* @__PURE__ */ function() {
|
|
473
|
-
function l(r,
|
|
474
|
-
for (var t = 0; t <
|
|
475
|
-
var m =
|
|
473
|
+
function l(r, _) {
|
|
474
|
+
for (var t = 0; t < _.length; t++) {
|
|
475
|
+
var m = _[t];
|
|
476
476
|
m.enumerable = m.enumerable || !1, m.configurable = !0, "value" in m && (m.writable = !0), Object.defineProperty(r, m.key, m);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
return function(r,
|
|
480
|
-
return
|
|
479
|
+
return function(r, _, t) {
|
|
480
|
+
return _ && l(r.prototype, _), t && l(r, t), r;
|
|
481
481
|
};
|
|
482
|
-
}(), p = Be, g = /* @__PURE__ */ $e(), e = z(g), O = ft(), h = H(O), i = ct(), n = z(i), u = Ve(), c = H(u), y = ht(), E = H(y), M =
|
|
482
|
+
}(), p = Be, g = /* @__PURE__ */ $e(), e = z(g), O = ft(), h = H(O), i = ct(), n = z(i), u = Ve(), c = H(u), y = ht(), E = H(y), M = _e(), T = z(M), A = Ge(), W = z(A);
|
|
483
483
|
mt();
|
|
484
484
|
function H(l) {
|
|
485
485
|
if (l && l.__esModule)
|
|
486
486
|
return l;
|
|
487
487
|
var r = {};
|
|
488
488
|
if (l != null)
|
|
489
|
-
for (var
|
|
490
|
-
Object.prototype.hasOwnProperty.call(l,
|
|
489
|
+
for (var _ in l)
|
|
490
|
+
Object.prototype.hasOwnProperty.call(l, _) && (r[_] = l[_]);
|
|
491
491
|
return r.default = l, r;
|
|
492
492
|
}
|
|
493
493
|
function z(l) {
|
|
@@ -514,11 +514,11 @@ function vt() {
|
|
|
514
514
|
return r.code === "Tab" || r.keyCode === 9;
|
|
515
515
|
}, b = function(r) {
|
|
516
516
|
return r.code === "Escape" || r.keyCode === 27;
|
|
517
|
-
}, v = 0,
|
|
517
|
+
}, v = 0, x = function(l) {
|
|
518
518
|
G(r, l);
|
|
519
|
-
function r(
|
|
519
|
+
function r(_) {
|
|
520
520
|
L(this, r);
|
|
521
|
-
var t = F(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this,
|
|
521
|
+
var t = F(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this, _));
|
|
522
522
|
return t.setOverlayRef = function(m) {
|
|
523
523
|
t.overlay = m, t.props.overlayRef && t.props.overlayRef(m);
|
|
524
524
|
}, t.setContentRef = function(m) {
|
|
@@ -640,13 +640,13 @@ function vt() {
|
|
|
640
640
|
}
|
|
641
641
|
}]), r;
|
|
642
642
|
}(p.Component);
|
|
643
|
-
|
|
643
|
+
x.defaultProps = {
|
|
644
644
|
style: {
|
|
645
645
|
overlay: {},
|
|
646
646
|
content: {}
|
|
647
647
|
},
|
|
648
648
|
defaultStyles: {}
|
|
649
|
-
},
|
|
649
|
+
}, x.propTypes = {
|
|
650
650
|
isOpen: e.default.bool.isRequired,
|
|
651
651
|
defaultStyles: e.default.shape({
|
|
652
652
|
content: e.default.object,
|
|
@@ -683,7 +683,7 @@ function vt() {
|
|
|
683
683
|
overlayElement: e.default.func,
|
|
684
684
|
contentElement: e.default.func,
|
|
685
685
|
testId: e.default.string
|
|
686
|
-
}, o.default =
|
|
686
|
+
}, o.default = x, f.exports = o.default;
|
|
687
687
|
}(le, le.exports)), le.exports;
|
|
688
688
|
}
|
|
689
689
|
function Ke() {
|
|
@@ -758,29 +758,29 @@ function Ot() {
|
|
|
758
758
|
}), V.bodyOpenClassName = V.portalClassName = void 0;
|
|
759
759
|
var f = Object.assign || function(b) {
|
|
760
760
|
for (var v = 1; v < arguments.length; v++) {
|
|
761
|
-
var
|
|
762
|
-
for (var l in
|
|
763
|
-
Object.prototype.hasOwnProperty.call(
|
|
761
|
+
var x = arguments[v];
|
|
762
|
+
for (var l in x)
|
|
763
|
+
Object.prototype.hasOwnProperty.call(x, l) && (b[l] = x[l]);
|
|
764
764
|
}
|
|
765
765
|
return b;
|
|
766
766
|
}, o = /* @__PURE__ */ function() {
|
|
767
|
-
function b(v,
|
|
768
|
-
for (var l = 0; l <
|
|
769
|
-
var r =
|
|
767
|
+
function b(v, x) {
|
|
768
|
+
for (var l = 0; l < x.length; l++) {
|
|
769
|
+
var r = x[l];
|
|
770
770
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(v, r.key, r);
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
|
-
return function(v,
|
|
774
|
-
return
|
|
773
|
+
return function(v, x, l) {
|
|
774
|
+
return x && b(v.prototype, x), l && b(v, l), v;
|
|
775
775
|
};
|
|
776
|
-
}(), d = Be, a = M(d), s = ut, p = M(s), g = /* @__PURE__ */ $e(), e = M(g), O = vt(), h = M(O), i = Ve(), n = E(i), u =
|
|
776
|
+
}(), d = Be, a = M(d), s = ut, p = M(s), g = /* @__PURE__ */ $e(), e = M(g), O = vt(), h = M(O), i = Ve(), n = E(i), u = _e(), c = M(u), y = gt;
|
|
777
777
|
function E(b) {
|
|
778
778
|
if (b && b.__esModule)
|
|
779
779
|
return b;
|
|
780
780
|
var v = {};
|
|
781
781
|
if (b != null)
|
|
782
|
-
for (var
|
|
783
|
-
Object.prototype.hasOwnProperty.call(b,
|
|
782
|
+
for (var x in b)
|
|
783
|
+
Object.prototype.hasOwnProperty.call(b, x) && (v[x] = b[x]);
|
|
784
784
|
return v.default = b, v;
|
|
785
785
|
}
|
|
786
786
|
function M(b) {
|
|
@@ -811,11 +811,11 @@ function Ot() {
|
|
|
811
811
|
var j = function(b) {
|
|
812
812
|
W(v, b);
|
|
813
813
|
function v() {
|
|
814
|
-
var
|
|
814
|
+
var x, l, r, _;
|
|
815
815
|
T(this, v);
|
|
816
816
|
for (var t = arguments.length, m = Array(t), w = 0; w < t; w++)
|
|
817
817
|
m[w] = arguments[w];
|
|
818
|
-
return
|
|
818
|
+
return _ = (l = (r = A(this, (x = v.__proto__ || Object.getPrototypeOf(v)).call.apply(x, [this].concat(m))), r), r.removePortal = function() {
|
|
819
819
|
!L && p.default.unmountComponentAtNode(r.node);
|
|
820
820
|
var S = U(r.props.parentSelector);
|
|
821
821
|
S && S.contains(r.node) ? S.removeChild(r.node) : console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
|
|
@@ -824,7 +824,7 @@ function Ot() {
|
|
|
824
824
|
}, r.renderPortal = function(S) {
|
|
825
825
|
var R = G(), P = R(r, a.default.createElement(h.default, f({ defaultStyles: v.defaultStyles }, S)), r.node);
|
|
826
826
|
r.portalRef(P);
|
|
827
|
-
}, l), A(r,
|
|
827
|
+
}, l), A(r, _);
|
|
828
828
|
}
|
|
829
829
|
return o(v, [{
|
|
830
830
|
key: "componentDidMount",
|
|
@@ -838,16 +838,16 @@ function Ot() {
|
|
|
838
838
|
}, {
|
|
839
839
|
key: "getSnapshotBeforeUpdate",
|
|
840
840
|
value: function(l) {
|
|
841
|
-
var r = U(l.parentSelector),
|
|
842
|
-
return { prevParent: r, nextParent:
|
|
841
|
+
var r = U(l.parentSelector), _ = U(this.props.parentSelector);
|
|
842
|
+
return { prevParent: r, nextParent: _ };
|
|
843
843
|
}
|
|
844
844
|
}, {
|
|
845
845
|
key: "componentDidUpdate",
|
|
846
|
-
value: function(l, r,
|
|
846
|
+
value: function(l, r, _) {
|
|
847
847
|
if (u.canUseDOM) {
|
|
848
848
|
var t = this.props, m = t.isOpen, w = t.portalClassName;
|
|
849
849
|
l.portalClassName !== w && (this.node.className = w);
|
|
850
|
-
var S =
|
|
850
|
+
var S = _.prevParent, R = _.nextParent;
|
|
851
851
|
R !== S && (S.removeChild(this.node), R.appendChild(this.node)), !(!l.isOpen && !m) && !L && this.renderPortal(this.props);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
@@ -855,8 +855,8 @@ function Ot() {
|
|
|
855
855
|
key: "componentWillUnmount",
|
|
856
856
|
value: function() {
|
|
857
857
|
if (!(!u.canUseDOM || !this.node || !this.portal)) {
|
|
858
|
-
var l = this.portal.state, r = Date.now(),
|
|
859
|
-
|
|
858
|
+
var l = this.portal.state, r = Date.now(), _ = l.isOpen && this.props.closeTimeoutMS && (l.closesAt || r + this.props.closeTimeoutMS);
|
|
859
|
+
_ ? (l.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, _ - r)) : this.removePortal();
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
}, {
|
|
@@ -934,18 +934,18 @@ function Ot() {
|
|
|
934
934
|
parentSelector: function() {
|
|
935
935
|
return document.body;
|
|
936
936
|
},
|
|
937
|
-
overlayElement: function(v,
|
|
937
|
+
overlayElement: function(v, x) {
|
|
938
938
|
return a.default.createElement(
|
|
939
939
|
"div",
|
|
940
940
|
v,
|
|
941
|
-
|
|
941
|
+
x
|
|
942
942
|
);
|
|
943
943
|
},
|
|
944
|
-
contentElement: function(v,
|
|
944
|
+
contentElement: function(v, x) {
|
|
945
945
|
return a.default.createElement(
|
|
946
946
|
"div",
|
|
947
947
|
v,
|
|
948
|
-
|
|
948
|
+
x
|
|
949
949
|
);
|
|
950
950
|
}
|
|
951
951
|
}, j.defaultStyles = {
|
|
@@ -989,7 +989,7 @@ function Ct() {
|
|
|
989
989
|
}(ae, ae.exports)), ae.exports;
|
|
990
990
|
}
|
|
991
991
|
var wt = Ct();
|
|
992
|
-
const
|
|
992
|
+
const _t = /* @__PURE__ */ at(wt), Dt = (f) => {
|
|
993
993
|
const {
|
|
994
994
|
openState: o,
|
|
995
995
|
closePopupCallback: d,
|
|
@@ -1004,7 +1004,7 @@ const xt = /* @__PURE__ */ at(wt), Dt = (f) => {
|
|
|
1004
1004
|
negativeActionCallback: n
|
|
1005
1005
|
} = f;
|
|
1006
1006
|
return /* @__PURE__ */ C.jsxs(
|
|
1007
|
-
|
|
1007
|
+
_t,
|
|
1008
1008
|
{
|
|
1009
1009
|
isOpen: o,
|
|
1010
1010
|
onRequestClose: d,
|
|
@@ -1062,7 +1062,7 @@ const xt = /* @__PURE__ */ at(wt), Dt = (f) => {
|
|
|
1062
1062
|
]
|
|
1063
1063
|
}
|
|
1064
1064
|
);
|
|
1065
|
-
},
|
|
1065
|
+
}, xt = (f, o) => {
|
|
1066
1066
|
fe(() => {
|
|
1067
1067
|
const d = (a) => {
|
|
1068
1068
|
f.current && !f.current.contains(a.target) && o();
|
|
@@ -1126,10 +1126,10 @@ function Pt(f) {
|
|
|
1126
1126
|
toggleChangeHandler: j,
|
|
1127
1127
|
selectedToggleOption: b,
|
|
1128
1128
|
toggleOptionsList: v,
|
|
1129
|
-
border:
|
|
1129
|
+
border: x,
|
|
1130
1130
|
height: l,
|
|
1131
1131
|
disabled: r,
|
|
1132
|
-
fieldColor:
|
|
1132
|
+
fieldColor: _,
|
|
1133
1133
|
errorMsg: t,
|
|
1134
1134
|
showErrorMsg: m,
|
|
1135
1135
|
placeholderStyle: w,
|
|
@@ -1142,7 +1142,7 @@ function Pt(f) {
|
|
|
1142
1142
|
alternateListBgStyle: ce,
|
|
1143
1143
|
showLabelTooltip: de = !1,
|
|
1144
1144
|
labelToolTipContent: Je = "",
|
|
1145
|
-
inputContainerClasses:
|
|
1145
|
+
inputContainerClasses: xe = "",
|
|
1146
1146
|
onInputFocus: pe
|
|
1147
1147
|
} = f, [Y, Q] = be(!1), [X, Qe] = be(null), oe = re(null), he = re(null), Ee = re(null), me = re([]), Xe = it(() => O?.filter((N) => N ? N.label.toLowerCase().includes((n ?? "").toLowerCase()) : void 0), [n, O]), [et, ve] = be(!1), tt = () => {
|
|
1148
1148
|
Q(!1), F && u && u(""), Qe(null);
|
|
@@ -1169,7 +1169,7 @@ function Pt(f) {
|
|
|
1169
1169
|
return Y ? (ee(), window.addEventListener("scroll", ee, !0)) : window.removeEventListener("scroll", ee, !0), () => {
|
|
1170
1170
|
window.removeEventListener("scroll", ee, !0);
|
|
1171
1171
|
};
|
|
1172
|
-
}, [P, ee, Y]),
|
|
1172
|
+
}, [P, ee, Y]), xt(oe, () => {
|
|
1173
1173
|
et && c && c();
|
|
1174
1174
|
});
|
|
1175
1175
|
const Me = (N) => {
|
|
@@ -1193,7 +1193,7 @@ function Pt(f) {
|
|
|
1193
1193
|
/* @__PURE__ */ C.jsxs(
|
|
1194
1194
|
"div",
|
|
1195
1195
|
{
|
|
1196
|
-
className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${
|
|
1196
|
+
className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${xe || ""} ${x || "hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${t ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${l || "hfl-h-10"} ${r ? "!hfl-bg-Gray-50 !hfl-pointer-events-none" : _ || "hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,
|
|
1197
1197
|
onClick: r ? () => {
|
|
1198
1198
|
} : Ne,
|
|
1199
1199
|
children: [
|
|
@@ -1233,7 +1233,7 @@ function Pt(f) {
|
|
|
1233
1233
|
type: M,
|
|
1234
1234
|
placeholder: e,
|
|
1235
1235
|
value: n,
|
|
1236
|
-
className: `input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${r ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" :
|
|
1236
|
+
className: `input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${r ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : _ || "hfl-bg-White"} ${y || ""}`,
|
|
1237
1237
|
onChange: (N) => {
|
|
1238
1238
|
u && u(N.target.value), ve(!0);
|
|
1239
1239
|
},
|
|
@@ -1270,7 +1270,7 @@ function Pt(f) {
|
|
|
1270
1270
|
{
|
|
1271
1271
|
ref: Ee,
|
|
1272
1272
|
onClick: Ne,
|
|
1273
|
-
className: `hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${g || ""} ${
|
|
1273
|
+
className: `hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${g || ""} ${x || "hfl-border-1"} ${t ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${l || "hfl-h-[40px]"} ${r ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : ""}`,
|
|
1274
1274
|
style: W || h?.label ? {} : w ? {
|
|
1275
1275
|
fontFamily: w?.fontFamily,
|
|
1276
1276
|
fontSize: w?.fontSize,
|
|
@@ -1346,6 +1346,7 @@ function Pt(f) {
|
|
|
1346
1346
|
export {
|
|
1347
1347
|
Dt as A,
|
|
1348
1348
|
Pt as C,
|
|
1349
|
-
|
|
1350
|
-
Nt as T
|
|
1349
|
+
_t as M,
|
|
1350
|
+
Nt as T,
|
|
1351
|
+
xt as u
|
|
1351
1352
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const y=require("./index-B1oZkAWG.cjs"),D=require("react"),
|
|
1
|
+
"use strict";const y=require("./index-B1oZkAWG.cjs"),D=require("react"),et=require("react-dom");var ae={exports:{}},G={},le={exports:{}},q={},se={exports:{}},_e;function ke(){return _e||(_e=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=i;/*!
|
|
2
2
|
* Adapted from jQuery UI core
|
|
3
3
|
*
|
|
4
4
|
* http://jqueryui.com
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* http://jquery.org/license
|
|
9
9
|
*
|
|
10
10
|
* http://api.jqueryui.com/category/ui-core/
|
|
11
|
-
*/var d="none",a="contents",s=/^(input|select|textarea|button|object|iframe)$/;function p(n,u){return u.getPropertyValue("overflow")!=="visible"||n.scrollWidth<=0&&n.scrollHeight<=0}function x(n){var u=n.offsetWidth<=0&&n.offsetHeight<=0;if(u&&!n.innerHTML)return!0;try{var c=window.getComputedStyle(n),b=c.getPropertyValue("display");return u?b!==a&&p(n,c):b===d}catch{return console.warn("Failed to inspect element style"),!1}}function e(n){for(var u=n,c=n.getRootNode&&n.getRootNode();u&&u!==document.body;){if(c&&u===c&&(u=c.host.parentNode),x(u))return!1;u=u.parentNode}return!0}function E(n,u){var c=n.nodeName.toLowerCase(),b=s.test(c)&&!n.disabled||c==="a"&&n.href||u;return b&&e(n)}function h(n){var u=n.getAttribute("tabindex");u===null&&(u=void 0);var c=isNaN(u);return(c||u>=0)&&E(n,!c)}function i(n){var u=[].slice.call(n.querySelectorAll("*"),0).reduce(function(c,b){return c.concat(b.shadowRoot?i(b.shadowRoot):[b])},[]);return u.filter(h)}f.exports=o.default}(se,se.exports)),se.exports}var Ne;function
|
|
11
|
+
*/var d="none",a="contents",s=/^(input|select|textarea|button|object|iframe)$/;function p(n,u){return u.getPropertyValue("overflow")!=="visible"||n.scrollWidth<=0&&n.scrollHeight<=0}function x(n){var u=n.offsetWidth<=0&&n.offsetHeight<=0;if(u&&!n.innerHTML)return!0;try{var c=window.getComputedStyle(n),b=c.getPropertyValue("display");return u?b!==a&&p(n,c):b===d}catch{return console.warn("Failed to inspect element style"),!1}}function e(n){for(var u=n,c=n.getRootNode&&n.getRootNode();u&&u!==document.body;){if(c&&u===c&&(u=c.host.parentNode),x(u))return!1;u=u.parentNode}return!0}function E(n,u){var c=n.nodeName.toLowerCase(),b=s.test(c)&&!n.disabled||c==="a"&&n.href||u;return b&&e(n)}function h(n){var u=n.getAttribute("tabindex");u===null&&(u=void 0);var c=isNaN(u);return(c||u>=0)&&E(n,!c)}function i(n){var u=[].slice.call(n.querySelectorAll("*"),0).reduce(function(c,b){return c.concat(b.shadowRoot?i(b.shadowRoot):[b])},[]);return u.filter(h)}f.exports=o.default}(se,se.exports)),se.exports}var Ne;function tt(){if(Ne)return q;Ne=1,Object.defineProperty(q,"__esModule",{value:!0}),q.resetState=x,q.log=e,q.handleBlur=E,q.handleFocus=h,q.markForFocusLater=i,q.returnFocus=n,q.popWithoutFocus=u,q.setupScopedFocus=c,q.teardownScopedFocus=b;var f=ke(),o=d(f);function d(_){return _&&_.__esModule?_:{default:_}}var a=[],s=null,p=!1;function x(){a=[]}function e(){process.env.NODE_ENV!=="production"&&(console.log("focusManager ----------"),a.forEach(function(_){var S=_||{};console.log(S.nodeName,S.className,S.id)}),console.log("end focusManager ----------"))}function E(){p=!0}function h(){if(p){if(p=!1,!s)return;setTimeout(function(){if(!s.contains(document.activeElement)){var _=(0,o.default)(s)[0]||s;_.focus()}},0)}}function i(){a.push(document.activeElement)}function n(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,S=null;try{a.length!==0&&(S=a.pop(),S.focus({preventScroll:_}));return}catch{console.warn(["You tried to return focus to",S,"but it is not in the DOM anymore"].join(" "))}}function u(){a.length>0&&a.pop()}function c(_){s=_,window.addEventListener?(window.addEventListener("blur",E,!1),document.addEventListener("focus",h,!0)):(window.attachEvent("onBlur",E),document.attachEvent("onFocus",h))}function b(){s=null,window.addEventListener?(window.removeEventListener("blur",E),document.removeEventListener("focus",h)):(window.detachEvent("onBlur",E),document.detachEvent("onFocus",h))}return q}var ie={exports:{}},Re;function nt(){return Re||(Re=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=x;var d=ke(),a=s(d);function s(e){return e&&e.__esModule?e:{default:e}}function p(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return e.activeElement.shadowRoot?p(e.activeElement.shadowRoot):e.activeElement}function x(e,E){var h=(0,a.default)(e);if(!h.length){E.preventDefault();return}var i=void 0,n=E.shiftKey,u=h[0],c=h[h.length-1],b=p();if(e===b){if(!n)return;i=c}if(c===b&&!n&&(i=u),u===b&&n&&(i=c),i){E.preventDefault(),i.focus();return}var _=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),S=_!=null&&_[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(S){var T=h.indexOf(b);if(T>-1&&(T+=n?-1:1),i=h[T],typeof i>"u"){E.preventDefault(),i=n?c:u,i.focus();return}E.preventDefault(),i.focus()}}f.exports=o.default}(ie,ie.exports)),ie.exports}var H={},ve,Se;function ot(){if(Se)return ve;Se=1;var f=process.env.NODE_ENV!=="production",o=function(){};if(f){var d=function(s,p){var x=arguments.length;p=new Array(x>1?x-1:0);for(var e=1;e<x;e++)p[e-1]=arguments[e];var E=0,h="Warning: "+s.replace(/%s/g,function(){return p[E++]});typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}};o=function(a,s,p){var x=arguments.length;p=new Array(x>2?x-2:0);for(var e=2;e<x;e++)p[e-2]=arguments[e];if(s===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");a||d.apply(null,[s].concat(p))}}return ve=o,ve}var B={},ye={exports:{}};/*!
|
|
12
12
|
Copyright (c) 2015 Jed Watson.
|
|
13
13
|
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
14
14
|
All rights reserved.
|
|
15
|
-
*/var Me;function
|
|
15
|
+
*/var Me;function rt(){return Me||(Me=1,function(f){(function(){var o=!!(typeof window<"u"&&window.document&&window.document.createElement),d={canUseDOM:o,canUseWorkers:typeof Worker<"u",canUseEventListeners:o&&!!(window.addEventListener||window.attachEvent),canUseViewport:o&&!!window.screen};f.exports?f.exports=d:window.ExecutionEnvironment=d})()}(ye)),ye.exports}var Te;function be(){if(Te)return B;Te=1,Object.defineProperty(B,"__esModule",{value:!0}),B.canUseDOM=B.SafeNodeList=B.SafeHTMLCollection=void 0;var f=rt(),o=d(f);function d(p){return p&&p.__esModule?p:{default:p}}var a=o.default,s=a.canUseDOM?window.HTMLElement:{};return B.SafeHTMLCollection=a.canUseDOM?window.HTMLCollection:{},B.SafeNodeList=a.canUseDOM?window.NodeList:{},B.canUseDOM=a.canUseDOM,B.default=s,B}var De;function We(){if(De)return H;De=1,Object.defineProperty(H,"__esModule",{value:!0}),H.resetState=p,H.log=x,H.assertNodeList=e,H.setElement=E,H.validateElement=h,H.hide=i,H.show=n,H.documentNotReadyOrSSRTesting=u;var f=ot(),o=a(f),d=be();function a(c){return c&&c.__esModule?c:{default:c}}var s=null;function p(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):s.length!=null?s.forEach(function(c){return c.removeAttribute("aria-hidden")}):document.querySelectorAll(s).forEach(function(c){return c.removeAttribute("aria-hidden")})),s=null}function x(){if(process.env.NODE_ENV!=="production"){var c=s||{};console.log("ariaAppHider ----------"),console.log(c.nodeName,c.className,c.id),console.log("end ariaAppHider ----------")}}function e(c,b){if(!c||!c.length)throw new Error("react-modal: No elements were found for selector "+b+".")}function E(c){var b=c;if(typeof b=="string"&&d.canUseDOM){var _=document.querySelectorAll(b);e(_,b),b=_}return s=b||s,s}function h(c){var b=c||s;return b?Array.isArray(b)||b instanceof HTMLCollection||b instanceof NodeList?b:[b]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function i(c){var b=!0,_=!1,S=void 0;try{for(var T=h(c)[Symbol.iterator](),A;!(b=(A=T.next()).done);b=!0){var k=A.value;k.setAttribute("aria-hidden","true")}}catch(W){_=!0,S=W}finally{try{!b&&T.return&&T.return()}finally{if(_)throw S}}}function n(c){var b=!0,_=!1,S=void 0;try{for(var T=h(c)[Symbol.iterator](),A;!(b=(A=T.next()).done);b=!0){var k=A.value;k.removeAttribute("aria-hidden")}}catch(W){_=!0,S=W}finally{try{!b&&T.return&&T.return()}finally{if(_)throw S}}}function u(){s=null}return H}var J={},Pe;function at(){if(Pe)return J;Pe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.resetState=a,J.log=s;var f={},o={};function d(h,i){h.classList.remove(i)}function a(){var h=document.getElementsByTagName("html")[0];for(var i in f)d(h,f[i]);var n=document.body;for(var u in o)d(n,o[u]);f={},o={}}function s(){if(process.env.NODE_ENV!=="production"){var h=document.getElementsByTagName("html")[0].className,i=`Show tracked classes:
|
|
16
16
|
|
|
17
17
|
`;i+="<html /> ("+h+`):
|
|
18
18
|
`;for(var n in f)i+=" "+n+" "+f[n]+`
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
doc.body (`+h+`):
|
|
22
22
|
`;for(var u in o)i+=" "+u+" "+o[u]+`
|
|
23
23
|
`;i+=`
|
|
24
|
-
`,console.log(i)}}var p=function(i,n){return i[n]||(i[n]=0),i[n]+=1,n},x=function(i,n){return i[n]&&(i[n]-=1),n},e=function(i,n,u){u.forEach(function(c){p(n,c),i.add(c)})},E=function(i,n,u){u.forEach(function(c){x(n,c),n[c]===0&&i.remove(c)})};return J.add=function(i,n){return e(i.classList,i.nodeName.toLowerCase()=="html"?f:o,n.split(" "))},J.remove=function(i,n){return E(i.classList,i.nodeName.toLowerCase()=="html"?f:o,n.split(" "))},J}var Q={},je;function He(){if(je)return Q;je=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.log=a,Q.resetState=s;function f(p,x){if(!(p instanceof x))throw new TypeError("Cannot call a class as a function")}var o=function p(){var x=this;f(this,p),this.register=function(e){if(x.openInstances.indexOf(e)!==-1){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Cannot register modal instance that's already open");return}x.openInstances.push(e),x.emit("register")},this.deregister=function(e){var E=x.openInstances.indexOf(e);if(E===-1){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Unable to deregister "+e+" as it was never registered");return}x.openInstances.splice(E,1),x.emit("deregister")},this.subscribe=function(e){x.subscribers.push(e)},this.emit=function(e){x.subscribers.forEach(function(E){return E(e,x.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},d=new o;function a(){console.log("portalOpenInstances ----------"),console.log(d.openInstances.length),d.openInstances.forEach(function(p){return console.log(p)}),console.log("end portalOpenInstances ----------")}function s(){d=new o}return Q.default=d,Q}var ne={},Ae;function at(){if(Ae)return ne;Ae=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.resetState=x,ne.log=e;var f=He(),o=d(f);function d(i){return i&&i.__esModule?i:{default:i}}var a=void 0,s=void 0,p=[];function x(){for(var i=[a,s],n=0;n<i.length;n++){var u=i[n];u&&u.parentNode&&u.parentNode.removeChild(u)}a=s=null,p=[]}function e(){console.log("bodyTrap ----------"),console.log(p.length);for(var i=[a,s],n=0;n<i.length;n++){var u=i[n],c=u||{};console.log(c.nodeName,c.className,c.id)}console.log("edn bodyTrap ----------")}function E(){if(p.length===0){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Open instances > 0 expected");return}p[p.length-1].focusContent()}function h(i,n){!a&&!s&&(a=document.createElement("div"),a.setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",E),s=a.cloneNode(),s.addEventListener("focus",E)),p=n,p.length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}return o.default.subscribe(h),ne}var Le;function lt(){return Le||(Le=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0});var d=Object.assign||function(l){for(var r=1;r<arguments.length;r++){var C=arguments[r];for(var t in C)Object.prototype.hasOwnProperty.call(C,t)&&(l[t]=C[t])}return l},a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},s=function(){function l(r,C){for(var t=0;t<C.length;t++){var m=C[t];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(r,m.key,m)}}return function(r,C,t){return C&&l(r.prototype,C),t&&l(r,t),r}}(),p=D,x=y.requirePropTypes(),e=V(x),E=et(),h=W(E),i=tt(),n=V(i),u=We(),c=W(u),b=rt(),_=W(b),S=be(),T=V(S),A=He(),k=V(A);at();function W(l){if(l&&l.__esModule)return l;var r={};if(l!=null)for(var C in l)Object.prototype.hasOwnProperty.call(l,C)&&(r[C]=l[C]);return r.default=l,r}function V(l){return l&&l.__esModule?l:{default:l}}function L(l,r){if(!(l instanceof r))throw new TypeError("Cannot call a class as a function")}function F(l,r){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:l}function K(l,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);l.prototype=Object.create(r&&r.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(l,r):l.__proto__=r)}var U={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},I=function(r){return r.code==="Tab"||r.keyCode===9},g=function(r){return r.code==="Escape"||r.keyCode===27},v=0,w=function(l){K(r,l);function r(C){L(this,r);var t=F(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,C));return t.setOverlayRef=function(m){t.overlay=m,t.props.overlayRef&&t.props.overlayRef(m)},t.setContentRef=function(m){t.content=m,t.props.contentRef&&t.props.contentRef(m)},t.afterClose=function(){var m=t.props,O=m.appElement,R=m.ariaHideApp,M=m.htmlOpenClassName,j=m.bodyOpenClassName,z=m.parentSelector,Y=z&&z().ownerDocument||document;j&&_.remove(Y.body,j),M&&_.remove(Y.getElementsByTagName("html")[0],M),R&&v>0&&(v-=1,v===0&&c.show(O)),t.props.shouldFocusAfterRender&&(t.props.shouldReturnFocusAfterClose?(h.returnFocus(t.props.preventScroll),h.teardownScopedFocus()):h.popWithoutFocus()),t.props.onAfterClose&&t.props.onAfterClose(),k.default.deregister(t)},t.open=function(){t.beforeOpen(),t.state.afterOpen&&t.state.beforeClose?(clearTimeout(t.closeTimer),t.setState({beforeClose:!1})):(t.props.shouldFocusAfterRender&&(h.setupScopedFocus(t.node),h.markForFocusLater()),t.setState({isOpen:!0},function(){t.openAnimationFrame=requestAnimationFrame(function(){t.setState({afterOpen:!0}),t.props.isOpen&&t.props.onAfterOpen&&t.props.onAfterOpen({overlayEl:t.overlay,contentEl:t.content})})}))},t.close=function(){t.props.closeTimeoutMS>0?t.closeWithTimeout():t.closeWithoutTimeout()},t.focusContent=function(){return t.content&&!t.contentHasFocus()&&t.content.focus({preventScroll:!0})},t.closeWithTimeout=function(){var m=Date.now()+t.props.closeTimeoutMS;t.setState({beforeClose:!0,closesAt:m},function(){t.closeTimer=setTimeout(t.closeWithoutTimeout,t.state.closesAt-Date.now())})},t.closeWithoutTimeout=function(){t.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},t.afterClose)},t.handleKeyDown=function(m){I(m)&&(0,n.default)(t.content,m),t.props.shouldCloseOnEsc&&g(m)&&(m.stopPropagation(),t.requestClose(m))},t.handleOverlayOnClick=function(m){t.shouldClose===null&&(t.shouldClose=!0),t.shouldClose&&t.props.shouldCloseOnOverlayClick&&(t.ownerHandlesClose()?t.requestClose(m):t.focusContent()),t.shouldClose=null},t.handleContentOnMouseUp=function(){t.shouldClose=!1},t.handleOverlayOnMouseDown=function(m){!t.props.shouldCloseOnOverlayClick&&m.target==t.overlay&&m.preventDefault()},t.handleContentOnClick=function(){t.shouldClose=!1},t.handleContentOnMouseDown=function(){t.shouldClose=!1},t.requestClose=function(m){return t.ownerHandlesClose()&&t.props.onRequestClose(m)},t.ownerHandlesClose=function(){return t.props.onRequestClose},t.shouldBeClosed=function(){return!t.state.isOpen&&!t.state.beforeClose},t.contentHasFocus=function(){return document.activeElement===t.content||t.content.contains(document.activeElement)},t.buildClassName=function(m,O){var R=(typeof O>"u"?"undefined":a(O))==="object"?O:{base:U[m],afterOpen:U[m]+"--after-open",beforeClose:U[m]+"--before-close"},M=R.base;return t.state.afterOpen&&(M=M+" "+R.afterOpen),t.state.beforeClose&&(M=M+" "+R.beforeClose),typeof O=="string"&&O?M+" "+O:M},t.attributesFromObject=function(m,O){return Object.keys(O).reduce(function(R,M){return R[m+"-"+M]=O[M],R},{})},t.state={afterOpen:!1,beforeClose:!1},t.shouldClose=null,t.moveFromContentToOverlay=null,t}return s(r,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(t,m){process.env.NODE_ENV!=="production"&&(t.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),t.htmlOpenClassName!==this.props.htmlOpenClassName&&console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')),this.props.isOpen&&!t.isOpen?this.open():!this.props.isOpen&&t.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!m.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var t=this.props,m=t.appElement,O=t.ariaHideApp,R=t.htmlOpenClassName,M=t.bodyOpenClassName,j=t.parentSelector,z=j&&j().ownerDocument||document;M&&_.add(z.body,M),R&&_.add(z.getElementsByTagName("html")[0],R),O&&(v+=1,c.hide(m)),k.default.register(this)}},{key:"render",value:function(){var t=this.props,m=t.id,O=t.className,R=t.overlayClassName,M=t.defaultStyles,j=t.children,z=O?{}:M.content,Y=R?{}:M.overlay;if(this.shouldBeClosed())return null;var oe={ref:this.setOverlayRef,className:this.buildClassName("overlay",R),style:d({},Y,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},ue=d({id:m,ref:this.setContentRef,style:d({},z,this.props.style.content),className:this.buildClassName("content",O),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",d({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),fe=this.props.contentElement(ue,j);return this.props.overlayElement(oe,fe)}}]),r}(p.Component);w.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},w.propTypes={isOpen:e.default.bool.isRequired,defaultStyles:e.default.shape({content:e.default.object,overlay:e.default.object}),style:e.default.shape({content:e.default.object,overlay:e.default.object}),className:e.default.oneOfType([e.default.string,e.default.object]),overlayClassName:e.default.oneOfType([e.default.string,e.default.object]),parentSelector:e.default.func,bodyOpenClassName:e.default.string,htmlOpenClassName:e.default.string,ariaHideApp:e.default.bool,appElement:e.default.oneOfType([e.default.instanceOf(T.default),e.default.instanceOf(S.SafeHTMLCollection),e.default.instanceOf(S.SafeNodeList),e.default.arrayOf(e.default.instanceOf(T.default))]),onAfterOpen:e.default.func,onAfterClose:e.default.func,onRequestClose:e.default.func,closeTimeoutMS:e.default.number,shouldFocusAfterRender:e.default.bool,shouldCloseOnOverlayClick:e.default.bool,shouldReturnFocusAfterClose:e.default.bool,preventScroll:e.default.bool,role:e.default.string,contentLabel:e.default.string,aria:e.default.object,data:e.default.object,children:e.default.node,shouldCloseOnEsc:e.default.bool,overlayRef:e.default.func,contentRef:e.default.func,id:e.default.string,overlayElement:e.default.func,contentElement:e.default.func,testId:e.default.string},o.default=w,f.exports=o.default}(le,le.exports)),le.exports}function Ue(){var f=this.constructor.getDerivedStateFromProps(this.props,this.state);f!=null&&this.setState(f)}function Ie(f){function o(d){var a=this.constructor.getDerivedStateFromProps(f,d);return a??null}this.setState(o.bind(this))}function $e(f,o){try{var d=this.props,a=this.state;this.props=f,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(d,a)}finally{this.props=d,this.state=a}}Ue.__suppressDeprecationWarning=!0;Ie.__suppressDeprecationWarning=!0;$e.__suppressDeprecationWarning=!0;function st(f){var o=f.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof f.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return f;var d=null,a=null,s=null;if(typeof o.componentWillMount=="function"?d="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(d="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?a="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(a="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?s="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(s="UNSAFE_componentWillUpdate"),d!==null||a!==null||s!==null){var p=f.displayName||f.name,x=typeof f.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
24
|
+
`,console.log(i)}}var p=function(i,n){return i[n]||(i[n]=0),i[n]+=1,n},x=function(i,n){return i[n]&&(i[n]-=1),n},e=function(i,n,u){u.forEach(function(c){p(n,c),i.add(c)})},E=function(i,n,u){u.forEach(function(c){x(n,c),n[c]===0&&i.remove(c)})};return J.add=function(i,n){return e(i.classList,i.nodeName.toLowerCase()=="html"?f:o,n.split(" "))},J.remove=function(i,n){return E(i.classList,i.nodeName.toLowerCase()=="html"?f:o,n.split(" "))},J}var Q={},je;function He(){if(je)return Q;je=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.log=a,Q.resetState=s;function f(p,x){if(!(p instanceof x))throw new TypeError("Cannot call a class as a function")}var o=function p(){var x=this;f(this,p),this.register=function(e){if(x.openInstances.indexOf(e)!==-1){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Cannot register modal instance that's already open");return}x.openInstances.push(e),x.emit("register")},this.deregister=function(e){var E=x.openInstances.indexOf(e);if(E===-1){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Unable to deregister "+e+" as it was never registered");return}x.openInstances.splice(E,1),x.emit("deregister")},this.subscribe=function(e){x.subscribers.push(e)},this.emit=function(e){x.subscribers.forEach(function(E){return E(e,x.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},d=new o;function a(){console.log("portalOpenInstances ----------"),console.log(d.openInstances.length),d.openInstances.forEach(function(p){return console.log(p)}),console.log("end portalOpenInstances ----------")}function s(){d=new o}return Q.default=d,Q}var ne={},Ae;function lt(){if(Ae)return ne;Ae=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.resetState=x,ne.log=e;var f=He(),o=d(f);function d(i){return i&&i.__esModule?i:{default:i}}var a=void 0,s=void 0,p=[];function x(){for(var i=[a,s],n=0;n<i.length;n++){var u=i[n];u&&u.parentNode&&u.parentNode.removeChild(u)}a=s=null,p=[]}function e(){console.log("bodyTrap ----------"),console.log(p.length);for(var i=[a,s],n=0;n<i.length;n++){var u=i[n],c=u||{};console.log(c.nodeName,c.className,c.id)}console.log("edn bodyTrap ----------")}function E(){if(p.length===0){process.env.NODE_ENV!=="production"&&console.warn("React-Modal: Open instances > 0 expected");return}p[p.length-1].focusContent()}function h(i,n){!a&&!s&&(a=document.createElement("div"),a.setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",E),s=a.cloneNode(),s.addEventListener("focus",E)),p=n,p.length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}return o.default.subscribe(h),ne}var Le;function st(){return Le||(Le=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0});var d=Object.assign||function(l){for(var r=1;r<arguments.length;r++){var C=arguments[r];for(var t in C)Object.prototype.hasOwnProperty.call(C,t)&&(l[t]=C[t])}return l},a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},s=function(){function l(r,C){for(var t=0;t<C.length;t++){var m=C[t];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(r,m.key,m)}}return function(r,C,t){return C&&l(r.prototype,C),t&&l(r,t),r}}(),p=D,x=y.requirePropTypes(),e=V(x),E=tt(),h=W(E),i=nt(),n=V(i),u=We(),c=W(u),b=at(),_=W(b),S=be(),T=V(S),A=He(),k=V(A);lt();function W(l){if(l&&l.__esModule)return l;var r={};if(l!=null)for(var C in l)Object.prototype.hasOwnProperty.call(l,C)&&(r[C]=l[C]);return r.default=l,r}function V(l){return l&&l.__esModule?l:{default:l}}function L(l,r){if(!(l instanceof r))throw new TypeError("Cannot call a class as a function")}function F(l,r){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:l}function K(l,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);l.prototype=Object.create(r&&r.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(l,r):l.__proto__=r)}var U={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},I=function(r){return r.code==="Tab"||r.keyCode===9},g=function(r){return r.code==="Escape"||r.keyCode===27},v=0,w=function(l){K(r,l);function r(C){L(this,r);var t=F(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,C));return t.setOverlayRef=function(m){t.overlay=m,t.props.overlayRef&&t.props.overlayRef(m)},t.setContentRef=function(m){t.content=m,t.props.contentRef&&t.props.contentRef(m)},t.afterClose=function(){var m=t.props,O=m.appElement,R=m.ariaHideApp,M=m.htmlOpenClassName,j=m.bodyOpenClassName,z=m.parentSelector,Y=z&&z().ownerDocument||document;j&&_.remove(Y.body,j),M&&_.remove(Y.getElementsByTagName("html")[0],M),R&&v>0&&(v-=1,v===0&&c.show(O)),t.props.shouldFocusAfterRender&&(t.props.shouldReturnFocusAfterClose?(h.returnFocus(t.props.preventScroll),h.teardownScopedFocus()):h.popWithoutFocus()),t.props.onAfterClose&&t.props.onAfterClose(),k.default.deregister(t)},t.open=function(){t.beforeOpen(),t.state.afterOpen&&t.state.beforeClose?(clearTimeout(t.closeTimer),t.setState({beforeClose:!1})):(t.props.shouldFocusAfterRender&&(h.setupScopedFocus(t.node),h.markForFocusLater()),t.setState({isOpen:!0},function(){t.openAnimationFrame=requestAnimationFrame(function(){t.setState({afterOpen:!0}),t.props.isOpen&&t.props.onAfterOpen&&t.props.onAfterOpen({overlayEl:t.overlay,contentEl:t.content})})}))},t.close=function(){t.props.closeTimeoutMS>0?t.closeWithTimeout():t.closeWithoutTimeout()},t.focusContent=function(){return t.content&&!t.contentHasFocus()&&t.content.focus({preventScroll:!0})},t.closeWithTimeout=function(){var m=Date.now()+t.props.closeTimeoutMS;t.setState({beforeClose:!0,closesAt:m},function(){t.closeTimer=setTimeout(t.closeWithoutTimeout,t.state.closesAt-Date.now())})},t.closeWithoutTimeout=function(){t.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},t.afterClose)},t.handleKeyDown=function(m){I(m)&&(0,n.default)(t.content,m),t.props.shouldCloseOnEsc&&g(m)&&(m.stopPropagation(),t.requestClose(m))},t.handleOverlayOnClick=function(m){t.shouldClose===null&&(t.shouldClose=!0),t.shouldClose&&t.props.shouldCloseOnOverlayClick&&(t.ownerHandlesClose()?t.requestClose(m):t.focusContent()),t.shouldClose=null},t.handleContentOnMouseUp=function(){t.shouldClose=!1},t.handleOverlayOnMouseDown=function(m){!t.props.shouldCloseOnOverlayClick&&m.target==t.overlay&&m.preventDefault()},t.handleContentOnClick=function(){t.shouldClose=!1},t.handleContentOnMouseDown=function(){t.shouldClose=!1},t.requestClose=function(m){return t.ownerHandlesClose()&&t.props.onRequestClose(m)},t.ownerHandlesClose=function(){return t.props.onRequestClose},t.shouldBeClosed=function(){return!t.state.isOpen&&!t.state.beforeClose},t.contentHasFocus=function(){return document.activeElement===t.content||t.content.contains(document.activeElement)},t.buildClassName=function(m,O){var R=(typeof O>"u"?"undefined":a(O))==="object"?O:{base:U[m],afterOpen:U[m]+"--after-open",beforeClose:U[m]+"--before-close"},M=R.base;return t.state.afterOpen&&(M=M+" "+R.afterOpen),t.state.beforeClose&&(M=M+" "+R.beforeClose),typeof O=="string"&&O?M+" "+O:M},t.attributesFromObject=function(m,O){return Object.keys(O).reduce(function(R,M){return R[m+"-"+M]=O[M],R},{})},t.state={afterOpen:!1,beforeClose:!1},t.shouldClose=null,t.moveFromContentToOverlay=null,t}return s(r,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(t,m){process.env.NODE_ENV!=="production"&&(t.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),t.htmlOpenClassName!==this.props.htmlOpenClassName&&console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')),this.props.isOpen&&!t.isOpen?this.open():!this.props.isOpen&&t.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!m.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var t=this.props,m=t.appElement,O=t.ariaHideApp,R=t.htmlOpenClassName,M=t.bodyOpenClassName,j=t.parentSelector,z=j&&j().ownerDocument||document;M&&_.add(z.body,M),R&&_.add(z.getElementsByTagName("html")[0],R),O&&(v+=1,c.hide(m)),k.default.register(this)}},{key:"render",value:function(){var t=this.props,m=t.id,O=t.className,R=t.overlayClassName,M=t.defaultStyles,j=t.children,z=O?{}:M.content,Y=R?{}:M.overlay;if(this.shouldBeClosed())return null;var oe={ref:this.setOverlayRef,className:this.buildClassName("overlay",R),style:d({},Y,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},ue=d({id:m,ref:this.setContentRef,style:d({},z,this.props.style.content),className:this.buildClassName("content",O),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",d({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),fe=this.props.contentElement(ue,j);return this.props.overlayElement(oe,fe)}}]),r}(p.Component);w.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},w.propTypes={isOpen:e.default.bool.isRequired,defaultStyles:e.default.shape({content:e.default.object,overlay:e.default.object}),style:e.default.shape({content:e.default.object,overlay:e.default.object}),className:e.default.oneOfType([e.default.string,e.default.object]),overlayClassName:e.default.oneOfType([e.default.string,e.default.object]),parentSelector:e.default.func,bodyOpenClassName:e.default.string,htmlOpenClassName:e.default.string,ariaHideApp:e.default.bool,appElement:e.default.oneOfType([e.default.instanceOf(T.default),e.default.instanceOf(S.SafeHTMLCollection),e.default.instanceOf(S.SafeNodeList),e.default.arrayOf(e.default.instanceOf(T.default))]),onAfterOpen:e.default.func,onAfterClose:e.default.func,onRequestClose:e.default.func,closeTimeoutMS:e.default.number,shouldFocusAfterRender:e.default.bool,shouldCloseOnOverlayClick:e.default.bool,shouldReturnFocusAfterClose:e.default.bool,preventScroll:e.default.bool,role:e.default.string,contentLabel:e.default.string,aria:e.default.object,data:e.default.object,children:e.default.node,shouldCloseOnEsc:e.default.bool,overlayRef:e.default.func,contentRef:e.default.func,id:e.default.string,overlayElement:e.default.func,contentElement:e.default.func,testId:e.default.string},o.default=w,f.exports=o.default}(le,le.exports)),le.exports}function Ue(){var f=this.constructor.getDerivedStateFromProps(this.props,this.state);f!=null&&this.setState(f)}function Ie(f){function o(d){var a=this.constructor.getDerivedStateFromProps(f,d);return a??null}this.setState(o.bind(this))}function $e(f,o){try{var d=this.props,a=this.state;this.props=f,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(d,a)}finally{this.props=d,this.state=a}}Ue.__suppressDeprecationWarning=!0;Ie.__suppressDeprecationWarning=!0;$e.__suppressDeprecationWarning=!0;function it(f){var o=f.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof f.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return f;var d=null,a=null,s=null;if(typeof o.componentWillMount=="function"?d="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(d="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?a="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(a="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?s="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(s="UNSAFE_componentWillUpdate"),d!==null||a!==null||s!==null){var p=f.displayName||f.name,x=typeof f.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
25
25
|
|
|
26
26
|
`+p+" uses "+x+" but also contains the following legacy lifecycles:"+(d!==null?`
|
|
27
27
|
`+d:"")+(a!==null?`
|
|
@@ -29,7 +29,7 @@ doc.body (`+h+`):
|
|
|
29
29
|
`+s:"")+`
|
|
30
30
|
|
|
31
31
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
32
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof f.getDerivedStateFromProps=="function"&&(o.componentWillMount=Ue,o.componentWillReceiveProps=Ie),typeof o.getSnapshotBeforeUpdate=="function"){if(typeof o.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");o.componentWillUpdate=$e;var e=o.componentDidUpdate;o.componentDidUpdate=function(h,i,n){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;e.call(this,h,i,u)}}return f}const it=Object.freeze(Object.defineProperty({__proto__:null,polyfill:st},Symbol.toStringTag,{value:"Module"})),ut=y.getAugmentedNamespace(it);var Fe;function ft(){if(Fe)return G;Fe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.bodyOpenClassName=G.portalClassName=void 0;var f=Object.assign||function(g){for(var v=1;v<arguments.length;v++){var w=arguments[v];for(var l in w)Object.prototype.hasOwnProperty.call(w,l)&&(g[l]=w[l])}return g},o=function(){function g(v,w){for(var l=0;l<w.length;l++){var r=w[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(v,r.key,r)}}return function(v,w,l){return w&&g(v.prototype,w),l&&g(v,l),v}}(),d=D,a=S(d),s=Xe,p=S(s),x=y.requirePropTypes(),e=S(x),E=lt(),h=S(E),i=We(),n=_(i),u=be(),c=S(u),b=ut;function _(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var w in g)Object.prototype.hasOwnProperty.call(g,w)&&(v[w]=g[w]);return v.default=g,v}function S(g){return g&&g.__esModule?g:{default:g}}function T(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function A(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function k(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var W=G.portalClassName="ReactModalPortal",V=G.bodyOpenClassName="ReactModal__Body--open",L=u.canUseDOM&&p.default.createPortal!==void 0,F=function(v){return document.createElement(v)},K=function(){return L?p.default.createPortal:p.default.unstable_renderSubtreeIntoContainer};function U(g){return g()}var I=function(g){k(v,g);function v(){var w,l,r,C;T(this,v);for(var t=arguments.length,m=Array(t),O=0;O<t;O++)m[O]=arguments[O];return C=(l=(r=A(this,(w=v.__proto__||Object.getPrototypeOf(v)).call.apply(w,[this].concat(m))),r),r.removePortal=function(){!L&&p.default.unmountComponentAtNode(r.node);var R=U(r.props.parentSelector);R&&R.contains(r.node)?R.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(R){r.portal=R},r.renderPortal=function(R){var M=K(),j=M(r,a.default.createElement(h.default,f({defaultStyles:v.defaultStyles},R)),r.node);r.portalRef(j)},l),A(r,C)}return o(v,[{key:"componentDidMount",value:function(){if(u.canUseDOM){L||(this.node=F("div")),this.node.className=this.props.portalClassName;var l=U(this.props.parentSelector);l.appendChild(this.node),!L&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(l){var r=U(l.parentSelector),C=U(this.props.parentSelector);return{prevParent:r,nextParent:C}}},{key:"componentDidUpdate",value:function(l,r,C){if(u.canUseDOM){var t=this.props,m=t.isOpen,O=t.portalClassName;l.portalClassName!==O&&(this.node.className=O);var R=C.prevParent,M=C.nextParent;M!==R&&(R.removeChild(this.node),M.appendChild(this.node)),!(!l.isOpen&&!m)&&!L&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!u.canUseDOM||!this.node||!this.portal)){var l=this.portal.state,r=Date.now(),C=l.isOpen&&this.props.closeTimeoutMS&&(l.closesAt||r+this.props.closeTimeoutMS);C?(l.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,C-r)):this.removePortal()}}},{key:"render",value:function(){if(!u.canUseDOM||!L)return null;!this.node&&L&&(this.node=F("div"));var l=K();return l(a.default.createElement(h.default,f({ref:this.portalRef,defaultStyles:v.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(l){n.setElement(l)}}]),v}(d.Component);return I.propTypes={isOpen:e.default.bool.isRequired,style:e.default.shape({content:e.default.object,overlay:e.default.object}),portalClassName:e.default.string,bodyOpenClassName:e.default.string,htmlOpenClassName:e.default.string,className:e.default.oneOfType([e.default.string,e.default.shape({base:e.default.string.isRequired,afterOpen:e.default.string.isRequired,beforeClose:e.default.string.isRequired})]),overlayClassName:e.default.oneOfType([e.default.string,e.default.shape({base:e.default.string.isRequired,afterOpen:e.default.string.isRequired,beforeClose:e.default.string.isRequired})]),appElement:e.default.oneOfType([e.default.instanceOf(c.default),e.default.instanceOf(u.SafeHTMLCollection),e.default.instanceOf(u.SafeNodeList),e.default.arrayOf(e.default.instanceOf(c.default))]),onAfterOpen:e.default.func,onRequestClose:e.default.func,closeTimeoutMS:e.default.number,ariaHideApp:e.default.bool,shouldFocusAfterRender:e.default.bool,shouldCloseOnOverlayClick:e.default.bool,shouldReturnFocusAfterClose:e.default.bool,preventScroll:e.default.bool,parentSelector:e.default.func,aria:e.default.object,data:e.default.object,role:e.default.string,contentLabel:e.default.string,shouldCloseOnEsc:e.default.bool,overlayRef:e.default.func,contentRef:e.default.func,id:e.default.string,overlayElement:e.default.func,contentElement:e.default.func},I.defaultProps={isOpen:!1,portalClassName:W,bodyOpenClassName:V,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(v,w){return a.default.createElement("div",v,w)},contentElement:function(v,w){return a.default.createElement("div",v,w)}},I.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,b.polyfill)(I),process.env.NODE_ENV!=="production"&&(I.setCreateHTMLElement=function(g){return F=g}),G.default=I,G}var qe;function ct(){return qe||(qe=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0});var d=ft(),a=s(d);function s(p){return p&&p.__esModule?p:{default:p}}o.default=a.default,f.exports=o.default}(ae,ae.exports)),ae.exports}var dt=ct();const Be=y.getDefaultExportFromCjs(dt),pt=f=>{const{openState:o,closePopupCallback:d,headingIconFile:a,headingText:s,subHeadingText:p,positiveButtonText:x,negativeButtonText:e,classNamePositiveBtn:E,classNameNegativeBtn:h,positiveActionCallback:i,negativeActionCallback:n}=f;return y.jsxRuntimeExports.jsxs(Be,{isOpen:o,onRequestClose:d,shouldCloseOnOverlayClick:!1,style:{overlay:{backgroundColor:"rgba(52, 64, 84, 0.5)",position:"fixed",alignContent:"center",justifyContent:"center",zIndex:1030,display:o?"block":"none"},content:{zIndex:1030,padding:"24px",maxWidth:"750px",maxHeight:"600px",width:"400px",height:"fit-content",margin:"auto",borderRadius:"12px",overflow:"unset",display:o?"block":"none"}},children:[a=="warning"&&y.jsxRuntimeExports.jsx("div",{className:"hfl-hx_warning hfl-mb-4 hfl-flex hfl-h-12 hfl-w-12 hfl-items-center hfl-justify-center hfl-rounded-full hfl-border-8 hfl-border-Warning-50 hfl-bg-Warning-100 hfl-text-Warning-600",children:y.jsxRuntimeExports.jsx("i",{className:"hx_warning hfl-text-5"})}),y.jsxRuntimeExports.jsx(y.Pc,{variant:"Medium",type:"Text xl",className:"hfl-mt-5 hfl-text-Gray-900",children:s}),p&&y.jsxRuntimeExports.jsx(y.Pc,{variant:"Regular",type:"Text sm",className:"hfl-mt-1 hfl-text-Gray-500 ",children:p}),y.jsxRuntimeExports.jsxs("div",{className:"hfl-mt-4 hfl-flex hfl-items-center hfl-justify-center hfl-gap-4",children:[e&&y.jsxRuntimeExports.jsx(y.Yu,{size:"md",textField:e,hierarchy:"Primary",className:h||"",onClick:n,"data-qa":"negative-action"}),x&&y.jsxRuntimeExports.jsx(y.Yu,{size:"md",textField:x,hierarchy:"Secondary",className:E||"",onClick:i,"data-qa":"positive-action"})]})]})},ht=(f,o)=>{D.useEffect(()=>{const d=a=>{f.current&&!f.current.contains(a.target)&&o()};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[f,o])},mt=(f,o)=>{const d=D.useCallback(a=>{f.current&&!f.current.contains(a.target)&&o()},[f,o]);D.useEffect(()=>(document.addEventListener("mouseup",d),()=>{document.removeEventListener("mouseup",d)}),[d])};function ze(f){const{options:o,selectedOption:d,onChangeHandler:a}=f;return y.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-gap-2 hfl-h-full hfl-items-center hfl-px-4 hfl-justify-center hfl-py-1",children:o?.map(s=>y.jsxRuntimeExports.jsx("div",{className:"hfl-bg-White hfl-rounded-lg",children:y.jsxRuntimeExports.jsx(y.Yu,{onClick:()=>a&&a(s),hierarchy:d?.label===s.label?"Primary":"Secondary-Grey",size:"sm",textField:s.label,className:d?.label===s.label?"hfl-bg-Blue-600":""})},s.label))})}const vt="data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.480062%200.819173C0.650418%200.648817%200.92662%200.648817%201.09698%200.819173L4.71454%204.43674L8.3321%200.819173C8.50246%200.648817%208.77866%200.648817%208.94902%200.819173C9.11937%200.98953%209.11937%201.26573%208.94902%201.43609L5.023%205.36211C4.85264%205.53246%204.57644%205.53246%204.40608%205.36211L0.480062%201.43609C0.309706%201.26573%200.309706%200.98953%200.480062%200.819173Z'%20fill='%23667085'/%3e%3c/svg%3e";function yt(f){const{label:o,labelClassName:d,hideDropdownIcon:a,showClearOption:s,isRequiredField:p,btnClassName:x,placeholder:e,options:E,selectedOption:h,onChangeHandler:i,inputValue:n,inputChangeHandler:u,onInputFocusOutEvent:c,inputClassName:b,isSearchable:_,inputType:S,showInput:T,inputSuffix:A,selectedLabel:k,suffixPadding:W,disableInputAutoSize:V,selectedOptions:L,isMulti:F,dropDownItemClickHandler:K,showToggle:U,toggleChangeHandler:I,selectedToggleOption:g,toggleOptionsList:v,border:w,height:l,disabled:r,fieldColor:C,errorMsg:t,showErrorMsg:m,placeholderStyle:O,onInputKeyDown:R,showEmptyDropdownPopup:M=!0,isDropdownFixed:j=!1,dropdownClassName:z="",wrapperClass:Y="",maxInputLength:oe,alternateListBgStyle:ue,showLabelTooltip:fe=!1,labelToolTipContent:Ve="",inputContainerClasses:ge="",onInputFocus:ce}=f,[Z,X]=D.useState(!1),[ee,Ge]=D.useState(null),re=D.useRef(null),de=D.useRef(null),xe=D.useRef(null),pe=D.useRef([]),Ke=D.useMemo(()=>E?.filter(N=>N?N.label.toLowerCase().includes((n??"").toLowerCase()):void 0),[n,E]),[Ye,he]=D.useState(!1),Ze=()=>{X(!1),F&&u&&u(""),Ge(null)},Ee=D.useCallback(N=>{N.stopPropagation(),r||X(P=>!P)},[r]),Oe=(n?.length||0)+2+Number(W||0);mt(re,Ze),D.useEffect(()=>{ee!==null&&pe.current[ee]&&pe.current[ee].scrollIntoView({block:"nearest"})},[ee]);const te=D.useCallback(()=>{if(j&&Z){const N=T?de.current:xe.current,P=re.current;if(N&&P){const $=N.getBoundingClientRect();P.style.position="fixed",P.style.top=`${window.scrollY?$.bottom+window.scrollY:$.bottom}px`,P.style.left=`${$.left}px`,P.style.width=`${$.width}px`}}},[j,Z,T]);D.useEffect(()=>{if(j)return Z?(te(),window.addEventListener("scroll",te,!0)):window.removeEventListener("scroll",te,!0),()=>{window.removeEventListener("scroll",te,!0)}},[j,te,Z]),ht(re,()=>{Ye&&c&&c()});const Ce=N=>{if(F&&K){const P=L?.some($=>$.value===N.value);K(!!P,N)}},Je=D.useCallback(async N=>{N.stopPropagation(),Z||X(!0),ce&&await ce()},[ce,Z]);return y.jsxRuntimeExports.jsxs("div",{className:`hfl-relative hfl-inline-block hfl-text-left ${Y||""}`,children:[!!o&&y.jsxRuntimeExports.jsxs("div",{className:"hfl-text-Gray-700 hfl-mb-1 hfl-flex",children:[y.jsxRuntimeExports.jsx(y.Pc,{type:"Text sm",variant:"Medium",className:d||"",children:`${o}`}),p&&y.jsxRuntimeExports.jsx("span",{className:"hfl-ml-1 hfl-text-Error-600",children:"*"}),fe&&y.jsxRuntimeExports.jsx(y.ju,{variant:"Right",text:Ve,theme:"dark",children:y.jsxRuntimeExports.jsx("i",{className:"hx_info-filled"})})]}),T?y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${ge||""} ${w||"hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${t?"hfl-border-Error-300":"hfl-border-Gray-300"} ${l||"hfl-h-10"} ${r?"!hfl-bg-Gray-50 !hfl-pointer-events-none":C||"hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,onClick:r?()=>{}:Ee,children:[L?.map((N,P)=>y.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-center hfl-bg-Blue-100 hfl-mr-2 hfl-py-1 hfl-px-2 hfl-rounded-sm hfl-font-inter-0 hfl-text-nowrap",children:[y.jsxRuntimeExports.jsx("span",{className:"hfl-pointer-events-none",children:N.label}),y.jsxRuntimeExports.jsx("span",{onClick:$=>{$.stopPropagation(),Ce(N)},className:"hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"})]},`${N.label}-${P}`)),Object.keys(O||{}).length>0&&y.jsxRuntimeExports.jsx("style",{children:`
|
|
32
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof f.getDerivedStateFromProps=="function"&&(o.componentWillMount=Ue,o.componentWillReceiveProps=Ie),typeof o.getSnapshotBeforeUpdate=="function"){if(typeof o.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");o.componentWillUpdate=$e;var e=o.componentDidUpdate;o.componentDidUpdate=function(h,i,n){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;e.call(this,h,i,u)}}return f}const ut=Object.freeze(Object.defineProperty({__proto__:null,polyfill:it},Symbol.toStringTag,{value:"Module"})),ft=y.getAugmentedNamespace(ut);var Fe;function ct(){if(Fe)return G;Fe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.bodyOpenClassName=G.portalClassName=void 0;var f=Object.assign||function(g){for(var v=1;v<arguments.length;v++){var w=arguments[v];for(var l in w)Object.prototype.hasOwnProperty.call(w,l)&&(g[l]=w[l])}return g},o=function(){function g(v,w){for(var l=0;l<w.length;l++){var r=w[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(v,r.key,r)}}return function(v,w,l){return w&&g(v.prototype,w),l&&g(v,l),v}}(),d=D,a=S(d),s=et,p=S(s),x=y.requirePropTypes(),e=S(x),E=st(),h=S(E),i=We(),n=_(i),u=be(),c=S(u),b=ft;function _(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var w in g)Object.prototype.hasOwnProperty.call(g,w)&&(v[w]=g[w]);return v.default=g,v}function S(g){return g&&g.__esModule?g:{default:g}}function T(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function A(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function k(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var W=G.portalClassName="ReactModalPortal",V=G.bodyOpenClassName="ReactModal__Body--open",L=u.canUseDOM&&p.default.createPortal!==void 0,F=function(v){return document.createElement(v)},K=function(){return L?p.default.createPortal:p.default.unstable_renderSubtreeIntoContainer};function U(g){return g()}var I=function(g){k(v,g);function v(){var w,l,r,C;T(this,v);for(var t=arguments.length,m=Array(t),O=0;O<t;O++)m[O]=arguments[O];return C=(l=(r=A(this,(w=v.__proto__||Object.getPrototypeOf(v)).call.apply(w,[this].concat(m))),r),r.removePortal=function(){!L&&p.default.unmountComponentAtNode(r.node);var R=U(r.props.parentSelector);R&&R.contains(r.node)?R.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(R){r.portal=R},r.renderPortal=function(R){var M=K(),j=M(r,a.default.createElement(h.default,f({defaultStyles:v.defaultStyles},R)),r.node);r.portalRef(j)},l),A(r,C)}return o(v,[{key:"componentDidMount",value:function(){if(u.canUseDOM){L||(this.node=F("div")),this.node.className=this.props.portalClassName;var l=U(this.props.parentSelector);l.appendChild(this.node),!L&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(l){var r=U(l.parentSelector),C=U(this.props.parentSelector);return{prevParent:r,nextParent:C}}},{key:"componentDidUpdate",value:function(l,r,C){if(u.canUseDOM){var t=this.props,m=t.isOpen,O=t.portalClassName;l.portalClassName!==O&&(this.node.className=O);var R=C.prevParent,M=C.nextParent;M!==R&&(R.removeChild(this.node),M.appendChild(this.node)),!(!l.isOpen&&!m)&&!L&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!u.canUseDOM||!this.node||!this.portal)){var l=this.portal.state,r=Date.now(),C=l.isOpen&&this.props.closeTimeoutMS&&(l.closesAt||r+this.props.closeTimeoutMS);C?(l.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,C-r)):this.removePortal()}}},{key:"render",value:function(){if(!u.canUseDOM||!L)return null;!this.node&&L&&(this.node=F("div"));var l=K();return l(a.default.createElement(h.default,f({ref:this.portalRef,defaultStyles:v.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(l){n.setElement(l)}}]),v}(d.Component);return I.propTypes={isOpen:e.default.bool.isRequired,style:e.default.shape({content:e.default.object,overlay:e.default.object}),portalClassName:e.default.string,bodyOpenClassName:e.default.string,htmlOpenClassName:e.default.string,className:e.default.oneOfType([e.default.string,e.default.shape({base:e.default.string.isRequired,afterOpen:e.default.string.isRequired,beforeClose:e.default.string.isRequired})]),overlayClassName:e.default.oneOfType([e.default.string,e.default.shape({base:e.default.string.isRequired,afterOpen:e.default.string.isRequired,beforeClose:e.default.string.isRequired})]),appElement:e.default.oneOfType([e.default.instanceOf(c.default),e.default.instanceOf(u.SafeHTMLCollection),e.default.instanceOf(u.SafeNodeList),e.default.arrayOf(e.default.instanceOf(c.default))]),onAfterOpen:e.default.func,onRequestClose:e.default.func,closeTimeoutMS:e.default.number,ariaHideApp:e.default.bool,shouldFocusAfterRender:e.default.bool,shouldCloseOnOverlayClick:e.default.bool,shouldReturnFocusAfterClose:e.default.bool,preventScroll:e.default.bool,parentSelector:e.default.func,aria:e.default.object,data:e.default.object,role:e.default.string,contentLabel:e.default.string,shouldCloseOnEsc:e.default.bool,overlayRef:e.default.func,contentRef:e.default.func,id:e.default.string,overlayElement:e.default.func,contentElement:e.default.func},I.defaultProps={isOpen:!1,portalClassName:W,bodyOpenClassName:V,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(v,w){return a.default.createElement("div",v,w)},contentElement:function(v,w){return a.default.createElement("div",v,w)}},I.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,b.polyfill)(I),process.env.NODE_ENV!=="production"&&(I.setCreateHTMLElement=function(g){return F=g}),G.default=I,G}var qe;function dt(){return qe||(qe=1,function(f,o){Object.defineProperty(o,"__esModule",{value:!0});var d=ct(),a=s(d);function s(p){return p&&p.__esModule?p:{default:p}}o.default=a.default,f.exports=o.default}(ae,ae.exports)),ae.exports}var pt=dt();const Be=y.getDefaultExportFromCjs(pt),ht=f=>{const{openState:o,closePopupCallback:d,headingIconFile:a,headingText:s,subHeadingText:p,positiveButtonText:x,negativeButtonText:e,classNamePositiveBtn:E,classNameNegativeBtn:h,positiveActionCallback:i,negativeActionCallback:n}=f;return y.jsxRuntimeExports.jsxs(Be,{isOpen:o,onRequestClose:d,shouldCloseOnOverlayClick:!1,style:{overlay:{backgroundColor:"rgba(52, 64, 84, 0.5)",position:"fixed",alignContent:"center",justifyContent:"center",zIndex:1030,display:o?"block":"none"},content:{zIndex:1030,padding:"24px",maxWidth:"750px",maxHeight:"600px",width:"400px",height:"fit-content",margin:"auto",borderRadius:"12px",overflow:"unset",display:o?"block":"none"}},children:[a=="warning"&&y.jsxRuntimeExports.jsx("div",{className:"hfl-hx_warning hfl-mb-4 hfl-flex hfl-h-12 hfl-w-12 hfl-items-center hfl-justify-center hfl-rounded-full hfl-border-8 hfl-border-Warning-50 hfl-bg-Warning-100 hfl-text-Warning-600",children:y.jsxRuntimeExports.jsx("i",{className:"hx_warning hfl-text-5"})}),y.jsxRuntimeExports.jsx(y.Pc,{variant:"Medium",type:"Text xl",className:"hfl-mt-5 hfl-text-Gray-900",children:s}),p&&y.jsxRuntimeExports.jsx(y.Pc,{variant:"Regular",type:"Text sm",className:"hfl-mt-1 hfl-text-Gray-500 ",children:p}),y.jsxRuntimeExports.jsxs("div",{className:"hfl-mt-4 hfl-flex hfl-items-center hfl-justify-center hfl-gap-4",children:[e&&y.jsxRuntimeExports.jsx(y.Yu,{size:"md",textField:e,hierarchy:"Primary",className:h||"",onClick:n,"data-qa":"negative-action"}),x&&y.jsxRuntimeExports.jsx(y.Yu,{size:"md",textField:x,hierarchy:"Secondary",className:E||"",onClick:i,"data-qa":"positive-action"})]})]})},ze=(f,o)=>{D.useEffect(()=>{const d=a=>{f.current&&!f.current.contains(a.target)&&o()};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[f,o])},mt=(f,o)=>{const d=D.useCallback(a=>{f.current&&!f.current.contains(a.target)&&o()},[f,o]);D.useEffect(()=>(document.addEventListener("mouseup",d),()=>{document.removeEventListener("mouseup",d)}),[d])};function Ve(f){const{options:o,selectedOption:d,onChangeHandler:a}=f;return y.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-gap-2 hfl-h-full hfl-items-center hfl-px-4 hfl-justify-center hfl-py-1",children:o?.map(s=>y.jsxRuntimeExports.jsx("div",{className:"hfl-bg-White hfl-rounded-lg",children:y.jsxRuntimeExports.jsx(y.Yu,{onClick:()=>a&&a(s),hierarchy:d?.label===s.label?"Primary":"Secondary-Grey",size:"sm",textField:s.label,className:d?.label===s.label?"hfl-bg-Blue-600":""})},s.label))})}const vt="data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.480062%200.819173C0.650418%200.648817%200.92662%200.648817%201.09698%200.819173L4.71454%204.43674L8.3321%200.819173C8.50246%200.648817%208.77866%200.648817%208.94902%200.819173C9.11937%200.98953%209.11937%201.26573%208.94902%201.43609L5.023%205.36211C4.85264%205.53246%204.57644%205.53246%204.40608%205.36211L0.480062%201.43609C0.309706%201.26573%200.309706%200.98953%200.480062%200.819173Z'%20fill='%23667085'/%3e%3c/svg%3e";function yt(f){const{label:o,labelClassName:d,hideDropdownIcon:a,showClearOption:s,isRequiredField:p,btnClassName:x,placeholder:e,options:E,selectedOption:h,onChangeHandler:i,inputValue:n,inputChangeHandler:u,onInputFocusOutEvent:c,inputClassName:b,isSearchable:_,inputType:S,showInput:T,inputSuffix:A,selectedLabel:k,suffixPadding:W,disableInputAutoSize:V,selectedOptions:L,isMulti:F,dropDownItemClickHandler:K,showToggle:U,toggleChangeHandler:I,selectedToggleOption:g,toggleOptionsList:v,border:w,height:l,disabled:r,fieldColor:C,errorMsg:t,showErrorMsg:m,placeholderStyle:O,onInputKeyDown:R,showEmptyDropdownPopup:M=!0,isDropdownFixed:j=!1,dropdownClassName:z="",wrapperClass:Y="",maxInputLength:oe,alternateListBgStyle:ue,showLabelTooltip:fe=!1,labelToolTipContent:Ge="",inputContainerClasses:ge="",onInputFocus:ce}=f,[Z,X]=D.useState(!1),[ee,Ke]=D.useState(null),re=D.useRef(null),de=D.useRef(null),xe=D.useRef(null),pe=D.useRef([]),Ye=D.useMemo(()=>E?.filter(N=>N?N.label.toLowerCase().includes((n??"").toLowerCase()):void 0),[n,E]),[Ze,he]=D.useState(!1),Je=()=>{X(!1),F&&u&&u(""),Ke(null)},Ee=D.useCallback(N=>{N.stopPropagation(),r||X(P=>!P)},[r]),Oe=(n?.length||0)+2+Number(W||0);mt(re,Je),D.useEffect(()=>{ee!==null&&pe.current[ee]&&pe.current[ee].scrollIntoView({block:"nearest"})},[ee]);const te=D.useCallback(()=>{if(j&&Z){const N=T?de.current:xe.current,P=re.current;if(N&&P){const $=N.getBoundingClientRect();P.style.position="fixed",P.style.top=`${window.scrollY?$.bottom+window.scrollY:$.bottom}px`,P.style.left=`${$.left}px`,P.style.width=`${$.width}px`}}},[j,Z,T]);D.useEffect(()=>{if(j)return Z?(te(),window.addEventListener("scroll",te,!0)):window.removeEventListener("scroll",te,!0),()=>{window.removeEventListener("scroll",te,!0)}},[j,te,Z]),ze(re,()=>{Ze&&c&&c()});const Ce=N=>{if(F&&K){const P=L?.some($=>$.value===N.value);K(!!P,N)}},Qe=D.useCallback(async N=>{N.stopPropagation(),Z||X(!0),ce&&await ce()},[ce,Z]);return y.jsxRuntimeExports.jsxs("div",{className:`hfl-relative hfl-inline-block hfl-text-left ${Y||""}`,children:[!!o&&y.jsxRuntimeExports.jsxs("div",{className:"hfl-text-Gray-700 hfl-mb-1 hfl-flex",children:[y.jsxRuntimeExports.jsx(y.Pc,{type:"Text sm",variant:"Medium",className:d||"",children:`${o}`}),p&&y.jsxRuntimeExports.jsx("span",{className:"hfl-ml-1 hfl-text-Error-600",children:"*"}),fe&&y.jsxRuntimeExports.jsx(y.ju,{variant:"Right",text:Ge,theme:"dark",children:y.jsxRuntimeExports.jsx("i",{className:"hx_info-filled"})})]}),T?y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${ge||""} ${w||"hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${t?"hfl-border-Error-300":"hfl-border-Gray-300"} ${l||"hfl-h-10"} ${r?"!hfl-bg-Gray-50 !hfl-pointer-events-none":C||"hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,onClick:r?()=>{}:Ee,children:[L?.map((N,P)=>y.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-center hfl-bg-Blue-100 hfl-mr-2 hfl-py-1 hfl-px-2 hfl-rounded-sm hfl-font-inter-0 hfl-text-nowrap",children:[y.jsxRuntimeExports.jsx("span",{className:"hfl-pointer-events-none",children:N.label}),y.jsxRuntimeExports.jsx("span",{onClick:$=>{$.stopPropagation(),Ce(N)},className:"hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"})]},`${N.label}-${P}`)),Object.keys(O||{}).length>0&&y.jsxRuntimeExports.jsx("style",{children:`
|
|
33
33
|
input.input-placeholder::placeholder {
|
|
34
34
|
font-family: ${O?.fontFamily};
|
|
35
35
|
font-weight: ${O?.fontWeight};
|
|
@@ -37,4 +37,4 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof f.getDerivedStat
|
|
|
37
37
|
font-size: ${O?.fontSize};
|
|
38
38
|
color: ${O?.color};
|
|
39
39
|
}
|
|
40
|
-
`}),y.jsxRuntimeExports.jsx("input",{ref:de,style:V?{}:{width:`${Number(n?.length)>4?(n?.length||0)+5:12}ch`},type:S,placeholder:e,value:n,className:`input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${r?"!hfl-bg-Gray-50 !hfl-cursor-not-allowed":C||"hfl-bg-White"} ${b||""}`,onChange:N=>{u&&u(N.target.value),he(!0)},onClick:
|
|
40
|
+
`}),y.jsxRuntimeExports.jsx("input",{ref:de,style:V?{}:{width:`${Number(n?.length)>4?(n?.length||0)+5:12}ch`},type:S,placeholder:e,value:n,className:`input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${r?"!hfl-bg-Gray-50 !hfl-cursor-not-allowed":C||"hfl-bg-White"} ${b||""}`,onChange:N=>{u&&u(N.target.value),he(!0)},onClick:Qe,onKeyDown:N=>R&&R(N,X,de),maxLength:oe??oe,...f.inputProps||{}}),!a&&!s&&y.jsxRuntimeExports.jsx("i",{className:"hx_down hfl-mx-2"}),s&&y.jsxRuntimeExports.jsx("i",{className:`${n?"hx_close hfl-cursor-pointer":"hx_down"} hfl-mx-2`,onClick:()=>{(h?.value||n)&&(u&&u(""),he(!0))}}),A?y.jsxRuntimeExports.jsx("span",{style:{left:`${Oe<2?"3":Oe}ch`},className:"hfl-absolute hfl-top-1/2 hfl--translate-y-1/2 hfl-pointer-events-none",children:A}):null]}),m&&y.jsxRuntimeExports.jsx("span",{className:"hfl-text-0 hfl-text-Error-600",children:t})]}):y.jsxRuntimeExports.jsxs("button",{ref:xe,onClick:Ee,className:`hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${x||""} ${w||"hfl-border-1"} ${t?"hfl-border-Error-300":"hfl-border-Gray-300"} ${l||"hfl-h-[40px]"} ${r?"!hfl-bg-Gray-50 !hfl-cursor-not-allowed":""}`,style:k||h?.label?{}:O?{fontFamily:O?.fontFamily,fontSize:O?.fontSize,fontWeight:O?.fontWeight,lineHeight:O?.lineHeight,color:O?.color}:{},children:[y.jsxRuntimeExports.jsx("span",{className:"hfl-pr-4",children:k||h?.label||e||"Select an option"}),y.jsxRuntimeExports.jsx("img",{src:vt,alt:"down arrow"})]}),E&&E?.length>=0&&y.jsxRuntimeExports.jsxs("ul",{ref:re,className:`custom-dropdown-menu ${Z?"hfl-visible":"hfl-invisible"} hfl-absolute hfl-z-50 hfl-grid hfl-gap-1 hfl-mt-3 hfl-w-full hfl-rounded-lg hfl-shadow-lg hfl-bg-White hfl-font-inter-0 hfl-p-1 hfl-px-2 ${F?"hfl-min-w-[20em]":"hfl-min-w-[16em]"} hfl-max-h-[330px] hfl-overflow-y-scroll ${z}`,role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:[U?y.jsxRuntimeExports.jsx(Ve,{onChangeHandler:I,selectedOption:g,options:v}):!1,(_?Ye:E)?.map((N,P)=>{const $=F?!!L?.some(me=>me.value===N?.value):!1,we=h?.value===N?.value,Xe=ee===P;return N?y.jsxRuntimeExports.jsx("li",{onClick:()=>{F?Ce(N):(i&&i(N),X(!1),he(!1))},className:`hfl-text-1 hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item ${ue?"odd:hfl-bg-Gray-100":""} ${we?"hfl-bg-Blue-50 hfl-text-Blue-500":""}`,role:"menuitem","aria-selected":we,tabIndex:Xe?0:-1,ref:me=>{pe.current[P]=me},children:F?y.jsxRuntimeExports.jsx(y.Mc,{size:"sm",disabled:!1,text:y.jsxRuntimeExports.jsx("span",{children:N.label}),secondaryText:"",id:`${N.label}-${P}`,isMarked:$}):N.label},`${N.label}-${P}`):null}),E?.length===0&&M&&y.jsxRuntimeExports.jsx("li",{className:"hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item",children:"No items found, please change the search criteria"})]})]})}exports.AlertPopup=ht;exports.CustomDropdown=yt;exports.Modal=Be;exports.ToggleButtons=Ve;exports.useClickOutside=ze;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e, P as k, M as ge, c as Q, g as xe, Y as oe } from "../index-BCqhiZf4.js";
|
|
2
2
|
import le, { createContext as ye, useContext as _e, useState as W, useEffect as J, useMemo as Z, useCallback as G, forwardRef as be, useImperativeHandle as we } from "react";
|
|
3
3
|
import { C_MedicineCalculatorList as ae, C_FrequencyDosageMap as ce, C_MedicineTypeList as te, C_MedicineFrequencyList as de, C_DefaultMgKgFields as je, C_DefaultMlKgFields as ve, C_Table_Column_Name as Ce } from "../constants/PediatricsCalculatorConstants/index.js";
|
|
4
|
-
import { C as g, M as Ie, A as Ne } from "../CustomDropdown-
|
|
4
|
+
import { C as g, M as Ie, A as Ne } from "../CustomDropdown-CiA1c9VP.js";
|
|
5
5
|
const fe = ye(null), he = () => {
|
|
6
6
|
const i = _e(fe);
|
|
7
7
|
if (!i) throw new Error("usePediatricsCalculatorTableContext must be used inside a MedicineTableProvider");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface DateAndTimePickerProps {
|
|
3
|
+
inputDate: Date;
|
|
4
|
+
triggerType?: 'button' | 'input';
|
|
5
|
+
placeholderCTA?: string;
|
|
6
|
+
placeholderCTAStyles?: string;
|
|
7
|
+
inputPlaceholder?: string;
|
|
8
|
+
inputFieldClassName?: string;
|
|
9
|
+
displayDateFormat?: string;
|
|
10
|
+
minDate?: Date | null;
|
|
11
|
+
maxDate?: Date | null;
|
|
12
|
+
applyChanges: (selectedDate: Date) => void;
|
|
13
|
+
datePickerAbsoluteClasses: string;
|
|
14
|
+
highlightClickedCell?: boolean;
|
|
15
|
+
sectionRef?: RefObject<HTMLDivElement>;
|
|
16
|
+
}
|
|
17
|
+
declare const DateAndTimePicker: ({ inputDate, placeholderCTA, placeholderCTAStyles, minDate, maxDate, applyChanges, datePickerAbsoluteClasses, triggerType, inputPlaceholder, inputFieldClassName, displayDateFormat, sectionRef, highlightClickedCell, }: DateAndTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default DateAndTimePicker;
|