@yourself_id/siwys-react-js 0.33.1-expo.2 → 0.33.1-npm-odic.0
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.js +86 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -135,12 +135,22 @@ function _object_spread_props(target, source) {
|
|
|
135
135
|
}
|
|
136
136
|
function _object_without_properties(source, excluded) {
|
|
137
137
|
if (source == null) return {};
|
|
138
|
-
var target =
|
|
139
|
-
|
|
138
|
+
var target = {}, sourceKeys, key, i;
|
|
139
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
140
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
141
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
142
|
+
key = sourceKeys[i];
|
|
143
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
144
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
145
|
+
target[key] = source[key];
|
|
146
|
+
}
|
|
147
|
+
return target;
|
|
148
|
+
}
|
|
149
|
+
target = _object_without_properties_loose(source, excluded);
|
|
140
150
|
if (Object.getOwnPropertySymbols) {
|
|
141
|
-
|
|
142
|
-
for(i = 0; i <
|
|
143
|
-
key =
|
|
151
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
152
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
153
|
+
key = sourceKeys[i];
|
|
144
154
|
if (excluded.indexOf(key) >= 0) continue;
|
|
145
155
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
146
156
|
target[key] = source[key];
|
|
@@ -150,12 +160,11 @@ function _object_without_properties(source, excluded) {
|
|
|
150
160
|
}
|
|
151
161
|
function _object_without_properties_loose(source, excluded) {
|
|
152
162
|
if (source == null) return {};
|
|
153
|
-
var target = {};
|
|
154
|
-
var sourceKeys = Object.keys(source);
|
|
155
|
-
var key, i;
|
|
163
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
156
164
|
for(i = 0; i < sourceKeys.length; i++){
|
|
157
165
|
key = sourceKeys[i];
|
|
158
166
|
if (excluded.indexOf(key) >= 0) continue;
|
|
167
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
159
168
|
target[key] = source[key];
|
|
160
169
|
}
|
|
161
170
|
return target;
|
|
@@ -186,7 +195,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
186
195
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
187
196
|
}
|
|
188
197
|
function _ts_generator(thisArg, body) {
|
|
189
|
-
var f, y, t,
|
|
198
|
+
var f, y, t, _ = {
|
|
190
199
|
label: 0,
|
|
191
200
|
sent: function() {
|
|
192
201
|
if (t[0] & 1) throw t[1];
|
|
@@ -194,13 +203,17 @@ function _ts_generator(thisArg, body) {
|
|
|
194
203
|
},
|
|
195
204
|
trys: [],
|
|
196
205
|
ops: []
|
|
197
|
-
};
|
|
198
|
-
return g
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
|
|
206
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
207
|
+
return d(g, "next", {
|
|
208
|
+
value: verb(0)
|
|
209
|
+
}), d(g, "throw", {
|
|
210
|
+
value: verb(1)
|
|
211
|
+
}), d(g, "return", {
|
|
212
|
+
value: verb(2)
|
|
213
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
214
|
+
value: function() {
|
|
215
|
+
return this;
|
|
216
|
+
}
|
|
204
217
|
}), g;
|
|
205
218
|
function verb(n) {
|
|
206
219
|
return function(v) {
|
|
@@ -212,7 +225,7 @@ function _ts_generator(thisArg, body) {
|
|
|
212
225
|
}
|
|
213
226
|
function step(op) {
|
|
214
227
|
if (f) throw new TypeError("Generator is already executing.");
|
|
215
|
-
while(_)try {
|
|
228
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
216
229
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
217
230
|
if (y = 0, t) op = [
|
|
218
231
|
op[0] & 2,
|
|
@@ -486,20 +499,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
486
499
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
487
500
|
var __getProtoOf = Object.getPrototypeOf;
|
|
488
501
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
489
|
-
var __export = function(target, all) {
|
|
502
|
+
var __export = function __export(target, all) {
|
|
490
503
|
for(var name in all)__defProp(target, name, {
|
|
491
504
|
get: all[name],
|
|
492
505
|
enumerable: true
|
|
493
506
|
});
|
|
494
507
|
};
|
|
495
|
-
var __copyProps = function(to, from, except, desc) {
|
|
508
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
496
509
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
497
510
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
498
511
|
try {
|
|
499
512
|
var _loop = function() {
|
|
500
513
|
var key = _step.value;
|
|
501
514
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
502
|
-
get: function() {
|
|
515
|
+
get: function get() {
|
|
503
516
|
return from[key];
|
|
504
517
|
},
|
|
505
518
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -523,7 +536,7 @@ var __copyProps = function(to, from, except, desc) {
|
|
|
523
536
|
}
|
|
524
537
|
return to;
|
|
525
538
|
};
|
|
526
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
539
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
527
540
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
528
541
|
// file that has been converted to a CommonJS file using a Babel-
|
|
529
542
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -533,31 +546,31 @@ var __toESM = function(mod, isNodeMode, target) {
|
|
|
533
546
|
enumerable: true
|
|
534
547
|
}) : target, mod);
|
|
535
548
|
};
|
|
536
|
-
var __toCommonJS = function(mod) {
|
|
549
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
537
550
|
return __copyProps(__defProp({}, "__esModule", {
|
|
538
551
|
value: true
|
|
539
552
|
}), mod);
|
|
540
553
|
};
|
|
541
554
|
// src/index.ts
|
|
542
|
-
var
|
|
543
|
-
__export(
|
|
544
|
-
ConnectYourSelf: function() {
|
|
555
|
+
var index_exports = {};
|
|
556
|
+
__export(index_exports, {
|
|
557
|
+
ConnectYourSelf: function ConnectYourSelf() {
|
|
545
558
|
return ConnectYourSelf_default;
|
|
546
559
|
},
|
|
547
|
-
CysButton: function() {
|
|
560
|
+
CysButton: function CysButton1() {
|
|
548
561
|
return CysButton;
|
|
549
562
|
},
|
|
550
|
-
QRCode: function() {
|
|
563
|
+
QRCode: function QRCode() {
|
|
551
564
|
return QrCode_default;
|
|
552
565
|
},
|
|
553
|
-
SignInWithYourSelf: function() {
|
|
566
|
+
SignInWithYourSelf: function SignInWithYourSelf() {
|
|
554
567
|
return SignInWithYourSelf_default;
|
|
555
568
|
},
|
|
556
|
-
SiwysButton: function() {
|
|
569
|
+
SiwysButton: function SiwysButton1() {
|
|
557
570
|
return SiwysButton;
|
|
558
571
|
}
|
|
559
572
|
});
|
|
560
|
-
module.exports = __toCommonJS(
|
|
573
|
+
module.exports = __toCommonJS(index_exports);
|
|
561
574
|
var import_inter = require("@fontsource/inter");
|
|
562
575
|
// src/components/button/SignInButton.tsx
|
|
563
576
|
var import_react2 = __toESM(require("react"));
|
|
@@ -586,7 +599,7 @@ var StyledButton = import_styled_components.default.button(_templateObject(), fu
|
|
|
586
599
|
return "\n @media (prefers-color-scheme: light) {\n background: white;\n color: black;\n }\n\n @media (prefers-color-scheme: dark) {\n background: black;\n color: white;\n }\n ";
|
|
587
600
|
}
|
|
588
601
|
});
|
|
589
|
-
var Button = function(param) {
|
|
602
|
+
var Button = function Button(param) {
|
|
590
603
|
var children = param.children, onClick = param.onClick, className = param.className, colorTheme = param.colorTheme, glow = param.glow, disabled = param.disabled;
|
|
591
604
|
return /* @__PURE__ */ import_react.default.createElement(StyledButton, {
|
|
592
605
|
type: "button",
|
|
@@ -602,7 +615,7 @@ var Button = function(param) {
|
|
|
602
615
|
var Button_default = Button;
|
|
603
616
|
// src/icons/AppleAppStore.tsx
|
|
604
617
|
var React2 = __toESM(require("react"));
|
|
605
|
-
var SvgAppleAppStore = function(props) {
|
|
618
|
+
var SvgAppleAppStore = function SvgAppleAppStore(props) {
|
|
606
619
|
return /* @__PURE__ */ React2.createElement("svg", _object_spread({
|
|
607
620
|
"data-testid": "apple-store-svg",
|
|
608
621
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -635,7 +648,7 @@ var React3 = __toESM(require("react"));
|
|
|
635
648
|
var React4 = __toESM(require("react"));
|
|
636
649
|
// src/icons/CircleLogoBlack.tsx
|
|
637
650
|
var React5 = __toESM(require("react"));
|
|
638
|
-
var SvgCircleLogoBlack = function(props) {
|
|
651
|
+
var SvgCircleLogoBlack = function SvgCircleLogoBlack(props) {
|
|
639
652
|
return /* @__PURE__ */ React5.createElement("svg", _object_spread({
|
|
640
653
|
xmlns: "http://www.w3.org/2000/svg",
|
|
641
654
|
width: "1em",
|
|
@@ -653,7 +666,7 @@ var SvgCircleLogoBlack = function(props) {
|
|
|
653
666
|
var CircleLogoBlack_default = SvgCircleLogoBlack;
|
|
654
667
|
// src/icons/CircleLogoWhite.tsx
|
|
655
668
|
var React6 = __toESM(require("react"));
|
|
656
|
-
var SvgCircleLogoWhite = function(props) {
|
|
669
|
+
var SvgCircleLogoWhite = function SvgCircleLogoWhite(props) {
|
|
657
670
|
return /* @__PURE__ */ React6.createElement("svg", _object_spread({
|
|
658
671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
659
672
|
width: "1em",
|
|
@@ -742,7 +755,7 @@ var SvgCircleLogoWhite = function(props) {
|
|
|
742
755
|
var CircleLogoWhite_default = SvgCircleLogoWhite;
|
|
743
756
|
// src/icons/GooglePlayStore.tsx
|
|
744
757
|
var React7 = __toESM(require("react"));
|
|
745
|
-
var SvgGooglePlayStore = function(props) {
|
|
758
|
+
var SvgGooglePlayStore = function SvgGooglePlayStore(props) {
|
|
746
759
|
return /* @__PURE__ */ React7.createElement("svg", _object_spread({
|
|
747
760
|
"data-testid": "play-store-svg",
|
|
748
761
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -792,7 +805,7 @@ var React8 = __toESM(require("react"));
|
|
|
792
805
|
var import_styled_components2 = __toESM(require("styled-components"));
|
|
793
806
|
var rotate = import_styled_components2.keyframes(_templateObject1());
|
|
794
807
|
var LoadingIcon = import_styled_components2.default.svg(_templateObject2(), rotate);
|
|
795
|
-
var LoadingIndicator = function(props) {
|
|
808
|
+
var LoadingIndicator = function LoadingIndicator(props) {
|
|
796
809
|
return /* @__PURE__ */ React8.createElement(LoadingIcon, _object_spread({
|
|
797
810
|
width: "24",
|
|
798
811
|
height: "24",
|
|
@@ -811,7 +824,7 @@ var React9 = __toESM(require("react"));
|
|
|
811
824
|
var React10 = __toESM(require("react"));
|
|
812
825
|
// src/icons/SelfTextLogoBlack.tsx
|
|
813
826
|
var React11 = __toESM(require("react"));
|
|
814
|
-
var SvgSelfTextLogoBlack = function(props) {
|
|
827
|
+
var SvgSelfTextLogoBlack = function SvgSelfTextLogoBlack(props) {
|
|
815
828
|
return /* @__PURE__ */ React11.createElement("svg", _object_spread({
|
|
816
829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
817
830
|
width: "1em",
|
|
@@ -826,7 +839,7 @@ var SvgSelfTextLogoBlack = function(props) {
|
|
|
826
839
|
var SelfTextLogoBlack_default = SvgSelfTextLogoBlack;
|
|
827
840
|
// src/icons/SelfTextLogoWhite.tsx
|
|
828
841
|
var React12 = __toESM(require("react"));
|
|
829
|
-
var SvgSelfTextLogoWhite = function(props) {
|
|
842
|
+
var SvgSelfTextLogoWhite = function SvgSelfTextLogoWhite(props) {
|
|
830
843
|
return /* @__PURE__ */ React12.createElement("svg", _object_spread({
|
|
831
844
|
xmlns: "http://www.w3.org/2000/svg",
|
|
832
845
|
width: "1em",
|
|
@@ -841,7 +854,7 @@ var SvgSelfTextLogoWhite = function(props) {
|
|
|
841
854
|
var SelfTextLogoWhite_default = SvgSelfTextLogoWhite;
|
|
842
855
|
// src/icons/IconDark.tsx
|
|
843
856
|
var React13 = __toESM(require("react"));
|
|
844
|
-
var SvgIconDark = function(props) {
|
|
857
|
+
var SvgIconDark = function SvgIconDark(props) {
|
|
845
858
|
return /* @__PURE__ */ React13.createElement("svg", _object_spread({
|
|
846
859
|
xmlns: "http://www.w3.org/2000/svg",
|
|
847
860
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
@@ -888,7 +901,7 @@ var SvgIconDark = function(props) {
|
|
|
888
901
|
var IconDark_default = SvgIconDark;
|
|
889
902
|
// src/icons/IconLight.tsx
|
|
890
903
|
var React14 = __toESM(require("react"));
|
|
891
|
-
var SvgIconLight = function(props) {
|
|
904
|
+
var SvgIconLight = function SvgIconLight(props) {
|
|
892
905
|
return /* @__PURE__ */ React14.createElement("svg", _object_spread({
|
|
893
906
|
xmlns: "http://www.w3.org/2000/svg",
|
|
894
907
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
@@ -952,8 +965,8 @@ var IconLight_default = SvgIconLight;
|
|
|
952
965
|
// src/components/button/SignInButton.tsx
|
|
953
966
|
var SignInMessage = import_styled_components3.default.span(_templateObject3());
|
|
954
967
|
var StyledButton2 = (0, import_styled_components3.default)(Button_default)(_templateObject4());
|
|
955
|
-
var SignInButton = function(
|
|
956
|
-
var type =
|
|
968
|
+
var SignInButton = function SignInButton(_0) {
|
|
969
|
+
var type = _0.type, rest = _object_without_properties(_0, [
|
|
957
970
|
"type"
|
|
958
971
|
]);
|
|
959
972
|
var colorTheme = rest.colorTheme, onClick = rest.onClick;
|
|
@@ -963,7 +976,7 @@ var SignInButton = function(_param) {
|
|
|
963
976
|
}, []);
|
|
964
977
|
var showBlackIcons = colorTheme === "light" || colorTheme === "blue" || !colorTheme && !darkModeEnabled;
|
|
965
978
|
var label = type === "signIn" ? "Sign in with your" : "Connect your";
|
|
966
|
-
var handleClick = function() {
|
|
979
|
+
var handleClick = function handleClick() {
|
|
967
980
|
setClicked(true);
|
|
968
981
|
onClick();
|
|
969
982
|
};
|
|
@@ -988,14 +1001,14 @@ var SignInButton = function(_param) {
|
|
|
988
1001
|
fill: showBlackIcons ? "black" : "white"
|
|
989
1002
|
}));
|
|
990
1003
|
};
|
|
991
|
-
var CysButton = function(
|
|
992
|
-
var props = _extends({},
|
|
1004
|
+
var CysButton = function CysButton(_0) {
|
|
1005
|
+
var ref = _object_destructuring_empty(_0), props = _extends({}, _0);
|
|
993
1006
|
return /* @__PURE__ */ import_react2.default.createElement(SignInButton, _object_spread({
|
|
994
1007
|
type: "connect"
|
|
995
1008
|
}, props));
|
|
996
1009
|
};
|
|
997
|
-
var SiwysButton = function(
|
|
998
|
-
var props = _extends({},
|
|
1010
|
+
var SiwysButton = function SiwysButton(_0) {
|
|
1011
|
+
var ref = _object_destructuring_empty(_0), props = _extends({}, _0);
|
|
999
1012
|
return /* @__PURE__ */ import_react2.default.createElement(SignInButton, _object_spread({
|
|
1000
1013
|
type: "signIn"
|
|
1001
1014
|
}, props));
|
|
@@ -1007,7 +1020,7 @@ var import_styled_components4 = __toESM(require("styled-components"));
|
|
|
1007
1020
|
var import_react3 = __toESM(require("react"));
|
|
1008
1021
|
var import_qrcode = require("qrcode.react");
|
|
1009
1022
|
var SelfSvg = '\n<svg width="104" height="32" viewBox="0 0 104 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="104" height="31.5" fill="white"/>\n<path d="M28.1416 25.0276H16.8487C16.4035 25.0276 16.0414 24.6699 16.0414 24.228V21.4124C16.0414 20.9714 16.4026 20.6127 16.8487 20.6127H28.0064C29.1408 20.6127 29.7893 19.9976 29.7893 19.2213C29.7893 18.4451 29.1408 17.8037 28.0064 17.8037H21.3891C17.2836 17.8037 14.9609 15.3159 14.9609 12.1052C14.9609 8.89444 17.6891 6.30078 21.3891 6.30078H33.1414C33.5867 6.30078 33.9487 6.65846 33.9487 7.10042V9.91599C33.9487 10.357 33.5876 10.7156 33.1414 10.7156H21.6056C20.3096 10.7156 19.7689 11.4647 19.7689 12.107C19.7689 12.7494 20.3899 13.4179 21.6056 13.4179H27.9799C31.8151 13.4179 34.5972 15.6923 34.5972 19.2232C34.5972 22.4068 32.1394 25.0285 28.1416 25.0285V25.0276Z" fill="black"/>\n<path d="M73.7575 6.30078H89.7533C90.1985 6.30078 90.5606 6.65846 90.5606 7.10042V9.91599C90.5606 10.357 90.1995 10.7156 89.7533 10.7156H78.6732C78.2279 10.7156 77.8658 11.0733 77.8658 11.5153V12.6726C77.8658 13.1136 78.227 13.4722 78.6732 13.4722H89.4026C89.8478 13.4722 90.2099 13.8299 90.2099 14.2718V17.0603C90.2099 17.5013 89.8488 17.8599 89.4026 17.8599H78.6732C78.2279 17.8599 77.8658 18.2176 77.8658 18.6595V24.2308C77.8658 24.6718 77.5047 25.0304 77.0585 25.0304H73.7565C73.3113 25.0304 72.9492 24.6727 72.9492 24.2308V7.10042C72.9492 6.6594 73.3103 6.30078 73.7565 6.30078H73.7575Z" fill="black"/>\n<path d="M54.9587 6.30078H58.2607C58.706 6.30078 59.068 6.65846 59.068 7.10042V19.814C59.068 20.2551 59.4291 20.6137 59.8753 20.6137H70.7399C71.1852 20.6137 71.5472 20.9714 71.5472 21.4133V24.2289C71.5472 24.6699 71.1861 25.0285 70.7399 25.0285H54.9597C54.5144 25.0285 54.1523 24.6708 54.1523 24.2289V7.10042C54.1514 6.65846 54.5125 6.30078 54.9587 6.30078Z" fill="black"/>\n<path d="M36.5104 6.30078H51.9391C52.3843 6.30078 52.7464 6.65846 52.7464 7.10042V9.91599C52.7464 10.357 52.3853 10.7156 51.9391 10.7156H41.3722C40.927 10.7156 40.5649 11.0733 40.5649 11.5153V12.6726C40.5649 13.1136 40.926 13.4722 41.3722 13.4722H50.9673C51.4125 13.4722 51.7746 13.8299 51.7746 14.2718V17.0603C51.7746 17.5013 51.4135 17.8599 50.9673 17.8599H41.3722C40.927 17.8599 40.5649 18.2176 40.5649 18.6595V19.8169C40.5649 20.2579 40.926 20.6165 41.3722 20.6165H51.8313C52.2765 20.6165 52.6386 20.9742 52.6386 21.4161V24.2317C52.6386 24.6727 52.2775 25.0313 51.8313 25.0313H36.5104C36.0652 25.0313 35.7031 24.6737 35.7031 24.2317V7.10042C35.7031 6.65846 36.0642 6.30078 36.5104 6.30078Z" fill="black"/>\n<path d="M94.8749 10.6208C93.6613 10.6208 92.7227 9.6821 92.7227 8.45819C92.7227 7.23946 93.6613 6.30078 94.8749 6.30078C96.104 6.30078 97.0427 7.23946 97.0427 8.45819C97.0427 9.6821 96.104 10.6208 94.8749 10.6208ZM94.8749 10.3044C95.9225 10.3044 96.7263 9.50059 96.7263 8.45819C96.7263 7.40542 95.9225 6.60157 94.8749 6.60157C93.8273 6.60157 93.0234 7.4106 93.0234 8.45819C93.0234 9.50059 93.8273 10.3044 94.8749 10.3044ZM94.097 9.63543C94.0658 9.63543 94.0451 9.61468 94.0451 9.58357V7.34318C94.0451 7.31207 94.0658 7.29132 94.097 7.29132H95.1238C95.518 7.29132 95.8136 7.59211 95.8136 7.99663C95.8136 8.25593 95.6891 8.45819 95.4868 8.57747C95.4609 8.59821 95.4557 8.61896 95.4661 8.65007L95.855 9.57319C95.8706 9.6095 95.8499 9.63543 95.8136 9.63543H95.4142C95.3883 9.63543 95.3676 9.62506 95.3572 9.59394L95.0097 8.71231C94.9993 8.68119 94.9786 8.67082 94.9527 8.67082H94.5637C94.5326 8.67082 94.5119 8.69156 94.5119 8.72268V9.58357C94.5119 9.61468 94.4911 9.63543 94.46 9.63543H94.097ZM95.0201 8.27668C95.2327 8.27668 95.3468 8.1574 95.3468 7.99663C95.3468 7.81512 95.2275 7.70102 95.0201 7.70102H94.5637C94.5326 7.70102 94.5119 7.72177 94.5119 7.75288V8.22481C94.5119 8.25593 94.5326 8.27668 94.5637 8.27668H95.0201Z" fill="black"/>\n</svg>\n\n';
|
|
1010
|
-
var QRCode = function(props) {
|
|
1023
|
+
var QRCode = function QRCode(props) {
|
|
1011
1024
|
return /* @__PURE__ */ import_react3.default.createElement(import_qrcode.QRCodeSVG, {
|
|
1012
1025
|
"data-testid": "qr-code",
|
|
1013
1026
|
value: props.challengeUrl,
|
|
@@ -1058,7 +1071,7 @@ var DownloadContainer = import_styled_components4.default.div(_templateObject17(
|
|
|
1058
1071
|
var DownloadContainerFlex = import_styled_components4.default.div(_templateObject18());
|
|
1059
1072
|
var DownloadAppTitle = import_styled_components4.default.p(_templateObject19());
|
|
1060
1073
|
var AppIconsContainer = import_styled_components4.default.div(_templateObject20());
|
|
1061
|
-
var SignInWithYourSelf = function(param) {
|
|
1074
|
+
var SignInWithYourSelf = function SignInWithYourSelf(param) {
|
|
1062
1075
|
var challengeDID = param.challengeDID, onSiwysPress = param.onSiwysPress, _param_isCYS = param.isCYS, isCYS = _param_isCYS === void 0 ? false : _param_isCYS, _param_createChallengeUrl = param.createChallengeUrl, createChallengeUrl = _param_createChallengeUrl === void 0 ? void 0 : _param_createChallengeUrl, _param_pollForAuthUrl = param.pollForAuthUrl, pollForAuthUrl = _param_pollForAuthUrl === void 0 ? void 0 : _param_pollForAuthUrl, successComponent = param.successComponent, _param_theme = param.theme, theme = _param_theme === void 0 ? "light" : _param_theme, _param_challengeBaseUrl = param.challengeBaseUrl, challengeBaseUrl = _param_challengeBaseUrl === void 0 ? "" : _param_challengeBaseUrl, _param_showLogo = param.showLogo, showLogo = _param_showLogo === void 0 ? true : _param_showLogo, _param_showInstructions = param.showInstructions, showInstructions = _param_showInstructions === void 0 ? true : _param_showInstructions;
|
|
1063
1076
|
var _ref = _sliced_to_array((0, import_react4.useState)(challengeBaseUrl ? "".concat(challengeBaseUrl, "/challenge?challenge=").concat(challengeDID || "") : "https://www.selfid.link/challenge?challenge=".concat(challengeDID || "")), 2), challengeUrl = _ref[0], setChallengeUrl = _ref[1];
|
|
1064
1077
|
var _ref1 = _sliced_to_array((0, import_react4.useState)(""), 2), challengeDid = _ref1[0], setChallengeDid = _ref1[1];
|
|
@@ -1079,25 +1092,27 @@ var SignInWithYourSelf = function(param) {
|
|
|
1079
1092
|
]);
|
|
1080
1093
|
(0, import_react4.useEffect)(function() {
|
|
1081
1094
|
if (!pollForAuthUrl || !challengeDid || isAuthenticated) return;
|
|
1082
|
-
var interval = setInterval(
|
|
1083
|
-
return
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1095
|
+
var interval = setInterval(function() {
|
|
1096
|
+
return _async_to_generator(function() {
|
|
1097
|
+
return _ts_generator(this, function(_state) {
|
|
1098
|
+
fetch(pollForAuthUrl + "?challenge=".concat(challengeDid)).then(function(resp) {
|
|
1099
|
+
if (resp.status === 200) {
|
|
1100
|
+
return resp.json();
|
|
1101
|
+
}
|
|
1102
|
+
return {
|
|
1103
|
+
match: false
|
|
1104
|
+
};
|
|
1105
|
+
}).then(function(json) {
|
|
1106
|
+
if (json.match) {
|
|
1107
|
+
setIsAuthenticated(json.match);
|
|
1108
|
+
}
|
|
1109
|
+
}).catch(function() {});
|
|
1110
|
+
return [
|
|
1111
|
+
2
|
|
1112
|
+
];
|
|
1113
|
+
});
|
|
1114
|
+
})();
|
|
1115
|
+
}, 5e3);
|
|
1101
1116
|
return function() {
|
|
1102
1117
|
clearInterval(interval);
|
|
1103
1118
|
};
|
|
@@ -1106,11 +1121,11 @@ var SignInWithYourSelf = function(param) {
|
|
|
1106
1121
|
isAuthenticated,
|
|
1107
1122
|
pollForAuthUrl
|
|
1108
1123
|
]);
|
|
1109
|
-
var redirectToPlayStore = function() {
|
|
1124
|
+
var redirectToPlayStore = function redirectToPlayStore() {
|
|
1110
1125
|
var playStoreURL = "https://play.google.com/store/apps/details?id=id.selfid";
|
|
1111
1126
|
window.open(playStoreURL, "_blank");
|
|
1112
1127
|
};
|
|
1113
|
-
var redirectToAppStore = function() {
|
|
1128
|
+
var redirectToAppStore = function redirectToAppStore() {
|
|
1114
1129
|
var appStoreURL = "https://apps.apple.com/us/app/self-id/id1663745416";
|
|
1115
1130
|
window.open(appStoreURL, "_blank");
|
|
1116
1131
|
};
|
|
@@ -1201,7 +1216,7 @@ var SignInWithYourSelf = function(param) {
|
|
|
1201
1216
|
var SignInWithYourSelf_default = SignInWithYourSelf;
|
|
1202
1217
|
// src/components/connect/ConnectYourSelf.tsx
|
|
1203
1218
|
var import_react5 = __toESM(require("react"));
|
|
1204
|
-
var ConnectYourSelf = function(param) {
|
|
1219
|
+
var ConnectYourSelf = function ConnectYourSelf(param) {
|
|
1205
1220
|
var challengeBaseUrl = param.challengeBaseUrl, challengeDID = param.challengeDID, onConnectPress = param.onConnectPress;
|
|
1206
1221
|
return /* @__PURE__ */ import_react5.default.createElement(SignInWithYourSelf_default, {
|
|
1207
1222
|
challengeBaseUrl: challengeBaseUrl,
|