@tesouro/embedded-components-react 0.5.154 → 0.5.155
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 -2
- package/dist/index.css +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/lib/SettingsWidget.d.ts +0 -3
- package/dist/lib/WidgetSuite.d.ts +0 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +56 -64
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +34 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +191 -231
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +91 -147
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +0 -35
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +0 -62
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +0 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js +0 -107
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index2.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index3.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +0 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +0 -80
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +0 -146
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index2.js +0 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index3.js +0 -143
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js +0 -127
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Button as e, Input as t, InputTags as n, Label as r, Select as i, SelectContent as a, SelectItem as o, SelectTrigger as s, SelectValue as c, Sheet as l, SheetContent as u, SheetDescription as d, SheetFooter as f, SheetHeader as p, SheetTitle as m } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { TAG_FORM_SHEET_LABELS_EN as h } from "./index2.js";
|
|
3
|
-
import { useId as g } from "react";
|
|
4
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js
|
|
6
|
-
function y({ open: y, onOpenChange: b, mode: x, values: S, errors: C, categoryOptions: w, tagName: T, inProgress: E, showDelete: D, showKeywords: O = !0, onNameChange: k, onCategoryChange: A, onKeywordsChange: j, onKeywordsInputChange: M, onSubmit: N, onCancel: P, onDelete: F, labels: I }) {
|
|
7
|
-
let L = {
|
|
8
|
-
...h,
|
|
9
|
-
...I
|
|
10
|
-
}, R = g(), z = x === "edit" ? L.editTitle.replace("{name}", T ?? "") : L.createTitle;
|
|
11
|
-
return /* @__PURE__ */ _(l, {
|
|
12
|
-
open: y,
|
|
13
|
-
onOpenChange: b,
|
|
14
|
-
children: /* @__PURE__ */ v(u, {
|
|
15
|
-
className: "ttw:w-[600px] ttw:sm:max-w-[600px]",
|
|
16
|
-
onEscapeKeyDown: (e) => e.stopPropagation(),
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ v(p, { children: [/* @__PURE__ */ _(m, { children: z }), /* @__PURE__ */ _(d, {
|
|
19
|
-
className: "ttw:sr-only",
|
|
20
|
-
children: z
|
|
21
|
-
})] }),
|
|
22
|
-
/* @__PURE__ */ _("form", {
|
|
23
|
-
id: R,
|
|
24
|
-
onSubmit: (e) => {
|
|
25
|
-
e.preventDefault(), e.stopPropagation(), N();
|
|
26
|
-
},
|
|
27
|
-
children: /* @__PURE__ */ v("div", {
|
|
28
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
|
|
29
|
-
children: [
|
|
30
|
-
C?.form && /* @__PURE__ */ _("p", {
|
|
31
|
-
role: "alert",
|
|
32
|
-
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
33
|
-
children: C.form
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ v("div", {
|
|
36
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ _(r, {
|
|
39
|
-
htmlFor: `${R}-name`,
|
|
40
|
-
children: L.nameLabel
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ _(t, {
|
|
43
|
-
id: `${R}-name`,
|
|
44
|
-
autoFocus: !0,
|
|
45
|
-
value: S.name,
|
|
46
|
-
"aria-invalid": !!C?.name,
|
|
47
|
-
onChange: (e) => k(e.target.value)
|
|
48
|
-
}),
|
|
49
|
-
C?.name && /* @__PURE__ */ _("p", {
|
|
50
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
51
|
-
children: C.name
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ v("div", {
|
|
56
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
57
|
-
children: [/* @__PURE__ */ _(r, {
|
|
58
|
-
htmlFor: `${R}-category`,
|
|
59
|
-
children: L.categoryLabel
|
|
60
|
-
}), /* @__PURE__ */ v(i, {
|
|
61
|
-
value: S.category === "" ? void 0 : S.category,
|
|
62
|
-
onValueChange: A,
|
|
63
|
-
children: [/* @__PURE__ */ _(s, {
|
|
64
|
-
id: `${R}-category`,
|
|
65
|
-
className: "ttw:w-full",
|
|
66
|
-
children: /* @__PURE__ */ _(c, { placeholder: L.categoryPlaceholder })
|
|
67
|
-
}), /* @__PURE__ */ _(a, { children: w.map((e) => /* @__PURE__ */ _(o, {
|
|
68
|
-
value: e.value,
|
|
69
|
-
children: e.label
|
|
70
|
-
}, e.value)) })]
|
|
71
|
-
})]
|
|
72
|
-
}),
|
|
73
|
-
O && /* @__PURE__ */ v("div", {
|
|
74
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ _(r, { children: L.keywordsLabel }),
|
|
77
|
-
/* @__PURE__ */ _(n, {
|
|
78
|
-
value: S.keywords,
|
|
79
|
-
onChange: j,
|
|
80
|
-
inputValue: S.keywordsInput,
|
|
81
|
-
onInputValueChange: M,
|
|
82
|
-
placeholder: L.keywordsPlaceholder,
|
|
83
|
-
"aria-invalid": !!C?.keywords,
|
|
84
|
-
removeTagLabel: (e) => L.removeKeyword.replace("{keyword}", e)
|
|
85
|
-
}),
|
|
86
|
-
C?.keywords && /* @__PURE__ */ _("p", {
|
|
87
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
88
|
-
children: C.keywords
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
})
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ v(f, {
|
|
96
|
-
className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
|
|
97
|
-
children: [
|
|
98
|
-
x === "edit" && D && F && /* @__PURE__ */ _(e, {
|
|
99
|
-
type: "button",
|
|
100
|
-
className: "ttw:mr-auto",
|
|
101
|
-
variant: "destructive",
|
|
102
|
-
size: "lg",
|
|
103
|
-
onClick: F,
|
|
104
|
-
children: L.deleteButton
|
|
105
|
-
}),
|
|
106
|
-
/* @__PURE__ */ _(e, {
|
|
107
|
-
type: "button",
|
|
108
|
-
variant: "ghost",
|
|
109
|
-
size: "lg",
|
|
110
|
-
onClick: P,
|
|
111
|
-
children: L.cancelButton
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ _(e, {
|
|
114
|
-
type: "submit",
|
|
115
|
-
form: R,
|
|
116
|
-
size: "lg",
|
|
117
|
-
disabled: E,
|
|
118
|
-
children: x === "edit" ? L.saveButton : L.createButton
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
//#endregion
|
|
127
|
-
export { y as TagFormSheet, y as default };
|