@golemui/gui-shared 1.6.0 → 2.0.0-rc.1

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.
@@ -5,7 +5,7 @@ function Me(e) {
5
5
  case "text":
6
6
  return Be(e);
7
7
  case "number":
8
- return fe(e);
8
+ return ve(e);
9
9
  case "boolean":
10
10
  return Le(e);
11
11
  default:
@@ -43,7 +43,7 @@ function Be(e) {
43
43
  validator: c(e.validator, "string")
44
44
  };
45
45
  }
46
- function fe(e) {
46
+ function ve(e) {
47
47
  const t = r(e);
48
48
  return {
49
49
  uid: e.uid ?? "",
@@ -76,8 +76,8 @@ const k = u({
76
76
  }
77
77
  },
78
78
  mapToWidget: Me
79
- }), b = k.gsl, ve = k.gslByUid;
80
- function Re(e) {
79
+ }), b = k.gsl, Re = k.gslByUid;
80
+ function fe(e) {
81
81
  const {
82
82
  uid: t,
83
83
  label: s,
@@ -109,7 +109,7 @@ const S = u({
109
109
  itemType: "ACTIONS",
110
110
  kind: "action",
111
111
  entryShape: "bare",
112
- mapToWidget: Re,
112
+ mapToWidget: fe,
113
113
  afterMerge: (e, t) => be.extractOnClickFromMergeResult(
114
114
  e,
115
115
  t.eventRegistry,
@@ -130,7 +130,7 @@ function We(e) {
130
130
  return {
131
131
  uid: t ?? "",
132
132
  kind: "layout",
133
- type: s ?? "flex",
133
+ type: s ?? "grid",
134
134
  props: {
135
135
  direction: g.direction ?? "column",
136
136
  ...g
@@ -341,7 +341,7 @@ const E = u({
341
341
  ...e.validator != null ? { validator: c(e.validator, "string") } : {},
342
342
  props: r(e)
343
343
  })
344
- }), at = B.gsl, it = B.gslByUid, f = u({
344
+ }), at = B.gsl, it = B.gslByUid, v = u({
345
345
  itemType: "TIME_INPUT",
346
346
  kind: "input",
347
347
  entryShape: "keyed",
@@ -361,7 +361,7 @@ const E = u({
361
361
  ...e.validator != null ? { validator: c(e.validator, "string") } : {},
362
362
  props: r(e)
363
363
  })
364
- }), nt = f.gsl, lt = f.gslByUid, v = u({
364
+ }), nt = v.gsl, lt = v.gslByUid, R = u({
365
365
  itemType: "TIME_PICKER",
366
366
  kind: "input",
367
367
  entryShape: "keyed",
@@ -384,7 +384,7 @@ const E = u({
384
384
  ...e.validator != null ? { validator: c(e.validator, "string") } : {},
385
385
  props: r(e)
386
386
  })
387
- }), ot = v.gsl, ut = v.gslByUid, R = u({
387
+ }), ot = R.gsl, ut = R.gslByUid, f = u({
388
388
  itemType: "DATE_TIME_INPUT",
389
389
  kind: "input",
390
390
  entryShape: "keyed",
@@ -404,7 +404,7 @@ const E = u({
404
404
  ...e.validator != null ? { validator: c(e.validator, "string") } : {},
405
405
  props: r(e)
406
406
  })
407
- }), pt = R.gsl, rt = R.gslByUid, N = u({
407
+ }), pt = f.gsl, rt = f.gslByUid, N = u({
408
408
  itemType: "CURRENCY",
409
409
  kind: "input",
410
410
  entryShape: "keyed",
@@ -608,7 +608,7 @@ const x = u({
608
608
  ...e.validator != null ? { validator: c(e.validator, "string") } : {},
609
609
  props: r(e)
610
610
  })
611
- }), Bt = $.gsl, ft = $.gslByUid, O = u({
611
+ }), Bt = $.gsl, vt = $.gslByUid, O = u({
612
612
  itemType: "DROPDOWN",
613
613
  kind: "input",
614
614
  entryShape: "keyed",
@@ -631,7 +631,7 @@ const x = u({
631
631
  ...e.validator != null ? { validator: e.validator } : {},
632
632
  props: r(e)
633
633
  })
634
- }), vt = O.gsl, Rt = O.gslByUid, z = u({
634
+ }), Rt = O.gsl, ft = O.gslByUid, z = u({
635
635
  itemType: "MULTI_DROPDOWN",
636
636
  kind: "input",
637
637
  entryShape: "keyed",
@@ -766,7 +766,7 @@ function Vt(e) {
766
766
  ...e.validator != null ? { validator: c(e.validator, "array") } : {},
767
767
  props: {
768
768
  ...Ht(e),
769
- template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
769
+ template: { kind: "layout", type: "grid", children: [], props: { direction: "column" } }
770
770
  }
771
771
  };
772
772
  }
@@ -784,7 +784,7 @@ function jt(e, t) {
784
784
  a && _(s, a + ".items.");
785
785
  const i = {
786
786
  kind: "layout",
787
- type: "flex",
787
+ type: "grid",
788
788
  uid: "",
789
789
  children: s,
790
790
  props: { direction: "column" }
@@ -1102,9 +1102,9 @@ const ue = u({
1102
1102
  M,
1103
1103
  L,
1104
1104
  B,
1105
- f,
1106
1105
  v,
1107
1106
  R,
1107
+ f,
1108
1108
  N,
1109
1109
  C,
1110
1110
  W,
@@ -1137,7 +1137,7 @@ const ue = u({
1137
1137
  ], pe = Ee();
1138
1138
  for (const e of Ps)
1139
1139
  he(pe, e);
1140
- function fa(e) {
1140
+ function va(e) {
1141
1141
  return Ue(
1142
1142
  pe,
1143
1143
  e
@@ -1197,7 +1197,7 @@ function Bs(e, t, s) {
1197
1197
  tags: s ?? []
1198
1198
  };
1199
1199
  }
1200
- function fs(e, t, s) {
1200
+ function vs(e, t, s) {
1201
1201
  if (typeof t == "function") {
1202
1202
  const n = t;
1203
1203
  return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: (o) => ({ type: "select", ...n(o) }) }], tags: s ?? [] };
@@ -1205,7 +1205,7 @@ function fs(e, t, s) {
1205
1205
  const a = { type: "select", ...t };
1206
1206
  return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: a }], tags: s ?? [] };
1207
1207
  }
1208
- function vs(e, t, s) {
1208
+ function Rs(e, t, s) {
1209
1209
  if (typeof t == "function") {
1210
1210
  const n = t;
1211
1211
  return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: (o) => ({
@@ -1216,7 +1216,7 @@ function vs(e, t, s) {
1216
1216
  const a = { type: "dropdown", ...t };
1217
1217
  return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
1218
1218
  }
1219
- function Rs(e, t, s) {
1219
+ function fs(e, t, s) {
1220
1220
  if (typeof t == "function") {
1221
1221
  const n = t;
1222
1222
  return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: (o) => ({ type: "radiogroup", ...n(o) }) }], tags: s ?? [] };
@@ -1567,12 +1567,7 @@ const re = (e, t, s) => ({
1567
1567
  itemType: y.LAYOUTS,
1568
1568
  items: [
1569
1569
  {
1570
- def: {
1571
- widgetName: "grid",
1572
- direction: "row",
1573
- autoFit: !0,
1574
- ...t ?? {}
1575
- },
1570
+ def: { widgetName: "grid", ...t ?? {} },
1576
1571
  children: e
1577
1572
  }
1578
1573
  ],
@@ -1590,7 +1585,7 @@ function ga(e, t, s) {
1590
1585
  itemType: y.LAYOUTS,
1591
1586
  items: [
1592
1587
  {
1593
- def: { uid: l.uid ?? Te(l.label), direction: "column", widgetName: "flex" },
1588
+ def: { uid: l.uid ?? Te(l.label), direction: "column", widgetName: "grid" },
1594
1589
  children: l.children
1595
1590
  }
1596
1591
  ],
@@ -1618,7 +1613,7 @@ function ba(e, t, s) {
1618
1613
  itemType: y.LAYOUTS,
1619
1614
  items: [
1620
1615
  {
1621
- def: { uid: l.uid ?? ge(l.label), direction: "column", widgetName: "flex" },
1616
+ def: { uid: l.uid ?? ge(l.label), direction: "column", widgetName: "grid" },
1622
1617
  children: l.children
1623
1618
  }
1624
1619
  ],
@@ -1664,14 +1659,14 @@ function ka(e, t, s) {
1664
1659
  const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type === "number"), Ea = (e) => b(e, (t) => t.type === "boolean"), ha = De({
1665
1660
  // Inputs
1666
1661
  inputs: b,
1667
- inputByUid: ve,
1662
+ inputByUid: Re,
1668
1663
  textInputs: Sa,
1669
1664
  numberInputs: Aa,
1670
1665
  booleanInputs: Ea,
1671
1666
  selects: Tt,
1672
1667
  selectByUid: gt,
1673
- dropdowns: vt,
1674
- dropdownByUid: Rt,
1668
+ dropdowns: Rt,
1669
+ dropdownByUid: ft,
1675
1670
  radiogroups: bt,
1676
1671
  radiogroupByUid: It,
1677
1672
  checkboxes: tt,
@@ -1707,7 +1702,7 @@ const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type
1707
1702
  dateTimeInputs: pt,
1708
1703
  dateTimeInputByUid: rt,
1709
1704
  datePickers: Bt,
1710
- datePickerByUid: ft,
1705
+ datePickerByUid: vt,
1711
1706
  dateTimePickers: je,
1712
1707
  dateTimePickerByUid: qe,
1713
1708
  rangeCalendars: yt,
@@ -1756,7 +1751,7 @@ const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type
1756
1751
  bareItemToWidget: (e) => _e(e),
1757
1752
  rootEntry: (e) => {
1758
1753
  const t = {
1759
- def: { uid: "#root", direction: "column", widgetName: "flex" },
1754
+ def: { uid: "#root", direction: "column", widgetName: "grid" },
1760
1755
  children: e
1761
1756
  };
1762
1757
  return { type: "ITEMS", itemType: y.LAYOUTS, items: [t], tags: [] };
@@ -1766,9 +1761,9 @@ const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type
1766
1761
  textInput: Ms,
1767
1762
  numberInput: Ls,
1768
1763
  booleanInput: Bs,
1769
- select: fs,
1770
- dropdown: vs,
1771
- radiogroup: Rs,
1764
+ select: vs,
1765
+ dropdown: Rs,
1766
+ radiogroup: fs,
1772
1767
  checkbox: Ns,
1773
1768
  textarea: Cs,
1774
1769
  password: Ws,
@@ -1810,8 +1805,11 @@ const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type
1810
1805
  custom: da
1811
1806
  },
1812
1807
  layouts: {
1808
+ /** @deprecated Use `grid`, which stacks its children; a flex layout renders as one. */
1813
1809
  flex: re,
1810
+ /** @deprecated Use `horizontalGrid`; a flex layout renders as a grid. */
1814
1811
  horizontalFlex: ca,
1812
+ /** @deprecated Use `grid` or `verticalGrid`; a flex layout renders as a grid. */
1815
1813
  verticalFlex: ya,
1816
1814
  grid: de,
1817
1815
  horizontalGrid: ma,
@@ -1826,7 +1824,7 @@ const Sa = (e) => b(e, (t) => t.type === "text"), Aa = (e) => b(e, (t) => t.type
1826
1824
  facade: Da,
1827
1825
  selectors: ha,
1828
1826
  adapter: Ua
1829
- }), va = ce.namespace, Ra = ce.formDefs, Na = ce.resolveFormInput;
1827
+ }), Ra = ce.namespace, fa = ce.formDefs, Na = ce.resolveFormInput;
1830
1828
  export {
1831
1829
  Wt as $,
1832
1830
  He as A,
@@ -1836,11 +1834,11 @@ export {
1836
1834
  je as E,
1837
1835
  Oe as F,
1838
1836
  $e as G,
1839
- Rt as H,
1840
- vt as I,
1837
+ ft as H,
1838
+ Rt as I,
1841
1839
  Gt as J,
1842
1840
  xt as K,
1843
- ve as L,
1841
+ Re as L,
1844
1842
  b as M,
1845
1843
  Fe as N,
1846
1844
  Ge as O,
@@ -1885,7 +1883,7 @@ export {
1885
1883
  na as aO,
1886
1884
  Vs as aP,
1887
1885
  _e as aQ,
1888
- vs as aR,
1886
+ Rs as aR,
1889
1887
  Ys as aS,
1890
1888
  re as aT,
1891
1889
  de as aU,
@@ -1925,7 +1923,7 @@ export {
1925
1923
  Ks as b0,
1926
1924
  Ls as b1,
1927
1925
  Ws as b2,
1928
- Rs as b3,
1926
+ fs as b3,
1929
1927
  js as b4,
1930
1928
  qs as b5,
1931
1929
  ta as b6,
@@ -1935,7 +1933,7 @@ export {
1935
1933
  ea as ba,
1936
1934
  sa as bb,
1937
1935
  _a as bc,
1938
- fs as bd,
1936
+ vs as bd,
1939
1937
  ga as be,
1940
1938
  ka as bf,
1941
1939
  Ms as bg,
@@ -1944,14 +1942,14 @@ export {
1944
1942
  ia as bj,
1945
1943
  ya as bk,
1946
1944
  Ta as bl,
1947
- fa as bm,
1948
- Ra as bn,
1945
+ va as bm,
1946
+ fa as bn,
1949
1947
  Na as bo,
1950
1948
  Ne as c,
1951
1949
  Pt as d,
1952
1950
  Dt as e,
1953
1951
  Ea as f,
1954
- va as g,
1952
+ Ra as g,
1955
1953
  Xe as h,
1956
1954
  ze as i,
1957
1955
  st as j,
@@ -1968,7 +1966,7 @@ export {
1968
1966
  Us as u,
1969
1967
  it as v,
1970
1968
  at as w,
1971
- ft as x,
1969
+ vt as x,
1972
1970
  Bt as y,
1973
1971
  Ve as z
1974
1972
  };