@beweco/aurora-ui 0.6.10 → 0.6.12
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +117 -28
- package/dist/index.esm.js +117 -28
- package/dist/types/components/currency/Currency.d.ts.map +1 -1
- package/dist/types/components/currency/Currency.types.d.ts +5 -0
- package/dist/types/components/currency/Currency.types.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts +54 -0
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/index.d.ts +1 -1
- package/dist/types/components/whatsapp-preview/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2251,18 +2251,18 @@ var FlagIcon = function (_a) {
|
|
|
2251
2251
|
};
|
|
2252
2252
|
|
|
2253
2253
|
var Currency = function (_a) {
|
|
2254
|
-
var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, optionsProp = _a.options,
|
|
2254
|
+
var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j;
|
|
2255
2255
|
var options = React.useMemo(function () {
|
|
2256
2256
|
var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
|
|
2257
2257
|
return o.length > 0 ? o : defaultCurrencyOptions;
|
|
2258
2258
|
}, [optionsProp]);
|
|
2259
|
-
var
|
|
2260
|
-
var
|
|
2261
|
-
var
|
|
2259
|
+
var _k = React.useState(false), isDropdownOpen = _k[0], setIsDropdownOpen = _k[1];
|
|
2260
|
+
var _l = React.useState(options[0]), selected = _l[0], setSelected = _l[1];
|
|
2261
|
+
var _m = React.useState(""), inputValue = _m[0], setInputValue = _m[1];
|
|
2262
2262
|
var dropdownRef = React.useRef(null);
|
|
2263
2263
|
var portalDropdownRef = React.useRef(null);
|
|
2264
|
-
var
|
|
2265
|
-
var
|
|
2264
|
+
var _o = React.useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
|
|
2265
|
+
var _p = React.useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
|
|
2266
2266
|
var t = __assign(__assign({}, defaultTranslations$b), translations);
|
|
2267
2267
|
var getCountryName = function (opt) { var _a, _b; return (_b = (_a = t.countries) === null || _a === void 0 ? void 0 : _a[opt.country]) !== null && _b !== void 0 ? _b : opt.name; };
|
|
2268
2268
|
var finalLabel = label !== null && label !== void 0 ? label : t.label;
|
|
@@ -2307,7 +2307,7 @@ var Currency = function (_a) {
|
|
|
2307
2307
|
position: "absolute",
|
|
2308
2308
|
top: "".concat(rect.bottom + window.scrollY + 4, "px"),
|
|
2309
2309
|
left: "".concat(rect.left + window.scrollX, "px"),
|
|
2310
|
-
width: "15rem",
|
|
2310
|
+
width: showInput ? "15rem" : "".concat(rect.width, "px"),
|
|
2311
2311
|
zIndex: 50,
|
|
2312
2312
|
});
|
|
2313
2313
|
}
|
|
@@ -2329,11 +2329,19 @@ var Currency = function (_a) {
|
|
|
2329
2329
|
};
|
|
2330
2330
|
}, [isDropdownOpen]);
|
|
2331
2331
|
var emitChange = function (opt, amount) {
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2332
|
+
if (showInput) {
|
|
2333
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
2334
|
+
country: opt.country,
|
|
2335
|
+
currency: opt.currency,
|
|
2336
|
+
amount: amount,
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
else {
|
|
2340
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
2341
|
+
country: opt.country,
|
|
2342
|
+
currency: opt.currency,
|
|
2343
|
+
});
|
|
2344
|
+
}
|
|
2337
2345
|
};
|
|
2338
2346
|
var handleOptionSelect = function (opt) {
|
|
2339
2347
|
setSelected(opt);
|
|
@@ -2345,10 +2353,12 @@ var Currency = function (_a) {
|
|
|
2345
2353
|
setInputValue(val);
|
|
2346
2354
|
emitChange(selected, val);
|
|
2347
2355
|
};
|
|
2348
|
-
var selectorPillClass =
|
|
2356
|
+
var selectorPillClass = showInput
|
|
2357
|
+
? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
|
|
2358
|
+
: "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
|
|
2349
2359
|
var selectorLocked = currencySelectorLocked || disabled;
|
|
2350
|
-
var selectorInner = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selected.currency }), !currencySelectorLocked && !disabled && (jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }))] }));
|
|
2351
|
-
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px]
|
|
2360
|
+
var selectorInner = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [jsxRuntime.jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selected.currency })] }), !currencySelectorLocked && !disabled && (jsxRuntime.jsx("span", { className: !showInput ? 'ml-auto' : 'ml-1', children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }) }))] }));
|
|
2361
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsxRuntime.jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsxRuntime.jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsxRuntime.jsx(react.Input, { type: "text", inputMode: "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
|
|
2352
2362
|
!currencySelectorLocked &&
|
|
2353
2363
|
!disabled &&
|
|
2354
2364
|
reactDom.createPortal(jsxRuntime.jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", role: "listbox", children: [jsxRuntime.jsx("div", { className: "p-2", children: jsxRuntime.jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
|
|
@@ -5390,6 +5400,55 @@ var UploadFile = function (_a) {
|
|
|
5390
5400
|
};
|
|
5391
5401
|
UploadFile.displayName = "UploadFile";
|
|
5392
5402
|
|
|
5403
|
+
function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
|
|
5404
|
+
var _a;
|
|
5405
|
+
var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
|
|
5406
|
+
var _a;
|
|
5407
|
+
if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
5408
|
+
return false;
|
|
5409
|
+
}
|
|
5410
|
+
if (a.type === "list") {
|
|
5411
|
+
return Array.isArray(a.listItems) && a.listItems.length > 0;
|
|
5412
|
+
}
|
|
5413
|
+
return true;
|
|
5414
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
5415
|
+
if (fromProp.length > 0) {
|
|
5416
|
+
return fromProp;
|
|
5417
|
+
}
|
|
5418
|
+
if (ctaType && ctaLabel && ctaValue) {
|
|
5419
|
+
var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
|
|
5420
|
+
return [
|
|
5421
|
+
__assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
|
|
5422
|
+
];
|
|
5423
|
+
}
|
|
5424
|
+
return [];
|
|
5425
|
+
}
|
|
5426
|
+
/** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
|
|
5427
|
+
var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
|
|
5428
|
+
var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
|
|
5429
|
+
function actionIconForType(type) {
|
|
5430
|
+
switch (type) {
|
|
5431
|
+
case "phone":
|
|
5432
|
+
return "solar:phone-bold";
|
|
5433
|
+
case "quick_reply":
|
|
5434
|
+
return "solar:reply-bold";
|
|
5435
|
+
case "list":
|
|
5436
|
+
return "solar:list-bold";
|
|
5437
|
+
default:
|
|
5438
|
+
return "solar:square-share-line-bold";
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
var ListMessageSheet = function (_a) {
|
|
5442
|
+
var _b, _c, _d;
|
|
5443
|
+
var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
|
|
5444
|
+
var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
|
|
5445
|
+
var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
|
|
5446
|
+
var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
|
|
5447
|
+
return (jsxRuntime.jsxs("div", { className: "absolute inset-0 z-40 flex flex-col justify-end pointer-events-auto", role: "presentation", children: [jsxRuntime.jsx("button", { type: "button", className: "absolute inset-0 z-40 bg-black/45 dark:bg-black/60 border-0 cursor-pointer p-0 m-0", onClick: onClose, "aria-label": translations.listCloseAriaLabel }), jsxRuntime.jsxs("div", { className: "relative z-50 mx-1 mb-1 rounded-2xl bg-white dark:bg-[#1f1f1f] shadow-2xl flex flex-col max-h-[min(52vh,420px)] overflow-hidden ring-1 ring-black/5 dark:ring-white/10", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-center relative shrink-0 px-10 pt-3 pb-2.5 border-b border-black/[0.08] dark:border-white/[0.12]", children: [jsxRuntime.jsx("span", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 text-center", children: headerTitle }), jsxRuntime.jsx("button", { type: "button", onClick: onClose, className: "absolute right-2 top-1.5 p-1.5 rounded-full text-gray-500 hover:bg-black/[0.06] dark:text-gray-400 dark:hover:bg-white/[0.08]", "aria-label": translations.listCloseAriaLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:close-circle-bold", className: "text-current", size: "lg" }) })] }), jsxRuntime.jsx("div", { className: "overflow-y-auto flex-1 min-h-0", children: items.map(function (item, rowIndex) {
|
|
5448
|
+
var _a;
|
|
5449
|
+
return (jsxRuntime.jsxs("button", { type: "button", onClick: function () { return onPick(item); }, className: "w-full text-left flex gap-3 px-4 py-3 border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.04] dark:hover:bg-white/[0.05] transition-colors", children: [item.emoji || item.icon ? (jsxRuntime.jsx("div", { className: "shrink-0 w-9 inline-flex items-center justify-center self-start", children: item.emoji ? (jsxRuntime.jsx("span", { className: "text-xl leading-none", "aria-hidden": true, children: item.emoji })) : item.icon ? (jsxRuntime.jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", children: jsxRuntime.jsx(IconComponent, { icon: item.icon, className: "text-gray-600 dark:text-gray-300 [&_svg]:block", size: "sm" }) })) : null })) : null, jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [jsxRuntime.jsx("p", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 leading-snug", children: item.title }), item.description ? (jsxRuntime.jsx("p", { className: "text-[13px] text-gray-600 dark:text-gray-400 mt-0.5 leading-snug", children: item.description })) : null] })] }, (_a = item.id) !== null && _a !== void 0 ? _a : "".concat(item.title, "-").concat(rowIndex)));
|
|
5450
|
+
}) }), footerHint ? (jsxRuntime.jsx("p", { className: "shrink-0 text-center text-[11px] text-gray-500 dark:text-gray-500 px-4 py-2.5 border-t border-black/[0.06] dark:border-white/[0.08]", children: footerHint })) : null] })] }));
|
|
5451
|
+
};
|
|
5393
5452
|
var DEFAULT_TRANSLATIONS$3 = {
|
|
5394
5453
|
businessName: "Tu Negocio",
|
|
5395
5454
|
businessInitials: "TN",
|
|
@@ -5397,10 +5456,12 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5397
5456
|
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
5398
5457
|
viewMore: "ver mas",
|
|
5399
5458
|
viewLess: "ver menos",
|
|
5459
|
+
listCloseAriaLabel: "Cerrar",
|
|
5460
|
+
listSelectHintDefault: "Pulsa una opción para elegir",
|
|
5400
5461
|
};
|
|
5401
5462
|
/**
|
|
5402
5463
|
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5403
|
-
* Supports image, caption, CTA
|
|
5464
|
+
* Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
|
|
5404
5465
|
*
|
|
5405
5466
|
* @component
|
|
5406
5467
|
* @example
|
|
@@ -5414,8 +5475,13 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5414
5475
|
* ```
|
|
5415
5476
|
*/
|
|
5416
5477
|
var WhatsAppPreview = function (_a) {
|
|
5417
|
-
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h;
|
|
5478
|
+
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, previewAction = _a.previewAction, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h, onListItemPick = _a.onListItemPick;
|
|
5418
5479
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
5480
|
+
var _j = React.useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
|
|
5481
|
+
var closeListSheet = React.useCallback(function () {
|
|
5482
|
+
setOpenListSheetIndex(null);
|
|
5483
|
+
}, []);
|
|
5484
|
+
var resolvedActions = React.useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
|
|
5419
5485
|
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
5420
5486
|
var displayCaption = campaignView
|
|
5421
5487
|
? caption
|
|
@@ -5432,21 +5498,44 @@ var WhatsAppPreview = function (_a) {
|
|
|
5432
5498
|
: "max-h-64";
|
|
5433
5499
|
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
5434
5500
|
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
5435
|
-
|
|
5501
|
+
var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
|
|
5502
|
+
var listSheetAction = openListSheetIndex !== null
|
|
5503
|
+
? resolvedActions[openListSheetIndex]
|
|
5504
|
+
: undefined;
|
|
5505
|
+
var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
|
|
5506
|
+
Array.isArray(listSheetAction.listItems) &&
|
|
5507
|
+
listSheetAction.listItems.length > 0;
|
|
5508
|
+
return (jsxRuntime.jsxs("div", { className: "relative w-full h-full flex flex-col bg-[#ECE5DD] dark:bg-gray-900 ".concat(paddingClass, " justify-start ").concat(className), style: containerStyle, children: [showHeader && (jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-4 p-3 bg-[#075E54] dark:bg-[#1F2C33] rounded-t-lg -mx-4 -mt-4", children: [jsxRuntime.jsx("div", { className: "w-10 h-10 bg-gray-300 rounded-full flex items-center justify-center", children: jsxRuntime.jsx("span", { className: "text-gray-600 text-sm font-bold", children: t.businessInitials }) }), jsxRuntime.jsxs("div", { className: "flex-1", children: [jsxRuntime.jsx("span", { className: "text-sm font-semibold text-white", children: t.businessName }), jsxRuntime.jsx("p", { className: "text-xs text-gray-300", children: t.onlineStatus })] })] })), jsxRuntime.jsx("div", { className: "flex flex-col gap-2 ".concat(showHeader ? "mt-6 overflow-y-auto flex-1" : "", " items-start"), children: jsxRuntime.jsx("div", { className: "mr-auto max-w-[85%]", children: jsxRuntime.jsxs("div", { className: "bg-white dark:bg-gray-800 rounded-lg ".concat(bubblePadding, " shadow-sm"), children: [imageUrl && (jsxRuntime.jsx("div", { className: "rounded-lg overflow-hidden ".concat(imageMargin), style: imageAspectRatio
|
|
5436
5509
|
? { aspectRatio: imageAspectRatio }
|
|
5437
5510
|
: undefined, children: jsxRuntime.jsx(react.Image, { src: imageUrl, alt: t.imageAlt, className: "w-full ".concat(imageHeight, " object-cover") }) })), jsxRuntime.jsxs("div", { className: "text-sm text-gray-900 dark:text-white text-left ".concat(imageUrl ? "mt-2" : ""), children: [jsxRuntime.jsx("div", { className: "".concat(showFullCaption && variant === "compact" ? "overflow-y-auto" : "", " ").concat(campaignView ? (imageUrl ? "line-clamp-3" : "line-clamp-[12]") : ""), style: {
|
|
5438
|
-
maxHeight: showFullCaption && variant === "compact"
|
|
5439
|
-
|
|
5440
|
-
: "none",
|
|
5441
|
-
}, children: jsxRuntime.jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
|
|
5442
|
-
onToggleCaption &&
|
|
5443
|
-
variant === "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
|
|
5511
|
+
maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
|
|
5512
|
+
}, children: jsxRuntime.jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate && onToggleCaption && variant === "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
|
|
5444
5513
|
e.stopPropagation();
|
|
5445
5514
|
onToggleCaption();
|
|
5446
|
-
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore }))
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5515
|
+
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore })), jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-1 mt-1", children: [jsxRuntime.jsx("span", { className: "text-[10px] text-gray-600 dark:text-gray-400 tabular-nums", children: new Date().toLocaleTimeString(timeLocale, {
|
|
5516
|
+
hour: "2-digit",
|
|
5517
|
+
minute: "2-digit",
|
|
5518
|
+
}) }), jsxRuntime.jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }), resolvedActions.length > 0 && (jsxRuntime.jsx("div", { className: "".concat(bubbleOutdent, " mt-1 flex flex-col border-t border-black/[0.08] dark:border-white/[0.12]"), children: resolvedActions.map(function (action, index) {
|
|
5519
|
+
var _a;
|
|
5520
|
+
var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
|
|
5521
|
+
var toneClass = action.type === "list"
|
|
5522
|
+
? ACTION_PRIMARY_CLASS
|
|
5523
|
+
: emphasis === "muted"
|
|
5524
|
+
? ACTION_MUTED_CLASS
|
|
5525
|
+
: ACTION_PRIMARY_CLASS;
|
|
5526
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: "w-full flex flex-row items-center justify-center gap-2.5 py-2.5 px-3 text-sm font-medium leading-5 bg-transparent ".concat(toneClass, " border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] transition-colors"), onClick: function (e) {
|
|
5527
|
+
if (action.type === "list") {
|
|
5528
|
+
e.stopPropagation();
|
|
5529
|
+
setOpenListSheetIndex(index);
|
|
5530
|
+
}
|
|
5531
|
+
}, children: [jsxRuntime.jsx("span", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", "aria-hidden": true, children: jsxRuntime.jsx(IconComponent, { icon: actionIconForType(action.type), className: "text-current [&_svg]:block", size: "sm" }) }), jsxRuntime.jsx("span", { className: "min-w-0 text-center leading-5", children: action.title })] }, "".concat(action.type, "-").concat(action.title, "-").concat(index)));
|
|
5532
|
+
}) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsxRuntime.jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
|
|
5533
|
+
onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
|
|
5534
|
+
actionIndex: openListSheetIndex,
|
|
5535
|
+
item: item,
|
|
5536
|
+
});
|
|
5537
|
+
closeListSheet();
|
|
5538
|
+
}, translations: t })) : null] }));
|
|
5450
5539
|
};
|
|
5451
5540
|
|
|
5452
5541
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -2252,18 +2252,18 @@ var FlagIcon = function (_a) {
|
|
|
2252
2252
|
};
|
|
2253
2253
|
|
|
2254
2254
|
var Currency = function (_a) {
|
|
2255
|
-
var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, optionsProp = _a.options,
|
|
2255
|
+
var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j;
|
|
2256
2256
|
var options = useMemo(function () {
|
|
2257
2257
|
var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
|
|
2258
2258
|
return o.length > 0 ? o : defaultCurrencyOptions;
|
|
2259
2259
|
}, [optionsProp]);
|
|
2260
|
-
var
|
|
2261
|
-
var
|
|
2262
|
-
var
|
|
2260
|
+
var _k = useState(false), isDropdownOpen = _k[0], setIsDropdownOpen = _k[1];
|
|
2261
|
+
var _l = useState(options[0]), selected = _l[0], setSelected = _l[1];
|
|
2262
|
+
var _m = useState(""), inputValue = _m[0], setInputValue = _m[1];
|
|
2263
2263
|
var dropdownRef = useRef(null);
|
|
2264
2264
|
var portalDropdownRef = useRef(null);
|
|
2265
|
-
var
|
|
2266
|
-
var
|
|
2265
|
+
var _o = useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
|
|
2266
|
+
var _p = useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
|
|
2267
2267
|
var t = __assign(__assign({}, defaultTranslations$b), translations);
|
|
2268
2268
|
var getCountryName = function (opt) { var _a, _b; return (_b = (_a = t.countries) === null || _a === void 0 ? void 0 : _a[opt.country]) !== null && _b !== void 0 ? _b : opt.name; };
|
|
2269
2269
|
var finalLabel = label !== null && label !== void 0 ? label : t.label;
|
|
@@ -2308,7 +2308,7 @@ var Currency = function (_a) {
|
|
|
2308
2308
|
position: "absolute",
|
|
2309
2309
|
top: "".concat(rect.bottom + window.scrollY + 4, "px"),
|
|
2310
2310
|
left: "".concat(rect.left + window.scrollX, "px"),
|
|
2311
|
-
width: "15rem",
|
|
2311
|
+
width: showInput ? "15rem" : "".concat(rect.width, "px"),
|
|
2312
2312
|
zIndex: 50,
|
|
2313
2313
|
});
|
|
2314
2314
|
}
|
|
@@ -2330,11 +2330,19 @@ var Currency = function (_a) {
|
|
|
2330
2330
|
};
|
|
2331
2331
|
}, [isDropdownOpen]);
|
|
2332
2332
|
var emitChange = function (opt, amount) {
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2333
|
+
if (showInput) {
|
|
2334
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
2335
|
+
country: opt.country,
|
|
2336
|
+
currency: opt.currency,
|
|
2337
|
+
amount: amount,
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
else {
|
|
2341
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
2342
|
+
country: opt.country,
|
|
2343
|
+
currency: opt.currency,
|
|
2344
|
+
});
|
|
2345
|
+
}
|
|
2338
2346
|
};
|
|
2339
2347
|
var handleOptionSelect = function (opt) {
|
|
2340
2348
|
setSelected(opt);
|
|
@@ -2346,10 +2354,12 @@ var Currency = function (_a) {
|
|
|
2346
2354
|
setInputValue(val);
|
|
2347
2355
|
emitChange(selected, val);
|
|
2348
2356
|
};
|
|
2349
|
-
var selectorPillClass =
|
|
2357
|
+
var selectorPillClass = showInput
|
|
2358
|
+
? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
|
|
2359
|
+
: "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
|
|
2350
2360
|
var selectorLocked = currencySelectorLocked || disabled;
|
|
2351
|
-
var selectorInner = (jsxs(Fragment, { children: [jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsx("span", { className: "text-xs text-default-500", children: selected.currency }), !currencySelectorLocked && !disabled && (jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }))] }));
|
|
2352
|
-
return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full min-h-[56px]
|
|
2361
|
+
var selectorInner = (jsxs(Fragment, { children: [jsxs("span", { className: "flex items-center gap-1", children: [jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsx("span", { className: "text-xs text-default-500", children: selected.currency })] }), !currencySelectorLocked && !disabled && (jsx("span", { className: !showInput ? 'ml-auto' : 'ml-1', children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }) }))] }));
|
|
2362
|
+
return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsx(Input$1, { type: "text", inputMode: "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
|
|
2353
2363
|
!currencySelectorLocked &&
|
|
2354
2364
|
!disabled &&
|
|
2355
2365
|
createPortal(jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", role: "listbox", children: [jsx("div", { className: "p-2", children: jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
|
|
@@ -5391,6 +5401,55 @@ var UploadFile = function (_a) {
|
|
|
5391
5401
|
};
|
|
5392
5402
|
UploadFile.displayName = "UploadFile";
|
|
5393
5403
|
|
|
5404
|
+
function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
|
|
5405
|
+
var _a;
|
|
5406
|
+
var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
|
|
5407
|
+
var _a;
|
|
5408
|
+
if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
5409
|
+
return false;
|
|
5410
|
+
}
|
|
5411
|
+
if (a.type === "list") {
|
|
5412
|
+
return Array.isArray(a.listItems) && a.listItems.length > 0;
|
|
5413
|
+
}
|
|
5414
|
+
return true;
|
|
5415
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
5416
|
+
if (fromProp.length > 0) {
|
|
5417
|
+
return fromProp;
|
|
5418
|
+
}
|
|
5419
|
+
if (ctaType && ctaLabel && ctaValue) {
|
|
5420
|
+
var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
|
|
5421
|
+
return [
|
|
5422
|
+
__assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
|
|
5423
|
+
];
|
|
5424
|
+
}
|
|
5425
|
+
return [];
|
|
5426
|
+
}
|
|
5427
|
+
/** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
|
|
5428
|
+
var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
|
|
5429
|
+
var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
|
|
5430
|
+
function actionIconForType(type) {
|
|
5431
|
+
switch (type) {
|
|
5432
|
+
case "phone":
|
|
5433
|
+
return "solar:phone-bold";
|
|
5434
|
+
case "quick_reply":
|
|
5435
|
+
return "solar:reply-bold";
|
|
5436
|
+
case "list":
|
|
5437
|
+
return "solar:list-bold";
|
|
5438
|
+
default:
|
|
5439
|
+
return "solar:square-share-line-bold";
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
var ListMessageSheet = function (_a) {
|
|
5443
|
+
var _b, _c, _d;
|
|
5444
|
+
var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
|
|
5445
|
+
var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
|
|
5446
|
+
var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
|
|
5447
|
+
var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
|
|
5448
|
+
return (jsxs("div", { className: "absolute inset-0 z-40 flex flex-col justify-end pointer-events-auto", role: "presentation", children: [jsx("button", { type: "button", className: "absolute inset-0 z-40 bg-black/45 dark:bg-black/60 border-0 cursor-pointer p-0 m-0", onClick: onClose, "aria-label": translations.listCloseAriaLabel }), jsxs("div", { className: "relative z-50 mx-1 mb-1 rounded-2xl bg-white dark:bg-[#1f1f1f] shadow-2xl flex flex-col max-h-[min(52vh,420px)] overflow-hidden ring-1 ring-black/5 dark:ring-white/10", children: [jsxs("div", { className: "flex items-center justify-center relative shrink-0 px-10 pt-3 pb-2.5 border-b border-black/[0.08] dark:border-white/[0.12]", children: [jsx("span", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 text-center", children: headerTitle }), jsx("button", { type: "button", onClick: onClose, className: "absolute right-2 top-1.5 p-1.5 rounded-full text-gray-500 hover:bg-black/[0.06] dark:text-gray-400 dark:hover:bg-white/[0.08]", "aria-label": translations.listCloseAriaLabel, children: jsx(IconComponent, { icon: "solar:close-circle-bold", className: "text-current", size: "lg" }) })] }), jsx("div", { className: "overflow-y-auto flex-1 min-h-0", children: items.map(function (item, rowIndex) {
|
|
5449
|
+
var _a;
|
|
5450
|
+
return (jsxs("button", { type: "button", onClick: function () { return onPick(item); }, className: "w-full text-left flex gap-3 px-4 py-3 border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.04] dark:hover:bg-white/[0.05] transition-colors", children: [item.emoji || item.icon ? (jsx("div", { className: "shrink-0 w-9 inline-flex items-center justify-center self-start", children: item.emoji ? (jsx("span", { className: "text-xl leading-none", "aria-hidden": true, children: item.emoji })) : item.icon ? (jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", children: jsx(IconComponent, { icon: item.icon, className: "text-gray-600 dark:text-gray-300 [&_svg]:block", size: "sm" }) })) : null })) : null, jsxs("div", { className: "min-w-0 flex-1", children: [jsx("p", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 leading-snug", children: item.title }), item.description ? (jsx("p", { className: "text-[13px] text-gray-600 dark:text-gray-400 mt-0.5 leading-snug", children: item.description })) : null] })] }, (_a = item.id) !== null && _a !== void 0 ? _a : "".concat(item.title, "-").concat(rowIndex)));
|
|
5451
|
+
}) }), footerHint ? (jsx("p", { className: "shrink-0 text-center text-[11px] text-gray-500 dark:text-gray-500 px-4 py-2.5 border-t border-black/[0.06] dark:border-white/[0.08]", children: footerHint })) : null] })] }));
|
|
5452
|
+
};
|
|
5394
5453
|
var DEFAULT_TRANSLATIONS$3 = {
|
|
5395
5454
|
businessName: "Tu Negocio",
|
|
5396
5455
|
businessInitials: "TN",
|
|
@@ -5398,10 +5457,12 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5398
5457
|
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
5399
5458
|
viewMore: "ver mas",
|
|
5400
5459
|
viewLess: "ver menos",
|
|
5460
|
+
listCloseAriaLabel: "Cerrar",
|
|
5461
|
+
listSelectHintDefault: "Pulsa una opción para elegir",
|
|
5401
5462
|
};
|
|
5402
5463
|
/**
|
|
5403
5464
|
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5404
|
-
* Supports image, caption, CTA
|
|
5465
|
+
* Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
|
|
5405
5466
|
*
|
|
5406
5467
|
* @component
|
|
5407
5468
|
* @example
|
|
@@ -5415,8 +5476,13 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5415
5476
|
* ```
|
|
5416
5477
|
*/
|
|
5417
5478
|
var WhatsAppPreview = function (_a) {
|
|
5418
|
-
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h;
|
|
5479
|
+
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, previewAction = _a.previewAction, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h, onListItemPick = _a.onListItemPick;
|
|
5419
5480
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
5481
|
+
var _j = useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
|
|
5482
|
+
var closeListSheet = useCallback(function () {
|
|
5483
|
+
setOpenListSheetIndex(null);
|
|
5484
|
+
}, []);
|
|
5485
|
+
var resolvedActions = useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
|
|
5420
5486
|
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
5421
5487
|
var displayCaption = campaignView
|
|
5422
5488
|
? caption
|
|
@@ -5433,21 +5499,44 @@ var WhatsAppPreview = function (_a) {
|
|
|
5433
5499
|
: "max-h-64";
|
|
5434
5500
|
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
5435
5501
|
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
5436
|
-
|
|
5502
|
+
var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
|
|
5503
|
+
var listSheetAction = openListSheetIndex !== null
|
|
5504
|
+
? resolvedActions[openListSheetIndex]
|
|
5505
|
+
: undefined;
|
|
5506
|
+
var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
|
|
5507
|
+
Array.isArray(listSheetAction.listItems) &&
|
|
5508
|
+
listSheetAction.listItems.length > 0;
|
|
5509
|
+
return (jsxs("div", { className: "relative w-full h-full flex flex-col bg-[#ECE5DD] dark:bg-gray-900 ".concat(paddingClass, " justify-start ").concat(className), style: containerStyle, children: [showHeader && (jsxs("div", { className: "flex items-center gap-3 mb-4 p-3 bg-[#075E54] dark:bg-[#1F2C33] rounded-t-lg -mx-4 -mt-4", children: [jsx("div", { className: "w-10 h-10 bg-gray-300 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-gray-600 text-sm font-bold", children: t.businessInitials }) }), jsxs("div", { className: "flex-1", children: [jsx("span", { className: "text-sm font-semibold text-white", children: t.businessName }), jsx("p", { className: "text-xs text-gray-300", children: t.onlineStatus })] })] })), jsx("div", { className: "flex flex-col gap-2 ".concat(showHeader ? "mt-6 overflow-y-auto flex-1" : "", " items-start"), children: jsx("div", { className: "mr-auto max-w-[85%]", children: jsxs("div", { className: "bg-white dark:bg-gray-800 rounded-lg ".concat(bubblePadding, " shadow-sm"), children: [imageUrl && (jsx("div", { className: "rounded-lg overflow-hidden ".concat(imageMargin), style: imageAspectRatio
|
|
5437
5510
|
? { aspectRatio: imageAspectRatio }
|
|
5438
5511
|
: undefined, children: jsx(Image$1, { src: imageUrl, alt: t.imageAlt, className: "w-full ".concat(imageHeight, " object-cover") }) })), jsxs("div", { className: "text-sm text-gray-900 dark:text-white text-left ".concat(imageUrl ? "mt-2" : ""), children: [jsx("div", { className: "".concat(showFullCaption && variant === "compact" ? "overflow-y-auto" : "", " ").concat(campaignView ? (imageUrl ? "line-clamp-3" : "line-clamp-[12]") : ""), style: {
|
|
5439
|
-
maxHeight: showFullCaption && variant === "compact"
|
|
5440
|
-
|
|
5441
|
-
: "none",
|
|
5442
|
-
}, children: jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
|
|
5443
|
-
onToggleCaption &&
|
|
5444
|
-
variant === "compact" && (jsx("button", { type: "button", onClick: function (e) {
|
|
5512
|
+
maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
|
|
5513
|
+
}, children: jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate && onToggleCaption && variant === "compact" && (jsx("button", { type: "button", onClick: function (e) {
|
|
5445
5514
|
e.stopPropagation();
|
|
5446
5515
|
onToggleCaption();
|
|
5447
|
-
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore }))
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5516
|
+
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore })), jsxs("div", { className: "flex items-center justify-end gap-1 mt-1", children: [jsx("span", { className: "text-[10px] text-gray-600 dark:text-gray-400 tabular-nums", children: new Date().toLocaleTimeString(timeLocale, {
|
|
5517
|
+
hour: "2-digit",
|
|
5518
|
+
minute: "2-digit",
|
|
5519
|
+
}) }), jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }), resolvedActions.length > 0 && (jsx("div", { className: "".concat(bubbleOutdent, " mt-1 flex flex-col border-t border-black/[0.08] dark:border-white/[0.12]"), children: resolvedActions.map(function (action, index) {
|
|
5520
|
+
var _a;
|
|
5521
|
+
var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
|
|
5522
|
+
var toneClass = action.type === "list"
|
|
5523
|
+
? ACTION_PRIMARY_CLASS
|
|
5524
|
+
: emphasis === "muted"
|
|
5525
|
+
? ACTION_MUTED_CLASS
|
|
5526
|
+
: ACTION_PRIMARY_CLASS;
|
|
5527
|
+
return (jsxs("button", { type: "button", className: "w-full flex flex-row items-center justify-center gap-2.5 py-2.5 px-3 text-sm font-medium leading-5 bg-transparent ".concat(toneClass, " border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] transition-colors"), onClick: function (e) {
|
|
5528
|
+
if (action.type === "list") {
|
|
5529
|
+
e.stopPropagation();
|
|
5530
|
+
setOpenListSheetIndex(index);
|
|
5531
|
+
}
|
|
5532
|
+
}, children: [jsx("span", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", "aria-hidden": true, children: jsx(IconComponent, { icon: actionIconForType(action.type), className: "text-current [&_svg]:block", size: "sm" }) }), jsx("span", { className: "min-w-0 text-center leading-5", children: action.title })] }, "".concat(action.type, "-").concat(action.title, "-").concat(index)));
|
|
5533
|
+
}) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
|
|
5534
|
+
onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
|
|
5535
|
+
actionIndex: openListSheetIndex,
|
|
5536
|
+
item: item,
|
|
5537
|
+
});
|
|
5538
|
+
closeListSheet();
|
|
5539
|
+
}, translations: t })) : null] }));
|
|
5451
5540
|
};
|
|
5452
5541
|
|
|
5453
5542
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAK1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8RjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -43,6 +43,11 @@ export interface CurrencyInputProps {
|
|
|
43
43
|
* El campo de importe sigue siendo editable salvo que `disabled` sea true.
|
|
44
44
|
*/
|
|
45
45
|
currencySelectorLocked?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Si es false, oculta el campo de importe y muestra solo el selector de moneda.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
showInput?: boolean;
|
|
46
51
|
/** Lista de opciones; por defecto se usan países alineados con el componente Phone. */
|
|
47
52
|
options?: CurrencyOption[];
|
|
48
53
|
translations?: CurrencyTranslations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.types.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uFAAuF;IACvF,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"Currency.types.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
@@ -2,7 +2,7 @@ import type React from "react";
|
|
|
2
2
|
import type { WhatsAppPreviewProps } from "./WhatsAppPreview.types";
|
|
3
3
|
/**
|
|
4
4
|
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5
|
-
* Supports image, caption, CTA
|
|
5
|
+
* Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
|
|
6
6
|
*
|
|
7
7
|
* @component
|
|
8
8
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhatsAppPreview.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"WhatsAppPreview.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAGX,oBAAoB,EAEpB,MAAM,yBAAyB,CAAC;AA6JjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwN1D,CAAC"}
|
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
/** Opcion dentro de una accion tipo lista (list message / selector). */
|
|
2
|
+
export interface WhatsAppPreviewListItem {
|
|
3
|
+
id?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Emoji o caracter visible a la izquierda (ej. señal, TV). */
|
|
7
|
+
emoji?: string;
|
|
8
|
+
/** Icono Iconify si no hay `emoji` */
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Accion de plantilla (CTA / respuesta rapida / lista) para el preview; el consumidor mapea el JSON del backend a esta forma. */
|
|
12
|
+
export interface WhatsAppPreviewAction {
|
|
13
|
+
/**
|
|
14
|
+
* `url` — enlace externo (icono tipo “abrir enlace”).
|
|
15
|
+
* `quick_reply` — respuesta rapida (icono tipo respuesta).
|
|
16
|
+
* `phone` — llamada.
|
|
17
|
+
* `list` — abre hoja inferior con opciones (list message).
|
|
18
|
+
*/
|
|
19
|
+
type: "url" | "phone" | "quick_reply" | "list";
|
|
20
|
+
/**
|
|
21
|
+
* Texto del boton en la burbuja.
|
|
22
|
+
* Para `list`, suele ser el disparador (ej. "Selecciona").
|
|
23
|
+
*/
|
|
24
|
+
title: string;
|
|
25
|
+
/** URL si type es "url" (si falta, se usa `value`) */
|
|
26
|
+
url?: string;
|
|
27
|
+
/** Telefono si type es "phone"; para "url" puede usarse como URL alternativa */
|
|
28
|
+
value?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Enfoque visual (como en WhatsApp: principal en verde marca, secundario en gris).
|
|
31
|
+
* Por defecto `primary`. No aplica a `list` (siempre estilo lista verde).
|
|
32
|
+
*/
|
|
33
|
+
emphasis?: "primary" | "muted";
|
|
34
|
+
/** Si type es `list`: titulo en la hoja (por defecto el mismo `title` del boton). */
|
|
35
|
+
listHeaderTitle?: string;
|
|
36
|
+
/** Si type es `list`: filas de la hoja (obligatorio al menos uno). */
|
|
37
|
+
listItems?: WhatsAppPreviewListItem[];
|
|
38
|
+
/** Texto pie de la hoja (ej. instruccion al usuario). */
|
|
39
|
+
listFooterHint?: string;
|
|
40
|
+
}
|
|
1
41
|
export interface WhatsAppPreviewTranslations {
|
|
2
42
|
/** Business name displayed in header */
|
|
3
43
|
businessName?: string;
|
|
@@ -11,6 +51,10 @@ export interface WhatsAppPreviewTranslations {
|
|
|
11
51
|
viewMore?: string;
|
|
12
52
|
/** "View less" text for caption truncation */
|
|
13
53
|
viewLess?: string;
|
|
54
|
+
/** aria-label del boton cerrar en la hoja de lista */
|
|
55
|
+
listCloseAriaLabel?: string;
|
|
56
|
+
/** Pie de la hoja de lista si no se pasa por accion */
|
|
57
|
+
listSelectHintDefault?: string;
|
|
14
58
|
}
|
|
15
59
|
export interface WhatsAppPreviewProps {
|
|
16
60
|
/** URL of the image to display */
|
|
@@ -33,6 +77,16 @@ export interface WhatsAppPreviewProps {
|
|
|
33
77
|
ctaLabel?: string;
|
|
34
78
|
/** CTA button value (phone number or URL) */
|
|
35
79
|
ctaValue?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Lista de acciones (botones) tipo plantilla WhatsApp.
|
|
82
|
+
* Si tiene al menos un elemento con `title` no vacio, tiene prioridad sobre `ctaType` / `ctaLabel` / `ctaValue`.
|
|
83
|
+
*/
|
|
84
|
+
previewAction?: WhatsAppPreviewAction[];
|
|
85
|
+
/** Tras elegir una fila en una accion `list`, el consumidor puede reaccionar (p. ej. analytics). */
|
|
86
|
+
onListItemPick?: (detail: {
|
|
87
|
+
actionIndex: number;
|
|
88
|
+
item: WhatsAppPreviewListItem;
|
|
89
|
+
}) => void;
|
|
36
90
|
/** If true, shows square image and more text lines (for campaigns) */
|
|
37
91
|
campaignView?: boolean;
|
|
38
92
|
/** Translations for i18n support */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhatsAppPreview.types.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAC3C,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"WhatsAppPreview.types.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.types.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,kIAAkI;AAClI,MAAM,WAAW,qBAAqB;IACrC;;;;;OAKG;IACH,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;IAC/C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC/B,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC3C,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACpC,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iCAAiC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,oGAAoG;IACpG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE;QACzB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,uBAAuB,CAAC;KAC9B,KAAK,IAAI,CAAC;IACX,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
|