@epam/ai-dial-ui-kit 0.16.0-dev.45 → 0.16.0-dev.46

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 (213) hide show
  1. package/README.md +7 -10
  2. package/dist/CHANGELOG.md +4 -1
  3. package/dist/DateCellRenderer-Bx79kGGv.cjs +63 -0
  4. package/dist/MarkdownEditor-BtLY7OVq.cjs +1 -0
  5. package/dist/components-manifest.json +518 -3034
  6. package/dist/constants/public-class-names.js +0 -7
  7. package/dist/dial-ui-kit.cjs +3 -3
  8. package/dist/dial-ui-kit.js +373 -456
  9. package/dist/editors.cjs +1 -1
  10. package/dist/editors.js +4 -10
  11. package/dist/grid.cjs +1 -1
  12. package/dist/grid.js +23 -31
  13. package/dist/{merge-classes-B0SnCG4i.cjs → icon-D93YIwGJ.cjs} +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/migration-guides/0.16.0/legacy-file-manager-removal.md +5 -3
  16. package/dist/migration-guides/0.16.0/unused-legacy-components-removal.md +128 -0
  17. package/dist/migration-guides/README.md +1 -0
  18. package/dist/node_modules/react-dnd/dist/internals/registration.js +5 -13
  19. package/dist/src/components/New/MarkdownEditor/lazy.d.ts +8 -2
  20. package/dist/src/components/New/SegmentedControl/SegmentedControl.d.ts +2 -2
  21. package/dist/src/constants/public-class-names.d.ts +0 -7
  22. package/dist/src/index.d.ts +2 -53
  23. package/dist/src/subpaths/editors.d.ts +9 -15
  24. package/dist/src/subpaths/grid.d.ts +2 -8
  25. package/dist/src/types/editor.d.ts +0 -6
  26. package/dist/src/utils/grid-registration.d.ts +6 -8
  27. package/package.json +1 -12
  28. package/dist/DateCellRenderer-DrDOIpWg.cjs +0 -63
  29. package/dist/IconButton-CsePS6PY.cjs +0 -1
  30. package/dist/JsonEditor-DQhHSm93.cjs +0 -1
  31. package/dist/MarkdownEditor-CvIPIbPq.cjs +0 -1
  32. package/dist/MarkdownEditor-TR6X_gdl.cjs +0 -1
  33. package/dist/MarkdownEditorContainer-JIn_VNUX.cjs +0 -1
  34. package/dist/Switch-HEL_aq23.cjs +0 -1
  35. package/dist/assets/icons/file/c.svg.js +0 -5
  36. package/dist/assets/icons/file/cpp.svg.js +0 -5
  37. package/dist/assets/icons/file/cs.svg.js +0 -5
  38. package/dist/assets/icons/file/ini.svg.js +0 -5
  39. package/dist/assets/icons/file/json.svg.js +0 -5
  40. package/dist/assets/icons/file/md.svg.js +0 -5
  41. package/dist/assets/icons/file/py.svg.js +0 -5
  42. package/dist/assets/icons/open-popup.svg.js +0 -5
  43. package/dist/components/AutocompleteInput/AutocompleteInputValue.js +0 -21
  44. package/dist/components/ButtonDropdown/ButtonDropdown.js +0 -33
  45. package/dist/components/ButtonDropdown/constants.js +0 -8
  46. package/dist/components/Checkbox/Checkbox.js +0 -64
  47. package/dist/components/Checkbox/constants.js +0 -4
  48. package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +0 -84
  49. package/dist/components/ConfirmationPopup/ConfirmationPopup.js +0 -75
  50. package/dist/components/ConfirmationPopup/constants.js +0 -32
  51. package/dist/components/DraggableItem/DraggableItem.js +0 -61
  52. package/dist/components/DraggableItem/constants.js +0 -6
  53. package/dist/components/DropdownIcon/DropdownIcon.js +0 -103
  54. package/dist/components/FileIcon/FileIcon.js +0 -37
  55. package/dist/components/FileIcon/constants.js +0 -60
  56. package/dist/components/FileName/FileName.js +0 -68
  57. package/dist/components/FolderName/FolderName.js +0 -57
  58. package/dist/components/FormItem/FormItem.js +0 -90
  59. package/dist/components/FormItem/constants.js +0 -9
  60. package/dist/components/FormPopup/FormPopup.js +0 -59
  61. package/dist/components/FormPopup/constants.js +0 -6
  62. package/dist/components/Grid/Grid.js +0 -333
  63. package/dist/components/Grid/constants.js +0 -33
  64. package/dist/components/Grid/renderers/DateCellRenderer.js +0 -27
  65. package/dist/components/Grid/renderers/constants.js +0 -25
  66. package/dist/components/InputPopup/InputPopup.js +0 -174
  67. package/dist/components/JsonEditor/JsonEditor.js +0 -65
  68. package/dist/components/JsonEditor/lazy.js +0 -4
  69. package/dist/components/MarkdownEditor/MarkdownEditor.js +0 -39
  70. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +0 -82
  71. package/dist/components/MarkdownEditor/lazy.js +0 -4
  72. package/dist/components/Notification/Notification.js +0 -67
  73. package/dist/components/Notification/constants.js +0 -24
  74. package/dist/components/NumberInput/NumberInput.js +0 -41
  75. package/dist/components/Pagination/Pagination.js +0 -80
  76. package/dist/components/Pagination/utils.js +0 -10
  77. package/dist/components/PasswordInput/Icons/HideIcon.js +0 -16
  78. package/dist/components/PasswordInput/Icons/ShowIcon.js +0 -16
  79. package/dist/components/PasswordInput/PasswordInput.js +0 -21
  80. package/dist/components/Popup/Popup.js +0 -110
  81. package/dist/components/Popup/constants.js +0 -12
  82. package/dist/components/RadioButton/RadioButton.js +0 -103
  83. package/dist/components/RadioGroup/RadioGroup.js +0 -92
  84. package/dist/components/RadioGroup/constants.js +0 -10
  85. package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +0 -101
  86. package/dist/components/ResizableContainer/ConditionalResizableContainer.js +0 -6
  87. package/dist/components/ResizableContainer/ResizableContainer.js +0 -79
  88. package/dist/components/ResizableContainer/components/ResizeHandle.js +0 -20
  89. package/dist/components/ResizableContainer/components/ResizeIcon.js +0 -11
  90. package/dist/components/SchemaRenderer/SchemaRenderer.js +0 -151
  91. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +0 -56
  92. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +0 -74
  93. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +0 -118
  94. package/dist/components/SchemaRenderer/components/SchemaField.js +0 -78
  95. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +0 -114
  96. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +0 -272
  97. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +0 -36
  98. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +0 -192
  99. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +0 -161
  100. package/dist/components/SchemaRenderer/components/SchemaSection.js +0 -81
  101. package/dist/components/SchemaRenderer/context.js +0 -12
  102. package/dist/components/Search/Search.js +0 -63
  103. package/dist/components/Search/constants.js +0 -27
  104. package/dist/components/SegmentedControl/SegmentedControl.js +0 -87
  105. package/dist/components/SegmentedControl/constants.js +0 -8
  106. package/dist/components/Select/MultiSelectTags.js +0 -23
  107. package/dist/components/Select/Select.js +0 -435
  108. package/dist/components/Select/SelectSubMenuItem.js +0 -90
  109. package/dist/components/Select/constants.js +0 -15
  110. package/dist/components/SelectField/SelectField.js +0 -66
  111. package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +0 -34
  112. package/dist/components/Slider/Slider.js +0 -158
  113. package/dist/components/Switch/Switch.js +0 -70
  114. package/dist/components/TagInput/TagInput.js +0 -179
  115. package/dist/components/Textarea/Textarea.js +0 -43
  116. package/dist/constants/editor.js +0 -52
  117. package/dist/icon-CrGVkVpG.cjs +0 -1
  118. package/dist/icon-DhjrDQ8I.cjs +0 -1
  119. package/dist/lazy-kq-xfXXv.cjs +0 -1
  120. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +0 -25
  121. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +0 -21
  122. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +0 -20
  123. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +0 -19
  124. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +0 -22
  125. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +0 -15
  126. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +0 -13
  127. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +0 -23
  128. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +0 -88
  129. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +0 -87
  130. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +0 -34
  131. package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +0 -24
  132. package/dist/src/components/ButtonDropdown/constants.d.ts +0 -2
  133. package/dist/src/components/Checkbox/Checkbox.d.ts +0 -36
  134. package/dist/src/components/Checkbox/constants.d.ts +0 -1
  135. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +0 -46
  136. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +0 -55
  137. package/dist/src/components/ConfirmationPopup/constants.d.ts +0 -18
  138. package/dist/src/components/DraggableItem/DraggableItem.d.ts +0 -33
  139. package/dist/src/components/DraggableItem/constants.d.ts +0 -3
  140. package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +0 -38
  141. package/dist/src/components/FileIcon/FileIcon.d.ts +0 -33
  142. package/dist/src/components/FileIcon/constants.d.ts +0 -9
  143. package/dist/src/components/FileName/FileName.d.ts +0 -49
  144. package/dist/src/components/FolderName/FolderName.d.ts +0 -37
  145. package/dist/src/components/FormItem/FormItem.d.ts +0 -66
  146. package/dist/src/components/FormItem/constants.d.ts +0 -3
  147. package/dist/src/components/FormPopup/FormPopup.d.ts +0 -46
  148. package/dist/src/components/FormPopup/constants.d.ts +0 -3
  149. package/dist/src/components/Grid/Grid.d.ts +0 -120
  150. package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +0 -1
  151. package/dist/src/components/Grid/constants.d.ts +0 -28
  152. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +0 -34
  153. package/dist/src/components/Grid/renderers/constants.d.ts +0 -7
  154. package/dist/src/components/Grid/renderers/utils.d.ts +0 -1
  155. package/dist/src/components/InputPopup/InputPopup.d.ts +0 -61
  156. package/dist/src/components/JsonEditor/JsonEditor.d.ts +0 -25
  157. package/dist/src/components/JsonEditor/lazy.d.ts +0 -14
  158. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +0 -38
  159. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +0 -51
  160. package/dist/src/components/MarkdownEditor/lazy.d.ts +0 -7
  161. package/dist/src/components/Notification/Notification.d.ts +0 -58
  162. package/dist/src/components/Notification/constants.d.ts +0 -8
  163. package/dist/src/components/NumberInput/NumberInput.d.ts +0 -34
  164. package/dist/src/components/Pagination/Pagination.d.ts +0 -11
  165. package/dist/src/components/Pagination/utils.d.ts +0 -9
  166. package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +0 -16
  167. package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +0 -16
  168. package/dist/src/components/PasswordInput/PasswordInput.d.ts +0 -26
  169. package/dist/src/components/Popup/Popup.d.ts +0 -64
  170. package/dist/src/components/Popup/constants.d.ts +0 -5
  171. package/dist/src/components/RadioButton/RadioButton.d.ts +0 -54
  172. package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -66
  173. package/dist/src/components/RadioGroup/constants.d.ts +0 -5
  174. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +0 -74
  175. package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +0 -35
  176. package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +0 -72
  177. package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +0 -10
  178. package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +0 -8
  179. package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +0 -30
  180. package/dist/src/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.d.ts +0 -20
  181. package/dist/src/components/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +0 -31
  182. package/dist/src/components/SchemaRenderer/components/SchemaArrayEditor.d.ts +0 -31
  183. package/dist/src/components/SchemaRenderer/components/SchemaField.d.ts +0 -29
  184. package/dist/src/components/SchemaRenderer/components/SchemaFieldContent.d.ts +0 -25
  185. package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +0 -33
  186. package/dist/src/components/SchemaRenderer/components/SchemaObjectEditor.d.ts +0 -31
  187. package/dist/src/components/SchemaRenderer/components/SchemaOneOfEditor.d.ts +0 -31
  188. package/dist/src/components/SchemaRenderer/components/SchemaPrimitiveField.d.ts +0 -31
  189. package/dist/src/components/SchemaRenderer/components/SchemaSection.d.ts +0 -33
  190. package/dist/src/components/SchemaRenderer/context.d.ts +0 -19
  191. package/dist/src/components/SchemaRenderer/types.d.ts +0 -62
  192. package/dist/src/components/SchemaRenderer/utils.d.ts +0 -1
  193. package/dist/src/components/Search/Search.d.ts +0 -35
  194. package/dist/src/components/Search/constants.d.ts +0 -8
  195. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +0 -40
  196. package/dist/src/components/SegmentedControl/constants.d.ts +0 -5
  197. package/dist/src/components/Select/MultiSelectTags.d.ts +0 -8
  198. package/dist/src/components/Select/Select.d.ts +0 -100
  199. package/dist/src/components/Select/SelectSubMenuItem.d.ts +0 -8
  200. package/dist/src/components/Select/constants.d.ts +0 -9
  201. package/dist/src/components/SelectField/SelectField.d.ts +0 -42
  202. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +0 -31
  203. package/dist/src/components/Slider/Slider.d.ts +0 -57
  204. package/dist/src/components/Switch/Switch.d.ts +0 -34
  205. package/dist/src/components/TagInput/TagInput.d.ts +0 -52
  206. package/dist/src/components/Textarea/Textarea.d.ts +0 -39
  207. package/dist/src/constants/editor.d.ts +0 -2
  208. package/dist/src/constants/storybook/form-item.d.ts +0 -3
  209. package/dist/src/models/segmented-control.d.ts +0 -7
  210. package/dist/src/types/form-item.d.ts +0 -31
  211. package/dist/src/types/select.d.ts +0 -8
  212. package/dist/types/form-item.js +0 -4
  213. package/dist/types/select.js +0 -5
@@ -1,333 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { themeBalham as Ne, colorSchemeLight as ge } from "../../node_modules/ag-grid-community/dist/package/main.esm.js";
3
- import { AgGridReact as be } from "../../node_modules/ag-grid-react/dist/package/index.esm.js";
4
- import Q from "classnames";
5
- import { useState as ye, useId as Ee, useRef as Y, useMemo as h, useCallback as l, useEffect as E } from "react";
6
- import { DialDropdown as R } from "../Dropdown/Dropdown.js";
7
- import { DialEllipsisTooltip as De } from "../EllipsisTooltip/EllipsisTooltip.js";
8
- import { RADIO_BUTTON_COL_DEF as Ae, CHECKBOX_COL_DEF as Te } from "./renderers/constants.js";
9
- import { DialNoDataContent as Ge } from "../NoDataContent/NoDataContent.js";
10
- import { DialRadioButton as ve } from "../RadioButton/RadioButton.js";
11
- import { GridSelectionMode as z } from "../../models/selection-mode.js";
12
- import { DropdownTrigger as w } from "../../types/dropdown.js";
13
- import { IconZoomCancel as Oe } from "@tabler/icons-react";
14
- import { GRID_THEME_COLORS as x, SelectionEventSourceType as p, checkboxClass as I, ROW_HEIGHT as ee, gridBaseClassName as ze } from "./constants.js";
15
- import { ariaDescription as re } from "../Checkbox/constants.js";
16
- import { useIsMobileScreen as xe } from "../../hooks/use-is-mobile-screen.js";
17
- import { useIsTabletScreen as _e } from "../../hooks/use-is-tablet-screen.js";
18
- import { debounceFn as ke } from "../../utils/debounce.js";
19
- import { registerAgGridModulesOnce as He } from "../../utils/grid-registration.js";
20
- import { baseColumnComparator as Le, omitUndefined as Fe } from "../../utils/grid-comparators.js";
21
- const or = ({
22
- columnDefs: D,
23
- rowData: f,
24
- additionalGridOptions: _,
25
- getContextMenuItems: C,
26
- className: te,
27
- ariaLabel: oe = "Data grid",
28
- wrapCustomCellRenderers: m = !0,
29
- disabledRowIds: c,
30
- selectedRowIds: n,
31
- onSelectionChange: k,
32
- onGridApiChange: ne,
33
- getRowId: i = (t) => String(t.id ?? JSON.stringify(t)),
34
- alternateOddRowColors: H = !1,
35
- filterPlaceholder: L = "Enter value",
36
- emptyStateIcon: F,
37
- emptyStateTitle: W = "No results found",
38
- emptyStateDescription: B = "Sorry, we couldn't find any results for your search.",
39
- loading: P = !1,
40
- wrapperBorder: $ = !0,
41
- withoutHeaderBorders: ie = !1,
42
- allowDisabledContextMenu: N = !1,
43
- selectionMode: d
44
- }) => {
45
- He();
46
- const [t, se] = ye(), ae = Ee(), g = xe(), b = _e(), A = Y(/* @__PURE__ */ new Set()), U = Y(
47
- void 0
48
- ), le = h(
49
- () => ({
50
- ...x,
51
- oddRowBackgroundColor: H ? x.oddRowBackgroundColor : x.backgroundColor,
52
- wrapperBorder: $
53
- }),
54
- [H, $]
55
- ), ce = l((e) => {
56
- e.api.sizeColumnsToFit();
57
- }, []), T = l(
58
- (e) => {
59
- if (e.data) {
60
- const r = i(e.data), o = c?.has(r) ?? !1, u = o && !N, a = e.value == null ? "" : String(e.value), v = C?.(e.data) ?? [];
61
- return /* @__PURE__ */ s(
62
- R,
63
- {
64
- trigger: [w.ContextMenu],
65
- items: v,
66
- anchorToMouse: !0,
67
- matchReferenceWidth: !0,
68
- className: "w-full",
69
- disabled: u,
70
- children: /* @__PURE__ */ s("span", { className: "block min-w-0 h-full max-w-full", children: /* @__PURE__ */ s(
71
- De,
72
- {
73
- text: a,
74
- className: "max-w-full h-full",
75
- hideTooltip: o
76
- }
77
- ) })
78
- }
79
- );
80
- }
81
- },
82
- [C, c, i, N]
83
- ), y = l(
84
- (e) => e === p.API || e === p.ROW_DATA_CHANGED,
85
- []
86
- ), j = l(
87
- (e) => {
88
- if (!t)
89
- return;
90
- const o = (e.selectedNodes || []).map((a) => a.data), u = new Set(o.map(i));
91
- A.current = u, U.current = e.source, y(e.source) || k?.(u, o);
92
- },
93
- [t, i, y, k]
94
- ), ue = h(() => ke(
95
- (e) => j?.(e),
96
- 100
97
- ), [j]), q = l(
98
- (e) => {
99
- if (!e.data) return null;
100
- const r = i(e.data), o = e.node.isSelected(), u = c?.has(r), a = `row-select-${r}`;
101
- return /* @__PURE__ */ s("div", { className: "size-6 flex items-center justify-center", children: /* @__PURE__ */ s(
102
- ve,
103
- {
104
- className: "size-[18px]",
105
- inputId: a,
106
- checked: o,
107
- disabled: u,
108
- name: "gridradiobutton",
109
- value: "selected",
110
- onChange: () => {
111
- u || (e.node.setSelected(
112
- !0,
113
- !0,
114
- p.CHECKBOX_SELECTED
115
- ), e.api.refreshCells({ columns: [e.column?.getColId()] }));
116
- }
117
- }
118
- ) });
119
- },
120
- [i, c]
121
- ), S = l(() => {
122
- const e = "dial-row-select", r = "dial-row-select-visible";
123
- return g || b || n && n.size > 0 ? `${e} ${r}` : !n || n.size === 0 ? e : `${e} ${r}`;
124
- }, [g, b, n]), K = l(() => g || b ? S() : !n || n.size === 0 ? "dial-row-not-select-header" : S(), [S, g, b, n]), fe = h(() => {
125
- if (d === z.SINGLE)
126
- return {
127
- ...Ae,
128
- cellRenderer: q
129
- };
130
- if (d === z.MULTIPLE)
131
- return {
132
- ...Te,
133
- headerClass: () => K(),
134
- cellClass: (e) => {
135
- const r = e.data ? i(e.data) : null;
136
- let o = S();
137
- return r && c?.has(r) && (o += " opacity-50 pointer-events-none"), o;
138
- }
139
- };
140
- }, [
141
- d,
142
- q,
143
- K,
144
- i,
145
- S,
146
- c
147
- ]), X = l(
148
- (e) => {
149
- const r = typeof m == "function" ? m(e) : !!m;
150
- if (!e.cellRenderer)
151
- return { ...e, cellRenderer: T };
152
- if (!r)
153
- return e;
154
- const o = e.cellRenderer;
155
- return { ...e, cellRenderer: (a) => {
156
- const v = a.data ? C?.(a.data) ?? [] : [];
157
- let O = null;
158
- typeof o == "function" ? O = /* @__PURE__ */ s(o, { ...a }) : O = T(a);
159
- const V = a.data ? i(a.data) : null, Z = V ? c?.has(V) : !1;
160
- return /* @__PURE__ */ s(
161
- R,
162
- {
163
- trigger: [w.ContextMenu],
164
- items: v,
165
- anchorToMouse: !0,
166
- matchReferenceWidth: !0,
167
- className: Q(
168
- "size-full",
169
- Z && "!cursor-not-allowed opacity-75"
170
- ),
171
- disabled: Z && !N,
172
- children: /* @__PURE__ */ s("span", { className: "block min-w-0 max-w-full flex-1", children: O })
173
- }
174
- );
175
- } };
176
- },
177
- [
178
- c,
179
- C,
180
- i,
181
- T,
182
- m,
183
- N
184
- ]
185
- ), J = h(
186
- () => m ? (D ?? []).map(X) : D ?? [],
187
- // eslint-disable-next-line react-hooks/exhaustive-deps
188
- [
189
- D,
190
- m,
191
- // eslint-disable-next-line react-hooks/exhaustive-deps
192
- m ? X : null
193
- ]
194
- ), { defaultColDef: M, ...me } = _ ?? {}, de = h(
195
- () => ({
196
- minWidth: 150,
197
- resizable: !0,
198
- sortable: !0,
199
- floatingFilter: !0,
200
- filter: "agTextColumnFilter",
201
- filterParams: {
202
- filterPlaceholder: L,
203
- buttons: ["reset"]
204
- },
205
- comparator: Le,
206
- ...Fe(M)
207
- }),
208
- [L, M]
209
- ), he = (e) => {
210
- const r = document.querySelector(I);
211
- r && r.setAttribute("aria-description", re);
212
- const o = J.map((u) => ({
213
- ...u,
214
- sort: void 0
215
- }));
216
- e.api.updateGridOptions({ columnDefs: o, rowData: f }), e.api.sizeColumnsToFit(), se(e.api), _?.onGridReady?.(e), ne?.(e.api);
217
- };
218
- E(() => {
219
- t && f && t.setGridOption("rowData", f);
220
- }, [t, f]);
221
- const pe = l(
222
- () => /* @__PURE__ */ s(
223
- Ge,
224
- {
225
- title: W,
226
- description: B,
227
- containerClassName: "gap-3",
228
- titleClassName: "mt-2 !text-lg",
229
- icon: F || /* @__PURE__ */ s(
230
- Oe,
231
- {
232
- size: 100,
233
- stroke: 0.5,
234
- className: "text-secondary"
235
- }
236
- )
237
- }
238
- ),
239
- [W, B, F]
240
- ), Se = h(() => {
241
- if (d)
242
- return {
243
- mode: d === z.SINGLE ? "singleRow" : "multiRow",
244
- isRowSelectable: (e) => {
245
- const r = e.data ? i(e.data) : null;
246
- return r ? !c?.has(r) : !0;
247
- }
248
- };
249
- }, [c, i, d]);
250
- E(() => {
251
- t && f && A.current.size && A.current.forEach((e) => {
252
- const r = t.getRowNode(e);
253
- r && !r.isSelected() && r.setSelected(!0, !1, p.API);
254
- });
255
- }, [t, f]), E(() => {
256
- t && n && (t.deselectAll("all", p.API), n.forEach((e) => {
257
- const r = t.getRowNode(e);
258
- r && !r.isSelected() && r.setSelected(!0, !1, p.API);
259
- }));
260
- }, [t, n]);
261
- const Ce = l(
262
- (e) => e.data ? i(e.data) : "",
263
- [i]
264
- ), G = l(() => {
265
- document.querySelectorAll(`.ag-row ${I}`).forEach((e) => {
266
- e.setAttribute("aria-description", re);
267
- });
268
- }, []);
269
- return E(() => {
270
- const e = y(
271
- U.current
272
- );
273
- if (t && n?.size && e) {
274
- const r = Array.from(n)[0];
275
- if (r) {
276
- const o = t.getRowNode(r);
277
- o && t.ensureNodeVisible(o);
278
- }
279
- }
280
- }, [t, y, n]), /* @__PURE__ */ s(
281
- "div",
282
- {
283
- className: Q(
284
- ze,
285
- te,
286
- d && "with-selection-column",
287
- ie && "dial-without-header-borders"
288
- ),
289
- "aria-label": oe,
290
- role: "region",
291
- "aria-busy": P,
292
- children: /* @__PURE__ */ s(
293
- "div",
294
- {
295
- className: "h-full overflow-x-auto",
296
- role: "table",
297
- "aria-describedby": ae,
298
- children: /* @__PURE__ */ s(
299
- be,
300
- {
301
- rowModelType: "clientSide",
302
- headerHeight: ee,
303
- rowHeight: ee,
304
- cellSelection: !1,
305
- theme: Ne.withPart(ge).withParams({ ...le }),
306
- autoSizeStrategy: { type: "fitGridWidth" },
307
- columnDefs: J,
308
- defaultColDef: de,
309
- selectionColumnDef: fe,
310
- onGridSizeChanged: ce,
311
- onGridReady: he,
312
- loading: P,
313
- suppressCellFocus: !0,
314
- suppressDragLeaveHidesColumns: !0,
315
- noRowsOverlayComponent: pe,
316
- rowData: f,
317
- rowSelection: Se,
318
- onSelectionChanged: ue,
319
- getRowId: Ce,
320
- onRowDataUpdated: G,
321
- onBodyScroll: G,
322
- onFirstDataRendered: G,
323
- ...me
324
- }
325
- )
326
- }
327
- )
328
- }
329
- );
330
- };
331
- export {
332
- or as DialGrid
333
- };
@@ -1,33 +0,0 @@
1
- const o = "h-full w-full", e = ".ag-checkbox-input", t = {
2
- accentColor: "var(--bg-control-accent, var(--bg-accent-primary, #3664E2))",
3
- backgroundColor: "var(--bg-layer-raised, var(--bg-layer-3, #1D2439))",
4
- oddRowBackgroundColor: "var(--bg-layer-sunken, var(--bg-layer-2, #161B2D))",
5
- // The row tint has to stay translucent: the row it paints carries body text
6
- // and a checkbox filled with `accentColor`, so an opaque accent hides both.
7
- // `--bg-accent-primary-alpha` is the tint every other 1.0 control hovers
8
- // with; the controls' `*-alpha-active` token this used to read is the
9
- // pressed-state fill, which themes do define opaque.
10
- selectedRowBackgroundColor: "var(--bg-accent-primary-alpha, #7DA4FF26)",
11
- borderColor: "var(--bg-layer-4, #242C42)",
12
- rowBorder: "1px solid var(--stroke-tertiary, var(--stroke-primary, #696E7C))",
13
- rowHoverColor: "var(--bg-accent-primary-alpha, #7DA4FF26)",
14
- borderRadius: 3,
15
- browserColorScheme: "dark",
16
- chromeBackgroundColor: "var(--bg-layer-1, #0C101D)",
17
- foregroundColor: "var(--text-primary, #EEF1F7)",
18
- headerFontSize: 14,
19
- headerFontWeight: 600,
20
- headerTextColor: "var(--text-secondary, #9FA6BD)",
21
- spacing: 4,
22
- wrapperBorderRadius: 3,
23
- fontSize: 14,
24
- fontFamily: "var(--theme-font, var(--font-inter))"
25
- }, c = 40;
26
- var a = /* @__PURE__ */ ((r) => (r.API = "api", r.ROW_DATA_CHANGED = "rowDataChanged", r.CHECKBOX_SELECTED = "checkboxSelected", r))(a || {});
27
- export {
28
- t as GRID_THEME_COLORS,
29
- c as ROW_HEIGHT,
30
- a as SelectionEventSourceType,
31
- e as checkboxClass,
32
- o as gridBaseClassName
33
- };
@@ -1,27 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import f from "classnames";
3
- import { useMemo as c } from "react";
4
- import { DialEllipsisTooltip as T } from "../../EllipsisTooltip/EllipsisTooltip.js";
5
- import { DEFAULT_LOCALE as d, DEFAULT_DATE_FORMAT_OPTIONS as p, dateCellBaseClassName as D } from "./constants.js";
6
- import { convertToDate as A } from "../../../utils/grid-date.js";
7
- const _ = ({
8
- value: s,
9
- locale: r = d,
10
- options: o = p,
11
- emptyPlaceholder: m,
12
- className: n,
13
- hideTooltip: l = !1
14
- }) => {
15
- const t = A(s), a = c(() => t ? new Intl.DateTimeFormat(r, o).format(t) : m, [t, m, r, o]), i = t ? t.toISOString() : void 0;
16
- return /* @__PURE__ */ e(
17
- T,
18
- {
19
- text: i ? /* @__PURE__ */ e("time", { dateTime: i, children: a }) : /* @__PURE__ */ e("span", { children: a }),
20
- className: f(D, n),
21
- hideTooltip: l
22
- }
23
- );
24
- };
25
- export {
26
- _ as DialDateCellRenderer
27
- };
@@ -1,25 +0,0 @@
1
- const n = "en-US", e = {
2
- year: "numeric",
3
- month: "numeric",
4
- day: "2-digit",
5
- hour: "2-digit",
6
- minute: "2-digit",
7
- second: "2-digit"
8
- }, c = "text-primary", t = 40, i = {
9
- minWidth: t,
10
- width: t,
11
- maxWidth: t
12
- }, o = {
13
- cellClass: "ag-grid-no-checkbox",
14
- ...i
15
- }, s = {
16
- ...i
17
- };
18
- export {
19
- s as CHECKBOX_COL_DEF,
20
- e as DEFAULT_DATE_FORMAT_OPTIONS,
21
- n as DEFAULT_LOCALE,
22
- o as RADIO_BUTTON_COL_DEF,
23
- i as SELECTION_COL_DEF,
24
- c as dateCellBaseClassName
25
- };
@@ -1,174 +0,0 @@
1
- import { jsxs as e, Fragment as m, jsx as i } from "react/jsx-runtime";
2
- import { createPortal as A } from "react-dom";
3
- import c from "classnames";
4
- import { useCallback as M } from "react";
5
- import { DialTooltip as P } from "../Tooltip/Tooltip.js";
6
- import { DialErrorText as N } from "../CaptionText/CaptionText.js";
7
- import { DialAutocompleteInputValue as _ } from "../AutocompleteInput/AutocompleteInputValue.js";
8
- import d from "../../assets/icons/open-popup.svg.js";
9
- import { DialIcon as r } from "../Icon/Icon.js";
10
- import { BASE_ICON_SIZE as a } from "../../constants/icon.js";
11
- const U = ({
12
- children: S,
13
- open: k,
14
- disabled: l = !1,
15
- selectedValue: t,
16
- valueClassName: u,
17
- inputClassName: f,
18
- onOpen: h,
19
- elementId: x,
20
- errorText: s,
21
- invalid: g,
22
- emptyValueText: w,
23
- placeholder: o,
24
- editable: I = !1,
25
- onValueChange: y,
26
- collapseTagOverflow: j = !1,
27
- iconBefore: n
28
- }) => {
29
- const b = Array.isArray(t) && t.length > 0, C = typeof t == "string" && !!t.trim(), p = b || C ? t : o ? void 0 : w, v = l ? void 0 : h, D = M(
30
- (E) => {
31
- y?.(E.target.value);
32
- },
33
- [y]
34
- );
35
- return /* @__PURE__ */ e(m, { children: [
36
- b ? /* @__PURE__ */ i("div", { className: "w-full", onClick: v, children: /* @__PURE__ */ e(
37
- "div",
38
- {
39
- className: c(
40
- "dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",
41
- l && "dial-input-disable"
42
- ),
43
- children: [
44
- /* @__PURE__ */ e("div", { className: "flex flex-row items-center gap-x-2 flex-1 min-w-0", children: [
45
- n && /* @__PURE__ */ i(r, { icon: n }),
46
- /* @__PURE__ */ i(
47
- _,
48
- {
49
- placeholder: o,
50
- selectedItems: p,
51
- collapseTagOverflow: j
52
- }
53
- )
54
- ] }),
55
- !l && /* @__PURE__ */ i("div", { className: "ml-1", children: /* @__PURE__ */ i(
56
- r,
57
- {
58
- icon: /* @__PURE__ */ i(
59
- d,
60
- {
61
- role: "img",
62
- width: a,
63
- height: a
64
- }
65
- )
66
- }
67
- ) })
68
- ]
69
- }
70
- ) }) : I ? /* @__PURE__ */ e(m, { children: [
71
- /* @__PURE__ */ e(
72
- "div",
73
- {
74
- className: c(
75
- "dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",
76
- f,
77
- l && "dial-input-disable",
78
- (s || g) && "dial-input-error"
79
- ),
80
- children: [
81
- /* @__PURE__ */ e("div", { className: "flex flex-row items-center gap-x-2 flex-1 min-w-0", children: [
82
- n && /* @__PURE__ */ i(r, { icon: n }),
83
- /* @__PURE__ */ i(
84
- "input",
85
- {
86
- type: "text",
87
- className: c(
88
- "flex-1 min-w-0 bg-transparent outline-hidden border-none p-0 dial-small-text text-primary placeholder:text-secondary",
89
- u
90
- ),
91
- value: typeof t == "string" ? t : "",
92
- placeholder: o || w,
93
- onChange: D,
94
- disabled: l,
95
- id: x,
96
- "aria-label": "input-popup-field"
97
- }
98
- )
99
- ] }),
100
- !l && /* @__PURE__ */ i(
101
- "button",
102
- {
103
- type: "button",
104
- className: "shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",
105
- onClick: h,
106
- "aria-label": "open-popup",
107
- children: /* @__PURE__ */ i(
108
- r,
109
- {
110
- icon: /* @__PURE__ */ i(
111
- d,
112
- {
113
- role: "img",
114
- width: a,
115
- height: a
116
- }
117
- )
118
- }
119
- )
120
- }
121
- )
122
- ]
123
- }
124
- ),
125
- /* @__PURE__ */ i(N, { text: s })
126
- ] }) : /* @__PURE__ */ e(m, { children: [
127
- /* @__PURE__ */ i(
128
- "button",
129
- {
130
- type: "button",
131
- className: "w-full",
132
- onClick: v,
133
- "aria-label": "open-popup",
134
- id: x,
135
- children: /* @__PURE__ */ e(
136
- "div",
137
- {
138
- className: c(
139
- "dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",
140
- f,
141
- l && "dial-input-disable",
142
- (s || g) && "dial-input-error"
143
- ),
144
- children: [
145
- /* @__PURE__ */ e("div", { className: "flex flex-row items-center gap-x-2 flex-1 min-w-0", children: [
146
- n && /* @__PURE__ */ i(r, { icon: n }),
147
- /* @__PURE__ */ i(P, { tooltip: p == null ? void 0 : String(p), children: p || !o ? /* @__PURE__ */ i("span", { className: u, children: p }) : /* @__PURE__ */ i("span", { className: "text-secondary", children: o }) })
148
- ] }),
149
- !l && /* @__PURE__ */ i("div", { className: "shrink-0", children: /* @__PURE__ */ i(
150
- r,
151
- {
152
- icon: /* @__PURE__ */ i(
153
- d,
154
- {
155
- role: "img",
156
- width: a,
157
- height: a
158
- }
159
- )
160
- }
161
- ) })
162
- ]
163
- }
164
- )
165
- }
166
- ),
167
- /* @__PURE__ */ i(N, { text: s })
168
- ] }),
169
- k && A(S, document.body)
170
- ] });
171
- };
172
- export {
173
- U as DialInputPopup
174
- };
@@ -1,65 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { EDITOR_THEMES_CONFIG as c } from "../../constants/editor.js";
3
- import * as m from "@monaco-editor/react";
4
- const p = ({
5
- value: o,
6
- onChange: a,
7
- onValidateJSON: r,
8
- options: i,
9
- currentTheme: e,
10
- themesConfig: s = c
11
- }) => {
12
- function n(t) {
13
- t?.editor?.defineTheme(
14
- e,
15
- s[e]
16
- ), t.languages.json.jsonDefaults.setDiagnosticsOptions({
17
- validate: !0,
18
- enableSchemaRequest: !1,
19
- schemas: [
20
- {
21
- uri: "http://custom-schema/object-required.json",
22
- fileMatch: ["*"],
23
- schema: {
24
- type: "object",
25
- description: "Top-level value must be an object",
26
- additionalProperties: !0
27
- }
28
- }
29
- ]
30
- });
31
- }
32
- const { Editor: l } = m;
33
- return /* @__PURE__ */ u(
34
- l,
35
- {
36
- beforeMount: n,
37
- height: "100%",
38
- defaultLanguage: "json",
39
- value: o,
40
- onChange: a,
41
- theme: e,
42
- onValidate: r,
43
- options: {
44
- minimap: { enabled: !1 },
45
- formatOnType: !0,
46
- formatOnPaste: !0,
47
- selectOnLineNumbers: !1,
48
- automaticLayout: !0,
49
- scrollBeyondLastLine: !1,
50
- wordWrap: "on",
51
- smoothScrolling: !0,
52
- overviewRulerLanes: 0,
53
- scrollbar: {
54
- horizontal: "hidden",
55
- verticalScrollbarSize: 4,
56
- verticalSliderSize: 4
57
- },
58
- ...i ?? {}
59
- }
60
- }
61
- );
62
- };
63
- export {
64
- p as DialJsonEditor
65
- };
@@ -1,4 +0,0 @@
1
- const o = () => import("./JsonEditor.js");
2
- export {
3
- o as LazyDialJsonEditor
4
- };