@tesouro/embedded-components-react 0.5.203 → 0.5.204
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.
- package/dist/index.css +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/lib/ProductsWidget.d.ts +4 -0
- package/dist/lib/ProductsWidget.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index10.js +136 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index4.js +5 -30
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index5.js +9 -19
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index6.js +22 -54
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index7.js +14 -40
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +57 -118
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index9.js +72 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +97 -93
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +35 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +79 -70
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useMeasureUnits.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js +109 -107
- package/package.json +1 -1
|
@@ -21,117 +21,126 @@ var _ = {
|
|
|
21
21
|
name: "",
|
|
22
22
|
description: ""
|
|
23
23
|
};
|
|
24
|
-
function v({ open: v, onClose: y,
|
|
25
|
-
let
|
|
24
|
+
function v({ open: v, onClose: y, suspended: b = !1, managerLabels: x, deleteLabels: S, messageLabels: C }) {
|
|
25
|
+
let w = f(() => ({
|
|
26
26
|
...t,
|
|
27
|
-
...
|
|
28
|
-
}), [
|
|
27
|
+
...C
|
|
28
|
+
}), [C]), T = o({ enabled: v && !b }), E = c(), D = l(), O = u(), [k, A] = p(""), [j, M] = p(_), [N, P] = p(), [F, I] = p(), [L, R] = p(_), [z, B] = p(), [V, H] = p(), [U, W] = p(v);
|
|
29
|
+
v !== U && (W(v), v || H(void 0));
|
|
30
|
+
let G = f(() => (T.data?.data ?? []).map((e) => ({
|
|
29
31
|
id: e.id,
|
|
30
32
|
name: e.name,
|
|
31
33
|
description: e.description ?? ""
|
|
32
|
-
})), [
|
|
33
|
-
let e =
|
|
34
|
-
return e ?
|
|
35
|
-
}, [
|
|
34
|
+
})), [T.data]), K = f(() => {
|
|
35
|
+
let e = k.trim().toLowerCase();
|
|
36
|
+
return e ? G.filter((t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e)) : G;
|
|
37
|
+
}, [G, k]), q = s(V?.id, { enabled: v && !b }), J = f(() => (q.data?.data ?? []).map((e) => ({
|
|
36
38
|
id: e.id,
|
|
37
39
|
name: e.name,
|
|
38
40
|
priceLabel: n(e.price)
|
|
39
|
-
})), [
|
|
40
|
-
|
|
41
|
+
})), [q.data]), Y = d(async () => {
|
|
42
|
+
if (b) return;
|
|
43
|
+
let t = r(j, w);
|
|
41
44
|
if (t) {
|
|
42
|
-
|
|
45
|
+
P(t);
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
P(void 0);
|
|
46
49
|
try {
|
|
47
|
-
await
|
|
48
|
-
name:
|
|
49
|
-
description:
|
|
50
|
-
} }),
|
|
50
|
+
await E.mutateAsync({ body: {
|
|
51
|
+
name: j.name.trim(),
|
|
52
|
+
description: j.description.trim() || void 0
|
|
53
|
+
} }), M(_);
|
|
51
54
|
} catch (t) {
|
|
52
|
-
|
|
55
|
+
P(e(t) ?? w.createMeasureUnitError);
|
|
53
56
|
}
|
|
54
57
|
}, [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
b,
|
|
59
|
+
j,
|
|
60
|
+
E,
|
|
61
|
+
w
|
|
62
|
+
]), X = d((e) => {
|
|
63
|
+
I(e.id), R({
|
|
60
64
|
name: e.name,
|
|
61
65
|
description: e.description
|
|
62
|
-
}),
|
|
63
|
-
}, []),
|
|
64
|
-
if (!
|
|
65
|
-
let t = r(
|
|
66
|
+
}), B(void 0);
|
|
67
|
+
}, []), Z = d(async () => {
|
|
68
|
+
if (b || !F) return;
|
|
69
|
+
let t = r(L, w);
|
|
66
70
|
if (t) {
|
|
67
|
-
|
|
71
|
+
B(t);
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
70
|
-
|
|
74
|
+
B(void 0);
|
|
71
75
|
try {
|
|
72
|
-
await
|
|
73
|
-
path: { unit_id:
|
|
76
|
+
await D.mutateAsync({
|
|
77
|
+
path: { unit_id: F },
|
|
74
78
|
body: {
|
|
75
|
-
name:
|
|
76
|
-
description:
|
|
79
|
+
name: L.name.trim(),
|
|
80
|
+
description: L.description.trim() || void 0
|
|
77
81
|
}
|
|
78
|
-
}),
|
|
82
|
+
}), I(void 0);
|
|
79
83
|
} catch (t) {
|
|
80
|
-
|
|
84
|
+
B(e(t) ?? w.updateMeasureUnitError);
|
|
81
85
|
}
|
|
82
86
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
b,
|
|
88
|
+
F,
|
|
89
|
+
L,
|
|
90
|
+
D,
|
|
91
|
+
w
|
|
92
|
+
]), Q = d(async () => {
|
|
93
|
+
if (!b && V) try {
|
|
94
|
+
await O.mutateAsync({ path: { unit_id: V.id } }), H(void 0);
|
|
90
95
|
} catch {}
|
|
91
|
-
}, [
|
|
96
|
+
}, [
|
|
97
|
+
b,
|
|
98
|
+
V,
|
|
99
|
+
O
|
|
100
|
+
]);
|
|
92
101
|
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(i, {
|
|
93
102
|
open: v,
|
|
94
103
|
onOpenChange: (e) => {
|
|
95
104
|
e || y();
|
|
96
105
|
},
|
|
97
|
-
units:
|
|
98
|
-
isLoading:
|
|
99
|
-
searchValue:
|
|
100
|
-
onSearchChange:
|
|
101
|
-
createValues:
|
|
102
|
-
createError:
|
|
103
|
-
onCreateChange: (e) =>
|
|
106
|
+
units: K,
|
|
107
|
+
isLoading: T.isLoading,
|
|
108
|
+
searchValue: k,
|
|
109
|
+
onSearchChange: A,
|
|
110
|
+
createValues: j,
|
|
111
|
+
createError: N,
|
|
112
|
+
onCreateChange: (e) => M((t) => ({
|
|
104
113
|
...t,
|
|
105
114
|
...e
|
|
106
115
|
})),
|
|
107
|
-
onCreateSubmit:
|
|
108
|
-
isCreating:
|
|
109
|
-
editingUnitId:
|
|
110
|
-
editValues:
|
|
111
|
-
editError:
|
|
112
|
-
onEditStart:
|
|
113
|
-
onEditChange: (e) =>
|
|
116
|
+
onCreateSubmit: Y,
|
|
117
|
+
isCreating: E.isPending || b,
|
|
118
|
+
editingUnitId: F,
|
|
119
|
+
editValues: L,
|
|
120
|
+
editError: z,
|
|
121
|
+
onEditStart: X,
|
|
122
|
+
onEditChange: (e) => R((t) => ({
|
|
114
123
|
...t,
|
|
115
124
|
...e
|
|
116
125
|
})),
|
|
117
|
-
onEditSubmit:
|
|
118
|
-
onEditCancel: () =>
|
|
119
|
-
isUpdating:
|
|
120
|
-
onDeleteClick:
|
|
126
|
+
onEditSubmit: Z,
|
|
127
|
+
onEditCancel: () => I(void 0),
|
|
128
|
+
isUpdating: D.isPending || b,
|
|
129
|
+
onDeleteClick: H,
|
|
121
130
|
onDone: y,
|
|
122
|
-
labels:
|
|
131
|
+
labels: x
|
|
123
132
|
}), /* @__PURE__ */ h(a, {
|
|
124
|
-
open: !!
|
|
133
|
+
open: !!V,
|
|
125
134
|
onOpenChange: (e) => {
|
|
126
|
-
e ||
|
|
135
|
+
e || H(void 0);
|
|
127
136
|
},
|
|
128
|
-
unitName:
|
|
129
|
-
affectedProducts:
|
|
130
|
-
isLoadingProducts:
|
|
131
|
-
isDeleting:
|
|
132
|
-
onConfirm:
|
|
133
|
-
onCancel: () =>
|
|
134
|
-
labels:
|
|
137
|
+
unitName: V?.name ?? "",
|
|
138
|
+
affectedProducts: J,
|
|
139
|
+
isLoadingProducts: q.isLoading,
|
|
140
|
+
isDeleting: O.isPending || b,
|
|
141
|
+
onConfirm: Q,
|
|
142
|
+
onCancel: () => H(void 0),
|
|
143
|
+
labels: S
|
|
135
144
|
})] });
|
|
136
145
|
}
|
|
137
146
|
//#endregion
|
|
@@ -7,11 +7,11 @@ import { useMeasureUnitsQuery as n } from "../../../data-access/dist/index9.js";
|
|
|
7
7
|
import "../../../data-access/dist/index.js";
|
|
8
8
|
import { useMemo as r } from "react";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useMeasureUnits.js
|
|
10
|
-
function i() {
|
|
11
|
-
let
|
|
10
|
+
function i({ enabled: i = !0 } = {}) {
|
|
11
|
+
let a = n({ enabled: i });
|
|
12
12
|
return {
|
|
13
|
-
unitNamesById: r(() => e(
|
|
14
|
-
unitOptions: r(() => t(
|
|
13
|
+
unitNamesById: r(() => e(a.data?.data), [a.data]),
|
|
14
|
+
unitOptions: r(() => t(a.data?.data), [a.data])
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js
CHANGED
|
@@ -1,169 +1,171 @@
|
|
|
1
|
-
import { Button as e,
|
|
2
|
-
import { MEASURE_UNITS_MANAGER_LABELS_EN as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { CheckIcon as
|
|
1
|
+
import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Input as a, InputGroup as o, InputGroupInput as s, Sheet as c, SheetContent as l, SheetDescription as u, SheetFooter as d, SheetHeader as f, SheetTitle as p, Table as m, TableBody as h, TableCell as g, TableHead as _, TableHeader as v, TableRow as y } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { MEASURE_UNITS_MANAGER_LABELS_EN as b } from "./index2.js";
|
|
3
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon as C, MoreVerticalIcon as w, PencilIcon as T, PlusIcon as E, Trash2Icon as D, XIcon as O } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
6
|
+
var k = "—";
|
|
7
|
+
function A({ open: A, onOpenChange: j, units: M, isLoading: N, searchValue: P, onSearchChange: F, createValues: I, createError: L, onCreateChange: R, onCreateSubmit: z, isCreating: B, editingUnitId: V, editValues: H, editError: U, onEditStart: W, onEditChange: G, onEditSubmit: K, onEditCancel: q, isUpdating: J, onDeleteClick: Y, onDone: X, labels: Z }) {
|
|
8
|
+
let Q = {
|
|
9
|
+
...b,
|
|
10
|
+
...Z
|
|
11
11
|
};
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
open:
|
|
14
|
-
onOpenChange:
|
|
15
|
-
children: /* @__PURE__ */
|
|
16
|
-
className: "ttw:gap-0 ttw:p-0",
|
|
12
|
+
return /* @__PURE__ */ x(c, {
|
|
13
|
+
open: A,
|
|
14
|
+
onOpenChange: j,
|
|
15
|
+
children: /* @__PURE__ */ S(l, {
|
|
16
|
+
className: "ttw:w-150 ttw:sm:max-w-150 ttw:gap-0 ttw:p-0",
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ S(f, {
|
|
19
19
|
className: "ttw:border-b ttw:border-border",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ x(p, { children: Q.title }), /* @__PURE__ */ x(u, {
|
|
21
21
|
className: "ttw:sr-only",
|
|
22
|
-
children:
|
|
22
|
+
children: Q.hiddenDescription
|
|
23
23
|
})]
|
|
24
24
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ S("div", {
|
|
26
26
|
className: "ttw:flex-1 ttw:flex ttw:flex-col ttw:gap-4 ttw:overflow-y-auto ttw:px-6 ttw:py-4",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
placeholder: Y.searchPlaceholder,
|
|
33
|
-
value: j,
|
|
34
|
-
onChange: (e) => M(e.target.value)
|
|
35
|
-
})] }), /* @__PURE__ */ y(d, {
|
|
27
|
+
children: [/* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(s, {
|
|
28
|
+
placeholder: Q.searchPlaceholder,
|
|
29
|
+
value: P,
|
|
30
|
+
onChange: (e) => F(e.target.value)
|
|
31
|
+
}) }), /* @__PURE__ */ S(m, {
|
|
36
32
|
className: "ttw:table-fixed ttw:border ttw:border-border ttw:rounded-md",
|
|
37
|
-
children: [/* @__PURE__ */ v
|
|
33
|
+
children: [/* @__PURE__ */ x(v, { children: /* @__PURE__ */ S(y, {
|
|
38
34
|
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
39
35
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
className: "ttw:w-[
|
|
42
|
-
children:
|
|
36
|
+
/* @__PURE__ */ x(_, {
|
|
37
|
+
className: "ttw:w-[30%]",
|
|
38
|
+
children: Q.columnLabel
|
|
43
39
|
}),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
className: "ttw:w-[
|
|
46
|
-
children:
|
|
40
|
+
/* @__PURE__ */ x(_, {
|
|
41
|
+
className: "ttw:w-[50%]",
|
|
42
|
+
children: Q.columnDescription
|
|
47
43
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ x(_, { className: "ttw:w-[20%]" })
|
|
49
45
|
]
|
|
50
|
-
}) }), /* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */ y
|
|
46
|
+
}) }), /* @__PURE__ */ S(h, { children: [
|
|
47
|
+
/* @__PURE__ */ S(y, {
|
|
52
48
|
className: "ttw:border-border",
|
|
53
49
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
placeholder:
|
|
56
|
-
value:
|
|
57
|
-
"aria-invalid": !!
|
|
58
|
-
disabled:
|
|
50
|
+
/* @__PURE__ */ S(g, { children: [/* @__PURE__ */ x(a, {
|
|
51
|
+
placeholder: Q.namePlaceholder,
|
|
52
|
+
value: I.name,
|
|
53
|
+
"aria-invalid": !!L,
|
|
54
|
+
disabled: B,
|
|
59
55
|
className: "ttw:h-8",
|
|
60
|
-
onChange: (e) =>
|
|
61
|
-
}),
|
|
56
|
+
onChange: (e) => R({ name: e.target.value })
|
|
57
|
+
}), L && /* @__PURE__ */ x("p", {
|
|
62
58
|
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
63
|
-
children:
|
|
59
|
+
children: L
|
|
64
60
|
})] }),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
placeholder:
|
|
67
|
-
value:
|
|
68
|
-
disabled:
|
|
61
|
+
/* @__PURE__ */ x(g, { children: /* @__PURE__ */ x(a, {
|
|
62
|
+
placeholder: Q.descriptionPlaceholder,
|
|
63
|
+
value: I.description,
|
|
64
|
+
disabled: B,
|
|
69
65
|
className: "ttw:h-8",
|
|
70
|
-
onChange: (e) =>
|
|
66
|
+
onChange: (e) => R({ description: e.target.value })
|
|
71
67
|
}) }),
|
|
72
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ x(g, {
|
|
73
69
|
className: "ttw:text-right",
|
|
74
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ S(e, {
|
|
75
71
|
variant: "outline",
|
|
76
72
|
size: "sm",
|
|
77
|
-
onClick:
|
|
78
|
-
disabled:
|
|
73
|
+
onClick: z,
|
|
74
|
+
disabled: B,
|
|
79
75
|
className: "ttw:h-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ x(E, { className: "ttw:size-4" }), Q.addButton]
|
|
81
77
|
})
|
|
82
78
|
})
|
|
83
79
|
]
|
|
84
80
|
}),
|
|
85
|
-
|
|
81
|
+
N ? null : M.map((o) => V === o.id ? /* @__PURE__ */ S(y, {
|
|
86
82
|
className: "ttw:border-border",
|
|
87
83
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
value:
|
|
90
|
-
"aria-invalid": !!
|
|
91
|
-
disabled:
|
|
84
|
+
/* @__PURE__ */ S(g, { children: [/* @__PURE__ */ x(a, {
|
|
85
|
+
value: H.name,
|
|
86
|
+
"aria-invalid": !!U,
|
|
87
|
+
disabled: J,
|
|
92
88
|
className: "ttw:h-8",
|
|
93
|
-
onChange: (e) =>
|
|
94
|
-
}),
|
|
89
|
+
onChange: (e) => G({ name: e.target.value })
|
|
90
|
+
}), U && /* @__PURE__ */ x("p", {
|
|
95
91
|
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
96
|
-
children:
|
|
92
|
+
children: U
|
|
97
93
|
})] }),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
value:
|
|
100
|
-
disabled:
|
|
94
|
+
/* @__PURE__ */ x(g, { children: /* @__PURE__ */ x(a, {
|
|
95
|
+
value: H.description,
|
|
96
|
+
disabled: J,
|
|
101
97
|
className: "ttw:h-8",
|
|
102
|
-
onChange: (e) =>
|
|
98
|
+
onChange: (e) => G({ description: e.target.value })
|
|
103
99
|
}) }),
|
|
104
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ x(g, { children: /* @__PURE__ */ S("div", {
|
|
105
101
|
className: "ttw:flex ttw:justify-end ttw:gap-1",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ x(e, {
|
|
107
103
|
variant: "outline",
|
|
108
104
|
size: "icon",
|
|
109
|
-
"aria-label":
|
|
110
|
-
onClick:
|
|
111
|
-
disabled:
|
|
105
|
+
"aria-label": Q.saveAction,
|
|
106
|
+
onClick: K,
|
|
107
|
+
disabled: J,
|
|
112
108
|
className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
}), /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ x(C, { className: "ttw:size-4" })
|
|
110
|
+
}), /* @__PURE__ */ x(e, {
|
|
115
111
|
variant: "outline",
|
|
116
112
|
size: "icon",
|
|
117
|
-
"aria-label":
|
|
118
|
-
onClick:
|
|
119
|
-
disabled:
|
|
113
|
+
"aria-label": Q.cancelAction,
|
|
114
|
+
onClick: q,
|
|
115
|
+
disabled: J,
|
|
120
116
|
className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
|
|
121
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ x(O, { className: "ttw:size-4" })
|
|
122
118
|
})]
|
|
123
119
|
}) })
|
|
124
120
|
]
|
|
125
|
-
},
|
|
121
|
+
}, o.id) : /* @__PURE__ */ S(y, {
|
|
126
122
|
className: "ttw:border-border",
|
|
127
123
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ x(g, {
|
|
129
125
|
className: "ttw:text-sm ttw:truncate",
|
|
130
|
-
children:
|
|
126
|
+
children: o.name
|
|
131
127
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ x(g, {
|
|
133
129
|
className: "ttw:text-sm ttw:text-muted-foreground ttw:truncate",
|
|
134
|
-
children:
|
|
130
|
+
children: o.description || k
|
|
135
131
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
className: "ttw:
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
132
|
+
/* @__PURE__ */ x(g, {
|
|
133
|
+
className: "ttw:text-right",
|
|
134
|
+
children: /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, {
|
|
135
|
+
asChild: !0,
|
|
136
|
+
children: /* @__PURE__ */ x(e, {
|
|
137
|
+
variant: "ghost",
|
|
138
|
+
size: "icon-sm",
|
|
139
|
+
"aria-label": Q.moreActionsLabel,
|
|
140
|
+
children: /* @__PURE__ */ x(w, { className: "ttw:size-4" })
|
|
141
|
+
})
|
|
142
|
+
}), /* @__PURE__ */ S(n, {
|
|
143
|
+
align: "end",
|
|
144
|
+
children: [/* @__PURE__ */ S(r, {
|
|
145
|
+
onClick: () => W(o),
|
|
146
|
+
children: [/* @__PURE__ */ x(T, { className: "ttw:size-4" }), Q.editAction]
|
|
147
|
+
}), /* @__PURE__ */ S(r, {
|
|
148
|
+
onClick: () => Y(o),
|
|
149
|
+
variant: "destructive",
|
|
150
|
+
children: [/* @__PURE__ */ x(D, { className: "ttw:size-4" }), Q.deleteAction]
|
|
151
|
+
})]
|
|
152
|
+
})] })
|
|
153
|
+
})
|
|
152
154
|
]
|
|
153
|
-
},
|
|
154
|
-
!
|
|
155
|
+
}, o.id)),
|
|
156
|
+
!N && M.length === 0 && /* @__PURE__ */ x(y, { children: /* @__PURE__ */ x(g, {
|
|
155
157
|
colSpan: 3,
|
|
156
158
|
className: "ttw:text-center ttw:text-muted-foreground",
|
|
157
|
-
children:
|
|
159
|
+
children: Q.emptyText
|
|
158
160
|
}) })
|
|
159
161
|
] })]
|
|
160
162
|
})]
|
|
161
163
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ x(d, {
|
|
163
165
|
className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
onClick:
|
|
166
|
-
children:
|
|
166
|
+
children: /* @__PURE__ */ x(e, {
|
|
167
|
+
onClick: X,
|
|
168
|
+
children: Q.doneButton
|
|
167
169
|
})
|
|
168
170
|
})
|
|
169
171
|
]
|
|
@@ -171,4 +173,4 @@ function D({ open: D, onOpenChange: O, units: k, isLoading: A, searchValue: j, o
|
|
|
171
173
|
});
|
|
172
174
|
}
|
|
173
175
|
//#endregion
|
|
174
|
-
export {
|
|
176
|
+
export { A as MeasureUnitsManager, A as default };
|