@ryuzaki13/react-foundation-ui 3.4.3 → 3.5.0

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 (168) hide show
  1. package/dist/badge/index.js +65 -2
  2. package/dist/badge/index.js.map +1 -0
  3. package/dist/barcode-scanner/index.js +18 -18
  4. package/dist/base-table/index.js +2 -2
  5. package/dist/button/index.js +1 -1
  6. package/dist/check-box/index.js +1 -1
  7. package/dist/chunks/{CalendarView-Dm55k0bN.js → CalendarView-CwbPJG2Y.js} +86 -86
  8. package/dist/chunks/{CalendarView-Dm55k0bN.js.map → CalendarView-CwbPJG2Y.js.map} +1 -1
  9. package/dist/chunks/{ImageViewerRuntime-HGBWp9NM.js → ImageViewerRuntime-DZpgxzF1.js} +25 -25
  10. package/dist/chunks/{ImageViewerRuntime-HGBWp9NM.js.map → ImageViewerRuntime-DZpgxzF1.js.map} +1 -1
  11. package/dist/chunks/{TextEditorLexicalClient-C8nSoz85.js → TextEditorLexicalClient-BRp8jHId.js} +354 -354
  12. package/dist/chunks/{TextEditorLexicalClient-C8nSoz85.js.map → TextEditorLexicalClient-BRp8jHId.js.map} +1 -1
  13. package/dist/chunks/{base-table-BWvKfI2W.js → base-table-BHmboNzl.js} +138 -138
  14. package/dist/chunks/{base-table-BWvKfI2W.js.map → base-table-BHmboNzl.js.map} +1 -1
  15. package/dist/chunks/{button-DF21yxVp.js → button-D7GAU2Wa.js} +20 -20
  16. package/dist/chunks/{button-DF21yxVp.js.map → button-D7GAU2Wa.js.map} +1 -1
  17. package/dist/chunks/{check-box-CZyhzmR0.js → check-box-D_Y6iIWv.js} +19 -19
  18. package/dist/chunks/{check-box-CZyhzmR0.js.map → check-box-D_Y6iIWv.js.map} +1 -1
  19. package/dist/chunks/{context-menu-DgvXGCuI.js → context-menu-BQePxRpu.js} +159 -159
  20. package/dist/chunks/{context-menu-DgvXGCuI.js.map → context-menu-BQePxRpu.js.map} +1 -1
  21. package/dist/chunks/{date-input-D7aBsPJc.js → date-input-Crijdmmq.js} +67 -67
  22. package/dist/chunks/{date-input-D7aBsPJc.js.map → date-input-Crijdmmq.js.map} +1 -1
  23. package/dist/chunks/{date-range-preset-select-BLnY47cv.js → date-range-preset-select-CyzGMvVp.js} +6 -6
  24. package/dist/chunks/{date-range-preset-select-BLnY47cv.js.map → date-range-preset-select-CyzGMvVp.js.map} +1 -1
  25. package/dist/chunks/{dialog-1Z1zCNCe.js → dialog-BcQGVNbu.js} +13 -13
  26. package/dist/chunks/{dialog-1Z1zCNCe.js.map → dialog-BcQGVNbu.js.map} +1 -1
  27. package/dist/chunks/{flex-C7njxZ74.js → flex-DtXK7OM4.js} +29 -29
  28. package/dist/chunks/{flex-C7njxZ74.js.map → flex-DtXK7OM4.js.map} +1 -1
  29. package/dist/chunks/{floating-arrow-DPKwJfww.js → floating-arrow-DKUKx2ZQ.js} +7 -7
  30. package/dist/chunks/{floating-arrow-DPKwJfww.js.map → floating-arrow-DKUKx2ZQ.js.map} +1 -1
  31. package/dist/chunks/{input-DSPKgiCK.js → input-CuRK9Vbz.js} +78 -78
  32. package/dist/chunks/{input-DSPKgiCK.js.map → input-CuRK9Vbz.js.map} +1 -1
  33. package/dist/chunks/{input-files-tIS17-zX.js → input-files-B8j6Pb_M.js} +31 -31
  34. package/dist/chunks/{input-files-tIS17-zX.js.map → input-files-B8j6Pb_M.js.map} +1 -1
  35. package/dist/chunks/{misc-DeGboAt-.js → misc-CGQOXXCy.js} +110 -110
  36. package/dist/chunks/{misc-DeGboAt-.js.map → misc-CGQOXXCy.js.map} +1 -1
  37. package/dist/chunks/{modal-dplfAaER.js → modal-febBsMyR.js} +58 -58
  38. package/dist/chunks/{modal-dplfAaER.js.map → modal-febBsMyR.js.map} +1 -1
  39. package/dist/chunks/{picker-lvm82d0A.js → picker-BA6okKnz.js} +91 -91
  40. package/dist/chunks/{picker-lvm82d0A.js.map → picker-BA6okKnz.js.map} +1 -1
  41. package/dist/chunks/popover-yl5DVe06.js +245 -0
  42. package/dist/chunks/{popover-Bne-Ljbs.js.map → popover-yl5DVe06.js.map} +1 -1
  43. package/dist/chunks/radio-group-CW-K1n9c.js +125 -0
  44. package/dist/chunks/{radio-group-sSnlYjAX.js.map → radio-group-CW-K1n9c.js.map} +1 -1
  45. package/dist/chunks/select-DblNSc5H.js +363 -0
  46. package/dist/chunks/{select-aTGupQan.js.map → select-DblNSc5H.js.map} +1 -1
  47. package/dist/chunks/{separator-B72Aq-6a.js → separator-CIqnk2z9.js} +2 -2
  48. package/dist/chunks/{separator-B72Aq-6a.js.map → separator-CIqnk2z9.js.map} +1 -1
  49. package/dist/chunks/{sortable-BKIwlqhI.js → sortable-CQmMHAF8.js} +38 -38
  50. package/dist/chunks/{sortable-BKIwlqhI.js.map → sortable-CQmMHAF8.js.map} +1 -1
  51. package/dist/chunks/{table-DxoSOvQK.js → table-BnvjPaE1.js} +18 -18
  52. package/dist/chunks/{table-DxoSOvQK.js.map → table-BnvjPaE1.js.map} +1 -1
  53. package/dist/chunks/{table-column-interactions-DzEvVuXe.js → table-column-interactions-Do8LFtiv.js} +20 -20
  54. package/dist/chunks/{table-column-interactions-DzEvVuXe.js.map → table-column-interactions-Do8LFtiv.js.map} +1 -1
  55. package/dist/chunks/{types-D9Wj9wrg.js → types-CxXyru6U.js} +21 -21
  56. package/dist/chunks/{types-D9Wj9wrg.js.map → types-CxXyru6U.js.map} +1 -1
  57. package/dist/chunks/{useODataSelectBase-DR4PrY1j.js → useODataSelectBase-DwR4Lfv-.js} +5 -5
  58. package/dist/chunks/{useODataSelectBase-DR4PrY1j.js.map → useODataSelectBase-DwR4Lfv-.js.map} +1 -1
  59. package/dist/chunks/{wheel-picker-FS58cRsQ.js → wheel-picker-DUHGy7wE.js} +23 -23
  60. package/dist/chunks/{wheel-picker-FS58cRsQ.js.map → wheel-picker-DUHGy7wE.js.map} +1 -1
  61. package/dist/context-menu/index.js +1 -1
  62. package/dist/date-input/index.js +2 -2
  63. package/dist/date-range-preset-select/index.js +1 -1
  64. package/dist/date-time-input/index.js +122 -122
  65. package/dist/date-time-input/index.js.map +1 -1
  66. package/dist/detail/index.js +22 -22
  67. package/dist/dialog/index.js +1 -1
  68. package/dist/disclosure/index.js +9 -9
  69. package/dist/drop-zone/index.js +21 -21
  70. package/dist/errors/index.js +50 -50
  71. package/dist/expandable-action-panel/index.js +24 -24
  72. package/dist/flex/index.js +1 -1
  73. package/dist/flex/useFlexClasses.d.ts +1 -1
  74. package/dist/floating-arrow/index.js +1 -1
  75. package/dist/fullscreen-portal/index.js +8 -8
  76. package/dist/image/index.js +119 -119
  77. package/dist/input/index.js +1 -1
  78. package/dist/input-date-time/index.js +55 -55
  79. package/dist/input-file/index.js +16 -16
  80. package/dist/input-files/index.js +1 -1
  81. package/dist/input-image/index.js +17 -17
  82. package/dist/input-search/index.js +30 -2
  83. package/dist/input-search/index.js.map +1 -0
  84. package/dist/layout-picker/index.js +93 -93
  85. package/dist/layout-picker/index.js.map +1 -1
  86. package/dist/list/index.js +39 -39
  87. package/dist/listbox/index.js +33 -33
  88. package/dist/misc/index.js +1 -1
  89. package/dist/modal/index.js +1 -1
  90. package/dist/multi-select/index.js +466 -2
  91. package/dist/multi-select/index.js.map +1 -0
  92. package/dist/notifications/index.js +45 -45
  93. package/dist/option/index.js +30 -30
  94. package/dist/period-select/index.js +7 -7
  95. package/dist/picker/index.js +1 -1
  96. package/dist/popover/index.js +1 -1
  97. package/dist/preset-range-date-input/index.js +10 -10
  98. package/dist/preset-select/index.js +1 -1
  99. package/dist/radio-button/index.js +9 -9
  100. package/dist/radio-group/index.js +1 -1
  101. package/dist/select/index.js +1 -1
  102. package/dist/separator/index.js +1 -1
  103. package/dist/simple-table/index.js +5 -5
  104. package/dist/slider/index.js +82 -82
  105. package/dist/slider/index.js.map +1 -1
  106. package/dist/sortable/index.js +1 -1
  107. package/dist/splitter/index.js +55 -55
  108. package/dist/state-select/index.js +17 -17
  109. package/dist/styles.css +1 -1
  110. package/dist/switch/index.js +18 -18
  111. package/dist/table/index.js +1 -1
  112. package/dist/table-column-interactions/index.js +1 -1
  113. package/dist/table-editor/index.js +99 -99
  114. package/dist/table-sorting/index.js +13 -13
  115. package/dist/tabs/index.js +83 -83
  116. package/dist/tag-input/index.js +58 -58
  117. package/dist/tag-input/index.js.map +1 -1
  118. package/dist/text/index.js +18 -18
  119. package/dist/text-editor/index.js +3 -3
  120. package/dist/textarea/index.js +1 -1
  121. package/dist/three-scene/index.js +7 -7
  122. package/dist/toggle/index.js +20 -20
  123. package/dist/toolbar/index.js +16 -16
  124. package/dist/tree/index.js +24 -24
  125. package/dist/tree-select/index.js +189 -189
  126. package/dist/tree-select/index.js.map +1 -1
  127. package/dist/tree-table/index.js +33 -33
  128. package/dist/tree-table/index.js.map +1 -1
  129. package/dist/wheel-picker/index.js +1 -1
  130. package/package.json +1 -5
  131. package/storybook-static/project.json +1 -1
  132. package/dist/advanced-search/index.d.ts +0 -3
  133. package/dist/advanced-search/index.d.ts.map +0 -1
  134. package/dist/advanced-search/index.js +0 -399
  135. package/dist/advanced-search/index.js.map +0 -1
  136. package/dist/advanced-search/lib/index.d.ts +0 -2
  137. package/dist/advanced-search/lib/index.d.ts.map +0 -1
  138. package/dist/advanced-search/lib/searchParts.d.ts +0 -3
  139. package/dist/advanced-search/lib/searchParts.d.ts.map +0 -1
  140. package/dist/advanced-search/model/index.d.ts +0 -5
  141. package/dist/advanced-search/model/index.d.ts.map +0 -1
  142. package/dist/advanced-search/model/types.d.ts +0 -55
  143. package/dist/advanced-search/model/types.d.ts.map +0 -1
  144. package/dist/advanced-search/model/useAdvancedSearch.d.ts +0 -11
  145. package/dist/advanced-search/model/useAdvancedSearch.d.ts.map +0 -1
  146. package/dist/advanced-search/model/useAdvancedSearchInitialSelected.d.ts +0 -6
  147. package/dist/advanced-search/model/useAdvancedSearchInitialSelected.d.ts.map +0 -1
  148. package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts +0 -13
  149. package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts.map +0 -1
  150. package/dist/advanced-search/ui/AdvancedSearchModal.d.ts +0 -23
  151. package/dist/advanced-search/ui/AdvancedSearchModal.d.ts.map +0 -1
  152. package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts +0 -16
  153. package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts.map +0 -1
  154. package/dist/advanced-search/ui/AdvancedSearchSelect.d.ts +0 -9
  155. package/dist/advanced-search/ui/AdvancedSearchSelect.d.ts.map +0 -1
  156. package/dist/advanced-search/ui/AdvancedSearchSelectUI.d.ts +0 -9
  157. package/dist/advanced-search/ui/AdvancedSearchSelectUI.d.ts.map +0 -1
  158. package/dist/advanced-search/ui/index.d.ts +0 -2
  159. package/dist/advanced-search/ui/index.d.ts.map +0 -1
  160. package/dist/chunks/badge-6mXO9BWP.js +0 -65
  161. package/dist/chunks/badge-6mXO9BWP.js.map +0 -1
  162. package/dist/chunks/input-search-Cat4c7SM.js +0 -30
  163. package/dist/chunks/input-search-Cat4c7SM.js.map +0 -1
  164. package/dist/chunks/multi-select-BZ9N6Dal.js +0 -466
  165. package/dist/chunks/multi-select-BZ9N6Dal.js.map +0 -1
  166. package/dist/chunks/popover-Bne-Ljbs.js +0 -245
  167. package/dist/chunks/radio-group-sSnlYjAX.js +0 -125
  168. package/dist/chunks/select-aTGupQan.js +0 -363
@@ -1,9 +1,9 @@
1
- import { n as e } from "../chunks/button-DF21yxVp.js";
2
- import { n as t, o as n } from "../chunks/input-DSPKgiCK.js";
3
- import { t as r } from "../chunks/check-box-CZyhzmR0.js";
4
- import { t as i } from "../chunks/dialog-1Z1zCNCe.js";
5
- import { useId as a, useMemo as o, useRef as s, useState as c } from "react";
6
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
1
+ import { n as e } from "../chunks/button-D7GAU2Wa.js";
2
+ import { n as t, o as n } from "../chunks/input-CuRK9Vbz.js";
3
+ import { t as r } from "../chunks/check-box-D_Y6iIWv.js";
4
+ import { t as i } from "../chunks/dialog-BcQGVNbu.js";
5
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { useId as c, useMemo as l, useRef as u, useState as d } from "react";
7
7
  import { cellSpanningFeature as f, tableFeatures as p, useTable as m } from "@tanstack/react-table";
8
8
  import { assertTableDocument as h, deleteTableDocumentAxisGroup as g, expandTableDocumentRange as _, getTableDocumentAxisGroups as v, getTableDocumentCellRange as y, insertTableDocumentAxis as b, mergeTableDocumentCells as x, moveTableDocumentAxisGroup as S, splitTableDocumentCell as C, updateTableDocumentCell as w } from "@ryuzaki13/react-foundation-lib/table-document";
9
9
  import { uuidv4 as T } from "@ryuzaki13/react-foundation-lib/crypto";
@@ -18,7 +18,7 @@ var E = {
18
18
  structure: "tuhyZe"
19
19
  }, D = p({ cellSpanningFeature: f });
20
20
  function O(e) {
21
- let t = o(() => [...e.rows], [e]), n = o(() => e.columns.map((t, n) => ({
21
+ let t = l(() => [...e.rows], [e]), n = l(() => e.columns.map((t, n) => ({
22
22
  id: t.id,
23
23
  accessorFn: (t, r) => {
24
24
  let i = y(e, {
@@ -46,40 +46,40 @@ function O(e) {
46
46
  //#endregion
47
47
  //#region src/table-editor/ui/TableEditorGrid.tsx
48
48
  function k({ editor: e, extendSelection: t, disabled: n, renderCell: r, getCellText: i }) {
49
- let o = a(), c = s(/* @__PURE__ */ new Map()), f = O(e.document), { document: p, selection: m, focus: h } = e;
50
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("p", {
51
- id: o,
49
+ let l = c(), d = u(/* @__PURE__ */ new Map()), f = O(e.document), { document: p, selection: m, focus: h } = e;
50
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("p", {
51
+ id: l,
52
52
  className: E.help,
53
53
  children: "Стрелки — переход между ячейками. Shift + стрелки или Shift + щелчок — выделение диапазона. Содержимое выбранной ячейки редактируется под таблицей."
54
- }), /* @__PURE__ */ u("div", {
54
+ }), /* @__PURE__ */ o("div", {
55
55
  className: E.scroll,
56
- children: /* @__PURE__ */ d("table", {
56
+ children: /* @__PURE__ */ s("table", {
57
57
  role: "grid",
58
58
  "aria-label": p.caption || "Редактор таблицы",
59
- "aria-describedby": o,
59
+ "aria-describedby": l,
60
60
  "aria-multiselectable": "true",
61
61
  "aria-disabled": n || void 0,
62
62
  className: E.table,
63
- children: [/* @__PURE__ */ u("colgroup", { children: p.columns.map((e) => /* @__PURE__ */ u("col", { style: { width: e.width ?? 180 } }, e.id)) }), /* @__PURE__ */ u("tbody", { children: f.getRowModel().rows.map((a) => /* @__PURE__ */ u("tr", {
63
+ children: [/* @__PURE__ */ o("colgroup", { children: p.columns.map((e) => /* @__PURE__ */ o("col", { style: { width: e.width ?? 180 } }, e.id)) }), /* @__PURE__ */ o("tbody", { children: f.getRowModel().rows.map((a) => /* @__PURE__ */ o("tr", {
64
64
  "aria-rowindex": a.index + 1,
65
65
  "data-header": a.index < p.headerRowCount || void 0,
66
- children: a.getAllCells().map((o, s) => {
67
- if (o.getIsCovered()) return null;
68
- let l = a.index >= m.row && a.index < m.row + m.rowSpan && s >= m.column && s < m.column + m.columnSpan, f = {
66
+ children: a.getAllCells().map((c, l) => {
67
+ if (c.getIsCovered()) return null;
68
+ let u = a.index >= m.row && a.index < m.row + m.rowSpan && l >= m.column && l < m.column + m.columnSpan, f = {
69
69
  row: a.index,
70
- column: s
71
- }, g = a.original.cells[s], _ = a.index < p.headerRowCount ? "th" : "td";
72
- return /* @__PURE__ */ d(_, {
70
+ column: l
71
+ }, g = a.original.cells[l], _ = a.index < p.headerRowCount ? "th" : "td";
72
+ return /* @__PURE__ */ s(_, {
73
73
  role: a.index < p.headerRowCount ? "columnheader" : "gridcell",
74
74
  ref: (e) => {
75
- e ? c.current.set(g.id, e) : c.current.delete(g.id);
75
+ e ? d.current.set(g.id, e) : d.current.delete(g.id);
76
76
  },
77
- rowSpan: o.getRowSpan(),
78
- colSpan: o.getColSpan(),
79
- "aria-colindex": s + 1,
80
- "aria-label": `Строка ${a.index + 1}, столбец ${s + 1}: ${i(g) || "Пустая ячейка"}`,
81
- "aria-selected": l,
82
- tabIndex: !n && h.row === a.index && h.column === s ? 0 : -1,
77
+ rowSpan: c.getRowSpan(),
78
+ colSpan: c.getColSpan(),
79
+ "aria-colindex": l + 1,
80
+ "aria-label": `Строка ${a.index + 1}, столбец ${l + 1}: ${i(g) || "Пустая ячейка"}`,
81
+ "aria-selected": u,
82
+ tabIndex: !n && h.row === a.index && h.column === l ? 0 : -1,
83
83
  onClick: (r) => {
84
84
  n || e.select(f, t || r.shiftKey);
85
85
  },
@@ -93,19 +93,19 @@ function k({ editor: e, extendSelection: t, disabled: n, renderCell: r, getCellT
93
93
  case "ArrowRight":
94
94
  r = {
95
95
  ...f,
96
- column: s + o.getColSpan()
96
+ column: l + c.getColSpan()
97
97
  };
98
98
  break;
99
99
  case "ArrowLeft":
100
100
  r = {
101
101
  ...f,
102
- column: s - 1
102
+ column: l - 1
103
103
  };
104
104
  break;
105
105
  case "ArrowDown":
106
106
  r = {
107
107
  ...f,
108
- row: a.index + o.getRowSpan()
108
+ row: a.index + c.getRowSpan()
109
109
  };
110
110
  break;
111
111
  case "ArrowUp":
@@ -133,17 +133,17 @@ function k({ editor: e, extendSelection: t, disabled: n, renderCell: r, getCellT
133
133
  }
134
134
  if (t.preventDefault(), r.row < 0 || r.column < 0 || r.row >= p.rows.length || r.column >= p.columns.length) return;
135
135
  let i = y(p, r);
136
- e.select(r, t.shiftKey), c.current.get(p.rows[i.row].cells[i.column].id)?.focus();
136
+ e.select(r, t.shiftKey), d.current.get(p.rows[i.row].cells[i.column].id)?.focus();
137
137
  },
138
- children: [a.index < p.headerRowCount ? /* @__PURE__ */ u("span", {
138
+ children: [a.index < p.headerRowCount ? /* @__PURE__ */ o("span", {
139
139
  className: "visuallyHidden",
140
140
  children: i(g) || "Пустой заголовок"
141
- }) : null, /* @__PURE__ */ u("div", {
141
+ }) : null, /* @__PURE__ */ o("div", {
142
142
  inert: !0,
143
143
  className: E.cellContent,
144
144
  children: r(g)
145
145
  })]
146
- }, o.id);
146
+ }, c.id);
147
147
  })
148
148
  }, a.id)) })]
149
149
  })
@@ -152,45 +152,45 @@ function k({ editor: e, extendSelection: t, disabled: n, renderCell: r, getCellT
152
152
  //#endregion
153
153
  //#region src/table-editor/ui/TableEditorStructure.tsx
154
154
  function A({ editor: t, createEmptyValue: n, disabled: r }) {
155
- let [a, o] = c(null), { document: s, focus: f } = t, p = a ? v(s, a).find((e) => f[a] >= e.start && f[a] < e.start + e.count) : null;
156
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("details", {
155
+ let [c, l] = d(null), { document: u, focus: f } = t, p = c ? v(u, c).find((e) => f[c] >= e.start && f[c] < e.start + e.count) : null;
156
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s("details", {
157
157
  className: E.structure,
158
158
  children: [
159
- /* @__PURE__ */ u("summary", { children: "Строки и столбцы" }),
160
- ["row", "column"].map((i) => /* @__PURE__ */ d("div", {
159
+ /* @__PURE__ */ o("summary", { children: "Строки и столбцы" }),
160
+ ["row", "column"].map((i) => /* @__PURE__ */ s("div", {
161
161
  className: E.toolbar,
162
162
  role: "group",
163
163
  "aria-label": i === "row" ? "Строки" : "Столбцы",
164
164
  children: [
165
- /* @__PURE__ */ u("strong", { children: i === "row" ? "Строка" : "Столбец" }),
166
- [0, 1].map((a) => /* @__PURE__ */ d(e, {
165
+ /* @__PURE__ */ o("strong", { children: i === "row" ? "Строка" : "Столбец" }),
166
+ [0, 1].map((a) => /* @__PURE__ */ s(e, {
167
167
  disabled: r,
168
168
  onClick: () => {
169
- let e = Array.from({ length: i === "row" ? s.columns.length : s.rows.length }, () => ({
169
+ let e = Array.from({ length: i === "row" ? u.columns.length : u.rows.length }, () => ({
170
170
  id: T(),
171
171
  value: n()
172
172
  })), r = T();
173
- t.execute((t) => b(t, i, f[i] + a, r, e, f.row < s.headerRowCount ? "header" : "body"));
173
+ t.execute((t) => b(t, i, f[i] + a, r, e, f.row < u.headerRowCount ? "header" : "body"));
174
174
  },
175
175
  children: ["Вставить ", a ? "после" : "перед"]
176
176
  }, a)),
177
- [-1, 1].map((n) => /* @__PURE__ */ d(e, {
177
+ [-1, 1].map((n) => /* @__PURE__ */ s(e, {
178
178
  disabled: r,
179
179
  onClick: () => t.execute((e) => S(e, i, f[i], n)),
180
180
  children: ["Переместить ", i === "row" ? n === -1 ? "выше" : "ниже" : n === -1 ? "левее" : "правее"]
181
181
  }, n)),
182
- /* @__PURE__ */ d(e, {
182
+ /* @__PURE__ */ s(e, {
183
183
  tone: "error",
184
184
  disabled: r,
185
- onClick: () => o(i),
185
+ onClick: () => l(i),
186
186
  children: ["Удалить ", i === "row" ? "строку" : "столбец"]
187
187
  })
188
188
  ]
189
189
  }, i)),
190
- /* @__PURE__ */ u(e, {
190
+ /* @__PURE__ */ o(e, {
191
191
  disabled: r,
192
192
  onClick: () => {
193
- let e = s.columns.map(() => ({
193
+ let e = u.columns.map(() => ({
194
194
  id: T(),
195
195
  value: n()
196
196
  })), r = T();
@@ -199,21 +199,21 @@ function A({ editor: t, createEmptyValue: n, disabled: r }) {
199
199
  children: "Добавить строку заголовка"
200
200
  })
201
201
  ]
202
- }), /* @__PURE__ */ u(i, {
203
- open: !!a,
204
- onClose: () => o(null),
202
+ }), /* @__PURE__ */ o(i, {
203
+ open: !!c,
204
+ onClose: () => l(null),
205
205
  title: "Удалить часть таблицы?",
206
- description: `Будет удалено ${p?.count ?? 0} ${a === "row" ? "строк" : "столбцов"}, включая скрытое объединением содержимое. Объединённая группа удаляется целиком. До сохранения действие можно отменить.`,
207
- children: /* @__PURE__ */ d("div", {
206
+ description: `Будет удалено ${p?.count ?? 0} ${c === "row" ? "строк" : "столбцов"}, включая скрытое объединением содержимое. Объединённая группа удаляется целиком. До сохранения действие можно отменить.`,
207
+ children: /* @__PURE__ */ s("div", {
208
208
  className: E.toolbar,
209
- children: [/* @__PURE__ */ u(e, {
210
- onClick: () => o(null),
209
+ children: [/* @__PURE__ */ o(e, {
210
+ onClick: () => l(null),
211
211
  children: "Не удалять"
212
- }), /* @__PURE__ */ u(e, {
212
+ }), /* @__PURE__ */ o(e, {
213
213
  tone: "error",
214
214
  disabled: r,
215
215
  onClick: () => {
216
- a && t.execute((e) => g(e, a, f[a])), o(null);
216
+ c && t.execute((e) => g(e, c, f[c])), l(null);
217
217
  },
218
218
  children: "Удалить группу"
219
219
  })]
@@ -223,48 +223,48 @@ function A({ editor: t, createEmptyValue: n, disabled: r }) {
223
223
  //#endregion
224
224
  //#region src/table-editor/ui/TableEditorToolbar.tsx
225
225
  function j({ editor: t, disabled: n, extendSelection: i, onExtendSelectionChange: a }) {
226
- let { document: o, selection: s } = t, c = {
227
- row: s.row + s.rowSpan - 1,
228
- column: s.column + s.columnSpan - 1
229
- }, l = s.rowSpan * s.columnSpan === 1, f = s.row < o.headerRowCount && c.row >= o.headerRowCount, p = o.merges.find((e) => e.row === s.row && e.column === s.column && e.rowSpan === s.rowSpan && e.columnSpan === s.columnSpan);
230
- return /* @__PURE__ */ d("div", {
226
+ let { document: c, selection: l } = t, u = {
227
+ row: l.row + l.rowSpan - 1,
228
+ column: l.column + l.columnSpan - 1
229
+ }, d = l.rowSpan * l.columnSpan === 1, f = l.row < c.headerRowCount && u.row >= c.headerRowCount, p = c.merges.find((e) => e.row === l.row && e.column === l.column && e.rowSpan === l.rowSpan && e.columnSpan === l.columnSpan);
230
+ return /* @__PURE__ */ s("div", {
231
231
  className: E.toolbar,
232
232
  role: "group",
233
233
  "aria-label": "История и объединение",
234
234
  children: [
235
- /* @__PURE__ */ u(e, {
235
+ /* @__PURE__ */ o(e, {
236
236
  disabled: n || !t.canUndo,
237
237
  onClick: t.undo,
238
238
  children: "Отменить"
239
239
  }),
240
- /* @__PURE__ */ u(e, {
240
+ /* @__PURE__ */ o(e, {
241
241
  disabled: n || !t.canRedo,
242
242
  onClick: t.redo,
243
243
  children: "Повторить"
244
244
  }),
245
- /* @__PURE__ */ u(e, {
246
- disabled: n || l || f || !!p,
247
- onClick: () => t.execute((e) => x(e, s, c)),
245
+ /* @__PURE__ */ o(e, {
246
+ disabled: n || d || f || !!p,
247
+ onClick: () => t.execute((e) => x(e, l, u)),
248
248
  children: "Объединить ячейки"
249
249
  }),
250
- /* @__PURE__ */ u(e, {
250
+ /* @__PURE__ */ o(e, {
251
251
  disabled: n || !p,
252
- onClick: () => t.execute((e) => C(e, s)),
252
+ onClick: () => t.execute((e) => C(e, l)),
253
253
  children: "Разъединить ячейки"
254
254
  }),
255
- /* @__PURE__ */ u(r, {
255
+ /* @__PURE__ */ o(r, {
256
256
  label: "Выделять диапазон",
257
257
  value: i,
258
258
  disabled: n,
259
259
  onChange: a
260
260
  }),
261
- /* @__PURE__ */ d("span", {
261
+ /* @__PURE__ */ s("span", {
262
262
  role: "status",
263
263
  children: [
264
264
  "Выделение: ",
265
- s.rowSpan,
265
+ l.rowSpan,
266
266
  " × ",
267
- s.columnSpan,
267
+ l.columnSpan,
268
268
  ". Шаг ",
269
269
  t.historyPosition,
270
270
  " из ",
@@ -272,93 +272,93 @@ function j({ editor: t, disabled: n, extendSelection: i, onExtendSelectionChange
272
272
  "."
273
273
  ]
274
274
  }),
275
- f ? /* @__PURE__ */ u("p", { children: "Заголовок и основную часть нельзя объединить в одну ячейку." }) : null
275
+ f ? /* @__PURE__ */ o("p", { children: "Заголовок и основную часть нельзя объединить в одну ячейку." }) : null
276
276
  ]
277
277
  });
278
278
  }
279
279
  //#endregion
280
280
  //#region src/table-editor/ui/TableEditor.tsx
281
- function M({ editor: e, renderCell: i, getCellText: a, renderValueEditor: o, createEmptyValue: s, disabled: l = !1 }) {
282
- let [f, p] = c(!1), { document: m, focus: h } = e, g = m.rows[h.row].cells[h.column];
283
- return /* @__PURE__ */ d("section", {
281
+ function M({ editor: e, renderCell: i, getCellText: a, renderValueEditor: c, createEmptyValue: l, disabled: u = !1 }) {
282
+ let [f, p] = d(!1), { document: m, focus: h } = e, g = m.rows[h.row].cells[h.column];
283
+ return /* @__PURE__ */ s("section", {
284
284
  className: E.editor,
285
285
  "aria-label": "Конструктор таблицы",
286
286
  children: [
287
- /* @__PURE__ */ u(t, {
287
+ /* @__PURE__ */ o(t, {
288
288
  label: "Название таблицы",
289
289
  value: m.caption,
290
- disabled: l,
290
+ disabled: u,
291
291
  onChange: (t) => e.change({
292
292
  ...m,
293
293
  caption: t ?? ""
294
294
  })
295
295
  }),
296
- /* @__PURE__ */ u(j, {
296
+ /* @__PURE__ */ o(j, {
297
297
  editor: e,
298
- disabled: l,
298
+ disabled: u,
299
299
  extendSelection: f,
300
300
  onExtendSelectionChange: p
301
301
  }),
302
- e.error ? /* @__PURE__ */ u("p", {
302
+ e.error ? /* @__PURE__ */ o("p", {
303
303
  role: "alert",
304
304
  children: e.error
305
305
  }) : null,
306
- /* @__PURE__ */ u(k, {
306
+ /* @__PURE__ */ o(k, {
307
307
  editor: e,
308
- disabled: l,
308
+ disabled: u,
309
309
  renderCell: i,
310
310
  getCellText: a,
311
311
  extendSelection: f
312
312
  }),
313
- /* @__PURE__ */ d("div", {
313
+ /* @__PURE__ */ s("div", {
314
314
  className: E.inspector,
315
315
  children: [
316
- /* @__PURE__ */ d("strong", { children: [
316
+ /* @__PURE__ */ s("strong", { children: [
317
317
  "Ячейка: строка ",
318
318
  h.row + 1,
319
319
  ", столбец ",
320
320
  h.column + 1
321
321
  ] }),
322
- o({
322
+ c({
323
323
  cell: g,
324
- disabled: l,
324
+ disabled: u,
325
325
  onChange: (t) => e.change(w(m, h, t))
326
326
  }),
327
- e.selection.rowSpan * e.selection.columnSpan > 1 ? /* @__PURE__ */ u("p", { children: "При объединении показывается верхняя левая ячейка. Остальное содержимое сохранится и снова появится после разъединения." }) : null
327
+ e.selection.rowSpan * e.selection.columnSpan > 1 ? /* @__PURE__ */ o("p", { children: "При объединении показывается верхняя левая ячейка. Остальное содержимое сохранится и снова появится после разъединения." }) : null
328
328
  ]
329
329
  }),
330
- /* @__PURE__ */ u(A, {
330
+ /* @__PURE__ */ o(A, {
331
331
  editor: e,
332
- disabled: l,
333
- createEmptyValue: s
332
+ disabled: u,
333
+ createEmptyValue: l
334
334
  }),
335
- /* @__PURE__ */ d("div", {
335
+ /* @__PURE__ */ s("div", {
336
336
  className: E.toolbar,
337
337
  children: [
338
- /* @__PURE__ */ u(r, {
338
+ /* @__PURE__ */ o(r, {
339
339
  label: "Скрыть заголовки при публикации",
340
340
  value: m.hideHeaders,
341
- disabled: l,
341
+ disabled: u,
342
342
  onChange: (t) => e.change({
343
343
  ...m,
344
344
  hideHeaders: t
345
345
  })
346
346
  }),
347
- /* @__PURE__ */ u(r, {
347
+ /* @__PURE__ */ o(r, {
348
348
  label: "Показывать номера строк",
349
349
  value: m.showRowNumbers,
350
- disabled: l,
350
+ disabled: u,
351
351
  onChange: (t) => e.change({
352
352
  ...m,
353
353
  showRowNumbers: t
354
354
  })
355
355
  }),
356
- /* @__PURE__ */ u(n, {
356
+ /* @__PURE__ */ o(n, {
357
357
  label: "Ширина выбранного столбца, px",
358
358
  value: m.columns[h.column].width ?? void 0,
359
359
  min: 40,
360
360
  max: 1600,
361
- disabled: l,
361
+ disabled: u,
362
362
  onChange: (t) => {
363
363
  t !== void 0 && (t < 40 || t > 1600) || e.change({
364
364
  ...m,
@@ -377,7 +377,7 @@ function M({ editor: e, renderCell: i, getCellText: a, renderValueEditor: o, cre
377
377
  //#endregion
378
378
  //#region src/table-editor/model/useTableEditor.ts
379
379
  function N(e) {
380
- let [t, n] = c(() => (h(e), {
380
+ let [t, n] = d(() => (h(e), {
381
381
  documents: [e],
382
382
  index: 0,
383
383
  anchor: {
@@ -1,6 +1,6 @@
1
- import { n as e } from "../chunks/context-menu-DgvXGCuI.js";
2
- import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { BrushCleaningIcon as i, SortAscIcon as a, SortDescIcon as o } from "lucide-react";
1
+ import { n as e } from "../chunks/context-menu-BQePxRpu.js";
2
+ import { BrushCleaningIcon as t, SortAscIcon as n, SortDescIcon as r } from "lucide-react";
3
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
4
  //#region src/table-sorting/TableSortingControls.tsx
5
5
  var s = {
6
6
  asc: "По возрастанию",
@@ -8,10 +8,10 @@ var s = {
8
8
  clear: "Сбросить"
9
9
  };
10
10
  function c({ direction: e, order: t, className: i }) {
11
- return e ? /* @__PURE__ */ r("span", {
11
+ return e ? /* @__PURE__ */ o("span", {
12
12
  className: i,
13
13
  "aria-hidden": !0,
14
- children: [n(e === "desc" ? o : a, {}), typeof t == "number" ? /* @__PURE__ */ n("span", {
14
+ children: [a(e === "desc" ? r : n, {}), typeof t == "number" ? /* @__PURE__ */ a("span", {
15
15
  className: "fontSizeXs",
16
16
  children: t
17
17
  }) : null]
@@ -22,20 +22,20 @@ function l({ onSelect: c, labels: l }) {
22
22
  ...s,
23
23
  ...l
24
24
  };
25
- return /* @__PURE__ */ r(t, { children: [
26
- /* @__PURE__ */ n(e.GroupLabel, { children: "Сортировка" }),
27
- /* @__PURE__ */ n(e.Item, {
28
- icon: /* @__PURE__ */ n(a, {}),
25
+ return /* @__PURE__ */ o(i, { children: [
26
+ /* @__PURE__ */ a(e.GroupLabel, { children: "Сортировка" }),
27
+ /* @__PURE__ */ a(e.Item, {
28
+ icon: /* @__PURE__ */ a(n, {}),
29
29
  onSelect: () => c("asc"),
30
30
  children: u.asc
31
31
  }),
32
- /* @__PURE__ */ n(e.Item, {
33
- icon: /* @__PURE__ */ n(o, {}),
32
+ /* @__PURE__ */ a(e.Item, {
33
+ icon: /* @__PURE__ */ a(r, {}),
34
34
  onSelect: () => c("desc"),
35
35
  children: u.desc
36
36
  }),
37
- /* @__PURE__ */ n(e.Item, {
38
- icon: /* @__PURE__ */ n(i, {}),
37
+ /* @__PURE__ */ a(e.Item, {
38
+ icon: /* @__PURE__ */ a(t, {}),
39
39
  onSelect: () => c("clear"),
40
40
  children: u.clear
41
41
  })