@sparkstudio/accounts-ui 1.1.57 → 1.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -20
- package/dist/index.js +4 -21
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -45,6 +45,7 @@ var Users = class {
|
|
|
45
45
|
const url = `${this.baseUrl}/api/Users/GetUser/` + id;
|
|
46
46
|
const requestOptions = {
|
|
47
47
|
method: "GET",
|
|
48
|
+
credentials: "include",
|
|
48
49
|
headers: {
|
|
49
50
|
"Content-Type": "application/json"
|
|
50
51
|
}
|
|
@@ -57,6 +58,7 @@ var Users = class {
|
|
|
57
58
|
const url = `${this.baseUrl}/api/Users/CreateUser`;
|
|
58
59
|
const requestOptions = {
|
|
59
60
|
method: "POST",
|
|
61
|
+
credentials: "include",
|
|
60
62
|
headers: {
|
|
61
63
|
"Content-Type": "application/json"
|
|
62
64
|
},
|
|
@@ -100,26 +102,7 @@ ${err?.message ?? err}`);
|
|
|
100
102
|
setLoading(false);
|
|
101
103
|
}
|
|
102
104
|
};
|
|
103
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_common_ui.Button, { onClick: handleClick, disabled: loading, children: loading ? "Loading..." : "Test" }),
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
-
import_common_ui.Button,
|
|
107
|
-
{
|
|
108
|
-
loadingText: "We are waiting...",
|
|
109
|
-
onAction: async () => {
|
|
110
|
-
await new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
111
|
-
return "Finished after 2 seconds!";
|
|
112
|
-
},
|
|
113
|
-
onDone: (msg) => {
|
|
114
|
-
alert(msg);
|
|
115
|
-
},
|
|
116
|
-
onError: (err) => {
|
|
117
|
-
alert("Something went wrong: " + err);
|
|
118
|
-
},
|
|
119
|
-
children: "My test button"
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
] });
|
|
105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `w-100 text-center mb-3 ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_common_ui.Button, { onClick: handleClick, disabled: loading, children: loading ? "Loading..." : "Test" }) });
|
|
123
106
|
}
|
|
124
107
|
// Annotate the CommonJS export names for ESM import in node:
|
|
125
108
|
0 && (module.exports = {
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var Users = class {
|
|
|
19
19
|
const url = `${this.baseUrl}/api/Users/GetUser/` + id;
|
|
20
20
|
const requestOptions = {
|
|
21
21
|
method: "GET",
|
|
22
|
+
credentials: "include",
|
|
22
23
|
headers: {
|
|
23
24
|
"Content-Type": "application/json"
|
|
24
25
|
}
|
|
@@ -31,6 +32,7 @@ var Users = class {
|
|
|
31
32
|
const url = `${this.baseUrl}/api/Users/CreateUser`;
|
|
32
33
|
const requestOptions = {
|
|
33
34
|
method: "POST",
|
|
35
|
+
credentials: "include",
|
|
34
36
|
headers: {
|
|
35
37
|
"Content-Type": "application/json"
|
|
36
38
|
},
|
|
@@ -54,7 +56,7 @@ var SparkStudioAccountsSDK = class {
|
|
|
54
56
|
|
|
55
57
|
// src/components/TestButton.tsx
|
|
56
58
|
import { Button } from "@sparkstudio/common-ui";
|
|
57
|
-
import { jsx
|
|
59
|
+
import { jsx } from "react/jsx-runtime";
|
|
58
60
|
function TestButton({ className = "" }) {
|
|
59
61
|
const [loading, setLoading] = useState(false);
|
|
60
62
|
const handleClick = async () => {
|
|
@@ -74,26 +76,7 @@ ${err?.message ?? err}`);
|
|
|
74
76
|
setLoading(false);
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ jsx(Button, { onClick: handleClick, disabled: loading, children: loading ? "Loading..." : "Test" }),
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
80
|
-
Button,
|
|
81
|
-
{
|
|
82
|
-
loadingText: "We are waiting...",
|
|
83
|
-
onAction: async () => {
|
|
84
|
-
await new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
85
|
-
return "Finished after 2 seconds!";
|
|
86
|
-
},
|
|
87
|
-
onDone: (msg) => {
|
|
88
|
-
alert(msg);
|
|
89
|
-
},
|
|
90
|
-
onError: (err) => {
|
|
91
|
-
alert("Something went wrong: " + err);
|
|
92
|
-
},
|
|
93
|
-
children: "My test button"
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] });
|
|
79
|
+
return /* @__PURE__ */ jsx("div", { className: `w-100 text-center mb-3 ${className}`, children: /* @__PURE__ */ jsx(Button, { onClick: handleClick, disabled: loading, children: loading ? "Loading..." : "Test" }) });
|
|
97
80
|
}
|
|
98
81
|
export {
|
|
99
82
|
TestButton
|