impact-nova 2.5.20 → 2.5.22

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 (33) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +52 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +1 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +61 -59
  5. package/dist/components/data/data-table/column-savability.d.ts +3 -0
  6. package/dist/components/data/data-table/column-savability.js +10 -0
  7. package/dist/components/data/data-table/data-table-column-list.js +117 -89
  8. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +1 -0
  9. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +23 -22
  10. package/dist/components/data/data-table/index.d.ts +2 -0
  11. package/dist/components/data/data-table/index.js +32 -28
  12. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +14 -13
  13. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  14. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  15. package/dist/components/data-display/calendar/calendar-available-view.d.ts +6 -2
  16. package/dist/components/data-display/calendar/calendar-available-view.js +18 -19
  17. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
  18. package/dist/components/data-display/calendar/calendar-week-utils.js +33 -33
  19. package/dist/components/data-display/calendar/calendar-year-panes.js +68 -58
  20. package/dist/components/data-display/calendar/calendar-year-utils.d.ts +13 -0
  21. package/dist/components/data-display/calendar/calendar-year-utils.js +60 -51
  22. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  23. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  24. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  25. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  26. package/dist/components/forms/select/components/Submenu.js +3 -2
  27. package/dist/form-react/Fields/TextFieldWithBackendValidation.js +27 -26
  28. package/dist/form-react/types/fields.types.d.ts +5 -0
  29. package/dist/index.js +273 -269
  30. package/dist/llms/rules/ag-grid.js +1 -1
  31. package/dist/llms/rules/installation.js +1 -1
  32. package/dist/llms/rules/requirements.js +1 -1
  33. package/package.json +1 -1
@@ -1,64 +1,74 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { ChevronRight as A } from "impact-nova-icons";
3
- import { cn as N } from "../../../lib/utils.js";
4
- import { Button as S } from "../../primitives/button/button.js";
5
- import { CalendarPeriodCell as M } from "./calendar-period-cell.js";
6
- import { PERIOD_RANGE_GRID_CLASSNAME as Y } from "./calendar-selection-appearance.js";
7
- import { getYearRangeProps as O, isYearRangeSelection as T } from "./calendar-year-utils.js";
8
- const Z = 12, H = 6, W = "w-[320px] min-w-[320px] max-w-[320px]";
9
- function V({
10
- pickerYear: _,
11
- resolvedStartYear: d,
12
- resolvedEndYear: m,
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { ChevronRight as u } from "impact-nova-icons";
3
+ import { cn as S } from "../../../lib/utils.js";
4
+ import { Button as x } from "../../primitives/button/button.js";
5
+ import { CalendarPeriodCell as Y } from "./calendar-period-cell.js";
6
+ import { PERIOD_RANGE_GRID_CLASSNAME as Z } from "./calendar-selection-appearance.js";
7
+ import { getYearPageYears as D, yearPageHasSelectableYear as E, getYearRangeProps as W, isYearRangeSelection as q } from "./calendar-year-utils.js";
8
+ const F = 12, J = 6, K = "w-[320px] min-w-[320px] max-w-[320px]";
9
+ function ot({
10
+ pickerYear: A,
11
+ resolvedStartYear: c,
12
+ resolvedEndYear: a,
13
13
  previousYearLabel: R,
14
- nextYearLabel: u,
15
- yearLabels: c,
14
+ nextYearLabel: _,
15
+ yearLabels: l,
16
16
  yearCaptions: p,
17
17
  showFooter: v = !0,
18
- pendingYearSelection: w,
19
- selectedYear: C,
20
- isYearSelected: P,
21
- isYearDisabled: b,
22
- onYearPageChange: h,
23
- onYearClick: I
18
+ pendingYearSelection: P,
19
+ selectedYear: w,
20
+ isYearSelected: C,
21
+ isYearDisabled: r,
22
+ onYearPageChange: g,
23
+ onYearClick: B
24
24
  }) {
25
- const i = !!p, n = i ? H : Z, o = Math.floor(_ / n) * n, f = o + n - 1, s = Array.from({ length: n }, (t, l) => o + l).filter(
26
- (t) => t >= d && t <= m
27
- ), g = s[0] ?? o, E = s[s.length - 1] ?? f, a = v ? w : C, x = T(a) ? a : void 0;
28
- return /* @__PURE__ */ r(
25
+ const s = !!p, t = s ? J : F, n = Math.floor(A / t) * t, G = n + t - 1, i = D(n, t), h = i[0] ?? n, f = i[i.length - 1] ?? G, d = v ? P : w, N = q(d) ? d : void 0, I = E({
26
+ pageStart: n - t,
27
+ pageSize: t,
28
+ resolvedStartYear: c,
29
+ resolvedEndYear: a,
30
+ isYearDisabled: r
31
+ }), b = E({
32
+ pageStart: n + t,
33
+ pageSize: t,
34
+ resolvedStartYear: c,
35
+ resolvedEndYear: a,
36
+ isYearDisabled: r
37
+ });
38
+ return /* @__PURE__ */ m(
29
39
  "div",
30
40
  {
31
41
  "data-slot": "year-panes",
32
- className: N("flex flex-col gap-4 overflow-hidden p-3", W),
42
+ className: S("flex flex-col gap-4 overflow-hidden p-3", K),
33
43
  children: [
34
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
44
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between", children: [
35
45
  /* @__PURE__ */ e(
36
- S,
46
+ x,
37
47
  {
38
48
  variant: "ghost",
39
49
  size: "icon",
40
50
  className: "h-7 w-7 shrink-0",
41
51
  "aria-label": R,
42
- disabled: o <= d,
43
- onClick: () => h(o - n),
44
- children: /* @__PURE__ */ e(A, { size: 16, className: "rotate-180" })
52
+ disabled: !I,
53
+ onClick: () => g(n - t),
54
+ children: /* @__PURE__ */ e(u, { size: 16, className: "rotate-180" })
45
55
  }
46
56
  ),
47
- /* @__PURE__ */ r("div", { className: "text-sm font-medium text-content", children: [
48
- c?.(g) ?? g,
57
+ /* @__PURE__ */ m("div", { className: "text-sm font-medium text-content", children: [
58
+ l?.(h) ?? h,
49
59
  " – ",
50
- c?.(E) ?? E
60
+ l?.(f) ?? f
51
61
  ] }),
52
62
  /* @__PURE__ */ e(
53
- S,
63
+ x,
54
64
  {
55
65
  variant: "ghost",
56
66
  size: "icon",
57
67
  className: "h-7 w-7",
58
- "aria-label": u,
59
- disabled: f >= m,
60
- onClick: () => h(o + n),
61
- children: /* @__PURE__ */ e(A, { className: "h-4 w-4" })
68
+ "aria-label": _,
69
+ disabled: !b,
70
+ onClick: () => g(n + t),
71
+ children: /* @__PURE__ */ e(u, { className: "h-4 w-4" })
62
72
  }
63
73
  )
64
74
  ] }),
@@ -66,26 +76,26 @@ function V({
66
76
  "div",
67
77
  {
68
78
  "data-period-grid": "",
69
- className: N(Y, i ? "grid-cols-2" : "grid-cols-3"),
70
- children: s.map((t) => {
71
- const l = P(t), z = b(t), k = !!x, { isStart: B, isEnd: G, isMiddle: j } = O(t, a), D = p?.(t);
79
+ className: S(Z, s ? "grid-cols-2" : "grid-cols-3"),
80
+ children: i.map((o) => {
81
+ const z = o < c || o > a || r(o), k = C(o), O = !!N, { isStart: j, isEnd: M, isMiddle: H } = W(o, d), T = p?.(o);
72
82
  return /* @__PURE__ */ e(
73
- M,
83
+ Y,
74
84
  {
75
- selected: l,
85
+ selected: k,
76
86
  disabled: z,
77
- isRange: k,
78
- isStart: B,
79
- isEnd: G,
80
- isMiddle: j,
81
- hasRangeEnd: !!x?.to,
82
- size: i ? "year-caption" : "year",
83
- columns: i ? 2 : 3,
84
- onClick: () => I(t),
85
- caption: D,
86
- children: c?.(t) ?? String(t)
87
+ isRange: O,
88
+ isStart: j,
89
+ isEnd: M,
90
+ isMiddle: H,
91
+ hasRangeEnd: !!N?.to,
92
+ size: s ? "year-caption" : "year",
93
+ columns: s ? 2 : 3,
94
+ onClick: () => B(o),
95
+ caption: T,
96
+ children: l?.(o) ?? String(o)
87
97
  },
88
- t
98
+ o
89
99
  );
90
100
  })
91
101
  }
@@ -95,8 +105,8 @@ function V({
95
105
  );
96
106
  }
97
107
  export {
98
- V as CalendarYearPanes,
99
- H as YEAR_CAPTION_PAGE_SIZE,
100
- Z as YEAR_PAGE_SIZE,
101
- W as YEAR_PANE_WIDTH_CLASS
108
+ ot as CalendarYearPanes,
109
+ J as YEAR_CAPTION_PAGE_SIZE,
110
+ F as YEAR_PAGE_SIZE,
111
+ K as YEAR_PANE_WIDTH_CLASS
102
112
  };
@@ -11,6 +11,19 @@ export declare function getYearRangeProps(year: number, currentSelection: YearSe
11
11
  };
12
12
  export declare function nextYearSelection(selection: YearSelection, prev: YearSelection | YearSelection[] | YearRange | undefined, yearMode: "single" | "multiple" | "range" | "multi-range"): YearSelection | YearSelection[] | YearRange | undefined;
13
13
  export declare function isYearSelectedForSelection(year: number, currentSelection: YearSelection | YearSelection[] | YearRange | undefined): boolean;
14
+ /** Full page of years (never shrink the grid when bounds are tight). */
15
+ export declare function getYearPageYears(pageStart: number, pageSize: number): number[];
16
+ /**
17
+ * Prev/next stay enabled only when the target page has at least one selectable year.
18
+ * Disabled / out-of-nav years still render on the current page.
19
+ */
20
+ export declare function yearPageHasSelectableYear(options: {
21
+ pageStart: number;
22
+ pageSize: number;
23
+ resolvedStartYear: number;
24
+ resolvedEndYear: number;
25
+ isYearDisabled: (year: number) => boolean;
26
+ }): boolean;
14
27
  export declare function isYearDisabledForBounds(year: number, disabled?: unknown, options?: {
15
28
  calendarKind?: "gregorian" | "fiscal";
16
29
  fiscalConfig?: FiscalCalendarConfig;
@@ -1,75 +1,84 @@
1
1
  import { localDateFromCivil as d } from "../../../lib/fiscal-calendar/civil-date.js";
2
- import { buildFiscalYear as m } from "../../../lib/fiscal-calendar/build-year.js";
3
- import { isDateIntervalDisabled as u } from "./calendar-month-utils.js";
4
- function g(r) {
2
+ import { buildFiscalYear as u } from "../../../lib/fiscal-calendar/build-year.js";
3
+ import { isDateIntervalDisabled as m } from "./calendar-month-utils.js";
4
+ function A(r) {
5
5
  return r ? new Date(r.fy ?? r.year, 0, 1) : /* @__PURE__ */ new Date();
6
6
  }
7
- function n(r) {
7
+ function e(r) {
8
8
  return r.fy ?? r.year;
9
9
  }
10
- function e(r, f) {
11
- return n(r) === n(f);
10
+ function o(r, s) {
11
+ return e(r) === e(s);
12
12
  }
13
13
  function l(r) {
14
14
  return !!(r && !Array.isArray(r) && ("from" in r || "to" in r));
15
15
  }
16
- function A(r, f) {
17
- if (!l(f))
16
+ function E(r, s) {
17
+ if (!l(s))
18
18
  return { isStart: !1, isEnd: !1, isMiddle: !1 };
19
- const i = f.from, t = f.to;
20
- if (!i && !t) return { isStart: !1, isEnd: !1, isMiddle: !1 };
21
- if (!i)
22
- return { isStart: !1, isEnd: t ? n(t) === r : !1, isMiddle: !1 };
23
- const s = n(i);
24
- if (!t) return { isStart: r === s, isEnd: !1, isMiddle: !1 };
25
- const o = n(t);
19
+ const f = s.from, t = s.to;
20
+ if (!f && !t) return { isStart: !1, isEnd: !1, isMiddle: !1 };
21
+ if (!f)
22
+ return { isStart: !1, isEnd: t ? e(t) === r : !1, isMiddle: !1 };
23
+ const n = e(f);
24
+ if (!t) return { isStart: r === n, isEnd: !1, isMiddle: !1 };
25
+ const i = e(t);
26
26
  return {
27
- isStart: r === s,
28
- isEnd: r === o,
29
- isMiddle: r > s && r < o
27
+ isStart: r === n,
28
+ isEnd: r === i,
29
+ isMiddle: r > n && r < i
30
30
  };
31
31
  }
32
- function w(r, f, i) {
33
- if (i === "single") return r;
34
- if (i === "multiple") {
35
- const s = Array.isArray(f) ? f : [];
36
- return s.some((a) => e(a, r)) ? s.filter((a) => !e(a, r)) : [...s, r];
32
+ function b(r, s, f) {
33
+ if (f === "single") return r;
34
+ if (f === "multiple") {
35
+ const n = Array.isArray(s) ? s : [];
36
+ return n.some((a) => o(a, r)) ? n.filter((a) => !o(a, r)) : [...n, r];
37
37
  }
38
- const t = f;
39
- return !t?.from || t.to ? { from: r } : e(r, t.from) ? t : n(r) < n(t.from) ? { from: r, to: t.from } : { from: t.from, to: r };
38
+ const t = s;
39
+ return !t?.from || t.to ? { from: r } : o(r, t.from) ? t : e(r) < e(t.from) ? { from: r, to: t.from } : { from: t.from, to: r };
40
40
  }
41
- function E(r, f) {
42
- if (!f) return !1;
43
- const i = { year: r, fy: r };
44
- if (Array.isArray(f))
45
- return f.some((t) => n(t) === r);
46
- if (l(f)) {
47
- const t = f.from, s = f.to;
48
- if (!t) return s ? n(s) === r : !1;
49
- const o = n(t);
50
- if (!s) return r === o;
51
- const a = n(s);
52
- return r >= o && r <= a;
41
+ function w(r, s) {
42
+ if (!s) return !1;
43
+ const f = { year: r, fy: r };
44
+ if (Array.isArray(s))
45
+ return s.some((t) => e(t) === r);
46
+ if (l(s)) {
47
+ const t = s.from, n = s.to;
48
+ if (!t) return n ? e(n) === r : !1;
49
+ const i = e(t);
50
+ if (!n) return r === i;
51
+ const a = e(n);
52
+ return r >= i && r <= a;
53
53
  }
54
- return e(f, i) || f.year === r;
54
+ return o(s, f) || s.year === r;
55
55
  }
56
- function F(r, f, i) {
57
- let t = new Date(r, 0, 1), s = new Date(r, 11, 31, 23, 59, 59, 999);
58
- if (i?.calendarKind === "fiscal" && i.fiscalConfig)
56
+ function c(r, s) {
57
+ return Array.from({ length: s }, (f, t) => r + t);
58
+ }
59
+ function F(r) {
60
+ const { pageStart: s, pageSize: f, resolvedStartYear: t, resolvedEndYear: n, isYearDisabled: i } = r;
61
+ return c(s, f).some((a) => a < t || a > n ? !1 : !i(a));
62
+ }
63
+ function M(r, s, f) {
64
+ let t = new Date(r, 0, 1), n = new Date(r, 11, 31, 23, 59, 59, 999);
65
+ if (f?.calendarKind === "fiscal" && f.fiscalConfig)
59
66
  try {
60
- const o = m(i.fiscalConfig, r);
61
- t = d(o.start), s = d(o.end);
67
+ const i = u(f.fiscalConfig, r);
68
+ t = d(i.start), n = d(i.end);
62
69
  } catch {
63
70
  }
64
- return u(t, s, f);
71
+ return m(t, n, s);
65
72
  }
66
73
  export {
67
- A as getYearRangeProps,
68
- e as isSameYear,
69
- F as isYearDisabledForBounds,
74
+ c as getYearPageYears,
75
+ E as getYearRangeProps,
76
+ o as isSameYear,
77
+ M as isYearDisabledForBounds,
70
78
  l as isYearRangeSelection,
71
- E as isYearSelectedForSelection,
72
- w as nextYearSelection,
73
- g as viewMonthFromYear,
74
- n as yearKey
79
+ w as isYearSelectedForSelection,
80
+ b as nextYearSelection,
81
+ A as viewMonthFromYear,
82
+ e as yearKey,
83
+ F as yearPageHasSelectableYear
75
84
  };
@@ -1,6 +1,7 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
3
- const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
3
+ import "react";
4
+ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
4
5
  /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
5
6
  /* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
6
7
  ] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
9
10
  ] });
10
11
  export {
11
12
  h as defaultAccordionTooltipRender,
12
- d as defaultTabTooltipRender
13
+ p as defaultTabTooltipRender
13
14
  };
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
4
4
  import { cn as p } from "../../../lib/utils.js";
5
+ import { Kbd as $ } from "../../primitives/kbd/kbd.js";
6
+ import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
5
7
  import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
6
- import { ModuleRegistry as $, AllCommunityModule as H } from "ag-grid-community";
7
- import { AllEnterpriseModule as V } from "ag-grid-enterprise";
8
- import { DataTable as J, DataTableContent as Q } from "../../data/data-table/data-table.js";
8
+ import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
9
+ import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
10
+ import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
9
11
  import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
10
- import { Kbd as X } from "../../primitives/kbd/kbd.js";
11
- import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
12
12
  import { useCommandPalette as Z } from "./use-command-palette.js";
13
13
  import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
14
14
  import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
15
- $.registerModules([H, V]);
15
+ V.registerModules([J, Q]);
16
16
  function re(a) {
17
17
  const t = a.data;
18
18
  return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
@@ -69,7 +69,7 @@ function ne(a) {
69
69
  "flex items-center justify-end h-full w-full text-end",
70
70
  t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
71
71
  ),
72
- children: /* @__PURE__ */ r(X, { keybinding: t.keybinding, size: "sm" })
72
+ children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
73
73
  }
74
74
  ) : t.customisable ? /* @__PURE__ */ r(
75
75
  "button",
@@ -133,7 +133,7 @@ function le({
133
133
  description: e.description || "",
134
134
  category: e.category || "General",
135
135
  keybinding: i,
136
- keybindingDisplay: i ? Y(i) : "",
136
+ keybindingDisplay: i ? H(i) : "",
137
137
  scope: e.scope,
138
138
  source: D,
139
139
  sourceColor: T ? "primary" : "neutral",
@@ -278,10 +278,10 @@ function le({
278
278
  u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
279
279
  /* @__PURE__ */ r("span", { children: u ? u.text : L })
280
280
  ] }) : null;
281
- return /* @__PURE__ */ h(J, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
281
+ return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
282
282
  s ? s(E) : E,
283
283
  /* @__PURE__ */ r(
284
- Q,
284
+ Y,
285
285
  {
286
286
  rowData: y,
287
287
  columnDefs: I,
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
6
6
  import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
7
7
  import { Button as D } from "../../primitives/button/button.js";
8
8
  import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
9
- import { OverflowTooltip as S } from "../../feedback/tooltip/overflow-tooltip.js";
10
- import { Kbd as j } from "../../primitives/kbd/kbd.js";
9
+ import { Kbd as S } from "../../primitives/kbd/kbd.js";
10
+ import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
11
11
  import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
12
12
  import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
13
13
  import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
@@ -145,14 +145,14 @@ const O = ({
145
145
  ),
146
146
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
147
147
  /* @__PURE__ */ e(
148
- S,
148
+ j,
149
149
  {
150
150
  triggerClassName: "truncate font-['Manrope'] block min-w-0",
151
151
  content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
152
152
  t.label,
153
153
  " ",
154
154
  /* @__PURE__ */ e(
155
- j,
155
+ S,
156
156
  {
157
157
  keybinding: t.tooltipKeybinding,
158
158
  size: "sm"
@@ -1,8 +1,9 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { cn as x } from "../../../../lib/utils.js";
3
+ import "react";
3
4
  import { OverflowTooltip as m } from "../../../feedback/tooltip/overflow-tooltip.js";
4
5
  import { isInvertedSelection as h, isOptionArray as d } from "../utils/select.js";
5
- function w({
6
+ function C({
6
7
  isMulti: u,
7
8
  isDisabled: p,
8
9
  internalValue: o,
@@ -52,5 +53,5 @@ function w({
52
53
  );
53
54
  }
54
55
  export {
55
- w as SelectTriggerValue
56
+ C as SelectTriggerValue
56
57
  };
@@ -1,13 +1,14 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
2
  import * as i from "@radix-ui/react-popover";
3
3
  import { Checkbox as P } from "../../checkbox/checkbox.js";
4
+ import "react";
4
5
  import { OverflowTooltip as y } from "../../../feedback/tooltip/overflow-tooltip.js";
5
6
  import { ChevronRight as A, Checkmark as O } from "impact-nova-icons";
6
7
  import { cn as v } from "../../../../lib/utils.js";
7
8
  import { useOverlayPortalContainer as T } from "../../../../lib/overlay/overlay-portal-context.js";
8
9
  import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as _ } from "../../../../lib/overlay/overlay-host.constants.js";
9
10
  import { useSuppressOptionClickForTextSelection as E } from "../hooks/useSuppressOptionClickForTextSelection.js";
10
- const G = ({
11
+ const R = ({
11
12
  parentOption: n,
12
13
  isMulti: u,
13
14
  isReadOnly: l,
@@ -105,5 +106,5 @@ const G = ({
105
106
  ] });
106
107
  };
107
108
  export {
108
- G as Submenu
109
+ R as Submenu
109
110
  };
@@ -1,5 +1,5 @@
1
- import { jsx as m, jsxs as T } from "react/jsx-runtime";
2
- import { useRef as p, useState as C } from "react";
1
+ import { jsx as m, jsxs as v } from "react/jsx-runtime";
2
+ import { useRef as p, useState as T } from "react";
3
3
  import { Controller as k } from "react-hook-form";
4
4
  import { SmartInput as I } from "../../components/forms/smart-input/smart-input.js";
5
5
  const B = ({
@@ -8,35 +8,35 @@ const B = ({
8
8
  isDisabled: x,
9
9
  formHelpers: t
10
10
  }) => {
11
- const i = e.fieldType === "text_with_backend_validation" ? e : null, o = p(!1), l = p(null), [h, f] = C(!1), v = async (r) => {
11
+ const i = e.fieldType === "text_with_backend_validation" ? e : null, o = p(!1), l = p(null), [h, f] = T(!1), C = async (n) => {
12
12
  if (i?.validationConfig?.omitValidation?.includes(
13
13
  e.id
14
14
  )) {
15
15
  o.current = !1, l.current = null, await t.form.trigger(e.id);
16
16
  return;
17
17
  }
18
- if (!(!r || r.trim() === "")) {
18
+ if (!(!n || n.trim() === "")) {
19
19
  f(!0);
20
20
  try {
21
- const n = e.handlerName ? t.formContext?.functions?.[e.handlerName] : void 0;
21
+ const r = e.handlerName ? t.formContext?.functions?.[e.handlerName] : void 0;
22
22
  let a;
23
- if (n) {
24
- const d = i?.validationConfig?.fieldValuesToIncludeInApiRequest || [], s = d.length > 0 ? d.reduce(
23
+ if (r) {
24
+ const s = i?.validationConfig?.fieldValuesToIncludeInApiRequest || [], d = s.length > 0 ? s.reduce(
25
25
  (u, c) => (u[c] = t.form.getValues(c), u),
26
26
  {}
27
27
  ) : {};
28
- a = await n({
28
+ a = await r({
29
29
  formHelpers: t,
30
30
  fieldId: e.id,
31
- newValue: r,
31
+ newValue: n,
32
32
  oldValue: t.getPreviousFieldValue(e.id),
33
- payload: { includedFieldValues: s }
33
+ payload: { includedFieldValues: d }
34
34
  });
35
35
  } else {
36
36
  if (!i?.validationConfig)
37
37
  throw new Error("Validation config is required");
38
- const d = i.validationConfig.method || "POST", s = i.validationConfig.fieldValuesToIncludeInApiRequest || [], u = s.length > 0 ? s.reduce(
39
- (V, w) => (V[w] = t.form.getValues(w), V),
38
+ const s = i.validationConfig.method || "POST", d = i.validationConfig.fieldValuesToIncludeInApiRequest || [], u = d.length > 0 ? d.reduce(
39
+ (w, V) => (w[V] = t.form.getValues(V), w),
40
40
  {}
41
41
  ) : {}, c = i.validationConfig.apiEndpoint;
42
42
  if (!c)
@@ -45,8 +45,8 @@ const B = ({
45
45
  {
46
46
  formHelpers: t,
47
47
  apiEndpoint: c,
48
- value: r,
49
- method: d,
48
+ value: n,
49
+ method: s,
50
50
  fieldValuesToIncludeInApiRequest: u
51
51
  }
52
52
  ), !a)
@@ -55,10 +55,10 @@ const B = ({
55
55
  );
56
56
  }
57
57
  a?.is_valid ? (o.current = !1, l.current = null, await t.form.trigger(e.id)) : (o.current = !0, l.current = a?.message?.trim() || `This ${e.label} is already taken`, await t.form.trigger(e.id));
58
- } catch (n) {
59
- o.current = !0, l.current = n instanceof Error ? n.message : `This ${e.label} is already taken`, await t.form.trigger(e.id), t.formContext?.transport?.showFormErrorToast?.({
58
+ } catch (r) {
59
+ o.current = !0, l.current = r instanceof Error ? r.message : `This ${e.label} is already taken`, await t.form.trigger(e.id), t.formContext?.transport?.showFormErrorToast?.({
60
60
  title: "Error",
61
- description: n instanceof Error ? n.message : "Something went wrong"
61
+ description: r instanceof Error ? r.message : "Something went wrong"
62
62
  });
63
63
  } finally {
64
64
  f(!1);
@@ -77,34 +77,35 @@ const B = ({
77
77
  backendValidation: () => o.current ? l.current || "Validation pending" : !0
78
78
  }
79
79
  },
80
- render: ({ field: r, fieldState: n }) => {
81
- const a = !!n.error && n.error.message !== "Validation pending", d = r.value, s = a && !h ? n.error?.message : void 0;
82
- return /* @__PURE__ */ T("div", { className: "w-full min-w-0", children: [
80
+ render: ({ field: n, fieldState: r }) => {
81
+ const a = !!r.error && r.error.message !== "Validation pending", s = n.value, d = a && !h ? r.error?.message : void 0;
82
+ return /* @__PURE__ */ v("div", { className: "w-full min-w-0", children: [
83
83
  /* @__PURE__ */ m(
84
84
  I,
85
85
  {
86
86
  label: e.label,
87
87
  type: "text",
88
- value: d ?? void 0,
88
+ value: s ?? void 0,
89
89
  onChange: (u) => {
90
- u ? (o.current = !0, l.current = null) : (o.current = !1, l.current = null), r.onChange(u);
90
+ u ? (o.current = !0, l.current = null) : (o.current = !1, l.current = null), n.onChange(u);
91
91
  },
92
92
  onBlur: () => {
93
- r.onBlur(), v(d ?? "");
93
+ n.onBlur(), C(s ?? "");
94
94
  },
95
95
  placeholder: e.placeholder,
96
96
  required: e.isRequired,
97
97
  disabled: x,
98
98
  error: a && !h,
99
- helperText: h ? "Validating…" : a ? void 0 : e.helpText
99
+ helperText: h ? "Validating…" : a ? void 0 : e.helpText,
100
+ allowSpecialCharacters: i.allowSpecialCharacters
100
101
  }
101
102
  ),
102
- s ? /* @__PURE__ */ m(
103
+ d ? /* @__PURE__ */ m(
103
104
  "p",
104
105
  {
105
106
  className: "mt-2 text-sm leading-snug text-[#DC2626] break-words",
106
107
  role: "alert",
107
- children: s
108
+ children: d
108
109
  }
109
110
  ) : null
110
111
  ] });
@@ -466,6 +466,11 @@ export type CheckboxField = BaseField & {
466
466
  };
467
467
  export type TextFieldWithBackendValidation = BaseField & {
468
468
  fieldType: "text_with_backend_validation";
469
+ /**
470
+ * When false (default), only letters, numbers, and spaces are kept.
471
+ * Set true to allow punctuation and symbols (same behavior as `text`).
472
+ */
473
+ allowSpecialCharacters?: boolean;
469
474
  /** Legacy built-in path — optional when field.handlerName is set */
470
475
  validationConfig?: {
471
476
  method?: "GET" | "POST";