@bikdotai/bik-component-library 0.0.818 → 0.0.820

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsDropdown.js","sources":["../../../../src/components/analytics-chips-and-dropdowns/AnalyticsDropdown.tsx"],"sourcesContent":["import 'bootstrap/dist/css/bootstrap.min.css';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Dropdown } from 'react-bootstrap';\nimport { DropDirection } from 'react-bootstrap/esm/DropdownContext';\nimport ReactDOM from 'react-dom';\nimport { BASE_COLORS, DEFAULT_THEME } from '@src/constants/Theme';\nimport { DatePicker } from '../datePicker';\nimport { BodyCaption, BodySecondary, Caption } from '../TypographyStyle';\nimport { ItemMenuContainer, MainDropdown } from './CommonStyles';\n\nexport interface DropdownOptions {\n\tlabel: string;\n\tsubLabel?: string;\n\tvalue: string;\n\tkey: string | number;\n\tnoOfDays?: number;\n\tisCustom?: boolean;\n\tdateRangeSelectionOptions?: {\n\t\tselectRange: boolean;\n\t\tselectedDates?: Date[];\n\t\tselectedDate?: Date;\n\t\tminDate?: Date;\n\t\tmaxDate?: Date;\n\t};\n}\n\nexport interface AnalyticsDropdownInterface {\n\toptions: DropdownOptions[];\n\tselected?: DropdownOptions;\n\tplaceholder?: string;\n\tresetDropdown?: boolean;\n\tonOptionSelected: (\n\t\tchosen: DropdownOptions & {\n\t\t\tselectedRange?: [Date, Date];\n\t\t},\n\t) => void;\n\tmaxHeight?: string;\n\tbackgroundcolor?: string;\n\tcalendarPopperConfig?: {\n\t\toffsetSkid?: number;\n\t\toffsetDistance?: number;\n\t};\n\tvariant?: 'small' | 'default';\n\tdatePickerPlacement?: DropDirection;\n\tcloseDropdown?: boolean;\n\tlabelColor?: string;\n\tstyleProps?: React.CSSProperties;\n\tshowTimePicker?: boolean;\n}\n\nexport const AnalyticsDropdown: React.FC<AnalyticsDropdownInterface> = ({\n\toptions,\n\tplaceholder = 'Select an option',\n\tselected,\n\tonOptionSelected,\n\tresetDropdown,\n\tmaxHeight,\n\tbackgroundcolor,\n\tcalendarPopperConfig,\n\tvariant = 'default',\n\tdatePickerPlacement,\n\tcloseDropdown,\n\tlabelColor,\n\tstyleProps,\n\tshowTimePicker = false,\n}) => {\n\tconst [openCalender, setCalender] = useState(false);\n\tconst [selectedOption, setSelectedOption] = useState(selected);\n\tconst [selectedDate, setSelectedDate] = useState<Date[]>();\n\tconst [showDropdown, setShowDropdown] = useState(false);\n\tconst [optionPlaceholder, setOptionPlaceholder] = useState(selected);\n\tconst dropdownRef = useRef<HTMLDivElement | null>(null);\n\tconst LabelText = variant === 'small' ? Caption : BodySecondary;\n\n\tuseEffect(() => {\n\t\tresetDropdown && setSelectedOption(undefined);\n\t}, [resetDropdown]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tselected?.isCustom &&\n\t\t\tselected.dateRangeSelectionOptions?.selectedDates\n\t\t) {\n\t\t\tsetSelectedDate(selected.dateRangeSelectionOptions.selectedDates);\n\t\t} else {\n\t\t\tsetSelectedDate(undefined);\n\t\t}\n\t\tsetSelectedOption(selected);\n\t}, [selected]);\n\n\tuseEffect(() => {\n\t\tsetShowDropdown(false);\n\t\tsetCalender(false);\n\t}, [closeDropdown]);\n\n\tconst setDropdown = (forceState?: boolean) => {\n\t\tif (forceState !== undefined) {\n\t\t\tsetShowDropdown(forceState);\n\t\t\topenCalender && setCalender(false);\n\t\t} else {\n\t\t\tsetShowDropdown((prevState) => !prevState);\n\t\t}\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent) => {\n\t\tif (\n\t\t\tdropdownRef.current &&\n\t\t\t!dropdownRef.current.contains(event.target as Node)\n\t\t) {\n\t\t\tif (openCalender) {\n\t\t\t\tsetCalender(false);\n\t\t\t}\n\t\t\tsetDropdown(false);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (showDropdown) {\n\t\t\tdocument.addEventListener('mousedown', handleClickOutside);\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('mousedown', handleClickOutside);\n\t\t};\n\t}, [showDropdown]);\n\n\treturn (\n\t\t<>\n\t\t\t<MainDropdown\n\t\t\t\tdrop={'down'}\n\t\t\t\tshow={showDropdown}\n\t\t\t\tonToggle={setDropdown}\n\t\t\t\tbgColor={backgroundcolor}\n\t\t\t\tid=\"analytic-dropdown\"\n\t\t\t>\n\t\t\t\t<Dropdown.Toggle\n\t\t\t\t\tid=\"dropdown-autoclose-outside\"\n\t\t\t\t\tclassName=\"main--dropdown\"\n\t\t\t\t\tstyle={\n\t\t\t\t\t\tvariant === 'small'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tgap: 6,\n\t\t\t\t\t\t\t\t\tpadding: '4px 8px',\n\t\t\t\t\t\t\t\t\tbackgroundColor: '#FAFAFA',\n\t\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t\t\tborder: `1px solid ${DEFAULT_THEME.colorsV2.stroke.primary}`,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: styleProps\n\t\t\t\t\t\t\t? styleProps\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<LabelText\n\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\tvariant === 'small' || labelColor\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\t\tlabelColor || DEFAULT_THEME.colorsV2.content.secondary,\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{selectedOption?.isCustom\n\t\t\t\t\t\t\t? selectedDate\n\t\t\t\t\t\t\t\t? formatDate(selectedDate[0], showTimePicker) ===\n\t\t\t\t\t\t\t\t formatDate(selectedDate[1], showTimePicker)\n\t\t\t\t\t\t\t\t\t? `${formatDate(selectedDate[0], showTimePicker)}`\n\t\t\t\t\t\t\t\t\t: `${formatDate(\n\t\t\t\t\t\t\t\t\t\t\tselectedDate[0],\n\t\t\t\t\t\t\t\t\t\t\tshowTimePicker,\n\t\t\t\t\t\t\t\t\t )} to ${formatDate(selectedDate[1], showTimePicker)}`\n\t\t\t\t\t\t\t\t: optionPlaceholder?.label\n\t\t\t\t\t\t\t\t? optionPlaceholder?.label\n\t\t\t\t\t\t\t\t: placeholder\n\t\t\t\t\t\t\t: selectedOption\n\t\t\t\t\t\t\t? selectedOption?.label\n\t\t\t\t\t\t\t: placeholder}\n\t\t\t\t\t</LabelText>\n\t\t\t\t</Dropdown.Toggle>\n\t\t\t\t{ReactDOM.createPortal(\n\t\t\t\t\t<Dropdown.Menu\n\t\t\t\t\t\tclassName=\"main--dropdown\"\n\t\t\t\t\t\tstyle={{ padding: 0 }}\n\t\t\t\t\t\tref={dropdownRef}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MainDropdown\n\t\t\t\t\t\t\tdrop={datePickerPlacement ?? 'end'}\n\t\t\t\t\t\t\tid=\"sub--dropdown\"\n\t\t\t\t\t\t\tshow={openCalender}\n\t\t\t\t\t\t\tonToggle={(toggleCalender) => {\n\t\t\t\t\t\t\t\t!toggleCalender && setShowDropdown(false);\n\t\t\t\t\t\t\t\tsetCalender(!openCalender);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tmaxHeight: maxHeight ? maxHeight : 'auto',\n\t\t\t\t\t\t\t\t\toverflowY: 'scroll',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{options.map((eachOption, index) => (\n\t\t\t\t\t\t\t\t\t<div key={eachOption?.key}>\n\t\t\t\t\t\t\t\t\t\t{eachOption?.isCustom ? (\n\t\t\t\t\t\t\t\t\t\t\t<Dropdown.Toggle className=\"sub--dropdown\">\n\t\t\t\t\t\t\t\t\t\t\t\t<EachItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tisFirstItem={index === 0}\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={index === options.length - 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\teachOption={eachOption}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedOption={selectedOption}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedDate={selectedDate}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClickingEachItem={(option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCalender(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\trangeSelection={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\teachOption?.dateRangeSelectionOptions?.selectRange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: false\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Dropdown.Toggle>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<EachItem\n\t\t\t\t\t\t\t\t\t\t\t\tisFirstItem={index === 0}\n\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={index === options.length - 1}\n\t\t\t\t\t\t\t\t\t\t\t\teachOption={eachOption}\n\t\t\t\t\t\t\t\t\t\t\t\tselectedOption={selectedOption}\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate={selectedDate}\n\t\t\t\t\t\t\t\t\t\t\t\tonClickingEachItem={(option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedDate(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetDropdown();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!option.noOfDays) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelected(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst endDate = new Date();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst startDate = new Date();\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartDate.setDate(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDate.getDate() - option.noOfDays,\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...option,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [startDate, endDate],\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Dropdown.Menu\n\t\t\t\t\t\t\t\tclassName=\"sub--dropdown\"\n\t\t\t\t\t\t\t\tpopperConfig={{\n\t\t\t\t\t\t\t\t\tmodifiers: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\t\t\t\t\toffset: [\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendarPopperConfig?.offsetSkid || 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendarPopperConfig?.offsetDistance || 0,\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\t\t\tselectRange={\n\t\t\t\t\t\t\t\t\t\tselectedOption?.dateRangeSelectionOptions?.selectRange ||\n\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\tmaxDate={selectedOption?.dateRangeSelectionOptions?.maxDate}\n\t\t\t\t\t\t\t\t\tminDate={selectedOption?.dateRangeSelectionOptions?.minDate}\n\t\t\t\t\t\t\t\t\tselectedDates={selectedDate}\n\t\t\t\t\t\t\t\t\tonSelectRange={(selectedStartDate, selectedEndDate) => {\n\t\t\t\t\t\t\t\t\t\tconst updatedDates = [selectedStartDate, selectedEndDate];\n\n\t\t\t\t\t\t\t\t\t\tif (selectedOption?.dateRangeSelectionOptions) {\n\t\t\t\t\t\t\t\t\t\t\tselectedOption.dateRangeSelectionOptions.selectedDates =\n\t\t\t\t\t\t\t\t\t\t\t\tupdatedDates;\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t...selectedOption,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [selectedStartDate, selectedEndDate],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(selectedOption);\n\t\t\t\t\t\t\t\t\t\tsetCalender(false);\n\t\t\t\t\t\t\t\t\t\tsetSelectedDate(updatedDates);\n\t\t\t\t\t\t\t\t\t\tsetShowDropdown(!showDropdown);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonSelectDate={(selectedDate) => {\n\t\t\t\t\t\t\t\t\t\tif (selectedOption?.dateRangeSelectionOptions) {\n\t\t\t\t\t\t\t\t\t\t\tselectedOption.dateRangeSelectionOptions.selectedDates = [\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate,\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t...selectedOption,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [selectedDate, selectedDate],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(selectedOption);\n\t\t\t\t\t\t\t\t\t\tsetCalender(false);\n\t\t\t\t\t\t\t\t\t\tsetSelectedDate([selectedDate, selectedDate]);\n\t\t\t\t\t\t\t\t\t\tsetShowDropdown(!showDropdown);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Dropdown.Menu>\n\t\t\t\t\t\t</MainDropdown>\n\t\t\t\t\t</Dropdown.Menu>,\n\t\t\t\t\tdocument.body,\n\t\t\t\t)}\n\t\t\t</MainDropdown>\n\t\t</>\n\t);\n};\n\nexport const EachItem: React.FC<{\n\teachOption: DropdownOptions;\n\tselectedOption: DropdownOptions | undefined;\n\tselectedDate: Date[] | undefined;\n\tonClickingEachItem: (optionSelected: DropdownOptions) => void;\n\trangeSelection?: boolean;\n\tisLastItem?: boolean;\n\tisFirstItem?: boolean;\n\tshowTimePicker?: boolean;\n}> = ({\n\teachOption,\n\tselectedOption,\n\tselectedDate,\n\tonClickingEachItem,\n\trangeSelection,\n\tisLastItem,\n\tisFirstItem,\n\tshowTimePicker,\n}) => {\n\treturn (\n\t\t<ItemMenuContainer\n\t\t\tisFirstItem={isFirstItem}\n\t\t\tisLastItem={isLastItem}\n\t\t\tkey={eachOption.key}\n\t\t\tonClick={() => onClickingEachItem(eachOption)}\n\t\t\tisSelected={\n\t\t\t\teachOption.isCustom\n\t\t\t\t\t? eachOption.key == selectedOption?.key && !!selectedDate\n\t\t\t\t\t: eachOption.key == selectedOption?.key\n\t\t\t}\n\t\t>\n\t\t\t<BodySecondary\n\t\t\t\tcolor={\n\t\t\t\t\teachOption.key == selectedOption?.key\n\t\t\t\t\t\t? BASE_COLORS.positive[900]\n\t\t\t\t\t\t: BASE_COLORS.grayscale[900]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{eachOption.label}\n\t\t\t</BodySecondary>\n\t\t\t{eachOption.subLabel ? (\n\t\t\t\t<BodyCaption style={{ color: BASE_COLORS.grayscale[700] }}>\n\t\t\t\t\t{eachOption.subLabel}\n\t\t\t\t</BodyCaption>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\t\t\t{selectedDate &&\n\t\t\t\tselectedOption?.isCustom &&\n\t\t\t\teachOption.key == selectedOption?.key && (\n\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\twhiteSpace: 'normal',\n\t\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t\t\ttextAlign: 'left',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{rangeSelection\n\t\t\t\t\t\t\t? `${formatDate(selectedDate[0], showTimePicker)} to ${formatDate(\n\t\t\t\t\t\t\t\t\tselectedDate[1],\n\t\t\t\t\t\t\t\t\tshowTimePicker,\n\t\t\t\t\t\t\t )}`\n\t\t\t\t\t\t\t: `${formatDate(selectedDate[0], showTimePicker)}`}\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t)}\n\t\t</ItemMenuContainer>\n\t);\n};\n\nexport const formatDate = (dateVal: Date, includeTime?: boolean) => {\n\tconst dateString = dateVal.toLocaleString('default', {\n\t\tday: 'numeric',\n\t\tmonth: 'short',\n\t\tyear: 'numeric',\n\t});\n\n\tif (includeTime) {\n\t\tconst timeString = dateVal.toLocaleString('default', {\n\t\t\thour: 'numeric',\n\t\t\tminute: '2-digit',\n\t\t\thour12: true,\n\t\t});\n\t\treturn `${dateString} (${timeString})`;\n\t}\n\n\treturn dateString;\n};\n"],"names":["AnalyticsDropdown","options","placeholder","selected","onOptionSelected","resetDropdown","maxHeight","backgroundcolor","calendarPopperConfig","variant","datePickerPlacement","closeDropdown","labelColor","styleProps","showTimePicker","openCalender","setCalender","useState","selectedOption","setSelectedOption","selectedDate","setSelectedDate","showDropdown","setShowDropdown","optionPlaceholder","setOptionPlaceholder","dropdownRef","useRef","LabelText","Caption","BodySecondary","useEffect","setDropdown","forceState","prevState","handleClickOutside","event","jsx","Fragment","jsxs","MainDropdown","Dropdown","DEFAULT_THEME","formatDate","ReactDOM","toggleCalender","eachOption","index","EachItem","option","endDate","startDate","DatePicker","selectedStartDate","selectedEndDate","updatedDates","onClickingEachItem","rangeSelection","isLastItem","isFirstItem","ItemMenuContainer","BASE_COLORS","BodyCaption","dateVal","includeTime","dateString","timeString"],"mappings":";;;;;;;;AAkDO,MAAMA,KAA0D,CAAC;AAAA,EACvE,SAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,qBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,gBAAAC,IAAiB;AAClB,MAAM;AACL,QAAM,CAACC,GAAcC,CAAW,IAAIC,EAAS,EAAK,GAC5C,CAACC,GAAgBC,CAAiB,IAAIF,EAASd,CAAQ,GACvD,CAACiB,GAAcC,CAAe,IAAIJ,EA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AGN,CAAc,CAAC,OAAO6B;AAAA,YACrDvB,EAAa,CAAC;AAAA,YACdN;AAAA,UAAA,CACC,KACD,GAAG6B,EAAWvB,EAAa,CAAC,GAAGN,CAAc,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IAClD;AAAA,EAAA;AAAA,EAxCGgC,EAAW;AAAA,GA8CNH,IAAa,CAACoB,GAAeC,MAA0B;AACnE,QAAMC,IAAaF,EAAQ,eAAe,WAAW;AAAA,IACpD,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EAAA,CACN;AAED,MAAIC,GAAa;AAChB,UAAME,IAAaH,EAAQ,eAAe,WAAW;AAAA,MACpD,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,QAAQ;AAAA,IAAA,CACR;AACD,WAAO,GAAGE,CAAU,KAAKC,CAAU;AAAA,EACpC;AAEA,SAAOD;AACR;"}
1
+ {"version":3,"file":"AnalyticsDropdown.js","sources":["../../../../src/components/analytics-chips-and-dropdowns/AnalyticsDropdown.tsx"],"sourcesContent":["import 'bootstrap/dist/css/bootstrap.min.css';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Dropdown } from 'react-bootstrap';\nimport { DropDirection } from 'react-bootstrap/esm/DropdownContext';\nimport ReactDOM from 'react-dom';\nimport { BASE_COLORS, DEFAULT_THEME } from '@src/constants/Theme';\nimport { DatePicker } from '../datePicker';\nimport { BodyCaption, BodySecondary, Caption } from '../TypographyStyle';\nimport { ItemMenuContainer, MainDropdown } from './CommonStyles';\n\nexport interface DropdownOptions {\n\tlabel: string;\n\tsubLabel?: string;\n\tvalue: string;\n\tkey: string | number;\n\tnoOfDays?: number;\n\tisCustom?: boolean;\n\tdateRangeSelectionOptions?: {\n\t\tselectRange: boolean;\n\t\tselectedDates?: Date[];\n\t\tselectedDate?: Date;\n\t\tminDate?: Date;\n\t\tmaxDate?: Date;\n\t\tmaxRangeLimit?: number | null;\n\t};\n}\n\nexport interface AnalyticsDropdownInterface {\n\toptions: DropdownOptions[];\n\tselected?: DropdownOptions;\n\tplaceholder?: string;\n\tresetDropdown?: boolean;\n\tonOptionSelected: (\n\t\tchosen: DropdownOptions & {\n\t\t\tselectedRange?: [Date, Date];\n\t\t},\n\t) => void;\n\tmaxHeight?: string;\n\tbackgroundcolor?: string;\n\tcalendarPopperConfig?: {\n\t\toffsetSkid?: number;\n\t\toffsetDistance?: number;\n\t};\n\tvariant?: 'small' | 'default';\n\tdatePickerPlacement?: DropDirection;\n\tcloseDropdown?: boolean;\n\tlabelColor?: string;\n\tstyleProps?: React.CSSProperties;\n\tshowTimePicker?: boolean;\n}\n\nexport const AnalyticsDropdown: React.FC<AnalyticsDropdownInterface> = ({\n\toptions,\n\tplaceholder = 'Select an option',\n\tselected,\n\tonOptionSelected,\n\tresetDropdown,\n\tmaxHeight,\n\tbackgroundcolor,\n\tcalendarPopperConfig,\n\tvariant = 'default',\n\tdatePickerPlacement,\n\tcloseDropdown,\n\tlabelColor,\n\tstyleProps,\n\tshowTimePicker = false,\n}) => {\n\tconst [openCalender, setCalender] = useState(false);\n\tconst [selectedOption, setSelectedOption] = useState(selected);\n\tconst [selectedDate, setSelectedDate] = useState<Date[]>();\n\tconst [showDropdown, setShowDropdown] = useState(false);\n\tconst [optionPlaceholder, setOptionPlaceholder] = useState(selected);\n\tconst dropdownRef = useRef<HTMLDivElement | null>(null);\n\tconst LabelText = variant === 'small' ? Caption : BodySecondary;\n\n\tuseEffect(() => {\n\t\tresetDropdown && setSelectedOption(undefined);\n\t}, [resetDropdown]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tselected?.isCustom &&\n\t\t\tselected.dateRangeSelectionOptions?.selectedDates\n\t\t) {\n\t\t\tsetSelectedDate(selected.dateRangeSelectionOptions.selectedDates);\n\t\t} else {\n\t\t\tsetSelectedDate(undefined);\n\t\t}\n\t\tsetSelectedOption(selected);\n\t}, [selected]);\n\n\tuseEffect(() => {\n\t\tsetShowDropdown(false);\n\t\tsetCalender(false);\n\t}, [closeDropdown]);\n\n\tconst setDropdown = (forceState?: boolean) => {\n\t\tif (forceState !== undefined) {\n\t\t\tsetShowDropdown(forceState);\n\t\t\topenCalender && setCalender(false);\n\t\t} else {\n\t\t\tsetShowDropdown((prevState) => !prevState);\n\t\t}\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent) => {\n\t\tif (\n\t\t\tdropdownRef.current &&\n\t\t\t!dropdownRef.current.contains(event.target as Node)\n\t\t) {\n\t\t\tif (openCalender) {\n\t\t\t\tsetCalender(false);\n\t\t\t}\n\t\t\tsetDropdown(false);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (showDropdown) {\n\t\t\tdocument.addEventListener('mousedown', handleClickOutside);\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('mousedown', handleClickOutside);\n\t\t};\n\t}, [showDropdown]);\n\n\treturn (\n\t\t<>\n\t\t\t<MainDropdown\n\t\t\t\tdrop={'down'}\n\t\t\t\tshow={showDropdown}\n\t\t\t\tonToggle={setDropdown}\n\t\t\t\tbgColor={backgroundcolor}\n\t\t\t\tid=\"analytic-dropdown\"\n\t\t\t>\n\t\t\t\t<Dropdown.Toggle\n\t\t\t\t\tid=\"dropdown-autoclose-outside\"\n\t\t\t\t\tclassName=\"main--dropdown\"\n\t\t\t\t\tstyle={\n\t\t\t\t\t\tvariant === 'small'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tgap: 6,\n\t\t\t\t\t\t\t\t\tpadding: '4px 8px',\n\t\t\t\t\t\t\t\t\tbackgroundColor: '#FAFAFA',\n\t\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t\t\tborder: `1px solid ${DEFAULT_THEME.colorsV2.stroke.primary}`,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: styleProps\n\t\t\t\t\t\t\t? styleProps\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<LabelText\n\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\tvariant === 'small' || labelColor\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\t\tlabelColor || DEFAULT_THEME.colorsV2.content.secondary,\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{selectedOption?.isCustom\n\t\t\t\t\t\t\t? selectedDate\n\t\t\t\t\t\t\t\t? formatDate(selectedDate[0], showTimePicker) ===\n\t\t\t\t\t\t\t\t formatDate(selectedDate[1], showTimePicker)\n\t\t\t\t\t\t\t\t\t? `${formatDate(selectedDate[0], showTimePicker)}`\n\t\t\t\t\t\t\t\t\t: `${formatDate(\n\t\t\t\t\t\t\t\t\t\t\tselectedDate[0],\n\t\t\t\t\t\t\t\t\t\t\tshowTimePicker,\n\t\t\t\t\t\t\t\t\t )} to ${formatDate(selectedDate[1], showTimePicker)}`\n\t\t\t\t\t\t\t\t: optionPlaceholder?.label\n\t\t\t\t\t\t\t\t? optionPlaceholder?.label\n\t\t\t\t\t\t\t\t: placeholder\n\t\t\t\t\t\t\t: selectedOption\n\t\t\t\t\t\t\t? selectedOption?.label\n\t\t\t\t\t\t\t: placeholder}\n\t\t\t\t\t</LabelText>\n\t\t\t\t</Dropdown.Toggle>\n\t\t\t\t{ReactDOM.createPortal(\n\t\t\t\t\t<Dropdown.Menu\n\t\t\t\t\t\tclassName=\"main--dropdown\"\n\t\t\t\t\t\tstyle={{ padding: 0 }}\n\t\t\t\t\t\tref={dropdownRef}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MainDropdown\n\t\t\t\t\t\t\tdrop={datePickerPlacement ?? 'end'}\n\t\t\t\t\t\t\tid=\"sub--dropdown\"\n\t\t\t\t\t\t\tshow={openCalender}\n\t\t\t\t\t\t\tonToggle={(toggleCalender) => {\n\t\t\t\t\t\t\t\t!toggleCalender && setShowDropdown(false);\n\t\t\t\t\t\t\t\tsetCalender(!openCalender);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tmaxHeight: maxHeight ? maxHeight : 'auto',\n\t\t\t\t\t\t\t\t\toverflowY: 'scroll',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{options.map((eachOption, index) => (\n\t\t\t\t\t\t\t\t\t<div key={eachOption?.key}>\n\t\t\t\t\t\t\t\t\t\t{eachOption?.isCustom ? (\n\t\t\t\t\t\t\t\t\t\t\t<Dropdown.Toggle className=\"sub--dropdown\">\n\t\t\t\t\t\t\t\t\t\t\t\t<EachItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tisFirstItem={index === 0}\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={index === options.length - 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\teachOption={eachOption}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedOption={selectedOption}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedDate={selectedDate}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClickingEachItem={(option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCalender(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\trangeSelection={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\teachOption?.dateRangeSelectionOptions?.selectRange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: false\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Dropdown.Toggle>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<EachItem\n\t\t\t\t\t\t\t\t\t\t\t\tisFirstItem={index === 0}\n\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={index === options.length - 1}\n\t\t\t\t\t\t\t\t\t\t\t\teachOption={eachOption}\n\t\t\t\t\t\t\t\t\t\t\t\tselectedOption={selectedOption}\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate={selectedDate}\n\t\t\t\t\t\t\t\t\t\t\t\tonClickingEachItem={(option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedDate(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetDropdown();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!option.noOfDays) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelected(option);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst endDate = new Date();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst startDate = new Date();\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartDate.setDate(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDate.getDate() - option.noOfDays,\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...option,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [startDate, endDate],\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Dropdown.Menu\n\t\t\t\t\t\t\t\tclassName=\"sub--dropdown\"\n\t\t\t\t\t\t\t\tpopperConfig={{\n\t\t\t\t\t\t\t\t\tmodifiers: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\t\t\t\t\toffset: [\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendarPopperConfig?.offsetSkid || 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendarPopperConfig?.offsetDistance || 0,\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\t\t\tselectRange={\n\t\t\t\t\t\t\t\t\t\tselectedOption?.dateRangeSelectionOptions?.selectRange ||\n\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tshowTimePicker={showTimePicker}\n\t\t\t\t\t\t\t\t\tmaxDate={selectedOption?.dateRangeSelectionOptions?.maxDate}\n\t\t\t\t\t\t\t\t\tminDate={selectedOption?.dateRangeSelectionOptions?.minDate}\n\t\t\t\t\t\t\t\t\tmaxRangeLimit={\n\t\t\t\t\t\t\t\t\t\tselectedOption?.dateRangeSelectionOptions?.maxRangeLimit\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tselectedDates={selectedDate}\n\t\t\t\t\t\t\t\t\tonSelectRange={(selectedStartDate, selectedEndDate) => {\n\t\t\t\t\t\t\t\t\t\tconst updatedDates = [selectedStartDate, selectedEndDate];\n\n\t\t\t\t\t\t\t\t\t\tif (selectedOption?.dateRangeSelectionOptions) {\n\t\t\t\t\t\t\t\t\t\t\tselectedOption.dateRangeSelectionOptions.selectedDates =\n\t\t\t\t\t\t\t\t\t\t\t\tupdatedDates;\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t...selectedOption,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [selectedStartDate, selectedEndDate],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(selectedOption);\n\t\t\t\t\t\t\t\t\t\tsetCalender(false);\n\t\t\t\t\t\t\t\t\t\tsetSelectedDate(updatedDates);\n\t\t\t\t\t\t\t\t\t\tsetShowDropdown(!showDropdown);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonSelectDate={(selectedDate) => {\n\t\t\t\t\t\t\t\t\t\tif (selectedOption?.dateRangeSelectionOptions) {\n\t\t\t\t\t\t\t\t\t\t\tselectedOption.dateRangeSelectionOptions.selectedDates = [\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedDate,\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelected({\n\t\t\t\t\t\t\t\t\t\t\t\t...selectedOption,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedRange: [selectedDate, selectedDate],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetOptionPlaceholder(selectedOption);\n\t\t\t\t\t\t\t\t\t\tsetCalender(false);\n\t\t\t\t\t\t\t\t\t\tsetSelectedDate([selectedDate, selectedDate]);\n\t\t\t\t\t\t\t\t\t\tsetShowDropdown(!showDropdown);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Dropdown.Menu>\n\t\t\t\t\t\t</MainDropdown>\n\t\t\t\t\t</Dropdown.Menu>,\n\t\t\t\t\tdocument.body,\n\t\t\t\t)}\n\t\t\t</MainDropdown>\n\t\t</>\n\t);\n};\n\nexport const EachItem: React.FC<{\n\teachOption: DropdownOptions;\n\tselectedOption: DropdownOptions | undefined;\n\tselectedDate: Date[] | undefined;\n\tonClickingEachItem: (optionSelected: DropdownOptions) => void;\n\trangeSelection?: boolean;\n\tisLastItem?: boolean;\n\tisFirstItem?: boolean;\n\tshowTimePicker?: boolean;\n}> = ({\n\teachOption,\n\tselectedOption,\n\tselectedDate,\n\tonClickingEachItem,\n\trangeSelection,\n\tisLastItem,\n\tisFirstItem,\n\tshowTimePicker,\n}) => {\n\treturn (\n\t\t<ItemMenuContainer\n\t\t\tisFirstItem={isFirstItem}\n\t\t\tisLastItem={isLastItem}\n\t\t\tkey={eachOption.key}\n\t\t\tonClick={() => onClickingEachItem(eachOption)}\n\t\t\tisSelected={\n\t\t\t\teachOption.isCustom\n\t\t\t\t\t? eachOption.key == selectedOption?.key && !!selectedDate\n\t\t\t\t\t: eachOption.key == selectedOption?.key\n\t\t\t}\n\t\t>\n\t\t\t<BodySecondary\n\t\t\t\tcolor={\n\t\t\t\t\teachOption.key == selectedOption?.key\n\t\t\t\t\t\t? BASE_COLORS.positive[900]\n\t\t\t\t\t\t: BASE_COLORS.grayscale[900]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{eachOption.label}\n\t\t\t</BodySecondary>\n\t\t\t{eachOption.subLabel ? (\n\t\t\t\t<BodyCaption style={{ color: BASE_COLORS.grayscale[700] }}>\n\t\t\t\t\t{eachOption.subLabel}\n\t\t\t\t</BodyCaption>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\t\t\t{selectedDate &&\n\t\t\t\tselectedOption?.isCustom &&\n\t\t\t\teachOption.key == selectedOption?.key && (\n\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\twhiteSpace: 'normal',\n\t\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t\t\ttextAlign: 'left',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{rangeSelection\n\t\t\t\t\t\t\t? `${formatDate(selectedDate[0], showTimePicker)} to ${formatDate(\n\t\t\t\t\t\t\t\t\tselectedDate[1],\n\t\t\t\t\t\t\t\t\tshowTimePicker,\n\t\t\t\t\t\t\t )}`\n\t\t\t\t\t\t\t: `${formatDate(selectedDate[0], showTimePicker)}`}\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t)}\n\t\t</ItemMenuContainer>\n\t);\n};\n\nexport const formatDate = (dateVal: Date, includeTime?: boolean) => {\n\tconst dateString = dateVal.toLocaleString('default', {\n\t\tday: 'numeric',\n\t\tmonth: 'short',\n\t\tyear: 'numeric',\n\t});\n\n\tif (includeTime) {\n\t\tconst timeString = dateVal.toLocaleString('default', {\n\t\t\thour: 'numeric',\n\t\t\tminute: '2-digit',\n\t\t\thour12: true,\n\t\t});\n\t\treturn `${dateString} (${timeString})`;\n\t}\n\n\treturn dateString;\n};\n"],"names":["AnalyticsDropdown","options","placeholder","selected","onOptionSelected","resetDropdown","maxHeight","backgroundcolor","calendarPopperConfig","variant","datePickerPlacement","closeDropdown","labelColor","styleProps","showTimePicker","openCalender","setCalender","useState","selectedOption","setSelectedOption","selectedDate","setSelectedDate","showDropdown","setShowDropdown","optionPlaceholder","setOptionPlaceholder","dropdownRef","useRef","LabelText","Caption","BodySecondary","useEffect","setDropdown","forceState","prevState","handleClickOutside","event","jsx","Fragment","jsxs","MainDropdown","Dropdown","DEFAULT_THEME","formatDate","ReactDOM","toggleCalender","eachOption","index","EachItem","option","endDate","startDate","DatePicker","selectedStartDate","selectedEndDate","updatedDates","onClickingEachItem","rangeSelection","isLastItem","isFirstItem","ItemMenuContainer","BASE_COLORS","BodyCaption","dateVal","includeTime","dateString","timeString"],"mappings":";;;;;;;;AAmDO,MAAMA,KAA0D,CAAC;AAAA,EACvE,SAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,qBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,gBAAAC,IAAiB;AAClB,MAAM;AACL,QAAM,CAACC,GAAcC,CAAW,IAAIC,EAAS,EAAK,GAC5C,CAACC,GAAgBC,CAAiB,IAAIF,EAASd,CAAQ,GACvD,CAACiB,GAAcC,CAAe,IAAIJ,EAAA,GAClC,CAACK,GAAcC,CAAe,IAAIN,EAAS,EAAK,GAChD,CAACO,GAAmBC,CAAoB,IAAIR,EAASd,CAAQ,GAC7DuB,IAAcC,EAA8B,IAAI,GAChDC,IAAYnB,MAAY,UAAUoB,IAAUC;AAElD,EAAAC,EAAU,MAAM;AACf,IAAA1B,KAAiBc,EAAkB,MAAS;AAAA,EAC7C,GAAG,CAACd,CAAa,CAAC,GAElB0B,EAAU,MAAM;AACf,IACC5B,GAAU,YACVA,EAAS,2BAA2B,gBAEpCkB,EAAgBlB,EAAS,0BAA0B,aAAa,IAEhEkB,EAAgB,MAAS,GAE1BF,EAAkBhB,CAAQ;AAAA,EAC3B,GAAG,CAACA,CAAQ,CAAC,GAEb4B,EAAU,MAAM;AACf,IAAAR,EAAgB,EAAK,GACrBP,EAAY,EAAK;AAAA,EAClB,GAAG,CAACL,CAAa,CAAC;AAElB,QAAMqB,IAAc,CAACC,MAAyB;AAC7C,IAAIA,MAAe,UAClBV,EAAgBU,CAAU,GAC1BlB,KAAgBC,EAAY,EAAK,KAEjCO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3
+ size?: number | string;
4
+ color?: string;
5
+ }
6
+ declare const SvgBookOpenText: ({ size, color, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgBookOpenText;
@@ -0,0 +1,54 @@
1
+ import { jsxs as e, jsx as C } from "react/jsx-runtime";
2
+ const h = ({
3
+ size: l = 24,
4
+ color: r = "currentColor",
5
+ ...t
6
+ }) => {
7
+ const i = {
8
+ width: l,
9
+ height: l,
10
+ color: r,
11
+ ...t
12
+ };
13
+ return /* @__PURE__ */ e(
14
+ "svg",
15
+ {
16
+ viewBox: "0 0 16 16",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ ...i,
20
+ children: [
21
+ /* @__PURE__ */ e("g", { clipPath: "url(#clip0_4227_344708)", children: [
22
+ /* @__PURE__ */ C(
23
+ "path",
24
+ {
25
+ d: "M12.5 8.66732C12.8682 8.66732 13.1667 8.96579 13.1667 9.33398C13.1667 9.70217 12.8682 10.0007 12.5 10.0007H10.5C10.1319 10.0007 9.83337 9.70217 9.83337 9.33398C9.83337 8.96579 10.1319 8.66732 10.5 8.66732H12.5Z",
26
+ fill: "currentColor"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ C(
30
+ "path",
31
+ {
32
+ d: "M12.5 6.00065C12.8682 6.00065 13.1667 6.29913 13.1667 6.66732C13.1667 7.03551 12.8682 7.33398 12.5 7.33398H10.5C10.1319 7.33398 9.83337 7.03551 9.83337 6.66732C9.83337 6.29913 10.1319 6.00065 10.5 6.00065H12.5Z",
33
+ fill: "currentColor"
34
+ }
35
+ ),
36
+ /* @__PURE__ */ C(
37
+ "path",
38
+ {
39
+ fillRule: "evenodd",
40
+ clipRule: "evenodd",
41
+ d: "M6.00004 2.83398C6.70728 2.83398 7.38536 3.11514 7.88546 3.61523C7.9251 3.65488 7.96318 3.69582 8.00004 3.73763C8.0369 3.69582 8.07498 3.65488 8.11462 3.61523C8.61472 3.11514 9.2928 2.83398 10 2.83398H14.5C14.8682 2.83398 15.1667 3.13246 15.1667 3.50065V12.5007C15.1667 12.8688 14.8682 13.1673 14.5 13.1673H10C9.64642 13.1673 9.30738 13.3079 9.05733 13.5579C8.80728 13.808 8.66671 14.147 8.66671 14.5007C8.66671 14.8688 8.36823 15.1673 8.00004 15.1673C7.63185 15.1673 7.33337 14.8688 7.33337 14.5007C7.33337 14.147 7.1928 13.808 6.94275 13.5579C6.6927 13.3079 6.35366 13.1673 6.00004 13.1673H1.50004C1.13185 13.1673 0.833374 12.8688 0.833374 12.5007V3.50065C0.833374 3.13246 1.13185 2.83398 1.50004 2.83398H6.00004ZM2.16671 11.834H6.00004C6.47233 11.834 6.93135 11.9599 7.33337 12.1921V5.50065C7.33337 5.14703 7.1928 4.80799 6.94275 4.55794C6.6927 4.30789 6.35366 4.16732 6.00004 4.16732H2.16671V11.834ZM10 4.16732C9.64642 4.16732 9.30738 4.30789 9.05733 4.55794C8.80728 4.80799 8.66671 5.14703 8.66671 5.50065V12.1921C9.06868 11.9598 9.52773 11.834 10 11.834H13.8334V4.16732H10Z",
42
+ fill: "currentColor"
43
+ }
44
+ )
45
+ ] }),
46
+ /* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_4227_344708", children: /* @__PURE__ */ C("rect", { width: 16, height: 16, fill: "white" }) }) })
47
+ ]
48
+ }
49
+ );
50
+ };
51
+ export {
52
+ h as default
53
+ };
54
+ //# sourceMappingURL=BookOpenText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BookOpenText.js","sources":["../../../../../src/icons/Informational/General/BookOpenText.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgBookOpenText = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<g clipPath=\"url(#clip0_4227_344708)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M12.5 8.66732C12.8682 8.66732 13.1667 8.96579 13.1667 9.33398C13.1667 9.70217 12.8682 10.0007 12.5 10.0007H10.5C10.1319 10.0007 9.83337 9.70217 9.83337 9.33398C9.83337 8.96579 10.1319 8.66732 10.5 8.66732H12.5Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M12.5 6.00065C12.8682 6.00065 13.1667 6.29913 13.1667 6.66732C13.1667 7.03551 12.8682 7.33398 12.5 7.33398H10.5C10.1319 7.33398 9.83337 7.03551 9.83337 6.66732C9.83337 6.29913 10.1319 6.00065 10.5 6.00065H12.5Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td=\"M6.00004 2.83398C6.70728 2.83398 7.38536 3.11514 7.88546 3.61523C7.9251 3.65488 7.96318 3.69582 8.00004 3.73763C8.0369 3.69582 8.07498 3.65488 8.11462 3.61523C8.61472 3.11514 9.2928 2.83398 10 2.83398H14.5C14.8682 2.83398 15.1667 3.13246 15.1667 3.50065V12.5007C15.1667 12.8688 14.8682 13.1673 14.5 13.1673H10C9.64642 13.1673 9.30738 13.3079 9.05733 13.5579C8.80728 13.808 8.66671 14.147 8.66671 14.5007C8.66671 14.8688 8.36823 15.1673 8.00004 15.1673C7.63185 15.1673 7.33337 14.8688 7.33337 14.5007C7.33337 14.147 7.1928 13.808 6.94275 13.5579C6.6927 13.3079 6.35366 13.1673 6.00004 13.1673H1.50004C1.13185 13.1673 0.833374 12.8688 0.833374 12.5007V3.50065C0.833374 3.13246 1.13185 2.83398 1.50004 2.83398H6.00004ZM2.16671 11.834H6.00004C6.47233 11.834 6.93135 11.9599 7.33337 12.1921V5.50065C7.33337 5.14703 7.1928 4.80799 6.94275 4.55794C6.6927 4.30789 6.35366 4.16732 6.00004 4.16732H2.16671V11.834ZM10 4.16732C9.64642 4.16732 9.30738 4.30789 9.05733 4.55794C8.80728 4.80799 8.66671 5.14703 8.66671 5.50065V12.1921C9.06868 11.9598 9.52773 11.834 10 11.834H13.8334V4.16732H10Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_4227_344708\">\n\t\t\t\t\t<rect width={16} height={16} fill=\"white\" />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n};\nexport default SvgBookOpenText;\n"],"names":["SvgBookOpenText","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAkB,CAAC;AAAA,EACxB,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAa;AACZ,QAAMC,IAAQ;AAAA,IACb,OAAOH;AAAA,IACP,QAAQA;AAAA,IACR,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA;AAEJ,SACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,KAAA,EAAE,UAAS,2BACX,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACN,GACD;AAAA,QACA,gBAAAA,EAAC,QAAA,EACA,UAAA,gBAAAA,EAAC,YAAA,EAAS,IAAG,qBACZ,UAAA,gBAAAA,EAAC,QAAA,EAAK,OAAO,IAAI,QAAQ,IAAI,MAAK,SAAQ,GAC3C,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
@@ -1,3 +1,4 @@
1
+ export { default as BookOpenText } from './BookOpenText';
1
2
  export { default as AlertTriangle } from './AlertTriangle';
2
3
  export { default as Check } from './Check';
3
4
  export { default as CheckDouble } from './CheckDouble';
@@ -1,39 +1,39 @@
1
- export { Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, SendAirplane, ShareAndroid, } from './Actions/Common actions';
2
- export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox, } from './Actions/Formatting';
3
- export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp, } from './Actions/Navigation';
1
+ export { Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, SendAirplane, ShareAndroid } from './Actions/Common actions';
2
+ export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox } from './Actions/Formatting';
3
+ export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp } from './Actions/Navigation';
4
4
  export { HandleDrag, SingleChoice } from './Actions/Selection';
5
5
  export { CaratDown, CaratLeft, CaratRight, CaratUp } from './Arrows/Carat';
6
- export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, } from './Arrows/Chevron';
7
- export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp, } from './Arrows/Double chevron';
8
- export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight, } from './Arrows/Normal arrows';
6
+ export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from './Arrows/Chevron';
7
+ export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp } from './Arrows/Double chevron';
8
+ export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight } from './Arrows/Normal arrows';
9
9
  export { ArrowSwitch } from './Arrows/Special';
10
- export { AiIcon, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, Write, } from './BIK AI specific';
11
- export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training, } from './Informational/Common UI';
12
- export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone, } from './Informational/Communication';
13
- export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound, } from './Informational/Customer intent';
10
+ export { AiIcon, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, Write } from './BIK AI specific';
11
+ export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training } from './Informational/Common UI';
12
+ export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone } from './Informational/Communication';
13
+ export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound } from './Informational/Customer intent';
14
14
  export { SingleChoice as SingleChoice2 } from './Informational/Customer intent';
15
- export { Calendar, CalendarAdd, Clock, HourGlass, WorkingHours, } from './Informational/Date and time';
16
- export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket, } from './Informational/eCommerce';
15
+ export { Calendar, CalendarAdd, Clock, HourGlass, WorkingHours } from './Informational/Date and time';
16
+ export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket } from './Informational/eCommerce';
17
17
  export { ShoppingCart as ShoppingCart2 } from './Informational/eCommerce';
18
- export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive, } from './Informational/Files and folders';
19
- export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet, } from './Informational/Finance';
18
+ export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive } from './Informational/Files and folders';
19
+ export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet } from './Informational/Finance';
20
20
  export { Percent as Percent2 } from './Informational/Finance';
21
- export { AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, IcList, Info, NewTicket, RoundCheck, Slash, } from './Informational/General';
21
+ export { BookOpenText, AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, IcList, Info, NewTicket, RoundCheck, Slash } from './Informational/General';
22
22
  export { Help as Help2 } from './Informational/General';
23
- export { Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus, } from './Informational/Identity';
24
- export { Address, LanguageChange, MapPin, Truck, } from './Informational/Location';
25
- export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync, } from './Informational/Store related';
23
+ export { Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus } from './Informational/Identity';
24
+ export { Address, LanguageChange, MapPin, Truck } from './Informational/Location';
25
+ export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync } from './Informational/Store related';
26
26
  export { ClipboardCheck as ClipboardCheck2 } from './Informational/Store related';
27
27
  export { Box, Box2 } from './Legacy - Bikayi specific/Categories';
28
28
  export { Journeys } from './Legacy - Bikayi specific/Navigation';
29
29
  export { Services as Services2 } from './Legacy - Bikayi specific/Navigation';
30
30
  export { PlanUltimate } from './Legacy - Bikayi specific/Plans';
31
- export { Businesscard, Customdomain, Marketing, PaymentLink, Theme, } from './Legacy - Bikayi specific/Services';
32
- export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline, } from './Media/Audio';
31
+ export { Businesscard, Customdomain, Marketing, PaymentLink, Theme } from './Legacy - Bikayi specific/Services';
32
+ export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline } from './Media/Audio';
33
33
  export { Desktop, Smartphone } from './Media/Devices';
34
- export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload, } from './Media/Others';
35
- export { Camera, CameraAdd, Crop, FlashOff, FlashOn, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm, } from './Media/Visual';
36
- export { Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, Tasks, WebPush, WhatsApp, } from './Social/Channels';
34
+ export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload } from './Media/Others';
35
+ export { Camera, CameraAdd, Crop, FlashOff, FlashOn, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm } from './Media/Visual';
36
+ export { Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, Tasks, WebPush, WhatsApp } from './Social/Channels';
37
37
  export { Email as Email2 } from './Social/Channels';
38
38
  export { Google, Rcs, Twitter, Website, Youtube } from './Social/Social';
39
39
  export { EmailMarketing as EmailMarketing2 } from './Social/Social';
@@ -41,4 +41,4 @@ export { Facebook as Facebook2 } from './Social/Social';
41
41
  export { Instagram as Instagram2 } from './Social/Social';
42
42
  export { Messenger as Messenger2 } from './Social/Social';
43
43
  export { Whatsapp as Whatsapp2 } from './Social/Social';
44
- export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock, } from './Toggles/General';
44
+ export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock } from './Toggles/General';