@ws-ui/shared 0.0.48 → 0.0.49

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
@@ -12499,7 +12499,7 @@ function YR(e) {
12499
12499
  return n ? `${n}:${r}` : r;
12500
12500
  }
12501
12501
  function FP(e) {
12502
- return !![
12502
+ return [
12503
12503
  "bool",
12504
12504
  "word",
12505
12505
  "string",
@@ -12516,32 +12516,35 @@ function FP(e) {
12516
12516
  "blob"
12517
12517
  ].includes(e.type || "");
12518
12518
  }
12519
+ function GR(e) {
12520
+ return e.type === "object";
12521
+ }
12519
12522
  function WP(e) {
12520
12523
  var r;
12521
- return !!(e.kind === "relatedEntities" || (r = e.type) != null && r.includes("Selection") || e.behavior === "relatedEntities");
12524
+ return e.kind === "relatedEntities" || ((r = e.type) == null ? void 0 : r.includes("Selection")) || e.behavior === "relatedEntities";
12522
12525
  }
12523
12526
  function UP(e) {
12524
12527
  return e.kind === "relatedEntity" || e.behavior === "relatedEntity" || !FP(e);
12525
12528
  }
12526
- function GR(e) {
12529
+ function XR(e) {
12527
12530
  return WP(e) || UP(e);
12528
12531
  }
12529
- function XR(e) {
12532
+ function VR(e) {
12530
12533
  return e.applyTo === "dataStore";
12531
12534
  }
12532
- function VR(e) {
12535
+ function JR(e) {
12533
12536
  return e.applyTo === "dataClass";
12534
12537
  }
12535
- function JR(e) {
12538
+ function ZR(e) {
12536
12539
  return e.applyTo === "entity";
12537
12540
  }
12538
- function ZR(e) {
12541
+ function QR(e) {
12539
12542
  return e.applyTo === "entityCollection";
12540
12543
  }
12541
- function QR(e) {
12544
+ function eA(e) {
12542
12545
  return e.type === "entity";
12543
12546
  }
12544
- function eA(e) {
12547
+ function tA(e) {
12545
12548
  return e.type === "entitysel";
12546
12549
  }
12547
12550
  function BP(e) {
@@ -12553,24 +12556,24 @@ function HP(e) {
12553
12556
  function zP(e) {
12554
12557
  return e.type === "scalar";
12555
12558
  }
12556
- function tA(e) {
12559
+ function nA(e) {
12557
12560
  return BP(e) || HP(e) || zP(e);
12558
12561
  }
12559
- const nA = (e) => e != null && e.type === "entity", rA = (e) => e.type === "entitysel", iA = (e) => e.type === "array" || e.type === "scalar" && e.dataType === "array", oA = (e) => e.type === "object" || e.type === "scalar" && e.dataType === "object", aA = (e) => e.type === "scalar" && e.dataType === "date";
12560
- function sA() {
12562
+ const rA = (e) => e != null && e.type === "entity", iA = (e) => e.type === "entitysel", oA = (e) => e.type === "array" || e.type === "scalar" && e.dataType === "array", aA = (e) => e.type === "object" || e.type === "scalar" && e.dataType === "object", sA = (e) => e.type === "scalar" && e.dataType === "date";
12563
+ function uA() {
12561
12564
  return new Promise((e, r) => {
12562
12565
  window.addEventListener("bundle:ready", (n) => n.data ? e() : r(n.caughtErr));
12563
12566
  });
12564
12567
  }
12565
12568
  var Ga = /* @__PURE__ */ ((e) => (e.capable = "capable", e.incapable = "incapable", e.indifferent = "indifferent", e))(Ga || {}), qP = /* @__PURE__ */ ((e) => (e.soap = "soap", e.web = "web", e.sql = "sql", e.rest = "rest", e))(qP || {}), Fv = /* @__PURE__ */ ((e) => (e.table = "table", e.catalog = "catalog", e.currentRecord = "currentRecord", e.currentSelection = "currentSelection", e))(Fv || {});
12566
- const uA = {
12569
+ const cA = {
12567
12570
  publishedSoap: "soap",
12568
12571
  publishedWeb: "web",
12569
12572
  publishedSql: "sql",
12570
12573
  publishedRest: "rest"
12571
12574
  /* rest */
12572
12575
  };
12573
- function cA(e) {
12576
+ function lA(e) {
12574
12577
  var u;
12575
12578
  let r = {};
12576
12579
  try {
@@ -12602,7 +12605,7 @@ function KP(e) {
12602
12605
  const r = {};
12603
12606
  return e.invisible && (r.invisible = !0), e.shared && (r.shared = !0), e.executedOnServer && (r.executedOnServer = !0), e.preemptive && [Ga.capable, Ga.incapable].includes(e.preemptive) && (r.preemptive = e.preemptive), e.publishedSoap && (r.publishedSoap = !0, e.publishedWsdl && (r.publishedWsdl = !0)), e.publishedWeb && (r.publishedWeb = !0), e.publishedSql && (r.publishedSql = !0), e.publishedRest && e.publishedRestOptions && (r.published4DMobile = e.publishedRestOptions), JSON.stringify(r).replace(/"(true|false)"/g, "$1");
12604
12607
  }
12605
- function lA(e, r, n = !1) {
12608
+ function fA(e, r, n = !1) {
12606
12609
  const o = yn.isString(r) ? r : KP(r);
12607
12610
  if (!n && YP(e))
12608
12611
  return e;
@@ -12617,7 +12620,7 @@ function GP(e) {
12617
12620
  return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g, "");
12618
12621
  }
12619
12622
  const gt = "/rest/$designer", ss = "/rest/$designer-ext", Wv = "/$shared";
12620
- function fA(...e) {
12623
+ function dA(...e) {
12621
12624
  return (r) => {
12622
12625
  if (e.length === 0)
12623
12626
  return r;
@@ -12649,7 +12652,7 @@ async function Ge(e, r) {
12649
12652
  }
12650
12653
  return await n.json();
12651
12654
  }
12652
- function dA(e) {
12655
+ function pA(e) {
12653
12656
  return Ge(ss, {
12654
12657
  method: "POST",
12655
12658
  body: JSON.stringify(e),
@@ -12658,7 +12661,7 @@ function dA(e) {
12658
12661
  })
12659
12662
  });
12660
12663
  }
12661
- function pA(e) {
12664
+ function hA(e) {
12662
12665
  return Ge(ss, {
12663
12666
  method: "POST",
12664
12667
  body: JSON.stringify(e),
@@ -12682,7 +12685,7 @@ const XP = () => {
12682
12685
  isRestActive: !0
12683
12686
  };
12684
12687
  };
12685
- async function hA() {
12688
+ async function vA() {
12686
12689
  const { hostname: e, host: r, protocol: n } = window.location, o = n === "https:";
12687
12690
  try {
12688
12691
  const a = await Ge(gt, {
@@ -12724,7 +12727,7 @@ async function VP(e) {
12724
12727
  })
12725
12728
  });
12726
12729
  }
12727
- async function vA(...e) {
12730
+ async function mA(...e) {
12728
12731
  return (await Promise.all(
12729
12732
  e.map(
12730
12733
  (o) => VP({
@@ -12741,12 +12744,12 @@ async function vA(...e) {
12741
12744
  }))
12742
12745
  ).flat();
12743
12746
  }
12744
- function mA(e) {
12747
+ function gA(e) {
12745
12748
  return Ge(`/rest/$getWebForm/${e}`, {
12746
12749
  method: "GET"
12747
12750
  });
12748
12751
  }
12749
- function gA(e) {
12752
+ function yA(e) {
12750
12753
  return Ge(gt, {
12751
12754
  method: "POST",
12752
12755
  headers: new Headers({
@@ -12760,7 +12763,7 @@ function gA(e) {
12760
12763
  ) ? Hc(r.content) : r.content
12761
12764
  }));
12762
12765
  }
12763
- function yA(e) {
12766
+ function wA(e) {
12764
12767
  return e.type === "folder" ? Ge(ss, {
12765
12768
  method: "POST",
12766
12769
  body: JSON.stringify(e),
@@ -12775,7 +12778,7 @@ function yA(e) {
12775
12778
  })
12776
12779
  });
12777
12780
  }
12778
- async function wA(e) {
12781
+ async function bA(e) {
12779
12782
  return e.type === "folder" ? (await Ge(ss, {
12780
12783
  method: "POST",
12781
12784
  body: JSON.stringify(e),
@@ -12790,7 +12793,7 @@ async function wA(e) {
12790
12793
  })
12791
12794
  })).deleted;
12792
12795
  }
12793
- function bA(e) {
12796
+ function _A(e) {
12794
12797
  return Ge(gt, {
12795
12798
  method: "POST",
12796
12799
  body: JSON.stringify(e),
@@ -12799,7 +12802,7 @@ function bA(e) {
12799
12802
  })
12800
12803
  });
12801
12804
  }
12802
- function _A(e) {
12805
+ function SA(e) {
12803
12806
  return Ge(gt, {
12804
12807
  method: "POST",
12805
12808
  body: JSON.stringify(e),
@@ -12808,7 +12811,7 @@ function _A(e) {
12808
12811
  })
12809
12812
  });
12810
12813
  }
12811
- async function SA(e) {
12814
+ async function EA(e) {
12812
12815
  return (await Ge(gt, {
12813
12816
  method: "POST",
12814
12817
  body: JSON.stringify(e),
@@ -12817,7 +12820,7 @@ async function SA(e) {
12817
12820
  })
12818
12821
  })).deleted;
12819
12822
  }
12820
- async function EA(...e) {
12823
+ async function xA(...e) {
12821
12824
  return await Ge(gt, {
12822
12825
  method: "POST",
12823
12826
  body: JSON.stringify({
@@ -12829,7 +12832,7 @@ async function EA(...e) {
12829
12832
  })
12830
12833
  });
12831
12834
  }
12832
- async function xA(e) {
12835
+ async function OA(e) {
12833
12836
  const r = await Ge("/api/login", {
12834
12837
  method: "POST",
12835
12838
  body: JSON.stringify({
@@ -12841,7 +12844,7 @@ async function xA(e) {
12841
12844
  });
12842
12845
  return r.isLogged && r.success;
12843
12846
  }
12844
- async function OA() {
12847
+ async function TA() {
12845
12848
  return await Ge(
12846
12849
  "/rest/$catalog/$all?$metadata=full",
12847
12850
  {
@@ -12852,7 +12855,7 @@ async function OA() {
12852
12855
  }
12853
12856
  );
12854
12857
  }
12855
- async function TA({
12858
+ async function CA({
12856
12859
  name: e,
12857
12860
  path: r = "",
12858
12861
  root: n = "root",
@@ -12870,7 +12873,7 @@ async function TA({
12870
12873
  headers: new Headers({ "Content-Type": "application/json" })
12871
12874
  });
12872
12875
  }
12873
- async function CA() {
12876
+ async function PA() {
12874
12877
  try {
12875
12878
  const e = await Ge(
12876
12879
  `${Wv}/shared_datasources.json?t=${Date.now()}`,
@@ -12886,7 +12889,7 @@ async function CA() {
12886
12889
  return {};
12887
12890
  }
12888
12891
  }
12889
- async function PA() {
12892
+ async function RA() {
12890
12893
  try {
12891
12894
  const e = await Ge(
12892
12895
  `${Wv}/shared_css.json?t=${Date.now()}`,
@@ -12902,14 +12905,14 @@ async function PA() {
12902
12905
  return { classes: [] };
12903
12906
  }
12904
12907
  }
12905
- async function RA() {
12908
+ async function AA() {
12906
12909
  try {
12907
12910
  return await (await fetch(`monaco_theme.json?t=${Date.now()}`)).json();
12908
12911
  } catch {
12909
12912
  return null;
12910
12913
  }
12911
12914
  }
12912
- const JP = NP(), AA = async (e) => {
12915
+ const JP = NP(), IA = async (e) => {
12913
12916
  const r = {
12914
12917
  verb: Ai.SET_FILE_CONTENT,
12915
12918
  asText: !1,
@@ -12944,12 +12947,12 @@ const JP = NP(), AA = async (e) => {
12944
12947
  type: n,
12945
12948
  size: 0
12946
12949
  };
12947
- }, IA = async (e) => await ZP({
12950
+ }, LA = async (e) => await ZP({
12948
12951
  name: "crafted_components.json",
12949
12952
  path: _i.WEBFORMS,
12950
12953
  content: e
12951
12954
  });
12952
- function LA(e) {
12955
+ function MA(e) {
12953
12956
  return Ge(gt, {
12954
12957
  method: "POST",
12955
12958
  body: JSON.stringify(e),
@@ -12958,7 +12961,7 @@ function LA(e) {
12958
12961
  })
12959
12962
  });
12960
12963
  }
12961
- function MA(e) {
12964
+ function kA(e) {
12962
12965
  return Ge(gt, {
12963
12966
  method: "POST",
12964
12967
  body: JSON.stringify(e),
@@ -12967,7 +12970,7 @@ function MA(e) {
12967
12970
  })
12968
12971
  });
12969
12972
  }
12970
- function kA(e) {
12973
+ function DA(e) {
12971
12974
  return Ge(gt, {
12972
12975
  method: "POST",
12973
12976
  body: JSON.stringify(e),
@@ -12976,7 +12979,7 @@ function kA(e) {
12976
12979
  })
12977
12980
  });
12978
12981
  }
12979
- function DA(e) {
12982
+ function $A(e) {
12980
12983
  return Ge(gt, {
12981
12984
  method: "POST",
12982
12985
  body: JSON.stringify(e),
@@ -12988,7 +12991,7 @@ function DA(e) {
12988
12991
  content: ["4dm", "4qm", "4qs"].includes(r.ext) ? Hc(r.content) : r.content
12989
12992
  });
12990
12993
  }
12991
- function $A(e) {
12994
+ function NA(e) {
12992
12995
  return Ge(gt, {
12993
12996
  method: "POST",
12994
12997
  body: JSON.stringify(e),
@@ -13027,7 +13030,7 @@ function tR(e) {
13027
13030
  result: o
13028
13031
  };
13029
13032
  }
13030
- async function NA(e, r) {
13033
+ async function jA(e, r) {
13031
13034
  const o = e.split(".").pop();
13032
13035
  try {
13033
13036
  const a = await Ge(gt, {
@@ -13059,7 +13062,7 @@ async function NA(e, r) {
13059
13062
  }
13060
13063
  }
13061
13064
  var nR = /* @__PURE__ */ ((e) => (e.STUDIO_LOADED = "UA-1-0", e.WELCOME_TOUR_INIT = "UA-1-3", e.WELCOME_TOUR_END = "UA-1-4", e))(nR || {});
13062
- function jA(e, r) {
13065
+ function FA(e, r) {
13063
13066
  fetch("/api/v1/activity", {
13064
13067
  body: JSON.stringify({
13065
13068
  AID: e,
@@ -13073,7 +13076,7 @@ function jA(e, r) {
13073
13076
  });
13074
13077
  }
13075
13078
  var rR = /* @__PURE__ */ ((e) => (e.LOCAL = "local", e.SHARED = "shared", e.THEME = "theme", e))(rR || {}), iR = /* @__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))(iR || {}), oR = /* @__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))(oR || {});
13076
- const FA = {
13079
+ const WA = {
13077
13080
  transparent: {
13078
13081
  backgroundColor: "transparent"
13079
13082
  },
@@ -13089,7 +13092,7 @@ const FA = {
13089
13092
  padding: "3px 5px",
13090
13093
  borderRadius: 5
13091
13094
  }
13092
- }, WA = {
13095
+ }, UA = {
13093
13096
  Code: {
13094
13097
  key: "editors:code",
13095
13098
  config: { language: "4d", theme: "fd-dark" }
@@ -13102,13 +13105,13 @@ export {
13102
13105
  gt as API_PREFIX,
13103
13106
  _R as AppLoader,
13104
13107
  wR as ControlledSwitch,
13105
- FA as DATASOURCE_THEMES,
13108
+ WA as DATASOURCE_THEMES,
13106
13109
  RP as DatasourcesActions,
13107
13110
  Ai as DesignerRequestVerb,
13108
13111
  lR as Dialog,
13109
13112
  CS as DialogBody,
13110
13113
  nR as EActivity,
13111
- WA as EDITOR,
13114
+ UA as EDITOR,
13112
13115
  iR as EIDENTIFIERS,
13113
13116
  oR as ERROR_CODES,
13114
13117
  rR as EWebFormStyleClassScope,
@@ -13129,7 +13132,7 @@ export {
13129
13132
  $P as Mutex,
13130
13133
  TS as Overlay,
13131
13134
  d_ as Portal,
13132
- uA as PublishOptions,
13135
+ cA as PublishOptions,
13133
13136
  MP as ROLES_TAB_PATH,
13134
13137
  jv as RemoteDebuggerMode,
13135
13138
  kP as SETTINGS_TAB_PATH,
@@ -13144,79 +13147,80 @@ export {
13144
13147
  NE as TreeIcon,
13145
13148
  Dh as TreeNode,
13146
13149
  PP as WebformActions,
13147
- iA as _isArrayDatasource,
13148
- oA as _isObjectDatasource,
13149
- lA as addAttributesToContent,
13150
- bA as addFolder,
13150
+ oA as _isArrayDatasource,
13151
+ aA as _isObjectDatasource,
13152
+ fA as addAttributesToContent,
13153
+ _A as addFolder,
13151
13154
  jP as by,
13152
13155
  zR as byId,
13153
13156
  qR as byPath,
13154
- dA as checkUpdates,
13155
- LA as createFolder,
13157
+ pA as checkUpdates,
13158
+ MA as createFolder,
13156
13159
  MR as datasourcesSubject,
13157
- wA as dropFile,
13158
- SA as dropFolder,
13160
+ bA as dropFile,
13161
+ EA as dropFolder,
13159
13162
  KR as exists,
13160
13163
  UR as extractWebformName,
13161
- hA as getAppSettings,
13162
- OA as getCatalog,
13164
+ vA as getAppSettings,
13165
+ TA as getCatalog,
13163
13166
  YR as getDatasourceId,
13164
13167
  XP as getDefaultAppSettings,
13165
- gA as getFile,
13166
- TA as getFileContent,
13168
+ yA as getFile,
13169
+ CA as getFileContent,
13167
13170
  WR as getFileExtentionFromType,
13168
- EA as getFilesInfo,
13171
+ xA as getFilesInfo,
13169
13172
  VP as getFolder,
13170
- vA as getFolders,
13171
- NA as getFunctionContent,
13172
- RA as getMonacoTheme,
13173
- DA as getNodeInfo,
13174
- PA as getSharedCSS,
13175
- CA as getSharedDatasources,
13173
+ mA as getFolders,
13174
+ jA as getFunctionContent,
13175
+ AA as getMonacoTheme,
13176
+ $A as getNodeInfo,
13177
+ RA as getSharedCSS,
13178
+ PA as getSharedDatasources,
13176
13179
  DP as getTypeFromExtension,
13177
- mA as getWebForm,
13180
+ gA as getWebForm,
13178
13181
  YP as hasAttributesString,
13179
13182
  Ge as http,
13180
- pA as installUpdates,
13183
+ hA as installUpdates,
13181
13184
  BP as isArrayDatasource,
13182
- VR as isDataClassMethod,
13183
- XR as isDataStoreMethod,
13184
- aA as isDateDatasource,
13185
- nA as isEntity,
13186
- QR as isEntityDatasource,
13187
- JR as isEntityMethod,
13188
- rA as isEntitySelection,
13189
- eA as isEntitySelectionDatasource,
13190
- ZR as isEntitySelectionMethod,
13185
+ JR as isDataClassMethod,
13186
+ VR as isDataStoreMethod,
13187
+ sA as isDateDatasource,
13188
+ rA as isEntity,
13189
+ eA as isEntityDatasource,
13190
+ ZR as isEntityMethod,
13191
+ iA as isEntitySelection,
13192
+ tA as isEntitySelectionDatasource,
13193
+ QR as isEntitySelectionMethod,
13194
+ GR as isObjectAttribute,
13191
13195
  HP as isObjectDatasource,
13192
- GR as isRelatedAttribute,
13196
+ XR as isRelatedAttribute,
13193
13197
  WP as isRelatedEntitiesAttribute,
13194
13198
  UP as isRelatedEntityAttribute,
13195
13199
  zP as isScalarDatasource,
13196
13200
  FP as isSimpleAttribute,
13197
- tA as isSimpleDatasource,
13198
- sA as loadDS,
13199
- jA as log,
13200
- xA as login,
13201
+ nA as isSimpleDatasource,
13202
+ uA as loadDS,
13203
+ FA as log,
13204
+ OA as login,
13201
13205
  NR as lspSubject,
13202
- kA as moveItem,
13206
+ DA as moveItem,
13203
13207
  BR as outBy,
13204
13208
  HR as outById,
13205
- cA as parseAttributes,
13209
+ lA as parseAttributes,
13206
13210
  NP as queue,
13207
13211
  GP as removeAttributesString,
13208
- MA as removeItem,
13209
- yA as renameFile,
13210
- _A as renameFolder,
13212
+ kA as removeItem,
13213
+ wA as renameFile,
13214
+ SA as renameFolder,
13211
13215
  Hc as sanitizeContent,
13212
- $A as saveContent,
13213
- IA as setCraftedComponents,
13216
+ NA as saveContent,
13217
+ LA as setCraftedComponents,
13214
13218
  ZP as setFileContent,
13215
- AA as setSharedSources,
13219
+ IA as setSharedSources,
13216
13220
  KP as stringifyAttributes,
13217
13221
  $R as tabEventsSubject,
13218
13222
  DR as toastSubject,
13219
- fA as transformDates,
13223
+ dA as transformDates,
13220
13224
  SR as useDidMountEffect,
13221
13225
  LR as useDoubleClick,
13222
13226
  PR as useFeatureFlags,