@mittwald/flow-react-components 0.1.0-alpha.230 → 0.1.0-alpha.232

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/List.js CHANGED
@@ -40,7 +40,7 @@ import { useReactTable as Se, getCoreRowModel as ve, getSortedRowModel as ye, ge
40
40
  import vt from "invariant";
41
41
  import { getAsyncResource as mt } from "@mittwald/react-use-promise";
42
42
  import { u as ht } from "./useSelector-DpU7_HMO.js";
43
- import { u as Te } from "./SettingsProvider-DIICbSo0.js";
43
+ import { u as Te } from "./SettingsProvider-CiU-3ZFI.js";
44
44
  import * as W from "react-aria-components";
45
45
  import { S as A } from "./SkeletonText-B5ZghZhO.js";
46
46
  import { I as Ce } from "./IllustratedMessage-B3MHD01M.js";
@@ -1,16 +1,16 @@
1
1
  "use client"
2
2
  /* */
3
- var d = Object.defineProperty;
4
- var w = (s, t, e) => t in s ? d(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
5
- var c = (s, t, e) => w(s, typeof t != "symbol" ? t + "" : t, e);
6
- import J, { createContext as y, useRef as l, useMemo as v, useEffect as O, useContext as K } from "react";
7
- import { makeAutoObservable as h, ObservableMap as a, autorun as P } from "mobx";
8
- import { usePromise as x } from "@mittwald/react-use-promise";
9
- import { mapValues as E } from "remeda";
3
+ var p = Object.defineProperty;
4
+ var f = (s, t, e) => t in s ? p(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
5
+ var c = (s, t, e) => f(s, typeof t != "symbol" ? t + "" : t, e);
6
+ import d, { createContext as w, useRef as y, useMemo as J, useEffect as v, useContext as O } from "react";
7
+ import { makeAutoObservable as m, ObservableMap as a, autorun as K } from "mobx";
8
+ import { usePromise as P } from "@mittwald/react-use-promise";
9
+ import { mapValues as b } from "remeda";
10
10
  class i {
11
11
  constructor(t = new a()) {
12
12
  c(this, "settings");
13
- this.settings = t, h(this);
13
+ this.settings = t, m(this);
14
14
  }
15
15
  set(t, e, n) {
16
16
  this.settings.set(t, e.parse(n));
@@ -28,14 +28,14 @@ class i {
28
28
  return new i(new a(t));
29
29
  }
30
30
  }
31
- class u {
31
+ class g {
32
32
  constructor(t = new a()) {
33
33
  c(this, "componentSettings");
34
- this.componentSettings = t, h(this);
34
+ this.componentSettings = t, m(this);
35
35
  }
36
- set(t, e, n, r) {
37
- const o = this.componentSettings.get(t) ?? new i();
38
- o.set(e, n, r), this.componentSettings.set(t, o);
36
+ set(t, e, n, o) {
37
+ const r = this.componentSettings.get(t) ?? new i();
38
+ r.set(e, n, o), this.componentSettings.set(t, r);
39
39
  }
40
40
  get(t, e, n) {
41
41
  return (this.componentSettings.get(t) ?? new i()).get(e, n);
@@ -53,11 +53,11 @@ class u {
53
53
  );
54
54
  }
55
55
  static fromJson(t) {
56
- const e = E(t, (n) => i.fromJson(n));
57
- return new u(new a(e));
56
+ const e = b(t, (n) => i.fromJson(n));
57
+ return new g(new a(e));
58
58
  }
59
59
  }
60
- class b {
60
+ class x {
61
61
  constructor(t) {
62
62
  c(this, "storageKey");
63
63
  this.storageKey = t;
@@ -70,33 +70,32 @@ class b {
70
70
  localStorage.setItem(this.storageKey, JSON.stringify(t));
71
71
  }
72
72
  }
73
- const A = (s) => {
73
+ const E = (s) => {
74
74
  switch (s.type) {
75
75
  case "custom":
76
76
  return s.store;
77
77
  case "localStorage":
78
- return new b(s.storageKey);
78
+ return new x(s.storageKey);
79
79
  }
80
80
  throw new Error(`Unsupported setting backend: ${s}`);
81
- }, p = y(void 0), N = () => K(p), R = (s) => {
82
- const { children: t, id: e, ...n } = s, r = A(n), o = l(!0), m = l(Promise.resolve()), S = x(() => r.load(), [], {
81
+ }, l = w(void 0), C = () => O(l), M = (s) => {
82
+ const { children: t, id: e, ...n } = s, o = E(n), r = y(Promise.resolve()), S = P(() => o.load(), [], {
83
83
  loaderId: e
84
- }), g = v(() => u.fromJson(S), []);
85
- return O(
86
- () => P(() => {
87
- if (o.current) {
88
- o.current = !1;
89
- return;
90
- }
91
- const f = g.asJson;
92
- m.current = m.current.then(
93
- () => r.store(f)
84
+ }), u = J(
85
+ () => g.fromJson(S),
86
+ [e]
87
+ );
88
+ return v(
89
+ () => K(() => {
90
+ const h = u.asJson;
91
+ r.current = r.current.then(
92
+ () => o.store(h)
94
93
  );
95
94
  }),
96
- [g, e]
97
- ), /* @__PURE__ */ J.createElement(p.Provider, { value: g }, t);
95
+ [e]
96
+ ), /* @__PURE__ */ d.createElement(l.Provider, { value: u }, t);
98
97
  };
99
98
  export {
100
- R as S,
101
- N as u
99
+ M as S,
100
+ C as u
102
101
  };
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { S as t } from "./SettingsProvider-DIICbSo0.js";
3
+ import { S as t } from "./SettingsProvider-CiU-3ZFI.js";
4
4
  export {
5
5
  t as SettingsProvider,
6
6
  t as default