@reportportal/ui-kit 0.0.1-alpha.238 → 0.0.1-alpha.239

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 (37) hide show
  1. package/dist/autocompletes.js +890 -75
  2. package/dist/calendarArrow-44c7e60e.js +5 -0
  3. package/dist/components/icons/index.d.ts +1 -0
  4. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +2 -1
  5. package/dist/components/pagination/pagination.d.ts +2 -1
  6. package/dist/components/table/types.d.ts +1 -0
  7. package/dist/constants-85822a6b.js +6 -0
  8. package/dist/datePicker-09dd025d.js +229 -0
  9. package/dist/datePicker.js +23 -62
  10. package/dist/{fieldNumber-c9795245.js → fieldNumber-b4aa4d7e.js} +23 -22
  11. package/dist/fieldNumber.js +3 -2
  12. package/dist/fieldText-4a8e5496.js +167 -0
  13. package/dist/fieldText.js +4 -65
  14. package/dist/icons.js +35 -31
  15. package/dist/index.js +182 -176
  16. package/dist/minus-2857540f.js +5 -0
  17. package/dist/modal.js +166 -18
  18. package/dist/openedEye-8fa4c67d.js +6 -0
  19. package/dist/pagination-535d600a.js +370 -0
  20. package/dist/pagination.js +11 -64
  21. package/dist/plus-199fb2a8.js +5 -0
  22. package/dist/prevPage-87faf576.js +6 -0
  23. package/dist/radio.js +3 -3
  24. package/dist/radioGroup-0c132c2e.js +77 -0
  25. package/dist/sortable.js +319 -40
  26. package/dist/style.css +2 -2
  27. package/dist/table-e0fd9727.js +1157 -0
  28. package/dist/table.js +1 -1
  29. package/package.json +1 -1
  30. package/dist/index-7ddba309.js +0 -1639
  31. package/dist/index-a13c9a87.js +0 -172
  32. package/dist/plus-0929dda4.js +0 -6
  33. package/dist/prevPage-1c4a826f.js +0 -9
  34. package/dist/radio-62546efa.js +0 -76
  35. package/dist/radioGroup-183d7a6f.js +0 -6
  36. package/dist/table-4d35951e.js +0 -1150
  37. package/dist/treeSortableItem-301dbd92.js +0 -298
@@ -1,298 +0,0 @@
1
- import { jsx as P, jsxs as G } from "react/jsx-runtime";
2
- import { c as k } from "./bind-06a7ff84.js";
3
- import { isFunction as z } from "es-toolkit";
4
- import { createContext as ie, useContext as se, useState as Y, useRef as W, useCallback as B } from "react";
5
- import { u as ae, D as M, g as ne, a as pe } from "./useTreeSortable-bc631689.js";
6
- import { useDragLayer as le } from "react-dnd";
7
- import "react-dnd-html5-backend";
8
- import { DROP_DETECTION_MODE as Z, SORTABLE_ORIENTATION as J, DROP_POSITIONS as w, DROP_ACTIONS as n, TREE_DROP_POSITIONS as b } from "./common.js";
9
- import { createPortal as ee } from "react-dom";
10
- import { u as de } from "./useOnClickOutside-8f7d68a1.js";
11
- const me = {
12
- "sortable-item": "_sortable-item_1l4xp_16",
13
- "sortable-item--horizontal": "_sortable-item--horizontal_1l4xp_22",
14
- "sortable-item--drop-target-top": "_sortable-item--drop-target-top_1l4xp_25",
15
- "sortable-item--drop-target-bottom": "_sortable-item--drop-target-bottom_1l4xp_38",
16
- "sortable-item--hover-mode": "_sortable-item--hover-mode_1l4xp_51",
17
- "sortable-item--drop-target-left": "_sortable-item--drop-target-left_1l4xp_67",
18
- "sortable-item--drop-target-right": "_sortable-item--drop-target-right_1l4xp_77",
19
- "drag-handle": "_drag-handle_1l4xp_88",
20
- "drag-handle--disabled": "_drag-handle--disabled_1l4xp_95"
21
- }, ce = k.bind(me), Ce = ({
22
- id: u,
23
- index: g,
24
- type: S = M,
25
- isDisabled: h = !1,
26
- className: s,
27
- draggingClassName: m,
28
- dropTargetClassName: o,
29
- onDrop: c,
30
- hideDefaultPreview: _ = !1,
31
- dropDetectionMode: e = Z.INDEX_BASED,
32
- orientation: p = J.VERTICAL,
33
- isLast: A = !1,
34
- children: O
35
- }) => {
36
- const { isDragging: E, dropPosition: a, dragRef: T, dropRef: R, previewRef: I } = ae({
37
- id: u,
38
- index: g,
39
- type: S,
40
- isDisabled: h,
41
- onDrop: c,
42
- hideDefaultPreview: _,
43
- dropDetectionMode: e,
44
- orientation: p,
45
- isLast: A
46
- }), v = z(O), t = e === Z.HOVER, f = p === J.HORIZONTAL, l = ce("sortable-item", s, {
47
- "sortable-item--horizontal": f,
48
- "sortable-item--dragging": E,
49
- "sortable-item--hover-mode": t,
50
- "sortable-item--drop-target-top": a === w.TOP,
51
- "sortable-item--drop-target-bottom": a === w.BOTTOM,
52
- "sortable-item--drop-target-left": a === w.LEFT,
53
- "sortable-item--drop-target-right": a === w.RIGHT,
54
- [m || ""]: E && m,
55
- [o || ""]: a && o
56
- });
57
- return /* @__PURE__ */ P("div", { ref: (r) => {
58
- R(r), _ || I(r), v || T(r);
59
- }, className: l, children: v ? O({
60
- isDragging: E,
61
- isOver: a !== null,
62
- dragRef: T
63
- }) : O });
64
- }, _e = {
65
- "drag-layer": "_drag-layer_1izcx_1",
66
- "drag-preview": "_drag-preview_1izcx_11"
67
- }, K = k.bind(_e), Ne = ({
68
- type: u,
69
- renderPreview: g,
70
- className: S,
71
- previewClassName: h,
72
- portalTarget: s = document.body
73
- }) => {
74
- const { itemType: m, isDragging: o, item: c, clientOffset: _ } = le(
75
- (p) => ({
76
- item: p.getItem(),
77
- itemType: p.getItemType(),
78
- clientOffset: p.getClientOffset(),
79
- isDragging: p.isDragging()
80
- })
81
- );
82
- if (!o || m !== u || !c || !s)
83
- return null;
84
- const e = /* @__PURE__ */ P("div", { className: K("drag-layer", S), children: /* @__PURE__ */ P("div", { className: K("drag-preview", h), style: ne(_), children: g(c) }) });
85
- return ee(e, s);
86
- }, te = ie(null), fe = () => se(te), be = {
87
- "drop-confirmation-popover": "_drop-confirmation-popover_ie1p0_16",
88
- "drop-confirmation-popover--before": "_drop-confirmation-popover--before_ie1p0_31",
89
- "drop-confirmation-popover--after": "_drop-confirmation-popover--after_ie1p0_35",
90
- "drop-confirmation-popover--inside": "_drop-confirmation-popover--inside_ie1p0_40",
91
- "drop-confirmation-popover__button": "_drop-confirmation-popover__button_ie1p0_68",
92
- "drop-confirmation-popover__divider": "_drop-confirmation-popover__divider_ie1p0_84"
93
- }, L = k.bind(be), Q = 2, ge = {
94
- [n.MOVE]: "Move",
95
- [n.DUPLICATE]: "Duplicate",
96
- [n.CANCEL]: "Cancel"
97
- }, De = ({
98
- children: u,
99
- showDropConfirmation: g = !1,
100
- confirmationLabels: S,
101
- portalTarget: h,
102
- onMove: s,
103
- onDuplicate: m,
104
- onMoveExternal: o,
105
- onDuplicateExternal: c,
106
- onCancel: _
107
- }) => {
108
- const [e, p] = Y(null), [A, O] = Y(
109
- null
110
- ), E = W(null), a = { ...ge, ...S }, T = B(() => {
111
- p(null), O(null);
112
- }, []), R = B(
113
- (f, l, d, r) => {
114
- if (!g) {
115
- const N = f.isExternal ? o : s;
116
- N == null || N(f, l, d);
117
- return;
118
- }
119
- const i = r.getBoundingClientRect(), F = i.left + i.width / 2;
120
- let C;
121
- d === b.BEFORE ? C = i.top + Q : d === b.AFTER ? C = i.top + i.height + Q : C = i.top, O({
122
- top: C,
123
- left: F
124
- }), p({ draggedItem: f, targetId: l, position: d });
125
- },
126
- [g, s, o]
127
- ), I = B(
128
- (f) => {
129
- if (!e) {
130
- T();
131
- return;
132
- }
133
- const { draggedItem: l, targetId: d, position: r } = e, i = l.isExternal === !0;
134
- switch (f) {
135
- case n.MOVE:
136
- i ? o == null || o(l, d, r) : s == null || s(l, d, r);
137
- break;
138
- case n.DUPLICATE:
139
- i ? c == null || c(l, d, r) : m == null || m(l, d, r);
140
- break;
141
- case n.CANCEL:
142
- _ == null || _();
143
- break;
144
- }
145
- T();
146
- },
147
- [
148
- e,
149
- s,
150
- m,
151
- o,
152
- c,
153
- _,
154
- T
155
- ]
156
- );
157
- de(
158
- E,
159
- e && g ? () => I(n.CANCEL) : void 0
160
- );
161
- const v = {
162
- showDropConfirmation: g,
163
- pendingDraggedItemId: (e == null ? void 0 : e.draggedItem.id) ?? null,
164
- pendingTargetId: (e == null ? void 0 : e.targetId) ?? null,
165
- pendingDropPosition: (e == null ? void 0 : e.position) ?? null,
166
- requestDrop: R
167
- }, t = h ?? (typeof document < "u" ? document.body : null);
168
- return /* @__PURE__ */ G(te.Provider, { value: v, children: [
169
- u,
170
- e && A && t && ee(
171
- /* @__PURE__ */ G(
172
- "div",
173
- {
174
- ref: E,
175
- className: L("drop-confirmation-popover", {
176
- "drop-confirmation-popover--before": e.position === b.BEFORE,
177
- "drop-confirmation-popover--after": e.position === b.AFTER,
178
- "drop-confirmation-popover--inside": e.position === b.INSIDE
179
- }),
180
- style: {
181
- top: A.top,
182
- left: A.left
183
- },
184
- children: [
185
- /* @__PURE__ */ P(
186
- "button",
187
- {
188
- type: "button",
189
- className: L("drop-confirmation-popover__button"),
190
- onClick: () => I(n.MOVE),
191
- children: a[n.MOVE]
192
- }
193
- ),
194
- /* @__PURE__ */ P(
195
- "button",
196
- {
197
- type: "button",
198
- className: L("drop-confirmation-popover__button"),
199
- onClick: () => I(n.DUPLICATE),
200
- children: a[n.DUPLICATE]
201
- }
202
- ),
203
- /* @__PURE__ */ P("div", { className: L("drop-confirmation-popover__divider") }),
204
- /* @__PURE__ */ P(
205
- "button",
206
- {
207
- type: "button",
208
- className: L("drop-confirmation-popover__button"),
209
- onClick: () => I(n.CANCEL),
210
- children: a[n.CANCEL]
211
- }
212
- )
213
- ]
214
- }
215
- ),
216
- t
217
- )
218
- ] });
219
- }, ue = {
220
- "tree-sortable-item": "_tree-sortable-item_xdaea_16",
221
- "tree-sortable-item--dragging": "_tree-sortable-item--dragging_xdaea_20",
222
- "tree-sortable-item--pending": "_tree-sortable-item--pending_xdaea_23",
223
- "tree-sortable-item--drop-before": "_tree-sortable-item--drop-before_xdaea_29",
224
- "tree-sortable-item--drop-after": "_tree-sortable-item--drop-after_xdaea_40",
225
- "tree-sortable-item--drop-inside": "_tree-sortable-item--drop-inside_xdaea_51"
226
- }, Oe = k.bind(ue), Le = ({
227
- id: u,
228
- index: g,
229
- parentId: S,
230
- type: h = M,
231
- isDisabled: s = !1,
232
- acceptDrop: m = !0,
233
- isLast: o = !1,
234
- canDropOn: c,
235
- acceptExternalDrop: _ = !1,
236
- externalDropType: e,
237
- className: p,
238
- style: A,
239
- draggingClassName: O,
240
- dropBeforeClassName: E,
241
- dropInsideClassName: a,
242
- dropAfterClassName: T,
243
- onDrop: R,
244
- hideDefaultPreview: I = !1,
245
- children: v
246
- }) => {
247
- const t = fe(), f = W(null), l = B(
248
- (y, j, q) => {
249
- t != null && t.showDropConfirmation && f.current ? t.requestDrop(y, j, q, f.current) : R == null || R(y, j, q);
250
- },
251
- [t, R]
252
- ), { isDragging: d, isOver: r, dropPosition: i, dragRef: F, dropRef: C, previewRef: N } = pe({
253
- id: u,
254
- index: g,
255
- parentId: S,
256
- type: h,
257
- isDisabled: s,
258
- acceptDrop: m,
259
- isLast: o,
260
- canDropOn: c,
261
- acceptExternalDrop: _,
262
- externalDropType: e,
263
- onDrop: l,
264
- hideDefaultPreview: I
265
- }), U = (t == null ? void 0 : t.pendingDraggedItemId) === u, V = d || U, D = (t == null ? void 0 : t.pendingTargetId) === u, x = t == null ? void 0 : t.pendingDropPosition, $ = r && i === b.BEFORE || D && x === b.BEFORE, H = r && i === b.INSIDE || D && x === b.INSIDE, X = o && (r && i === b.AFTER || D && x === b.AFTER), re = z(v) ? v({
266
- isDragging: V,
267
- isOver: r || D,
268
- dropPosition: D ? x ?? null : i,
269
- dragRef: F
270
- }) : v, oe = Oe("tree-sortable-item", p, {
271
- "tree-sortable-item--dragging": V,
272
- "tree-sortable-item--pending": U,
273
- "tree-sortable-item--drop-before": $,
274
- "tree-sortable-item--drop-inside": H,
275
- "tree-sortable-item--drop-after": X,
276
- [O || ""]: V && O,
277
- [E || ""]: $ && E,
278
- [a || ""]: H && a,
279
- [T || ""]: X && T
280
- });
281
- return /* @__PURE__ */ P(
282
- "div",
283
- {
284
- ref: (y) => {
285
- f.current = y, C(y), z(v) || (F(y), N(y));
286
- },
287
- className: oe,
288
- style: A,
289
- children: re
290
- }
291
- );
292
- };
293
- export {
294
- Ne as D,
295
- Ce as S,
296
- Le as T,
297
- De as a
298
- };