@vchasno/ui-kit 0.4.99 → 0.4.101
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/CHANGELOG.md +18 -1
- package/dist/components/Datepicker/{DateRangePicker.d.ts → DateRangePicker/DateRangePicker.d.ts} +6 -2
- package/dist/components/Datepicker/DateRangePicker/DateRangePicker.js +2 -0
- package/dist/components/Datepicker/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/Datepicker/DateRangePicker/DateRangePicker.reducer.js +2 -0
- package/dist/components/Datepicker/DateRangePicker/DateRangePicker.reducer.js.map +1 -0
- package/dist/components/FollowUs/config.d.ts +1 -1
- package/dist/components/FollowUs/config.js.map +1 -1
- package/dist/components/MobileAppLinks/config.d.ts +1 -1
- package/dist/components/MobileAppLinks/config.js.map +1 -1
- package/dist/components/ProjectsPopover/mappers.js +1 -1
- package/dist/components/ProjectsPopover/mappers.js.map +1 -1
- package/dist/components/ProjectsPopover/types.js +1 -1
- package/dist/components/ProjectsPopover/types.js.map +1 -1
- package/dist/components/types.d.ts +1 -1
- package/dist/css/vchasno-ui.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/Datepicker/DateRangePicker.js +0 -2
- package/dist/components/Datepicker/DateRangePicker.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,24 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [0.4.101] - 2026-05-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **ProjectsPopover** — add "profile" as a siteless Vchasno product (registered in "vchasnoProductsList" and "vchasnoProductsWithoutSiteList"; empty "hrefMap"/"tooltipHintMap"/"titleMap"/"iconMap" entries, excluded from "FollowUs" and "MobileAppLinks" configs)
|
|
13
|
+
|
|
14
|
+
## [0.4.100] - 2026-04-28
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **DateRangePicker** — add `onConfirm?: (dates: [Date | null, Date | null]) => void` callback — fired when user confirms selection (Save button)
|
|
19
|
+
- **DateRangePicker** — add `onCancel?: () => void` callback — fired when user cancels (Cancel button, outside click, Escape key)
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **DateRangePicker** — outside-month days are now fully hidden (`visibility: hidden`, `pointer-events: none`) instead of being shown with muted styling; removes the previous MutationObserver-based day-number restore workaround
|
|
24
|
+
- **DateRangePicker** — calendar opens to the relevant month on open: month before `endDate` if set, otherwise `startDate` month, otherwise current month (`openToDate` + `subMonths`)
|
|
25
|
+
- **DateRangePicker** — calendar view resets correctly after clear or preset change via internal `calendarKey` counter
|
|
9
26
|
|
|
10
27
|
## [0.4.99] - 2026-04-21
|
|
11
28
|
|
package/dist/components/Datepicker/{DateRangePicker.d.ts → DateRangePicker/DateRangePicker.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
|
-
import Select from '
|
|
4
|
-
import { LoadingFeedback, WithHint, ErrorFeedback, DataQa, HideEmptyMeta, WithPulseAnimation } from '
|
|
3
|
+
import Select from '../../Select/Select.js';
|
|
4
|
+
import { LoadingFeedback, WithHint, ErrorFeedback, DataQa, HideEmptyMeta, WithPulseAnimation } from '../../types.js';
|
|
5
5
|
|
|
6
6
|
type ControlledReactDatePickerProps = 'selectsRange' | 'selectsMultiple' | 'startDate' | 'endDate' | 'onChange' | 'value' | 'open' | 'onInputClick' | 'onClickOutside' | 'monthsShown' | 'shouldCloseOnSelect' | 'renderCustomHeader' | 'children';
|
|
7
7
|
interface DateRangePickerProps extends Omit<ReactDatePickerProps<true>, ControlledReactDatePickerProps>, Partial<LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta & WithPulseAnimation> {
|
|
@@ -18,6 +18,10 @@ interface DateRangePickerProps extends Omit<ReactDatePickerProps<true>, Controll
|
|
|
18
18
|
}[];
|
|
19
19
|
presetPlaceholder?: string;
|
|
20
20
|
presetSelectProps?: Omit<React.ComponentProps<typeof Select>, 'options' | 'onChange' | 'value'>;
|
|
21
|
+
/** викликається при скасуванні вибору */
|
|
22
|
+
onCancel?: () => void;
|
|
23
|
+
/** викликається при підтвердженні вибору */
|
|
24
|
+
onConfirm?: (dates: [Date | null, Date | null]) => void;
|
|
21
25
|
disabled?: ReactDatePickerProps<true>['disabled'];
|
|
22
26
|
required?: ReactDatePickerProps<true>['required'];
|
|
23
27
|
isClearable?: ReactDatePickerProps<true>['isClearable'];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"react";import a from"react-datepicker";import t from"classnames";import{format as r,subMonths as n}from"date-fns";import{uk as l}from"date-fns/locale/uk";import c from"../../../icons/arrowLeft.js";import o from"../../../icons/arrowRight.js";import s from"../../../icons/calendar.js";import i from"../../../icons/clear.js";import p from"../../InputMeta/InputMeta.js";import m from"../../LabelText/LabelText.js";import u from"../../Select/Select.js";import"../../Select/SelectCreatable.js";import"react-select/async";import"react-select";import d from"../../Spinner/Spinner.js";import{pickerReducer as h,initialState as k}from"./DateRangePicker.reducer.js";let v=()=>e.createElement("span",{className:"vchasno-ui-date-range-picker__custom-close-icon"},i),b=({startDate:i,endDate:b,onChange:y,label:_,disabled:g,required:f,loading:E,hint:N,error:C,className:D,dateFormat:j="dd/MM/yyyy",dataQa:w,hideEmptyMeta:S=!1,wide:L=!1,pulse:x,isClearable:R=!1,minDate:A,maxDate:M,popperClassName:T,portalId:I,cancelLabel:P="Скасувати",saveLabel:q="Зберегти",locale:H=l,presets:O=[],presetPlaceholder:$="Обрати період",presetSelectProps:K,onCancel:z,onConfirm:B,...F})=>{var G,J;let[Q,U]=e.useReducer(h,k),{isOpen:V,tempStartDate:W,tempEndDate:X,selectedPreset:Y,calendarKey:Z}=Q,ee=()=>{z?.(),U({type:"cancel",startDate:i,endDate:b})},ea=(()=>{if(!i&&!b)return"";let e=Array.isArray(j)?j[0]:j;if(!e)return"";let a=i?r(i,e):"",t=b?r(b,e):"";return a&&t?`${a} - ${t}`:a||""})(),et=!!i||!!b;return e.createElement("label",{onClick:e=>e.preventDefault(),"data-qa":w,className:t("vchasno-ui-date-picker","vchasno-ui-date-range-picker",{"--loading":E,"--required":f,"--disabled":g,"--error":C,"--wide":L,"--not-empty":et,"--is-label":!!_},D),onKeyDown:e=>{"Escape"===e.key&&V&&ee()}},e.createElement("span",{className:t("vchasno-ui-date-range-picker__wrapper",{"vchasno-ui-pulse-animation":x&&!g})},_&&e.createElement(m,null,_),e.createElement(a,{key:Z,openToDate:(G=V?W:i,(J=V?X:b)?n(J,1):G||new Date),fixedHeight:!0,locale:H,disabled:g,placeholderText:"ДД/ММ/РРРР - ДД/ММ/РРРР",showPopperArrow:!1,className:t("vchasno-ui-date-range-picker__picker","vchasno-ui-date-picker__picker"),popperClassName:t("vchasno-ui-date-range-picker-popper",T),selectsRange:!0,startDate:V?W:i,endDate:V?X:b,onChange:e=>{let[a,t]=e;U({type:"tempChange",start:a,end:t})},monthsShown:2,shouldCloseOnSelect:!1,open:V,onInputClick:()=>{g||U({type:"open",startDate:i,endDate:b})},onClickOutside:ee,enableTabLoop:!1,minDate:A,maxDate:M,portalId:I,value:ea,renderCustomHeader:({monthDate:a,decreaseMonth:t,increaseMonth:n,prevMonthButtonDisabled:l,nextMonthButtonDisabled:s})=>e.createElement("div",{className:"vchasno-ui-date-range-picker__header"},e.createElement("button",{type:"button",className:"vchasno-ui-date-range-picker__nav-btn",onClick:t,disabled:l},e.createElement(c,null)),e.createElement("span",{className:"vchasno-ui-date-range-picker__month-title"},r(a,"LLLL, yyyy",{locale:"string"==typeof H?void 0:H})),e.createElement("button",{type:"button",className:"vchasno-ui-date-range-picker__nav-btn",onClick:n,disabled:s},e.createElement(o,null))),...F},e.createElement("div",{className:"vchasno-ui-date-range-picker__presets"},O.length>0&&e.createElement(u,{className:"vchasno-ui-date-range-picker__preset-select",isClearable:!0,options:O.map(e=>({label:e.label,value:e.label})),value:Y,placeholder:$,onChange:e=>{let a=Array.isArray(e)?null:e;if(!a){U({type:"reset"});return}let t=O.find(e=>e.label===a.value);t&&U({type:"presetSelect",option:a,start:t.range[0],end:t.range[1]})},hideEmptyMeta:!0,wide:!0,...K})),e.createElement("div",{className:"vchasno-ui-date-range-picker__actions"},e.createElement("button",{type:"button",className:"vchasno-ui-date-range-picker__cancel-btn",onClick:ee},P),e.createElement("button",{type:"button",className:"vchasno-ui-date-range-picker__save-btn",onClick:()=>{y([W,X]),B?.([W,X]),U({type:"close"})}},q))),E?e.createElement(d,{className:"vchasno-ui-date-range-picker__spinner"}):e.createElement(s,{className:"vchasno-ui-date-range-picker__custom-calendar-icon"}),R&&et&&!g&&e.createElement("button",{type:"button","aria-label":"Очистити",className:"vchasno-ui-date-range-picker__clear-btn",onClick:()=>{y([null,null]),U({type:"reset"})}},e.createElement(v,null))),!S||C||N?e.createElement(p,{hint:N,error:C}):null)};b.displayName="DateRangePicker";export{b as default};
|
|
2
|
+
//# sourceMappingURL=DateRangePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangePicker.js","sources":["../../../../src/components/Datepicker/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\n\nimport cn from 'classnames';\nimport { format, subMonths } from 'date-fns';\nimport { uk } from 'date-fns/locale/uk';\n\nimport ArrowLeftIcon from '../../../icons/arrowLeft';\nimport ArrowRightIcon from '../../../icons/arrowRight';\nimport CalendarIcon from '../../../icons/calendar';\nimport clearRawSvg from '../../../icons/clear';\nimport InputMeta from '../../InputMeta';\nimport LabelText from '../../LabelText';\nimport Select from '../../Select';\nimport type { SelectOption } from '../../Select';\nimport Spinner from '../../Spinner';\nimport type {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithPulseAnimation,\n} from '../../types';\nimport { initialState, pickerReducer } from './DateRangePicker.reducer';\n\nimport '../DatePicker.global.css';\nimport './DateRangePicker.global.css';\n\nconst CloseSvg = () => (\n <span className=\"vchasno-ui-date-range-picker__custom-close-icon\">{clearRawSvg}</span>\n);\n\ntype ControlledReactDatePickerProps =\n | 'selectsRange'\n | 'selectsMultiple'\n | 'startDate'\n | 'endDate'\n | 'onChange'\n | 'value'\n | 'open'\n | 'onInputClick'\n | 'onClickOutside'\n | 'monthsShown'\n | 'shouldCloseOnSelect'\n | 'renderCustomHeader'\n | 'children';\n\nexport interface DateRangePickerProps\n extends Omit<ReactDatePickerProps<true>, ControlledReactDatePickerProps>,\n Partial<\n LoadingFeedback & WithHint & ErrorFeedback & DataQa & HideEmptyMeta & WithPulseAnimation\n > {\n // Required controlled props (range-mode contract)\n startDate: Date | null;\n endDate: Date | null;\n onChange: (dates: [Date | null, Date | null]) => void;\n\n // UI-kit additions\n label?: string;\n wide?: boolean;\n cancelLabel?: string;\n saveLabel?: string;\n presets?: { label: string; range: [Date, Date] }[];\n presetPlaceholder?: string;\n presetSelectProps?: Omit<React.ComponentProps<typeof Select>, 'options' | 'onChange' | 'value'>;\n\n /** викликається при скасуванні вибору */\n onCancel?: () => void;\n /** викликається при підтвердженні вибору */\n onConfirm?: (dates: [Date | null, Date | null]) => void;\n\n // Explicit re-declarations for Storybook Controls visibility\n // (types inherited from ReactDatePickerProps<true> via indexed access — zero drift)\n disabled?: ReactDatePickerProps<true>['disabled'];\n required?: ReactDatePickerProps<true>['required'];\n isClearable?: ReactDatePickerProps<true>['isClearable'];\n minDate?: ReactDatePickerProps<true>['minDate'];\n maxDate?: ReactDatePickerProps<true>['maxDate'];\n dateFormat?: ReactDatePickerProps<true>['dateFormat'];\n className?: ReactDatePickerProps<true>['className'];\n popperClassName?: ReactDatePickerProps<true>['popperClassName'];\n portalId?: ReactDatePickerProps<true>['portalId'];\n locale?: ReactDatePickerProps<true>['locale'];\n}\n\nconst DateRangePicker: React.FC<DateRangePickerProps> = ({\n startDate,\n endDate,\n onChange,\n label,\n disabled,\n required,\n loading,\n hint,\n error,\n className,\n dateFormat = 'dd/MM/yyyy',\n dataQa,\n hideEmptyMeta = false,\n wide = false,\n pulse,\n isClearable = false,\n minDate,\n maxDate,\n popperClassName,\n portalId,\n cancelLabel = 'Скасувати',\n saveLabel = 'Зберегти',\n locale = uk,\n presets = [],\n presetPlaceholder = 'Обрати період',\n presetSelectProps,\n onCancel,\n onConfirm,\n ...props\n}) => {\n const [state, dispatch] = React.useReducer(pickerReducer, initialState);\n const { isOpen, tempStartDate, tempEndDate, selectedPreset, calendarKey } = state;\n\n const resolveOpenToDate = (start: Date | null, end: Date | null): Date => {\n if (end) return subMonths(end, 1);\n if (start) return start;\n return new Date();\n };\n\n const handleOpen = () => {\n if (disabled) return;\n dispatch({ type: 'open', startDate, endDate });\n };\n\n const handleTempChange = (dates: [Date | null, Date | null]) => {\n const [start, end] = dates;\n dispatch({ type: 'tempChange', start, end });\n };\n\n const handleSave = () => {\n onChange([tempStartDate, tempEndDate]);\n onConfirm?.([tempStartDate, tempEndDate]);\n dispatch({ type: 'close' });\n };\n\n const handleCancel = () => {\n onCancel?.();\n dispatch({ type: 'cancel', startDate, endDate });\n };\n\n const handleClear = () => {\n onChange([null, null]);\n dispatch({ type: 'reset' });\n };\n\n const handlePresetChange = (newValue: SelectOption | readonly SelectOption[] | null) => {\n const option = Array.isArray(newValue) ? null : (newValue as SelectOption | null);\n if (!option) {\n dispatch({ type: 'reset' });\n return;\n }\n const preset = presets.find((p) => p.label === option.value);\n if (preset) {\n dispatch({\n type: 'presetSelect',\n option,\n start: preset.range[0],\n end: preset.range[1],\n });\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape' && isOpen) {\n handleCancel();\n }\n };\n\n const formatDisplayValue = (): string => {\n if (!startDate && !endDate) return '';\n const displayFormat = Array.isArray(dateFormat) ? dateFormat[0] : dateFormat;\n if (!displayFormat) return '';\n const startStr = startDate ? format(startDate, displayFormat) : '';\n const endStr = endDate ? format(endDate, displayFormat) : '';\n if (startStr && endStr) return `${startStr} - ${endStr}`;\n if (startStr) return startStr;\n return '';\n };\n\n const displayValue = formatDisplayValue();\n const valueExists = !!startDate || !!endDate;\n\n return (\n <label\n onClick={(e) => e.preventDefault()}\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-date-picker',\n 'vchasno-ui-date-range-picker',\n {\n '--loading': loading,\n '--required': required,\n '--disabled': disabled,\n '--error': error,\n '--wide': wide,\n '--not-empty': valueExists,\n '--is-label': !!label,\n },\n className,\n )}\n onKeyDown={handleKeyDown}\n >\n <span\n className={cn('vchasno-ui-date-range-picker__wrapper', {\n 'vchasno-ui-pulse-animation': pulse && !disabled,\n })}\n >\n {label && <LabelText>{label}</LabelText>}\n <ReactDatePicker\n key={calendarKey}\n openToDate={resolveOpenToDate(\n isOpen ? tempStartDate : startDate,\n isOpen ? tempEndDate : endDate,\n )}\n fixedHeight\n locale={locale}\n disabled={disabled}\n placeholderText=\"ДД/ММ/РРРР - ДД/ММ/РРРР\"\n showPopperArrow={false}\n className={cn(\n 'vchasno-ui-date-range-picker__picker',\n 'vchasno-ui-date-picker__picker',\n )}\n popperClassName={cn('vchasno-ui-date-range-picker-popper', popperClassName)}\n selectsRange\n startDate={isOpen ? tempStartDate : startDate}\n endDate={isOpen ? tempEndDate : endDate}\n onChange={handleTempChange}\n monthsShown={2}\n shouldCloseOnSelect={false}\n open={isOpen}\n onInputClick={handleOpen}\n onClickOutside={handleCancel}\n enableTabLoop={false}\n minDate={minDate}\n maxDate={maxDate}\n portalId={portalId}\n value={displayValue}\n renderCustomHeader={({\n monthDate,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n }) => (\n <div className=\"vchasno-ui-date-range-picker__header\">\n <button\n type=\"button\"\n className=\"vchasno-ui-date-range-picker__nav-btn\"\n onClick={decreaseMonth}\n disabled={prevMonthButtonDisabled}\n >\n <ArrowLeftIcon />\n </button>\n <span className=\"vchasno-ui-date-range-picker__month-title\">\n {format(monthDate, 'LLLL, yyyy', {\n locale: typeof locale === 'string' ? undefined : locale,\n })}\n </span>\n <button\n type=\"button\"\n className=\"vchasno-ui-date-range-picker__nav-btn\"\n onClick={increaseMonth}\n disabled={nextMonthButtonDisabled}\n >\n <ArrowRightIcon />\n </button>\n </div>\n )}\n {...props}\n >\n <div className=\"vchasno-ui-date-range-picker__presets\">\n {presets.length > 0 && (\n <Select\n className=\"vchasno-ui-date-range-picker__preset-select\"\n isClearable\n options={presets.map((p) => ({\n label: p.label,\n value: p.label,\n }))}\n value={selectedPreset}\n placeholder={presetPlaceholder}\n onChange={handlePresetChange}\n hideEmptyMeta\n wide\n {...presetSelectProps}\n />\n )}\n </div>\n\n <div className=\"vchasno-ui-date-range-picker__actions\">\n <button\n type=\"button\"\n className=\"vchasno-ui-date-range-picker__cancel-btn\"\n onClick={handleCancel}\n >\n {cancelLabel}\n </button>\n <button\n type=\"button\"\n className=\"vchasno-ui-date-range-picker__save-btn\"\n onClick={handleSave}\n >\n {saveLabel}\n </button>\n </div>\n </ReactDatePicker>\n {loading ? (\n <Spinner className=\"vchasno-ui-date-range-picker__spinner\" />\n ) : (\n <CalendarIcon className=\"vchasno-ui-date-range-picker__custom-calendar-icon\" />\n )}\n {isClearable && valueExists && !disabled && (\n <button\n type=\"button\"\n aria-label=\"Очистити\"\n className=\"vchasno-ui-date-range-picker__clear-btn\"\n onClick={handleClear}\n >\n <CloseSvg />\n </button>\n )}\n </span>\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nDateRangePicker.displayName = 'DateRangePicker';\n\nexport default DateRangePicker;\n"],"names":["CloseSvg","React","span","className","clearRawSvg","DateRangePicker","startDate","endDate","onChange","label","disabled","required","loading","hint","error","dateFormat","dataQa","hideEmptyMeta","wide","pulse","isClearable","minDate","maxDate","popperClassName","portalId","cancelLabel","saveLabel","locale","uk","presets","presetPlaceholder","presetSelectProps","onCancel","onConfirm","props","start","end","state","dispatch","useReducer","pickerReducer","initialState","isOpen","tempStartDate","tempEndDate","selectedPreset","calendarKey","handleCancel","type","displayValue","formatDisplayValue","displayFormat","Array","isArray","startStr","format","endStr","valueExists","onClick","e","preventDefault","data-qa","cn","onKeyDown","key","createElement","LabelText","ReactDatePicker","openToDate","subMonths","Date","fixedHeight","placeholderText","showPopperArrow","selectsRange","dates","monthsShown","shouldCloseOnSelect","open","onInputClick","onClickOutside","enableTabLoop","value","renderCustomHeader","monthDate","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","div","button","ArrowLeftIcon","undefined","ArrowRightIcon","length","Select","options","map","p","placeholder","newValue","option","preset","find","range","Spinner","CalendarIcon","aria-label","InputMeta","displayName"],"mappings":"6pBA8BA,IAAMA,EAAW,IACbC,EAACC,aAAAA,CAAAA,OAAAA,CAAKC,UAAU,iDAAmDC,EAAAA,GAwDjEC,EAAkD,CAAC,CACrDC,UAAAA,CAAS,CACTC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,MAAAA,CAAK,CACLC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACRC,QAAAA,CAAO,CACPC,KAAAA,CAAI,CACJC,MAAAA,CAAK,CACLX,UAAAA,CAAS,CACTY,WAAAA,EAAa,YAAY,CACzBC,OAAAA,CAAM,CACNC,cAAAA,EAAgB,CAAA,CAAK,CACrBC,KAAAA,EAAO,CAAA,CAAK,CACZC,MAAAA,CAAK,CACLC,YAAAA,EAAc,CAAA,CAAK,CACnBC,QAAAA,CAAO,CACPC,QAAAA,CAAO,CACPC,gBAAAA,CAAe,CACfC,SAAAA,CAAQ,CACRC,YAAAA,EAA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,EAACyF,aAAAA,CAAAA,SAAAA,CACG1C,KAAK,SACL7C,UAAU,yCACVuD,QA5KL,KACflD,EAAS,CAACmC,EAAeC,EAAY,EACrCX,IAAY,CAACU,EAAeC,EAAY,EACxCN,EAAS,CAAEU,KAAM,OAAQ,EAC7B,CA0KyBtB,EAAAA,KAIZd,EACGX,EAACwG,aAAAA,CAAAA,EAAAA,CAAQtG,UAAU,0CAEnBF,EAACyG,aAAAA,CAAAA,EAAAA,CAAavG,UAAU,uDAE3BiB,GAAeqC,IAAe,CAAC/C,GAC5BT,EAACyF,aAAAA,CAAAA,SAAAA,CACG1C,KAAK,SACL2D,aAAW,WACXxG,UAAU,0CACVuD,QAjLA,KAChBlD,EAAS,CAAC,KAAM,KAAK,EACrB8B,EAAS,CAAEU,KAAM,OAAQ,EAC7B,CAgLoB,EAAA/C,EAAAgE,aAAA,CAACjE,UAIZiB,CAAAA,GAAkBH,GAAUD,EAAcZ,EAAC2G,aAAAA,CAAAA,EAAAA,CAAU/F,KAAMA,EAAMC,MAAOA,IAArC,KAGhD,CAEAT,CAAAA,EAAgBwG,WAAW,CAAG"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e={isOpen:!1,tempStartDate:null,tempEndDate:null,selectedPreset:null,calendarKey:0};function t(e,t){switch(t.type){case"open":return{...e,isOpen:!0,tempStartDate:t.startDate,tempEndDate:t.endDate};case"close":return{...e,isOpen:!1};case"tempChange":return{...e,tempStartDate:t.start,tempEndDate:t.end,selectedPreset:null};case"cancel":return{...e,isOpen:!1,tempStartDate:t.startDate,tempEndDate:t.endDate,selectedPreset:null};case"reset":return{...e,tempStartDate:null,tempEndDate:null,selectedPreset:null,calendarKey:e.calendarKey+1};case"presetSelect":return{...e,selectedPreset:t.option,tempStartDate:t.start,tempEndDate:t.end,calendarKey:e.calendarKey+1}}}export{e as initialState,t as pickerReducer};
|
|
2
|
+
//# sourceMappingURL=DateRangePicker.reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangePicker.reducer.js","sources":["../../../../src/components/Datepicker/DateRangePicker/DateRangePicker.reducer.ts"],"sourcesContent":["import type { SelectOption } from '../../Select';\n\nexport type PickerState = {\n isOpen: boolean;\n tempStartDate: Date | null;\n tempEndDate: Date | null;\n selectedPreset: SelectOption | null;\n calendarKey: number;\n};\n\nexport type PickerAction =\n | { type: 'open'; startDate: Date | null; endDate: Date | null }\n | { type: 'close' }\n | { type: 'tempChange'; start: Date | null; end: Date | null }\n | { type: 'cancel'; startDate: Date | null; endDate: Date | null }\n | { type: 'reset' }\n | { type: 'presetSelect'; option: SelectOption; start: Date; end: Date };\n\nexport const initialState: PickerState = {\n isOpen: false,\n tempStartDate: null,\n tempEndDate: null,\n selectedPreset: null,\n calendarKey: 0,\n};\n\nexport function pickerReducer(state: PickerState, action: PickerAction): PickerState {\n switch (action.type) {\n case 'open':\n return {\n ...state,\n isOpen: true,\n tempStartDate: action.startDate,\n tempEndDate: action.endDate,\n };\n case 'close':\n return { ...state, isOpen: false };\n case 'tempChange':\n return {\n ...state,\n tempStartDate: action.start,\n tempEndDate: action.end,\n selectedPreset: null,\n };\n case 'cancel':\n return {\n ...state,\n isOpen: false,\n tempStartDate: action.startDate,\n tempEndDate: action.endDate,\n selectedPreset: null,\n };\n case 'reset':\n return {\n ...state,\n tempStartDate: null,\n tempEndDate: null,\n selectedPreset: null,\n calendarKey: state.calendarKey + 1,\n };\n case 'presetSelect':\n return {\n ...state,\n selectedPreset: action.option,\n tempStartDate: action.start,\n tempEndDate: action.end,\n calendarKey: state.calendarKey + 1,\n };\n }\n}\n"],"names":["initialState","isOpen","tempStartDate","tempEndDate","selectedPreset","calendarKey","pickerReducer","state","action","type","startDate","endDate","start","end","option"],"mappings":"IAkBaA,EAA4B,CACrCC,OAAQ,CAAA,EACRC,cAAe,KACfC,YAAa,KACbC,eAAgB,KAChBC,YAAa,CACjB,EAEO,SAASC,EAAcC,CAAkB,CAAEC,CAAoB,EAClE,OAAQA,EAAOC,IAAI,EACf,IAAK,OACD,MAAO,CACH,GAAGF,CAAK,CACRN,OAAQ,CAAA,EACRC,cAAeM,EAAOE,SAAS,CAC/BP,YAAaK,EAAOG,OAAAA,AACxB,CACJ,KAAK,QACD,MAAO,CAAE,GAAGJ,CAAK,CAAEN,OAAQ,CAAA,CAAM,CACrC,KAAK,aACD,MAAO,CACH,GAAGM,CAAK,CACRL,cAAeM,EAAOI,KAAK,CAC3BT,YAAaK,EAAOK,GAAG,CACvBT,eAAgB,IACpB,CACJ,KAAK,SACD,MAAO,CACH,GAAGG,CAAK,CACRN,OAAQ,CAAA,EACRC,cAAeM,EAAOE,SAAS,CAC/BP,YAAaK,EAAOG,OAAO,CAC3BP,eAAgB,IACpB,CACJ,KAAK,QACD,MAAO,CACH,GAAGG,CAAK,CACRL,cAAe,KACfC,YAAa,KACbC,eAAgB,KAChBC,YAAaE,EAAMF,WAAW,CAAG,CACrC,CACJ,KAAK,eACD,MAAO,CACH,GAAGE,CAAK,CACRH,eAAgBI,EAAOM,MAAM,CAC7BZ,cAAeM,EAAOI,KAAK,CAC3BT,YAAaK,EAAOK,GAAG,CACvBR,YAAaE,EAAMF,WAAW,CAAG,CACrC,CACR,CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/FollowUs/config.ts"],"sourcesContent":["import type { VchasnoProduct } from '../types';\nimport type { Social } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'ttn' | 'dm' | 'kep' | 'hrs' | 'zvit'>;\n\nexport const config: Record<Product, Partial<Record<Social, string>>> = {\n edo: {\n fb: 'https://www.facebook.com/vchasno',\n telegram: 'https://t.me/vchasnoservice',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n inst: 'https://www.instagram.com/vchasno.service/',\n },\n kasa: {\n inst: 'https://www.instagram.com/vchasno.service',\n tiktok: 'https://www.tiktok.com/@vchasno.kasa',\n fb: 'https://www.facebook.com/vchasno',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n },\n};\n"],"names":["config","edo","fb","telegram","youtube","inst","kasa","tiktok"],"mappings":"IAKaA,EAA2D,CACpEC,IAAK,CACDC,GAAI,mCACJC,SAAU,8BACVC,QAAS,2DACTC,KAAM,4CACV,EACAC,KAAM,CACFD,KAAM,4CACNE,OAAQ,uCACRL,GAAI,mCACJE,QAAS,0DACb,CACJ"}
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/FollowUs/config.ts"],"sourcesContent":["import type { VchasnoProduct } from '../types';\nimport type { Social } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'ttn' | 'dm' | 'kep' | 'hrs' | 'zvit' | 'profile'>;\n\nexport const config: Record<Product, Partial<Record<Social, string>>> = {\n edo: {\n fb: 'https://www.facebook.com/vchasno',\n telegram: 'https://t.me/vchasnoservice',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n inst: 'https://www.instagram.com/vchasno.service/',\n },\n kasa: {\n inst: 'https://www.instagram.com/vchasno.service',\n tiktok: 'https://www.tiktok.com/@vchasno.kasa',\n fb: 'https://www.facebook.com/vchasno',\n youtube: 'https://www.youtube.com/channel/UCE0jekYQINP_h5uHRpugwxw',\n },\n};\n"],"names":["config","edo","fb","telegram","youtube","inst","kasa","tiktok"],"mappings":"IAKaA,EAA2D,CACpEC,IAAK,CACDC,GAAI,mCACJC,SAAU,8BACVC,QAAS,2DACTC,KAAM,4CACV,EACAC,KAAM,CACFD,KAAM,4CACNE,OAAQ,uCACRL,GAAI,mCACJE,QAAS,0DACb,CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/MobileAppLinks/config.ts"],"sourcesContent":["import type { VchasnoProduct } from '../types';\nimport type { LinkConfig } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'dm' | 'kep' | 'hrs' | 'zvit'>;\n\nexport const config: Record<Product, LinkConfig> = {\n edo: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.edo',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D0%B5%D0%B4%D0%BE/id6462861848',\n },\n kasa: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.kasa',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D0%BA%D0%B0%D1%81%D0%B0/id6444186091',\n },\n ttn: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.ttn.mobile',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D1%82%D1%82%D0%BD/id6550909392',\n },\n};\n"],"names":["config","edo","android","ios","kasa","ttn"],"mappings":"IAKaA,EAAsC,CAC/CC,IAAK,CACDC,QAAS,+DACTC,IAAK,oGACT,EACAC,KAAM,CACFF,QAAS,gEACTC,IAAK,0GACT,EACAE,IAAK,CACDH,QAAS,sEACTC,IAAK,oGACT,CACJ"}
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/MobileAppLinks/config.ts"],"sourcesContent":["import type { VchasnoProduct } from '../types';\nimport type { LinkConfig } from './types';\n\nexport type Product = Exclude<VchasnoProduct, 'edi' | 'dm' | 'kep' | 'hrs' | 'zvit' | 'profile'>;\n\nexport const config: Record<Product, LinkConfig> = {\n edo: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.edo',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D0%B5%D0%B4%D0%BE/id6462861848',\n },\n kasa: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.kasa',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D0%BA%D0%B0%D1%81%D0%B0/id6444186091',\n },\n ttn: {\n android: 'https://play.google.com/store/apps/details?id=ua.vchasno.ttn.mobile',\n ios: 'https://apps.apple.com/ua/app/%D0%B2%D1%87%D0%B0%D1%81%D0%BD%D0%BE-%D1%82%D1%82%D0%BD/id6550909392',\n },\n};\n"],"names":["config","edo","android","ios","kasa","ttn"],"mappings":"IAKaA,EAAsC,CAC/CC,IAAK,CACDC,QAAS,+DACTC,IAAK,oGACT,EACAC,KAAM,CACFF,QAAS,gEACTC,IAAK,0GACT,EACAE,IAAK,CACDH,QAAS,sEACTC,IAAK,oGACT,CACJ"}
|