Files
klz-cables.com/.pnpm-store/v10/files/f8/e1756aa25aaae680bb1769f6a3b36c489da0345d5396e68946ed8462a380701f6e9f271b2cdb7742cd6b2d60a83aad81c79f1d3aef4798591c4d2a135c24aa
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

53 lines
1.7 KiB
Plaintext

'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useMemo } from 'react';
import { FieldLabel } from '../../fields/FieldLabel/index.js';
import './index.scss';
import { useTranslation } from '../../providers/Translation/index.js';
import { ReactSelect } from '../ReactSelect/index.js';
import { formatOptions } from '../WhereBuilder/Condition/Select/formatOptions.js';
export const TimezonePicker = props => {
const {
id,
onChange: onChangeFromProps,
options: optionsFromProps,
readOnly: readOnlyFromProps,
required,
selectedTimezone: selectedTimezoneFromProps
} = props;
const {
t
} = useTranslation();
const options = formatOptions(optionsFromProps);
const selectedTimezone = useMemo(() => {
return options.find(t_0 => {
const value = typeof t_0 === 'string' ? t_0 : t_0.value;
return value === (selectedTimezoneFromProps || 'UTC');
});
}, [options, selectedTimezoneFromProps]);
const readOnly = Boolean(readOnlyFromProps) || options.length === 1;
return /*#__PURE__*/_jsxs("div", {
className: "timezone-picker-wrapper",
children: [/*#__PURE__*/_jsx(FieldLabel, {
htmlFor: id,
label: `${t('general:timezone')} ${required ? '*' : ''}`,
required: required,
unstyled: true
}), /*#__PURE__*/_jsx(ReactSelect, {
className: "timezone-picker",
disabled: readOnly,
inputId: id,
isClearable: !required,
isCreatable: false,
onChange: val => {
if (onChangeFromProps) {
onChangeFromProps(val?.value || '');
}
},
options: options,
value: selectedTimezone
})]
});
};
//# sourceMappingURL=index.js.map