@andersonalmeidax0/webcomponents 0.1.3 → 0.1.5

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/RestAPIAdapter.js CHANGED
@@ -81,7 +81,8 @@ function getStorageWithExpiry(key) {
81
81
  urlServer;
82
82
  tagData;
83
83
  /** ***********************
84
- *
84
+ * tableName is entity (after server)
85
+ * Server is option (can be null for local API ou not for remote APIs)
85
86
  *********************** */
86
87
  constructor(tableName,urlServer,tagData,token,pnewVO) {
87
88
 
@@ -132,8 +133,10 @@ function getStorageWithExpiry(key) {
132
133
  //if(ptoken==null)
133
134
  // throw new PlatAPIAuthError( `An error has occured: ${response.status}`);
134
135
 
135
- var {method,url,body}=this.getParams(q,vo,this.urlServer+"/"+this.tableName,filter);
136
-
136
+ var {method,url,body}=this.getParams(q,vo,"/"+this.tableName,filter);
137
+ //server is optional
138
+ url = this.urlServer==null?url:this.urlServer+url;
139
+
137
140
  const response = await this.myFetch3(ptoken,url,method,body);
138
141
  if (!response.ok) {
139
142
  if(response.status===404)
@@ -14,8 +14,8 @@ import { XFormEdit } from "./XFormEdit.jsx";
14
14
  //import { JZInPlaceListComponent } from "./JZInPlaceListComponent.jsx";
15
15
 
16
16
 
17
- import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "./Errors.js";
18
- import {ErrorConstants} from "./Errors.js";
17
+ import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "../Errors.js";
18
+ import {ErrorConstants} from "../Errors.js";
19
19
  import { ErrorCard } from "./ErrorCard";
20
20
  import { ErrorCardAuth } from "./ErrorCardAuth";
21
21
 
@@ -15,7 +15,7 @@ import { JZEditComponent } from "./JZEditComponent.jsx";
15
15
  import { JZInPlaceListComponent } from "./JZInPlaceListComponent.jsx";
16
16
 
17
17
 
18
- import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "./Errors.js";
18
+ import {PlatAPIError,PlatAPIReturnCodeError,PlatAPIAuthError,PlatAPIDBNotFound,PlatAPIDBIntegrityConstraint,PlatAPIForbidden} from "../Errors.js";
19
19
  import { ErrorCard } from "./ErrorCard";
20
20
  import { ErrorCardAuth } from "./ErrorCardAuth";
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andersonalmeidax0/webcomponents",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "webcomponents",
5
5
  "main": "webcomponents",
6
6
  "scripts": {
package/releasenotes.txt CHANGED
@@ -2,6 +2,9 @@
2
2
  0.1.1: add all components
3
3
  0.1.2: with text labels for buttons
4
4
  0.1.3: RestAPIAdapter init
5
+ 0.1.4: Error move to root
6
+
7
+
5
8
  TODO
6
9
  -change "Errors" => string contants
7
10
  -add "textIcon=true" option para JZEditTable ==> OK
File without changes