@gandalan/weblibs 1.1.13 → 1.1.16
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/.eslintrc.cjs +2 -1
- package/api/IDAS.js +1 -1
- package/api/RESTClient.js +10 -7
- package/api/authUtils.js +4 -4
- package/components/Datepicker.svelte +4 -4
- package/components/Inputbox.svelte +7 -7
- package/package.json +4 -3
package/.eslintrc.cjs
CHANGED
|
@@ -25,7 +25,7 @@ module.exports = {
|
|
|
25
25
|
rules: {
|
|
26
26
|
"yoda": "error",
|
|
27
27
|
eqeqeq: ["warn", "smart"],
|
|
28
|
-
|
|
28
|
+
indent: ["error", 4, { "SwitchCase": 1 }],
|
|
29
29
|
quotes: ["error", "double"],
|
|
30
30
|
semi: ["off", "never"],
|
|
31
31
|
"no-multi-spaces": ["error", { ignoreEOLComments: true }],
|
|
@@ -51,6 +51,7 @@ module.exports = {
|
|
|
51
51
|
"array-bracket-newline": ["error", "consistent"],
|
|
52
52
|
"eol-last": ["error", "always"],
|
|
53
53
|
"prefer-template": "error",
|
|
54
|
+
"template-curly-spacing": ["warn", "never"],
|
|
54
55
|
"comma-dangle": ["warn", "always-multiline"],
|
|
55
56
|
},
|
|
56
57
|
};
|
package/api/IDAS.js
CHANGED
|
@@ -100,7 +100,7 @@ class IDAS
|
|
|
100
100
|
_self: this,
|
|
101
101
|
async getAll(mandantGuid)
|
|
102
102
|
{
|
|
103
|
-
return await this._self.restClient.get(`/BenutzerListe/${mandantGuid
|
|
103
|
+
return await this._self.restClient.get(`/BenutzerListe/${mandantGuid}/?mitRollenUndRechten=true`);
|
|
104
104
|
},
|
|
105
105
|
async get(guid)
|
|
106
106
|
{
|
package/api/RESTClient.js
CHANGED
|
@@ -51,7 +51,7 @@ export class RESTClient
|
|
|
51
51
|
const response = await this.axiosInstance.get(uri, this.getUrlOptions());
|
|
52
52
|
this.lastError = "";
|
|
53
53
|
return response.data;
|
|
54
|
-
|
|
54
|
+
}
|
|
55
55
|
catch (error)
|
|
56
56
|
{
|
|
57
57
|
this.handleError(error);
|
|
@@ -156,23 +156,26 @@ export class RESTClient
|
|
|
156
156
|
{
|
|
157
157
|
// The request was made and the server responded with a status code
|
|
158
158
|
// that falls out of the range of 2xx
|
|
159
|
-
|
|
160
|
-
console.
|
|
161
|
-
console.log(error.response.headers);
|
|
159
|
+
// eslint-disable-next-line
|
|
160
|
+
console.error(error.response.data, error.response.status, error.response.headers);
|
|
162
161
|
}
|
|
163
162
|
else if (error.request)
|
|
164
163
|
{
|
|
165
164
|
// The request was made but no response was received
|
|
166
165
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
|
167
166
|
// http.ClientRequest in node.js
|
|
168
|
-
|
|
167
|
+
// eslint-disable-next-line
|
|
168
|
+
console.error("Request", error.request);
|
|
169
169
|
}
|
|
170
170
|
else
|
|
171
171
|
{
|
|
172
172
|
// Something happened in setting up the request that triggered an Error
|
|
173
|
-
|
|
173
|
+
// eslint-disable-next-line
|
|
174
|
+
console.error("Error", error.message);
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
+
|
|
177
|
+
// eslint-disable-next-line
|
|
178
|
+
console.info("Config", error.config);
|
|
176
179
|
this.lastError = error;
|
|
177
180
|
}
|
|
178
181
|
}
|
package/api/authUtils.js
CHANGED
|
@@ -131,10 +131,10 @@ export async function tryRenew(settings)
|
|
|
131
131
|
const url = settings.authUrl || settings.apiBaseurl;
|
|
132
132
|
const payload = { "Token": currentRefreshToken };
|
|
133
133
|
const response = await fetch(`${url}LoginJwt/Refresh`, {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
method: "PUT",
|
|
135
|
+
body: JSON.stringify(payload),
|
|
136
|
+
headers: { "Content-Type": "application/json" },
|
|
137
|
+
});
|
|
138
138
|
const token = await response.json();
|
|
139
139
|
currentToken = token;
|
|
140
140
|
//console.log("Got JWT token:", currentToken);
|
|
@@ -182,13 +182,13 @@
|
|
|
182
182
|
}
|
|
183
183
|
else if (allowedFunctionalKeys.includes(e.key) === true)
|
|
184
184
|
{
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
187
|
else
|
|
188
188
|
{
|
|
189
189
|
ignoreInput(e);
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
}
|
|
192
192
|
function getValueFormatted(oldValue)
|
|
193
193
|
{
|
|
194
194
|
let localTag = (new Date(oldValue).getUTCDate()).toString();
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
{
|
|
204
204
|
localTag = `0${localTag}`;
|
|
205
205
|
}
|
|
206
|
-
return `${localTag
|
|
206
|
+
return `${localTag}.${localMonat}.${localJahr}`;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
setFieldStyle();
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
}
|
|
92
92
|
else if (allowedFunctionalKeys.includes(e.key) === true)
|
|
93
93
|
{ // Prüfung auf Funktionstasten wie [ENTF], [DEL], usw.
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
96
|
else
|
|
97
97
|
{ // Alles andere soll nicht erlaubt sein
|
|
98
98
|
ignoreInput(e);
|
|
@@ -145,19 +145,19 @@
|
|
|
145
145
|
{
|
|
146
146
|
switch (e.key)
|
|
147
147
|
{
|
|
148
|
-
|
|
148
|
+
case "Enter":
|
|
149
149
|
if (typeof(KeyDownFunctionOnEnter) != "undefined")
|
|
150
150
|
{
|
|
151
151
|
KeyDownFunctionOnEnter();
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
break;
|
|
154
|
+
case "Tab":
|
|
155
155
|
if (typeof(KeyDownFunctionOnTab) != "undefined")
|
|
156
156
|
{
|
|
157
157
|
KeyDownFunctionOnTab();
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
161
|
}
|
|
162
162
|
function ignoreInput(e)
|
|
163
163
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gandalan/weblibs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "WebLibs for Gandalan JS/TS/Svelte projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gandalan"
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"svelte-check": "svelte-check",
|
|
18
18
|
"svelte-check:watch": "svelte-check --watch",
|
|
19
19
|
"lint": "eslint .",
|
|
20
|
+
"lint:prod": "eslint . --max-warnings 0",
|
|
20
21
|
"lint:fix": "eslint . --fix"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
@@ -29,8 +30,8 @@
|
|
|
29
30
|
"@babel/eslint-parser": "^7.23.3",
|
|
30
31
|
"chota": "^0.9.2",
|
|
31
32
|
"eslint": "^8.54.0",
|
|
32
|
-
"eslint-plugin-svelte": "^2.35.
|
|
33
|
-
"svelte": "^4.2.
|
|
33
|
+
"eslint-plugin-svelte": "^2.35.1",
|
|
34
|
+
"svelte": "^4.2.7",
|
|
34
35
|
"svelte-check": "^3.6.0",
|
|
35
36
|
"svelte-chota": "^1.8.6"
|
|
36
37
|
},
|