@beam3_dev/api_module 0.0.62 → 0.0.64

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/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
- function A() {
3
+ import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -118,7 +118,7 @@ function pe(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
119
  let s;
120
120
  s === void 0 && (s = n.createProxy({
121
- widgetId: R.id,
121
+ widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
@@ -132,7 +132,7 @@ async function fe(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -369,25 +369,19 @@ function be(e, t, n = void 0, s = void 0) {
369
369
  }
370
370
  });
371
371
  }
372
- const J = async (e, t, n) => {
373
- if (!e.space)
374
- return;
375
- const s = `${e.space}/resources/v1/application/CSRF`;
376
- try {
377
- const o = await f(
378
- s,
379
- (r) => {
380
- const i = JSON.parse(o);
381
- console.log("getCSRFToken() / response => ", i), t?.(i.csrf);
372
+ async function J(e, t, n) {
373
+ if (e.space) {
374
+ const s = `${e.space}/resources/v1/application/CSRF`;
375
+ f(s, {
376
+ onComplete(o) {
377
+ o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
382
378
  },
383
- (r) => {
384
- n?.({ error, headers, xhr });
379
+ onFailure(o, r, i) {
380
+ n && n({ error: o, headers: r, xhr: i });
385
381
  }
386
- );
387
- } catch (o) {
388
- n?.("erreur", o);
382
+ });
389
383
  }
390
- };
384
+ }
391
385
  async function G(e, t = void 0, n = void 0, s = void 0) {
392
386
  const o = e.space;
393
387
  if (t === void 0) {
@@ -616,7 +610,7 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
616
610
  }
617
611
  ]
618
612
  },
619
- tempId: A()
613
+ tempId: R()
620
614
  }
621
615
  ]
622
616
  }),
@@ -694,7 +688,7 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
694
688
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
695
689
  ), (e.space === "" || !e.space) && console.warn(
696
690
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
697
- ), (e.token === "" || !e.token) && (J(
691
+ ), (e.token === "" || !e.token) && (console.log("je récupère un nouveau token"), J(
698
692
  e,
699
693
  (r) => {
700
694
  e.token = r;
@@ -1010,7 +1004,7 @@ function je(e, t, n, s = void 0, o = void 0) {
1010
1004
  });
1011
1005
  }
1012
1006
  //!SECTION
1013
- function Re(e, t = void 0, n = void 0) {
1007
+ function Ae(e, t = void 0, n = void 0) {
1014
1008
  const s = {
1015
1009
  base: `${e.space}`,
1016
1010
  uri: "/resources/bps/cspaces",
@@ -1031,7 +1025,7 @@ function Re(e, t = void 0, n = void 0) {
1031
1025
  }
1032
1026
  });
1033
1027
  }
1034
- function Ae(e, t, n, s) {
1028
+ function Re(e, t, n, s) {
1035
1029
  U(
1036
1030
  e.space,
1037
1031
  t,
@@ -1232,7 +1226,7 @@ function q(e, t, n = void 0, s = void 0) {
1232
1226
  }, i = `${r.baseUrl}${r.uri}`, a = {
1233
1227
  "Content-Type": "application/json",
1234
1228
  Accept: "application/json,text/javascript,*/*"
1235
- }, c = A(), d = {
1229
+ }, c = R(), d = {
1236
1230
  with_indexing_date: !0,
1237
1231
  with_synthesis: !0,
1238
1232
  with_nls: !1,
@@ -1895,7 +1889,7 @@ function Ze(e) {
1895
1889
  return console.log(t), t;
1896
1890
  }
1897
1891
  export {
1898
- A as UUID,
1892
+ R as UUID,
1899
1893
  ke as _3DSpace_Create_Doc,
1900
1894
  C as _3DSpace_csrf,
1901
1895
  I as _3DSpace_download_doc,
@@ -1943,11 +1937,11 @@ export {
1943
1937
  B as dataMixing,
1944
1938
  Te as deleteUserGroups,
1945
1939
  re as findAdresse,
1946
- Re as getAllContextSecurity,
1940
+ Ae as getAllContextSecurity,
1947
1941
  J as getCSRFToken,
1948
1942
  ie as getCommunes,
1949
1943
  ye as getComplementUG,
1950
- Ae as getDataFrom3DSpace,
1944
+ Re as getDataFrom3DSpace,
1951
1945
  ce as getDataFromGouvFr,
1952
1946
  Pe as getDatasByTenant,
1953
1947
  Me as getDatasFrom3DSpace,