hazo_ui 6.12.0 → 6.12.4
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/CHANGE_LOG.md +80 -0
- package/README.md +4 -0
- package/SETUP_CHECKLIST.md +2 -2
- package/dist/index.cjs +249 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +249 -140
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -182,8 +182,8 @@ var require_extends = __commonJS({
|
|
|
182
182
|
function _extends11() {
|
|
183
183
|
return module.exports = _extends11 = Object.assign ? Object.assign.bind() : function(n) {
|
|
184
184
|
for (var e = 1; e < arguments.length; e++) {
|
|
185
|
-
var
|
|
186
|
-
for (var r in
|
|
185
|
+
var t22 = arguments[e];
|
|
186
|
+
for (var r in t22) ({}).hasOwnProperty.call(t22, r) && (n[r] = t22[r]);
|
|
187
187
|
}
|
|
188
188
|
return n;
|
|
189
189
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends11.apply(null, arguments);
|
|
@@ -197,12 +197,12 @@ var require_objectWithoutPropertiesLoose = __commonJS({
|
|
|
197
197
|
"../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
|
|
198
198
|
function _objectWithoutPropertiesLoose10(r, e) {
|
|
199
199
|
if (null == r) return {};
|
|
200
|
-
var
|
|
200
|
+
var t22 = {};
|
|
201
201
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
202
202
|
if (-1 !== e.indexOf(n)) continue;
|
|
203
|
-
|
|
203
|
+
t22[n] = r[n];
|
|
204
204
|
}
|
|
205
|
-
return
|
|
205
|
+
return t22;
|
|
206
206
|
}
|
|
207
207
|
module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
208
208
|
}
|
|
@@ -785,7 +785,70 @@ var en_default = {
|
|
|
785
785
|
"filter.no_fields_available": "No fields available.",
|
|
786
786
|
"filter.clear_all": "Clear all",
|
|
787
787
|
"filter.cancel": "Cancel",
|
|
788
|
-
"filter.apply": "Apply"
|
|
788
|
+
"filter.apply": "Apply",
|
|
789
|
+
"sort.title": "Sort",
|
|
790
|
+
"sort.description": "Add fields to sort by, drag to reorder, toggle ascending or descending.",
|
|
791
|
+
"sort.search_fields": "Search fields...",
|
|
792
|
+
"sort.open_dialog_aria": "Open sort dialog",
|
|
793
|
+
"sort.clear_all": "Clear all",
|
|
794
|
+
"sort.cancel": "Cancel",
|
|
795
|
+
"sort.apply": "Apply",
|
|
796
|
+
"canvas_toolbar.bold": "Bold",
|
|
797
|
+
"canvas_toolbar.italic": "Italic",
|
|
798
|
+
"canvas_toolbar.underline": "Underline",
|
|
799
|
+
"canvas_toolbar.align_left": "Align left",
|
|
800
|
+
"canvas_toolbar.align_center": "Align center",
|
|
801
|
+
"canvas_toolbar.align_right": "Align right",
|
|
802
|
+
"canvas_toolbar.text_color": "Text color",
|
|
803
|
+
"canvas_toolbar.font_family": "Font family",
|
|
804
|
+
"canvas_toolbar.align_top": "Align top",
|
|
805
|
+
"canvas_toolbar.align_middle": "Align middle",
|
|
806
|
+
"canvas_toolbar.align_bottom": "Align bottom",
|
|
807
|
+
"canvas_toolbar.bullet_list": "Bullet list",
|
|
808
|
+
"toast.permission_required": "Permission required",
|
|
809
|
+
"toast.permission_denied_message": "You do not have permission to perform this action.",
|
|
810
|
+
"error.something_went_wrong": "Something went wrong",
|
|
811
|
+
"error.dismiss": "Dismiss",
|
|
812
|
+
"loading.taking_longer": "This is taking longer than expected",
|
|
813
|
+
"notification.loading": "Loading notifications",
|
|
814
|
+
"notification.mark_all_read": "Mark all as read",
|
|
815
|
+
"notification.unread": "Unread",
|
|
816
|
+
"confirm.cancel": "Cancel",
|
|
817
|
+
"icon_picker.search_placeholder": "Search icons...",
|
|
818
|
+
"common.loading": "Loading...",
|
|
819
|
+
"common.cancel": "Cancel",
|
|
820
|
+
"common.search": "Search...",
|
|
821
|
+
"dialog.default_title": "Action required",
|
|
822
|
+
"dialog.cancel": "Cancel",
|
|
823
|
+
"dialog.ok": "OK",
|
|
824
|
+
"dialog.confirm": "Confirm",
|
|
825
|
+
"dialog.close": "Close",
|
|
826
|
+
"kanban.status_label": "Status",
|
|
827
|
+
"kanban.edit_fallback": "Edit {{id}}",
|
|
828
|
+
"kanban.update_description": "Update card details below.",
|
|
829
|
+
"kanban.saving": "Saving\u2026",
|
|
830
|
+
"kanban.save": "Save",
|
|
831
|
+
"kanban.cancel": "Cancel",
|
|
832
|
+
"kanban.select_placeholder": "Select {{label}}\u2026",
|
|
833
|
+
"kanban.select_priority": "Select priority\u2026",
|
|
834
|
+
"kanban.select_status": "Select status\u2026",
|
|
835
|
+
"markdown.placeholder": "Write in Markdown\u2026",
|
|
836
|
+
"markdown.upload_failed": "Upload failed.",
|
|
837
|
+
"markdown.loading_editor": "Loading editor\u2026",
|
|
838
|
+
"markdown.uploading_image": "Uploading image\u2026",
|
|
839
|
+
"cropper.title": "Crop photo",
|
|
840
|
+
"cropper.save": "Save",
|
|
841
|
+
"cropper.cancel": "Cancel",
|
|
842
|
+
"cropper.zoom": "Zoom",
|
|
843
|
+
"memory.search_placeholder": "Search history\u2026",
|
|
844
|
+
"memory.no_history": "No history yet",
|
|
845
|
+
"memory.remove_aria": "Remove {{label}} from history",
|
|
846
|
+
"celebration.close": "Close celebration",
|
|
847
|
+
"celebration.download_png": "Download PNG",
|
|
848
|
+
"celebration.share": "Share",
|
|
849
|
+
"celebration.copy_image": "Copy image",
|
|
850
|
+
"celebration.dismiss": "Dismiss",
|
|
851
|
+
"charts.date_range": "Date range"
|
|
789
852
|
};
|
|
790
853
|
var t = i18n.createPackageT("hazo_ui", en_default);
|
|
791
854
|
function FilterFieldItem({
|
|
@@ -1234,6 +1297,7 @@ function HazoUiMultiFilterDialog({
|
|
|
1234
1297
|
] })
|
|
1235
1298
|
] });
|
|
1236
1299
|
}
|
|
1300
|
+
var t2 = i18n.createPackageT("hazo_ui", en_default);
|
|
1237
1301
|
function SortableSortFieldItem({
|
|
1238
1302
|
sortConfig,
|
|
1239
1303
|
fieldLabel,
|
|
@@ -1344,8 +1408,8 @@ function HazoUiMultiSortDialog({
|
|
|
1344
1408
|
availableFields,
|
|
1345
1409
|
onSortChange,
|
|
1346
1410
|
initialSortFields = [],
|
|
1347
|
-
title = "
|
|
1348
|
-
description = "
|
|
1411
|
+
title = t2("sort.title"),
|
|
1412
|
+
description = t2("sort.description"),
|
|
1349
1413
|
headerBackgroundColor,
|
|
1350
1414
|
headerTextColor,
|
|
1351
1415
|
submitButtonBackgroundColor,
|
|
@@ -1463,7 +1527,7 @@ function HazoUiMultiSortDialog({
|
|
|
1463
1527
|
variant: "outline",
|
|
1464
1528
|
size: "sm",
|
|
1465
1529
|
className: "cls_sort_button",
|
|
1466
|
-
"aria-label": "
|
|
1530
|
+
"aria-label": t2("sort.open_dialog_aria"),
|
|
1467
1531
|
children: [
|
|
1468
1532
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1469
1533
|
lucideReact.ArrowUpDown,
|
|
@@ -1536,7 +1600,7 @@ function HazoUiMultiSortDialog({
|
|
|
1536
1600
|
}
|
|
1537
1601
|
) }),
|
|
1538
1602
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "cls_combobox_popover w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
1539
|
-
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: "
|
|
1603
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: t2("sort.search_fields"), className: "cls_command_input" }),
|
|
1540
1604
|
/* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "No fields available." }) : /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1541
1605
|
CommandItem,
|
|
1542
1606
|
{
|
|
@@ -1559,7 +1623,7 @@ function HazoUiMultiSortDialog({
|
|
|
1559
1623
|
onClick: handleClearAll,
|
|
1560
1624
|
className: "cls_clear_all_btn text-muted-foreground hover:text-foreground",
|
|
1561
1625
|
style: clearButtonStyles,
|
|
1562
|
-
children: "
|
|
1626
|
+
children: t2("sort.clear_all")
|
|
1563
1627
|
}
|
|
1564
1628
|
) }),
|
|
1565
1629
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_footer_right flex items-center gap-2", children: [
|
|
@@ -1571,7 +1635,7 @@ function HazoUiMultiSortDialog({
|
|
|
1571
1635
|
onClick: handleCancel,
|
|
1572
1636
|
className: "cls_cancel_btn",
|
|
1573
1637
|
style: cancelButtonStyles,
|
|
1574
|
-
children: "
|
|
1638
|
+
children: t2("sort.cancel")
|
|
1575
1639
|
}
|
|
1576
1640
|
),
|
|
1577
1641
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1581,7 +1645,7 @@ function HazoUiMultiSortDialog({
|
|
|
1581
1645
|
onClick: handleApply,
|
|
1582
1646
|
className: "cls_apply_btn",
|
|
1583
1647
|
style: submitButtonStyles,
|
|
1584
|
-
children: "
|
|
1648
|
+
children: t2("sort.apply")
|
|
1585
1649
|
}
|
|
1586
1650
|
)
|
|
1587
1651
|
] })
|
|
@@ -2000,6 +2064,7 @@ var TabsContent = React27__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2000
2064
|
}
|
|
2001
2065
|
));
|
|
2002
2066
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
2067
|
+
var t3 = i18n.createPackageT("hazo_ui", en_default);
|
|
2003
2068
|
function isLucideValue(value) {
|
|
2004
2069
|
return value.startsWith("lucide:");
|
|
2005
2070
|
}
|
|
@@ -2265,7 +2330,7 @@ function HazoUiIconPicker({
|
|
|
2265
2330
|
type: "text",
|
|
2266
2331
|
value: search,
|
|
2267
2332
|
onChange: (e) => set_search(e.target.value),
|
|
2268
|
-
placeholder: "
|
|
2333
|
+
placeholder: t3("icon_picker.search_placeholder"),
|
|
2269
2334
|
className: cn(
|
|
2270
2335
|
"cls_hazo_ui_icon_picker_search",
|
|
2271
2336
|
"mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
|
|
@@ -3711,10 +3776,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
|
|
|
3711
3776
|
"code-block": "rte.block_type.code_block",
|
|
3712
3777
|
blockquote: "rte.block_type.blockquote"
|
|
3713
3778
|
};
|
|
3714
|
-
function get_translated_block_types(
|
|
3779
|
+
function get_translated_block_types(t22) {
|
|
3715
3780
|
return BLOCK_TYPES.map((type) => ({
|
|
3716
3781
|
...type,
|
|
3717
|
-
label:
|
|
3782
|
+
label: t22(BLOCK_TYPE_LABEL_KEYS[type.value])
|
|
3718
3783
|
}));
|
|
3719
3784
|
}
|
|
3720
3785
|
|
|
@@ -3761,7 +3826,7 @@ function get_file_extension(filename) {
|
|
|
3761
3826
|
function is_image_file(mime_type) {
|
|
3762
3827
|
return mime_type.startsWith("image/");
|
|
3763
3828
|
}
|
|
3764
|
-
var
|
|
3829
|
+
var t4 = i18n.createPackageT("hazo_ui", en_default);
|
|
3765
3830
|
var ALL_ON = {
|
|
3766
3831
|
undo_redo: true,
|
|
3767
3832
|
block_type: true,
|
|
@@ -3816,7 +3881,7 @@ var Toolbar = ({
|
|
|
3816
3881
|
}
|
|
3817
3882
|
const tb = { ...ALL_ON, ...toolbar };
|
|
3818
3883
|
const font_family_options = font_families && font_families.length > 0 ? font_families : FONT_FAMILIES;
|
|
3819
|
-
const block_type_options = get_translated_block_types(
|
|
3884
|
+
const block_type_options = get_translated_block_types(t4);
|
|
3820
3885
|
const get_current_font_size = () => {
|
|
3821
3886
|
const attrs = editor.getAttributes("textStyle");
|
|
3822
3887
|
return attrs.fontSize || FONT_SIZE_CONFIG.default;
|
|
@@ -3960,7 +4025,7 @@ var Toolbar = ({
|
|
|
3960
4025
|
{
|
|
3961
4026
|
onClick: () => editor.chain().focus().undo().run(),
|
|
3962
4027
|
disabled: !editor.can().undo(),
|
|
3963
|
-
tooltip:
|
|
4028
|
+
tooltip: t4("rte.undo"),
|
|
3964
4029
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUndo2, { className: "h-4 w-4" })
|
|
3965
4030
|
},
|
|
3966
4031
|
"undo"
|
|
@@ -3970,7 +4035,7 @@ var Toolbar = ({
|
|
|
3970
4035
|
{
|
|
3971
4036
|
onClick: () => editor.chain().focus().redo().run(),
|
|
3972
4037
|
disabled: !editor.can().redo(),
|
|
3973
|
-
tooltip:
|
|
4038
|
+
tooltip: t4("rte.redo"),
|
|
3974
4039
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuRedo2, { className: "h-4 w-4" })
|
|
3975
4040
|
},
|
|
3976
4041
|
"redo"
|
|
@@ -4011,7 +4076,7 @@ var Toolbar = ({
|
|
|
4011
4076
|
ToolbarButton,
|
|
4012
4077
|
{
|
|
4013
4078
|
onClick: () => handle_font_size_change(-2),
|
|
4014
|
-
tooltip:
|
|
4079
|
+
tooltip: t4("rte.decrease_font_size"),
|
|
4015
4080
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuMinus, { className: "h-3 w-3" })
|
|
4016
4081
|
}
|
|
4017
4082
|
),
|
|
@@ -4020,7 +4085,7 @@ var Toolbar = ({
|
|
|
4020
4085
|
ToolbarButton,
|
|
4021
4086
|
{
|
|
4022
4087
|
onClick: () => handle_font_size_change(FONT_SIZE_CONFIG.step),
|
|
4023
|
-
tooltip:
|
|
4088
|
+
tooltip: t4("rte.increase_font_size"),
|
|
4024
4089
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPlus, { className: "h-3 w-3" })
|
|
4025
4090
|
}
|
|
4026
4091
|
)
|
|
@@ -4038,7 +4103,7 @@ var Toolbar = ({
|
|
|
4038
4103
|
{
|
|
4039
4104
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
4040
4105
|
is_active: editor.isActive("bold"),
|
|
4041
|
-
tooltip:
|
|
4106
|
+
tooltip: t4("rte.bold"),
|
|
4042
4107
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuBold, { className: "h-4 w-4" })
|
|
4043
4108
|
},
|
|
4044
4109
|
"bold"
|
|
@@ -4052,7 +4117,7 @@ var Toolbar = ({
|
|
|
4052
4117
|
{
|
|
4053
4118
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
4054
4119
|
is_active: editor.isActive("italic"),
|
|
4055
|
-
tooltip:
|
|
4120
|
+
tooltip: t4("rte.italic"),
|
|
4056
4121
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuItalic, { className: "h-4 w-4" })
|
|
4057
4122
|
},
|
|
4058
4123
|
"italic"
|
|
@@ -4066,7 +4131,7 @@ var Toolbar = ({
|
|
|
4066
4131
|
{
|
|
4067
4132
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
4068
4133
|
is_active: editor.isActive("underline"),
|
|
4069
|
-
tooltip:
|
|
4134
|
+
tooltip: t4("rte.underline"),
|
|
4070
4135
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUnderline, { className: "h-4 w-4" })
|
|
4071
4136
|
},
|
|
4072
4137
|
"underline"
|
|
@@ -4080,7 +4145,7 @@ var Toolbar = ({
|
|
|
4080
4145
|
{
|
|
4081
4146
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
4082
4147
|
is_active: editor.isActive("strike"),
|
|
4083
|
-
tooltip:
|
|
4148
|
+
tooltip: t4("rte.strikethrough"),
|
|
4084
4149
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuStrikethrough, { className: "h-4 w-4" })
|
|
4085
4150
|
},
|
|
4086
4151
|
"strike"
|
|
@@ -4094,7 +4159,7 @@ var Toolbar = ({
|
|
|
4094
4159
|
{
|
|
4095
4160
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
4096
4161
|
is_active: editor.isActive("subscript"),
|
|
4097
|
-
tooltip:
|
|
4162
|
+
tooltip: t4("rte.subscript"),
|
|
4098
4163
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSubscript, { className: "h-4 w-4" })
|
|
4099
4164
|
},
|
|
4100
4165
|
"sub"
|
|
@@ -4108,7 +4173,7 @@ var Toolbar = ({
|
|
|
4108
4173
|
{
|
|
4109
4174
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
4110
4175
|
is_active: editor.isActive("superscript"),
|
|
4111
|
-
tooltip:
|
|
4176
|
+
tooltip: t4("rte.superscript"),
|
|
4112
4177
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSuperscript, { className: "h-4 w-4" })
|
|
4113
4178
|
},
|
|
4114
4179
|
"super"
|
|
@@ -4122,7 +4187,7 @@ var Toolbar = ({
|
|
|
4122
4187
|
if (tb.link) {
|
|
4123
4188
|
items.push(
|
|
4124
4189
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: link_popover_open, onOpenChange: set_link_popover_open, children: [
|
|
4125
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip:
|
|
4190
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t4("rte.link"), children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuLink, { className: "h-4 w-4" }) }) }),
|
|
4126
4191
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4127
4192
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4128
4193
|
Input,
|
|
@@ -4158,7 +4223,7 @@ var Toolbar = ({
|
|
|
4158
4223
|
ToolbarButton,
|
|
4159
4224
|
{
|
|
4160
4225
|
onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
4161
|
-
tooltip:
|
|
4226
|
+
tooltip: t4("rte.clear_formatting"),
|
|
4162
4227
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuRemoveFormatting, { className: "h-4 w-4" })
|
|
4163
4228
|
},
|
|
4164
4229
|
"clear"
|
|
@@ -4172,7 +4237,7 @@ var Toolbar = ({
|
|
|
4172
4237
|
if (tb.text_color) {
|
|
4173
4238
|
items.push(
|
|
4174
4239
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: text_color_open, onOpenChange: set_text_color_open, children: [
|
|
4175
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip:
|
|
4240
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip: t4("rte.text_color"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4176
4241
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuPalette, { className: "h-4 w-4" }),
|
|
4177
4242
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4178
4243
|
"div",
|
|
@@ -4215,7 +4280,7 @@ var Toolbar = ({
|
|
|
4215
4280
|
if (tb.highlight_color) {
|
|
4216
4281
|
items.push(
|
|
4217
4282
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: highlight_color_open, onOpenChange: set_highlight_color_open, children: [
|
|
4218
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip:
|
|
4283
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip: t4("rte.highlight_color"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4219
4284
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuHighlighter, { className: "h-4 w-4" }),
|
|
4220
4285
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4221
4286
|
"div",
|
|
@@ -4258,7 +4323,7 @@ var Toolbar = ({
|
|
|
4258
4323
|
{
|
|
4259
4324
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
4260
4325
|
is_active: editor.isActive({ textAlign: "left" }),
|
|
4261
|
-
tooltip:
|
|
4326
|
+
tooltip: t4("rte.align_left"),
|
|
4262
4327
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignLeft, { className: "h-4 w-4" })
|
|
4263
4328
|
},
|
|
4264
4329
|
"align-left"
|
|
@@ -4268,7 +4333,7 @@ var Toolbar = ({
|
|
|
4268
4333
|
{
|
|
4269
4334
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
4270
4335
|
is_active: editor.isActive({ textAlign: "center" }),
|
|
4271
|
-
tooltip:
|
|
4336
|
+
tooltip: t4("rte.align_center"),
|
|
4272
4337
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignCenter, { className: "h-4 w-4" })
|
|
4273
4338
|
},
|
|
4274
4339
|
"align-center"
|
|
@@ -4278,7 +4343,7 @@ var Toolbar = ({
|
|
|
4278
4343
|
{
|
|
4279
4344
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
4280
4345
|
is_active: editor.isActive({ textAlign: "right" }),
|
|
4281
|
-
tooltip:
|
|
4346
|
+
tooltip: t4("rte.align_right"),
|
|
4282
4347
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignRight, { className: "h-4 w-4" })
|
|
4283
4348
|
},
|
|
4284
4349
|
"align-right"
|
|
@@ -4288,7 +4353,7 @@ var Toolbar = ({
|
|
|
4288
4353
|
{
|
|
4289
4354
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
4290
4355
|
is_active: editor.isActive({ textAlign: "justify" }),
|
|
4291
|
-
tooltip:
|
|
4356
|
+
tooltip: t4("rte.justify"),
|
|
4292
4357
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignJustify, { className: "h-4 w-4" })
|
|
4293
4358
|
},
|
|
4294
4359
|
"align-justify"
|
|
@@ -4304,7 +4369,7 @@ var Toolbar = ({
|
|
|
4304
4369
|
{
|
|
4305
4370
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
4306
4371
|
is_active: editor.isActive("bulletList"),
|
|
4307
|
-
tooltip:
|
|
4372
|
+
tooltip: t4("rte.bullet_list"),
|
|
4308
4373
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuList, { className: "h-4 w-4" })
|
|
4309
4374
|
},
|
|
4310
4375
|
"bullet"
|
|
@@ -4318,7 +4383,7 @@ var Toolbar = ({
|
|
|
4318
4383
|
{
|
|
4319
4384
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
4320
4385
|
is_active: editor.isActive("orderedList"),
|
|
4321
|
-
tooltip:
|
|
4386
|
+
tooltip: t4("rte.ordered_list"),
|
|
4322
4387
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuListOrdered, { className: "h-4 w-4" })
|
|
4323
4388
|
},
|
|
4324
4389
|
"ordered"
|
|
@@ -4332,7 +4397,7 @@ var Toolbar = ({
|
|
|
4332
4397
|
{
|
|
4333
4398
|
onClick: () => editor.chain().focus().toggleTaskList().run(),
|
|
4334
4399
|
is_active: editor.isActive("taskList"),
|
|
4335
|
-
tooltip:
|
|
4400
|
+
tooltip: t4("rte.checklist"),
|
|
4336
4401
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuListChecks, { className: "h-4 w-4" })
|
|
4337
4402
|
},
|
|
4338
4403
|
"task"
|
|
@@ -4354,7 +4419,7 @@ var Toolbar = ({
|
|
|
4354
4419
|
}
|
|
4355
4420
|
},
|
|
4356
4421
|
disabled: !editor.can().liftListItem("listItem") && !editor.can().liftListItem("taskItem"),
|
|
4357
|
-
tooltip:
|
|
4422
|
+
tooltip: t4("rte.decrease_indent"),
|
|
4358
4423
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuIndentDecrease, { className: "h-4 w-4" })
|
|
4359
4424
|
},
|
|
4360
4425
|
"indent-dec"
|
|
@@ -4370,7 +4435,7 @@ var Toolbar = ({
|
|
|
4370
4435
|
}
|
|
4371
4436
|
},
|
|
4372
4437
|
disabled: !editor.can().sinkListItem("listItem") && !editor.can().sinkListItem("taskItem"),
|
|
4373
|
-
tooltip:
|
|
4438
|
+
tooltip: t4("rte.increase_indent"),
|
|
4374
4439
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuIndentIncrease, { className: "h-4 w-4" })
|
|
4375
4440
|
},
|
|
4376
4441
|
"indent-inc"
|
|
@@ -4381,7 +4446,7 @@ var Toolbar = ({
|
|
|
4381
4446
|
const items = [];
|
|
4382
4447
|
if (tb.horizontal_rule) {
|
|
4383
4448
|
items.push(
|
|
4384
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip:
|
|
4449
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t4("rte.horizontal_rule"), children: /* @__PURE__ */ jsxRuntime.jsx(rx.RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
|
|
4385
4450
|
);
|
|
4386
4451
|
}
|
|
4387
4452
|
if (tb.image) {
|
|
@@ -4390,7 +4455,7 @@ var Toolbar = ({
|
|
|
4390
4455
|
ToolbarButton,
|
|
4391
4456
|
{
|
|
4392
4457
|
onClick: () => image_input_ref.current?.click(),
|
|
4393
|
-
tooltip:
|
|
4458
|
+
tooltip: t4("rte.insert_image"),
|
|
4394
4459
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuImage, { className: "h-4 w-4" })
|
|
4395
4460
|
},
|
|
4396
4461
|
"image"
|
|
@@ -4404,7 +4469,7 @@ var Toolbar = ({
|
|
|
4404
4469
|
ToolbarButton,
|
|
4405
4470
|
{
|
|
4406
4471
|
is_active: editor.isActive("table"),
|
|
4407
|
-
tooltip:
|
|
4472
|
+
tooltip: t4("rte.table"),
|
|
4408
4473
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTable, { className: "h-4 w-4" })
|
|
4409
4474
|
}
|
|
4410
4475
|
) }),
|
|
@@ -4576,7 +4641,7 @@ var Toolbar = ({
|
|
|
4576
4641
|
if (tb.variables && variables.length > 0) {
|
|
4577
4642
|
items.push(
|
|
4578
4643
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: variables_menu_open, onOpenChange: set_variables_menu_open, children: [
|
|
4579
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip:
|
|
4644
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { tooltip: t4("rte.insert_variable"), children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuVariable, { className: "h-4 w-4" }) }) }),
|
|
4580
4645
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
4581
4646
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: "Search variables...", className: "h-8 text-xs" }),
|
|
4582
4647
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
@@ -4605,7 +4670,7 @@ var Toolbar = ({
|
|
|
4605
4670
|
ToolbarButton,
|
|
4606
4671
|
{
|
|
4607
4672
|
onClick: () => file_input_ref.current?.click(),
|
|
4608
|
-
tooltip:
|
|
4673
|
+
tooltip: t4("rte.attach_file"),
|
|
4609
4674
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPaperclip, { className: "h-4 w-4" })
|
|
4610
4675
|
},
|
|
4611
4676
|
"attach"
|
|
@@ -5126,6 +5191,7 @@ var HazoUiRte = ({
|
|
|
5126
5191
|
);
|
|
5127
5192
|
};
|
|
5128
5193
|
HazoUiRte.displayName = "HazoUiRte";
|
|
5194
|
+
var t5 = i18n.createPackageT("hazo_ui", en_default);
|
|
5129
5195
|
function CanvasTextToolbar({
|
|
5130
5196
|
bold,
|
|
5131
5197
|
italic,
|
|
@@ -5156,14 +5222,14 @@ function CanvasTextToolbar({
|
|
|
5156
5222
|
),
|
|
5157
5223
|
style,
|
|
5158
5224
|
children: [
|
|
5159
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: "
|
|
5160
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: "
|
|
5225
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t5("canvas_toolbar.bold"), children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuBold, { className: "h-4 w-4" }) }),
|
|
5226
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t5("canvas_toolbar.italic"), children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuItalic, { className: "h-4 w-4" }) }),
|
|
5161
5227
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5162
5228
|
ToolbarButton,
|
|
5163
5229
|
{
|
|
5164
5230
|
is_active: underline,
|
|
5165
5231
|
onClick: onUnderline,
|
|
5166
|
-
tooltip: "
|
|
5232
|
+
tooltip: t5("canvas_toolbar.underline"),
|
|
5167
5233
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuUnderline, { className: "h-4 w-4" })
|
|
5168
5234
|
}
|
|
5169
5235
|
),
|
|
@@ -5173,7 +5239,7 @@ function CanvasTextToolbar({
|
|
|
5173
5239
|
{
|
|
5174
5240
|
is_active: align === "left",
|
|
5175
5241
|
onClick: () => onAlign?.("left"),
|
|
5176
|
-
tooltip: "
|
|
5242
|
+
tooltip: t5("canvas_toolbar.align_left"),
|
|
5177
5243
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignLeft, { className: "h-4 w-4" })
|
|
5178
5244
|
}
|
|
5179
5245
|
),
|
|
@@ -5182,7 +5248,7 @@ function CanvasTextToolbar({
|
|
|
5182
5248
|
{
|
|
5183
5249
|
is_active: align === "center",
|
|
5184
5250
|
onClick: () => onAlign?.("center"),
|
|
5185
|
-
tooltip: "
|
|
5251
|
+
tooltip: t5("canvas_toolbar.align_center"),
|
|
5186
5252
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignCenter, { className: "h-4 w-4" })
|
|
5187
5253
|
}
|
|
5188
5254
|
),
|
|
@@ -5191,7 +5257,7 @@ function CanvasTextToolbar({
|
|
|
5191
5257
|
{
|
|
5192
5258
|
is_active: align === "right",
|
|
5193
5259
|
onClick: () => onAlign?.("right"),
|
|
5194
|
-
tooltip: "
|
|
5260
|
+
tooltip: t5("canvas_toolbar.align_right"),
|
|
5195
5261
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignRight, { className: "h-4 w-4" })
|
|
5196
5262
|
}
|
|
5197
5263
|
),
|
|
@@ -5200,7 +5266,7 @@ function CanvasTextToolbar({
|
|
|
5200
5266
|
"label",
|
|
5201
5267
|
{
|
|
5202
5268
|
className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent",
|
|
5203
|
-
title: "
|
|
5269
|
+
title: t5("canvas_toolbar.text_color"),
|
|
5204
5270
|
children: [
|
|
5205
5271
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
5206
5272
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-bold text-muted-foreground", children: "A" }),
|
|
@@ -5230,7 +5296,7 @@ function CanvasTextToolbar({
|
|
|
5230
5296
|
{
|
|
5231
5297
|
is_active: verticalAlign === "top",
|
|
5232
5298
|
onClick: () => onVerticalAlign?.("top"),
|
|
5233
|
-
tooltip: "
|
|
5299
|
+
tooltip: t5("canvas_toolbar.align_top"),
|
|
5234
5300
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
|
|
5235
5301
|
}
|
|
5236
5302
|
),
|
|
@@ -5239,7 +5305,7 @@ function CanvasTextToolbar({
|
|
|
5239
5305
|
{
|
|
5240
5306
|
is_active: verticalAlign === "middle",
|
|
5241
5307
|
onClick: () => onVerticalAlign?.("middle"),
|
|
5242
|
-
tooltip: "
|
|
5308
|
+
tooltip: t5("canvas_toolbar.align_middle"),
|
|
5243
5309
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
|
|
5244
5310
|
}
|
|
5245
5311
|
),
|
|
@@ -5248,7 +5314,7 @@ function CanvasTextToolbar({
|
|
|
5248
5314
|
{
|
|
5249
5315
|
is_active: verticalAlign === "bottom",
|
|
5250
5316
|
onClick: () => onVerticalAlign?.("bottom"),
|
|
5251
|
-
tooltip: "
|
|
5317
|
+
tooltip: t5("canvas_toolbar.align_bottom"),
|
|
5252
5318
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
|
|
5253
5319
|
}
|
|
5254
5320
|
),
|
|
@@ -5259,7 +5325,7 @@ function CanvasTextToolbar({
|
|
|
5259
5325
|
value: font,
|
|
5260
5326
|
onChange: (e) => onFont?.(e.target.value),
|
|
5261
5327
|
className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
|
|
5262
|
-
title: "
|
|
5328
|
+
title: t5("canvas_toolbar.font_family"),
|
|
5263
5329
|
children: [
|
|
5264
5330
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "sans-serif", children: "Sans" }),
|
|
5265
5331
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "serif", children: "Serif" }),
|
|
@@ -5271,18 +5337,19 @@ function CanvasTextToolbar({
|
|
|
5271
5337
|
}
|
|
5272
5338
|
),
|
|
5273
5339
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
5274
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: "
|
|
5340
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t5("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuList, { className: "h-4 w-4" }) })
|
|
5275
5341
|
]
|
|
5276
5342
|
}
|
|
5277
5343
|
) });
|
|
5278
5344
|
}
|
|
5345
|
+
var t6 = i18n.createPackageT("hazo_ui", en_default);
|
|
5279
5346
|
var MdEditorLazy = React27.lazy(() => import('@uiw/react-md-editor'));
|
|
5280
5347
|
var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
|
|
5281
5348
|
function MarkdownEditor({
|
|
5282
5349
|
value,
|
|
5283
5350
|
onChange,
|
|
5284
5351
|
height = 600,
|
|
5285
|
-
placeholder
|
|
5352
|
+
placeholder,
|
|
5286
5353
|
className,
|
|
5287
5354
|
colorMode = "light",
|
|
5288
5355
|
preview = "edit",
|
|
@@ -5365,13 +5432,13 @@ function MarkdownEditor({
|
|
|
5365
5432
|
try {
|
|
5366
5433
|
const url = await onImageUpload(file);
|
|
5367
5434
|
if (!url) {
|
|
5368
|
-
setError("
|
|
5435
|
+
setError(t6("markdown.upload_failed"));
|
|
5369
5436
|
onChange(before + after);
|
|
5370
5437
|
return;
|
|
5371
5438
|
}
|
|
5372
5439
|
onChange(before + `` + after);
|
|
5373
5440
|
} catch {
|
|
5374
|
-
setError("
|
|
5441
|
+
setError(t6("markdown.upload_failed"));
|
|
5375
5442
|
onChange(before + after);
|
|
5376
5443
|
} finally {
|
|
5377
5444
|
setUploading(false);
|
|
@@ -5395,7 +5462,7 @@ function MarkdownEditor({
|
|
|
5395
5462
|
{
|
|
5396
5463
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5397
5464
|
style: { height },
|
|
5398
|
-
children: "
|
|
5465
|
+
children: t6("markdown.loading_editor")
|
|
5399
5466
|
}
|
|
5400
5467
|
),
|
|
5401
5468
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5407,7 +5474,7 @@ function MarkdownEditor({
|
|
|
5407
5474
|
preview: effectivePreview,
|
|
5408
5475
|
visibleDragbar: false,
|
|
5409
5476
|
commands: editorCommands,
|
|
5410
|
-
textareaProps: { placeholder, onPaste: handlePaste }
|
|
5477
|
+
textareaProps: { placeholder: placeholder ?? t6("markdown.placeholder"), onPaste: handlePaste }
|
|
5411
5478
|
}
|
|
5412
5479
|
)
|
|
5413
5480
|
}
|
|
@@ -5416,7 +5483,7 @@ function MarkdownEditor({
|
|
|
5416
5483
|
{
|
|
5417
5484
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5418
5485
|
style: { height },
|
|
5419
|
-
children: "
|
|
5486
|
+
children: t6("markdown.loading_editor")
|
|
5420
5487
|
}
|
|
5421
5488
|
) }),
|
|
5422
5489
|
useCustomPreview && showPreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5430,7 +5497,7 @@ function MarkdownEditor({
|
|
|
5430
5497
|
]
|
|
5431
5498
|
}
|
|
5432
5499
|
),
|
|
5433
|
-
uploading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: "
|
|
5500
|
+
uploading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t6("markdown.uploading_image") }),
|
|
5434
5501
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
|
|
5435
5502
|
] });
|
|
5436
5503
|
}
|
|
@@ -7218,6 +7285,7 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
|
|
|
7218
7285
|
const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
|
|
7219
7286
|
return `${open_classes} ${close_classes}`;
|
|
7220
7287
|
}
|
|
7288
|
+
var t7 = i18n.createPackageT("hazo_ui", en_default);
|
|
7221
7289
|
var VARIANT_PRESETS = {
|
|
7222
7290
|
info: {
|
|
7223
7291
|
header_background_color: "var(--dialog-info-bg)",
|
|
@@ -7267,11 +7335,11 @@ function HazoUiDialog({
|
|
|
7267
7335
|
children,
|
|
7268
7336
|
onConfirm,
|
|
7269
7337
|
onCancel,
|
|
7270
|
-
title
|
|
7338
|
+
title,
|
|
7271
7339
|
description,
|
|
7272
7340
|
actionButtonText: actionButtonTextProp,
|
|
7273
7341
|
actionButtonVariant,
|
|
7274
|
-
cancelButtonText
|
|
7342
|
+
cancelButtonText,
|
|
7275
7343
|
showCancelButton: showCancelButtonProp,
|
|
7276
7344
|
showActionButton = true,
|
|
7277
7345
|
closeOnConfirm: closeOnConfirmProp,
|
|
@@ -7311,9 +7379,11 @@ function HazoUiDialog({
|
|
|
7311
7379
|
const cancel_ref = React27__namespace.useRef(null);
|
|
7312
7380
|
const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
|
|
7313
7381
|
const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
|
|
7382
|
+
const resolved_title = title ?? t7("dialog.default_title");
|
|
7383
|
+
const resolved_cancel_text = cancelButtonText ?? t7("dialog.cancel");
|
|
7314
7384
|
const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
|
|
7315
7385
|
const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
|
|
7316
|
-
const actionButtonText = actionButtonTextProp ?? (is_status_kind ? "
|
|
7386
|
+
const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t7("dialog.ok") : is_confirm_kind ? showCancelButton ? t7("dialog.confirm") : t7("dialog.ok") : t7("dialog.confirm"));
|
|
7317
7387
|
const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
|
|
7318
7388
|
const handleConfirm = () => {
|
|
7319
7389
|
if (is_confirm_kind) {
|
|
@@ -7448,7 +7518,7 @@ function HazoUiDialog({
|
|
|
7448
7518
|
},
|
|
7449
7519
|
children: [
|
|
7450
7520
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
|
|
7451
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children:
|
|
7521
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: resolved_title }),
|
|
7452
7522
|
children ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
|
|
7453
7523
|
] }),
|
|
7454
7524
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
|
|
@@ -7463,7 +7533,7 @@ function HazoUiDialog({
|
|
|
7463
7533
|
onClick: handleCancel,
|
|
7464
7534
|
disabled: actionButtonLoading,
|
|
7465
7535
|
style: cancelButtonStyles,
|
|
7466
|
-
children:
|
|
7536
|
+
children: resolved_cancel_text
|
|
7467
7537
|
}
|
|
7468
7538
|
),
|
|
7469
7539
|
showActionButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7529,7 +7599,7 @@ function HazoUiDialog({
|
|
|
7529
7599
|
...finalHeaderBackgroundColor && { backgroundColor: finalHeaderBackgroundColor },
|
|
7530
7600
|
...finalHeaderTextColor && { color: finalHeaderTextColor }
|
|
7531
7601
|
},
|
|
7532
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children:
|
|
7602
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: resolved_title })
|
|
7533
7603
|
}
|
|
7534
7604
|
),
|
|
7535
7605
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7560,7 +7630,7 @@ function HazoUiDialog({
|
|
|
7560
7630
|
),
|
|
7561
7631
|
style: headerStyles,
|
|
7562
7632
|
children: [
|
|
7563
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children:
|
|
7633
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: resolved_title }),
|
|
7564
7634
|
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7565
7635
|
DialogDescription,
|
|
7566
7636
|
{
|
|
@@ -7611,7 +7681,7 @@ function HazoUiDialog({
|
|
|
7611
7681
|
variant: "outline",
|
|
7612
7682
|
onClick: handleCancel,
|
|
7613
7683
|
style: cancelButtonStyles,
|
|
7614
|
-
children:
|
|
7684
|
+
children: resolved_cancel_text
|
|
7615
7685
|
}
|
|
7616
7686
|
),
|
|
7617
7687
|
showActionButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7640,7 +7710,7 @@ function HazoUiDialog({
|
|
|
7640
7710
|
style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
|
|
7641
7711
|
children: [
|
|
7642
7712
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
7643
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "
|
|
7713
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t7("dialog.close") })
|
|
7644
7714
|
]
|
|
7645
7715
|
}
|
|
7646
7716
|
)
|
|
@@ -7649,6 +7719,7 @@ function HazoUiDialog({
|
|
|
7649
7719
|
)
|
|
7650
7720
|
] }) });
|
|
7651
7721
|
}
|
|
7722
|
+
var t8 = i18n.createPackageT("hazo_ui", en_default);
|
|
7652
7723
|
function HazoUiConfirmDialog({
|
|
7653
7724
|
open,
|
|
7654
7725
|
onOpenChange,
|
|
@@ -7657,7 +7728,7 @@ function HazoUiConfirmDialog({
|
|
|
7657
7728
|
children,
|
|
7658
7729
|
variant = "default",
|
|
7659
7730
|
confirmLabel,
|
|
7660
|
-
cancelLabel = "
|
|
7731
|
+
cancelLabel = t8("confirm.cancel"),
|
|
7661
7732
|
showCancelButton = true,
|
|
7662
7733
|
onConfirm,
|
|
7663
7734
|
onCancel,
|
|
@@ -7706,6 +7777,7 @@ var Slider = React27__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7706
7777
|
}
|
|
7707
7778
|
));
|
|
7708
7779
|
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
7780
|
+
var t9 = i18n.createPackageT("hazo_ui", en_default);
|
|
7709
7781
|
async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
|
|
7710
7782
|
const img = await new Promise((resolve, reject) => {
|
|
7711
7783
|
const image = new Image();
|
|
@@ -7751,7 +7823,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
|
|
|
7751
7823
|
onCropped,
|
|
7752
7824
|
outputSize = 512,
|
|
7753
7825
|
quality = 0.9,
|
|
7754
|
-
zoomLabel
|
|
7826
|
+
zoomLabel,
|
|
7755
7827
|
className
|
|
7756
7828
|
}, ref) {
|
|
7757
7829
|
const [crop, set_crop] = React27__namespace.useState({
|
|
@@ -7759,6 +7831,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
|
|
|
7759
7831
|
y: 0
|
|
7760
7832
|
});
|
|
7761
7833
|
const [zoom, set_zoom] = React27__namespace.useState(1);
|
|
7834
|
+
const resolved_zoom_label = zoomLabel ?? t9("cropper.zoom");
|
|
7762
7835
|
const cropped_area_pixels_ref = React27__namespace.useRef(null);
|
|
7763
7836
|
const handle_crop_complete = React27__namespace.useCallback(
|
|
7764
7837
|
(_croppedArea, croppedAreaPixels) => {
|
|
@@ -7815,7 +7888,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
|
|
|
7815
7888
|
{
|
|
7816
7889
|
className: "cls_zoom_label text-sm font-medium text-foreground",
|
|
7817
7890
|
id: "hazo-cropper-zoom-label",
|
|
7818
|
-
children:
|
|
7891
|
+
children: resolved_zoom_label
|
|
7819
7892
|
}
|
|
7820
7893
|
),
|
|
7821
7894
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7833,19 +7906,24 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
|
|
|
7833
7906
|
] });
|
|
7834
7907
|
});
|
|
7835
7908
|
HazoUiImageCropper.displayName = "HazoUiImageCropper";
|
|
7909
|
+
var t10 = i18n.createPackageT("hazo_ui", en_default);
|
|
7836
7910
|
function HazoUiImageCropperDialog({
|
|
7837
7911
|
open,
|
|
7838
7912
|
onOpenChange,
|
|
7839
7913
|
file,
|
|
7840
7914
|
onConfirm,
|
|
7841
7915
|
onCancel,
|
|
7842
|
-
title
|
|
7843
|
-
confirmLabel
|
|
7844
|
-
cancelLabel
|
|
7845
|
-
zoomLabel
|
|
7916
|
+
title,
|
|
7917
|
+
confirmLabel,
|
|
7918
|
+
cancelLabel,
|
|
7919
|
+
zoomLabel,
|
|
7846
7920
|
outputSize = 512,
|
|
7847
7921
|
quality = 0.9
|
|
7848
7922
|
}) {
|
|
7923
|
+
const resolved_title = title ?? t10("cropper.title");
|
|
7924
|
+
const resolved_confirm_label = confirmLabel ?? t10("cropper.save");
|
|
7925
|
+
const resolved_cancel_label = cancelLabel ?? t10("cropper.cancel");
|
|
7926
|
+
const resolved_zoom_label = zoomLabel ?? t10("cropper.zoom");
|
|
7849
7927
|
const cropper_ref = React27__namespace.useRef(null);
|
|
7850
7928
|
const [image_src, set_image_src] = React27__namespace.useState(null);
|
|
7851
7929
|
const [is_confirming, set_is_confirming] = React27__namespace.useState(false);
|
|
@@ -7876,9 +7954,9 @@ function HazoUiImageCropperDialog({
|
|
|
7876
7954
|
{
|
|
7877
7955
|
open,
|
|
7878
7956
|
onOpenChange,
|
|
7879
|
-
title,
|
|
7880
|
-
actionButtonText:
|
|
7881
|
-
cancelButtonText:
|
|
7957
|
+
title: resolved_title,
|
|
7958
|
+
actionButtonText: resolved_confirm_label,
|
|
7959
|
+
cancelButtonText: resolved_cancel_label,
|
|
7882
7960
|
onConfirm: handle_confirm,
|
|
7883
7961
|
onCancel,
|
|
7884
7962
|
actionButtonLoading: is_confirming,
|
|
@@ -7891,7 +7969,7 @@ function HazoUiImageCropperDialog({
|
|
|
7891
7969
|
imageSrc: image_src,
|
|
7892
7970
|
outputSize,
|
|
7893
7971
|
quality,
|
|
7894
|
-
zoomLabel
|
|
7972
|
+
zoomLabel: resolved_zoom_label
|
|
7895
7973
|
}
|
|
7896
7974
|
)
|
|
7897
7975
|
}
|
|
@@ -8562,6 +8640,7 @@ function EmptyState({
|
|
|
8562
8640
|
}
|
|
8563
8641
|
);
|
|
8564
8642
|
}
|
|
8643
|
+
var t11 = i18n.createPackageT("hazo_ui", en_default);
|
|
8565
8644
|
function ErrorBanner({
|
|
8566
8645
|
severity = "error",
|
|
8567
8646
|
title,
|
|
@@ -8596,7 +8675,7 @@ function ErrorBanner({
|
|
|
8596
8675
|
{
|
|
8597
8676
|
type: "button",
|
|
8598
8677
|
onClick: onDismiss,
|
|
8599
|
-
"aria-label": "
|
|
8678
|
+
"aria-label": t11("error.dismiss"),
|
|
8600
8679
|
className: "flex-shrink-0 rounded p-1 hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:hover:bg-white/5",
|
|
8601
8680
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
8602
8681
|
}
|
|
@@ -8605,8 +8684,9 @@ function ErrorBanner({
|
|
|
8605
8684
|
}
|
|
8606
8685
|
);
|
|
8607
8686
|
}
|
|
8687
|
+
var t12 = i18n.createPackageT("hazo_ui", en_default);
|
|
8608
8688
|
function ErrorPage({
|
|
8609
|
-
title = "
|
|
8689
|
+
title = t12("error.something_went_wrong"),
|
|
8610
8690
|
description,
|
|
8611
8691
|
errorCode,
|
|
8612
8692
|
correlationId,
|
|
@@ -8637,6 +8717,7 @@ function ErrorPage({
|
|
|
8637
8717
|
}
|
|
8638
8718
|
);
|
|
8639
8719
|
}
|
|
8720
|
+
var t13 = i18n.createPackageT("hazo_ui", en_default);
|
|
8640
8721
|
function LoadingTimeout({
|
|
8641
8722
|
active,
|
|
8642
8723
|
children,
|
|
@@ -8646,7 +8727,7 @@ function LoadingTimeout({
|
|
|
8646
8727
|
label = "content",
|
|
8647
8728
|
className
|
|
8648
8729
|
}) {
|
|
8649
|
-
const
|
|
8730
|
+
const timeouts = {
|
|
8650
8731
|
gentle: thresholds?.gentle ?? 5e3,
|
|
8651
8732
|
firm: thresholds?.firm ?? 15e3,
|
|
8652
8733
|
expired: thresholds?.expired ?? 3e4
|
|
@@ -8658,15 +8739,15 @@ function LoadingTimeout({
|
|
|
8658
8739
|
return;
|
|
8659
8740
|
}
|
|
8660
8741
|
setPhase("silent");
|
|
8661
|
-
const gentleTimer = window.setTimeout(() => setPhase("gentle"),
|
|
8662
|
-
const firmTimer = window.setTimeout(() => setPhase("firm"),
|
|
8663
|
-
const expiredTimer = window.setTimeout(() => setPhase("expired"),
|
|
8742
|
+
const gentleTimer = window.setTimeout(() => setPhase("gentle"), timeouts.gentle);
|
|
8743
|
+
const firmTimer = window.setTimeout(() => setPhase("firm"), timeouts.firm);
|
|
8744
|
+
const expiredTimer = window.setTimeout(() => setPhase("expired"), timeouts.expired);
|
|
8664
8745
|
return () => {
|
|
8665
8746
|
window.clearTimeout(gentleTimer);
|
|
8666
8747
|
window.clearTimeout(firmTimer);
|
|
8667
8748
|
window.clearTimeout(expiredTimer);
|
|
8668
8749
|
};
|
|
8669
|
-
}, [active,
|
|
8750
|
+
}, [active, timeouts.gentle, timeouts.firm, timeouts.expired]);
|
|
8670
8751
|
if (!active) {
|
|
8671
8752
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
8672
8753
|
}
|
|
@@ -8675,7 +8756,7 @@ function LoadingTimeout({
|
|
|
8675
8756
|
ErrorBanner,
|
|
8676
8757
|
{
|
|
8677
8758
|
severity: "error",
|
|
8678
|
-
title: "
|
|
8759
|
+
title: t13("loading.taking_longer"),
|
|
8679
8760
|
message: `We're still trying to load the ${label}. The connection may be slow.`,
|
|
8680
8761
|
action: onRetry ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8681
8762
|
"button",
|
|
@@ -8777,6 +8858,7 @@ function NotificationCountBadge({
|
|
|
8777
8858
|
}
|
|
8778
8859
|
);
|
|
8779
8860
|
}
|
|
8861
|
+
var t14 = i18n.createPackageT("hazo_ui", en_default);
|
|
8780
8862
|
function NotificationItem({
|
|
8781
8863
|
isRead,
|
|
8782
8864
|
timestamp,
|
|
@@ -8807,7 +8889,7 @@ function NotificationItem({
|
|
|
8807
8889
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8808
8890
|
"span",
|
|
8809
8891
|
{
|
|
8810
|
-
"aria-label": "
|
|
8892
|
+
"aria-label": t14("notification.unread"),
|
|
8811
8893
|
className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
|
|
8812
8894
|
}
|
|
8813
8895
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
|
|
@@ -8831,12 +8913,13 @@ function NotificationItem({
|
|
|
8831
8913
|
}
|
|
8832
8914
|
);
|
|
8833
8915
|
}
|
|
8916
|
+
var t15 = i18n.createPackageT("hazo_ui", en_default);
|
|
8834
8917
|
function LoadingSkeletons() {
|
|
8835
8918
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8836
8919
|
"div",
|
|
8837
8920
|
{
|
|
8838
8921
|
"aria-busy": "true",
|
|
8839
|
-
"aria-label": "
|
|
8922
|
+
"aria-label": t15("notification.loading"),
|
|
8840
8923
|
className: "cls_notification_panel_loading space-y-0",
|
|
8841
8924
|
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8842
8925
|
"div",
|
|
@@ -8895,6 +8978,7 @@ function NotificationPanel({
|
|
|
8895
8978
|
}
|
|
8896
8979
|
);
|
|
8897
8980
|
}
|
|
8981
|
+
var t16 = i18n.createPackageT("hazo_ui", en_default);
|
|
8898
8982
|
function HazoUiToaster({
|
|
8899
8983
|
position = "bottom-right",
|
|
8900
8984
|
closeButton = true,
|
|
@@ -8940,12 +9024,12 @@ function permissionToast({
|
|
|
8940
9024
|
action,
|
|
8941
9025
|
duration = 5e3
|
|
8942
9026
|
}) {
|
|
8943
|
-
const description = missingPermissions.length === 0 ? "
|
|
9027
|
+
const description = missingPermissions.length === 0 ? t16("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
|
|
8944
9028
|
const label = descriptions?.[key];
|
|
8945
9029
|
return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
|
|
8946
9030
|
}).join("; ")}`;
|
|
8947
9031
|
return errorToast({
|
|
8948
|
-
title: "
|
|
9032
|
+
title: t16("toast.permission_required"),
|
|
8949
9033
|
description,
|
|
8950
9034
|
action,
|
|
8951
9035
|
duration
|
|
@@ -9140,41 +9224,55 @@ function useWakeLock() {
|
|
|
9140
9224
|
}
|
|
9141
9225
|
function useFullscreen(elementRef) {
|
|
9142
9226
|
const [is_fullscreen, set_is_fullscreen] = React27.useState(false);
|
|
9227
|
+
const supported = typeof document !== "undefined" && typeof document.documentElement.requestFullscreen === "function";
|
|
9143
9228
|
React27.useEffect(() => {
|
|
9144
|
-
if (typeof document === "undefined") return;
|
|
9229
|
+
if (typeof document === "undefined" || !supported) return;
|
|
9145
9230
|
const handle_change = () => {
|
|
9146
9231
|
set_is_fullscreen(!!document.fullscreenElement);
|
|
9147
9232
|
};
|
|
9148
9233
|
document.addEventListener("fullscreenchange", handle_change);
|
|
9149
9234
|
set_is_fullscreen(!!document.fullscreenElement);
|
|
9150
9235
|
return () => document.removeEventListener("fullscreenchange", handle_change);
|
|
9151
|
-
}, []);
|
|
9236
|
+
}, [supported]);
|
|
9152
9237
|
const get_target = React27.useCallback(() => {
|
|
9153
9238
|
return elementRef?.current ?? document.documentElement;
|
|
9154
9239
|
}, [elementRef]);
|
|
9155
9240
|
const enter = React27.useCallback(async () => {
|
|
9156
|
-
if (typeof document === "undefined"
|
|
9241
|
+
if (typeof document === "undefined") return;
|
|
9242
|
+
if (!supported) {
|
|
9243
|
+
set_is_fullscreen(true);
|
|
9244
|
+
return;
|
|
9245
|
+
}
|
|
9157
9246
|
if (document.fullscreenElement) return;
|
|
9158
9247
|
try {
|
|
9159
9248
|
await get_target().requestFullscreen();
|
|
9160
9249
|
} catch {
|
|
9161
9250
|
}
|
|
9162
|
-
}, [get_target]);
|
|
9251
|
+
}, [supported, get_target]);
|
|
9163
9252
|
const exit = React27.useCallback(async () => {
|
|
9164
9253
|
if (typeof document === "undefined") return;
|
|
9254
|
+
if (!supported) {
|
|
9255
|
+
set_is_fullscreen(false);
|
|
9256
|
+
return;
|
|
9257
|
+
}
|
|
9165
9258
|
if (!document.fullscreenElement) return;
|
|
9166
9259
|
try {
|
|
9167
9260
|
await document.exitFullscreen();
|
|
9168
9261
|
} catch {
|
|
9169
9262
|
}
|
|
9170
|
-
}, []);
|
|
9263
|
+
}, [supported]);
|
|
9171
9264
|
const toggle = React27.useCallback(async () => {
|
|
9265
|
+
if (!supported) {
|
|
9266
|
+
if (is_fullscreen) await exit();
|
|
9267
|
+
else await enter();
|
|
9268
|
+
return;
|
|
9269
|
+
}
|
|
9172
9270
|
if (document.fullscreenElement) {
|
|
9173
9271
|
await exit();
|
|
9174
9272
|
} else {
|
|
9175
9273
|
await enter();
|
|
9176
9274
|
}
|
|
9177
|
-
}, [enter, exit]);
|
|
9275
|
+
}, [supported, is_fullscreen, enter, exit]);
|
|
9178
9276
|
return { isFullscreen: is_fullscreen, enter, exit, toggle };
|
|
9179
9277
|
}
|
|
9180
9278
|
function use_wake_lock(active) {
|
|
@@ -9575,6 +9673,7 @@ function KanbanLaneStrip({
|
|
|
9575
9673
|
}
|
|
9576
9674
|
);
|
|
9577
9675
|
}
|
|
9676
|
+
var t17 = i18n.createPackageT("hazo_ui", en_default);
|
|
9578
9677
|
var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
|
|
9579
9678
|
function humanize(key) {
|
|
9580
9679
|
return key.replace(/[_\-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().split(" ").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
|
|
@@ -9589,7 +9688,7 @@ function auto_detect_fields(item, columns) {
|
|
|
9589
9688
|
}
|
|
9590
9689
|
}
|
|
9591
9690
|
if (columns.length > 0) {
|
|
9592
|
-
out.push({ key: "columnKey", type: "status", label: "
|
|
9691
|
+
out.push({ key: "columnKey", type: "status", label: t17("kanban.status_label") });
|
|
9593
9692
|
}
|
|
9594
9693
|
return out;
|
|
9595
9694
|
}
|
|
@@ -9686,7 +9785,7 @@ function KanbanEditor({
|
|
|
9686
9785
|
isDirty: is_dirty
|
|
9687
9786
|
};
|
|
9688
9787
|
const open = item !== null;
|
|
9689
|
-
const title = item && titleFn ? titleFn(item) : item ?
|
|
9788
|
+
const title = item && titleFn ? titleFn(item) : item ? t17("kanban.edit_fallback", { id: item.id }) : "";
|
|
9690
9789
|
const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
|
|
9691
9790
|
const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
|
|
9692
9791
|
const use_default_footer = !(renderBody && hideFooter);
|
|
@@ -9698,18 +9797,18 @@ function KanbanEditor({
|
|
|
9698
9797
|
if (!o && !saving) onClose();
|
|
9699
9798
|
},
|
|
9700
9799
|
title,
|
|
9701
|
-
description: "
|
|
9800
|
+
description: t17("kanban.update_description"),
|
|
9702
9801
|
sizeWidth: "min(90vw, 480px)",
|
|
9703
9802
|
openAnimation: "none",
|
|
9704
9803
|
closeAnimation: "none",
|
|
9705
9804
|
headerBar: !!priority_var,
|
|
9706
9805
|
headerBarColor: header_bar_color,
|
|
9707
9806
|
contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
|
|
9708
|
-
actionButtonText: saving ? "
|
|
9807
|
+
actionButtonText: saving ? t17("kanban.saving") : t17("kanban.save"),
|
|
9709
9808
|
actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 mr-2" }),
|
|
9710
9809
|
actionButtonLoading: saving,
|
|
9711
9810
|
actionButtonDisabled: !is_dirty || !all_required_filled || saving,
|
|
9712
|
-
cancelButtonText: "
|
|
9811
|
+
cancelButtonText: t17("kanban.cancel"),
|
|
9713
9812
|
showCancelButton: true,
|
|
9714
9813
|
onConfirm: handle_save,
|
|
9715
9814
|
onCancel: onClose,
|
|
@@ -9814,7 +9913,7 @@ function KanbanEditorFieldRow({
|
|
|
9814
9913
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9815
9914
|
SelectValue,
|
|
9816
9915
|
{
|
|
9817
|
-
placeholder: field.placeholder ??
|
|
9916
|
+
placeholder: field.placeholder ?? t17("kanban.select_placeholder", { label })
|
|
9818
9917
|
}
|
|
9819
9918
|
) }),
|
|
9820
9919
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: opt, children: opt }, opt)) })
|
|
@@ -9830,7 +9929,7 @@ function KanbanEditorFieldRow({
|
|
|
9830
9929
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9831
9930
|
SelectValue,
|
|
9832
9931
|
{
|
|
9833
|
-
placeholder: field.placeholder ?? "
|
|
9932
|
+
placeholder: field.placeholder ?? t17("kanban.select_priority")
|
|
9834
9933
|
}
|
|
9835
9934
|
) }),
|
|
9836
9935
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: p, children: p }, p)) })
|
|
@@ -9846,7 +9945,7 @@ function KanbanEditorFieldRow({
|
|
|
9846
9945
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9847
9946
|
SelectValue,
|
|
9848
9947
|
{
|
|
9849
|
-
placeholder: field.placeholder ?? "
|
|
9948
|
+
placeholder: field.placeholder ?? t17("kanban.select_status")
|
|
9850
9949
|
}
|
|
9851
9950
|
) }),
|
|
9852
9951
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
|
|
@@ -10794,7 +10893,7 @@ function serializeFilter(filter) {
|
|
|
10794
10893
|
const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
|
|
10795
10894
|
return `${filter.search ?? ""}|${fields}`;
|
|
10796
10895
|
}
|
|
10797
|
-
var
|
|
10896
|
+
var t18 = i18n.createPackageT("hazo_ui", en_default);
|
|
10798
10897
|
function HazoUiTable(props) {
|
|
10799
10898
|
const state = useTableState(props);
|
|
10800
10899
|
const { columns, rows, getRowKey, className, caption } = props;
|
|
@@ -10829,12 +10928,12 @@ function HazoUiTable(props) {
|
|
|
10829
10928
|
) }) : state.serverError != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_mobile_empty py-6", children: noActiveFilters(state.filter) && rows.length === 0 ? typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10830
10929
|
EmptyState,
|
|
10831
10930
|
{
|
|
10832
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
10931
|
+
title: typeof props.empty === "string" && props.empty || t18("table.empty")
|
|
10833
10932
|
}
|
|
10834
10933
|
) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10835
10934
|
EmptyState,
|
|
10836
10935
|
{
|
|
10837
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
10936
|
+
title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
|
|
10838
10937
|
}
|
|
10839
10938
|
) : props.noResults }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10840
10939
|
TableMobileCards,
|
|
@@ -10857,7 +10956,7 @@ function HazoUiTable(props) {
|
|
|
10857
10956
|
{
|
|
10858
10957
|
type: "button",
|
|
10859
10958
|
onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
|
|
10860
|
-
title:
|
|
10959
|
+
title: t18("table.sort_tooltip"),
|
|
10861
10960
|
className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
|
|
10862
10961
|
children: [
|
|
10863
10962
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: c.label }),
|
|
@@ -10889,12 +10988,12 @@ function HazoUiTable(props) {
|
|
|
10889
10988
|
children: noActiveFilters(state.filter) && rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_empty_wrap py-6", children: typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10890
10989
|
EmptyState,
|
|
10891
10990
|
{
|
|
10892
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
10991
|
+
title: typeof props.empty === "string" && props.empty || t18("table.empty")
|
|
10893
10992
|
}
|
|
10894
10993
|
) : props.empty }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_no_results_wrap py-6", children: typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10895
10994
|
EmptyState,
|
|
10896
10995
|
{
|
|
10897
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
10996
|
+
title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
|
|
10898
10997
|
}
|
|
10899
10998
|
) : props.noResults })
|
|
10900
10999
|
}
|
|
@@ -11008,7 +11107,7 @@ function PaginationFooter({
|
|
|
11008
11107
|
const end = Math.min((page + 1) * pageSize, total);
|
|
11009
11108
|
const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
|
|
11010
11109
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
|
|
11011
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children:
|
|
11110
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t18("table.showing", {
|
|
11012
11111
|
start: String(start),
|
|
11013
11112
|
end: String(end),
|
|
11014
11113
|
total: String(total)
|
|
@@ -11021,8 +11120,8 @@ function PaginationFooter({
|
|
|
11021
11120
|
size: "sm",
|
|
11022
11121
|
onClick: () => onPageChange(Math.max(0, page - 1)),
|
|
11023
11122
|
disabled: page === 0,
|
|
11024
|
-
"aria-label":
|
|
11025
|
-
children:
|
|
11123
|
+
"aria-label": t18("table.prev_aria"),
|
|
11124
|
+
children: t18("table.prev")
|
|
11026
11125
|
}
|
|
11027
11126
|
),
|
|
11028
11127
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11032,8 +11131,8 @@ function PaginationFooter({
|
|
|
11032
11131
|
size: "sm",
|
|
11033
11132
|
onClick: () => onPageChange(Math.min(lastPage, page + 1)),
|
|
11034
11133
|
disabled: page >= lastPage,
|
|
11035
|
-
"aria-label":
|
|
11036
|
-
children:
|
|
11134
|
+
"aria-label": t18("table.next_aria"),
|
|
11135
|
+
children: t18("table.next")
|
|
11037
11136
|
}
|
|
11038
11137
|
)
|
|
11039
11138
|
] })
|
|
@@ -11077,7 +11176,7 @@ function Toolbar2(props) {
|
|
|
11077
11176
|
setSearchValue(v);
|
|
11078
11177
|
onSearchChange(v);
|
|
11079
11178
|
},
|
|
11080
|
-
placeholder: searchPlaceholder ??
|
|
11179
|
+
placeholder: searchPlaceholder ?? t18("table.search_placeholder"),
|
|
11081
11180
|
className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
|
|
11082
11181
|
}
|
|
11083
11182
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
@@ -11125,8 +11224,8 @@ function renderErrorState(error, serverError) {
|
|
|
11125
11224
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11126
11225
|
EmptyState,
|
|
11127
11226
|
{
|
|
11128
|
-
title:
|
|
11129
|
-
description: msg ||
|
|
11227
|
+
title: t18("table.error_title"),
|
|
11228
|
+
description: msg || t18("table.error_description")
|
|
11130
11229
|
}
|
|
11131
11230
|
);
|
|
11132
11231
|
}
|
|
@@ -11362,18 +11461,20 @@ function StackedBars({
|
|
|
11362
11461
|
}
|
|
11363
11462
|
);
|
|
11364
11463
|
}
|
|
11464
|
+
var t19 = i18n.createPackageT("hazo_ui", en_default);
|
|
11365
11465
|
function DateRangeSelector({
|
|
11366
11466
|
value,
|
|
11367
11467
|
onChange,
|
|
11368
11468
|
options,
|
|
11369
11469
|
className,
|
|
11370
|
-
ariaLabel
|
|
11470
|
+
ariaLabel
|
|
11371
11471
|
}) {
|
|
11472
|
+
const resolved_aria = ariaLabel ?? t19("charts.date_range");
|
|
11372
11473
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11373
11474
|
"div",
|
|
11374
11475
|
{
|
|
11375
11476
|
role: "group",
|
|
11376
|
-
"aria-label":
|
|
11477
|
+
"aria-label": resolved_aria,
|
|
11377
11478
|
className: cn(
|
|
11378
11479
|
"cls_hazo_date_range_selector inline-flex items-center gap-0 rounded-md border bg-background p-0.5",
|
|
11379
11480
|
className
|
|
@@ -11616,6 +11717,7 @@ function FunnelChart({
|
|
|
11616
11717
|
|
|
11617
11718
|
// src/assets/celebration-chime.mp3
|
|
11618
11719
|
var celebration_chime_default = "data:text/plain;charset=utf-8,";
|
|
11720
|
+
var t20 = i18n.createPackageT("hazo_ui", en_default);
|
|
11619
11721
|
var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
|
|
11620
11722
|
var CARD_SIZE = 1080;
|
|
11621
11723
|
var PREVIEW_SIZE = 400;
|
|
@@ -11813,7 +11915,7 @@ function CelebrationModalInner({
|
|
|
11813
11915
|
{
|
|
11814
11916
|
className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
|
|
11815
11917
|
onClick: close_modal,
|
|
11816
|
-
"aria-label": "
|
|
11918
|
+
"aria-label": t20("celebration.close"),
|
|
11817
11919
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 text-gray-600" })
|
|
11818
11920
|
}
|
|
11819
11921
|
),
|
|
@@ -11876,21 +11978,21 @@ function CelebrationModalInner({
|
|
|
11876
11978
|
disabled: is_downloading,
|
|
11877
11979
|
children: [
|
|
11878
11980
|
is_downloading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
11879
|
-
"
|
|
11981
|
+
t20("celebration.download_png")
|
|
11880
11982
|
]
|
|
11881
11983
|
}
|
|
11882
11984
|
),
|
|
11883
11985
|
can_share && /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
|
|
11884
11986
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
11885
|
-
"
|
|
11987
|
+
t20("celebration.share")
|
|
11886
11988
|
] }),
|
|
11887
11989
|
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
|
|
11888
11990
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
11889
|
-
"
|
|
11991
|
+
t20("celebration.copy_image")
|
|
11890
11992
|
] })
|
|
11891
11993
|
] })
|
|
11892
11994
|
] }),
|
|
11893
|
-
!shareableCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: close_modal, children: "
|
|
11995
|
+
!shareableCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: close_modal, children: t20("celebration.dismiss") }) })
|
|
11894
11996
|
]
|
|
11895
11997
|
}
|
|
11896
11998
|
)
|
|
@@ -11912,8 +12014,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
|
|
|
11912
12014
|
}
|
|
11913
12015
|
function easeToward(elapsed, eta, maxCap = 0.95) {
|
|
11914
12016
|
if (eta <= 0 || elapsed <= 0) return 0;
|
|
11915
|
-
const
|
|
11916
|
-
return maxCap * (1 - Math.exp(-1.5 *
|
|
12017
|
+
const t22 = elapsed / eta;
|
|
12018
|
+
return maxCap * (1 - Math.exp(-1.5 * t22));
|
|
11917
12019
|
}
|
|
11918
12020
|
function HazoUiProgressBar({
|
|
11919
12021
|
value,
|
|
@@ -11944,7 +12046,7 @@ function HazoUiProgressBar({
|
|
|
11944
12046
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11945
12047
|
"div",
|
|
11946
12048
|
{
|
|
11947
|
-
className: "h-full rounded-full bg-
|
|
12049
|
+
className: "h-full rounded-full bg-primary transition-[width] duration-200 ease-out motion-reduce:transition-none",
|
|
11948
12050
|
style: { width: `${pct}%` }
|
|
11949
12051
|
}
|
|
11950
12052
|
)
|
|
@@ -12031,6 +12133,8 @@ function HazoUiEtaProgress({
|
|
|
12031
12133
|
fallbackUnitMs = 5e3,
|
|
12032
12134
|
level = "global",
|
|
12033
12135
|
label,
|
|
12136
|
+
showPercent,
|
|
12137
|
+
size,
|
|
12034
12138
|
endpoint,
|
|
12035
12139
|
handleRef,
|
|
12036
12140
|
className
|
|
@@ -12065,6 +12169,8 @@ function HazoUiEtaProgress({
|
|
|
12065
12169
|
{
|
|
12066
12170
|
value: handle.value,
|
|
12067
12171
|
label,
|
|
12172
|
+
showPercent,
|
|
12173
|
+
size,
|
|
12068
12174
|
className
|
|
12069
12175
|
}
|
|
12070
12176
|
);
|
|
@@ -12085,13 +12191,16 @@ function upsertEntry(entries, entry) {
|
|
|
12085
12191
|
function removeEntry(entries, id) {
|
|
12086
12192
|
return entries.filter((e) => e.id !== id);
|
|
12087
12193
|
}
|
|
12194
|
+
var t21 = i18n.createPackageT("hazo_ui", en_default);
|
|
12088
12195
|
function HazoUiMemoryDropdown({
|
|
12089
12196
|
history_key,
|
|
12090
|
-
placeholder
|
|
12197
|
+
placeholder,
|
|
12091
12198
|
on_select,
|
|
12092
12199
|
add_entry,
|
|
12093
|
-
empty_label
|
|
12200
|
+
empty_label
|
|
12094
12201
|
}) {
|
|
12202
|
+
const resolved_placeholder = placeholder ?? t21("memory.search_placeholder");
|
|
12203
|
+
const resolved_empty_label = empty_label ?? t21("memory.no_history");
|
|
12095
12204
|
const { value: stored, setValue } = client$2.useHazoState(history_key, {
|
|
12096
12205
|
level: "scope",
|
|
12097
12206
|
fallback: []
|
|
@@ -12129,7 +12238,7 @@ function HazoUiMemoryDropdown({
|
|
|
12129
12238
|
type: "text",
|
|
12130
12239
|
value: query,
|
|
12131
12240
|
onChange: (e) => setQuery(e.target.value),
|
|
12132
|
-
placeholder,
|
|
12241
|
+
placeholder: resolved_placeholder,
|
|
12133
12242
|
style: {
|
|
12134
12243
|
width: "100%",
|
|
12135
12244
|
background: "#FFFFFF",
|
|
@@ -12159,7 +12268,7 @@ function HazoUiMemoryDropdown({
|
|
|
12159
12268
|
fontStyle: "italic",
|
|
12160
12269
|
fontSize: 13
|
|
12161
12270
|
},
|
|
12162
|
-
children:
|
|
12271
|
+
children: resolved_empty_label
|
|
12163
12272
|
}
|
|
12164
12273
|
) : filtered.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12165
12274
|
EntryRow,
|
|
@@ -12216,7 +12325,7 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
12216
12325
|
onClick: (e) => onDelete(entry.id, e),
|
|
12217
12326
|
onMouseEnter: () => setDeleteHovered(true),
|
|
12218
12327
|
onMouseLeave: () => setDeleteHovered(false),
|
|
12219
|
-
"aria-label":
|
|
12328
|
+
"aria-label": t21("memory.remove_aria", { label: entry.label }),
|
|
12220
12329
|
style: {
|
|
12221
12330
|
flexShrink: 0,
|
|
12222
12331
|
background: "none",
|