@shefing/quickfilter 1.0.15 → 1.0.18

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":"date-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/components/date-filter.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAa,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAW3E,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAyC,EACzC,SAAS,EACT,KAAK,GACN,EAAE,eAAe,+BAiVjB"}
1
+ {"version":3,"file":"date-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/components/date-filter.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAa,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAW3E,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAyC,EACzC,SAAS,EACT,KAAK,GACN,EAAE,eAAe,+BAkVjB"}
@@ -43,6 +43,7 @@ export function DateFilter({ label, value, onChange, locale = {
43
43
  selectDate: getLabel('selectDate', localeCode),
44
44
  past: getLabel('past', localeCode),
45
45
  future: getLabel('future', localeCode),
46
+ presentFuture: getLabel('presentFuture', localeCode),
46
47
  custom: getLabel('customRange', localeCode),
47
48
  apply: getLabel('apply', localeCode),
48
49
  cancel: getLabel('cancel', localeCode)
@@ -203,7 +204,7 @@ export function DateFilter({ label, value, onChange, locale = {
203
204
  children: [
204
205
  /*#__PURE__*/ _jsx("div", {
205
206
  className: cn('text-sm font-semibold text-muted-foreground mb-2', isRTL && 'text-right'),
206
- children: labels.future
207
+ children: labels.presentFuture
207
208
  }),
208
209
  /*#__PURE__*/ _jsx("div", {
209
210
  className: "space-y-0.5",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/filters/components/date-filter.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\nimport { CalendarIcon, ChevronDown, X } from 'lucide-react';\n\nimport { formatDate, getDateRangeForOption } from '../utils/date-helpers';\nimport { DateFilterValue, DateRange, Locale } from '../types/filters-type';\nimport { Button } from '../../ui/button';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../../ui/label';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';\nimport { Separator } from '../../ui/separator';\nimport { Calendar } from '../../ui/calendar';\nimport { getDateFilterOptions } from '../constants/date-filter-options';\nimport { SupportedLocale, getLabel } from '../../labels';\n\n\ninterface DateFilterProps {\n label?: string;\n value?: DateFilterValue;\n onChange: (value: DateFilterValue) => void;\n locale?: Locale;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function DateFilter({\n label,\n value,\n onChange,\n locale = { code: 'he', direction: 'rtl' },\n className,\n style,\n}: DateFilterProps) {\n const [internalValue, setInternalValue] = useState<DateFilterValue | undefined>(value);\n const [customRange, setCustomRange] = useState<DateRange>({ from: undefined, to: undefined });\n const [showCustom, setShowCustom] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [openFromCalendar, setOpenFromCalendar] = useState(false);\n const [openToCalendar, setOpenToCalendar] = useState(false);\n\n const isRTL = locale.direction === 'rtl';\n const localeCode = locale.code as SupportedLocale;\n const { pastOptions, futureOptions } = getDateFilterOptions(localeCode);\n\n // Sync internal state with external value prop\n useEffect(() => {\n setInternalValue(value);\n if (value?.type === 'custom' && value.customRange) {\n setCustomRange(value.customRange);\n }\n }, [value]);\n\n const labels = {\n selectOption: getLabel('selectOption', localeCode),\n from: getLabel('from', localeCode),\n to: getLabel('to', localeCode),\n selectDate: getLabel('selectDate', localeCode),\n past: getLabel('past', localeCode),\n future: getLabel('future', localeCode),\n custom: getLabel('customRange', localeCode),\n apply: getLabel('apply', localeCode),\n cancel: getLabel('cancel', localeCode),\n };\n\n const handlePredefinedSelect = (optionValue: string) => {\n setShowCustom(false);\n setIsOpen(false);\n\n const dateRange = getDateRangeForOption(optionValue, locale.code);\n const newValue: DateFilterValue = {\n type: 'predefined',\n predefinedValue: optionValue,\n customRange: { from: dateRange.from, to: dateRange.to },\n };\n\n setInternalValue(newValue);\n onChange(newValue);\n };\n\n const handleCustomSelect = () => {\n setShowCustom(true);\n };\n\n const handleCustomRangeChange = (newRange: DateRange) => {\n setCustomRange(newRange);\n };\n\n const handleApplyCustomRange = () => {\n const newValue: DateFilterValue = {\n type: 'custom',\n customRange,\n };\n\n setInternalValue(newValue);\n onChange(newValue);\n setIsOpen(false);\n setShowCustom(false);\n };\n\n const handleCancelCustomRange = () => {\n setIsOpen(false);\n setShowCustom(false);\n setCustomRange({ from: undefined, to: undefined });\n };\n\n const handleClearAll = () => {\n setInternalValue(undefined);\n setCustomRange({ from: undefined, to: undefined });\n setShowCustom(false);\n onChange({} as DateFilterValue);\n };\n\n const hasValue = () => {\n return (\n internalValue && (internalValue.type === 'predefined' || internalValue.type === 'custom')\n );\n };\n\n const getDisplayValue = () => {\n if (internalValue?.type === 'custom' && internalValue.customRange) {\n const { from, to } = internalValue.customRange;\n if (from && to) {\n return `${formatDate(from, 'dd/MM/yyyy')}-${formatDate(to, 'dd/MM/yyyy')}`;\n } else if (from) {\n return `${labels.from}: ${formatDate(from, 'dd/MM/yyyy')}`;\n } else if (to) {\n return `${labels.to}: ${formatDate(to, 'dd/MM/yyyy')}`;\n }\n return labels.custom;\n }\n\n if (internalValue?.type === 'predefined' && internalValue.predefinedValue) {\n const allOptions = [...pastOptions, ...futureOptions];\n const option = allOptions.find((opt) => opt.value === internalValue.predefinedValue);\n const dateRange = getDateRangeForOption(internalValue.predefinedValue, locale.code);\n return `${option?.label || internalValue.predefinedValue} ${dateRange.description}`;\n }\n\n return labels.selectOption;\n };\n\n const formatDateRange = (description: string) => {\n // Check if description contains a date range (has \" - \" in it)\n if (description.includes(' - ') && isRTL) {\n // Split by \" - \" and reverse the order for RTL\n const parts = description.replace(/[()]/g, '').split(' - ');\n if (parts.length === 2) {\n return `(${parts[1]}-${parts[0]})`;\n }\n }\n return description;\n };\n\n const renderOptionWithDate = (option: { value: string; label: string }) => {\n const dateRange = getDateRangeForOption(option.value, locale.code);\n const formattedDescription = formatDateRange(dateRange.description);\n\n return (\n <Button\n key={option.value}\n variant='ghost'\n className={cn(\n ' w-full h-auto py-1 px-2 text-xs leading-tight justify-start',\n isRTL ? ' text-right' : ' text-left',\n internalValue?.predefinedValue === option.value && 'bg-accent',\n )}\n onClick={() => handlePredefinedSelect(option.value)}\n >\n <div className={cn('flex flex-col')}>\n <span className='font-medium'>{option.label}</span>\n <span className='text-[10px] text-muted-foreground' dir={locale.direction}>\n {formattedDescription}\n </span>\n </div>\n </Button>\n );\n };\n\n return (\n <div className={cn('useTw space-y-1', className)} dir={locale.direction} style={style}>\n {label && (\n <Label className={cn('useTw text-sm font-medium', isRTL && 'text-right block')}>\n {label}\n </Label>\n )}\n\n <div className='relative useTw'>\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n role='combobox'\n aria-expanded={isOpen}\n className='useTw w-full justify-between bg-background relative min-w-70'\n >\n <span className={`useTw truncate ${isRTL && 'text-right'}`}>{getDisplayValue()}</span>\n <ChevronDown className='useTw h-4 w-4 shrink-0 opacity-50' />\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-80 p-0'>\n <div className='p-4'>\n <div className='grid grid-cols-2 gap-4'>\n {/* Future Options - Left column */}\n <div className='space-y-1'>\n <div\n className={cn(\n 'text-sm font-semibold text-muted-foreground mb-2',\n isRTL && 'text-right',\n )}\n >\n {labels.future}\n </div>\n <div className='space-y-0.5'>\n {futureOptions.map((option) => (\n <div key={option.value}>{renderOptionWithDate(option)}</div>\n ))}\n </div>\n </div>\n\n {/* Past Options - Right column */}\n <div className='space-y-1'>\n <div\n className={cn(\n 'text-sm font-semibold text-muted-foreground mb-2',\n isRTL && 'text-right',\n )}\n >\n {labels.past}\n </div>\n <div className='space-y-0.5'>\n {pastOptions.map((option) => (\n <div key={option.value}>{renderOptionWithDate(option)}</div>\n ))}\n </div>\n </div>\n </div>\n\n <Separator className='my-4' />\n\n {/* Custom Option */}\n <div className='space-y-3'>\n <Button\n variant='ghost'\n className={cn(\n 'useTw w-full justify-start h-auto py-2 px-2',\n (showCustom || internalValue?.type === 'custom') && 'bg-accent',\n isRTL && 'justify-start text-right',\n )}\n onClick={handleCustomSelect}\n >\n {labels.custom}\n </Button>\n\n {/* Custom Date Range - appears next to custom label */}\n {showCustom && (\n <div className='space-y-3 pl-2'>\n <div className='grid grid-cols-1 gap-3'>\n {/* From Date */}\n <div className={cn('flex items-center gap-2')}>\n <Label className={cn('useTw text-xs w-[20%]', isRTL && 'text-right')}>\n {labels.from}\n </Label>\n <Popover open={openFromCalendar} onOpenChange={setOpenFromCalendar}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n className={cn(\n 'useTw w-[60%] justify-start text-left font-normal text-xs h-8 bg-background',\n !customRange.from && 'text-muted-foreground',\n )}\n >\n <CalendarIcon className='useTw mr-1 h-3 w-3' />\n <span dir={locale.direction}>\n {customRange.from\n ? formatDate(customRange.from, 'dd/MM/yyyy')\n : labels.selectDate}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-auto p-0' align='start'>\n <Calendar\n mode='single'\n selected={customRange.from}\n onSelect={(date) => {\n handleCustomRangeChange({ ...customRange, from: date });\n setOpenFromCalendar(false);\n }}\n initialFocus\n className='useTw'\n />\n </PopoverContent>\n </Popover>\n </div>\n\n {/* To Date */}\n <div className={cn('flex items-center gap-2')}>\n <Label className={cn('useTw text-xs w-[20%]', isRTL && 'text-right')}>\n {labels.to}\n </Label>\n <Popover open={openToCalendar} onOpenChange={setOpenToCalendar}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n className={cn(\n 'useTw w-[60%] justify-start text-left font-normal text-xs h-8 bg-background',\n !customRange.to && 'text-muted-foreground',\n )}\n >\n <CalendarIcon className='useTw mr-1 h-3 w-3' />\n <span dir={locale.direction}>\n {customRange.to\n ? formatDate(customRange.to, 'dd/MM/yyyy')\n : labels.selectDate}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-auto p-0' align='start'>\n <Calendar\n mode='single'\n selected={customRange.to}\n onSelect={(date) => {\n handleCustomRangeChange({ ...customRange, to: date });\n setOpenToCalendar(false);\n }}\n initialFocus\n className='useTw'\n />\n </PopoverContent>\n </Popover>\n </div>\n </div>\n\n {/* Action Buttons */}\n <div className='flex gap-2'>\n <Button\n onClick={handleApplyCustomRange}\n className='useTw flex-1 text-xs h-8'\n disabled={!customRange.from && !customRange.to}\n >\n {labels.apply}\n </Button>\n <Button\n onClick={handleCancelCustomRange}\n variant='outline'\n className='useTw flex-1 text-xs h-8 bg-transparent'\n >\n {labels.cancel}\n </Button>\n </div>\n </div>\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {hasValue() && (\n <button\n className={`useTw absolute ${isRTL ? 'left-8' : 'right-8'} top-1/2 -translate-y-1/2 h-4 w-4 p-0 hover:bg-muted rounded-sm flex items-center justify-center z-10 `}\n onClick={(e) => {\n e.stopPropagation();\n handleClearAll();\n }}\n >\n <X className='useTw h-3 w-3' />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"names":["useEffect","useState","CalendarIcon","ChevronDown","X","formatDate","getDateRangeForOption","Button","cn","Label","Popover","PopoverContent","PopoverTrigger","Separator","Calendar","getDateFilterOptions","getLabel","DateFilter","label","value","onChange","locale","code","direction","className","style","internalValue","setInternalValue","customRange","setCustomRange","from","undefined","to","showCustom","setShowCustom","isOpen","setIsOpen","openFromCalendar","setOpenFromCalendar","openToCalendar","setOpenToCalendar","isRTL","localeCode","pastOptions","futureOptions","type","labels","selectOption","selectDate","past","future","custom","apply","cancel","handlePredefinedSelect","optionValue","dateRange","newValue","predefinedValue","handleCustomSelect","handleCustomRangeChange","newRange","handleApplyCustomRange","handleCancelCustomRange","handleClearAll","hasValue","getDisplayValue","allOptions","option","find","opt","description","formatDateRange","includes","parts","replace","split","length","renderOptionWithDate","formattedDescription","variant","onClick","div","span","dir","open","onOpenChange","asChild","role","aria-expanded","map","align","mode","selected","onSelect","date","initialFocus","disabled","button","e","stopPropagation"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAC5C,SAASC,YAAY,EAAEC,WAAW,EAAEC,CAAC,QAAQ,eAAe;AAE5D,SAASC,UAAU,EAAEC,qBAAqB,QAAQ,wBAAwB;AAE1E,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,EAAE,QAAQ,kBAAkB;AACrC,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAQ,mBAAmB;AAC3E,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAA0BC,QAAQ,QAAQ,eAAe;AAYzD,OAAO,SAASC,WAAW,EACzBC,KAAK,EACLC,KAAK,EACL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BAC3Bc,OAAOE,UAAU;;;;;8FAI3B,KAACrC;oFAAea,WAAU;oFAAmBmE,OAAM;8FACjD,cAAA,KAAC7E;wFACC8E,MAAK;wFACLC,UAAUjE,YAAYI,EAAE;wFACxB8D,UAAU,CAACC;4FACTnC,wBAAwB;gGAAE,GAAGhC,WAAW;gGAAEI,IAAI+D;4FAAK;4FACnDvD,kBAAkB;wFACpB;wFACAwD,YAAY;wFACZxE,WAAU;;;;;;;;;sEAQpB,MAAC0D;4DAAI1D,WAAU;;8EACb,KAACjB;oEACC0E,SAASnB;oEACTtC,WAAU;oEACVyE,UAAU,CAACrE,YAAYE,IAAI,IAAI,CAACF,YAAYI,EAAE;8EAE7Cc,OAAOM,KAAK;;8EAEf,KAAC7C;oEACC0E,SAASlB;oEACTiB,SAAQ;oEACRxD,WAAU;8EAETsB,OAAOO,MAAM;;;;;;;;;;;;;oBAS7BY,4BACC,KAACiC;wBACC1E,WAAW,CAAC,eAAe,EAAEiB,QAAQ,WAAW,UAAU,sGAAsG,CAAC;wBACjKwC,SAAS,CAACkB;4BACRA,EAAEC,eAAe;4BACjBpC;wBACF;kCAEA,cAAA,KAAC5D;4BAAEoB,WAAU;;;;;;;AAMzB"}
1
+ {"version":3,"sources":["../../../src/filters/components/date-filter.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\nimport { CalendarIcon, ChevronDown, X } from 'lucide-react';\n\nimport { formatDate, getDateRangeForOption } from '../utils/date-helpers';\nimport { DateFilterValue, DateRange, Locale } from '../types/filters-type';\nimport { Button } from '../../ui/button';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../../ui/label';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';\nimport { Separator } from '../../ui/separator';\nimport { Calendar } from '../../ui/calendar';\nimport { getDateFilterOptions } from '../constants/date-filter-options';\nimport { SupportedLocale, getLabel } from '../../labels';\n\n\ninterface DateFilterProps {\n label?: string;\n value?: DateFilterValue;\n onChange: (value: DateFilterValue) => void;\n locale?: Locale;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function DateFilter({\n label,\n value,\n onChange,\n locale = { code: 'he', direction: 'rtl' },\n className,\n style,\n}: DateFilterProps) {\n const [internalValue, setInternalValue] = useState<DateFilterValue | undefined>(value);\n const [customRange, setCustomRange] = useState<DateRange>({ from: undefined, to: undefined });\n const [showCustom, setShowCustom] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [openFromCalendar, setOpenFromCalendar] = useState(false);\n const [openToCalendar, setOpenToCalendar] = useState(false);\n\n const isRTL = locale.direction === 'rtl';\n const localeCode = locale.code as SupportedLocale;\n const { pastOptions, futureOptions } = getDateFilterOptions(localeCode);\n\n // Sync internal state with external value prop\n useEffect(() => {\n setInternalValue(value);\n if (value?.type === 'custom' && value.customRange) {\n setCustomRange(value.customRange);\n }\n }, [value]);\n\n const labels = {\n selectOption: getLabel('selectOption', localeCode),\n from: getLabel('from', localeCode),\n to: getLabel('to', localeCode),\n selectDate: getLabel('selectDate', localeCode),\n past: getLabel('past', localeCode),\n future: getLabel('future', localeCode),\n presentFuture: getLabel('presentFuture', localeCode),\n custom: getLabel('customRange', localeCode),\n apply: getLabel('apply', localeCode),\n cancel: getLabel('cancel', localeCode),\n };\n\n const handlePredefinedSelect = (optionValue: string) => {\n setShowCustom(false);\n setIsOpen(false);\n\n const dateRange = getDateRangeForOption(optionValue, locale.code);\n const newValue: DateFilterValue = {\n type: 'predefined',\n predefinedValue: optionValue,\n customRange: { from: dateRange.from, to: dateRange.to },\n };\n\n setInternalValue(newValue);\n onChange(newValue);\n };\n\n const handleCustomSelect = () => {\n setShowCustom(true);\n };\n\n const handleCustomRangeChange = (newRange: DateRange) => {\n setCustomRange(newRange);\n };\n\n const handleApplyCustomRange = () => {\n const newValue: DateFilterValue = {\n type: 'custom',\n customRange,\n };\n\n setInternalValue(newValue);\n onChange(newValue);\n setIsOpen(false);\n setShowCustom(false);\n };\n\n const handleCancelCustomRange = () => {\n setIsOpen(false);\n setShowCustom(false);\n setCustomRange({ from: undefined, to: undefined });\n };\n\n const handleClearAll = () => {\n setInternalValue(undefined);\n setCustomRange({ from: undefined, to: undefined });\n setShowCustom(false);\n onChange({} as DateFilterValue);\n };\n\n const hasValue = () => {\n return (\n internalValue && (internalValue.type === 'predefined' || internalValue.type === 'custom')\n );\n };\n\n const getDisplayValue = () => {\n if (internalValue?.type === 'custom' && internalValue.customRange) {\n const { from, to } = internalValue.customRange;\n if (from && to) {\n return `${formatDate(from, 'dd/MM/yyyy')}-${formatDate(to, 'dd/MM/yyyy')}`;\n } else if (from) {\n return `${labels.from}: ${formatDate(from, 'dd/MM/yyyy')}`;\n } else if (to) {\n return `${labels.to}: ${formatDate(to, 'dd/MM/yyyy')}`;\n }\n return labels.custom;\n }\n\n if (internalValue?.type === 'predefined' && internalValue.predefinedValue) {\n const allOptions = [...pastOptions, ...futureOptions];\n const option = allOptions.find((opt) => opt.value === internalValue.predefinedValue);\n const dateRange = getDateRangeForOption(internalValue.predefinedValue, locale.code);\n return `${option?.label || internalValue.predefinedValue} ${dateRange.description}`;\n }\n\n return labels.selectOption;\n };\n\n const formatDateRange = (description: string) => {\n // Check if description contains a date range (has \" - \" in it)\n if (description.includes(' - ') && isRTL) {\n // Split by \" - \" and reverse the order for RTL\n const parts = description.replace(/[()]/g, '').split(' - ');\n if (parts.length === 2) {\n return `(${parts[1]}-${parts[0]})`;\n }\n }\n return description;\n };\n\n const renderOptionWithDate = (option: { value: string; label: string }) => {\n const dateRange = getDateRangeForOption(option.value, locale.code);\n const formattedDescription = formatDateRange(dateRange.description);\n\n return (\n <Button\n key={option.value}\n variant='ghost'\n className={cn(\n ' w-full h-auto py-1 px-2 text-xs leading-tight justify-start',\n isRTL ? ' text-right' : ' text-left',\n internalValue?.predefinedValue === option.value && 'bg-accent',\n )}\n onClick={() => handlePredefinedSelect(option.value)}\n >\n <div className={cn('flex flex-col')}>\n <span className='font-medium'>{option.label}</span>\n <span className='text-[10px] text-muted-foreground' dir={locale.direction}>\n {formattedDescription}\n </span>\n </div>\n </Button>\n );\n };\n\n return (\n <div className={cn('useTw space-y-1', className)} dir={locale.direction} style={style}>\n {label && (\n <Label className={cn('useTw text-sm font-medium', isRTL && 'text-right block')}>\n {label}\n </Label>\n )}\n\n <div className='relative useTw'>\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n role='combobox'\n aria-expanded={isOpen}\n className='useTw w-full justify-between bg-background relative min-w-70'\n >\n <span className={`useTw truncate ${isRTL && 'text-right'}`}>{getDisplayValue()}</span>\n <ChevronDown className='useTw h-4 w-4 shrink-0 opacity-50' />\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-80 p-0'>\n <div className='p-4'>\n <div className='grid grid-cols-2 gap-4'>\n {/* Future Options - Left column */}\n <div className='space-y-1'>\n <div\n className={cn(\n 'text-sm font-semibold text-muted-foreground mb-2',\n isRTL && 'text-right',\n )}\n >\n {labels.presentFuture}\n </div>\n <div className='space-y-0.5'>\n {futureOptions.map((option) => (\n <div key={option.value}>{renderOptionWithDate(option)}</div>\n ))}\n </div>\n </div>\n\n {/* Past Options - Right column */}\n <div className='space-y-1'>\n <div\n className={cn(\n 'text-sm font-semibold text-muted-foreground mb-2',\n isRTL && 'text-right',\n )}\n >\n {labels.past}\n </div>\n <div className='space-y-0.5'>\n {pastOptions.map((option) => (\n <div key={option.value}>{renderOptionWithDate(option)}</div>\n ))}\n </div>\n </div>\n </div>\n\n <Separator className='my-4' />\n\n {/* Custom Option */}\n <div className='space-y-3'>\n <Button\n variant='ghost'\n className={cn(\n 'useTw w-full justify-start h-auto py-2 px-2',\n (showCustom || internalValue?.type === 'custom') && 'bg-accent',\n isRTL && 'justify-start text-right',\n )}\n onClick={handleCustomSelect}\n >\n {labels.custom}\n </Button>\n\n {/* Custom Date Range - appears next to custom label */}\n {showCustom && (\n <div className='space-y-3 pl-2'>\n <div className='grid grid-cols-1 gap-3'>\n {/* From Date */}\n <div className={cn('flex items-center gap-2')}>\n <Label className={cn('useTw text-xs w-[20%]', isRTL && 'text-right')}>\n {labels.from}\n </Label>\n <Popover open={openFromCalendar} onOpenChange={setOpenFromCalendar}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n className={cn(\n 'useTw w-[60%] justify-start text-left font-normal text-xs h-8 bg-background',\n !customRange.from && 'text-muted-foreground',\n )}\n >\n <CalendarIcon className='useTw mr-1 h-3 w-3' />\n <span dir={locale.direction}>\n {customRange.from\n ? formatDate(customRange.from, 'dd/MM/yyyy')\n : labels.selectDate}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-auto p-0' align='start'>\n <Calendar\n mode='single'\n selected={customRange.from}\n onSelect={(date) => {\n handleCustomRangeChange({ ...customRange, from: date });\n setOpenFromCalendar(false);\n }}\n initialFocus\n className='useTw'\n />\n </PopoverContent>\n </Popover>\n </div>\n\n {/* To Date */}\n <div className={cn('flex items-center gap-2')}>\n <Label className={cn('useTw text-xs w-[20%]', isRTL && 'text-right')}>\n {labels.to}\n </Label>\n <Popover open={openToCalendar} onOpenChange={setOpenToCalendar}>\n <PopoverTrigger asChild className='useTw'>\n <Button\n variant='outline'\n className={cn(\n 'useTw w-[60%] justify-start text-left font-normal text-xs h-8 bg-background',\n !customRange.to && 'text-muted-foreground',\n )}\n >\n <CalendarIcon className='useTw mr-1 h-3 w-3' />\n <span dir={locale.direction}>\n {customRange.to\n ? formatDate(customRange.to, 'dd/MM/yyyy')\n : labels.selectDate}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className='useTw w-auto p-0' align='start'>\n <Calendar\n mode='single'\n selected={customRange.to}\n onSelect={(date) => {\n handleCustomRangeChange({ ...customRange, to: date });\n setOpenToCalendar(false);\n }}\n initialFocus\n className='useTw'\n />\n </PopoverContent>\n </Popover>\n </div>\n </div>\n\n {/* Action Buttons */}\n <div className='flex gap-2'>\n <Button\n onClick={handleApplyCustomRange}\n className='useTw flex-1 text-xs h-8'\n disabled={!customRange.from && !customRange.to}\n >\n {labels.apply}\n </Button>\n <Button\n onClick={handleCancelCustomRange}\n variant='outline'\n className='useTw flex-1 text-xs h-8 bg-transparent'\n >\n {labels.cancel}\n </Button>\n </div>\n </div>\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {hasValue() && (\n <button\n className={`useTw absolute ${isRTL ? 'left-8' : 'right-8'} top-1/2 -translate-y-1/2 h-4 w-4 p-0 hover:bg-muted rounded-sm flex items-center justify-center z-10 `}\n onClick={(e) => {\n e.stopPropagation();\n handleClearAll();\n }}\n >\n <X className='useTw h-3 w-3' />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"names":["useEffect","useState","CalendarIcon","ChevronDown","X","formatDate","getDateRangeForOption","Button","cn","Label","Popover","PopoverContent","PopoverTrigger","Separator","Calendar","getDateFilterOptions","getLabel","DateFilter","label","value","onChange","locale","code","direction","className","style","internalValue","setInternalValue","customRange","setCustomRange","from","undefined","to","showCustom","setShowCustom","isOpen","setIsOpen","openFromCalendar","setOpenFromCalendar","openToCalendar","setOpenToCalendar","isRTL","localeCode","pastOptions","futureOptions","type","labels","selectOption","selectDate","past","future","presentFuture","custom","apply","cancel","handlePredefinedSelect","optionValue","dateRange","newValue","predefinedValue","handleCustomSelect","handleCustomRangeChange","newRange","handleApplyCustomRange","handleCancelCustomRange","handleClearAll","hasValue","getDisplayValue","allOptions","option","find","opt","description","formatDateRange","includes","parts","replace","split","length","renderOptionWithDate","formattedDescription","variant","onClick","div","span","dir","open","onOpenChange","asChild","role","aria-expanded","map","align","mode","selected","onSelect","date","initialFocus","disabled","button","e","stopPropagation"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAC5C,SAASC,YAAY,EAAEC,WAAW,EAAEC,CAAC,QAAQ,eAAe;AAE5D,SAASC,UAAU,EAAEC,qBAAqB,QAAQ,wBAAwB;AAE1E,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAAS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d,EAAE;;sFAEZ,MAACtB;4EAAQ4E,MAAM/C;4EAAgBgD,cAAc/C;;8FAC3C,KAAC5B;oFAAe4E,OAAO;oFAAChE,WAAU;8FAChC,cAAA,MAACjB;wFACC0E,SAAQ;wFACRzD,WAAWhB,GACT,+EACA,CAACoB,YAAYI,EAAE,IAAI;;0GAGrB,KAAC9B;gGAAasB,WAAU;;0GACxB,KAAC4D;gGAAKC,KAAKhE,OAAOE,SAAS;0GACxBK,YAAYI,EAAE,GACX3B,WAAWuB,YAAYI,EAAE,EAAE,gBAC3Bc,OAAOE,UAAU;;;;;8FAI3B,KAACrC;oFAAea,WAAU;oFAAmBoE,OAAM;8FACjD,cAAA,KAAC9E;wFACC+E,MAAK;wFACLC,UAAUlE,YAAYI,EAAE;wFACxB+D,UAAU,CAACC;4FACTnC,wBAAwB;gGAAE,GAAGjC,WAAW;gGAAEI,IAAIgE;4FAAK;4FACnDxD,kBAAkB;wFACpB;wFACAyD,YAAY;wFACZzE,WAAU;;;;;;;;;sEAQpB,MAAC2D;4DAAI3D,WAAU;;8EACb,KAACjB;oEACC2E,SAASnB;oEACTvC,WAAU;oEACV0E,UAAU,CAACtE,YAAYE,IAAI,IAAI,CAACF,YAAYI,EAAE;8EAE7Cc,OAAOO,KAAK;;8EAEf,KAAC9C;oEACC2E,SAASlB;oEACTiB,SAAQ;oEACRzD,WAAU;8EAETsB,OAAOQ,MAAM;;;;;;;;;;;;;oBAS7BY,4BACC,KAACiC;wBACC3E,WAAW,CAAC,eAAe,EAAEiB,QAAQ,WAAW,UAAU,sGAAsG,CAAC;wBACjKyC,SAAS,CAACkB;4BACRA,EAAEC,eAAe;4BACjBpC;wBACF;kCAEA,cAAA,KAAC7D;4BAAEoB,WAAU;;;;;;;AAMzB"}
@@ -1,7 +1,7 @@
1
1
  import type { SupportedLocale } from '../../labels';
2
2
  import { DateFilterOption } from '../types/filters-type';
3
- export declare const pastOptionKeys: readonly ["yesterday", "lastWeek", "lastMonth", "allPast"];
4
- export declare const futureOptionKeys: readonly ["today", "nextWeek", "nextMonth", "allFuture"];
3
+ export declare const pastOptionKeys: readonly ["yesterday", "lastWeek", "lastMonth", "last7Days", "last30Days", "allPast"];
4
+ export declare const futureOptionKeys: readonly ["today", "thisWeek", "thisMonth", "next7Days", "next30Days", "allFuture"];
5
5
  export declare const getDateFilterOptions: (locale: SupportedLocale | string) => {
6
6
  pastOptions: DateFilterOption[];
7
7
  futureOptions: DateFilterOption[];
@@ -1 +1 @@
1
- {"version":3,"file":"date-filter-options.d.ts","sourceRoot":"","sources":["../../../src/filters/constants/date-filter-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,eAAO,MAAM,cAAc,4DAA6D,CAAC;AACzF,eAAO,MAAM,gBAAgB,0DAA2D,CAAC;AAazF,eAAO,MAAM,oBAAoB,WAAY,eAAe,GAAG,MAAM;;;CAKpE,CAAC"}
1
+ {"version":3,"file":"date-filter-options.d.ts","sourceRoot":"","sources":["../../../src/filters/constants/date-filter-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,eAAO,MAAM,cAAc,uFAOjB,CAAC;AACX,eAAO,MAAM,gBAAgB,qFAOnB,CAAC;AAaX,eAAO,MAAM,oBAAoB,WAAY,eAAe,GAAG,MAAM;;;CAKpE,CAAC"}
@@ -4,12 +4,16 @@ export const pastOptionKeys = [
4
4
  'yesterday',
5
5
  'lastWeek',
6
6
  'lastMonth',
7
+ 'last7Days',
8
+ 'last30Days',
7
9
  'allPast'
8
10
  ];
9
11
  export const futureOptionKeys = [
10
12
  'today',
11
- 'nextWeek',
12
- 'nextMonth',
13
+ 'thisWeek',
14
+ 'thisMonth',
15
+ 'next7Days',
16
+ 'next30Days',
13
17
  'allFuture'
14
18
  ];
15
19
  // Create date filter options dynamically based on locale
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/filters/constants/date-filter-options.ts"],"sourcesContent":["import { getLabel } from '../../labels';\nimport type { SupportedLocale } from '../../labels';\nimport { DateFilterOption } from '../types/filters-type';\n\n// Define the option keys for past and future date filters\nexport const pastOptionKeys = ['yesterday', 'lastWeek', 'lastMonth', 'allPast'] as const;\nexport const futureOptionKeys = ['today', 'nextWeek', 'nextMonth', 'allFuture'] as const;\n\n// Create date filter options dynamically based on locale\nconst createDateFilterOptions = (\n keys: readonly string[],\n locale: SupportedLocale | string,\n): DateFilterOption[] => {\n return keys.map((key) => ({\n value: key,\n label: getLabel(key as any, locale as SupportedLocale),\n }));\n};\n\nexport const getDateFilterOptions = (locale: SupportedLocale | string) => {\n return {\n pastOptions: createDateFilterOptions(pastOptionKeys, locale),\n futureOptions: createDateFilterOptions(futureOptionKeys, locale),\n };\n};\n"],"names":["getLabel","pastOptionKeys","futureOptionKeys","createDateFilterOptions","keys","locale","map","key","value","label","getDateFilterOptions","pastOptions","futureOptions"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,eAAe;AAIxC,0DAA0D;AAC1D,OAAO,MAAMC,iBAAiB;IAAC;IAAa;IAAY;IAAa;CAAU,CAAU;AACzF,OAAO,MAAMC,mBAAmB;IAAC;IAAS;IAAY;IAAa;CAAY,CAAU;AAEzF,yDAAyD;AACzD,MAAMC,0BAA0B,CAC9BC,MACAC;IAEA,OAAOD,KAAKE,GAAG,CAAC,CAACC,MAAS,CAAA;YACxBC,OAAOD;YACPE,OAAOT,SAASO,KAAYF;QAC9B,CAAA;AACF;AAEA,OAAO,MAAMK,uBAAuB,CAACL;IACnC,OAAO;QACLM,aAAaR,wBAAwBF,gBAAgBI;QACrDO,eAAeT,wBAAwBD,kBAAkBG;IAC3D;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/filters/constants/date-filter-options.ts"],"sourcesContent":["import type { LabelKey, SupportedLocale } from '../../labels';\nimport { getLabel } from '../../labels';\nimport { DateFilterOption } from '../types/filters-type'; // Define the option keys for past and future date filters\n\n// Define the option keys for past and future date filters\nexport const pastOptionKeys = [\n 'yesterday',\n 'lastWeek',\n 'lastMonth',\n 'last7Days',\n 'last30Days',\n 'allPast',\n] as const;\nexport const futureOptionKeys = [\n 'today',\n 'thisWeek',\n 'thisMonth',\n 'next7Days',\n 'next30Days',\n 'allFuture',\n] as const;\n\n// Create date filter options dynamically based on locale\nconst createDateFilterOptions = (\n keys: readonly string[],\n locale: SupportedLocale | string,\n): DateFilterOption[] => {\n return keys.map((key) => ({\n value: key,\n label: getLabel(key as LabelKey, locale as SupportedLocale),\n }));\n};\n\nexport const getDateFilterOptions = (locale: SupportedLocale | string) => {\n return {\n pastOptions: createDateFilterOptions(pastOptionKeys, locale),\n futureOptions: createDateFilterOptions(futureOptionKeys, locale),\n };\n};\n"],"names":["getLabel","pastOptionKeys","futureOptionKeys","createDateFilterOptions","keys","locale","map","key","value","label","getDateFilterOptions","pastOptions","futureOptions"],"mappings":"AACA,SAASA,QAAQ,QAAQ,eAAe;AAGxC,0DAA0D;AAC1D,OAAO,MAAMC,iBAAiB;IAC5B;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AACX,OAAO,MAAMC,mBAAmB;IAC9B;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AAEX,yDAAyD;AACzD,MAAMC,0BAA0B,CAC9BC,MACAC;IAEA,OAAOD,KAAKE,GAAG,CAAC,CAACC,MAAS,CAAA;YACxBC,OAAOD;YACPE,OAAOT,SAASO,KAAiBF;QACnC,CAAA;AACF;AAEA,OAAO,MAAMK,uBAAuB,CAACL;IACnC,OAAO;QACLM,aAAaR,wBAAwBF,gBAAgBI;QACrDO,eAAeT,wBAAwBD,kBAAkBG;IAC3D;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"date-helpers.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/date-helpers.ts"],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AED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAI3C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAqBhE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,eAAsB,GAC7B;IAAE,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IAAC,EAAE,EAAE,IAAI,GAAG,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CA8GvE"}
@@ -109,6 +109,20 @@ export function getDateRangeForOption(option, locale = 'he') {
109
109
  to: lastMonthEnd,
110
110
  description: `(${formatDate(lastMonthStart, 'MM/yyyy')})`
111
111
  };
112
+ case 'last7Days':
113
+ const last7DaysStart = startOfDay(subDays(now, 6));
114
+ return {
115
+ from: last7DaysStart,
116
+ to: endOfDay(now),
117
+ description: `(${formatDate(last7DaysStart, 'dd/MM')} - ${formatDate(now, 'dd/MM/yyyy')})`
118
+ };
119
+ case 'last30Days':
120
+ const last30DaysStart = startOfDay(subDays(now, 29));
121
+ return {
122
+ from: last30DaysStart,
123
+ to: endOfDay(now),
124
+ description: `(${formatDate(last30DaysStart, 'dd/MM')} - ${formatDate(now, 'dd/MM/yyyy')})`
125
+ };
112
126
  case 'allPast':
113
127
  {
114
128
  const yesterday = subDays(now, 1);
@@ -124,7 +138,7 @@ export function getDateRangeForOption(option, locale = 'he') {
124
138
  to: endOfDay(now),
125
139
  description: `(${formatDate(now, 'dd/MM/yyyy')})`
126
140
  };
127
- case 'nextWeek':
141
+ case 'thisWeek':
128
142
  const thisWeekStart = startOfWeek(now, {
129
143
  weekStartsOn: 0
130
144
  });
@@ -136,7 +150,7 @@ export function getDateRangeForOption(option, locale = 'he') {
136
150
  to: thisWeekEnd,
137
151
  description: `(${formatDate(thisWeekStart, 'dd/MM')} - ${formatDate(thisWeekEnd, 'dd/MM/yyyy')})`
138
152
  };
139
- case 'nextMonth':
153
+ case 'thisMonth':
140
154
  const thisMonthStart = startOfMonth(now);
141
155
  const thisMonthEnd = endOfMonth(now);
142
156
  return {
@@ -144,6 +158,20 @@ export function getDateRangeForOption(option, locale = 'he') {
144
158
  to: thisMonthEnd,
145
159
  description: `(${formatDate(thisMonthStart, 'MM/yyyy')})`
146
160
  };
161
+ case 'next7Days':
162
+ const next7DaysEnd = endOfDay(addDays(now, 6));
163
+ return {
164
+ from: startOfDay(now),
165
+ to: next7DaysEnd,
166
+ description: `(${formatDate(now, 'dd/MM')} - ${formatDate(next7DaysEnd, 'dd/MM/yyyy')})`
167
+ };
168
+ case 'next30Days':
169
+ const next30DaysEnd = endOfDay(addDays(now, 29));
170
+ return {
171
+ from: startOfDay(now),
172
+ to: next30DaysEnd,
173
+ description: `(${formatDate(now, 'dd/MM')} - ${formatDate(next30DaysEnd, 'dd/MM/yyyy')})`
174
+ };
147
175
  case 'allFuture':
148
176
  return {
149
177
  from: startOfDay(now),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/filters/utils/date-helpers.ts"],"sourcesContent":["// Custom date utilities to replace date-fns\n\nimport { SupportedLocale, getLabel } from '../../labels';\n\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\nexport function subDays(date: Date, days: number): Date {\n return addDays(date, -days);\n}\n\nexport function addWeeks(date: Date, weeks: number): Date {\n return addDays(date, weeks * 7);\n}\n\nexport function subWeeks(date: Date, weeks: number): Date {\n return addWeeks(date, -weeks);\n}\n\nexport function addMonths(date: Date, months: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + months);\n return result;\n}\n\nexport function subMonths(date: Date, months: number): Date {\n return addMonths(date, -months);\n}\n\nexport function startOfDay(date: Date): Date {\n const result = new Date(date);\n result.setHours(0, 0, 0, 0);\n return result;\n}\n\nexport function endOfDay(date: Date): Date {\n const result = new Date(date);\n result.setHours(23, 59, 59, 999);\n return result;\n}\n\nexport function startOfWeek(date: Date, options: { weekStartsOn?: number } = {}): Date {\n const { weekStartsOn = 0 } = options;\n const result = new Date(date);\n const day = result.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n result.setDate(result.getDate() - diff);\n return startOfDay(result);\n}\n\nexport function endOfWeek(date: Date, options: { weekStartsOn?: number } = {}): Date {\n const { weekStartsOn = 0 } = options;\n const result = startOfWeek(date, { weekStartsOn });\n result.setDate(result.getDate() + 6);\n return endOfDay(result);\n}\n\nexport function startOfMonth(date: Date): Date {\n const result = new Date(date);\n result.setDate(1);\n return startOfDay(result);\n}\n\nexport function endOfMonth(date: Date): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + 1, 0);\n return endOfDay(result);\n}\n\nexport function formatDate(date: Date, formatStr: string): string {\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const year = date.getFullYear().toString();\n\n switch (formatStr) {\n case 'dd/MM/yyyy':\n return `${day}/${month}/${year}`;\n case 'dd/MM':\n return `${day}/${month}`;\n case 'MM/yyyy':\n return `${month}/${year}`;\n case 'PPP':\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n default:\n return date.toLocaleDateString();\n }\n}\n\nexport function getDateRangeForOption(\n option: string,\n locale: SupportedLocale = 'he',\n): { from: Date | undefined; to: Date | undefined; description: string } {\n const now = new Date();\n\n switch (option) {\n case 'yesterday':\n const yesterday = subDays(now, 1);\n return {\n from: startOfDay(yesterday),\n to: endOfDay(yesterday),\n description: `(${formatDate(yesterday, 'dd/MM/yyyy')})`,\n };\n\n case 'lastWeek':\n const lastWeekStart = startOfWeek(subWeeks(now, 1), { weekStartsOn: 0 });\n const lastWeekEnd = endOfWeek(subWeeks(now, 1), { weekStartsOn: 0 });\n return {\n from: lastWeekStart,\n to: lastWeekEnd,\n description: `(${formatDate(lastWeekStart, 'dd/MM')} - ${formatDate(lastWeekEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'lastMonth':\n const lastMonthStart = startOfMonth(subMonths(now, 1));\n const lastMonthEnd = endOfMonth(subMonths(now, 1));\n return {\n from: lastMonthStart,\n to: lastMonthEnd,\n description: `(${formatDate(lastMonthStart, 'MM/yyyy')})`,\n };\n\n case 'allPast': {\n const yesterday = subDays(now, 1);\n return {\n from: undefined,\n to: endOfDay(yesterday),\n description: `(${getLabel('allPast', locale)})`,\n };\n }\n\n case 'today':\n return {\n from: startOfDay(now),\n to: endOfDay(now),\n description: `(${formatDate(now, 'dd/MM/yyyy')})`,\n };\n\n case 'nextWeek':\n const thisWeekStart = startOfWeek(now, { weekStartsOn: 0 });\n const thisWeekEnd = endOfWeek(now, { weekStartsOn: 0 });\n return {\n from: thisWeekStart,\n to: thisWeekEnd,\n description: `(${formatDate(thisWeekStart, 'dd/MM')} - ${formatDate(thisWeekEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'nextMonth':\n const thisMonthStart = startOfMonth(now);\n const thisMonthEnd = endOfMonth(now);\n return {\n from: thisMonthStart,\n to: thisMonthEnd,\n description: `(${formatDate(thisMonthStart, 'MM/yyyy')})`,\n };\n\n case 'allFuture':\n return {\n from: startOfDay(now),\n to: undefined,\n description: `(${getLabel('allFuture', locale)})`,\n };\n\n default:\n return {\n from: startOfDay(now),\n to: endOfDay(now),\n description: '',\n };\n }\n}\n"],"names":["getLabel","addDays","date","days","result","Date","setDate","getDate","subDays","addWeeks","weeks","subWeeks","addMonths","months","setMonth","getMonth","subMonths","startOfDay","setHours","endOfDay","startOfWeek","options","weekStartsOn","day","getDay","diff","endOfWeek","startOfMonth","endOfMonth","formatDate","formatStr","toString","padStart","month","year","getFullYear","toLocaleDateString","getDateRangeForOption","option","locale","now","yesterday","from","to","description","lastWeekStart","lastWeekEnd","lastMonthStart","lastMonthEnd","undefined","thisWeekStart","thisWeekEnd","thisMonthStart","thisMonthEnd"],"mappings":"AAAA,4CAA4C;AAE5C,SAA0BA,QAAQ,QAAQ,eAAe;AAEz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AAa,cAAc,CAAC,CAAC;YACnG;QAEF,KAAK;YACH,MAAMC,iBAAiBzB,aAAaa;YACpC,MAAMa,eAAezB,WAAWY;YAChC,OAAO;gBACLE,MAAMU;gBACNT,IAAIU;gBACJT,aAAa,CAAC,CAAC,EAAEf,WAAWuB,gBAAgB,WAAW,CAAC,CAAC;YAC3D;QAEF,KAAK;YACH,OAAO;gBACLV,MAAMzB,WAAWuB;gBACjBG,IAAIM;gBACJL,aAAa,CAAC,CAAC,EAAE5C,SAAS,aAAauC,QAAQ,CAAC,CAAC;YACnD;QAEF;YACE,OAAO;gBACLG,MAAMzB,WAAWuB;gBACjBG,IAAIxB,SAASqB;gBACbI,aAAa;YACf;IACJ;AACF"}
1
+ {"version":3,"sources":["../../../src/filters/utils/date-helpers.ts"],"sourcesContent":["// Custom date utilities to replace date-fns\n\nimport { SupportedLocale, getLabel } from '../../labels';\n\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\nexport function subDays(date: Date, days: number): Date {\n return addDays(date, -days);\n}\n\nexport function addWeeks(date: Date, weeks: number): Date {\n return addDays(date, weeks * 7);\n}\n\nexport function subWeeks(date: Date, weeks: number): Date {\n return addWeeks(date, -weeks);\n}\n\nexport function addMonths(date: Date, months: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + months);\n return result;\n}\n\nexport function subMonths(date: Date, months: number): Date {\n return addMonths(date, -months);\n}\n\nexport function startOfDay(date: Date): Date {\n const result = new Date(date);\n result.setHours(0, 0, 0, 0);\n return result;\n}\n\nexport function endOfDay(date: Date): Date {\n const result = new Date(date);\n result.setHours(23, 59, 59, 999);\n return result;\n}\n\nexport function startOfWeek(date: Date, options: { weekStartsOn?: number } = {}): Date {\n const { weekStartsOn = 0 } = options;\n const result = new Date(date);\n const day = result.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n result.setDate(result.getDate() - diff);\n return startOfDay(result);\n}\n\nexport function endOfWeek(date: Date, options: { weekStartsOn?: number } = {}): Date {\n const { weekStartsOn = 0 } = options;\n const result = startOfWeek(date, { weekStartsOn });\n result.setDate(result.getDate() + 6);\n return endOfDay(result);\n}\n\nexport function startOfMonth(date: Date): Date {\n const result = new Date(date);\n result.setDate(1);\n return startOfDay(result);\n}\n\nexport function endOfMonth(date: Date): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + 1, 0);\n return endOfDay(result);\n}\n\nexport function formatDate(date: Date, formatStr: string): string {\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const year = date.getFullYear().toString();\n\n switch (formatStr) {\n case 'dd/MM/yyyy':\n return `${day}/${month}/${year}`;\n case 'dd/MM':\n return `${day}/${month}`;\n case 'MM/yyyy':\n return `${month}/${year}`;\n case 'PPP':\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n default:\n return date.toLocaleDateString();\n }\n}\n\nexport function getDateRangeForOption(\n option: string,\n locale: SupportedLocale = 'he',\n): { from: Date | undefined; to: Date | undefined; description: string } {\n const now = new Date();\n\n switch (option) {\n case 'yesterday':\n const yesterday = subDays(now, 1);\n return {\n from: startOfDay(yesterday),\n to: endOfDay(yesterday),\n description: `(${formatDate(yesterday, 'dd/MM/yyyy')})`,\n };\n\n case 'lastWeek':\n const lastWeekStart = startOfWeek(subWeeks(now, 1), { weekStartsOn: 0 });\n const lastWeekEnd = endOfWeek(subWeeks(now, 1), { weekStartsOn: 0 });\n return {\n from: lastWeekStart,\n to: lastWeekEnd,\n description: `(${formatDate(lastWeekStart, 'dd/MM')} - ${formatDate(lastWeekEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'lastMonth':\n const lastMonthStart = startOfMonth(subMonths(now, 1));\n const lastMonthEnd = endOfMonth(subMonths(now, 1));\n return {\n from: lastMonthStart,\n to: lastMonthEnd,\n description: `(${formatDate(lastMonthStart, 'MM/yyyy')})`,\n };\n\n case 'last7Days':\n const last7DaysStart = startOfDay(subDays(now, 6));\n return {\n from: last7DaysStart,\n to: endOfDay(now),\n description: `(${formatDate(last7DaysStart, 'dd/MM')} - ${formatDate(now, 'dd/MM/yyyy')})`,\n };\n\n case 'last30Days':\n const last30DaysStart = startOfDay(subDays(now, 29));\n return {\n from: last30DaysStart,\n to: endOfDay(now),\n description: `(${formatDate(last30DaysStart, 'dd/MM')} - ${formatDate(now, 'dd/MM/yyyy')})`,\n };\n\n case 'allPast': {\n const yesterday = subDays(now, 1);\n return {\n from: undefined,\n to: endOfDay(yesterday),\n description: `(${getLabel('allPast', locale)})`,\n };\n }\n\n case 'today':\n return {\n from: startOfDay(now),\n to: endOfDay(now),\n description: `(${formatDate(now, 'dd/MM/yyyy')})`,\n };\n\n case 'thisWeek':\n const thisWeekStart = startOfWeek(now, { weekStartsOn: 0 });\n const thisWeekEnd = endOfWeek(now, { weekStartsOn: 0 });\n return {\n from: thisWeekStart,\n to: thisWeekEnd,\n description: `(${formatDate(thisWeekStart, 'dd/MM')} - ${formatDate(thisWeekEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'thisMonth':\n const thisMonthStart = startOfMonth(now);\n const thisMonthEnd = endOfMonth(now);\n return {\n from: thisMonthStart,\n to: thisMonthEnd,\n description: `(${formatDate(thisMonthStart, 'MM/yyyy')})`,\n };\n\n case 'next7Days':\n const next7DaysEnd = endOfDay(addDays(now, 6));\n return {\n from: startOfDay(now),\n to: next7DaysEnd,\n description: `(${formatDate(now, 'dd/MM')} - ${formatDate(next7DaysEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'next30Days':\n const next30DaysEnd = endOfDay(addDays(now, 29));\n return {\n from: startOfDay(now),\n to: next30DaysEnd,\n description: `(${formatDate(now, 'dd/MM')} - ${formatDate(next30DaysEnd, 'dd/MM/yyyy')})`,\n };\n\n case 'allFuture':\n return {\n from: startOfDay(now),\n to: undefined,\n description: `(${getLabel('allFuture', locale)})`,\n };\n\n default:\n return {\n from: startOfDay(now),\n to: endOfDay(now),\n description: '',\n };\n }\n}\n"],"names":["getLabel","addDays","date","days","result","Date","setDate","getDate","subDays","addWeeks","weeks","subWeeks","addMonths","months","setMonth","getMonth","subMonths","startOfDay","setHours","endOfDay","startOfWeek","options","weekStartsOn","day","getDay","diff","endOfWeek","startOfMonth","endOfMonth","formatDate","formatStr","toString","padStart","month","year","getFullYear","toLocaleDateString","getDateRangeForOption","option","locale","now","yesterday","from","to","description","lastWeekStart","lastWeekEnd","lastMonthStart","lastMonthEnd","last7DaysStart","last30DaysStart","undefined","thisWeekStart","thisWeekEnd","thisMonthStart","thisMonthEnd","next7DaysEnd","next30DaysEnd"],"mappings":"AAAA,4CAA4C;AAE5C,SAA0BA,QAAQ,QAAQ,eAAe;AAEzD,OAAO,SAASC,QAAQC,IAAU,EAAEC,IAAY;IAC9C,MAAMC,SAAS,IAAIC,KAAKH;IACxBE,OAAOE,OAAO,CAACF,OAAOG,OAAO,KAAKJ;IAClC,OAAOC;AACT;AAEA,OAAO,SAASI,QAAQN,IAAU,EAAEC,IAAY;IAC9C,OAAOF,QAAQC,MAAM,CAACC;AACxB;AAEA,OAAO,SAASM,SAASP,IAAU,EAAEQ,KAAa;IAChD,OAAOT,QAAQC,MAAMQ,QAAQ;AAC/B;AAEA,OAAO,SAASC,SAAST,IAAU,EAAEQ,KAAa;IAChD,OAAOD,SAASP,MAAM,CAACQ;AACzB;AAEA,OAAO,SAASE,UAAUV,IAAU,EAAEW,MAAc;IAClD,MAAMT,SAAS,IAAIC,KAAKH;IACxBE,OAAOU,QAAQ,CAACV,OAAOW,QAAQ,KAAKF;IACpC,OAAOT;AACT;AAEA,OAAO,SAASY,UAAUd,IAAU,EAAEW,MAAc;IAClD,OAAOD,UAAUV,MAAM,CAACW;AAC1B;AAEA,OAAO,SAASI,WAAWf,IAAU;IACnC,MAAME,SAAS,IAAIC,KAAKH;IACxBE,OAAOc,QAAQ,CAAC,GAAG,GAAG,GAAG;IACzB,OAAOd;AACT;AAEA,OAA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AAC,CAAC,EAAEf,WAAWW,KAAK,SAAS,GAAG,EAAEX,WAAW2B,cAAc,cAAc,CAAC,CAAC;YAC1F;QAEF,KAAK;YACH,MAAMC,gBAAgBtC,SAASlB,QAAQuC,KAAK;YAC5C,OAAO;gBACLE,MAAMzB,WAAWuB;gBACjBG,IAAIc;gBACJb,aAAa,CAAC,CAAC,EAAEf,WAAWW,KAAK,SAAS,GAAG,EAAEX,WAAW4B,eAAe,cAAc,CAAC,CAAC;YAC3F;QAEF,KAAK;YACH,OAAO;gBACLf,MAAMzB,WAAWuB;gBACjBG,IAAIQ;gBACJP,aAAa,CAAC,CAAC,EAAE5C,SAAS,aAAauC,QAAQ,CAAC,CAAC;YACnD;QAEF;YACE,OAAO;gBACLG,MAAMzB,WAAWuB;gBACjBG,IAAIxB,SAASqB;gBACbI,aAAa;YACf;IACJ;AACF"}
package/dist/labels.d.ts CHANGED
@@ -15,16 +15,21 @@ export declare const PLUGIN_LABELS: {
15
15
  readonly selectDate: "Select Date";
16
16
  readonly past: "Past";
17
17
  readonly future: "Future";
18
+ readonly presentFuture: "Present & Future";
18
19
  readonly customRange: "Custom Range";
19
20
  readonly apply: "Apply";
20
21
  readonly cancel: "Cancel";
21
22
  readonly yesterday: "Yesterday";
22
23
  readonly lastWeek: "Last Week";
23
24
  readonly lastMonth: "Last Month";
25
+ readonly last7Days: "Last 7 Days";
26
+ readonly last30Days: "Last 30 Days";
24
27
  readonly allPast: "All Past";
25
28
  readonly today: "Today";
26
- readonly nextWeek: "Next Week";
27
- readonly nextMonth: "Next Month";
29
+ readonly thisWeek: "This Week";
30
+ readonly thisMonth: "This Month";
31
+ readonly next7Days: "Next 7 Days";
32
+ readonly next30Days: "Next 30 Days";
28
33
  readonly allFuture: "All Future";
29
34
  };
30
35
  readonly ar: {
@@ -42,16 +47,21 @@ export declare const PLUGIN_LABELS: {
42
47
  readonly selectDate: "اختر التاريخ";
43
48
  readonly past: "الماضي";
44
49
  readonly future: "المستقبل";
50
+ readonly presentFuture: "الحاضر والمستقبل";
45
51
  readonly customRange: "نطاق مخصص";
46
52
  readonly apply: "تطبيق";
47
53
  readonly cancel: "إلغاء";
48
54
  readonly yesterday: "أمس";
49
55
  readonly lastWeek: "الأسبوع الماضي";
50
56
  readonly lastMonth: "الشهر الماضي";
57
+ readonly last7Days: "آخر 7 أيام";
58
+ readonly last30Days: "آخر 30 يومًا";
51
59
  readonly allPast: "كل الماضي";
52
60
  readonly today: "اليوم";
53
- readonly nextWeek: "الأسبوع القادم";
54
- readonly nextMonth: "الشهر القادم";
61
+ readonly thisWeek: "هذا الأسبوع";
62
+ readonly thisMonth: "هذا الشهر";
63
+ readonly next7Days: "الـ 7 أيام القادمة";
64
+ readonly next30Days: "الـ 30 يومًا القادمة";
55
65
  readonly allFuture: "كل المستقبل";
56
66
  };
57
67
  readonly fr: {
@@ -69,16 +79,21 @@ export declare const PLUGIN_LABELS: {
69
79
  readonly selectDate: "Sélectionner une date";
70
80
  readonly past: "Passé";
71
81
  readonly future: "Futur";
82
+ readonly presentFuture: "Présent & Futur";
72
83
  readonly customRange: "Plage personnalisée";
73
84
  readonly apply: "Appliquer";
74
85
  readonly cancel: "Annuler";
75
86
  readonly yesterday: "Hier";
76
87
  readonly lastWeek: "Semaine dernière";
77
88
  readonly lastMonth: "Mois dernier";
89
+ readonly last7Days: "7 derniers jours";
90
+ readonly last30Days: "30 derniers jours";
78
91
  readonly allPast: "Tout le passé";
79
92
  readonly today: "Aujourd’hui";
80
- readonly nextWeek: "Semaine prochaine";
81
- readonly nextMonth: "Mois prochain";
93
+ readonly thisWeek: "Cette semaine";
94
+ readonly thisMonth: "Ce mois";
95
+ readonly next7Days: "7 prochains jours";
96
+ readonly next30Days: "30 prochains jours";
82
97
  readonly allFuture: "Tout le futur";
83
98
  };
84
99
  readonly es: {
@@ -96,16 +111,21 @@ export declare const PLUGIN_LABELS: {
96
111
  readonly selectDate: "Seleccionar fecha";
97
112
  readonly past: "Pasado";
98
113
  readonly future: "Futuro";
114
+ readonly presentFuture: "Presente & Futuro";
99
115
  readonly customRange: "Rango personalizado";
100
116
  readonly apply: "Aplicar";
101
117
  readonly cancel: "Cancelar";
102
118
  readonly yesterday: "Ayer";
103
119
  readonly lastWeek: "Semana pasada";
104
120
  readonly lastMonth: "Mes pasado";
121
+ readonly last7Days: "Últimos 7 días";
122
+ readonly last30Days: "Últimos 30 días";
105
123
  readonly allPast: "Todo el pasado";
106
124
  readonly today: "Hoy";
107
- readonly nextWeek: "Próxima semana";
108
- readonly nextMonth: "Próximo mes";
125
+ readonly thisWeek: "Esta semana";
126
+ readonly thisMonth: "Este mes";
127
+ readonly next7Days: "Próximos 7 días";
128
+ readonly next30Days: "Próximos 30 días";
109
129
  readonly allFuture: "Todo el futuro";
110
130
  };
111
131
  readonly zh: {
@@ -123,16 +143,21 @@ export declare const PLUGIN_LABELS: {
123
143
  readonly selectDate: "选择日期";
124
144
  readonly past: "过去";
125
145
  readonly future: "未来";
146
+ readonly presentFuture: "现在和未来";
126
147
  readonly customRange: "自定义范围";
127
148
  readonly apply: "应用";
128
149
  readonly cancel: "取消";
129
150
  readonly yesterday: "昨天";
130
151
  readonly lastWeek: "上周";
131
152
  readonly lastMonth: "上个月";
153
+ readonly last7Days: "过去7天";
154
+ readonly last30Days: "过去30天";
132
155
  readonly allPast: "所有过去";
133
156
  readonly today: "今天";
134
- readonly nextWeek: "下周";
135
- readonly nextMonth: "下个月";
157
+ readonly thisWeek: "本周";
158
+ readonly thisMonth: "本月";
159
+ readonly next7Days: "未来7天";
160
+ readonly next30Days: "未来30天";
136
161
  readonly allFuture: "所有未来";
137
162
  };
138
163
  readonly he: {
@@ -150,16 +175,21 @@ export declare const PLUGIN_LABELS: {
150
175
  readonly selectDate: "בחר תאריך";
151
176
  readonly past: "עבר";
152
177
  readonly future: "עתיד";
178
+ readonly presentFuture: "הווה ועתיד";
153
179
  readonly customRange: "טווח מותאם אישית";
154
180
  readonly apply: "החל";
155
181
  readonly cancel: "ביטול";
156
182
  readonly yesterday: "אתמול";
157
183
  readonly lastWeek: "שבוע שעבר";
158
184
  readonly lastMonth: "חודש שעבר";
185
+ readonly last7Days: "7 ימים אחרונים";
186
+ readonly last30Days: "30 ימים אחרונים";
159
187
  readonly allPast: "בעבר";
160
188
  readonly today: "היום";
161
- readonly nextWeek: "השבוע הבא";
162
- readonly nextMonth: "החודש הבא";
189
+ readonly thisWeek: "השבוע";
190
+ readonly thisMonth: "החודש";
191
+ readonly next7Days: "7 ימים הבאים";
192
+ readonly next30Days: "30 ימים הבאים";
163
193
  readonly allFuture: "בעתיד";
164
194
  };
165
195
  };
@@ -180,16 +210,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
180
210
  readonly selectDate: "Select Date";
181
211
  readonly past: "Past";
182
212
  readonly future: "Future";
213
+ readonly presentFuture: "Present & Future";
183
214
  readonly customRange: "Custom Range";
184
215
  readonly apply: "Apply";
185
216
  readonly cancel: "Cancel";
186
217
  readonly yesterday: "Yesterday";
187
218
  readonly lastWeek: "Last Week";
188
219
  readonly lastMonth: "Last Month";
220
+ readonly last7Days: "Last 7 Days";
221
+ readonly last30Days: "Last 30 Days";
189
222
  readonly allPast: "All Past";
190
223
  readonly today: "Today";
191
- readonly nextWeek: "Next Week";
192
- readonly nextMonth: "Next Month";
224
+ readonly thisWeek: "This Week";
225
+ readonly thisMonth: "This Month";
226
+ readonly next7Days: "Next 7 Days";
227
+ readonly next30Days: "Next 30 Days";
193
228
  readonly allFuture: "All Future";
194
229
  } | {
195
230
  readonly quickFilters: "فلاتر سريعة";
@@ -206,16 +241,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
206
241
  readonly selectDate: "اختر التاريخ";
207
242
  readonly past: "الماضي";
208
243
  readonly future: "المستقبل";
244
+ readonly presentFuture: "الحاضر والمستقبل";
209
245
  readonly customRange: "نطاق مخصص";
210
246
  readonly apply: "تطبيق";
211
247
  readonly cancel: "إلغاء";
212
248
  readonly yesterday: "أمس";
213
249
  readonly lastWeek: "الأسبوع الماضي";
214
250
  readonly lastMonth: "الشهر الماضي";
251
+ readonly last7Days: "آخر 7 أيام";
252
+ readonly last30Days: "آخر 30 يومًا";
215
253
  readonly allPast: "كل الماضي";
216
254
  readonly today: "اليوم";
217
- readonly nextWeek: "الأسبوع القادم";
218
- readonly nextMonth: "الشهر القادم";
255
+ readonly thisWeek: "هذا الأسبوع";
256
+ readonly thisMonth: "هذا الشهر";
257
+ readonly next7Days: "الـ 7 أيام القادمة";
258
+ readonly next30Days: "الـ 30 يومًا القادمة";
219
259
  readonly allFuture: "كل المستقبل";
220
260
  } | {
221
261
  readonly quickFilters: "Filtres rapides";
@@ -232,16 +272,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
232
272
  readonly selectDate: "Sélectionner une date";
233
273
  readonly past: "Passé";
234
274
  readonly future: "Futur";
275
+ readonly presentFuture: "Présent & Futur";
235
276
  readonly customRange: "Plage personnalisée";
236
277
  readonly apply: "Appliquer";
237
278
  readonly cancel: "Annuler";
238
279
  readonly yesterday: "Hier";
239
280
  readonly lastWeek: "Semaine dernière";
240
281
  readonly lastMonth: "Mois dernier";
282
+ readonly last7Days: "7 derniers jours";
283
+ readonly last30Days: "30 derniers jours";
241
284
  readonly allPast: "Tout le passé";
242
285
  readonly today: "Aujourd’hui";
243
- readonly nextWeek: "Semaine prochaine";
244
- readonly nextMonth: "Mois prochain";
286
+ readonly thisWeek: "Cette semaine";
287
+ readonly thisMonth: "Ce mois";
288
+ readonly next7Days: "7 prochains jours";
289
+ readonly next30Days: "30 prochains jours";
245
290
  readonly allFuture: "Tout le futur";
246
291
  } | {
247
292
  readonly quickFilters: "Filtros rápidos";
@@ -258,16 +303,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
258
303
  readonly selectDate: "Seleccionar fecha";
259
304
  readonly past: "Pasado";
260
305
  readonly future: "Futuro";
306
+ readonly presentFuture: "Presente & Futuro";
261
307
  readonly customRange: "Rango personalizado";
262
308
  readonly apply: "Aplicar";
263
309
  readonly cancel: "Cancelar";
264
310
  readonly yesterday: "Ayer";
265
311
  readonly lastWeek: "Semana pasada";
266
312
  readonly lastMonth: "Mes pasado";
313
+ readonly last7Days: "Últimos 7 días";
314
+ readonly last30Days: "Últimos 30 días";
267
315
  readonly allPast: "Todo el pasado";
268
316
  readonly today: "Hoy";
269
- readonly nextWeek: "Próxima semana";
270
- readonly nextMonth: "Próximo mes";
317
+ readonly thisWeek: "Esta semana";
318
+ readonly thisMonth: "Este mes";
319
+ readonly next7Days: "Próximos 7 días";
320
+ readonly next30Days: "Próximos 30 días";
271
321
  readonly allFuture: "Todo el futuro";
272
322
  } | {
273
323
  readonly quickFilters: "快速筛选";
@@ -284,16 +334,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
284
334
  readonly selectDate: "选择日期";
285
335
  readonly past: "过去";
286
336
  readonly future: "未来";
337
+ readonly presentFuture: "现在和未来";
287
338
  readonly customRange: "自定义范围";
288
339
  readonly apply: "应用";
289
340
  readonly cancel: "取消";
290
341
  readonly yesterday: "昨天";
291
342
  readonly lastWeek: "上周";
292
343
  readonly lastMonth: "上个月";
344
+ readonly last7Days: "过去7天";
345
+ readonly last30Days: "过去30天";
293
346
  readonly allPast: "所有过去";
294
347
  readonly today: "今天";
295
- readonly nextWeek: "下周";
296
- readonly nextMonth: "下个月";
348
+ readonly thisWeek: "本周";
349
+ readonly thisMonth: "本月";
350
+ readonly next7Days: "未来7天";
351
+ readonly next30Days: "未来30天";
297
352
  readonly allFuture: "所有未来";
298
353
  } | {
299
354
  readonly quickFilters: "סינון מהיר";
@@ -310,16 +365,21 @@ export declare const getLabels: (locale?: SupportedLocale) => {
310
365
  readonly selectDate: "בחר תאריך";
311
366
  readonly past: "עבר";
312
367
  readonly future: "עתיד";
368
+ readonly presentFuture: "הווה ועתיד";
313
369
  readonly customRange: "טווח מותאם אישית";
314
370
  readonly apply: "החל";
315
371
  readonly cancel: "ביטול";
316
372
  readonly yesterday: "אתמול";
317
373
  readonly lastWeek: "שבוע שעבר";
318
374
  readonly lastMonth: "חודש שעבר";
375
+ readonly last7Days: "7 ימים אחרונים";
376
+ readonly last30Days: "30 ימים אחרונים";
319
377
  readonly allPast: "בעבר";
320
378
  readonly today: "היום";
321
- readonly nextWeek: "השבוע הבא";
322
- readonly nextMonth: "החודש הבא";
379
+ readonly thisWeek: "השבוע";
380
+ readonly thisMonth: "החודש";
381
+ readonly next7Days: "7 ימים הבאים";
382
+ readonly next30Days: "30 ימים הבאים";
323
383
  readonly allFuture: "בעתיד";
324
384
  };
325
385
  export declare const getLabel: (key: LabelKey, locale?: SupportedLocale) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,UAAuC,CAAC;AAEtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqKhB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,aAAa,CAAC;AACzD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,aAAa,CAAC,EAAE,CAAC;AAGrD,eAAO,MAAM,SAAS,YAAY,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEhD,CAAC;AAGF,eAAO,MAAM,QAAQ,QAAS,QAAQ,WAAU,eAAe,KAAU,MAaxE,CAAC"}
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,UAAuC,CAAC;AAEtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmMhB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,aAAa,CAAC;AACzD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,aAAa,CAAC,EAAE,CAAC;AAGrD,eAAO,MAAM,SAAS,YAAY,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEhD,CAAC;AAGF,eAAO,MAAM,QAAQ,QAAS,QAAQ,WAAU,eAAe,KAAU,MAaxE,CAAC"}
package/dist/labels.js CHANGED
@@ -24,16 +24,21 @@ export const PLUGIN_LABELS = {
24
24
  selectDate: 'Select Date',
25
25
  past: 'Past',
26
26
  future: 'Future',
27
+ presentFuture: 'Present & Future',
27
28
  customRange: 'Custom Range',
28
29
  apply: 'Apply',
29
30
  cancel: 'Cancel',
30
31
  yesterday: 'Yesterday',
31
32
  lastWeek: 'Last Week',
32
33
  lastMonth: 'Last Month',
34
+ last7Days: 'Last 7 Days',
35
+ last30Days: 'Last 30 Days',
33
36
  allPast: 'All Past',
34
37
  today: 'Today',
35
- nextWeek: 'Next Week',
36
- nextMonth: 'Next Month',
38
+ thisWeek: 'This Week',
39
+ thisMonth: 'This Month',
40
+ next7Days: 'Next 7 Days',
41
+ next30Days: 'Next 30 Days',
37
42
  allFuture: 'All Future'
38
43
  },
39
44
  ar: {
@@ -51,16 +56,21 @@ export const PLUGIN_LABELS = {
51
56
  selectDate: 'اختر التاريخ',
52
57
  past: 'الماضي',
53
58
  future: 'المستقبل',
59
+ presentFuture: 'الحاضر والمستقبل',
54
60
  customRange: 'نطاق مخصص',
55
61
  apply: 'تطبيق',
56
62
  cancel: 'إلغاء',
57
63
  yesterday: 'أمس',
58
64
  lastWeek: 'الأسبوع الماضي',
59
65
  lastMonth: 'الشهر الماضي',
66
+ last7Days: 'آخر 7 أيام',
67
+ last30Days: 'آخر 30 يومًا',
60
68
  allPast: 'كل الماضي',
61
69
  today: 'اليوم',
62
- nextWeek: 'الأسبوع القادم',
63
- nextMonth: 'الشهر القادم',
70
+ thisWeek: 'هذا الأسبوع',
71
+ thisMonth: 'هذا الشهر',
72
+ next7Days: 'الـ 7 أيام القادمة',
73
+ next30Days: 'الـ 30 يومًا القادمة',
64
74
  allFuture: 'كل المستقبل'
65
75
  },
66
76
  fr: {
@@ -78,16 +88,21 @@ export const PLUGIN_LABELS = {
78
88
  selectDate: 'Sélectionner une date',
79
89
  past: 'Passé',
80
90
  future: 'Futur',
91
+ presentFuture: 'Présent & Futur',
81
92
  customRange: 'Plage personnalisée',
82
93
  apply: 'Appliquer',
83
94
  cancel: 'Annuler',
84
95
  yesterday: 'Hier',
85
96
  lastWeek: 'Semaine dernière',
86
97
  lastMonth: 'Mois dernier',
98
+ last7Days: '7 derniers jours',
99
+ last30Days: '30 derniers jours',
87
100
  allPast: 'Tout le passé',
88
101
  today: 'Aujourd’hui',
89
- nextWeek: 'Semaine prochaine',
90
- nextMonth: 'Mois prochain',
102
+ thisWeek: 'Cette semaine',
103
+ thisMonth: 'Ce mois',
104
+ next7Days: '7 prochains jours',
105
+ next30Days: '30 prochains jours',
91
106
  allFuture: 'Tout le futur'
92
107
  },
93
108
  es: {
@@ -105,16 +120,21 @@ export const PLUGIN_LABELS = {
105
120
  selectDate: 'Seleccionar fecha',
106
121
  past: 'Pasado',
107
122
  future: 'Futuro',
123
+ presentFuture: 'Presente & Futuro',
108
124
  customRange: 'Rango personalizado',
109
125
  apply: 'Aplicar',
110
126
  cancel: 'Cancelar',
111
127
  yesterday: 'Ayer',
112
128
  lastWeek: 'Semana pasada',
113
129
  lastMonth: 'Mes pasado',
130
+ last7Days: 'Últimos 7 días',
131
+ last30Days: 'Últimos 30 días',
114
132
  allPast: 'Todo el pasado',
115
133
  today: 'Hoy',
116
- nextWeek: 'Próxima semana',
117
- nextMonth: 'Próximo mes',
134
+ thisWeek: 'Esta semana',
135
+ thisMonth: 'Este mes',
136
+ next7Days: 'Próximos 7 días',
137
+ next30Days: 'Próximos 30 días',
118
138
  allFuture: 'Todo el futuro'
119
139
  },
120
140
  zh: {
@@ -132,16 +152,21 @@ export const PLUGIN_LABELS = {
132
152
  selectDate: '选择日期',
133
153
  past: '过去',
134
154
  future: '未来',
155
+ presentFuture: '现在和未来',
135
156
  customRange: '自定义范围',
136
157
  apply: '应用',
137
158
  cancel: '取消',
138
159
  yesterday: '昨天',
139
160
  lastWeek: '上周',
140
161
  lastMonth: '上个月',
162
+ last7Days: '过去7天',
163
+ last30Days: '过去30天',
141
164
  allPast: '所有过去',
142
165
  today: '今天',
143
- nextWeek: '下周',
144
- nextMonth: '下个月',
166
+ thisWeek: '本周',
167
+ thisMonth: '本月',
168
+ next7Days: '未来7天',
169
+ next30Days: '未来30天',
145
170
  allFuture: '所有未来'
146
171
  },
147
172
  he: {
@@ -159,16 +184,21 @@ export const PLUGIN_LABELS = {
159
184
  selectDate: 'בחר תאריך',
160
185
  past: 'עבר',
161
186
  future: 'עתיד',
187
+ presentFuture: 'הווה ועתיד',
162
188
  customRange: 'טווח מותאם אישית',
163
189
  apply: 'החל',
164
190
  cancel: 'ביטול',
165
191
  yesterday: 'אתמול',
166
192
  lastWeek: 'שבוע שעבר',
167
193
  lastMonth: 'חודש שעבר',
194
+ last7Days: '7 ימים אחרונים',
195
+ last30Days: '30 ימים אחרונים',
168
196
  allPast: 'בעבר',
169
197
  today: 'היום',
170
- nextWeek: 'השבוע הבא',
171
- nextMonth: 'החודש הבא',
198
+ thisWeek: 'השבוע',
199
+ thisMonth: 'החודש',
200
+ next7Days: '7 ימים הבאים',
201
+ next30Days: '30 ימים הבאים',
172
202
  allFuture: 'בעתיד'
173
203
  }
174
204
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/labels.ts"],"sourcesContent":["// Centralized labels for the quickfilter plugin\n\n// List of all accepted languages in the system - only those defined in PLUGIN_LABELS\nexport const acceptedLanguages = ['ar', 'en', 'es', 'fr', 'he', 'zh'];\n\nexport const PLUGIN_LABELS = {\n en: {\n quickFilters: 'Quick Filters',\n clearFilters: 'Clear Filters',\n activeFilterSingular: 'Active filter on column',\n activeFilterPlural: 'Active filters on columns',\n custom: 'Custom',\n all: 'All',\n yes: 'Yes',\n no: 'No',\n selectOption: 'Select Option',\n from: 'From',\n to: 'To',\n selectDate: 'Select Date',\n past: 'Past',\n future: 'Future',\n customRange: 'Custom Range',\n apply: 'Apply',\n cancel: 'Cancel',\n yesterday: 'Yesterday',\n lastWeek: 'Last Week',\n lastMonth: 'Last Month',\n allPast: 'All Past',\n today: 'Today',\n nextWeek: 'Next Week', // Corrected from 'This Week'\n nextMonth: 'Next Month', // Corrected from 'This Month'\n allFuture: 'All Future',\n },\n ar: {\n quickFilters: 'فلاتر سريعة',\n clearFilters: 'مسح الفلاتر',\n activeFilterSingular: 'فلتر نشط على العمود',\n activeFilterPlural: 'فلاتر نشطة على الأعمدة',\n custom: 'مخصص',\n all: 'الكل',\n yes: 'نعم',\n no: 'لا',\n selectOption: 'اختر خيارًا',\n from: 'من',\n to: 'إلى',\n selectDate: 'اختر التاريخ',\n past: 'الماضي',\n future: 'المستقبل',\n customRange: 'نطاق مخصص',\n apply: 'تطبيق',\n cancel: 'إلغاء',\n yesterday: 'أمس',\n lastWeek: 'الأسبوع الماضي',\n lastMonth: 'الشهر الماضي',\n allPast: 'كل الماضي',\n today: 'اليوم',\n nextWeek: 'الأسبوع القادم',\n nextMonth: 'الشهر القادم',\n allFuture: 'كل المستقبل',\n },\n fr: {\n quickFilters: 'Filtres rapides',\n clearFilters: 'Effacer les filtres',\n activeFilterSingular: 'Filtre actif sur la colonne',\n activeFilterPlural: 'Filtres actifs sur les colonnes',\n custom: 'Personnalisé',\n all: 'Tous',\n yes: 'Oui',\n no: 'Non',\n selectOption: 'Sélectionner une option',\n from: 'De',\n to: 'À',\n selectDate: 'Sélectionner une date',\n past: 'Passé',\n future: 'Futur',\n customRange: 'Plage personnalisée',\n apply: 'Appliquer',\n cancel: 'Annuler',\n yesterday: 'Hier',\n lastWeek: 'Semaine dernière',\n lastMonth: 'Mois dernier',\n allPast: 'Tout le passé',\n today: 'Aujourd’hui',\n nextWeek: 'Semaine prochaine',\n nextMonth: 'Mois prochain',\n allFuture: 'Tout le futur',\n },\n es: {\n quickFilters: 'Filtros rápidos',\n clearFilters: 'Borrar filtros',\n activeFilterSingular: 'Filtro activo en la columna',\n activeFilterPlural: 'Filtros activos en las columnas',\n custom: 'Personalizado',\n all: 'Todos',\n yes: 'Sí',\n no: 'No',\n selectOption: 'Seleccionar opción',\n from: 'Desde',\n to: 'Hasta',\n selectDate: 'Seleccionar fecha',\n past: 'Pasado',\n future: 'Futuro',\n customRange: 'Rango personalizado',\n apply: 'Aplicar',\n cancel: 'Cancelar',\n yesterday: 'Ayer',\n lastWeek: 'Semana pasada',\n lastMonth: 'Mes pasado',\n allPast: 'Todo el pasado',\n today: 'Hoy',\n nextWeek: 'Próxima semana',\n nextMonth: 'Próximo mes',\n allFuture: 'Todo el futuro',\n },\n zh: {\n quickFilters: '快速筛选',\n clearFilters: '清除筛选',\n activeFilterSingular: '列上激活的筛选',\n activeFilterPlural: '多列上激活的筛选',\n custom: '自定义',\n all: '全部',\n yes: '是',\n no: '否',\n selectOption: '选择选项',\n from: '从',\n to: '到',\n selectDate: '选择日期',\n past: '过去',\n future: '未来',\n customRange: '自定义范围',\n apply: '应用',\n cancel: '取消',\n yesterday: '昨天',\n lastWeek: '上周',\n lastMonth: '上个月',\n allPast: '所有过去',\n today: '今天',\n nextWeek: '下周',\n nextMonth: '下个月',\n allFuture: '所有未来',\n },\n he: {\n quickFilters: 'סינון מהיר',\n clearFilters: 'נקה סינון',\n activeFilterSingular: 'סינון פעיל בעמודה',\n activeFilterPlural: 'סינון פעיל בעמודות',\n custom: 'מותאם אישית',\n all: 'הכל',\n yes: 'כן',\n no: 'לא',\n selectOption: 'בחר אפשרות',\n from: 'מתאריך',\n to: 'עד תאריך',\n selectDate: 'בחר תאריך',\n past: 'עבר',\n future: 'עתיד',\n customRange: 'טווח מותאם אישית',\n apply: 'החל',\n cancel: 'ביטול',\n yesterday: 'אתמול',\n lastWeek: 'שבוע שעבר',\n lastMonth: 'חודש שעבר',\n allPast: 'בעבר',\n today: 'היום',\n nextWeek: 'השבוע הבא', // Corrected from 'השבוע'\n nextMonth: 'החודש הבא', // Corrected from 'החודש'\n allFuture: 'בעתיד',\n },\n // Placeholder for other languages (az, bg, bn-BD, etc.)\n // These can be structured similarly with proper translations\n} as const;\nexport type SupportedLocale = keyof typeof PLUGIN_LABELS;\nexport type LabelKey = keyof typeof PLUGIN_LABELS.en;\n\n// Helper function to get labels for a specific locale\nexport const getLabels = (locale: SupportedLocale = 'en') => {\n return PLUGIN_LABELS[locale] || PLUGIN_LABELS.en;\n};\n\n// Helper function to get a specific label\nexport const getLabel = (key: LabelKey, locale: SupportedLocale = 'en'): string => {\n const labels = getLabels(locale);\n const value = labels[key as keyof typeof labels];\n\n if (typeof value === 'string') {\n return value;\n }\n\n // Fallback to English if not found\n const fallbackLabels = getLabels('en');\n const fallbackValue = fallbackLabels[key];\n\n return typeof fallbackValue === 'string' ? fallbackValue : String(key);\n};\n"],"names":["acceptedLanguages","PLUGIN_LABELS","en","quickFilters","clearFilters","activeFilterSingular","activeFilterPlural","custom","all","yes","no","selectOption","from","to","selectDate","past","future","customRange","apply","cancel","yesterday","lastWeek","lastMonth","allPast","today","nextWeek","nextMonth","allFuture","ar","fr","es","zh","he","getLabels","locale","getLabel","key","labels","value","fallbackLabels","fallbackValue","String"],"mappings":"AAAA,gDAAgD;AAEhD,qFAAqF;AACrF,OAAO,MAAMA,oBAAoB;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM;CAAK,CAAC;AAEtE,OAAO,MAAMC,gBAAgB;IAC3BC,IAAI;QACFC,cAAc;QACdC,cAAc;QACdC,sBAAsB;QACtBC,oBAAoB;QACpBC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,IAAI;QACJC,cAAc;QACdC,MAAM;QACNC,IAAI;QACJC,YAAY;QACZC,MAAM;QACNC,QAAQ;QACRC,aAAa;QACbC,OAAO;QACPC,QAAQ;QACRC,WAAW;QACXC,UAAU;QACVC,WAAW;QACXC,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,WAAW;QACXC,WAAW;IACb;IACAC,IAAI;QACFzB,cAAc;QACdC,cAAc;QACdC,sBAAsB;QACtBC,oBAAoB;QACpBC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,IAAI;QACJC,cAAc;QACdC,MAAM;QACNC,IAAI;QACJC,YAAY;QACZC,MAAM;QACNC,QAAQ;QACRC,aAAa;QACbC,OAAO;QACPC,QAAQ;QACRC,WAAW;QACXC,UAAU;QACVC,WAAW;QACXC,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,WAAW;QACXC,WAAW;IACb;IACAE,IAAI;QACF1B,cAAc;QACdC,cAAc;QACdC,sBAAsB;QACtBC,oBAAoB;QACpBC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,IAAI;QACJC,cAAc;QACdC,MAAM;QACNC,IAAI;QACJC,YAAY;QACZC,MAAM;QACNC,QAAQ;QACRC,aAAa;QACbC,OAAO;QACPC,QAAQ;QACRC,WAAW;QACXC,UAAU;QACVC,WAAW;QACXC,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,WAAW;QACX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AUC;IACzB,MAAMI,QAAQD,MAAM,CAACD,IAA2B;IAEhD,IAAI,OAAOE,UAAU,UAAU;QAC7B,OAAOA;IACT;IAEA,mCAAmC;IACnC,MAAMC,iBAAiBN,UAAU;IACjC,MAAMO,gBAAgBD,cAAc,CAACH,IAAI;IAEzC,OAAO,OAAOI,kBAAkB,WAAWA,gBAAgBC,OAAOL;AACpE,EAAE"}
1
+ {"version":3,"sources":["../src/labels.ts"],"sourcesContent":["// Centralized labels for the quickfilter plugin\n\n// List of all accepted languages in the system - only those defined in PLUGIN_LABELS\nexport const acceptedLanguages = ['ar', 'en', 'es', 'fr', 'he', 'zh'];\n\nexport const PLUGIN_LABELS = {\n en: {\n quickFilters: 'Quick Filters',\n clearFilters: 'Clear Filters',\n activeFilterSingular: 'Active filter on column',\n activeFilterPlural: 'Active filters on columns',\n custom: 'Custom',\n all: 'All',\n yes: 'Yes',\n no: 'No',\n selectOption: 'Select Option',\n from: 'From',\n to: 'To',\n selectDate: 'Select Date',\n past: 'Past',\n future: 'Future',\n presentFuture: 'Present & Future',\n customRange: 'Custom Range',\n apply: 'Apply',\n cancel: 'Cancel',\n yesterday: 'Yesterday',\n lastWeek: 'Last Week',\n lastMonth: 'Last Month',\n last7Days: 'Last 7 Days',\n last30Days: 'Last 30 Days',\n allPast: 'All Past',\n today: 'Today',\n thisWeek: 'This Week',\n thisMonth: 'This Month',\n next7Days: 'Next 7 Days',\n next30Days: 'Next 30 Days',\n allFuture: 'All Future',\n },\n ar: {\n quickFilters: 'فلاتر سريعة',\n clearFilters: 'مسح الفلاتر',\n activeFilterSingular: 'فلتر نشط على العمود',\n activeFilterPlural: 'فلاتر نشطة على الأعمدة',\n custom: 'مخصص',\n all: 'الكل',\n yes: 'نعم',\n no: 'لا',\n selectOption: 'اختر خيارًا',\n from: 'من',\n to: 'إلى',\n selectDate: 'اختر التاريخ',\n past: 'الماضي',\n future: 'المستقبل',\n presentFuture: 'الحاضر والمستقبل',\n customRange: 'نطاق مخصص',\n apply: 'تطبيق',\n cancel: 'إلغاء',\n yesterday: 'أمس',\n lastWeek: 'الأسبوع الماضي',\n lastMonth: 'الشهر الماضي',\n last7Days: 'آخر 7 أيام',\n last30Days: 'آخر 30 يومًا',\n allPast: 'كل الماضي',\n today: 'اليوم',\n thisWeek: 'هذا الأسبوع',\n thisMonth: 'هذا الشهر',\n next7Days: 'الـ 7 أيام القادمة',\n next30Days: 'الـ 30 يومًا القادمة',\n allFuture: 'كل المستقبل',\n },\n fr: {\n quickFilters: 'Filtres rapides',\n clearFilters: 'Effacer les filtres',\n activeFilterSingular: 'Filtre actif sur la colonne',\n activeFilterPlural: 'Filtres actifs sur les colonnes',\n custom: 'Personnalisé',\n all: 'Tous',\n yes: 'Oui',\n no: 'Non',\n selectOption: 'Sélectionner une option',\n from: 'De',\n to: 'À',\n selectDate: 'Sélectionner une date',\n past: 'Passé',\n future: 'Futur',\n presentFuture: 'Présent & Futur',\n customRange: 'Plage personnalisée',\n apply: 'Appliquer',\n cancel: 'Annuler',\n yesterday: 'Hier',\n lastWeek: 'Semaine dernière',\n lastMonth: 'Mois dernier',\n last7Days: '7 derniers jours',\n last30Days: '30 derniers jours',\n allPast: 'Tout le passé',\n today: 'Aujourd’hui',\n thisWeek: 'Cette semaine',\n thisMonth: 'Ce mois',\n next7Days: '7 prochains jours',\n next30Days: '30 prochains jours',\n allFuture: 'Tout le futur',\n },\n es: {\n quickFilters: 'Filtros rápidos',\n clearFilters: 'Borrar filtros',\n activeFilterSingular: 'Filtro activo en la columna',\n activeFilterPlural: 'Filtros activos en las columnas',\n custom: 'Personalizado',\n all: 'Todos',\n yes: 'Sí',\n no: 'No',\n selectOption: 'Seleccionar opción',\n from: 'Desde',\n to: 'Hasta',\n selectDate: 'Seleccionar fecha',\n past: 'Pasado',\n future: 'Futuro',\n presentFuture: 'Presente & Futuro',\n customRange: 'Rango personalizado',\n apply: 'Aplicar',\n cancel: 'Cancelar',\n yesterday: 'Ayer',\n lastWeek: 'Semana pasada',\n lastMonth: 'Mes pasado',\n last7Days: 'Últimos 7 días',\n last30Days: 'Últimos 30 días',\n allPast: 'Todo el pasado',\n today: 'Hoy',\n thisWeek: 'Esta semana',\n thisMonth: 'Este mes',\n next7Days: 'Próximos 7 días',\n next30Days: 'Próximos 30 días',\n allFuture: 'Todo el futuro',\n },\n zh: {\n quickFilters: '快速筛选',\n clearFilters: '清除筛选',\n activeFilterSingular: '列上激活的筛选',\n activeFilterPlural: '多列上激活的筛选',\n custom: '自定义',\n all: '全部',\n yes: '是',\n no: '否',\n selectOption: '选择选项',\n from: '从',\n to: '到',\n selectDate: '选择日期',\n past: '过去',\n future: '未来',\n presentFuture: '现在和未来',\n customRange: '自定义范围',\n apply: '应用',\n cancel: '取消',\n yesterday: '昨天',\n lastWeek: '上周',\n lastMonth: '上个月',\n last7Days: '过去7天',\n last30Days: '过去30天',\n allPast: '所有过去',\n today: '今天',\n thisWeek: '本周',\n thisMonth: '本月',\n next7Days: '未来7天',\n next30Days: '未来30天',\n allFuture: '所有未来',\n },\n he: {\n quickFilters: 'סינון מהיר',\n clearFilters: 'נקה סינון',\n activeFilterSingular: 'סינון פעיל בעמודה',\n activeFilterPlural: 'סינון פעיל בעמודות',\n custom: 'מותאם אישית',\n all: 'הכל',\n yes: 'כן',\n no: 'לא',\n selectOption: 'בחר אפשרות',\n from: 'מתאריך',\n to: 'עד תאריך',\n selectDate: 'בחר תאריך',\n past: 'עבר',\n future: 'עתיד',\n presentFuture: 'הווה ועתיד',\n customRange: 'טווח מותאם אישית',\n apply: 'החל',\n cancel: 'ביטול',\n yesterday: 'אתמול',\n lastWeek: 'שבוע שעבר',\n lastMonth: 'חודש שעבר',\n last7Days: '7 ימים אחרונים',\n last30Days: '30 ימים אחרונים',\n allPast: 'בעבר',\n today: 'היום',\n thisWeek: 'השבוע',\n thisMonth: 'החודש',\n next7Days: '7 ימים הבאים',\n next30Days: '30 ימים הבאים',\n allFuture: 'בעתיד',\n },\n // Placeholder for other languages (az, bg, bn-BD, etc.)\n // These can be structured similarly with proper translations\n} as const;\nexport type SupportedLocale = keyof typeof PLUGIN_LABELS;\nexport type LabelKey = keyof typeof PLUGIN_LABELS.en;\n\n// Helper function to get labels for a specific locale\nexport const getLabels = (locale: SupportedLocale = 'en') => {\n return PLUGIN_LABELS[locale] || PLUGIN_LABELS.en;\n};\n\n// Helper function to get a specific label\nexport const getLabel = (key: LabelKey, locale: SupportedLocale = 'en'): string => {\n const labels = getLabels(locale);\n const value = labels[key as keyof typeof labels];\n\n if (typeof value === 'string') {\n return value;\n }\n\n // Fallback to English if not found\n const fallbackLabels = getLabels('en');\n const fallbackValue = fallbackLabels[key];\n\n return typeof fallbackValue === 'string' ? fallbackValue : String(key);\n};\n"],"names":["acceptedLanguages","PLUGIN_LABELS","en","quickFilters","clearFilters","activeFilterSingular","activeFilterPlural","custom","all","yes","no","selectOption","from","to","selectDate","past","future","presentFuture","customRange","apply","cancel","yesterday","lastWeek","lastMonth","last7Days","last30Days","allPast","today","thisWeek","thisMonth","next7Days","next30Days","allFuture","ar","fr","es","zh","he","getLabels","locale","getLabel","key","labels","value","fallbackLabels","fallbackValue","String"],"mappings":"AAAA,gDAAgD;AAEhD,qFAAqF;AACrF,OAAO,MAAMA,oBAAoB;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM;CAAK,CAAC;AAEtE,OAAO,MAAMC,gBAAgB;IAC3BC,IAAI;QACFC,cAAc;QACdC,cAAc;QACdC,sBAAsB;QACtBC,oBAAoB;QACpBC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,IAAI;QACJC,cAAc;QACdC,MAAM;QACNC,IAAI;QACJC,YAAY;QACZC,MAAM;QACNC,QAAQ;QACRC,eAAe;QACfC,aAAa;QACbC,OAAO;QACPC,QAAQ;QACRC,WAAW;QACXC,UAAU;QACVC,WAAW;QACXC,WAAW;QACXC,YAAY;QACZC,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,WAAW;QACXC,WAAW;QACXC,YAAY;QACZC,WAA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
1
1
  {
2
2
  "name": "@shefing/quickfilter",
3
- "version": "1.0.15",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "bugs": "https://github.com/shefing/payload-tools/issues",
6
6
  "repository": "https://github.com/shefing/payload-tools",