@gandalan/weblibs 0.0.11 → 0.0.14

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/api/IDAS.js CHANGED
@@ -16,7 +16,10 @@ let authToken = localStorage.getItem("IDAS_AuthToken");
16
16
  //let mandantGuid = localStorage.getItem("IDAS_MandantGuid");
17
17
  let apiBaseUrl = localStorage.getItem("IDAS_ApiBaseUrl") || "https://api.dev.idas-cloudservices.net/api";
18
18
  //let siteBaseUrl = localStorage.getItem("SiteBaseUrl") || window.location.protocol + "//" + window.location.host;
19
- let ssoAuthUrl = apiBaseUrl.replace(/\/api$/, "") + "/SSO?a=" + appToken + "&r=%target%?t=%token%%26m=%mandant%";
19
+
20
+ let ssoAuthUrl = apiBaseUrl + "/SSO?a=" + appToken + "&r=%target%?t=%token%%26m=%mandant%";
21
+ ssoAuthUrl = ssoAuthUrl.replace('/api/', '');
22
+
20
23
  let restClient = new RESTClient(apiBaseUrl, authToken);
21
24
  restClient.onError = (error, message) => {
22
25
  if (message.indexOf("401") || message.indexOf("403"))
@@ -65,6 +68,15 @@ export class IDAS
65
68
  async save(m) { await restClient.put("/Benutzer", m); }
66
69
  };
67
70
 
71
+ feedback = {
72
+ async getAll() { return await restClient.get("/Feedback/"); },
73
+ async get(guid) { return await restClient.get("/Feedback/" + guid); },
74
+ async save(m) { await restClient.put("/Feedback", m); },
75
+ async comment(m) { await restClient.put("/FeedbackKommentar", m); },
76
+ async attachFile(m) { await restClient.put("/FeedbackAttachment", m); },
77
+ async deleteFile(guid) { await restClient.delete("/FeedbackAttachment/" + guid); }
78
+ };
79
+
68
80
  rollen = {
69
81
  async getAll() { return await restClient.get("/Rollen"); },
70
82
  async save(m) { await restClient.put("/Rollen", m); }
package/index.js ADDED
@@ -0,0 +1,17 @@
1
+ import AddButton from './components/AddButton.svelte';
2
+ import DataGrid from './components/DataGrid.svelte';
3
+ import Dialog from './components/Datepicker.svelte';
4
+ import Datepicker from './components/Datepicker.svelte';
5
+ import Inputbox from './components/Inputbox.svelte';
6
+ import RemoveButton from './components/RemoveButton.svelte';
7
+ import SaveButton from './components/SaveButton.svelte';
8
+
9
+ export {
10
+ DataGrid, Datepicker, Inputbox, Dialog,
11
+ AddButton, RemoveButton, SaveButton
12
+ }
13
+
14
+ import { IDAS } from './api/IDAS';
15
+ import { RESTClient } from './api/RESTClient';
16
+
17
+ export { IDAS, RESTClient };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "0.0.11",
3
+ "version": "0.0.14",
4
4
  "description": "WebLibs for Gandalan JS/TS/Svelte projects",
5
5
  "author": "Philipp Reif",
6
6
  "license": "ISC",
7
+ "main": "index.js",
7
8
  "devDependencies": {
8
9
  "chota": "^0.8.0",
9
10
  "svelte": "^3.38.3",
package/api/index.js DELETED
@@ -1,4 +0,0 @@
1
- import { IDAS } from './IDAS';
2
- import { RESTClient } from './RESTClient';
3
-
4
- export { IDAS, RESTClient };
@@ -1,12 +0,0 @@
1
- import AddButton from './AddButton.svelte';
2
- import DataGrid from './DataGrid.svelte';
3
- import Dialog from './Datepicker.svelte';
4
- import Datepicker from './Datepicker.svelte';
5
- import Inputbox from './Inputbox.svelte';
6
- import RemoveButton from './RemoveButton.svelte';
7
- import SaveButton from './SaveButton.svelte';
8
-
9
- export {
10
- DataGrid, Datepicker, Inputbox, Dialog,
11
- AddButton, RemoveButton, SaveButton
12
- }