@algorisys/zen-ui-solid 13.8.0 → 13.8.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.
Files changed (198) hide show
  1. package/dist/components/form/checkbox/checkbox.d.ts.map +1 -1
  2. package/dist/components/form/radio/radio-group.d.ts.map +1 -1
  3. package/dist/components/form/slider/slider.d.ts.map +1 -1
  4. package/dist/components/form/switch/switch.d.ts.map +1 -1
  5. package/dist/index208.js +13 -13
  6. package/dist/index209.js +2 -2
  7. package/dist/index210.js +5 -5
  8. package/dist/index211.js +12 -12
  9. package/dist/index212.js +13 -13
  10. package/dist/index213.js +10 -10
  11. package/dist/index214.js +10 -10
  12. package/dist/index215.js +9 -9
  13. package/dist/index216.js +9 -9
  14. package/dist/index218.js +14 -14
  15. package/dist/index219.js +14 -14
  16. package/dist/index220.js +13 -13
  17. package/dist/index221.js +1 -1
  18. package/dist/index222.js +5 -5
  19. package/dist/index223.js +9 -9
  20. package/dist/index224.js +24 -24
  21. package/dist/index225.js +5 -5
  22. package/dist/index226.js +3 -3
  23. package/dist/index249.js +10 -10
  24. package/dist/index250.js +3 -3
  25. package/dist/index252.js +2 -2
  26. package/dist/index257.js +1 -1
  27. package/dist/index258.js +1 -1
  28. package/dist/index271.js +5 -5
  29. package/dist/index271.js.map +1 -1
  30. package/dist/index272.js +5 -3
  31. package/dist/index272.js.map +1 -1
  32. package/dist/index273.js +3 -17
  33. package/dist/index273.js.map +1 -1
  34. package/dist/index274.js +17 -16
  35. package/dist/index274.js.map +1 -1
  36. package/dist/index275.js +16 -3
  37. package/dist/index275.js.map +1 -1
  38. package/dist/index276.js +3 -3
  39. package/dist/index276.js.map +1 -1
  40. package/dist/index277.js +3 -26
  41. package/dist/index277.js.map +1 -1
  42. package/dist/index278.js +26 -11
  43. package/dist/index278.js.map +1 -1
  44. package/dist/index279.js +10 -7
  45. package/dist/index279.js.map +1 -1
  46. package/dist/index280.js +8 -49
  47. package/dist/index280.js.map +1 -1
  48. package/dist/index281.js +49 -13
  49. package/dist/index281.js.map +1 -1
  50. package/dist/index282.js +12 -6
  51. package/dist/index282.js.map +1 -1
  52. package/dist/index283.js +7 -4
  53. package/dist/index283.js.map +1 -1
  54. package/dist/index284.js +4 -5
  55. package/dist/index284.js.map +1 -1
  56. package/dist/index286.js +6 -260
  57. package/dist/index286.js.map +1 -1
  58. package/dist/index287.js +105 -64
  59. package/dist/index287.js.map +1 -1
  60. package/dist/index288.js +67 -19
  61. package/dist/index288.js.map +1 -1
  62. package/dist/index289.js +72 -3
  63. package/dist/index289.js.map +1 -1
  64. package/dist/index290.js +22 -15
  65. package/dist/index290.js.map +1 -1
  66. package/dist/index291.js +58 -7
  67. package/dist/index291.js.map +1 -1
  68. package/dist/index292.js +3 -384
  69. package/dist/index292.js.map +1 -1
  70. package/dist/index293.js +16 -35
  71. package/dist/index293.js.map +1 -1
  72. package/dist/index294.js +384 -6
  73. package/dist/index294.js.map +1 -1
  74. package/dist/index295.js +92 -19
  75. package/dist/index295.js.map +1 -1
  76. package/dist/index296.js +34 -391
  77. package/dist/index296.js.map +1 -1
  78. package/dist/index297.js +6 -118
  79. package/dist/index297.js.map +1 -1
  80. package/dist/index298.js +17 -48
  81. package/dist/index298.js.map +1 -1
  82. package/dist/index299.js +62 -16
  83. package/dist/index299.js.map +1 -1
  84. package/dist/index300.js +48 -58
  85. package/dist/index300.js.map +1 -1
  86. package/dist/index301.js +31 -62
  87. package/dist/index301.js.map +1 -1
  88. package/dist/index302.js +16 -20
  89. package/dist/index302.js.map +1 -1
  90. package/dist/index303.js +58 -56
  91. package/dist/index303.js.map +1 -1
  92. package/dist/index304.js +20 -10
  93. package/dist/index304.js.map +1 -1
  94. package/dist/index305.js +10 -117
  95. package/dist/index305.js.map +1 -1
  96. package/dist/index306.js +920 -20
  97. package/dist/index306.js.map +1 -1
  98. package/dist/index307.js +37 -19
  99. package/dist/index307.js.map +1 -1
  100. package/dist/index308.js +256 -18
  101. package/dist/index308.js.map +1 -1
  102. package/dist/index309.js +114 -71
  103. package/dist/index309.js.map +1 -1
  104. package/dist/index310.js +556 -891
  105. package/dist/index310.js.map +1 -1
  106. package/dist/index311.js +121 -36
  107. package/dist/index311.js.map +1 -1
  108. package/dist/index312.js +17 -114
  109. package/dist/index312.js.map +1 -1
  110. package/dist/index313.js +363 -560
  111. package/dist/index313.js.map +1 -1
  112. package/dist/index314.js +85 -118
  113. package/dist/index314.js.map +1 -1
  114. package/dist/index315.js +16 -112
  115. package/dist/index315.js.map +1 -1
  116. package/dist/index316.js +115 -67
  117. package/dist/index316.js.map +1 -1
  118. package/dist/index317.js +21 -16
  119. package/dist/index317.js.map +1 -1
  120. package/dist/index318.js +19 -91
  121. package/dist/index318.js.map +1 -1
  122. package/dist/index319.js +20 -87
  123. package/dist/index319.js.map +1 -1
  124. package/dist/index320.js +71 -16
  125. package/dist/index320.js.map +1 -1
  126. package/dist/index321.js +118 -32
  127. package/dist/index321.js.map +1 -1
  128. package/dist/index323.js +1 -1
  129. package/dist/index324.js +93 -63
  130. package/dist/index324.js.map +1 -1
  131. package/dist/index325.js +5 -116
  132. package/dist/index325.js.map +1 -1
  133. package/dist/index326.js +38 -7
  134. package/dist/index326.js.map +1 -1
  135. package/dist/index327.js +44 -7
  136. package/dist/index327.js.map +1 -1
  137. package/dist/index328.js +2 -13
  138. package/dist/index328.js.map +1 -1
  139. package/dist/index329.js +65 -7
  140. package/dist/index329.js.map +1 -1
  141. package/dist/index330.js +115 -3
  142. package/dist/index330.js.map +1 -1
  143. package/dist/index331.js +608 -3
  144. package/dist/index331.js.map +1 -1
  145. package/dist/index332.js +295 -4
  146. package/dist/index332.js.map +1 -1
  147. package/dist/index333.js +88 -5
  148. package/dist/index333.js.map +1 -1
  149. package/dist/index334.js +11 -95
  150. package/dist/index334.js.map +1 -1
  151. package/dist/index335.js +20 -5
  152. package/dist/index335.js.map +1 -1
  153. package/dist/index336.js +62 -38
  154. package/dist/index336.js.map +1 -1
  155. package/dist/index337.js +33 -43
  156. package/dist/index337.js.map +1 -1
  157. package/dist/index338.js +7 -2
  158. package/dist/index338.js.map +1 -1
  159. package/dist/index339.js +6 -608
  160. package/dist/index339.js.map +1 -1
  161. package/dist/index340.js +11 -294
  162. package/dist/index340.js.map +1 -1
  163. package/dist/index341.js +6 -88
  164. package/dist/index341.js.map +1 -1
  165. package/dist/index342.js +3 -10
  166. package/dist/index342.js.map +1 -1
  167. package/dist/index343.js +3 -19
  168. package/dist/index343.js.map +1 -1
  169. package/dist/index344.js +4 -61
  170. package/dist/index344.js.map +1 -1
  171. package/dist/index345.js +5 -33
  172. package/dist/index345.js.map +1 -1
  173. package/dist/index346.js +3 -466
  174. package/dist/index346.js.map +1 -1
  175. package/dist/index347.js +9 -125
  176. package/dist/index347.js.map +1 -1
  177. package/dist/index348.js +33 -134
  178. package/dist/index348.js.map +1 -1
  179. package/dist/index349.js +21 -3
  180. package/dist/index349.js.map +1 -1
  181. package/dist/index350.js +5 -5
  182. package/dist/index351.js +2 -2
  183. package/dist/index357.js +464 -8
  184. package/dist/index357.js.map +1 -1
  185. package/dist/index358.js +126 -33
  186. package/dist/index358.js.map +1 -1
  187. package/dist/index359.js +133 -20
  188. package/dist/index359.js.map +1 -1
  189. package/dist/index53.js +21 -15
  190. package/dist/index53.js.map +1 -1
  191. package/dist/index54.js +15 -9
  192. package/dist/index54.js.map +1 -1
  193. package/dist/index55.js +20 -14
  194. package/dist/index55.js.map +1 -1
  195. package/dist/index62.js +42 -22
  196. package/dist/index62.js.map +1 -1
  197. package/dist/server/index.js +50 -12
  198. package/package.json +1 -1
package/dist/index324.js CHANGED
@@ -1,68 +1,98 @@
1
- import { getNextElement as i, getNextMarker as g, insert as a, createComponent as o, effect as m, setAttribute as s, template as d } from "solid-js/web";
2
- import { Show as c } from "solid-js";
3
- import { pivotFilterWindowValueAt as _ } from "./index285.js";
4
- import { Loading as h } from "./index41.js";
5
- import { VirtualizedItems as x } from "./index159.js";
6
- import { useLocale as w } from "./index20.js";
7
- var $ = /* @__PURE__ */ d('<div class="zen-flex zen-justify-center zen-border-t zen-border-zen-border zen-px-2 zen-py-2">'), p = /* @__PURE__ */ d('<div class="zen-flex zen-flex-col"><div role=listbox aria-multiselectable=true></div><!$><!/>'), S = /* @__PURE__ */ d('<div role=option class="zen-h-full zen-w-full">'), V = /* @__PURE__ */ d('<div class="zen-flex zen-h-full zen-items-center zen-gap-2 zen-px-2"aria-busy=true><span class="zen-size-4 zen-shrink-0 zen-rounded-zen-sm zen-border zen-border-zen-border zen-bg-zen-muted motion-safe:zen-animate-pulse"aria-hidden=true></span><div class="zen-h-3 zen-w-3/4 zen-rounded-zen-sm zen-bg-zen-muted motion-safe:zen-animate-pulse"aria-hidden=true>');
8
- const W = 36, R = 4, F = (t) => {
9
- const z = w();
10
- return (() => {
11
- var u = i(p), l = u.firstChild, v = l.nextSibling, [b, f] = g(v.nextSibling);
12
- return a(l, o(x, {
13
- get totalCount() {
14
- return t.totalCount;
15
- },
16
- getItem: (e) => _(t.optionsWindows, e),
17
- onVisibleRange: (e, n) => t.onVisibleRange(e, n),
18
- estimateSize: W,
19
- overscan: R,
20
- maxHeight: 256,
21
- class: "zen-p-1",
22
- children: ({
23
- item: e
24
- }) => (() => {
25
- var n = i(S);
26
- return a(n, o(c, {
27
- when: e,
28
- get fallback() {
29
- return (
30
- // A skeleton, not a blank: an empty row reads as "no value"
31
- // rather than "not yet".
32
- (() => {
33
- var r = i(V);
34
- return m(() => s(r, "aria-label", z.t("pivot.loadingValue"))), r;
35
- })()
36
- );
37
- },
38
- children: (r) => t.renderRow(r())
39
- })), m(() => s(n, "aria-selected", e ? t.isSelected?.(e) ?? !1 : !1)), n;
40
- })()
41
- })), a(u, o(c, {
42
- get when() {
43
- return t.loadingWindow;
44
- },
45
- get children() {
46
- var e = i($);
47
- return a(e, o(h, {
48
- size: "sm",
49
- get label() {
50
- return z.t("pivot.loadingMore");
51
- }
52
- })), e;
1
+ import { createStore as p, produce as d } from "solid-js/store";
2
+ import { ActionType as a } from "./index325.js";
3
+ const [T, r] = p({
4
+ toasts: [],
5
+ pausedAt: void 0
6
+ }), D = () => {
7
+ const { pausedAt: e, toasts: o } = T;
8
+ if (e)
9
+ return;
10
+ const i = Date.now();
11
+ return o.map((t) => {
12
+ if (t.duration === 1 / 0)
13
+ return;
14
+ const s = (t.duration || 0) + t.pauseDuration - (i - t.createdAt);
15
+ if (s <= 0) {
16
+ t.visible && n({
17
+ type: a.DISMISS_TOAST,
18
+ toastId: t.id
19
+ });
20
+ return;
21
+ }
22
+ return setTimeout(() => {
23
+ n({
24
+ type: a.DISMISS_TOAST,
25
+ toastId: t.id
26
+ });
27
+ }, s);
28
+ });
29
+ }, u = /* @__PURE__ */ new Map(), f = (e, o) => {
30
+ if (u.has(e))
31
+ return;
32
+ const i = setTimeout(() => {
33
+ u.delete(e), n({
34
+ type: a.REMOVE_TOAST,
35
+ toastId: e
36
+ });
37
+ }, o);
38
+ u.set(e, i);
39
+ }, A = (e) => {
40
+ const o = u.get(e);
41
+ u.delete(e), o && clearTimeout(o);
42
+ }, n = (e) => {
43
+ switch (e.type) {
44
+ case a.ADD_TOAST:
45
+ r("toasts", (t) => {
46
+ const s = t;
47
+ return [e.toast, ...s];
48
+ });
49
+ break;
50
+ case a.DISMISS_TOAST:
51
+ const { toastId: o } = e, i = T.toasts;
52
+ if (o) {
53
+ const t = i.find((s) => s.id === o);
54
+ t && f(o, t.unmountDelay), r("toasts", (s) => s.id === o, d((s) => s.visible = !1));
55
+ } else
56
+ i.forEach((t) => {
57
+ f(t.id, t.unmountDelay);
58
+ }), r("toasts", (t) => t.id !== void 0, d((t) => t.visible = !1));
59
+ break;
60
+ case a.REMOVE_TOAST:
61
+ if (!e.toastId) {
62
+ r("toasts", []);
63
+ break;
53
64
  }
54
- }), b, f), m((e) => {
55
- var n = z.t("pivot.values", {
56
- label: t.label
57
- }), r = t.loadingWindow || void 0;
58
- return n !== e.e && s(l, "aria-label", e.e = n), r !== e.t && s(l, "aria-busy", e.t = r), e;
59
- }, {
60
- e: void 0,
61
- t: void 0
62
- }), u;
63
- })();
65
+ r("toasts", (t) => t.filter((S) => S.id !== e.toastId));
66
+ break;
67
+ case a.UPDATE_TOAST:
68
+ e.toast.id && A(e.toast.id), r("toasts", (t) => t.id === e.toast.id, (t) => ({
69
+ ...t,
70
+ ...e.toast
71
+ }));
72
+ break;
73
+ case a.UPSERT_TOAST:
74
+ T.toasts.find((t) => t.id === e.toast.id) ? n({ type: a.UPDATE_TOAST, toast: e.toast }) : n({ type: a.ADD_TOAST, toast: e.toast });
75
+ break;
76
+ case a.START_PAUSE:
77
+ r(d((t) => {
78
+ t.pausedAt = Date.now(), t.toasts.forEach((s) => {
79
+ s.paused = !0;
80
+ });
81
+ }));
82
+ break;
83
+ case a.END_PAUSE:
84
+ const c = e.time - (T.pausedAt || 0);
85
+ r(d((t) => {
86
+ t.pausedAt = void 0, t.toasts.forEach((s) => {
87
+ s.pauseDuration += c, s.paused = !1;
88
+ });
89
+ }));
90
+ break;
91
+ }
64
92
  };
65
93
  export {
66
- F as WindowedVirtualList
94
+ D as createTimers,
95
+ n as dispatch,
96
+ T as store
67
97
  };
68
98
  //# sourceMappingURL=index324.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index324.js","sources":["../src/components/pivot/internal/windowed-virtual-list.tsx"],"sourcesContent":["import { type Component, type JSX, Show } from \"solid-js\";\nimport {\n pivotFilterWindowValueAt,\n type PivotFilterOptionsWindow,\n} from \"@algorisys/zen-ui-core/virtual-window\";\nimport { Loading } from \"../../loading/loading\";\nimport { VirtualizedItems } from \"../../listbox/virtualized-items\";\nimport { useLocale } from \"../../locale/locale\";\n\n/**\n * A listbox over values that are not all loaded.\n *\n * The windowing is VirtualizedItems' sparse mode now. This file used to carry\n * its own createVirtualizer, its own absolute-positioned row layer and its own\n * RAF-throttled scroll listener — all of which VirtualizedItems already had in\n * dense form. The one thing genuinely missing from the library was \"the list is\n * longer than what is loaded\", so that went INTO VirtualizedItems, where every\n * other listbox and DataTable's filters can reach it, rather than staying in an\n * `internal/` folder where nothing could. This file's own sibling said as much:\n * the constants exist to keep \"pivot grids, filter dropdowns, and future large\n * lists\" consistent — a cross-cutting intent with nowhere to cross to.\n *\n * What is left is the part that IS about pivot filters: the option row and the\n * skeleton for a row whose page has not arrived.\n *\n * Mirrors the React binding.\n */\n\nconst DEFAULT_ROW_HEIGHT_PX = 36;\nconst DEFAULT_OVERSCAN_ROWS = 4;\n\nexport type WindowedVirtualListProps = {\n label: string;\n totalCount: number;\n optionsWindows: PivotFilterOptionsWindow[];\n loadingWindow: boolean;\n onVisibleRange: (minIndex: number, maxIndex: number) => void;\n renderRow: (value: string) => JSX.Element;\n isSelected?: (value: string) => boolean;\n // rowHeight / overscan / class / listClass / ariaLabel / renderSkeleton are\n // gone: every one was optional, defaulted, and passed by nobody. They were\n // generalisation for a reuse an `internal/` folder forbids — and the reuse\n // that DID want them is served by VirtualizedItems, which is public.\n};\n\nexport const WindowedVirtualList: Component<WindowedVirtualListProps> = (props) => {\n const loc = useLocale();\n return (\n <div class=\"zen-flex zen-flex-col\">\n <div role=\"listbox\" aria-label={loc.t(\"pivot.values\", { label: props.label })} aria-multiselectable=\"true\" aria-busy={props.loadingWindow || undefined}>\n <VirtualizedItems<string>\n totalCount={props.totalCount}\n // Sparse by GLOBAL index: value 120 lives at offset 20 of the page that\n // starts at 100. undefined means \"not loaded\", not \"no value\".\n getItem={(index) => pivotFilterWindowValueAt(props.optionsWindows, index)}\n onVisibleRange={(min, max) => props.onVisibleRange(min, max)}\n estimateSize={DEFAULT_ROW_HEIGHT_PX}\n overscan={DEFAULT_OVERSCAN_ROWS}\n maxHeight={256}\n class=\"zen-p-1\"\n >\n {({ item }) => (\n <div role=\"option\" aria-selected={item ? (props.isSelected?.(item) ?? false) : false} class=\"zen-h-full zen-w-full\">\n <Show\n when={item}\n fallback={\n // A skeleton, not a blank: an empty row reads as \"no value\"\n // rather than \"not yet\".\n <div class=\"zen-flex zen-h-full zen-items-center zen-gap-2 zen-px-2\" aria-busy=\"true\" aria-label={loc.t(\"pivot.loadingValue\")}>\n <span\n class=\"zen-size-4 zen-shrink-0 zen-rounded-zen-sm zen-border zen-border-zen-border zen-bg-zen-muted motion-safe:zen-animate-pulse\"\n aria-hidden=\"true\"\n />\n <div\n class=\"zen-h-3 zen-w-3/4 zen-rounded-zen-sm zen-bg-zen-muted motion-safe:zen-animate-pulse\"\n aria-hidden=\"true\"\n />\n </div>\n }\n >\n {(value) => props.renderRow(value())}\n </Show>\n </div>\n )}\n </VirtualizedItems>\n </div>\n <Show when={props.loadingWindow}>\n <div class=\"zen-flex zen-justify-center zen-border-t zen-border-zen-border zen-px-2 zen-py-2\">\n <Loading size=\"sm\" label={loc.t(\"pivot.loadingMore\")} />\n </div>\n </Show>\n </div>\n );\n};\n"],"names":["DEFAULT_ROW_HEIGHT_PX","DEFAULT_OVERSCAN_ROWS","WindowedVirtualList","props","loc","useLocale","_el$","_$getNextElement","_tmpl$2","_el$2","firstChild","_el$4","nextSibling","_el$5","_co$","_$getNextMarker","_$insert","_$createComponent","VirtualizedItems","totalCount","getItem","index","pivotFilterWindowValueAt","optionsWindows","onVisibleRange","min","max","estimateSize","overscan","maxHeight","children","item","_el$6","_tmpl$3","Show","when","fallback","_el$7","_tmpl$4","_$effect","_$setAttribute","t","value","renderRow","isSelected","loadingWindow","_el$3","_tmpl$","Loading","size","label","_p$","_v$","_v$2","undefined","e"],"mappings":";;;;;;;AA4BA,MAAMA,IAAwB,IACxBC,IAAwB,GAgBjBC,IAA4DC,CAAAA,MAAU;AACjF,QAAMC,IAAMC,EAAAA;AACZ,UAAA,MAAA;AAAA,QAAAC,IAAAC,EAAAC,CAAA,GAAAC,IAAAH,EAAAI,YAAAC,IAAAF,EAAAG,aAAA,CAAAC,GAAAC,CAAA,IAAAC,EAAAJ,EAAAC,WAAA;AAAAI,WAAAA,EAAAP,GAAAQ,EAGOC,GAAgB;AAAA,MAAA,IACfC,aAAU;AAAA,eAAEhB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A,IAAA,CAAA,GAAAjC,GAAAC,CAAA,GAAAyB,EAAAY,CAAAA,MAAA;AAAA,UAAAC,IAvCxBhD,EAAIqC,EAAE,gBAAgB;AAAA,QAAES,OAAO/C,EAAM+C;AAAAA,MAAAA,CAAO,GAACG,IAAyClD,EAAM0C,iBAAiBS;AAASF,aAAAA,MAAAD,EAAAI,KAAAf,EAAA/B,GAAA,cAAA0C,EAAAI,IAAAH,CAAA,GAAAC,MAAAF,EAAAV,KAAAD,EAAA/B,GAAA,aAAA0C,EAAAV,IAAAY,CAAA,GAAAF;AAAAA,IAAA,GAAA;AAAA,MAAAI,GAAAD;AAAAA,MAAAb,GAAAa;AAAAA,IAAAA,CAAA,GAAAhD;AAAAA,EAAA,GAAA;AA4C5J;"}
1
+ {"version":3,"file":"index324.js","sources":["../../../node_modules/.bun/solid-toast@0.5.0+ee58d66d663bac7b/node_modules/solid-toast/dist/source/core/store.js"],"sourcesContent":["import { ActionType } from '../types';\nimport { createStore, produce as p } from 'solid-js/store';\nconst [store, setStore] = createStore({\n toasts: [],\n pausedAt: undefined,\n});\nexport const createTimers = () => {\n const { pausedAt, toasts } = store;\n if (pausedAt)\n return;\n const now = Date.now();\n const timers = toasts.map((toast) => {\n if (toast.duration === Infinity)\n return;\n const durationLeft = (toast.duration || 0) + toast.pauseDuration - (now - toast.createdAt);\n if (durationLeft <= 0) {\n if (toast.visible) {\n dispatch({\n type: ActionType.DISMISS_TOAST,\n toastId: toast.id,\n });\n }\n return;\n }\n return setTimeout(() => {\n dispatch({\n type: ActionType.DISMISS_TOAST,\n toastId: toast.id,\n });\n }, durationLeft);\n });\n return timers;\n};\nconst removalQueue = new Map();\nconst scheduleRemoval = (toastId, unmountDelay) => {\n if (removalQueue.has(toastId))\n return;\n const timeout = setTimeout(() => {\n removalQueue.delete(toastId);\n dispatch({\n type: ActionType.REMOVE_TOAST,\n toastId,\n });\n }, unmountDelay);\n removalQueue.set(toastId, timeout);\n};\nconst unscheduleRemoval = (toastId) => {\n const timeout = removalQueue.get(toastId);\n removalQueue.delete(toastId);\n if (timeout)\n clearTimeout(timeout);\n};\nexport const dispatch = (action) => {\n switch (action.type) {\n case ActionType.ADD_TOAST:\n setStore('toasts', (t) => {\n const toasts = t;\n return [action.toast, ...toasts];\n });\n break;\n case ActionType.DISMISS_TOAST:\n const { toastId } = action;\n const toasts = store.toasts;\n if (toastId) {\n const toastToRemove = toasts.find((t) => t.id === toastId);\n if (toastToRemove)\n scheduleRemoval(toastId, toastToRemove.unmountDelay);\n setStore('toasts', (t) => t.id === toastId, p((t) => (t.visible = false)));\n }\n else {\n toasts.forEach((t) => {\n scheduleRemoval(t.id, t.unmountDelay);\n });\n setStore('toasts', (t) => t.id !== undefined, p((t) => (t.visible = false)));\n }\n break;\n case ActionType.REMOVE_TOAST:\n if (!action.toastId) {\n setStore('toasts', []);\n break;\n }\n setStore('toasts', (t) => {\n const toasts = t;\n return toasts.filter((t) => t.id !== action.toastId);\n });\n break;\n case ActionType.UPDATE_TOAST:\n if (action.toast.id) {\n unscheduleRemoval(action.toast.id);\n }\n setStore('toasts', (t) => t.id === action.toast.id, (t) => {\n const toast = t;\n return {\n ...toast,\n ...action.toast,\n };\n });\n break;\n case ActionType.UPSERT_TOAST:\n store.toasts.find((t) => t.id === action.toast.id)\n ? dispatch({ type: ActionType.UPDATE_TOAST, toast: action.toast })\n : dispatch({ type: ActionType.ADD_TOAST, toast: action.toast });\n break;\n case ActionType.START_PAUSE:\n setStore(p((s) => {\n s.pausedAt = Date.now();\n s.toasts.forEach((t) => {\n t.paused = true;\n });\n }));\n break;\n case ActionType.END_PAUSE:\n const pauseInterval = action.time - (store.pausedAt || 0);\n setStore(p((s) => {\n s.pausedAt = undefined;\n s.toasts.forEach((t) => {\n t.pauseDuration += pauseInterval;\n t.paused = false;\n });\n }));\n break;\n }\n};\nexport { store };\n"],"names":["store","setStore","createStore","createTimers","pausedAt","toasts","now","toast","durationLeft","dispatch","ActionType","removalQueue","scheduleRemoval","toastId","unmount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E,IAC/DR,EAAS,EAAE,MAAMC,EAAW,WAAW,OAAOO,EAAO,OAAO;AAClE;AAAA,IACJ,KAAKP,EAAW;AACZ,MAAAT,EAASmB,EAAE,CAACC,MAAM;AACd,QAAAA,EAAE,WAAW,KAAK,IAAG,GACrBA,EAAE,OAAO,QAAQ,CAACF,MAAM;AACpB,UAAAA,EAAE,SAAS;AAAA,QACf,CAAC;AAAA,MACL,CAAC,CAAC;AACF;AAAA,IACJ,KAAKT,EAAW;AACZ,YAAMY,IAAgBL,EAAO,QAAQjB,EAAM,YAAY;AACvD,MAAAC,EAASmB,EAAE,CAACC,MAAM;AACd,QAAAA,EAAE,WAAW,QACbA,EAAE,OAAO,QAAQ,CAACF,MAAM;AACpB,UAAAA,EAAE,iBAAiBG,GACnBH,EAAE,SAAS;AAAA,QACf,CAAC;AAAA,MACL,CAAC,CAAC;AACF;AAAA,EACZ;AACA;","x_google_ignoreList":[0]}
package/dist/index325.js CHANGED
@@ -1,119 +1,8 @@
1
- import { createSignal as f, onCleanup as P } from "solid-js";
2
- import { pivotFilterWindowCoversRange as V, VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS as U, prunePivotFilterWindows as N, pivotFilterMissingWindowStarts as q, pickNearestWindowStart as x } from "./index285.js";
3
- const B = 300;
4
- function G(a) {
5
- const [h, C] = f(!1), [b, c] = f(!1), [m, v] = f([]), [L, E] = f(0), [S, w] = f(null);
6
- let r, u, s = null, d = 0;
7
- const l = /* @__PURE__ */ new Set(), _ = () => a.isActive?.() ?? !0;
8
- function g() {
9
- v([]), E(0), w(null), l.clear(), s = null;
10
- }
11
- function R(e, n) {
12
- v((t) => {
13
- const i = N(
14
- t,
15
- e,
16
- n,
17
- a.pageSize
18
- );
19
- return i.length === t.length && i.every(
20
- (o, W) => o.startIndex === t[W]?.startIndex
21
- ) ? t : i;
22
- });
23
- }
24
- function p() {
25
- u && clearTimeout(u), u = setTimeout(() => {
26
- u = void 0, A();
27
- }, U);
28
- }
29
- function M(e) {
30
- const { startIndex: n, page: t, previousTotal: i } = e, o = t.total ?? t.values.length;
31
- return t.values.length === 0 && n > 0 ? Math.min(o > 0 ? o : i, n) : n === 0 || o > 0 ? o : i;
32
- }
33
- async function T(e, n = !1) {
34
- const t = ++d;
35
- l.add(e), n ? (C(!0), w(null)) : c(!0);
36
- try {
37
- const i = a.getSearch(), o = await a.loadPage(e, a.pageSize, i);
38
- if (t !== d)
39
- return;
40
- v((F) => [...F.filter(
41
- (O) => O.startIndex !== e
42
- ), { startIndex: e, values: o.values }]);
43
- const W = M;
44
- E(
45
- (F) => W({ startIndex: e, page: o, previousTotal: F })
46
- ), s && R(s.min, s.max);
47
- } catch (i) {
48
- if (t !== d)
49
- return;
50
- if (n) {
51
- g();
52
- const o = i instanceof Error ? i.message : "Failed to load options.";
53
- w(o);
54
- }
55
- } finally {
56
- l.delete(e);
57
- const i = t === d, o = l.size === 0;
58
- (i || o) && (n && i && C(!1), o && (c(!1), p()));
59
- }
60
- }
61
- function y(e) {
62
- r && clearTimeout(r), r = setTimeout(() => {
63
- r = void 0, g(), T(0, !0);
64
- }, B);
65
- }
66
- function z() {
67
- g(), T(0, !0);
68
- }
69
- function A() {
70
- const e = s;
71
- if (!e || !_() || h() || S() || l.size > 0) {
72
- l.size === 0 && c(!1);
73
- return;
74
- }
75
- const n = q(
76
- m(),
77
- e.min,
78
- e.max,
79
- a.pageSize
80
- );
81
- if (n.length === 0) {
82
- R(e.min, e.max), l.size === 0 && c(!1);
83
- return;
84
- }
85
- const t = x(
86
- n,
87
- Math.floor((e.min + e.max) / 2),
88
- a.pageSize
89
- );
90
- l.has(t) || T(t);
91
- }
92
- function D(e, n) {
93
- const t = s && s.min === e && s.max === n;
94
- s = { min: e, max: n }, !t && (!h() && !S() && !V(
95
- m(),
96
- e,
97
- n,
98
- a.pageSize
99
- ) && c(!0), p());
100
- }
101
- return P(() => {
102
- r && clearTimeout(r), u && clearTimeout(u);
103
- }), {
104
- loading: h,
105
- loadingWindow: b,
106
- optionsWindows: m,
107
- totalCount: L,
108
- loadError: S,
109
- handleVisibleRange: D,
110
- scheduleFetch: y,
111
- openPanelFetch: z,
112
- resetListState: g,
113
- reload: z
114
- };
115
- }
1
+ var T;
2
+ (function(S) {
3
+ S[S.ADD_TOAST = 0] = "ADD_TOAST", S[S.UPDATE_TOAST = 1] = "UPDATE_TOAST", S[S.UPSERT_TOAST = 2] = "UPSERT_TOAST", S[S.DISMISS_TOAST = 3] = "DISMISS_TOAST", S[S.REMOVE_TOAST = 4] = "REMOVE_TOAST", S[S.START_PAUSE = 5] = "START_PAUSE", S[S.END_PAUSE = 6] = "END_PAUSE";
4
+ })(T || (T = {}));
116
5
  export {
117
- G as useWindowedOptionPages
6
+ T as ActionType
118
7
  };
119
8
  //# sourceMappingURL=index325.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index325.js","sources":["../src/components/pivot/internal/use-windowed-option-pages.ts"],"sourcesContent":["import { createSignal, onCleanup } from \"solid-js\";\nimport {\n pivotFilterMissingWindowStarts,\n pivotFilterWindowCoversRange,\n prunePivotFilterWindows,\n type PivotFilterOptionsWindow,\n} from \"@algorisys/zen-ui-core/virtual-window\";\nimport { VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS } from \"@algorisys/zen-ui-core/virtual-window\";\nimport { pickNearestWindowStart } from \"@algorisys/zen-ui-core/virtual-window\";\n\nconst DEFAULT_SEARCH_DEBOUNCE_MS = 300;\n\nexport type WindowedOptionPage = {\n values: string[];\n hasMore: boolean;\n total: number;\n};\n\nexport type UseWindowedOptionPagesProps = {\n pageSize: number;\n /** When false, visible-range flushes are skipped (e.g. closed dropdown). */\n isActive?: () => boolean;\n getSearch: () => string;\n loadPage: (\n offset: number,\n limit: number,\n search: string,\n ) => Promise<WindowedOptionPage>;\n // searchDebounceMs / resolveTotal / onError are gone. All three were\n // optional, defaulted, and passed by nobody — generalisation for a second\n // caller that does not exist. resolveTotal's doc even described it (\"default\n // matches column-filter behavior\"), which is how imported abstraction reads\n // once the thing it was imported for never arrives. The errors that onError\n // was for are surfaced through `loadError` instead, which the UI actually\n // reads.\n};\n\n/**\n * Sliding-window fetch controller for virtual option lists (column filters,\n * pivot filter members, and similar).\n */\nexport function useWindowedOptionPages(props: UseWindowedOptionPagesProps) {\n const [loading, setLoading] = createSignal(false);\n const [loadingWindow, setLoadingWindow] = createSignal(false);\n const [optionsWindows, setOptionsWindows] = createSignal<\n PivotFilterOptionsWindow[]\n >([]);\n const [totalCount, setTotalCount] = createSignal(0);\n const [loadError, setLoadError] = createSignal<string | null>(null);\n\n let searchDebounce: ReturnType<typeof setTimeout> | undefined;\n let visibleRangeDebounce: ReturnType<typeof setTimeout> | undefined;\n let lastVisibleRange: { min: number; max: number } | null = null;\n let fetchSequence = 0;\n const inFlightWindowStarts = new Set<number>();\n\n const isActive = () => props.isActive?.() ?? true;\n\n\n function resetListState() {\n setOptionsWindows([]);\n setTotalCount(0);\n setLoadError(null);\n inFlightWindowStarts.clear();\n lastVisibleRange = null;\n }\n\n function maybePruneWindows(minIndex: number, maxIndex: number) {\n setOptionsWindows((current) => {\n const pruned = prunePivotFilterWindows(\n current,\n minIndex,\n maxIndex,\n props.pageSize,\n );\n if (\n pruned.length === current.length &&\n pruned.every(\n (window, index) => window.startIndex === current[index]?.startIndex,\n )\n ) {\n return current;\n }\n return pruned;\n });\n }\n\n function scheduleVisibleRangeFlush() {\n if (visibleRangeDebounce) {\n clearTimeout(visibleRangeDebounce);\n }\n visibleRangeDebounce = setTimeout(() => {\n visibleRangeDebounce = undefined;\n flushVisibleRange();\n }, VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS);\n }\n\n function defaultResolveTotal(args: {\n startIndex: number;\n page: WindowedOptionPage;\n previousTotal: number;\n }): number {\n const { startIndex, page, previousTotal } = args;\n const reportedTotal = page.total ?? page.values.length;\n if (page.values.length === 0 && startIndex > 0) {\n return Math.min(reportedTotal > 0 ? reportedTotal : previousTotal, startIndex);\n }\n if (startIndex === 0 || reportedTotal > 0) {\n return reportedTotal;\n }\n return previousTotal;\n }\n\n async function fetchWindow(startIndex: number, initial = false) {\n const sequence = ++fetchSequence;\n inFlightWindowStarts.add(startIndex);\n if (initial) {\n setLoading(true);\n setLoadError(null);\n } else {\n setLoadingWindow(true);\n }\n try {\n const search = props.getSearch();\n const page = await props.loadPage(startIndex, props.pageSize, search);\n if (sequence !== fetchSequence) {\n return;\n }\n setOptionsWindows((current) => {\n const next = current.filter(\n (window) => window.startIndex !== startIndex,\n );\n return [...next, { startIndex, values: page.values }];\n });\n const resolve = defaultResolveTotal;\n setTotalCount((previousTotal) =>\n resolve({ startIndex, page, previousTotal }),\n );\n if (lastVisibleRange) {\n maybePruneWindows(lastVisibleRange.min, lastVisibleRange.max);\n }\n } catch (caught) {\n if (sequence !== fetchSequence) {\n return;\n }\n if (initial) {\n resetListState();\n const message =\n caught instanceof Error\n ? caught.message\n : \"Failed to load options.\";\n setLoadError(message);\n }\n } finally {\n inFlightWindowStarts.delete(startIndex);\n const isCurrent = sequence === fetchSequence;\n const noMoreInFlight = inFlightWindowStarts.size === 0;\n if (isCurrent || noMoreInFlight) {\n if (initial && isCurrent) {\n setLoading(false);\n }\n if (noMoreInFlight) {\n setLoadingWindow(false);\n scheduleVisibleRangeFlush();\n }\n }\n }\n }\n\n function scheduleFetch(search: string) {\n if (searchDebounce) {\n clearTimeout(searchDebounce);\n }\n searchDebounce = setTimeout(() => {\n searchDebounce = undefined;\n resetListState();\n void fetchWindow(0, true);\n }, DEFAULT_SEARCH_DEBOUNCE_MS);\n void search;\n }\n\n function openPanelFetch() {\n resetListState();\n void fetchWindow(0, true);\n }\n\n function flushVisibleRange() {\n const range = lastVisibleRange;\n if (\n !range ||\n !isActive() ||\n loading() ||\n loadError() ||\n inFlightWindowStarts.size > 0\n ) {\n if (inFlightWindowStarts.size === 0) {\n setLoadingWindow(false);\n }\n return;\n }\n const missingStarts = pivotFilterMissingWindowStarts(\n optionsWindows(),\n range.min,\n range.max,\n props.pageSize,\n );\n if (missingStarts.length === 0) {\n maybePruneWindows(range.min, range.max);\n if (inFlightWindowStarts.size === 0) {\n setLoadingWindow(false);\n }\n return;\n }\n const desiredStart = pickNearestWindowStart(\n missingStarts,\n Math.floor((range.min + range.max) / 2),\n props.pageSize,\n );\n if (inFlightWindowStarts.has(desiredStart)) {\n return;\n }\n void fetchWindow(desiredStart);\n }\n\n function handleVisibleRange(minIndex: number, maxIndex: number) {\n const unchanged =\n lastVisibleRange &&\n lastVisibleRange.min === minIndex &&\n lastVisibleRange.max === maxIndex;\n lastVisibleRange = { min: minIndex, max: maxIndex };\n if (unchanged) {\n return;\n }\n if (\n !loading() &&\n !loadError() &&\n !pivotFilterWindowCoversRange(\n optionsWindows(),\n minIndex,\n maxIndex,\n props.pageSize,\n )\n ) {\n setLoadingWindow(true);\n }\n scheduleVisibleRangeFlush();\n }\n\n onCleanup(() => {\n if (searchDebounce) {\n clearTimeout(searchDebounce);\n }\n if (visibleRangeDebounce) {\n clearTimeout(visibleRangeDebounce);\n }\n });\n\n return {\n loading,\n loadingWindow,\n optionsWindows,\n totalCount,\n loadError,\n handleVisibleRange,\n scheduleFetch,\n openPanelFetch,\n resetListState,\n reload: openPanelFetch,\n };\n}\n"],"names":["DEFAULT_SEARCH_DEBOUNCE_MS","useWindowedOptionPages","props","loading","setLoading","createSignal","loadingWindow","setLoadingWindow","optionsWindows","setOptionsWindows","totalCount","setTotalCount","loadError","setLoadError","searchDebounce","visibleRangeDebounce","lastVisibleRange","fetchSequence","inFlightWindowStarts","isActive","resetListState","maybePruneWindows","minIndex","maxIndex","current","pruned","prunePivotFilterWindows","window","index","scheduleVisibleRangeFlush","flushVisibleRange","VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS","defaultResolveTotal","args","startIndex","page","previousTotal","reportedTotal","fetchWindow","initial","sequence","search","resolve","caught","message","isCurrent","noMoreInFlight","scheduleFetch","openPanelFetch","range","missingStarts","pivotFilterMissingWindowStarts","desiredStart","pickNearestWindowStart","handleVisibleRange","unchanged","p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;AAAA,EAErC,CAAC,GAEM;AAAA,IACL,SAAAZ;AAAA,IACA,eAAAG;AAAA,IACA,gBAAAE;AAAA,IACA,YAAAE;AAAA,IACA,WAAAE;AAAA,IACA,oBAAA0C;AAAA,IACA,eAAAP;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAA5B;AAAA,IACA,QAAQ4B;AAAA,EAAA;AAEZ;"}
1
+ {"version":3,"file":"index325.js","sources":["../../../node_modules/.bun/solid-toast@0.5.0+ee58d66d663bac7b/node_modules/solid-toast/dist/source/types/store.js"],"sourcesContent":["export var ActionType;\n(function (ActionType) {\n ActionType[ActionType[\"ADD_TOAST\"] = 0] = \"ADD_TOAST\";\n ActionType[ActionType[\"UPDATE_TOAST\"] = 1] = \"UPDATE_TOAST\";\n ActionType[ActionType[\"UPSERT_TOAST\"] = 2] = \"UPSERT_TOAST\";\n ActionType[ActionType[\"DISMISS_TOAST\"] = 3] = \"DISMISS_TOAST\";\n ActionType[ActionType[\"REMOVE_TOAST\"] = 4] = \"REMOVE_TOAST\";\n ActionType[ActionType[\"START_PAUSE\"] = 5] = \"START_PAUSE\";\n ActionType[ActionType[\"END_PAUSE\"] = 6] = \"END_PAUSE\";\n})(ActionType || (ActionType = {}));\n"],"names":["ActionType"],"mappings":"AAAU,IAACA;AAAA,CACV,SAAUA,GAAY;AACnB,EAAAA,EAAWA,EAAW,YAAe,CAAC,IAAI,aAC1CA,EAAWA,EAAW,eAAkB,CAAC,IAAI,gBAC7CA,EAAWA,EAAW,eAAkB,CAAC,IAAI,gBAC7CA,EAAWA,EAAW,gBAAmB,CAAC,IAAI,iBAC9CA,EAAWA,EAAW,eAAkB,CAAC,IAAI,gBAC7CA,EAAWA,EAAW,cAAiB,CAAC,IAAI,eAC5CA,EAAWA,EAAW,YAAe,CAAC,IAAI;AAC9C,GAAGA,MAAeA,IAAa,CAAA,EAAG;","x_google_ignoreList":[0]}
package/dist/index326.js CHANGED
@@ -1,10 +1,41 @@
1
- function r(e) {
2
- return [
3
- ...Object.values(e.internal.fields),
4
- ...Object.values(e.internal.fieldArrays)
5
- ];
6
- }
1
+ const n = {
2
+ blank: 4e3,
3
+ error: 4e3,
4
+ success: 2e3,
5
+ loading: 1 / 0,
6
+ custom: 4e3
7
+ }, o = {
8
+ id: "",
9
+ icon: "",
10
+ unmountDelay: 500,
11
+ duration: 3e3,
12
+ ariaProps: {
13
+ role: "status",
14
+ "aria-live": "polite"
15
+ },
16
+ className: "",
17
+ style: {},
18
+ position: "top-right",
19
+ iconTheme: {}
20
+ }, e = {
21
+ position: "top-right",
22
+ toastOptions: o,
23
+ gutter: 8,
24
+ containerStyle: {},
25
+ containerClassName: ""
26
+ }, t = "16px", i = {
27
+ position: "fixed",
28
+ "z-index": 9999,
29
+ top: t,
30
+ bottom: t,
31
+ left: t,
32
+ right: t,
33
+ "pointer-events": "none"
34
+ };
7
35
  export {
8
- r as getFieldAndArrayStores
36
+ i as defaultContainerStyle,
37
+ n as defaultTimeouts,
38
+ o as defaultToastOptions,
39
+ e as defaultToasterOptions
9
40
  };
10
41
  //# sourceMappingURL=index326.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index326.js","sources":["../../../node_modules/.bun/@modular-forms+solid@0.25.1+ee58d66d663bac7b/node_modules/@modular-forms/solid/dist/source/utils/getFieldAndArrayStores.js"],"sourcesContent":["/**\n * Returns a tuple with all field and field array stores of a form.\n *\n * @param form The form of the stores.\n *\n * @returns The store tuple.\n */\nexport function getFieldAndArrayStores(form) {\n return [\n ...Object.values(form.internal.fields),\n ...Object.values(form.internal.fieldArrays),\n ];\n}\n"],"names":["getFieldAndArrayStores","form"],"mappings":"AAOO,SAASA,EAAuBC,GAAM;AACzC,SAAO;AAAA,IACH,GAAG,OAAO,OAAOA,EAAK,SAAS,MAAM;AAAA,IACrC,GAAG,OAAO,OAAOA,EAAK,SAAS,WAAW;AAAA,EAClD;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index326.js","sources":["../../../node_modules/.bun/solid-toast@0.5.0+ee58d66d663bac7b/node_modules/solid-toast/dist/source/core/defaults.js"],"sourcesContent":["export const defaultTimeouts = {\n blank: 4000,\n error: 4000,\n success: 2000,\n loading: Infinity,\n custom: 4000,\n};\nexport const defaultToastOptions = {\n id: '',\n icon: '',\n unmountDelay: 500,\n duration: 3000,\n ariaProps: {\n role: 'status',\n 'aria-live': 'polite',\n },\n className: '',\n style: {},\n position: 'top-right',\n iconTheme: {},\n};\nexport const defaultToasterOptions = {\n position: 'top-right',\n toastOptions: defaultToastOptions,\n gutter: 8,\n containerStyle: {},\n containerClassName: '',\n};\nconst defaultContainerPadding = '16px';\nexport const defaultContainerStyle = {\n position: 'fixed',\n 'z-index': 9999,\n top: defaultContainerPadding,\n bottom: defaultContainerPadding,\n left: defaultContainerPadding,\n right: defaultContainerPadding,\n 'pointer-events': 'none',\n};\n"],"names":["defaultTimeouts","defaultToastOptions","defaultToasterOptions","defaultContainerPadding","defaultContainerStyle"],"mappings":"AAAY,MAACA,IAAkB;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACZ,GACaC,IAAsB;AAAA,EAC/B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,cAAc;AAAA,EACd,UAAU;AAAA,EACV,WAAW;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACrB;AAAA,EACI,WAAW;AAAA,EACX,OAAO,CAAA;AAAA,EACP,UAAU;AAAA,EACV,WAAW,CAAA;AACf,GACaC,IAAwB;AAAA,EACjC,UAAU;AAAA,EACV,cAAcD;AAAA,EACd,QAAQ;AAAA,EACR,gBAAgB,CAAA;AAAA,EAChB,oBAAoB;AACxB,GACME,IAA0B,QACnBC,IAAwB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,KAAKD;AAAA,EACL,QAAQA;AAAA,EACR,MAAMA;AAAA,EACN,OAAOA;AAAA,EACP,kBAAkB;AACtB;","x_google_ignoreList":[0]}
package/dist/index327.js CHANGED
@@ -1,10 +1,47 @@
1
- import { untrack as a } from "solid-js";
2
- import { removeInvalidNames as i } from "./index328.js";
3
- function o(r, t = !0) {
4
- const e = [...a(r.internal.fieldArrayNames.get)];
5
- return t && i(r, e), e;
6
- }
1
+ import { setDefaultOpts as l, defaultOpts as g } from "./index225.js";
2
+ import { store as p, dispatch as u } from "./index324.js";
3
+ import { defaultToasterOptions as f } from "./index326.js";
4
+ import { ActionType as d } from "./index325.js";
5
+ const O = /* @__PURE__ */ (() => {
6
+ let t = 0;
7
+ return () => String(++t);
8
+ })(), S = (t) => {
9
+ l((e) => ({
10
+ containerClassName: t.containerClassName ?? e.containerClassName,
11
+ containerStyle: t.containerStyle ?? e.containerStyle,
12
+ gutter: t.gutter ?? e.gutter,
13
+ position: t.position ?? e.position,
14
+ toastOptions: {
15
+ ...t.toastOptions
16
+ }
17
+ }));
18
+ }, b = (t, e) => {
19
+ const s = t.includes("top") ? { top: 0, "margin-top": `${e}px` } : { bottom: 0, "margin-bottom": `${e}px` }, i = t.includes("center") ? { "justify-content": "center" } : t.includes("right") ? { "justify-content": "flex-end" } : {};
20
+ return {
21
+ left: 0,
22
+ right: 0,
23
+ display: "flex",
24
+ position: "absolute",
25
+ transition: "all 230ms cubic-bezier(.21,1.02,.73,1)",
26
+ ...s,
27
+ ...i
28
+ };
29
+ }, C = (t, e) => {
30
+ const n = t.getBoundingClientRect();
31
+ n.height !== e.height && u({
32
+ type: d.UPDATE_TOAST,
33
+ toast: { id: e.id, height: n.height }
34
+ });
35
+ }, A = (t, e) => {
36
+ const { toasts: n } = p, s = g().gutter || f.gutter || 8, i = n.filter((o) => (o.position || e) === e && o.height), c = i.findIndex((o) => o.id === t.id), a = i.filter((o, r) => r < c && o.visible).length;
37
+ return i.slice(0, a).reduce((o, r) => o + s + (r.height || 0), 0);
38
+ }, D = (t, e) => (t.position || e).includes("top") ? 1 : -1;
7
39
  export {
8
- o as getFieldArrayNames
40
+ O as generateID,
41
+ b as getToastWrapperStyles,
42
+ D as getToastYDirection,
43
+ A as getWrapperYAxisOffset,
44
+ S as mergeContainerOptions,
45
+ C as updateToastHeight
9
46
  };
10
47
  //# sourceMappingURL=index327.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index327.js","sources":["../../../node_modules/.bun/@modular-forms+solid@0.25.1+ee58d66d663bac7b/node_modules/@modular-forms/solid/dist/source/utils/getFieldArrayNames.js"],"sourcesContent":["import { untrack } from 'solid-js';\nimport { removeInvalidNames } from './removeInvalidNames';\n/**\n * Returns a list with the names of all field arrays.\n *\n * @param form The form of the field arrays.\n * @param shouldValid Whether to be valid.\n *\n * @returns All field array names of the form.\n */\nexport function getFieldArrayNames(form, shouldValid = true) {\n // Get name of every field array\n const fieldArrayNames = [...untrack(form.internal.fieldArrayNames.get)];\n // Remove invalid field array names\n if (shouldValid) {\n removeInvalidNames(form, fieldArrayNames);\n }\n // Return field array names\n return fieldArrayNames;\n}\n"],"names":["getFieldArrayNames","form","shouldValid","fieldArrayNames","untrack","removeInvalidNames"],"mappings":";;AAUO,SAASA,EAAmBC,GAAMC,IAAc,IAAM;AAEzD,QAAMC,IAAkB,CAAC,GAAGC,EAAQH,EAAK,SAAS,gBAAgB,GAAG,CAAC;AAEtE,SAAIC,KACAG,EAAmBJ,GAAME,CAAe,GAGrCA;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index327.js","sources":["../../../node_modules/.bun/solid-toast@0.5.0+ee58d66d663bac7b/node_modules/solid-toast/dist/source/util/util.js"],"sourcesContent":["import { setDefaultOpts, defaultOpts, store, dispatch, defaultToasterOptions } from '../core';\nimport { ActionType } from '../types';\nexport const generateID = (() => {\n let count = 0;\n return () => String(++count);\n})();\nexport const mergeContainerOptions = (props) => {\n setDefaultOpts((s) => ({\n containerClassName: props.containerClassName ?? s.containerClassName,\n containerStyle: props.containerStyle ?? s.containerStyle,\n gutter: props.gutter ?? s.gutter,\n position: props.position ?? s.position,\n toastOptions: {\n ...props.toastOptions,\n },\n }));\n};\nexport const getToastWrapperStyles = (position, offset) => {\n const top = position.includes('top');\n const verticalStyle = top\n ? { top: 0, 'margin-top': `${offset}px` }\n : { bottom: 0, 'margin-bottom': `${offset}px` };\n const horizontalStyle = position.includes('center')\n ? { 'justify-content': 'center' }\n : position.includes('right')\n ? { 'justify-content': 'flex-end' }\n : {};\n return {\n left: 0,\n right: 0,\n display: 'flex',\n position: 'absolute',\n transition: `all 230ms cubic-bezier(.21,1.02,.73,1)`,\n ...verticalStyle,\n ...horizontalStyle,\n };\n};\nexport const updateToastHeight = (ref, toast) => {\n const boundingRect = ref.getBoundingClientRect();\n if (boundingRect.height !== toast.height) {\n dispatch({\n type: ActionType.UPDATE_TOAST,\n toast: { id: toast.id, height: boundingRect.height },\n });\n }\n};\nexport const getWrapperYAxisOffset = (toast, position) => {\n const { toasts } = store;\n const gutter = defaultOpts().gutter || defaultToasterOptions.gutter || 8;\n const relevantToasts = toasts.filter((t) => (t.position || position) === position && t.height);\n const toastIndex = relevantToasts.findIndex((t) => t.id === toast.id);\n const toastsBefore = relevantToasts.filter((toast, i) => i < toastIndex && toast.visible).length;\n const offset = relevantToasts.slice(0, toastsBefore).reduce((acc, t) => acc + gutter + (t.height || 0), 0);\n return offset;\n};\nexport const getToastYDirection = (toast, defaultPos) => {\n const position = toast.position || defaultPos;\n const top = position.includes('top');\n return top ? 1 : -1;\n};\n"],"names":["generateID","count","mergeContainerOptions","props","setDefaultOpts","s","getToastWrapperStyles","position","offset","verticalStyle","horizontalStyle","updateToastHeight","ref","toast","boundingRect","dispatch","ActionType","getWrapperYAxisOffset","toasts","store","gutter","defaultOpts","defaultToasterOptions","relevantToasts","t","toastIndex","toastsBefore","i","acc","getToastYDirection","defaultPos"],"mappings":";;;;AAEY,MAACA,IAAc,uBAAM;AAC7B,MAAIC,IAAQ;AACZ,SAAO,MAAM,OAAO,EAAEA,CAAK;AAC/B,GAAC,GACYC,IAAwB,CAACC,MAAU;AAC5C,EAAAC,EAAe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V,GAAOc,MAAMA,IAAIF,KAAcZ,EAAM,OAAO,EAAE;AAE1F,SADeU,EAAe,MAAM,GAAGG,CAAY,EAAE,OAAO,CAACE,GAAKJ,MAAMI,IAAMR,KAAUI,EAAE,UAAU,IAAI,CAAC;AAE7G,GACaK,IAAqB,CAAChB,GAAOiB,OACrBjB,EAAM,YAAYiB,GACd,SAAS,KAAK,IACtB,IAAI;","x_google_ignoreList":[0]}
package/dist/index328.js CHANGED
@@ -1,16 +1,5 @@
1
- import { untrack as f } from "solid-js";
2
- import { getFieldArrayNames as s } from "./index327.js";
3
- import { getFieldArrayStore as c } from "./index276.js";
4
- import { getPathIndex as l } from "./index330.js";
5
- function g(e, r) {
6
- s(e, !1).forEach((o) => {
7
- const i = f(c(e, o).items.get).length - 1;
8
- r.filter((t) => t.startsWith(`${o}.`) && l(o, t) > i).forEach((t) => {
9
- r.splice(r.indexOf(t), 1);
10
- });
11
- });
12
- }
1
+ const s = (e) => typeof e == "function", t = (e, o) => s(e) ? e(o) : e;
13
2
  export {
14
- g as removeInvalidNames
3
+ t as resolveValue
15
4
  };
16
5
  //# sourceMappingURL=index328.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index328.js","sources":["../../../node_modules/.bun/@modular-forms+solid@0.25.1+ee58d66d663bac7b/node_modules/@modular-forms/solid/dist/source/utils/removeInvalidNames.js"],"sourcesContent":["import { untrack } from 'solid-js';\nimport { getFieldArrayNames } from './getFieldArrayNames';\nimport { getFieldArrayStore } from './getFieldArrayStore';\nimport { getPathIndex } from './getPathIndex';\n/**\n * Removes invalid field or field array names of field arrays.\n *\n * @param form The form of the field array.\n * @param names The names to be filtered.\n */\nexport function removeInvalidNames(form, names) {\n getFieldArrayNames(form, false).forEach((fieldArrayName) => {\n const lastIndex = untrack(getFieldArrayStore(form, fieldArrayName).items.get).length - 1;\n names\n .filter((name) => name.startsWith(`${fieldArrayName}.`) &&\n getPathIndex(fieldArrayName, name) > lastIndex)\n .forEach((name) => {\n names.splice(names.indexOf(name), 1);\n });\n });\n}\n"],"names":["removeInvalidNames","form","names","getFieldArrayNames","fieldArrayName","lastIndex","untrack","getFieldArrayStore","name","getPathIndex"],"mappings":";;;;AAUO,SAASA,EAAmBC,GAAMC,GAAO;AAC5C,EAAAC,EAAmBF,GAAM,EAAK,EAAE,QAAQ,CAACG,MAAmB;AACxD,UAAMC,IAAYC,EAAQC,EAAmBN,GAAMG,CAAc,EAAE,MAAM,GAAG,EAAE,SAAS;AACvF,IAAAF,EACK,OAAO,CAACM,MAASA,EAAK,WAAW,GAAGJ,CAAc,GAAG,KACtDK,EAAaL,GAAgBI,CAAI,IAAIH,CAAS,EAC7C,QAAQ,CAACG,MAAS;AACnB,MAAAN,EAAM,OAAOA,EAAM,QAAQM,CAAI,GAAG,CAAC;AAAA,IACvC,CAAC;AAAA,EACL,CAAC;AACL;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index328.js","sources":["../../../node_modules/.bun/solid-toast@0.5.0+ee58d66d663bac7b/node_modules/solid-toast/dist/source/types/toast.js"],"sourcesContent":["const isFunction = (valOrFunction) => typeof valOrFunction === 'function';\nexport const resolveValue = (valOrFunction, arg) => isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction;\n"],"names":["isFunction","valOrFunction","resolveValue","arg"],"mappings":"AAAA,MAAMA,IAAa,CAACC,MAAkB,OAAOA,KAAkB,YAClDC,IAAe,CAACD,GAAeE,MAAQH,EAAWC,CAAa,IAAIA,EAAcE,CAAG,IAAIF;","x_google_ignoreList":[0]}
package/dist/index329.js CHANGED
@@ -1,10 +1,68 @@
1
- import { untrack as i } from "solid-js";
2
- import { removeInvalidNames as m } from "./index328.js";
3
- function o(e, r = !0) {
4
- const t = [...i(e.internal.fieldNames.get)];
5
- return r && m(e, t), t;
6
- }
1
+ import { getNextElement as i, getNextMarker as g, insert as a, createComponent as o, effect as m, setAttribute as s, template as d } from "solid-js/web";
2
+ import { Show as c } from "solid-js";
3
+ import { pivotFilterWindowValueAt as _ } from "./index285.js";
4
+ import { Loading as h } from "./index41.js";
5
+ import { VirtualizedItems as x } from "./index159.js";
6
+ import { useLocale as w } from "./index20.js";
7
+ var $ = /* @__PURE__ */ d('<div class="zen-flex zen-justify-center zen-border-t zen-border-zen-border zen-px-2 zen-py-2">'), p = /* @__PURE__ */ d('<div class="zen-flex zen-flex-col"><div role=listbox aria-multiselectable=true></div><!$><!/>'), S = /* @__PURE__ */ d('<div role=option class="zen-h-full zen-w-full">'), V = /* @__PURE__ */ d('<div class="zen-flex zen-h-full zen-items-center zen-gap-2 zen-px-2"aria-busy=true><span class="zen-size-4 zen-shrink-0 zen-rounded-zen-sm zen-border zen-border-zen-border zen-bg-zen-muted motion-safe:zen-animate-pulse"aria-hidden=true></span><div class="zen-h-3 zen-w-3/4 zen-rounded-zen-sm zen-bg-zen-muted motion-safe:zen-animate-pulse"aria-hidden=true>');
8
+ const W = 36, R = 4, F = (t) => {
9
+ const z = w();
10
+ return (() => {
11
+ var u = i(p), l = u.firstChild, v = l.nextSibling, [b, f] = g(v.nextSibling);
12
+ return a(l, o(x, {
13
+ get totalCount() {
14
+ return t.totalCount;
15
+ },
16
+ getItem: (e) => _(t.optionsWindows, e),
17
+ onVisibleRange: (e, n) => t.onVisibleRange(e, n),
18
+ estimateSize: W,
19
+ overscan: R,
20
+ maxHeight: 256,
21
+ class: "zen-p-1",
22
+ children: ({
23
+ item: e
24
+ }) => (() => {
25
+ var n = i(S);
26
+ return a(n, o(c, {
27
+ when: e,
28
+ get fallback() {
29
+ return (
30
+ // A skeleton, not a blank: an empty row reads as "no value"
31
+ // rather than "not yet".
32
+ (() => {
33
+ var r = i(V);
34
+ return m(() => s(r, "aria-label", z.t("pivot.loadingValue"))), r;
35
+ })()
36
+ );
37
+ },
38
+ children: (r) => t.renderRow(r())
39
+ })), m(() => s(n, "aria-selected", e ? t.isSelected?.(e) ?? !1 : !1)), n;
40
+ })()
41
+ })), a(u, o(c, {
42
+ get when() {
43
+ return t.loadingWindow;
44
+ },
45
+ get children() {
46
+ var e = i($);
47
+ return a(e, o(h, {
48
+ size: "sm",
49
+ get label() {
50
+ return z.t("pivot.loadingMore");
51
+ }
52
+ })), e;
53
+ }
54
+ }), b, f), m((e) => {
55
+ var n = z.t("pivot.values", {
56
+ label: t.label
57
+ }), r = t.loadingWindow || void 0;
58
+ return n !== e.e && s(l, "aria-label", e.e = n), r !== e.t && s(l, "aria-busy", e.t = r), e;
59
+ }, {
60
+ e: void 0,
61
+ t: void 0
62
+ }), u;
63
+ })();
64
+ };
7
65
  export {
8
- o as getFieldNames
66
+ F as WindowedVirtualList
9
67
  };
10
68
  //# sourceMappingURL=index329.js.map