pixelon 0.9.0 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/types.d.ts +2 -0
- package/dist/components/molecules/chat/StructuredContent/components/SupportRequestForm/SupportRequestForm.d.ts +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +384 -302
- package/dist/index.js +384 -301
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/src/styles/index.scss +1 -0
- package/dist/components/atoms/chat/AudioWaves/AudioWaves(1).d.ts +0 -21
- package/dist/components/atoms/chat/AudioWaves/index(1).d.ts +0 -2
- package/dist/components/atoms/chat/DateDivider/DateDivider(1).d.ts +0 -7
- package/dist/components/atoms/chat/Loader/Loader(1).d.ts +0 -10
- package/dist/components/atoms/chat/Loader/index(1).d.ts +0 -2
- package/dist/components/atoms/chat/Select/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/Button/Button(1).d.ts +0 -17
- package/dist/components/atoms/lumi/Checkbox/Checkbox(1).d.ts +0 -5
- package/dist/components/atoms/lumi/Checkbox/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/Checkbox/index(2).d.ts +0 -2
- package/dist/components/atoms/lumi/Checkbox/types(1).d.ts +0 -93
- package/dist/components/atoms/lumi/CurrencyDisplay/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/DateDisplay/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/DateDisplay/index(2).d.ts +0 -2
- package/dist/components/atoms/lumi/DateInput/DateInput(1).d.ts +0 -27
- package/dist/components/atoms/lumi/DateInput/WebDatePicker(1).d.ts +0 -19
- package/dist/components/atoms/lumi/DateInput/WebDatePicker(2).d.ts +0 -19
- package/dist/components/atoms/lumi/Icon/Icon(1).d.ts +0 -52
- package/dist/components/atoms/lumi/Input/index(1).d.ts +0 -3
- package/dist/components/atoms/lumi/Popover/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/Popover/types(1).d.ts +0 -62
- package/dist/components/atoms/lumi/TextArea/index(1).d.ts +0 -2
- package/dist/components/atoms/lumi/TextArea/types(1).d.ts +0 -35
- package/dist/components/atoms/lumi/TimeInput/TimeInput(1).d.ts +0 -27
- package/dist/components/atoms/lumi/TimeInput/TimeInput(2).d.ts +0 -27
- package/dist/components/molecules/chat/FullscreenViewer/hooks/useSwipeGestures(1).d.ts +0 -12
- package/dist/components/molecules/chat/StructuredContent/StructuredContent(1).d.ts +0 -10
- package/dist/components/molecules/chat/StructuredContent/components/Cart/Cart.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/components/ProductCard/ProductCard.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/components/ProductCarousel/ProductCarousel.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/components/ProductManager/ProductManager.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/PriceNegotiationChat.d.ts +0 -4
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/DynamicField(1).d.ts +0 -13
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/buildYupSchema(1).d.ts +0 -4
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/types(1).d.ts +0 -91
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(1).d.ts +0 -17
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveEndpoints(2).d.ts +0 -23
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveForm/useReactiveForm(1).d.ts +0 -38
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMap.d.ts +0 -12
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMapChat.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/types.d.ts +0 -36
- package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcutsChat.d.ts +0 -3
- package/dist/components/molecules/chat/StructuredContent/helpers/contentParser(1).d.ts +0 -7
- package/dist/components/molecules/chat/StructuredContent/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(1).d.ts +0 -10
- package/dist/components/molecules/lumi/Breadcrumb/Breadcrumb(2).d.ts +0 -10
- package/dist/components/molecules/lumi/Breadcrumb/types(1).d.ts +0 -105
- package/dist/components/molecules/lumi/Checkbox/Checkbox(1).d.ts +0 -11
- package/dist/components/molecules/lumi/Checkbox/index(1).d.ts +0 -4
- package/dist/components/molecules/lumi/Checkbox/use-cases/index(1).d.ts +0 -1
- package/dist/components/molecules/lumi/Checkbox/validation-helpers(1).d.ts +0 -151
- package/dist/components/molecules/lumi/DateInput/FormDateInput(1).d.ts +0 -12
- package/dist/components/molecules/lumi/DateInput/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputClearWithResetUseCase(1).d.ts +0 -21
- package/dist/components/molecules/lumi/DateInput/use-cases/FormDateInputErrorVisibilityUseCase(1).d.ts +0 -21
- package/dist/components/molecules/lumi/Drawer/Drawer(1).d.ts +0 -39
- package/dist/components/molecules/lumi/Drawer/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/DropdownMenu/DropdownMenu(1).d.ts +0 -22
- package/dist/components/molecules/lumi/DropdownMenu/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/DropdownMenu/types(1).d.ts +0 -29
- package/dist/components/molecules/lumi/Filter/FilterRow(1).d.ts +0 -13
- package/dist/components/molecules/lumi/Filter/helpers/conditionHelpers(1).d.ts +0 -14
- package/dist/components/molecules/lumi/Filter/index(1).d.ts +0 -5
- package/dist/components/molecules/lumi/Filter/types(1).d.ts +0 -115
- package/dist/components/molecules/lumi/Input/Input(1).d.ts +0 -12
- package/dist/components/molecules/lumi/Menu/Menu(1).d.ts +0 -18
- package/dist/components/molecules/lumi/Menu/MenuContext(1).d.ts +0 -41
- package/dist/components/molecules/lumi/Menu/MenuItem(1).d.ts +0 -6
- package/dist/components/molecules/lumi/Menu/MenuItem(2).d.ts +0 -6
- package/dist/components/molecules/lumi/Menu/MenuItemGroup(1).d.ts +0 -6
- package/dist/components/molecules/lumi/Menu/SubMenu(1).d.ts +0 -6
- package/dist/components/molecules/lumi/Menu/iconHelper(1).d.ts +0 -15
- package/dist/components/molecules/lumi/Menu/index(1).d.ts +0 -8
- package/dist/components/molecules/lumi/Menu/index(2).d.ts +0 -8
- package/dist/components/molecules/lumi/Menu/types(1).d.ts +0 -119
- package/dist/components/molecules/lumi/Pagination/Pagination(1).d.ts +0 -4
- package/dist/components/molecules/lumi/Pagination/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Select/Select(1).d.ts +0 -14
- package/dist/components/molecules/lumi/Select/Select(2).d.ts +0 -14
- package/dist/components/molecules/lumi/Select/Select(3).d.ts +0 -14
- package/dist/components/molecules/lumi/Select/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Select/index(2).d.ts +0 -2
- package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(1).d.ts +0 -21
- package/dist/components/molecules/lumi/Select/use-cases/FormSelectClearWithResetUseCase(2).d.ts +0 -21
- package/dist/components/molecules/lumi/Select/use-cases/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Select/use-cases/index(2).d.ts +0 -2
- package/dist/components/molecules/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +0 -25
- package/dist/components/molecules/lumi/SessionExpiryPrompt/index.d.ts +0 -1
- package/dist/components/molecules/lumi/Table/Table(1).d.ts +0 -6
- package/dist/components/molecules/lumi/Table/Table(2).d.ts +0 -6
- package/dist/components/molecules/lumi/Table/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Table/types(1).d.ts +0 -177
- package/dist/components/molecules/lumi/Table/types(2).d.ts +0 -177
- package/dist/components/molecules/lumi/Tabs/Tabs(1).d.ts +0 -4
- package/dist/components/molecules/lumi/Tabs/Tabs(2).d.ts +0 -4
- package/dist/components/molecules/lumi/Tabs/index(1).d.ts +0 -2
- package/dist/components/molecules/lumi/Tabs/index(2).d.ts +0 -2
- package/dist/components/molecules/lumi/TimeInput/FormTimeInput(1).d.ts +0 -12
- package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputClearWithResetUseCase(1).d.ts +0 -21
- package/dist/components/molecules/lumi/TimeInput/use-cases/FormTimeInputErrorVisibilityUseCase(1).d.ts +0 -21
- package/dist/components/molecules/lumi/TimeInput/use-cases/index(1).d.ts +0 -4
- package/dist/components/organisms/chat/Chat/Chat(1).d.ts +0 -12
- package/dist/components/organisms/chat/Chat/hooks/useChatHandlers(1).d.ts +0 -15
- package/dist/components/organisms/chat/Chat/hooks/useKeyboardLock(1).d.ts +0 -15
- package/dist/components/organisms/chat/Chat/index(1).d.ts +0 -3
- package/dist/components/organisms/chat/Chat/store/index(1).d.ts +0 -4
- package/dist/components/organisms/chat/Chat/use-cases/GroupMessagesByDateUseCase(1).d.ts +0 -20
- package/dist/components/organisms/chat/index(1).d.ts +0 -3
- package/dist/components/organisms/chat/index(2).d.ts +0 -3
- package/dist/components/organisms/lumi/ActionBar/ActionBar(1).d.ts +0 -18
- package/dist/components/organisms/lumi/ActionBar/types(1).d.ts +0 -57
- package/dist/components/organisms/lumi/BaseNavbar/types(1).d.ts +0 -34
- package/dist/components/organisms/lumi/BaseWorkspace/BaseWorkspace(1).d.ts +0 -28
- package/dist/components/organisms/lumi/BaseWorkspace/index(1).d.ts +0 -2
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(1).d.ts +0 -18
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(2).d.ts +0 -18
- package/dist/components/organisms/lumi/Calendar/components/CalendarEvent(3).d.ts +0 -18
- package/dist/components/organisms/lumi/Calendar/components/CalendarHeader(1).d.ts +0 -14
- package/dist/components/organisms/lumi/Calendar/components/TimeGutter(1).d.ts +0 -10
- package/dist/components/organisms/lumi/Calendar/components/TimeGutter(2).d.ts +0 -10
- package/dist/components/organisms/lumi/Calendar/hooks/index(1).d.ts +0 -4
- package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(1).d.ts +0 -58
- package/dist/components/organisms/lumi/Calendar/hooks/useCalendarHeight(2).d.ts +0 -58
- package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(1).d.ts +0 -21
- package/dist/components/organisms/lumi/Calendar/hooks/useEventLayout(2).d.ts +0 -21
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(1).d.ts +0 -14
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(2).d.ts +0 -14
- package/dist/components/organisms/lumi/Calendar/hooks/useTimeSlots(3).d.ts +0 -14
- package/dist/components/organisms/lumi/Calendar/i18n/index(1).d.ts +0 -1
- package/dist/components/organisms/lumi/Calendar/i18n/index(2).d.ts +0 -1
- package/dist/components/organisms/lumi/Calendar/i18n/translations(1).d.ts +0 -34
- package/dist/components/organisms/lumi/Calendar/index(1).d.ts +0 -2
- package/dist/components/organisms/lumi/Calendar/utils/dateUtils(1).d.ts +0 -140
- package/dist/components/organisms/lumi/Calendar/utils/dateUtils(2).d.ts +0 -140
- package/dist/components/organisms/lumi/Calendar/utils/index(1).d.ts +0 -2
- package/dist/components/organisms/lumi/Calendar/utils/multiDayUtils(1).d.ts +0 -73
- package/dist/components/organisms/lumi/Calendar/views/DayView(1).d.ts +0 -17
- package/dist/components/organisms/lumi/Calendar/views/DayView(2).d.ts +0 -17
- package/dist/components/organisms/lumi/Calendar/views/MonthView(1).d.ts +0 -17
- package/dist/components/organisms/lumi/Calendar/views/MonthView(2).d.ts +0 -17
- package/dist/components/organisms/lumi/Calendar/views/WeekView(1).d.ts +0 -19
- package/dist/components/organisms/lumi/Calendar/views/WeekView(2).d.ts +0 -19
- package/dist/components/organisms/lumi/Calendar/views/YearView(1).d.ts +0 -13
- package/dist/components/organisms/lumi/Calendar/views/index(1).d.ts +0 -4
- package/dist/components/organisms/lumi/Calendar/views/index(2).d.ts +0 -4
- package/dist/components/organisms/lumi/DashboardNavbar/index(1).d.ts +0 -7
- package/dist/components/organisms/lumi/DashboardNavbar/types(1).d.ts +0 -52
- package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(1).d.ts +0 -23
- package/dist/components/organisms/lumi/DashboardWorkspace/DashboardWorkspace(2).d.ts +0 -23
- package/dist/components/organisms/lumi/DashboardWorkspace/index(1).d.ts +0 -7
- package/dist/components/organisms/lumi/DashboardWorkspace/index(2).d.ts +0 -7
- package/dist/components/organisms/lumi/DashboardWorkspace/types(1).d.ts +0 -60
- package/dist/components/organisms/lumi/DashboardWorkspace/types(2).d.ts +0 -60
- package/dist/components/organisms/lumi/DynamicForm/DynamicForm(1).d.ts +0 -21
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(1).d.ts +0 -17
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldMapper(2).d.ts +0 -17
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(1).d.ts +0 -6
- package/dist/components/organisms/lumi/DynamicForm/helpers/fieldRenderer(2).d.ts +0 -6
- package/dist/components/organisms/lumi/DynamicForm/index(1).d.ts +0 -2
- package/dist/components/organisms/lumi/DynamicForm/index(2).d.ts +0 -2
- package/dist/components/organisms/lumi/DynamicForm/types(1).d.ts +0 -96
- package/dist/components/organisms/lumi/DynamicForm/types(2).d.ts +0 -96
- package/dist/components/organisms/lumi/FormDrawer/FormDrawer(1).d.ts +0 -5
- package/dist/components/organisms/lumi/FormDrawer/index(1).d.ts +0 -3
- package/dist/components/organisms/lumi/FormDrawer/types(1).d.ts +0 -61
- package/dist/components/organisms/lumi/FormDrawer/types(2).d.ts +0 -61
- package/dist/components/organisms/lumi/Stepper/StepIndicator(1).d.ts +0 -4
- package/dist/components/organisms/lumi/Stepper/Stepper(1).d.ts +0 -5
- package/dist/components/organisms/lumi/Stepper/index(1).d.ts +0 -3
- package/dist/components/organisms/lumi/Stepper/types(1).d.ts +0 -96
- package/dist/components/organisms/lumi/Stepper/types(2).d.ts +0 -96
- package/dist/components/organisms/lumi/index(1).d.ts +0 -10
- package/dist/components/organisms/lumi/index(2).d.ts +0 -10
- package/dist/components/templates/chat/ChatWidget/ChatWidget(1).d.ts +0 -10
- package/dist/components/templates/chat/ChatWidget/hooks/index(1).d.ts +0 -1
- package/dist/components/templates/chat/ChatWidget/index(1).d.ts +0 -2
- package/dist/components/templates/chat/ChatWidget/index(2).d.ts +0 -2
- package/dist/components/templates/chat/ChatWidget/types(1).d.ts +0 -90
- package/dist/components/templates/lumi/Base/hooks/index(1).d.ts +0 -2
- package/dist/components/templates/lumi/Base/hooks/useAppHeight(1).d.ts +0 -21
- package/dist/components/templates/lumi/Base/index(1).d.ts +0 -2
- package/dist/components/templates/lumi/Base/types(1).d.ts +0 -54
- package/dist/components/templates/lumi/Crud/Crud(1).d.ts +0 -6
- package/dist/components/templates/lumi/Crud/Crud(2).d.ts +0 -6
- package/dist/components/templates/lumi/Crud/ScrollToEnd.d.ts +0 -18
- package/dist/components/templates/lumi/Crud/helpers/fieldMapper(1).d.ts +0 -13
- package/dist/components/templates/lumi/Crud/hooks/useCrudActions(1).d.ts +0 -11
- package/dist/components/templates/lumi/Crud/index(1).d.ts +0 -2
- package/dist/components/templates/lumi/Crud/store/actions(1).d.ts +0 -45
- package/dist/components/templates/lumi/Crud/store/crudStore(1).d.ts +0 -8
- package/dist/components/templates/lumi/Crud/store/index(1).d.ts +0 -5
- package/dist/components/templates/lumi/Crud/store/types(1).d.ts +0 -71
- package/dist/components/templates/lumi/Dashboard/Dashboard(1).d.ts +0 -25
- package/dist/components/templates/lumi/Dashboard/hooks/index(1).d.ts +0 -12
- package/dist/components/templates/lumi/Dashboard/hooks/index(2).d.ts +0 -12
- package/dist/components/templates/lumi/Dashboard/hooks/useDashboardStore(1).d.ts +0 -34
- package/dist/components/templates/lumi/Dashboard/hooks/useScrollToTop(1).d.ts +0 -47
- package/dist/components/templates/lumi/Dashboard/index(1).d.ts +0 -10
- package/dist/components/templates/lumi/Dashboard/store/storeKeys(1).d.ts +0 -13
- package/dist/components/templates/lumi/Dashboard/store/types(1).d.ts +0 -73
- package/dist/components/templates/lumi/Dashboard/store/types(2).d.ts +0 -73
- package/dist/components/templates/lumi/Dashboard/types(1).d.ts +0 -114
- package/dist/components/templates/lumi/Dashboard/types(2).d.ts +0 -114
- package/dist/components/templates/lumi/index(1).d.ts +0 -3
- package/dist/core/chat/ChatConfigContext(1).d.ts +0 -36
- package/dist/index(1).esm.js +0 -19378
- package/dist/index(1).js +0 -19487
package/dist/index.esm.js
CHANGED
|
@@ -7343,6 +7343,7 @@ const Input$1 = forwardRef(
|
|
|
7343
7343
|
);
|
|
7344
7344
|
Input$1.displayName = "Input";
|
|
7345
7345
|
|
|
7346
|
+
const sinTildes = (s) => s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
7346
7347
|
const Select$1 = forwardRef(
|
|
7347
7348
|
({
|
|
7348
7349
|
options = [],
|
|
@@ -7391,7 +7392,7 @@ const Select$1 = forwardRef(
|
|
|
7391
7392
|
const selectorRef = useRef(null);
|
|
7392
7393
|
const [dropdownPosition, setDropdownPosition] = useState(null);
|
|
7393
7394
|
const filteredOptions = showSearch && searchValue ? options.filter(
|
|
7394
|
-
(option) => filterOption ? filterOption(searchValue, option) : option.label
|
|
7395
|
+
(option) => filterOption ? filterOption(searchValue, option) : sinTildes(option.label).includes(sinTildes(searchValue))
|
|
7395
7396
|
) : options;
|
|
7396
7397
|
const isOptionSelected = (option) => {
|
|
7397
7398
|
if (mode === "multiple") {
|
|
@@ -13185,19 +13186,19 @@ function mapFieldsToFormFields(fields, mode) {
|
|
|
13185
13186
|
}));
|
|
13186
13187
|
}
|
|
13187
13188
|
|
|
13188
|
-
const CLASS$
|
|
13189
|
+
const CLASS$h = `${COMPONENT_PREFIX}field-value`;
|
|
13189
13190
|
const FieldValue = ({
|
|
13190
13191
|
label,
|
|
13191
13192
|
children,
|
|
13192
13193
|
layout = "inline",
|
|
13193
13194
|
className
|
|
13194
|
-
}) => /* @__PURE__ */ jsxs("div", { className: [CLASS$
|
|
13195
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
13196
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
13195
|
+
}) => /* @__PURE__ */ jsxs("div", { className: [CLASS$h, `${CLASS$h}--${layout}`, className].filter(Boolean).join(" "), children: [
|
|
13196
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$h}__label`, children: label }),
|
|
13197
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$h}__value`, children })
|
|
13197
13198
|
] });
|
|
13198
13199
|
FieldValue.displayName = "FieldValue";
|
|
13199
13200
|
|
|
13200
|
-
const CLASS$
|
|
13201
|
+
const CLASS$g = `${COMPONENT_PREFIX}record-card`;
|
|
13201
13202
|
const RecordCard = ({
|
|
13202
13203
|
title,
|
|
13203
13204
|
summary,
|
|
@@ -13209,20 +13210,20 @@ const RecordCard = ({
|
|
|
13209
13210
|
className
|
|
13210
13211
|
}) => {
|
|
13211
13212
|
const cuerpoId = useId();
|
|
13212
|
-
return /* @__PURE__ */ jsxs("div", { className: [CLASS$
|
|
13213
|
+
return /* @__PURE__ */ jsxs("div", { className: [CLASS$g, open ? `${CLASS$g}--open` : "", className].filter(Boolean).join(" "), children: [
|
|
13213
13214
|
/* @__PURE__ */ jsxs(
|
|
13214
13215
|
"button",
|
|
13215
13216
|
{
|
|
13216
13217
|
type: "button",
|
|
13217
|
-
className: `${CLASS$
|
|
13218
|
+
className: `${CLASS$g}__header`,
|
|
13218
13219
|
"aria-expanded": open,
|
|
13219
13220
|
"aria-controls": cuerpoId,
|
|
13220
13221
|
"aria-label": ariaLabel,
|
|
13221
13222
|
onClick: onToggle,
|
|
13222
13223
|
children: [
|
|
13223
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
13224
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
13225
|
-
summary && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
13224
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$g}__heading`, children: [
|
|
13225
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$g}__title`, children: title }),
|
|
13226
|
+
summary && /* @__PURE__ */ jsx("span", { className: `${CLASS$g}__summary`, children: summary })
|
|
13226
13227
|
] }),
|
|
13227
13228
|
/* @__PURE__ */ jsx(
|
|
13228
13229
|
Icon,
|
|
@@ -13230,22 +13231,22 @@ const RecordCard = ({
|
|
|
13230
13231
|
type: open ? "chevron-up" : "chevron-down",
|
|
13231
13232
|
width: 18,
|
|
13232
13233
|
height: 18,
|
|
13233
|
-
className: `${CLASS$
|
|
13234
|
+
className: `${CLASS$g}__chevron`,
|
|
13234
13235
|
"aria-hidden": true
|
|
13235
13236
|
}
|
|
13236
13237
|
)
|
|
13237
13238
|
]
|
|
13238
13239
|
}
|
|
13239
13240
|
),
|
|
13240
|
-
open && /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
13241
|
+
open && /* @__PURE__ */ jsxs("div", { className: `${CLASS$g}__body`, id: cuerpoId, children: [
|
|
13241
13242
|
children,
|
|
13242
|
-
actions && /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
13243
|
+
actions && /* @__PURE__ */ jsx("div", { className: `${CLASS$g}__actions`, children: actions })
|
|
13243
13244
|
] })
|
|
13244
13245
|
] });
|
|
13245
13246
|
};
|
|
13246
13247
|
RecordCard.displayName = "RecordCard";
|
|
13247
13248
|
|
|
13248
|
-
const CLASS$
|
|
13249
|
+
const CLASS$f = `${COMPONENT_PREFIX}crud-cards`;
|
|
13249
13250
|
function summaryFields(fields) {
|
|
13250
13251
|
const visibles = fields.filter((f) => f.showInTable !== false);
|
|
13251
13252
|
const marcados = visibles.filter((f) => f.summary);
|
|
@@ -13264,13 +13265,13 @@ function CardList({
|
|
|
13264
13265
|
const claveResumen = new Set(resumen.map((f) => f.key));
|
|
13265
13266
|
const cuerpo = fields.filter((f) => f.showInTable !== false && !claveResumen.has(f.key));
|
|
13266
13267
|
if (loading && rows.length === 0) {
|
|
13267
|
-
return /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
13268
|
+
return /* @__PURE__ */ jsx("div", { className: `${CLASS$f}__estado`, children: "Cargando..." });
|
|
13268
13269
|
}
|
|
13269
13270
|
if (rows.length === 0) {
|
|
13270
|
-
return /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
13271
|
+
return /* @__PURE__ */ jsx("div", { className: `${CLASS$f}__estado`, children: emptyText });
|
|
13271
13272
|
}
|
|
13272
13273
|
const [principal, ...secundarios] = resumen;
|
|
13273
|
-
return /* @__PURE__ */ jsx("div", { className: CLASS$
|
|
13274
|
+
return /* @__PURE__ */ jsx("div", { className: CLASS$f, children: rows.map((row) => {
|
|
13274
13275
|
const key = rowKey(row);
|
|
13275
13276
|
const opciones = buildOptions?.(row) ?? [];
|
|
13276
13277
|
const titulo = principal ? renderFieldValue(principal, row) : key;
|
|
@@ -13287,14 +13288,14 @@ function CardList({
|
|
|
13287
13288
|
{
|
|
13288
13289
|
type: "button",
|
|
13289
13290
|
className: [
|
|
13290
|
-
`${CLASS$
|
|
13291
|
+
`${CLASS$f}__accion`,
|
|
13291
13292
|
o.disabled && o.disabledReason ? "is-con-motivo" : ""
|
|
13292
13293
|
].filter(Boolean).join(" "),
|
|
13293
13294
|
disabled: o.disabled,
|
|
13294
13295
|
onClick: () => void o.onClick(),
|
|
13295
13296
|
children: [
|
|
13296
13297
|
/* @__PURE__ */ jsx("span", { children: o.label }),
|
|
13297
|
-
o.disabled && o.disabledReason && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
13298
|
+
o.disabled && o.disabledReason && /* @__PURE__ */ jsx("span", { className: `${CLASS$f}__motivo`, children: o.disabledReason })
|
|
13298
13299
|
]
|
|
13299
13300
|
},
|
|
13300
13301
|
o.label
|
|
@@ -13309,7 +13310,7 @@ function CardList({
|
|
|
13309
13310
|
}
|
|
13310
13311
|
CardList.displayName = "CardList";
|
|
13311
13312
|
|
|
13312
|
-
const CLASS$
|
|
13313
|
+
const CLASS$e = `${COMPONENT_PREFIX}crud-scroll-end`;
|
|
13313
13314
|
const MARGEN = 24;
|
|
13314
13315
|
const SELECTOR_CRUD = `.${COMPONENT_PREFIX}table-container, .${COMPONENT_PREFIX}crud-cards`;
|
|
13315
13316
|
const ScrollToEnd = ({
|
|
@@ -13353,7 +13354,7 @@ const ScrollToEnd = ({
|
|
|
13353
13354
|
s.scrollTo({ top: s.scrollHeight, behavior: "smooth" });
|
|
13354
13355
|
}, []);
|
|
13355
13356
|
if (!visible) return null;
|
|
13356
|
-
return /* @__PURE__ */ jsx("button", { type: "button", className: CLASS$
|
|
13357
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: CLASS$e, onClick: alFinal, "aria-label": label, title: label, children: /* @__PURE__ */ jsx(Icon, { type: "chevron-down", width: 18, height: 18, "aria-hidden": true }) });
|
|
13357
13358
|
};
|
|
13358
13359
|
ScrollToEnd.displayName = "ScrollToEnd";
|
|
13359
13360
|
|
|
@@ -14038,7 +14039,7 @@ function Crud({
|
|
|
14038
14039
|
}
|
|
14039
14040
|
Crud.displayName = "Crud";
|
|
14040
14041
|
|
|
14041
|
-
const CLASS$
|
|
14042
|
+
const CLASS$d = "px-chat-reactive-crud__chat-link";
|
|
14042
14043
|
function Burbuja() {
|
|
14043
14044
|
return /* @__PURE__ */ jsx(
|
|
14044
14045
|
"svg",
|
|
@@ -14065,7 +14066,7 @@ const ChatLinkCell = ({
|
|
|
14065
14066
|
if (targets.length === 1) {
|
|
14066
14067
|
const t = targets[0];
|
|
14067
14068
|
const texto = t.label ? `Abrir chat ${t.label}` : "Abrir chat";
|
|
14068
|
-
return /* @__PURE__ */ jsx("button", { type: "button", className: CLASS$
|
|
14069
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: CLASS$d, "aria-label": texto, title: texto, onClick: () => abrir(t.id), children: /* @__PURE__ */ jsx(Burbuja, {}) });
|
|
14069
14070
|
}
|
|
14070
14071
|
return /* @__PURE__ */ jsx(
|
|
14071
14072
|
DropdownMenu,
|
|
@@ -14079,7 +14080,7 @@ const ChatLinkCell = ({
|
|
|
14079
14080
|
"button",
|
|
14080
14081
|
{
|
|
14081
14082
|
type: "button",
|
|
14082
|
-
className: CLASS$
|
|
14083
|
+
className: CLASS$d,
|
|
14083
14084
|
"aria-label": `Abrir chat (${targets.length} conversaciones)`,
|
|
14084
14085
|
title: "Abrir chat",
|
|
14085
14086
|
children: /* @__PURE__ */ jsx(Burbuja, {})
|
|
@@ -14143,9 +14144,11 @@ const currency = (value) => {
|
|
|
14143
14144
|
if (isNaN(n)) return String(value ?? "");
|
|
14144
14145
|
return n.toLocaleString("es-CO", { style: "currency", currency: "COP", maximumFractionDigits: 0 });
|
|
14145
14146
|
};
|
|
14147
|
+
const SOLO_FECHA = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
14146
14148
|
const date = (value) => {
|
|
14147
14149
|
if (!value) return "";
|
|
14148
|
-
const
|
|
14150
|
+
const m = SOLO_FECHA.exec(String(value));
|
|
14151
|
+
const d = m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : new Date(String(value));
|
|
14149
14152
|
if (isNaN(d.getTime())) return String(value);
|
|
14150
14153
|
return d.toLocaleDateString("es-CO", { year: "numeric", month: "2-digit", day: "2-digit" });
|
|
14151
14154
|
};
|
|
@@ -14396,7 +14399,7 @@ function uploadViaEventBus(eventBus, file, fileType) {
|
|
|
14396
14399
|
});
|
|
14397
14400
|
}
|
|
14398
14401
|
|
|
14399
|
-
const CLASS$
|
|
14402
|
+
const CLASS$c = `${COMPONENT_PREFIX$1}file-field`;
|
|
14400
14403
|
function iconoPorNombre(nombre) {
|
|
14401
14404
|
const ext = nombre.split(".").pop()?.toLowerCase() ?? "";
|
|
14402
14405
|
if (["png", "jpg", "jpeg", "gif", "webp", "heic", "heif"].includes(ext)) return ICON_TYPES.IMAGE;
|
|
@@ -14427,18 +14430,18 @@ const FileField = ({
|
|
|
14427
14430
|
const elegir = () => {
|
|
14428
14431
|
if (!disabled) inputRef.current?.click();
|
|
14429
14432
|
};
|
|
14430
|
-
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
14431
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
14433
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$c}${error ? ` ${CLASS$c}--error` : ""}`, children: [
|
|
14434
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$c}__label`, children: [
|
|
14432
14435
|
label,
|
|
14433
14436
|
required ? " *" : "",
|
|
14434
14437
|
multiple && hechos > 0 ? ` (${hechos})` : ""
|
|
14435
14438
|
] }),
|
|
14436
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
14439
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$c}__box`, children: [
|
|
14437
14440
|
/* @__PURE__ */ jsx(
|
|
14438
14441
|
"input",
|
|
14439
14442
|
{
|
|
14440
14443
|
ref: inputRef,
|
|
14441
|
-
className: `${CLASS$
|
|
14444
|
+
className: `${CLASS$c}__native`,
|
|
14442
14445
|
type: "file",
|
|
14443
14446
|
accept,
|
|
14444
14447
|
multiple,
|
|
@@ -14449,14 +14452,14 @@ const FileField = ({
|
|
|
14449
14452
|
}
|
|
14450
14453
|
}
|
|
14451
14454
|
),
|
|
14452
|
-
/* @__PURE__ */ jsxs("button", { type: "button", className: `${CLASS$
|
|
14455
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: `${CLASS$c}__pick`, onClick: elegir, disabled, children: [
|
|
14453
14456
|
/* @__PURE__ */ jsx(Icon$1, { type: ICON_TYPES.UPLOAD, size: "small" }),
|
|
14454
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
14457
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$c}__pick-text`, children: entries.length === 0 ? multiple ? "Toca para elegir archivos" : "Toca para elegir un archivo" : multiple ? "A\xF1adir m\xE1s" : "Cambiar archivo" })
|
|
14455
14458
|
] }),
|
|
14456
|
-
entries.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$
|
|
14457
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
14458
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
14459
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
14459
|
+
entries.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$c}__list`, children: entries.map((e, i) => /* @__PURE__ */ jsxs("li", { className: `${CLASS$c}__item ${CLASS$c}__item--${e.status}`, children: [
|
|
14460
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$c}__kind`, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon$1, { type: iconoPorNombre(e.name), size: "small" }) }),
|
|
14461
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$c}__name`, children: e.name }),
|
|
14462
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$c}__state`, children: [
|
|
14460
14463
|
e.status === "uploading" && "Subiendo\u2026",
|
|
14461
14464
|
e.status === "done" && (pesoLegible(e.size) || "Listo"),
|
|
14462
14465
|
e.status === "error" && "No se pudo subir"
|
|
@@ -14465,7 +14468,7 @@ const FileField = ({
|
|
|
14465
14468
|
"button",
|
|
14466
14469
|
{
|
|
14467
14470
|
type: "button",
|
|
14468
|
-
className: `${CLASS$
|
|
14471
|
+
className: `${CLASS$c}__remove`,
|
|
14469
14472
|
onClick: () => onRemove(i),
|
|
14470
14473
|
"aria-label": `Quitar ${e.name}`,
|
|
14471
14474
|
disabled,
|
|
@@ -14474,8 +14477,8 @@ const FileField = ({
|
|
|
14474
14477
|
)
|
|
14475
14478
|
] }, `${e.name}-${i}`)) })
|
|
14476
14479
|
] }),
|
|
14477
|
-
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
14478
|
-
!error && subiendo && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
14480
|
+
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$c}__error`, children: error }),
|
|
14481
|
+
!error && subiendo && /* @__PURE__ */ jsx("p", { className: `${CLASS$c}__hint`, children: "Espera a que terminen de subir." })
|
|
14479
14482
|
] });
|
|
14480
14483
|
};
|
|
14481
14484
|
|
|
@@ -14635,7 +14638,13 @@ function ActionFormDrawer({ action, row, idField, eventBus, onExecute, onClose }
|
|
|
14635
14638
|
options: f.options ?? optionsByField[f.name],
|
|
14636
14639
|
// SPEC-106 T8 — `uiProps` llega tal cual a la molécula, así que el desplegable dice lo
|
|
14637
14640
|
// que pasó de verdad en vez del «no hay» de siempre. Sin error, se queda el de siempre.
|
|
14638
|
-
...optionsErrorByField[f.name]
|
|
14641
|
+
...optionsErrorByField[f.name] || f.searchable ? {
|
|
14642
|
+
uiProps: {
|
|
14643
|
+
...optionsErrorByField[f.name] ? { notFoundContent: optionsErrorByField[f.name] } : {},
|
|
14644
|
+
...f.searchable ? { showSearch: true } : {}
|
|
14645
|
+
// SPEC-174
|
|
14646
|
+
}
|
|
14647
|
+
} : {},
|
|
14639
14648
|
// SPEC-128 — el dinero se escribe como se escribe AQUÍ.
|
|
14640
14649
|
//
|
|
14641
14650
|
// Los campos de moneda caían a `thousandSeparator ?? ','`, un valor por defecto en formato
|
|
@@ -15631,7 +15640,7 @@ function buildMarkerIcon(name, color = "#dc2626", heading = 0) {
|
|
|
15631
15640
|
return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
|
|
15632
15641
|
}
|
|
15633
15642
|
|
|
15634
|
-
const CLASS$
|
|
15643
|
+
const CLASS$b = `${COMPONENT_PREFIX$1}map-view`;
|
|
15635
15644
|
const DEFAULT_CENTER = { lat: 4.711, lng: -74.0721 };
|
|
15636
15645
|
const DEFAULT_ZOOM = 12;
|
|
15637
15646
|
const DEFAULT_HEIGHT$1 = 320;
|
|
@@ -15932,23 +15941,23 @@ const MapView = ({
|
|
|
15932
15941
|
document.body.style.overflow = prev;
|
|
15933
15942
|
};
|
|
15934
15943
|
}, [expanded]);
|
|
15935
|
-
const rootClass = [CLASS$
|
|
15944
|
+
const rootClass = [CLASS$b, fullBleed && `${CLASS$b}--full-bleed`, className].filter(Boolean).join(" ");
|
|
15936
15945
|
if (overQuota) {
|
|
15937
|
-
return /* @__PURE__ */ jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
15946
|
+
return /* @__PURE__ */ jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.quotaText ?? "Se alcanz\xF3 el l\xEDmite diario de uso del mapa. Intenta ma\xF1ana." }) });
|
|
15938
15947
|
}
|
|
15939
15948
|
if (status === "error") {
|
|
15940
|
-
return /* @__PURE__ */ jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
15949
|
+
return /* @__PURE__ */ jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.errorText ?? "No se pudo cargar el mapa." }) });
|
|
15941
15950
|
}
|
|
15942
15951
|
return /* @__PURE__ */ jsxs("div", { className: rootClass, style: fullBleed ? void 0 : { height }, children: [
|
|
15943
|
-
status !== "ready" && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
15944
|
-
/* @__PURE__ */ jsx("div", { ref: nodeRef, className: `${CLASS$
|
|
15945
|
-
status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
15946
|
-
status === "ready" && onPointMove && list.length > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
15952
|
+
status !== "ready" && /* @__PURE__ */ jsx("p", { className: `${CLASS$b}__state`, children: labels?.loadingText ?? "Cargando mapa\u2026" }),
|
|
15953
|
+
/* @__PURE__ */ jsx("div", { ref: nodeRef, className: `${CLASS$b}__canvas`, "aria-label": "Mapa", role: "application" }),
|
|
15954
|
+
status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$b}__empty`, children: labels?.emptyText ?? "Sin ubicaciones para mostrar" }),
|
|
15955
|
+
status === "ready" && onPointMove && list.length > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$b}__empty`, children: labels?.moveHint ?? "Arrastra el pin o toca el mapa para ajustar" }),
|
|
15947
15956
|
status === "ready" && expandable && !fullBleed && /* @__PURE__ */ jsx(
|
|
15948
15957
|
"button",
|
|
15949
15958
|
{
|
|
15950
15959
|
type: "button",
|
|
15951
|
-
className: `${CLASS$
|
|
15960
|
+
className: `${CLASS$b}__expand`,
|
|
15952
15961
|
"aria-label": labels?.expandAria ?? "Ver el mapa en pantalla completa",
|
|
15953
15962
|
title: labels?.expandAria ?? "Pantalla completa",
|
|
15954
15963
|
onClick: () => setExpanded(true),
|
|
@@ -15956,7 +15965,7 @@ const MapView = ({
|
|
|
15956
15965
|
}
|
|
15957
15966
|
),
|
|
15958
15967
|
expanded && createPortal(
|
|
15959
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
15968
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$b}-fs`, role: "dialog", "aria-modal": "true", "aria-label": "Mapa", children: [
|
|
15960
15969
|
/* @__PURE__ */ jsx(
|
|
15961
15970
|
MapView,
|
|
15962
15971
|
{
|
|
@@ -15970,7 +15979,7 @@ const MapView = ({
|
|
|
15970
15979
|
"button",
|
|
15971
15980
|
{
|
|
15972
15981
|
type: "button",
|
|
15973
|
-
className: `${CLASS$
|
|
15982
|
+
className: `${CLASS$b}-fs__close`,
|
|
15974
15983
|
"aria-label": labels?.closeAria ?? "Cerrar el mapa",
|
|
15975
15984
|
onClick: () => setExpanded(false),
|
|
15976
15985
|
children: /* @__PURE__ */ jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -16086,7 +16095,7 @@ function reverseGeocode(lat, lng) {
|
|
|
16086
16095
|
});
|
|
16087
16096
|
}
|
|
16088
16097
|
|
|
16089
|
-
const CLASS$
|
|
16098
|
+
const CLASS$a = `${COMPONENT_PREFIX$1}location-field`;
|
|
16090
16099
|
const GPS_TIMEOUT_MS = 1e4;
|
|
16091
16100
|
const CONFIRM_MAP_HEIGHT = 180;
|
|
16092
16101
|
const LocationField = ({
|
|
@@ -16159,16 +16168,16 @@ const LocationField = ({
|
|
|
16159
16168
|
}
|
|
16160
16169
|
};
|
|
16161
16170
|
const hasPoint = value?.lat != null && value?.lng != null;
|
|
16162
|
-
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
16163
|
-
label && /* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
16171
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$a}${error ? ` ${CLASS$a}--error` : ""}`, ref: boxRef, children: [
|
|
16172
|
+
label && /* @__PURE__ */ jsxs("span", { className: `${CLASS$a}__label`, children: [
|
|
16164
16173
|
label,
|
|
16165
16174
|
required ? " *" : ""
|
|
16166
16175
|
] }),
|
|
16167
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
16176
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$a}__row`, children: [
|
|
16168
16177
|
/* @__PURE__ */ jsx(
|
|
16169
16178
|
"input",
|
|
16170
16179
|
{
|
|
16171
|
-
className: `${CLASS$
|
|
16180
|
+
className: `${CLASS$a}__input`,
|
|
16172
16181
|
type: "text",
|
|
16173
16182
|
value: text,
|
|
16174
16183
|
disabled,
|
|
@@ -16182,7 +16191,7 @@ const LocationField = ({
|
|
|
16182
16191
|
"button",
|
|
16183
16192
|
{
|
|
16184
16193
|
type: "button",
|
|
16185
|
-
className: `${CLASS$
|
|
16194
|
+
className: `${CLASS$a}__gps`,
|
|
16186
16195
|
onClick: useMyLocation,
|
|
16187
16196
|
disabled: disabled || gps === "locating",
|
|
16188
16197
|
title: labels?.useMyLocation ?? "Enviar mi ubicaci\xF3n",
|
|
@@ -16196,11 +16205,11 @@ const LocationField = ({
|
|
|
16196
16205
|
}
|
|
16197
16206
|
)
|
|
16198
16207
|
] }),
|
|
16199
|
-
open && suggestions.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$
|
|
16200
|
-
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16201
|
-
gps === "denied" && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16202
|
-
gps === "unavailable" && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16203
|
-
hasPoint && /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
16208
|
+
open && suggestions.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$a}__suggestions`, children: suggestions.map((s) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void pickSuggestion(s.id, s.description), children: s.description }) }, s.id)) }),
|
|
16209
|
+
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$a}__error`, children: error }),
|
|
16210
|
+
gps === "denied" && /* @__PURE__ */ jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.permissionDenied ?? "No diste permiso de ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
|
|
16211
|
+
gps === "unavailable" && /* @__PURE__ */ jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.unavailable ?? "No pudimos obtener tu ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
|
|
16212
|
+
hasPoint && /* @__PURE__ */ jsxs("div", { className: `${CLASS$a}__confirm`, children: [
|
|
16204
16213
|
/* @__PURE__ */ jsx(
|
|
16205
16214
|
MapView,
|
|
16206
16215
|
{
|
|
@@ -16210,7 +16219,7 @@ const LocationField = ({
|
|
|
16210
16219
|
onPointMove: (id, lat, lng) => void movePoint(id, lat, lng)
|
|
16211
16220
|
}
|
|
16212
16221
|
),
|
|
16213
|
-
/* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16222
|
+
/* @__PURE__ */ jsx("p", { className: `${CLASS$a}__hint`, children: labels?.confirmHint ?? "Verifica que el punto sea correcto." })
|
|
16214
16223
|
] })
|
|
16215
16224
|
] });
|
|
16216
16225
|
};
|
|
@@ -16276,7 +16285,7 @@ function toRenderField(f, loaded, eventBus, mapsApiKey, loadError) {
|
|
|
16276
16285
|
align: f.align,
|
|
16277
16286
|
// SPEC-106 T8 — con un fallo de carga, el desplegable dice que no se pudo preguntar en vez
|
|
16278
16287
|
// de «no hay opciones disponibles», que es una respuesta y no la tenemos.
|
|
16279
|
-
uiProps: loadError ? { options: options ?? [], notFoundContent: loadError } : options ? { options } : void 0,
|
|
16288
|
+
uiProps: loadError ? { options: options ?? [], notFoundContent: loadError, ...f.searchable ? { showSearch: true } : {} } : options ? { options, ...f.searchable ? { showSearch: true } : {} } : void 0,
|
|
16280
16289
|
formatValue
|
|
16281
16290
|
};
|
|
16282
16291
|
}
|
|
@@ -16833,7 +16842,7 @@ function markFitOutliers(points, radiusKm = FIT_RADIUS_KM) {
|
|
|
16833
16842
|
return { points: marcados, outside };
|
|
16834
16843
|
}
|
|
16835
16844
|
|
|
16836
|
-
const CLASS$
|
|
16845
|
+
const CLASS$9 = `${COMPONENT_PREFIX$1}services-map`;
|
|
16837
16846
|
const DEFAULT_HEIGHT = 340;
|
|
16838
16847
|
function readNumber(row, field) {
|
|
16839
16848
|
if (!field) return void 0;
|
|
@@ -16959,7 +16968,7 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
|
|
|
16959
16968
|
[livePoints]
|
|
16960
16969
|
);
|
|
16961
16970
|
const nadaQueDibujar = rows !== null && allPoints.length === 0 && route.length === 0;
|
|
16962
|
-
return /* @__PURE__ */ jsx("div", { className: fill ? `${CLASS$
|
|
16971
|
+
return /* @__PURE__ */ jsx("div", { className: fill ? `${CLASS$9} ${CLASS$9}--fill` : CLASS$9, children: rows === null ? /* @__PURE__ */ jsx("p", { className: `${CLASS$9}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsx("p", { className: `${CLASS$9}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16963
16972
|
/* @__PURE__ */ jsx(
|
|
16964
16973
|
MapView,
|
|
16965
16974
|
{
|
|
@@ -16973,20 +16982,20 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
|
|
|
16973
16982
|
labels: { emptyText: labels.emptyText }
|
|
16974
16983
|
}
|
|
16975
16984
|
),
|
|
16976
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
16977
|
-
livePoints.length > 0 && /* @__PURE__ */ jsxs("p", { className: `${CLASS$
|
|
16985
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$9}__notes`, children: [
|
|
16986
|
+
livePoints.length > 0 && /* @__PURE__ */ jsxs("p", { className: `${CLASS$9}__note ${CLASS$9}__note--live`, children: [
|
|
16978
16987
|
(config.live?.labels?.liveText ?? "{n} en movimiento").replace(
|
|
16979
16988
|
"{n}",
|
|
16980
16989
|
String(livePoints.length)
|
|
16981
16990
|
),
|
|
16982
16991
|
simulated > 0 && ` \xB7 ${config.live?.labels?.simulatedText ?? "incluye posiciones simuladas"}`
|
|
16983
16992
|
] }),
|
|
16984
|
-
missing > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16985
|
-
outside > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16993
|
+
missing > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$9}__note`, children: ((missing === 1 ? labels.missingTextOne : void 0) ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing)) }),
|
|
16994
|
+
outside > 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$9}__note`, children: (labels.outsideText ?? "{n} fuera de la zona (aleja el mapa para verlos)").replace(
|
|
16986
16995
|
"{n}",
|
|
16987
16996
|
String(outside)
|
|
16988
16997
|
) }),
|
|
16989
|
-
failed && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
16998
|
+
failed && /* @__PURE__ */ jsx("p", { className: `${CLASS$9}__note`, children: "No se pudieron cargar las ubicaciones." })
|
|
16990
16999
|
] })
|
|
16991
17000
|
] }) });
|
|
16992
17001
|
};
|
|
@@ -17002,7 +17011,7 @@ function lineaSinMapa(labels, missing, failed) {
|
|
|
17002
17011
|
return labels.emptyText ?? "Sin ubicaciones para mostrar";
|
|
17003
17012
|
}
|
|
17004
17013
|
|
|
17005
|
-
const CLASS$
|
|
17014
|
+
const CLASS$8 = `${COMPONENT_PREFIX$1}service-shortcuts`;
|
|
17006
17015
|
const ICONS = {
|
|
17007
17016
|
// SPEC-126 — quien DESPACHA tambien necesita sus puertas, y una de ellas son las conversaciones
|
|
17008
17017
|
// de sus servicios. Los cinco iconos que habia eran todos de quien PIDE una grua.
|
|
@@ -17056,16 +17065,16 @@ const ServiceShortcuts = ({
|
|
|
17056
17065
|
}) => {
|
|
17057
17066
|
if (!options?.length) return null;
|
|
17058
17067
|
const elegido = !!selectedId;
|
|
17059
|
-
return /* @__PURE__ */ jsx("div", { className: [CLASS$
|
|
17068
|
+
return /* @__PURE__ */ jsx("div", { className: [CLASS$8, elegido ? `${CLASS$8}--used` : ""].filter(Boolean).join(" "), children: options.map((o) => {
|
|
17060
17069
|
const esElegido = o.id === selectedId;
|
|
17061
17070
|
return /* @__PURE__ */ jsxs(
|
|
17062
17071
|
"button",
|
|
17063
17072
|
{
|
|
17064
17073
|
type: "button",
|
|
17065
17074
|
className: [
|
|
17066
|
-
`${CLASS$
|
|
17067
|
-
elegido ? `${CLASS$
|
|
17068
|
-
esElegido ? `${CLASS$
|
|
17075
|
+
`${CLASS$8}__item`,
|
|
17076
|
+
elegido ? `${CLASS$8}__item--off` : "",
|
|
17077
|
+
esElegido ? `${CLASS$8}__item--chosen` : ""
|
|
17069
17078
|
].filter(Boolean).join(" "),
|
|
17070
17079
|
disabled: elegido,
|
|
17071
17080
|
"aria-disabled": elegido,
|
|
@@ -17077,12 +17086,12 @@ const ServiceShortcuts = ({
|
|
|
17077
17086
|
else if (o.route) eventBus?.emit(CHAT_EVENT.NAVIGATE, { route: o.route });
|
|
17078
17087
|
},
|
|
17079
17088
|
children: [
|
|
17080
|
-
o.icon && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17081
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
17082
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17083
|
-
o.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17089
|
+
o.icon && /* @__PURE__ */ jsx("span", { className: `${CLASS$8}__icon`, children: ICONS[o.icon] }),
|
|
17090
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$8}__text`, children: [
|
|
17091
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$8}__label`, children: o.label }),
|
|
17092
|
+
o.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$8}__hint`, children: o.hint })
|
|
17084
17093
|
] }),
|
|
17085
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17094
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$8}__arrow`, children: esElegido ? CHECK : elegido ? null : /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
|
|
17086
17095
|
]
|
|
17087
17096
|
},
|
|
17088
17097
|
o.id
|
|
@@ -17651,19 +17660,19 @@ function ChatNavigatorChat({ component, eventBus }) {
|
|
|
17651
17660
|
] });
|
|
17652
17661
|
}
|
|
17653
17662
|
|
|
17654
|
-
const CLASS$
|
|
17663
|
+
const CLASS$7 = `${COMPONENT_PREFIX$1}user-tools`;
|
|
17655
17664
|
const UserTools = ({ config, onChange, onAction, className }) => {
|
|
17656
17665
|
const { title, description, items } = config;
|
|
17657
|
-
return /* @__PURE__ */ jsxs("section", { className: [CLASS$
|
|
17658
|
-
title && /* @__PURE__ */ jsx("h2", { className: `${CLASS$
|
|
17659
|
-
description && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
17660
|
-
/* @__PURE__ */ jsx("ul", { className: `${CLASS$
|
|
17666
|
+
return /* @__PURE__ */ jsxs("section", { className: [CLASS$7, className].filter(Boolean).join(" "), children: [
|
|
17667
|
+
title && /* @__PURE__ */ jsx("h2", { className: `${CLASS$7}__title`, children: title }),
|
|
17668
|
+
description && /* @__PURE__ */ jsx("p", { className: `${CLASS$7}__description`, children: description }),
|
|
17669
|
+
/* @__PURE__ */ jsx("ul", { className: `${CLASS$7}__list`, children: items.map((item) => /* @__PURE__ */ jsx("li", { className: `${CLASS$7}__item`, children: item.kind === "action" ? (
|
|
17661
17670
|
// SPEC-139 T9 — un ajuste que se pulsa: mismo renglón (etiqueta y pista), y en vez
|
|
17662
17671
|
// de la caja, un botón que dice lo que hace.
|
|
17663
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
17664
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
17665
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17666
|
-
item.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17672
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$7}__action`, children: [
|
|
17673
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$7}__text`, children: [
|
|
17674
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
|
|
17675
|
+
item.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
|
|
17667
17676
|
] }),
|
|
17668
17677
|
/* @__PURE__ */ jsx(
|
|
17669
17678
|
Button,
|
|
@@ -17682,13 +17691,13 @@ const UserTools = ({ config, onChange, onAction, className }) => {
|
|
|
17682
17691
|
checked: Boolean(item.value),
|
|
17683
17692
|
disabled: item.disabled,
|
|
17684
17693
|
onChange: (checked) => onChange?.(item.id, checked),
|
|
17685
|
-
label: /* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
17686
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17687
|
-
item.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
17694
|
+
label: /* @__PURE__ */ jsxs("span", { className: `${CLASS$7}__text`, children: [
|
|
17695
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
|
|
17696
|
+
item.hint && /* @__PURE__ */ jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
|
|
17688
17697
|
] })
|
|
17689
17698
|
}
|
|
17690
17699
|
) }, item.id)) }),
|
|
17691
|
-
items.length === 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
17700
|
+
items.length === 0 && /* @__PURE__ */ jsx("p", { className: `${CLASS$7}__empty`, children: "No hay herramientas disponibles por ahora." })
|
|
17692
17701
|
] });
|
|
17693
17702
|
};
|
|
17694
17703
|
UserTools.displayName = "UserTools";
|
|
@@ -18298,7 +18307,7 @@ const ChatHeader = ({
|
|
|
18298
18307
|
] });
|
|
18299
18308
|
};
|
|
18300
18309
|
|
|
18301
|
-
const CLASS$
|
|
18310
|
+
const CLASS$6 = `${COMPONENT_PREFIX$1}floating-actions`;
|
|
18302
18311
|
const ICON_VALUES = new Set(Object.values(ICON_TYPES));
|
|
18303
18312
|
function renderIcon(icon) {
|
|
18304
18313
|
if (typeof icon === "string" && ICON_VALUES.has(icon)) {
|
|
@@ -18307,23 +18316,23 @@ function renderIcon(icon) {
|
|
|
18307
18316
|
return icon;
|
|
18308
18317
|
}
|
|
18309
18318
|
function Side({ buttons, align, eventBus }) {
|
|
18310
|
-
return /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
18319
|
+
return /* @__PURE__ */ jsx("div", { className: `${CLASS$6}__group ${CLASS$6}__group--${align}`, children: buttons.map((b) => {
|
|
18311
18320
|
const emit = () => {
|
|
18312
18321
|
if (b.disabled) return;
|
|
18313
18322
|
eventBus.emit(b.event, b.payload);
|
|
18314
18323
|
};
|
|
18315
18324
|
if (b.custom) {
|
|
18316
|
-
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
18325
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$6}__slot`, children: [
|
|
18317
18326
|
b.custom,
|
|
18318
|
-
b.panel && b.open && /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
18327
|
+
b.panel && b.open && /* @__PURE__ */ jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
|
|
18319
18328
|
] }, b.id);
|
|
18320
18329
|
}
|
|
18321
|
-
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
18330
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$6}__slot`, children: [
|
|
18322
18331
|
/* @__PURE__ */ jsxs(
|
|
18323
18332
|
"button",
|
|
18324
18333
|
{
|
|
18325
18334
|
type: "button",
|
|
18326
|
-
className: [`${CLASS$
|
|
18335
|
+
className: [`${CLASS$6}__button`, b.active ? `${CLASS$6}__button--active` : ""].filter(Boolean).join(" "),
|
|
18327
18336
|
"aria-label": b.ariaLabel,
|
|
18328
18337
|
title: b.ariaLabel,
|
|
18329
18338
|
"aria-pressed": b.active,
|
|
@@ -18331,16 +18340,16 @@ function Side({ buttons, align, eventBus }) {
|
|
|
18331
18340
|
onClick: emit,
|
|
18332
18341
|
children: [
|
|
18333
18342
|
renderIcon(b.icon),
|
|
18334
|
-
b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
18343
|
+
b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsx("span", { className: `${CLASS$6}__badge`, children: b.badge })
|
|
18335
18344
|
]
|
|
18336
18345
|
}
|
|
18337
18346
|
),
|
|
18338
|
-
b.panel && b.open && /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
18347
|
+
b.panel && b.open && /* @__PURE__ */ jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
|
|
18339
18348
|
] }, b.id);
|
|
18340
18349
|
}) });
|
|
18341
18350
|
}
|
|
18342
18351
|
const ChatFloatingActions = ({ eventBus, left = [], right = [], offset = 12, glass = false }) => {
|
|
18343
|
-
const cls = [CLASS$
|
|
18352
|
+
const cls = [CLASS$6, glass ? `${CLASS$6}--glass` : ""].filter(Boolean).join(" ");
|
|
18344
18353
|
return /* @__PURE__ */ jsxs("div", { className: cls, style: { paddingLeft: offset, paddingRight: offset }, children: [
|
|
18345
18354
|
/* @__PURE__ */ jsx(Side, { buttons: left, align: "left", eventBus }),
|
|
18346
18355
|
/* @__PURE__ */ jsx(Side, { buttons: right, align: "right", eventBus })
|
|
@@ -18773,7 +18782,7 @@ const UserMessage = ({
|
|
|
18773
18782
|
] }) });
|
|
18774
18783
|
};
|
|
18775
18784
|
|
|
18776
|
-
const CLASS$
|
|
18785
|
+
const CLASS$5 = `${COMPONENT_PREFIX$1}photo-picker`;
|
|
18777
18786
|
const PhotoPicker = ({
|
|
18778
18787
|
label,
|
|
18779
18788
|
hint,
|
|
@@ -18798,8 +18807,8 @@ const PhotoPicker = ({
|
|
|
18798
18807
|
void onFiles(e.target.files);
|
|
18799
18808
|
e.target.value = "";
|
|
18800
18809
|
};
|
|
18801
|
-
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
18802
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
18810
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CLASS$5}${error ? ` ${CLASS$5}--error` : ""}`, children: [
|
|
18811
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$5}__label`, children: [
|
|
18803
18812
|
label,
|
|
18804
18813
|
required ? " *" : "",
|
|
18805
18814
|
hechas > 0 ? ` (${hechas}${max ? `/${max}` : ""})` : ""
|
|
@@ -18808,7 +18817,7 @@ const PhotoPicker = ({
|
|
|
18808
18817
|
"input",
|
|
18809
18818
|
{
|
|
18810
18819
|
ref: galeriaRef,
|
|
18811
|
-
className: `${CLASS$
|
|
18820
|
+
className: `${CLASS$5}__native`,
|
|
18812
18821
|
type: "file",
|
|
18813
18822
|
accept: "image/*",
|
|
18814
18823
|
multiple: max !== 1,
|
|
@@ -18821,7 +18830,7 @@ const PhotoPicker = ({
|
|
|
18821
18830
|
"input",
|
|
18822
18831
|
{
|
|
18823
18832
|
ref: camaraRef,
|
|
18824
|
-
className: `${CLASS$
|
|
18833
|
+
className: `${CLASS$5}__native`,
|
|
18825
18834
|
type: "file",
|
|
18826
18835
|
accept: "image/*",
|
|
18827
18836
|
capture: "environment",
|
|
@@ -18830,15 +18839,15 @@ const PhotoPicker = ({
|
|
|
18830
18839
|
"data-testid": "photo-picker-camera"
|
|
18831
18840
|
}
|
|
18832
18841
|
),
|
|
18833
|
-
entries.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$
|
|
18834
|
-
e.previewUrl ? /* @__PURE__ */ jsx("img", { className: `${CLASS$
|
|
18835
|
-
e.status === "uploading" && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
18836
|
-
e.status === "error" && /* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
18842
|
+
entries.length > 0 && /* @__PURE__ */ jsx("ul", { className: `${CLASS$5}__grid`, children: entries.map((e, i) => /* @__PURE__ */ jsxs("li", { className: `${CLASS$5}__thumb ${CLASS$5}__thumb--${e.status}`, children: [
|
|
18843
|
+
e.previewUrl ? /* @__PURE__ */ jsx("img", { className: `${CLASS$5}__img`, src: e.previewUrl, alt: e.name }) : /* @__PURE__ */ jsx("span", { className: `${CLASS$5}__placeholder`, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon$1, { type: ICON_TYPES.IMAGE }) }),
|
|
18844
|
+
e.status === "uploading" && /* @__PURE__ */ jsx("span", { className: `${CLASS$5}__state`, children: "Subiendo\u2026" }),
|
|
18845
|
+
e.status === "error" && /* @__PURE__ */ jsx("span", { className: `${CLASS$5}__state ${CLASS$5}__state--error`, children: "No se pudo subir" }),
|
|
18837
18846
|
onRemove && e.status !== "uploading" && /* @__PURE__ */ jsx(
|
|
18838
18847
|
"button",
|
|
18839
18848
|
{
|
|
18840
18849
|
type: "button",
|
|
18841
|
-
className: `${CLASS$
|
|
18850
|
+
className: `${CLASS$5}__remove`,
|
|
18842
18851
|
onClick: () => onRemove(i),
|
|
18843
18852
|
"aria-label": `Quitar ${e.name}`,
|
|
18844
18853
|
disabled,
|
|
@@ -18846,12 +18855,12 @@ const PhotoPicker = ({
|
|
|
18846
18855
|
}
|
|
18847
18856
|
)
|
|
18848
18857
|
] }, `${e.name}-${i}`)) }),
|
|
18849
|
-
/* @__PURE__ */ jsxs("div", { className: `${CLASS$
|
|
18858
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$5}__actions`, children: [
|
|
18850
18859
|
capture && /* @__PURE__ */ jsxs(
|
|
18851
18860
|
"button",
|
|
18852
18861
|
{
|
|
18853
18862
|
type: "button",
|
|
18854
|
-
className: `${CLASS$
|
|
18863
|
+
className: `${CLASS$5}__pick`,
|
|
18855
18864
|
onClick: () => elegir(camaraRef),
|
|
18856
18865
|
disabled: disabled || lleno,
|
|
18857
18866
|
children: [
|
|
@@ -18864,7 +18873,7 @@ const PhotoPicker = ({
|
|
|
18864
18873
|
"button",
|
|
18865
18874
|
{
|
|
18866
18875
|
type: "button",
|
|
18867
|
-
className: `${CLASS$
|
|
18876
|
+
className: `${CLASS$5}__pick ${CLASS$5}__pick--secondary`,
|
|
18868
18877
|
onClick: () => elegir(galeriaRef),
|
|
18869
18878
|
disabled: disabled || lleno,
|
|
18870
18879
|
children: [
|
|
@@ -18874,13 +18883,13 @@ const PhotoPicker = ({
|
|
|
18874
18883
|
}
|
|
18875
18884
|
)
|
|
18876
18885
|
] }),
|
|
18877
|
-
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
18878
|
-
!error && subiendo && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
18879
|
-
!error && !subiendo && hint && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
18886
|
+
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$5}__error`, children: error }),
|
|
18887
|
+
!error && subiendo && /* @__PURE__ */ jsx("p", { className: `${CLASS$5}__hint`, children: "Espera a que terminen de subir." }),
|
|
18888
|
+
!error && !subiendo && hint && /* @__PURE__ */ jsx("p", { className: `${CLASS$5}__hint`, children: hint })
|
|
18880
18889
|
] });
|
|
18881
18890
|
};
|
|
18882
18891
|
|
|
18883
|
-
const CLASS$
|
|
18892
|
+
const CLASS$4 = `${COMPONENT_PREFIX$1}credentials-card`;
|
|
18884
18893
|
async function copiar(texto) {
|
|
18885
18894
|
try {
|
|
18886
18895
|
await navigator.clipboard.writeText(texto);
|
|
@@ -18897,15 +18906,15 @@ const Fila = ({ row }) => {
|
|
|
18897
18906
|
const t = setTimeout(() => setCopiado(false), 1800);
|
|
18898
18907
|
return () => clearTimeout(t);
|
|
18899
18908
|
}, [copiado]);
|
|
18900
|
-
return /* @__PURE__ */ jsxs("li", { className: `${CLASS$
|
|
18901
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
18902
|
-
/* @__PURE__ */ jsx("span", { className: `${CLASS$
|
|
18903
|
-
/* @__PURE__ */ jsxs("span", { className: `${CLASS$
|
|
18909
|
+
return /* @__PURE__ */ jsxs("li", { className: `${CLASS$4}__row`, children: [
|
|
18910
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$4}__label`, children: row.label }),
|
|
18911
|
+
/* @__PURE__ */ jsx("span", { className: `${CLASS$4}__value`, "data-testid": `credential-${row.label}`, children: visible ? row.value : "\u2022".repeat(Math.min(row.value.length, 12)) }),
|
|
18912
|
+
/* @__PURE__ */ jsxs("span", { className: `${CLASS$4}__tools`, children: [
|
|
18904
18913
|
row.masked && /* @__PURE__ */ jsx(
|
|
18905
18914
|
"button",
|
|
18906
18915
|
{
|
|
18907
18916
|
type: "button",
|
|
18908
|
-
className: `${CLASS$
|
|
18917
|
+
className: `${CLASS$4}__tool`,
|
|
18909
18918
|
onClick: () => setVisible((v) => !v),
|
|
18910
18919
|
"aria-label": visible ? `Ocultar ${row.label}` : `Ver ${row.label}`,
|
|
18911
18920
|
children: visible ? "Ocultar" : "Ver"
|
|
@@ -18915,7 +18924,7 @@ const Fila = ({ row }) => {
|
|
|
18915
18924
|
"button",
|
|
18916
18925
|
{
|
|
18917
18926
|
type: "button",
|
|
18918
|
-
className: `${CLASS$
|
|
18927
|
+
className: `${CLASS$4}__tool`,
|
|
18919
18928
|
onClick: async () => setCopiado(await copiar(row.value)),
|
|
18920
18929
|
"aria-label": `Copiar ${row.label}`,
|
|
18921
18930
|
children: copiado ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -18934,15 +18943,256 @@ const CredentialsCard = ({
|
|
|
18934
18943
|
note,
|
|
18935
18944
|
action,
|
|
18936
18945
|
className
|
|
18937
|
-
}) => /* @__PURE__ */ jsxs("section", { className: [CLASS$
|
|
18938
|
-
/* @__PURE__ */ jsx("h3", { className: `${CLASS$
|
|
18939
|
-
intro && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
18940
|
-
/* @__PURE__ */ jsx("ul", { className: `${CLASS$
|
|
18941
|
-
note && /* @__PURE__ */ jsx("p", { className: `${CLASS$
|
|
18942
|
-
action && /* @__PURE__ */ jsx("div", { className: `${CLASS$
|
|
18946
|
+
}) => /* @__PURE__ */ jsxs("section", { className: [CLASS$4, className].filter(Boolean).join(" "), "aria-label": title, children: [
|
|
18947
|
+
/* @__PURE__ */ jsx("h3", { className: `${CLASS$4}__title`, children: title }),
|
|
18948
|
+
intro && /* @__PURE__ */ jsx("p", { className: `${CLASS$4}__intro`, children: intro }),
|
|
18949
|
+
/* @__PURE__ */ jsx("ul", { className: `${CLASS$4}__rows`, children: rows.map((r) => /* @__PURE__ */ jsx(Fila, { row: r }, r.label)) }),
|
|
18950
|
+
note && /* @__PURE__ */ jsx("p", { className: `${CLASS$4}__note`, children: note }),
|
|
18951
|
+
action && /* @__PURE__ */ jsx("div", { className: `${CLASS$4}__action`, children: /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: action.onClick, disabled: action.disabled, children: action.label }) })
|
|
18943
18952
|
] });
|
|
18944
18953
|
CredentialsCard.displayName = "CredentialsCard";
|
|
18945
18954
|
|
|
18955
|
+
const TextArea = forwardRef(
|
|
18956
|
+
({
|
|
18957
|
+
label,
|
|
18958
|
+
error,
|
|
18959
|
+
status,
|
|
18960
|
+
variant = "outlined",
|
|
18961
|
+
fullWidth = false,
|
|
18962
|
+
size = "middle",
|
|
18963
|
+
allowClear = false,
|
|
18964
|
+
onClear,
|
|
18965
|
+
minRows = 3,
|
|
18966
|
+
maxRows,
|
|
18967
|
+
resize = "vertical",
|
|
18968
|
+
showCount = false,
|
|
18969
|
+
maxLength,
|
|
18970
|
+
footer,
|
|
18971
|
+
className = "",
|
|
18972
|
+
value,
|
|
18973
|
+
onChange,
|
|
18974
|
+
disabled,
|
|
18975
|
+
...props
|
|
18976
|
+
}, ref) => {
|
|
18977
|
+
const [internalValue, setInternalValue] = useState("");
|
|
18978
|
+
const textareaRef = useRef(null);
|
|
18979
|
+
useEffect(() => {
|
|
18980
|
+
if (value !== void 0) {
|
|
18981
|
+
setInternalValue(String(value));
|
|
18982
|
+
}
|
|
18983
|
+
}, [value]);
|
|
18984
|
+
const adjustHeight = useCallback(() => {
|
|
18985
|
+
const textarea = textareaRef.current;
|
|
18986
|
+
if (!textarea || resize === "none") return;
|
|
18987
|
+
textarea.style.height = "auto";
|
|
18988
|
+
const lineHeight = parseInt(getComputedStyle(textarea).lineHeight) || 20;
|
|
18989
|
+
const paddingY = 16;
|
|
18990
|
+
const minHeight = minRows * lineHeight + paddingY;
|
|
18991
|
+
const maxHeight = maxRows ? maxRows * lineHeight + paddingY : Infinity;
|
|
18992
|
+
const newHeight = Math.min(
|
|
18993
|
+
Math.max(textarea.scrollHeight, minHeight),
|
|
18994
|
+
maxHeight
|
|
18995
|
+
);
|
|
18996
|
+
textarea.style.height = `${newHeight}px`;
|
|
18997
|
+
}, [minRows, maxRows, resize]);
|
|
18998
|
+
useEffect(() => {
|
|
18999
|
+
if (resize !== "none") {
|
|
19000
|
+
adjustHeight();
|
|
19001
|
+
}
|
|
19002
|
+
}, [internalValue, adjustHeight, resize]);
|
|
19003
|
+
const handleChange = useCallback(
|
|
19004
|
+
(e) => {
|
|
19005
|
+
const newValue = e.target.value;
|
|
19006
|
+
if (maxLength && newValue.length > maxLength) {
|
|
19007
|
+
return;
|
|
19008
|
+
}
|
|
19009
|
+
setInternalValue(newValue);
|
|
19010
|
+
onChange?.(e);
|
|
19011
|
+
},
|
|
19012
|
+
[onChange, maxLength]
|
|
19013
|
+
);
|
|
19014
|
+
const handleClear = useCallback(() => {
|
|
19015
|
+
setInternalValue("");
|
|
19016
|
+
onClear?.();
|
|
19017
|
+
if (onChange && textareaRef.current) {
|
|
19018
|
+
const syntheticEvent = {
|
|
19019
|
+
target: { value: "" },
|
|
19020
|
+
currentTarget: { value: "" }
|
|
19021
|
+
};
|
|
19022
|
+
onChange(syntheticEvent);
|
|
19023
|
+
}
|
|
19024
|
+
textareaRef.current?.focus();
|
|
19025
|
+
}, [onChange, onClear]);
|
|
19026
|
+
const showClearIcon = Boolean(allowClear && internalValue && !disabled);
|
|
19027
|
+
const characterCount = internalValue.length;
|
|
19028
|
+
const wrapperClasses = [
|
|
19029
|
+
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper`,
|
|
19030
|
+
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${variant}`,
|
|
19031
|
+
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${size}`,
|
|
19032
|
+
error && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--error`,
|
|
19033
|
+
status && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${status}`,
|
|
19034
|
+
fullWidth && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--full-width`
|
|
19035
|
+
].filter(Boolean).join(" ");
|
|
19036
|
+
const textareaClasses = [
|
|
19037
|
+
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}`,
|
|
19038
|
+
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--resize-${resize}`,
|
|
19039
|
+
showClearIcon && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--with-clear`,
|
|
19040
|
+
className
|
|
19041
|
+
].filter(Boolean).join(" ");
|
|
19042
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
|
|
19043
|
+
label && /* @__PURE__ */ jsx(
|
|
19044
|
+
"label",
|
|
19045
|
+
{
|
|
19046
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__label`,
|
|
19047
|
+
children: label
|
|
19048
|
+
}
|
|
19049
|
+
),
|
|
19050
|
+
/* @__PURE__ */ jsxs(
|
|
19051
|
+
"div",
|
|
19052
|
+
{
|
|
19053
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__container`,
|
|
19054
|
+
children: [
|
|
19055
|
+
/* @__PURE__ */ jsx(
|
|
19056
|
+
"textarea",
|
|
19057
|
+
{
|
|
19058
|
+
ref: (node) => {
|
|
19059
|
+
textareaRef.current = node;
|
|
19060
|
+
if (typeof ref === "function") {
|
|
19061
|
+
ref(node);
|
|
19062
|
+
} else if (ref) {
|
|
19063
|
+
ref.current = node;
|
|
19064
|
+
}
|
|
19065
|
+
},
|
|
19066
|
+
className: textareaClasses,
|
|
19067
|
+
value: internalValue,
|
|
19068
|
+
onChange: handleChange,
|
|
19069
|
+
disabled,
|
|
19070
|
+
rows: minRows,
|
|
19071
|
+
maxLength,
|
|
19072
|
+
...props
|
|
19073
|
+
}
|
|
19074
|
+
),
|
|
19075
|
+
showClearIcon && /* @__PURE__ */ jsx(
|
|
19076
|
+
Button,
|
|
19077
|
+
{
|
|
19078
|
+
variant: "ghost",
|
|
19079
|
+
size: "small",
|
|
19080
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__clear`,
|
|
19081
|
+
onClick: handleClear,
|
|
19082
|
+
"aria-label": "Clear textarea",
|
|
19083
|
+
icon: /* @__PURE__ */ jsx(Icon, { type: LUMI_ICON_TYPES.CLOSE, size: "small" })
|
|
19084
|
+
}
|
|
19085
|
+
)
|
|
19086
|
+
]
|
|
19087
|
+
}
|
|
19088
|
+
),
|
|
19089
|
+
/* @__PURE__ */ jsxs(
|
|
19090
|
+
"div",
|
|
19091
|
+
{
|
|
19092
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__footer`,
|
|
19093
|
+
children: [
|
|
19094
|
+
error && /* @__PURE__ */ jsx(
|
|
19095
|
+
"span",
|
|
19096
|
+
{
|
|
19097
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__error`,
|
|
19098
|
+
children: error
|
|
19099
|
+
}
|
|
19100
|
+
),
|
|
19101
|
+
footer && /* @__PURE__ */ jsx(
|
|
19102
|
+
"div",
|
|
19103
|
+
{
|
|
19104
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__custom-footer`,
|
|
19105
|
+
children: footer
|
|
19106
|
+
}
|
|
19107
|
+
),
|
|
19108
|
+
showCount && /* @__PURE__ */ jsx(
|
|
19109
|
+
"span",
|
|
19110
|
+
{
|
|
19111
|
+
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__count`,
|
|
19112
|
+
children: maxLength ? `${characterCount}/${maxLength}` : characterCount
|
|
19113
|
+
}
|
|
19114
|
+
)
|
|
19115
|
+
]
|
|
19116
|
+
}
|
|
19117
|
+
)
|
|
19118
|
+
] });
|
|
19119
|
+
}
|
|
19120
|
+
);
|
|
19121
|
+
TextArea.displayName = "TextArea";
|
|
19122
|
+
|
|
19123
|
+
const CLASS$3 = `${COMPONENT_PREFIX$1}support-request-form`;
|
|
19124
|
+
const VACIO = { name: "", email: "", phone: "", subject: "", message: "" };
|
|
19125
|
+
function faltantes(v) {
|
|
19126
|
+
if (v.name.trim().length < 2) return "Escribe tu nombre.";
|
|
19127
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.email.trim())) return "Escribe un correo v\xE1lido.";
|
|
19128
|
+
if (v.subject.trim().length < 3) return "Escribe de qu\xE9 se trata.";
|
|
19129
|
+
if (v.message.trim().length < 10) return "Cu\xE9ntanos un poco m\xE1s (al menos 10 caracteres).";
|
|
19130
|
+
return null;
|
|
19131
|
+
}
|
|
19132
|
+
const SupportRequestForm = ({
|
|
19133
|
+
title = "D\xE9janos tu solicitud",
|
|
19134
|
+
intro,
|
|
19135
|
+
note = "Te respondemos al correo que dejes.",
|
|
19136
|
+
initial,
|
|
19137
|
+
onSubmit,
|
|
19138
|
+
sent = false,
|
|
19139
|
+
sentLabel = "Solicitud enviada",
|
|
19140
|
+
submitLabel = "Enviar",
|
|
19141
|
+
className
|
|
19142
|
+
}) => {
|
|
19143
|
+
const [values, setValues] = useState({ ...VACIO, ...initial });
|
|
19144
|
+
const [error, setError] = useState(null);
|
|
19145
|
+
const [enviando, setEnviando] = useState(false);
|
|
19146
|
+
const set = (campo) => (e) => setValues((v) => ({ ...v, [campo]: e.target.value }));
|
|
19147
|
+
const enviar = async (e) => {
|
|
19148
|
+
e.preventDefault();
|
|
19149
|
+
if (sent || enviando) return;
|
|
19150
|
+
const falta = faltantes(values);
|
|
19151
|
+
if (falta) {
|
|
19152
|
+
setError(falta);
|
|
19153
|
+
return;
|
|
19154
|
+
}
|
|
19155
|
+
setError(null);
|
|
19156
|
+
setEnviando(true);
|
|
19157
|
+
try {
|
|
19158
|
+
await onSubmit({ ...values, name: values.name.trim(), email: values.email.trim(), phone: values.phone.trim(), subject: values.subject.trim(), message: values.message.trim() });
|
|
19159
|
+
} catch (err) {
|
|
19160
|
+
setError(err instanceof Error && err.message ? err.message : "No se pudo enviar. Int\xE9ntalo de nuevo.");
|
|
19161
|
+
} finally {
|
|
19162
|
+
setEnviando(false);
|
|
19163
|
+
}
|
|
19164
|
+
};
|
|
19165
|
+
return /* @__PURE__ */ jsxs(
|
|
19166
|
+
"form",
|
|
19167
|
+
{
|
|
19168
|
+
className: [CLASS$3, sent ? `${CLASS$3}--sent` : "", className].filter(Boolean).join(" "),
|
|
19169
|
+
onSubmit: enviar,
|
|
19170
|
+
noValidate: true,
|
|
19171
|
+
children: [
|
|
19172
|
+
/* @__PURE__ */ jsx("h4", { className: `${CLASS$3}__title`, children: title }),
|
|
19173
|
+
intro && /* @__PURE__ */ jsx("p", { className: `${CLASS$3}__intro`, children: intro }),
|
|
19174
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$3}__fields`, children: [
|
|
19175
|
+
/* @__PURE__ */ jsxs("div", { className: `${CLASS$3}__row`, children: [
|
|
19176
|
+
/* @__PURE__ */ jsx(Input$1, { label: "Nombre", value: values.name, onChange: set("name"), fullWidth: true, disabled: sent, autoComplete: "name" }),
|
|
19177
|
+
/* @__PURE__ */ jsx(Input$1, { label: "Tel\xE9fono (opcional)", value: values.phone, onChange: set("phone"), fullWidth: true, disabled: sent, inputMode: "tel", autoComplete: "tel" })
|
|
19178
|
+
] }),
|
|
19179
|
+
/* @__PURE__ */ jsx(Input$1, { label: "Correo", type: "email", value: values.email, onChange: set("email"), fullWidth: true, disabled: sent, inputMode: "email", autoComplete: "email" }),
|
|
19180
|
+
/* @__PURE__ */ jsx(Input$1, { label: "Asunto", value: values.subject, onChange: set("subject"), fullWidth: true, disabled: sent }),
|
|
19181
|
+
/* @__PURE__ */ jsx(TextArea, { label: "Mensaje", value: values.message, onChange: set("message"), fullWidth: true, disabled: sent, minRows: 3, maxLength: 4e3, showCount: true })
|
|
19182
|
+
] }),
|
|
19183
|
+
error && /* @__PURE__ */ jsx("p", { className: `${CLASS$3}__error`, role: "alert", children: error }),
|
|
19184
|
+
sent ? /* @__PURE__ */ jsxs("p", { className: `${CLASS$3}__done`, role: "status", children: [
|
|
19185
|
+
/* @__PURE__ */ jsx(Icon$1, { type: ICON_TYPES.CHECK, size: "small" }),
|
|
19186
|
+
/* @__PURE__ */ jsx("span", { children: sentLabel })
|
|
19187
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19188
|
+
/* @__PURE__ */ jsx("div", { className: `${CLASS$3}__actions`, children: /* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", isLoading: enviando, disabled: enviando, children: submitLabel }) }),
|
|
19189
|
+
note && /* @__PURE__ */ jsx("p", { className: `${CLASS$3}__note`, children: note })
|
|
19190
|
+
] })
|
|
19191
|
+
]
|
|
19192
|
+
}
|
|
19193
|
+
);
|
|
19194
|
+
};
|
|
19195
|
+
|
|
18946
19196
|
const FADE_AFTER_MS = 4e3;
|
|
18947
19197
|
const NewMessageDivider = ({
|
|
18948
19198
|
label = "Nuevo mensaje",
|
|
@@ -20889,174 +21139,6 @@ const Loader = React.forwardRef(
|
|
|
20889
21139
|
);
|
|
20890
21140
|
Loader.displayName = "LumiLoader";
|
|
20891
21141
|
|
|
20892
|
-
const TextArea = forwardRef(
|
|
20893
|
-
({
|
|
20894
|
-
label,
|
|
20895
|
-
error,
|
|
20896
|
-
status,
|
|
20897
|
-
variant = "outlined",
|
|
20898
|
-
fullWidth = false,
|
|
20899
|
-
size = "middle",
|
|
20900
|
-
allowClear = false,
|
|
20901
|
-
onClear,
|
|
20902
|
-
minRows = 3,
|
|
20903
|
-
maxRows,
|
|
20904
|
-
resize = "vertical",
|
|
20905
|
-
showCount = false,
|
|
20906
|
-
maxLength,
|
|
20907
|
-
footer,
|
|
20908
|
-
className = "",
|
|
20909
|
-
value,
|
|
20910
|
-
onChange,
|
|
20911
|
-
disabled,
|
|
20912
|
-
...props
|
|
20913
|
-
}, ref) => {
|
|
20914
|
-
const [internalValue, setInternalValue] = useState("");
|
|
20915
|
-
const textareaRef = useRef(null);
|
|
20916
|
-
useEffect(() => {
|
|
20917
|
-
if (value !== void 0) {
|
|
20918
|
-
setInternalValue(String(value));
|
|
20919
|
-
}
|
|
20920
|
-
}, [value]);
|
|
20921
|
-
const adjustHeight = useCallback(() => {
|
|
20922
|
-
const textarea = textareaRef.current;
|
|
20923
|
-
if (!textarea || resize === "none") return;
|
|
20924
|
-
textarea.style.height = "auto";
|
|
20925
|
-
const lineHeight = parseInt(getComputedStyle(textarea).lineHeight) || 20;
|
|
20926
|
-
const paddingY = 16;
|
|
20927
|
-
const minHeight = minRows * lineHeight + paddingY;
|
|
20928
|
-
const maxHeight = maxRows ? maxRows * lineHeight + paddingY : Infinity;
|
|
20929
|
-
const newHeight = Math.min(
|
|
20930
|
-
Math.max(textarea.scrollHeight, minHeight),
|
|
20931
|
-
maxHeight
|
|
20932
|
-
);
|
|
20933
|
-
textarea.style.height = `${newHeight}px`;
|
|
20934
|
-
}, [minRows, maxRows, resize]);
|
|
20935
|
-
useEffect(() => {
|
|
20936
|
-
if (resize !== "none") {
|
|
20937
|
-
adjustHeight();
|
|
20938
|
-
}
|
|
20939
|
-
}, [internalValue, adjustHeight, resize]);
|
|
20940
|
-
const handleChange = useCallback(
|
|
20941
|
-
(e) => {
|
|
20942
|
-
const newValue = e.target.value;
|
|
20943
|
-
if (maxLength && newValue.length > maxLength) {
|
|
20944
|
-
return;
|
|
20945
|
-
}
|
|
20946
|
-
setInternalValue(newValue);
|
|
20947
|
-
onChange?.(e);
|
|
20948
|
-
},
|
|
20949
|
-
[onChange, maxLength]
|
|
20950
|
-
);
|
|
20951
|
-
const handleClear = useCallback(() => {
|
|
20952
|
-
setInternalValue("");
|
|
20953
|
-
onClear?.();
|
|
20954
|
-
if (onChange && textareaRef.current) {
|
|
20955
|
-
const syntheticEvent = {
|
|
20956
|
-
target: { value: "" },
|
|
20957
|
-
currentTarget: { value: "" }
|
|
20958
|
-
};
|
|
20959
|
-
onChange(syntheticEvent);
|
|
20960
|
-
}
|
|
20961
|
-
textareaRef.current?.focus();
|
|
20962
|
-
}, [onChange, onClear]);
|
|
20963
|
-
const showClearIcon = Boolean(allowClear && internalValue && !disabled);
|
|
20964
|
-
const characterCount = internalValue.length;
|
|
20965
|
-
const wrapperClasses = [
|
|
20966
|
-
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper`,
|
|
20967
|
-
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${variant}`,
|
|
20968
|
-
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${size}`,
|
|
20969
|
-
error && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--error`,
|
|
20970
|
-
status && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${status}`,
|
|
20971
|
-
fullWidth && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--full-width`
|
|
20972
|
-
].filter(Boolean).join(" ");
|
|
20973
|
-
const textareaClasses = [
|
|
20974
|
-
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}`,
|
|
20975
|
-
`${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--resize-${resize}`,
|
|
20976
|
-
showClearIcon && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--with-clear`,
|
|
20977
|
-
className
|
|
20978
|
-
].filter(Boolean).join(" ");
|
|
20979
|
-
return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
|
|
20980
|
-
label && /* @__PURE__ */ jsx(
|
|
20981
|
-
"label",
|
|
20982
|
-
{
|
|
20983
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__label`,
|
|
20984
|
-
children: label
|
|
20985
|
-
}
|
|
20986
|
-
),
|
|
20987
|
-
/* @__PURE__ */ jsxs(
|
|
20988
|
-
"div",
|
|
20989
|
-
{
|
|
20990
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__container`,
|
|
20991
|
-
children: [
|
|
20992
|
-
/* @__PURE__ */ jsx(
|
|
20993
|
-
"textarea",
|
|
20994
|
-
{
|
|
20995
|
-
ref: (node) => {
|
|
20996
|
-
textareaRef.current = node;
|
|
20997
|
-
if (typeof ref === "function") {
|
|
20998
|
-
ref(node);
|
|
20999
|
-
} else if (ref) {
|
|
21000
|
-
ref.current = node;
|
|
21001
|
-
}
|
|
21002
|
-
},
|
|
21003
|
-
className: textareaClasses,
|
|
21004
|
-
value: internalValue,
|
|
21005
|
-
onChange: handleChange,
|
|
21006
|
-
disabled,
|
|
21007
|
-
rows: minRows,
|
|
21008
|
-
maxLength,
|
|
21009
|
-
...props
|
|
21010
|
-
}
|
|
21011
|
-
),
|
|
21012
|
-
showClearIcon && /* @__PURE__ */ jsx(
|
|
21013
|
-
Button,
|
|
21014
|
-
{
|
|
21015
|
-
variant: "ghost",
|
|
21016
|
-
size: "small",
|
|
21017
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__clear`,
|
|
21018
|
-
onClick: handleClear,
|
|
21019
|
-
"aria-label": "Clear textarea",
|
|
21020
|
-
icon: /* @__PURE__ */ jsx(Icon, { type: LUMI_ICON_TYPES.CLOSE, size: "small" })
|
|
21021
|
-
}
|
|
21022
|
-
)
|
|
21023
|
-
]
|
|
21024
|
-
}
|
|
21025
|
-
),
|
|
21026
|
-
/* @__PURE__ */ jsxs(
|
|
21027
|
-
"div",
|
|
21028
|
-
{
|
|
21029
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__footer`,
|
|
21030
|
-
children: [
|
|
21031
|
-
error && /* @__PURE__ */ jsx(
|
|
21032
|
-
"span",
|
|
21033
|
-
{
|
|
21034
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__error`,
|
|
21035
|
-
children: error
|
|
21036
|
-
}
|
|
21037
|
-
),
|
|
21038
|
-
footer && /* @__PURE__ */ jsx(
|
|
21039
|
-
"div",
|
|
21040
|
-
{
|
|
21041
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__custom-footer`,
|
|
21042
|
-
children: footer
|
|
21043
|
-
}
|
|
21044
|
-
),
|
|
21045
|
-
showCount && /* @__PURE__ */ jsx(
|
|
21046
|
-
"span",
|
|
21047
|
-
{
|
|
21048
|
-
className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__count`,
|
|
21049
|
-
children: maxLength ? `${characterCount}/${maxLength}` : characterCount
|
|
21050
|
-
}
|
|
21051
|
-
)
|
|
21052
|
-
]
|
|
21053
|
-
}
|
|
21054
|
-
)
|
|
21055
|
-
] });
|
|
21056
|
-
}
|
|
21057
|
-
);
|
|
21058
|
-
TextArea.displayName = "TextArea";
|
|
21059
|
-
|
|
21060
21142
|
const MenuContext = createContext(void 0);
|
|
21061
21143
|
const MenuProvider = MenuContext.Provider;
|
|
21062
21144
|
const useMenuContext = () => {
|
|
@@ -25296,4 +25378,4 @@ function buildBreadcrumbPath(items, targetKey, currentPath = []) {
|
|
|
25296
25378
|
return [];
|
|
25297
25379
|
}
|
|
25298
25380
|
|
|
25299
|
-
export { ActionFormDrawer, BottomSheet, CHAT_CONFIG_DEFAULTS, CHAT_EVENT, ICON_TYPES as CHAT_ICON_TYPES, CarouselDisplay, Chat, AssistantMessage as ChatAssistantMessage, AssistantThinkingIndicator as ChatAssistantThinkingIndicator, AttachmentPreview as ChatAttachmentPreview, Avatar as ChatAvatar, Button$1 as ChatButton, ChatConfigProvider, DateDivider as ChatDateDivider, FileViewer as ChatFileViewer, ChatFloatingActions, FullscreenViewer as ChatFullscreenViewer, ChatHeader as ChatHeaderComponent, Icon$1 as ChatIcon, Input$2 as ChatInput, ChatInput as ChatInputComponent, Link as ChatLink, Loader$1 as ChatLoader, Logo as ChatLogo, MessageStatus as ChatMessageStatus, Modal as ChatModal, ChatNavigator, Select$2 as ChatSelect, SelectMenu as ChatSelectMenu, StructuredContent as ChatStructuredContent, Text as ChatText, Textarea as ChatTextarea, UserAttachments as ChatUserAttachments, UserMessage as ChatUserMessage, ChatWidget, CredentialsCard, FileField, BADGE_VARIANTS as LUMI_BADGE_VARIANTS, DEFAULT_TITLES as LUMI_DEFAULT_TITLES, LUMI_ICON_TYPES, LiveIndicator, LocationField, ActionBar as LumiActionBar, Badge as LumiBadge, Base as LumiBase, BaseNavbar as LumiBaseNavbar, BaseWorkspace as LumiBaseWorkspace, Breadcrumb as LumiBreadcrumb, BreadcrumbItem as LumiBreadcrumbItem, BreadcrumbSeparator as LumiBreadcrumbSeparator, Button as LumiButton, Calendar as LumiCalendar, Card as LumiCard, Checkbox$1 as LumiCheckbox, Crud as LumiCrud, CurrencyDisplay as LumiCurrencyDisplay, Dashboard as LumiDashboard, DashboardNavbar as LumiDashboardNavbar, DashboardSidebar as LumiDashboardSidebar, DashboardWorkspace as LumiDashboardWorkspace, DateDisplay as LumiDateDisplay, DateInput$1 as LumiDateInput, Drawer as LumiDrawer, DropdownMenu as LumiDropdownMenu, DynamicForm as LumiDynamicForm, FieldValue as LumiFieldValue, Filter as LumiFilter, FilterRow as LumiFilterRow, Checkbox as LumiFormCheckbox, DateInput as LumiFormDateInput, FormDrawer as LumiFormDrawer, Input as LumiFormInput, Select as LumiFormSelect, TimeInput as LumiFormTimeInput, Icon as LumiIcon, Input$1 as LumiInput, Loader as LumiLoader, Menu as LumiMenu, MenuItem as LumiMenuItem, MenuItemGroup as LumiMenuItemGroup, Notification as LumiNotification, Pagination as LumiPagination, Popover as LumiPopover, QRCode as LumiQRCode, RecordCard as LumiRecordCard, Select$1 as LumiSelect, StepIndicator as LumiStepIndicator, Stepper as LumiStepper, SubMenu as LumiSubMenu, Table as LumiTable, Tabs as LumiTabs, TextArea as LumiTextArea, TimeInput$1 as LumiTimeInput, Tooltip as LumiTooltip, MapView, PhotoPicker, ReactiveCrud, ServiceShortcuts, ServicesMap, SessionExpiryPrompt, UserTools, chatEventBus, clearChatComponents, createDeepPropertySubscriber, createEventBus, createStore, createStoreMerger, deepMerge, disabledReasonFor, fetchViaEventBus, getLastFleetSnapshot, matchesDisabledWhen, matchesDoneWhen, matchesVisibleWhen, registerChatComponents, setLastFleetSnapshot, useChatConfig, useReactiveCrud };
|
|
25381
|
+
export { ActionFormDrawer, BottomSheet, CHAT_CONFIG_DEFAULTS, CHAT_EVENT, ICON_TYPES as CHAT_ICON_TYPES, CarouselDisplay, Chat, AssistantMessage as ChatAssistantMessage, AssistantThinkingIndicator as ChatAssistantThinkingIndicator, AttachmentPreview as ChatAttachmentPreview, Avatar as ChatAvatar, Button$1 as ChatButton, ChatConfigProvider, DateDivider as ChatDateDivider, FileViewer as ChatFileViewer, ChatFloatingActions, FullscreenViewer as ChatFullscreenViewer, ChatHeader as ChatHeaderComponent, Icon$1 as ChatIcon, Input$2 as ChatInput, ChatInput as ChatInputComponent, Link as ChatLink, Loader$1 as ChatLoader, Logo as ChatLogo, MessageStatus as ChatMessageStatus, Modal as ChatModal, ChatNavigator, Select$2 as ChatSelect, SelectMenu as ChatSelectMenu, StructuredContent as ChatStructuredContent, Text as ChatText, Textarea as ChatTextarea, UserAttachments as ChatUserAttachments, UserMessage as ChatUserMessage, ChatWidget, CredentialsCard, FileField, BADGE_VARIANTS as LUMI_BADGE_VARIANTS, DEFAULT_TITLES as LUMI_DEFAULT_TITLES, LUMI_ICON_TYPES, LiveIndicator, LocationField, ActionBar as LumiActionBar, Badge as LumiBadge, Base as LumiBase, BaseNavbar as LumiBaseNavbar, BaseWorkspace as LumiBaseWorkspace, Breadcrumb as LumiBreadcrumb, BreadcrumbItem as LumiBreadcrumbItem, BreadcrumbSeparator as LumiBreadcrumbSeparator, Button as LumiButton, Calendar as LumiCalendar, Card as LumiCard, Checkbox$1 as LumiCheckbox, Crud as LumiCrud, CurrencyDisplay as LumiCurrencyDisplay, Dashboard as LumiDashboard, DashboardNavbar as LumiDashboardNavbar, DashboardSidebar as LumiDashboardSidebar, DashboardWorkspace as LumiDashboardWorkspace, DateDisplay as LumiDateDisplay, DateInput$1 as LumiDateInput, Drawer as LumiDrawer, DropdownMenu as LumiDropdownMenu, DynamicForm as LumiDynamicForm, FieldValue as LumiFieldValue, Filter as LumiFilter, FilterRow as LumiFilterRow, Checkbox as LumiFormCheckbox, DateInput as LumiFormDateInput, FormDrawer as LumiFormDrawer, Input as LumiFormInput, Select as LumiFormSelect, TimeInput as LumiFormTimeInput, Icon as LumiIcon, Input$1 as LumiInput, Loader as LumiLoader, Menu as LumiMenu, MenuItem as LumiMenuItem, MenuItemGroup as LumiMenuItemGroup, Notification as LumiNotification, Pagination as LumiPagination, Popover as LumiPopover, QRCode as LumiQRCode, RecordCard as LumiRecordCard, Select$1 as LumiSelect, StepIndicator as LumiStepIndicator, Stepper as LumiStepper, SubMenu as LumiSubMenu, Table as LumiTable, Tabs as LumiTabs, TextArea as LumiTextArea, TimeInput$1 as LumiTimeInput, Tooltip as LumiTooltip, MapView, PhotoPicker, ReactiveCrud, ServiceShortcuts, ServicesMap, SessionExpiryPrompt, SupportRequestForm, UserTools, chatEventBus, clearChatComponents, createDeepPropertySubscriber, createEventBus, createStore, createStoreMerger, deepMerge, disabledReasonFor, fetchViaEventBus, getLastFleetSnapshot, matchesDisabledWhen, matchesDoneWhen, matchesVisibleWhen, registerChatComponents, setLastFleetSnapshot, useChatConfig, useReactiveCrud };
|