@tesouro/embedded-components-react 0.7.72 → 0.7.73
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/README.md +1 -1
- package/dist/index.css +9 -0
- package/dist/index.d.ts +12 -6
- package/dist/lib/ProductsWidget.d.ts +12 -6
- package/dist/lib/ReceivablesWidget.d.ts +1 -5
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/constants.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductsTable.js +112 -51
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductsWidget.js +80 -56
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +15 -6
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +170 -135
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +49 -150
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index6.js +152 -24
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index7.js +28 -0
- 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/feature/dist/index.js +13 -12
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/ProductSelector.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/helpers.js +41 -27
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +70 -52
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +19 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index3.js +171 -218
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js +52 -180
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index5.js +188 -46
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +47 -124
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index7.js +128 -0
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js
CHANGED
|
@@ -1,193 +1,65 @@
|
|
|
1
|
-
import { Button as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Button as e, Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeProductFormSheetLabels as s } from "./index2.js";
|
|
3
|
+
import { ProductFormFields as c } from "./index3.js";
|
|
4
|
+
import { useId as l } from "react";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
open: k,
|
|
14
|
-
onOpenChange: A,
|
|
15
|
-
children: /* @__PURE__ */ S(l, {
|
|
16
|
-
className: "ttw:w-150 ttw:sm:max-w-150 ttw:gap-0 ttw:p-0",
|
|
7
|
+
function f({ open: f, onOpenChange: p, values: m, errors: h, unitOptions: g, pricePrefix: _, inProgress: v, onChange: y, onSubmit: b, onCancel: x, labels: S }) {
|
|
8
|
+
let C = s(S), w = l(), T = m.type === "service" ? C.typeService.toLowerCase() : C.typeProduct.toLowerCase();
|
|
9
|
+
return /* @__PURE__ */ u(t, {
|
|
10
|
+
open: f,
|
|
11
|
+
onOpenChange: p,
|
|
12
|
+
children: /* @__PURE__ */ d(n, {
|
|
13
|
+
className: "ttw:w-150 ttw:sm:max-w-150 ttw:gap-0",
|
|
17
14
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ d(a, {
|
|
19
16
|
className: "ttw:border-b ttw:border-border",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
className: "ttw:
|
|
22
|
-
children:
|
|
17
|
+
children: [/* @__PURE__ */ u(o, {
|
|
18
|
+
className: "ttw:text-2xl",
|
|
19
|
+
children: C.createTitle
|
|
20
|
+
}), /* @__PURE__ */ u(r, {
|
|
21
|
+
className: "ttw:max-w-130",
|
|
22
|
+
children: C.headerDescription
|
|
23
23
|
})]
|
|
24
24
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
children: Z.columnDescription
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ x(_, { className: "ttw:w-[20%]" })
|
|
45
|
-
]
|
|
46
|
-
}) }), /* @__PURE__ */ S(h, { children: [
|
|
47
|
-
/* @__PURE__ */ S(y, {
|
|
48
|
-
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ S(g, {
|
|
51
|
-
className: "ttw:align-top",
|
|
52
|
-
children: [/* @__PURE__ */ x(a, {
|
|
53
|
-
placeholder: Z.namePlaceholder,
|
|
54
|
-
value: F.name,
|
|
55
|
-
"aria-invalid": !!I,
|
|
56
|
-
disabled: z,
|
|
57
|
-
className: "ttw:h-8",
|
|
58
|
-
onChange: (e) => L({ name: e.target.value })
|
|
59
|
-
}), I && /* @__PURE__ */ x("p", {
|
|
60
|
-
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
61
|
-
children: I
|
|
62
|
-
})]
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ x(g, {
|
|
65
|
-
className: "ttw:align-top",
|
|
66
|
-
children: /* @__PURE__ */ x(a, {
|
|
67
|
-
placeholder: Z.descriptionPlaceholder,
|
|
68
|
-
value: F.description,
|
|
69
|
-
disabled: z,
|
|
70
|
-
className: "ttw:h-8",
|
|
71
|
-
onChange: (e) => L({ description: e.target.value })
|
|
72
|
-
})
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ x(g, {
|
|
75
|
-
className: "ttw:align-top ttw:text-right",
|
|
76
|
-
children: /* @__PURE__ */ x(e, {
|
|
77
|
-
variant: "secondary",
|
|
78
|
-
size: "sm",
|
|
79
|
-
onClick: R,
|
|
80
|
-
disabled: z,
|
|
81
|
-
children: Z.addButton
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
}),
|
|
86
|
-
M ? null : j.map((o) => B === o.id ? /* @__PURE__ */ S(y, {
|
|
87
|
-
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ S(g, {
|
|
90
|
-
className: "ttw:align-top",
|
|
91
|
-
children: [/* @__PURE__ */ x(a, {
|
|
92
|
-
value: V.name,
|
|
93
|
-
"aria-invalid": !!H,
|
|
94
|
-
disabled: q,
|
|
95
|
-
className: "ttw:h-8",
|
|
96
|
-
onChange: (e) => W({ name: e.target.value })
|
|
97
|
-
}), H && /* @__PURE__ */ x("p", {
|
|
98
|
-
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
99
|
-
children: H
|
|
100
|
-
})]
|
|
101
|
-
}),
|
|
102
|
-
/* @__PURE__ */ x(g, {
|
|
103
|
-
className: "ttw:align-top",
|
|
104
|
-
children: /* @__PURE__ */ x(a, {
|
|
105
|
-
value: V.description,
|
|
106
|
-
disabled: q,
|
|
107
|
-
className: "ttw:h-8",
|
|
108
|
-
onChange: (e) => W({ description: e.target.value })
|
|
109
|
-
})
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ x(g, {
|
|
112
|
-
className: "ttw:align-top",
|
|
113
|
-
children: /* @__PURE__ */ S("div", {
|
|
114
|
-
className: "ttw:flex ttw:justify-end ttw:gap-1",
|
|
115
|
-
children: [/* @__PURE__ */ x(e, {
|
|
116
|
-
variant: "outline",
|
|
117
|
-
size: "icon",
|
|
118
|
-
"aria-label": Z.saveAction,
|
|
119
|
-
onClick: G,
|
|
120
|
-
disabled: q,
|
|
121
|
-
className: "ttw:size-8 ttw:border-border",
|
|
122
|
-
children: /* @__PURE__ */ x(C, { className: "ttw:size-4" })
|
|
123
|
-
}), /* @__PURE__ */ x(e, {
|
|
124
|
-
variant: "outline",
|
|
125
|
-
size: "icon",
|
|
126
|
-
"aria-label": Z.cancelAction,
|
|
127
|
-
onClick: K,
|
|
128
|
-
disabled: q,
|
|
129
|
-
className: "ttw:size-8 ttw:border-border",
|
|
130
|
-
children: /* @__PURE__ */ x(D, { className: "ttw:size-4" })
|
|
131
|
-
})]
|
|
132
|
-
})
|
|
133
|
-
})
|
|
134
|
-
]
|
|
135
|
-
}, o.id) : /* @__PURE__ */ S(y, {
|
|
136
|
-
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
137
|
-
children: [
|
|
138
|
-
/* @__PURE__ */ x(g, {
|
|
139
|
-
className: "ttw:text-sm ttw:truncate",
|
|
140
|
-
children: o.name
|
|
141
|
-
}),
|
|
142
|
-
/* @__PURE__ */ x(g, {
|
|
143
|
-
className: "ttw:text-sm ttw:text-muted-foreground ttw:truncate",
|
|
144
|
-
children: o.description || O
|
|
145
|
-
}),
|
|
146
|
-
/* @__PURE__ */ x(g, {
|
|
147
|
-
className: "ttw:text-right",
|
|
148
|
-
children: /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, {
|
|
149
|
-
asChild: !0,
|
|
150
|
-
children: /* @__PURE__ */ x(e, {
|
|
151
|
-
variant: "ghost",
|
|
152
|
-
size: "icon-sm",
|
|
153
|
-
"aria-label": Z.moreActionsLabel,
|
|
154
|
-
children: /* @__PURE__ */ x(w, { className: "ttw:size-4" })
|
|
155
|
-
})
|
|
156
|
-
}), /* @__PURE__ */ S(n, {
|
|
157
|
-
align: "end",
|
|
158
|
-
children: [/* @__PURE__ */ S(r, {
|
|
159
|
-
onClick: () => U(o),
|
|
160
|
-
children: [/* @__PURE__ */ x(T, { className: "ttw:size-4" }), Z.editAction]
|
|
161
|
-
}), /* @__PURE__ */ S(r, {
|
|
162
|
-
onClick: () => J(o),
|
|
163
|
-
variant: "destructive",
|
|
164
|
-
children: [/* @__PURE__ */ x(E, { className: "ttw:size-4" }), Z.deleteAction]
|
|
165
|
-
})]
|
|
166
|
-
})] })
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
}, o.id)),
|
|
170
|
-
!M && j.length === 0 && /* @__PURE__ */ x(y, {
|
|
171
|
-
className: "ttw:hover:bg-transparent",
|
|
172
|
-
children: /* @__PURE__ */ x(g, {
|
|
173
|
-
colSpan: 3,
|
|
174
|
-
className: "ttw:text-center ttw:text-muted-foreground",
|
|
175
|
-
children: Z.emptyText
|
|
176
|
-
})
|
|
177
|
-
})
|
|
178
|
-
] })]
|
|
179
|
-
})]
|
|
25
|
+
/* @__PURE__ */ u("form", {
|
|
26
|
+
id: w,
|
|
27
|
+
onSubmit: (e) => {
|
|
28
|
+
e.preventDefault(), e.stopPropagation(), b();
|
|
29
|
+
},
|
|
30
|
+
children: /* @__PURE__ */ u("div", {
|
|
31
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:py-8 ttw:overflow-auto",
|
|
32
|
+
children: /* @__PURE__ */ u(c, {
|
|
33
|
+
idPrefix: w,
|
|
34
|
+
values: m,
|
|
35
|
+
errors: h,
|
|
36
|
+
unitOptions: g,
|
|
37
|
+
pricePrefix: _,
|
|
38
|
+
onChange: y,
|
|
39
|
+
labels: S
|
|
40
|
+
})
|
|
41
|
+
})
|
|
180
42
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ d(i, {
|
|
182
44
|
className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
|
|
183
|
-
children: /* @__PURE__ */
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
45
|
+
children: [/* @__PURE__ */ u(e, {
|
|
46
|
+
type: "button",
|
|
47
|
+
variant: "outline",
|
|
48
|
+
className: "ttw:w-fit ttw:border-border",
|
|
49
|
+
onClick: x,
|
|
50
|
+
children: C.cancelButton
|
|
51
|
+
}), /* @__PURE__ */ u(e, {
|
|
52
|
+
type: "submit",
|
|
53
|
+
form: w,
|
|
54
|
+
className: "ttw:w-fit",
|
|
55
|
+
disabled: v,
|
|
56
|
+
loading: v,
|
|
57
|
+
children: C.createButton.replace("{type}", T)
|
|
58
|
+
})]
|
|
187
59
|
})
|
|
188
60
|
]
|
|
189
61
|
})
|
|
190
62
|
});
|
|
191
63
|
}
|
|
192
64
|
//#endregion
|
|
193
|
-
export {
|
|
65
|
+
export { f as ProductFormSheet, f as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index5.js
CHANGED
|
@@ -1,51 +1,193 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx 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, Trash2Icon as E, XIcon as D } from "lucide-react";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index5.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
...
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) : T ? /* @__PURE__ */ p("div", {
|
|
23
|
-
className: "ttw:max-h-60 ttw:overflow-auto ttw:rounded-md ttw:border",
|
|
24
|
-
children: /* @__PURE__ */ p(c, { children: /* @__PURE__ */ p(l, { children: v.map((e) => /* @__PURE__ */ m(d, {
|
|
25
|
-
className: "ttw:border-border ttw:hover:bg-transparent",
|
|
26
|
-
children: [/* @__PURE__ */ p(u, {
|
|
27
|
-
className: "ttw:pl-0 ttw:whitespace-normal ttw:text-text ttw:font-medium",
|
|
28
|
-
children: e.name
|
|
29
|
-
}), /* @__PURE__ */ p(u, {
|
|
30
|
-
className: "ttw:pr-0 ttw:text-right ttw:text-text ttw:font-medium",
|
|
31
|
-
children: e.priceLabel
|
|
6
|
+
var O = "—";
|
|
7
|
+
function k({ open: k, onOpenChange: A, units: j, isLoading: M, searchValue: N, onSearchChange: P, createValues: F, createError: I, onCreateChange: L, onCreateSubmit: R, isCreating: z, editingUnitId: B, editValues: V, editError: H, onEditStart: U, onEditChange: W, onEditSubmit: G, onEditCancel: K, isUpdating: q, onDeleteClick: J, onDone: Y, labels: X }) {
|
|
8
|
+
let Z = {
|
|
9
|
+
...b,
|
|
10
|
+
...X
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ x(c, {
|
|
13
|
+
open: k,
|
|
14
|
+
onOpenChange: A,
|
|
15
|
+
children: /* @__PURE__ */ S(l, {
|
|
16
|
+
className: "ttw:w-150 ttw:sm:max-w-150 ttw:gap-0 ttw:p-0",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ S(f, {
|
|
19
|
+
className: "ttw:border-b ttw:border-border",
|
|
20
|
+
children: [/* @__PURE__ */ x(p, { children: Z.title }), /* @__PURE__ */ x(u, {
|
|
21
|
+
className: "ttw:sr-only",
|
|
22
|
+
children: Z.hiddenDescription
|
|
32
23
|
})]
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ S("div", {
|
|
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__ */ x(o, { children: /* @__PURE__ */ x(s, {
|
|
28
|
+
placeholder: Z.searchPlaceholder,
|
|
29
|
+
value: N,
|
|
30
|
+
onChange: (e) => P(e.target.value)
|
|
31
|
+
}) }), /* @__PURE__ */ S(m, {
|
|
32
|
+
className: "ttw:table-fixed ttw:border ttw:border-border ttw:rounded-md",
|
|
33
|
+
children: [/* @__PURE__ */ x(v, { children: /* @__PURE__ */ S(y, {
|
|
34
|
+
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ x(_, {
|
|
37
|
+
className: "ttw:w-[30%]",
|
|
38
|
+
children: Z.columnLabel
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ x(_, {
|
|
41
|
+
className: "ttw:w-[50%]",
|
|
42
|
+
children: Z.columnDescription
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ x(_, { className: "ttw:w-[20%]" })
|
|
45
|
+
]
|
|
46
|
+
}) }), /* @__PURE__ */ S(h, { children: [
|
|
47
|
+
/* @__PURE__ */ S(y, {
|
|
48
|
+
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ S(g, {
|
|
51
|
+
className: "ttw:align-top",
|
|
52
|
+
children: [/* @__PURE__ */ x(a, {
|
|
53
|
+
placeholder: Z.namePlaceholder,
|
|
54
|
+
value: F.name,
|
|
55
|
+
"aria-invalid": !!I,
|
|
56
|
+
disabled: z,
|
|
57
|
+
className: "ttw:h-8",
|
|
58
|
+
onChange: (e) => L({ name: e.target.value })
|
|
59
|
+
}), I && /* @__PURE__ */ x("p", {
|
|
60
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
61
|
+
children: I
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ x(g, {
|
|
65
|
+
className: "ttw:align-top",
|
|
66
|
+
children: /* @__PURE__ */ x(a, {
|
|
67
|
+
placeholder: Z.descriptionPlaceholder,
|
|
68
|
+
value: F.description,
|
|
69
|
+
disabled: z,
|
|
70
|
+
className: "ttw:h-8",
|
|
71
|
+
onChange: (e) => L({ description: e.target.value })
|
|
72
|
+
})
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ x(g, {
|
|
75
|
+
className: "ttw:align-top ttw:text-right",
|
|
76
|
+
children: /* @__PURE__ */ x(e, {
|
|
77
|
+
variant: "secondary",
|
|
78
|
+
size: "sm",
|
|
79
|
+
onClick: R,
|
|
80
|
+
disabled: z,
|
|
81
|
+
children: Z.addButton
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}),
|
|
86
|
+
M ? null : j.map((o) => B === o.id ? /* @__PURE__ */ S(y, {
|
|
87
|
+
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ S(g, {
|
|
90
|
+
className: "ttw:align-top",
|
|
91
|
+
children: [/* @__PURE__ */ x(a, {
|
|
92
|
+
value: V.name,
|
|
93
|
+
"aria-invalid": !!H,
|
|
94
|
+
disabled: q,
|
|
95
|
+
className: "ttw:h-8",
|
|
96
|
+
onChange: (e) => W({ name: e.target.value })
|
|
97
|
+
}), H && /* @__PURE__ */ x("p", {
|
|
98
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
|
|
99
|
+
children: H
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ x(g, {
|
|
103
|
+
className: "ttw:align-top",
|
|
104
|
+
children: /* @__PURE__ */ x(a, {
|
|
105
|
+
value: V.description,
|
|
106
|
+
disabled: q,
|
|
107
|
+
className: "ttw:h-8",
|
|
108
|
+
onChange: (e) => W({ description: e.target.value })
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ x(g, {
|
|
112
|
+
className: "ttw:align-top",
|
|
113
|
+
children: /* @__PURE__ */ S("div", {
|
|
114
|
+
className: "ttw:flex ttw:justify-end ttw:gap-1",
|
|
115
|
+
children: [/* @__PURE__ */ x(e, {
|
|
116
|
+
variant: "outline",
|
|
117
|
+
size: "icon",
|
|
118
|
+
"aria-label": Z.saveAction,
|
|
119
|
+
onClick: G,
|
|
120
|
+
disabled: q,
|
|
121
|
+
className: "ttw:size-8 ttw:border-border",
|
|
122
|
+
children: /* @__PURE__ */ x(C, { className: "ttw:size-4" })
|
|
123
|
+
}), /* @__PURE__ */ x(e, {
|
|
124
|
+
variant: "outline",
|
|
125
|
+
size: "icon",
|
|
126
|
+
"aria-label": Z.cancelAction,
|
|
127
|
+
onClick: K,
|
|
128
|
+
disabled: q,
|
|
129
|
+
className: "ttw:size-8 ttw:border-border",
|
|
130
|
+
children: /* @__PURE__ */ x(D, { className: "ttw:size-4" })
|
|
131
|
+
})]
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}, o.id) : /* @__PURE__ */ S(y, {
|
|
136
|
+
className: "ttw:hover:bg-transparent ttw:border-border",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ x(g, {
|
|
139
|
+
className: "ttw:text-sm ttw:truncate",
|
|
140
|
+
children: o.name
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ x(g, {
|
|
143
|
+
className: "ttw:text-sm ttw:text-muted-foreground ttw:truncate",
|
|
144
|
+
children: o.description || O
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ x(g, {
|
|
147
|
+
className: "ttw:text-right",
|
|
148
|
+
children: /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, {
|
|
149
|
+
asChild: !0,
|
|
150
|
+
children: /* @__PURE__ */ x(e, {
|
|
151
|
+
variant: "ghost",
|
|
152
|
+
size: "icon-sm",
|
|
153
|
+
"aria-label": Z.moreActionsLabel,
|
|
154
|
+
children: /* @__PURE__ */ x(w, { className: "ttw:size-4" })
|
|
155
|
+
})
|
|
156
|
+
}), /* @__PURE__ */ S(n, {
|
|
157
|
+
align: "end",
|
|
158
|
+
children: [/* @__PURE__ */ S(r, {
|
|
159
|
+
onClick: () => U(o),
|
|
160
|
+
children: [/* @__PURE__ */ x(T, { className: "ttw:size-4" }), Z.editAction]
|
|
161
|
+
}), /* @__PURE__ */ S(r, {
|
|
162
|
+
onClick: () => J(o),
|
|
163
|
+
variant: "destructive",
|
|
164
|
+
children: [/* @__PURE__ */ x(E, { className: "ttw:size-4" }), Z.deleteAction]
|
|
165
|
+
})]
|
|
166
|
+
})] })
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
}, o.id)),
|
|
170
|
+
!M && j.length === 0 && /* @__PURE__ */ x(y, {
|
|
171
|
+
className: "ttw:hover:bg-transparent",
|
|
172
|
+
children: /* @__PURE__ */ x(g, {
|
|
173
|
+
colSpan: 3,
|
|
174
|
+
className: "ttw:text-center ttw:text-muted-foreground",
|
|
175
|
+
children: Z.emptyText
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
] })]
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ x(d, {
|
|
182
|
+
className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
|
|
183
|
+
children: /* @__PURE__ */ x(e, {
|
|
184
|
+
onClick: Y,
|
|
185
|
+
children: Z.doneButton
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
})
|
|
48
190
|
});
|
|
49
191
|
}
|
|
50
192
|
//#endregion
|
|
51
|
-
export {
|
|
193
|
+
export { k as MeasureUnitsManager, k as default };
|