@ws-ui/shared 1.10.0 → 1.10.2

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/index.es.js CHANGED
@@ -14009,8 +14009,8 @@ function dI(e) {
14009
14009
  function pI(e) {
14010
14010
  return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g, "");
14011
14011
  }
14012
- const rM = () => Yc.uuid().replaceAll("-", "").toUpperCase(), ct = "/rest/$designer", Gs = "/rest/$designer-ext";
14013
- function nM(...e) {
14012
+ const rM = () => Yc.uuid().replaceAll("-", "").toUpperCase(), nM = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, "_").replace(/_{2,}/g, "_").replace(/^_|_$/g, ""), ct = "/rest/$designer", Gs = "/rest/$designer-ext";
14013
+ function iM(...e) {
14014
14014
  return (t) => {
14015
14015
  if (e.length === 0)
14016
14016
  return t;
@@ -14051,7 +14051,7 @@ async function Fe(e, t) {
14051
14051
  }
14052
14052
  return await r.json();
14053
14053
  }
14054
- function iM(e) {
14054
+ function oM(e) {
14055
14055
  return Mc.next({ action: Ts.REQUEST_SENT }), e;
14056
14056
  }
14057
14057
  var Rr = {}, gt = {}, Pg;
@@ -16025,7 +16025,7 @@ function kf(e) {
16025
16025
  asText: typeof t == "string"
16026
16026
  });
16027
16027
  }
16028
- async function sM() {
16028
+ async function uM() {
16029
16029
  const e = [
16030
16030
  "CustomComponents/manifest.json",
16031
16031
  "shared_app_events.json",
@@ -16102,7 +16102,7 @@ function x2(e, t) {
16102
16102
  return e == null ? void 0 : e.message;
16103
16103
  }
16104
16104
  }
16105
- function uM(e) {
16105
+ function lM(e) {
16106
16106
  return Fe(Gs, {
16107
16107
  method: "POST",
16108
16108
  body: JSON.stringify(e),
@@ -16111,7 +16111,7 @@ function uM(e) {
16111
16111
  })
16112
16112
  });
16113
16113
  }
16114
- function lM(e) {
16114
+ function cM(e) {
16115
16115
  return Fe(Gs, {
16116
16116
  method: "POST",
16117
16117
  body: JSON.stringify(e),
@@ -16135,7 +16135,7 @@ const _2 = () => {
16135
16135
  isRestActive: !0
16136
16136
  };
16137
16137
  };
16138
- async function cM() {
16138
+ async function fM() {
16139
16139
  const { hostname: e, host: t, protocol: r } = window.location, i = r === "https:";
16140
16140
  try {
16141
16141
  const a = await Fe(ct, {
@@ -16177,7 +16177,7 @@ async function E2(e) {
16177
16177
  })
16178
16178
  });
16179
16179
  }
16180
- async function fM(...e) {
16180
+ async function dM(...e) {
16181
16181
  return (await Promise.all(
16182
16182
  e.map(
16183
16183
  (i) => E2({
@@ -16194,7 +16194,7 @@ async function fM(...e) {
16194
16194
  }))
16195
16195
  ).flat();
16196
16196
  }
16197
- function dM(e, t = {}) {
16197
+ function pM(e, t = {}) {
16198
16198
  const { sanitize: r = !0 } = t;
16199
16199
  return Fe(`/rest/$getWebForm/${e}`, {
16200
16200
  method: "GET"
@@ -16237,7 +16237,7 @@ function dM(e, t = {}) {
16237
16237
  };
16238
16238
  });
16239
16239
  }
16240
- function pM(e) {
16240
+ function hM(e) {
16241
16241
  return Fe(ct, {
16242
16242
  method: "POST",
16243
16243
  headers: new Headers({
@@ -16251,7 +16251,7 @@ function pM(e) {
16251
16251
  ) ? Tf(t.content) : t.content
16252
16252
  }));
16253
16253
  }
16254
- function hM(e) {
16254
+ function vM(e) {
16255
16255
  return e.type === "folder" ? Fe(Gs, {
16256
16256
  method: "POST",
16257
16257
  body: JSON.stringify(e),
@@ -16266,7 +16266,7 @@ function hM(e) {
16266
16266
  })
16267
16267
  });
16268
16268
  }
16269
- async function vM(e) {
16269
+ async function gM(e) {
16270
16270
  return e.type === "folder" ? (await Fe(Gs, {
16271
16271
  method: "POST",
16272
16272
  body: JSON.stringify(e),
@@ -16281,7 +16281,7 @@ async function vM(e) {
16281
16281
  })
16282
16282
  })).deleted;
16283
16283
  }
16284
- function gM(e) {
16284
+ function mM(e) {
16285
16285
  return Fe(ct, {
16286
16286
  method: "POST",
16287
16287
  body: JSON.stringify(e),
@@ -16290,7 +16290,7 @@ function gM(e) {
16290
16290
  })
16291
16291
  });
16292
16292
  }
16293
- function mM(e) {
16293
+ function yM(e) {
16294
16294
  return Fe(ct, {
16295
16295
  method: "POST",
16296
16296
  body: JSON.stringify(e),
@@ -16299,7 +16299,7 @@ function mM(e) {
16299
16299
  })
16300
16300
  });
16301
16301
  }
16302
- async function yM(e) {
16302
+ async function wM(e) {
16303
16303
  return (await Fe(ct, {
16304
16304
  method: "POST",
16305
16305
  body: JSON.stringify(e),
@@ -16308,7 +16308,7 @@ async function yM(e) {
16308
16308
  })
16309
16309
  })).deleted;
16310
16310
  }
16311
- async function wM(...e) {
16311
+ async function bM(...e) {
16312
16312
  return await Fe(ct, {
16313
16313
  method: "POST",
16314
16314
  body: JSON.stringify({
@@ -16320,7 +16320,7 @@ async function wM(...e) {
16320
16320
  })
16321
16321
  });
16322
16322
  }
16323
- async function bM(e) {
16323
+ async function SM(e) {
16324
16324
  const t = await Fe("/api/login", {
16325
16325
  method: "POST",
16326
16326
  body: JSON.stringify({
@@ -16332,7 +16332,7 @@ async function bM(e) {
16332
16332
  });
16333
16333
  return t.isLogged && t.success;
16334
16334
  }
16335
- async function SM() {
16335
+ async function xM() {
16336
16336
  return await Fe(
16337
16337
  "/rest/$catalog/$all?$metadata=full",
16338
16338
  {
@@ -16343,7 +16343,7 @@ async function SM() {
16343
16343
  }
16344
16344
  );
16345
16345
  }
16346
- async function xM(e) {
16346
+ async function _M(e) {
16347
16347
  try {
16348
16348
  const t = process.env.NODE_ENV === "development" ? "/i18n/languages.json" : `/$lib/${e ? "studio" : "renderer"}/i18n/languages.json`, i = await (await fetch(t)).text(), { supported: a } = JSON.parse(i);
16349
16349
  return a;
@@ -16351,7 +16351,7 @@ async function xM(e) {
16351
16351
  return [];
16352
16352
  }
16353
16353
  }
16354
- async function _M({
16354
+ async function EM({
16355
16355
  name: e,
16356
16356
  path: t = "",
16357
16357
  root: r = "root",
@@ -16369,7 +16369,7 @@ async function _M({
16369
16369
  headers: new Headers({ "Content-Type": "application/json" })
16370
16370
  });
16371
16371
  }
16372
- async function EM(e = {}) {
16372
+ async function OM(e = {}) {
16373
16373
  try {
16374
16374
  return await Vs({
16375
16375
  path: "shared_datasources.json",
@@ -16379,7 +16379,7 @@ async function EM(e = {}) {
16379
16379
  return {};
16380
16380
  }
16381
16381
  }
16382
- async function OM(e = {}) {
16382
+ async function AM(e = {}) {
16383
16383
  try {
16384
16384
  return await Vs({
16385
16385
  path: "shared_app_events.json",
@@ -16389,7 +16389,7 @@ async function OM(e = {}) {
16389
16389
  return [];
16390
16390
  }
16391
16391
  }
16392
- async function AM(e = {}) {
16392
+ async function TM(e = {}) {
16393
16393
  try {
16394
16394
  return await Vs({
16395
16395
  path: "shared_css.json",
@@ -16399,7 +16399,7 @@ async function AM(e = {}) {
16399
16399
  return { classes: [] };
16400
16400
  }
16401
16401
  }
16402
- async function TM(e = {}) {
16402
+ async function RM(e = {}) {
16403
16403
  try {
16404
16404
  return await Vs({
16405
16405
  path: "saved_conditions.json",
@@ -16409,7 +16409,7 @@ async function TM(e = {}) {
16409
16409
  return { conditions: [] };
16410
16410
  }
16411
16411
  }
16412
- async function RM() {
16412
+ async function PM() {
16413
16413
  try {
16414
16414
  return await Fe(
16415
16415
  "/rest/$info/privileges",
@@ -16424,14 +16424,14 @@ async function RM() {
16424
16424
  return { privileges: [] };
16425
16425
  }
16426
16426
  }
16427
- async function PM() {
16427
+ async function kM() {
16428
16428
  try {
16429
16429
  return await (await fetch(`monaco_theme.json?t=${Date.now()}`)).json();
16430
16430
  } catch {
16431
16431
  return null;
16432
16432
  }
16433
16433
  }
16434
- const O2 = Uy(), kM = async (e) => {
16434
+ const O2 = Uy(), CM = async (e) => {
16435
16435
  const t = {
16436
16436
  verb: ti.SET_FILE_CONTENT,
16437
16437
  asText: !1,
@@ -16447,7 +16447,7 @@ const O2 = Uy(), kM = async (e) => {
16447
16447
  "Content-Type": "application/json"
16448
16448
  })
16449
16449
  }), e));
16450
- }, A2 = Uy(), CM = async (e) => {
16450
+ }, A2 = Uy(), $M = async (e) => {
16451
16451
  const t = {
16452
16452
  verb: ti.SET_FILE_CONTENT,
16453
16453
  asText: !1,
@@ -16482,12 +16482,12 @@ const O2 = Uy(), kM = async (e) => {
16482
16482
  type: r,
16483
16483
  size: 0
16484
16484
  };
16485
- }, $M = async (e) => await i0({
16485
+ }, IM = async (e) => await i0({
16486
16486
  name: "crafted_components.json",
16487
16487
  path: Un.WEBFORMS,
16488
16488
  content: e
16489
16489
  });
16490
- function IM(e) {
16490
+ function LM(e) {
16491
16491
  return Fe(ct, {
16492
16492
  method: "POST",
16493
16493
  body: JSON.stringify(e),
@@ -16496,7 +16496,7 @@ function IM(e) {
16496
16496
  })
16497
16497
  });
16498
16498
  }
16499
- function LM(e) {
16499
+ function MM(e) {
16500
16500
  return Fe(ct, {
16501
16501
  method: "POST",
16502
16502
  body: JSON.stringify(e),
@@ -16505,7 +16505,7 @@ function LM(e) {
16505
16505
  })
16506
16506
  });
16507
16507
  }
16508
- function MM(e) {
16508
+ function NM(e) {
16509
16509
  return Fe(ct, {
16510
16510
  method: "POST",
16511
16511
  body: JSON.stringify(e),
@@ -16514,7 +16514,7 @@ function MM(e) {
16514
16514
  })
16515
16515
  });
16516
16516
  }
16517
- function NM(e) {
16517
+ function FM(e) {
16518
16518
  return Fe(ct, {
16519
16519
  method: "POST",
16520
16520
  body: JSON.stringify(e),
@@ -16529,7 +16529,7 @@ function NM(e) {
16529
16529
  throw ((i = (r = t.data) == null ? void 0 : r.__ERROR[0]) == null ? void 0 : i.errCode) === 1839 && kf(e.path), t;
16530
16530
  });
16531
16531
  }
16532
- function FM(e) {
16532
+ function DM(e) {
16533
16533
  return Fe(ct, {
16534
16534
  method: "POST",
16535
16535
  body: JSON.stringify(e),
@@ -16568,7 +16568,7 @@ function P2(e) {
16568
16568
  result: i
16569
16569
  };
16570
16570
  }
16571
- async function DM(e, t) {
16571
+ async function zM(e, t) {
16572
16572
  const i = e.split(".").pop();
16573
16573
  try {
16574
16574
  const a = await Fe(ct, {
@@ -16600,7 +16600,7 @@ async function DM(e, t) {
16600
16600
  }
16601
16601
  }
16602
16602
  var k2 = /* @__PURE__ */ ((e) => (e.STUDIO_LOADED = "UA-1-0", e.WELCOME_TOUR_INIT = "UA-1-3", e.WELCOME_TOUR_END = "UA-1-4", e))(k2 || {});
16603
- function zM(e, t) {
16603
+ function WM(e, t) {
16604
16604
  fetch("/api/v1/activity", {
16605
16605
  body: JSON.stringify({
16606
16606
  AID: e,
@@ -16613,11 +16613,11 @@ function zM(e, t) {
16613
16613
  }).catch((r) => {
16614
16614
  });
16615
16615
  }
16616
- function WM(e) {
16616
+ function BM(e) {
16617
16617
  window.pagesense = window.pagesense || [], window.pagesense.push(["trackEvent", e]);
16618
16618
  }
16619
16619
  var C2 = /* @__PURE__ */ ((e) => (e.LOCAL = "local", e.SHARED = "shared", e.THEME = "theme", e))(C2 || {}), $2 = /* @__PURE__ */ ((e) => (e[e.METHOD = 1] = "METHOD", e[e.CLASS = 10] = "CLASS", e))($2 || {}), I2 = /* @__PURE__ */ ((e) => (e.WelCome = "WelCome", e.ActionPanel = "ActionPanel", e.SideBar = "SideBar", e.Settings = "Settings", e.Main = "Main", e.Explorer = "Explorer", e.Header = "Header", e.ComponentList = "ComponentList", e))(I2 || {}), L2 = /* @__PURE__ */ ((e) => (e[e.FILE_NOT_FOUND = 1839] = "FILE_NOT_FOUND", e[e.JSON_MALFORMED = 554] = "JSON_MALFORMED", e[e.JSON_MALFORMED_AT_LINE = 550] = "JSON_MALFORMED_AT_LINE", e))(L2 || {});
16620
- const BM = {
16620
+ const UM = {
16621
16621
  transparent: {
16622
16622
  backgroundColor: "transparent"
16623
16623
  },
@@ -16633,7 +16633,7 @@ const BM = {
16633
16633
  padding: "3px 5px",
16634
16634
  borderRadius: 5
16635
16635
  }
16636
- }, UM = {
16636
+ }, jM = {
16637
16637
  Code: {
16638
16638
  key: "editors:code",
16639
16639
  config: { language: "4d", theme: "fd-dark" }
@@ -16648,7 +16648,7 @@ export {
16648
16648
  i$ as BaseCheckboxIcon,
16649
16649
  oL as Checkbox,
16650
16650
  Uk as ControlledSwitch,
16651
- BM as DATASOURCE_THEMES,
16651
+ UM as DATASOURCE_THEMES,
16652
16652
  q$ as DatasourcesActions,
16653
16653
  V$ as DebuggerActions,
16654
16654
  o$ as DefaultCheckboxIcon,
@@ -16656,7 +16656,7 @@ export {
16656
16656
  U2 as Dialog,
16657
16657
  gA as DialogBody,
16658
16658
  k2 as EActivity,
16659
- UM as EDITOR,
16659
+ jM as EDITOR,
16660
16660
  I2 as EIDENTIFIERS,
16661
16661
  L2 as ERROR_CODES,
16662
16662
  C2 as EWebFormStyleClassScope,
@@ -16712,48 +16712,48 @@ export {
16712
16712
  KL as _isArrayDatasource,
16713
16713
  VL as _isObjectDatasource,
16714
16714
  tM as addAttributesToContent,
16715
- gM as addFolder,
16715
+ mM as addFolder,
16716
16716
  nI as by,
16717
16717
  IL as byId,
16718
16718
  LL as byPath,
16719
- iM as callServerSideParser,
16720
- uM as checkUpdates,
16721
- IM as createFolder,
16719
+ oM as callServerSideParser,
16720
+ lM as checkUpdates,
16721
+ LM as createFolder,
16722
16722
  yL as datasourcesSubject,
16723
16723
  xL as debuggerSubject,
16724
- vM as dropFile,
16725
- yM as dropFolder,
16724
+ gM as dropFile,
16725
+ wM as dropFolder,
16726
16726
  ML as exists,
16727
16727
  kL as extractWebformName,
16728
16728
  rM as generateUUID,
16729
- cM as getAppSettings,
16730
- SM as getCatalog,
16729
+ fM as getAppSettings,
16730
+ xM as getCatalog,
16731
16731
  NL as getDatasourceId,
16732
16732
  _2 as getDefaultAppSettings,
16733
- pM as getFile,
16734
- _M as getFileContent,
16733
+ hM as getFile,
16734
+ EM as getFileContent,
16735
16735
  PL as getFileExtentionFromType,
16736
16736
  RL as getFilenameAndTypeFromPath,
16737
- wM as getFilesInfo,
16737
+ bM as getFilesInfo,
16738
16738
  E2 as getFolder,
16739
- fM as getFolders,
16740
- DM as getFunctionContent,
16741
- PM as getMonacoTheme,
16742
- NM as getNodeInfo,
16743
- TM as getSavedConditions,
16744
- OM as getSharedAppEvents,
16745
- AM as getSharedCSS,
16746
- EM as getSharedDatasources,
16739
+ dM as getFolders,
16740
+ zM as getFunctionContent,
16741
+ kM as getMonacoTheme,
16742
+ FM as getNodeInfo,
16743
+ RM as getSavedConditions,
16744
+ AM as getSharedAppEvents,
16745
+ TM as getSharedCSS,
16746
+ OM as getSharedDatasources,
16747
16747
  Vs as getSharedResource,
16748
- xM as getSupportedLanguages,
16748
+ _M as getSupportedLanguages,
16749
16749
  By as getTypeFromExtension,
16750
- RM as getUserPrivileges,
16751
- dM as getWebForm,
16750
+ PM as getUserPrivileges,
16751
+ pM as getWebForm,
16752
16752
  dI as hasAttributesString,
16753
16753
  Fe as http,
16754
16754
  EL as i18nSubject,
16755
- sM as initializeDefaultProjectFiles,
16756
- lM as installUpdates,
16755
+ uM as initializeDefaultProjectFiles,
16756
+ cM as installUpdates,
16757
16757
  sI as isArrayDatasource,
16758
16758
  WL as isDataClassMethod,
16759
16759
  zL as isDataStoreMethod,
@@ -16774,30 +16774,31 @@ export {
16774
16774
  qL as isSimpleDatasource,
16775
16775
  XL as loadDS,
16776
16776
  JL as loadI18n,
16777
- zM as log,
16778
- bM as login,
16777
+ WM as log,
16778
+ SM as login,
16779
16779
  SL as lspSubject,
16780
- MM as moveItem,
16780
+ NM as moveItem,
16781
16781
  CL as outBy,
16782
16782
  $L as outById,
16783
16783
  eM as parseAttributes,
16784
16784
  Uy as queue,
16785
16785
  pI as removeAttributesString,
16786
- LM as removeItem,
16787
- hM as renameFile,
16788
- mM as renameFolder,
16786
+ MM as removeItem,
16787
+ vM as renameFile,
16788
+ yM as renameFolder,
16789
16789
  Tf as sanitizeContent,
16790
- FM as saveContent,
16791
- $M as setCraftedComponents,
16790
+ nM as sanitizeNameCY,
16791
+ DM as saveContent,
16792
+ IM as setCraftedComponents,
16792
16793
  i0 as setFileContent,
16793
- CM as setSharedAppEvents,
16794
- kM as setSharedSources,
16794
+ $M as setSharedAppEvents,
16795
+ CM as setSharedSources,
16795
16796
  fI as stringifyAttributes,
16796
16797
  bL as tabEventsSubject,
16797
16798
  _L as tasksManagerSubject,
16798
16799
  Z$ as toastSubject,
16799
- WM as trackEvent,
16800
- nM as transformDates,
16800
+ BM as trackEvent,
16801
+ iM as transformDates,
16801
16802
  kf as tryCreateSharedResource,
16802
16803
  aL as useDidMountEffect,
16803
16804
  gL as useDoubleClick,