@ws-ui/localization-editor 1.12.2 → 1.12.5

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
@@ -698,10 +698,7 @@ function b_(e, t) {
698
698
  () => e ?? {},
699
699
  [e]
700
700
  ),
701
- getBuildResolver: Se(
702
- () => t ?? {},
703
- [t]
704
- ),
701
+ getBuildResolver: Se(() => t ?? {}, [t]),
705
702
  actions: {
706
703
  openModal: Se(
707
704
  async (l) => await n(dg(l)).unwrap(),
@@ -1326,7 +1323,9 @@ function em(e, t) {
1326
1323
  ...e,
1327
1324
  modals: {
1328
1325
  ...e.modals,
1329
- list: e.modals.list.filter((n) => n.id !== t.payload)
1326
+ list: e.modals.list.filter(
1327
+ (n) => n.id !== t.payload
1328
+ )
1330
1329
  }
1331
1330
  };
1332
1331
  case "CLOSE_MODAL": {
@@ -1453,10 +1452,7 @@ function im(e, t, n) {
1453
1452
  () => e ?? {},
1454
1453
  [e]
1455
1454
  ),
1456
- getBuildResolver: Se(
1457
- () => t ?? {},
1458
- [t]
1459
- ),
1455
+ getBuildResolver: Se(() => t ?? {}, [t]),
1460
1456
  actions: {
1461
1457
  openModal: Se(
1462
1458
  async (l) => {
@@ -1842,52 +1838,60 @@ const Uc = li(
1842
1838
  E && h("selected", E);
1843
1839
  }
1844
1840
  }
1845
- }, [p, o, s]), /* @__PURE__ */ L(Hc.Provider, { value: { selected: n, supported: u }, children: e });
1846
- }, cm = Is(({
1847
- children: e,
1848
- getSupportedLanguages: t,
1849
- i18nCurrent: n,
1850
- flagsForActiveTab: i
1851
- }) => {
1852
- const {
1853
- state: { supported: r },
1854
- actions: s
1855
- } = Kt({
1856
- supported: []
1857
- }), {
1858
- i18n: {
1859
- userLang: { primary: o, supported: l }
1860
- }
1861
- } = kn(), { isInsideStudio: u } = Ur(), f = n && l.find((d) => d.isocode === n) ? n : "", [p, h] = _t(f);
1862
- return Fe(() => {
1863
- i != null && i.enabled && h("");
1864
- }, [i == null ? void 0 : i.enabled]), Fe(() => {
1865
- h(f);
1866
- }, [f]), _c({
1867
- datasourceId: `${es}:${ts}`,
1868
- isDsBuild: i == null ? void 0 : i.enabled,
1869
- onChange: (d) => {
1870
- if (!d) return;
1871
- const { selected: m } = d;
1872
- m && m.isocode && (h(m.isocode), localStorage.setItem("i18n.selected", m.isocode));
1873
- }
1874
- }), Fe(() => {
1875
- t(u).then((d) => {
1876
- s.setSupported(d);
1877
- });
1878
- }, [u]), /* @__PURE__ */ L(
1879
- Uc.Provider,
1841
+ }, [p, o, s]), /* @__PURE__ */ L(
1842
+ Hc.Provider,
1880
1843
  {
1881
- value: {
1882
- primary: o,
1883
- selected: p || f,
1884
- supported: r,
1885
- userLangagues: l
1886
- },
1844
+ value: { selected: n, supported: u },
1887
1845
  children: e
1888
1846
  }
1889
1847
  );
1890
- });
1848
+ }, cm = Is(
1849
+ ({
1850
+ children: e,
1851
+ getSupportedLanguages: t,
1852
+ i18nCurrent: n,
1853
+ flagsForActiveTab: i
1854
+ }) => {
1855
+ const {
1856
+ state: { supported: r },
1857
+ actions: s
1858
+ } = Kt({
1859
+ supported: []
1860
+ }), {
1861
+ i18n: {
1862
+ userLang: { primary: o, supported: l }
1863
+ }
1864
+ } = kn(), { isInsideStudio: u } = Ur(), f = n && l.find((d) => d.isocode === n) ? n : "", [p, h] = _t(f);
1865
+ return Fe(() => {
1866
+ i != null && i.enabled && h("");
1867
+ }, [i == null ? void 0 : i.enabled]), Fe(() => {
1868
+ h(f);
1869
+ }, [f]), _c({
1870
+ datasourceId: `${es}:${ts}`,
1871
+ isDsBuild: i == null ? void 0 : i.enabled,
1872
+ onChange: (d) => {
1873
+ if (!d) return;
1874
+ const { selected: m } = d;
1875
+ m && m.isocode && (h(m.isocode), localStorage.setItem("i18n.selected", m.isocode));
1876
+ }
1877
+ }), Fe(() => {
1878
+ t(u).then((d) => {
1879
+ s.setSupported(d);
1880
+ });
1881
+ }, [u]), /* @__PURE__ */ L(
1882
+ Uc.Provider,
1883
+ {
1884
+ value: {
1885
+ primary: o,
1886
+ selected: p || f,
1887
+ supported: r,
1888
+ userLangagues: l
1889
+ },
1890
+ children: e
1891
+ }
1892
+ );
1893
+ }
1894
+ );
1891
1895
  function hm() {
1892
1896
  const { isInsideStudio: e } = Ur(), t = Mn(Uc), n = Mn(Hc), i = e ? t : n;
1893
1897
  if (i === void 0)
@@ -2315,15 +2319,22 @@ const $c = li(void 0), fm = ({ children: e }) => {
2315
2319
  {
2316
2320
  scope: "col",
2317
2321
  className: "px-2 py-3 text-xs font-normal float-right",
2318
- children: /* @__PURE__ */ L(ht, { label: "Add a key", container: at(), children: /* @__PURE__ */ L(
2319
- "button",
2322
+ children: /* @__PURE__ */ L(
2323
+ ht,
2320
2324
  {
2321
- "data-cy": "localization-editor-add-key-button",
2322
- className: "cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",
2323
- onClick: y,
2324
- children: /* @__PURE__ */ L(Ns, { className: "w-4 h-4" })
2325
+ label: "Add a key",
2326
+ container: at(),
2327
+ children: /* @__PURE__ */ L(
2328
+ "button",
2329
+ {
2330
+ "data-cy": "localization-editor-add-key-button",
2331
+ className: "cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",
2332
+ onClick: y,
2333
+ children: /* @__PURE__ */ L(Ns, { className: "w-4 h-4" })
2334
+ }
2335
+ )
2325
2336
  }
2326
- ) })
2337
+ )
2327
2338
  }
2328
2339
  )
2329
2340
  ] }) }),
@@ -25045,7 +25056,9 @@ const GC = () => {
25045
25056
  ),
25046
25057
  /* @__PURE__ */ L(ZC, {})
25047
25058
  ] });
25048
- }, n_ = ({ children: e }) => {
25059
+ }, n_ = ({
25060
+ children: e
25061
+ }) => {
25049
25062
  const t = Bn();
25050
25063
  return /* @__PURE__ */ L(
25051
25064
  lm,