hart-estate-widget 4.1.7 → 4.2.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/README.md
CHANGED
@@ -180,22 +180,28 @@ Here you can see a list of accessible options and examples of usage. There are a
|
|
180
180
|
"locale": "en",
|
181
181
|
// Overrides locale keys with custom text or translation
|
182
182
|
"localeOverrides": {
|
183
|
+
"rotate-plan": "Rotate plan",
|
184
|
+
"research-plan": "Research plan",
|
183
185
|
"create-points": "Create a point",
|
184
186
|
"delete-points": "Remove point",
|
185
|
-
"
|
186
|
-
"rotate-plan": "Rotate plan",
|
187
|
+
"instructions-hint-text": "",
|
187
188
|
"ok": "Ok",
|
188
189
|
"ruler-ok": "Ok",
|
190
|
+
|
191
|
+
"made-by-template": "$0 $1",
|
192
|
+
"made-by-prefix": "made by",
|
189
193
|
"made-by-link": "https://getfloorplan.com/",
|
190
194
|
"made-by-text": "getfloorplan.com",
|
195
|
+
|
196
|
+
"style": "Style",
|
197
|
+
|
191
198
|
"floor": "$0 floor",
|
192
199
|
"floorNumberEndings": {
|
193
200
|
"1": "$0st",
|
194
201
|
"2": "$0nd",
|
195
202
|
"3": "$0d",
|
196
203
|
"rest": "$0th"
|
197
|
-
}
|
198
|
-
"style": "Style"
|
204
|
+
}
|
199
205
|
},
|
200
206
|
|
201
207
|
// Path/link to the logo
|
package/build/api.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var r={d:(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e)},e={};r.d(e,{j:()=>t});class t{baseUrl;constructor(r){this.baseUrl=r}get headers(){return{Accept:"application/json;widget-version=4.
|
1
|
+
var r={d:(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e)},e={};r.d(e,{j:()=>t});class t{baseUrl;constructor(r){this.baseUrl=r}get headers(){return{Accept:"application/json;widget-version=4.2.0"}}loadCrmWidgetData=async r=>{if(!r)return this.makeError(404,"No crmPlanId!");try{const e=await this.fetch(`/api/crm/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get CRM Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadWidgetData=async r=>{if(!r)return this.makeError(404,"No planId!");try{const e=await this.fetch(`/api/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadJson=async r=>{try{return(await fetch(r)).json()}catch(r){return this.makeError(500,r.message)}};makeError(r,e="Unknown error"){return{error:{status:r,message:e}}}async makeErrorFromResponse(r,e){if("application/json"===r.headers.get("Content-Type")){const e=await r.json();if("message"in e&&"string"==typeof e.message)return this.makeError(r.status,e.message)}return this.makeError(r.status,e)}fetch(r,e={headers:this.headers}){return fetch(`${this.baseUrl}${r}`,e)}}var a=e.j;export{a as Api};
|