@redneckz/wildless-cms-uni-blocks 0.14.693 → 0.14.694

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.
@@ -1526,6 +1526,12 @@
1526
1526
  const [query, setQuery] = useState('');
1527
1527
  const isDisabled = getDisabled(disabled, options.length);
1528
1528
  const hasOpen = isOpen && !isDisabled;
1529
+ const handleOpen = useCallback(() => {
1530
+ if (isDisabled) {
1531
+ return;
1532
+ }
1533
+ open();
1534
+ }, [isDisabled]);
1529
1535
  const handleClose = useCallback(() => {
1530
1536
  setQuery('');
1531
1537
  close();
@@ -1539,7 +1545,7 @@
1539
1545
  onClose: handleClose,
1540
1546
  iconVersion,
1541
1547
  });
1542
- return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : open, children: [jsx("p", { className: "line-clamp-2 text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1548
+ return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : handleOpen, children: [jsx("p", { className: "line-clamp-2 text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery, disabled: isDisabled }) })) : null] })] }));
1543
1549
  });
1544
1550
  const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-0 flex self-center', { 'rotate-180': !isOpen }), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1545
1551
  const getStyle = (isBorder, valid, disabled) => style(isBorder ? 'border rounded-md ' : '', isBorder && !disabled ? 'hover:border-primary-hover' : '', disabled ? 'bg-main-divider' : 'cursor-pointer ', valid ? 'border-gray' : 'border-error');
@@ -7190,15 +7196,15 @@
7190
7196
  },
7191
7197
  {
7192
7198
  label: 'Сумма',
7193
- description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
7199
+ description: `${leadForm?.calculator?.moneyValue?.toLocaleString() ?? '0'} ₽`,
7194
7200
  },
7195
7201
  {
7196
7202
  label: 'Срок кредита',
7197
- description: leadForm?.monthsValue + ' мес',
7203
+ description: `${leadForm?.calculator?.monthsValue ?? '0'} мес`,
7198
7204
  },
7199
7205
  {
7200
7206
  label: 'Тип платежа',
7201
- description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
7207
+ description: leadForm?.calculator?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
7202
7208
  },
7203
7209
  ] }));
7204
7210
  });
@@ -10380,7 +10386,7 @@
10380
10386
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10381
10387
  });
10382
10388
 
10383
- const packageVersion = "0.14.692";
10389
+ const packageVersion = "0.14.693";
10384
10390
 
10385
10391
  exports.Blocks = Blocks;
10386
10392
  exports.ContentPage = ContentPage;