@shefing/quickfilter 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filters/constants/date-filter-options.d.ts +2 -2
- package/dist/filters/constants/date-filter-options.d.ts.map +1 -1
- package/dist/filters/constants/date-filter-options.js +6 -2
- package/dist/filters/constants/date-filter-options.js.map +1 -1
- package/dist/filters/utils/date-helpers.d.ts.map +1 -1
- package/dist/filters/utils/date-helpers.js +30 -2
- package/dist/filters/utils/date-helpers.js.map +1 -1
- package/dist/labels.d.ts +72 -24
- package/dist/labels.d.ts.map +1 -1
- package/dist/labels.js +36 -12
- package/dist/labels.js.map +1 -1
- package/package.json +1 -1
|
@@ -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", "
|
|
3
|
+
export declare const pastOptionKeys: readonly ["yesterday", "last7Days", "lastWeek", "last30Days", "lastMonth", "allPast"];
|
|
4
|
+
export declare const futureOptionKeys: readonly ["today", "next7Days", "thisWeek", "next30Days", "thisMonth", "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,
|
|
1
|
+
{"version":3,"file":"date-filter-options.d.ts","sourceRoot":"","sources":["../../../src/filters/constants/date-filter-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,eAAO,MAAM,cAAc,uFAAwF,CAAC;AACpH,eAAO,MAAM,gBAAgB,qFAAsF,CAAC;AAapH,eAAO,MAAM,oBAAoB,WAAY,eAAe,GAAG,MAAM;;;CAKpE,CAAC"}
|
|
@@ -2,14 +2,18 @@ import { getLabel } from '../../labels';
|
|
|
2
2
|
// Define the option keys for past and future date filters
|
|
3
3
|
export const pastOptionKeys = [
|
|
4
4
|
'yesterday',
|
|
5
|
+
'last7Days',
|
|
5
6
|
'lastWeek',
|
|
7
|
+
'last30Days',
|
|
6
8
|
'lastMonth',
|
|
7
9
|
'allPast'
|
|
8
10
|
];
|
|
9
11
|
export const futureOptionKeys = [
|
|
10
12
|
'today',
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
+
'next7Days',
|
|
14
|
+
'thisWeek',
|
|
15
|
+
'next30Days',
|
|
16
|
+
'thisMonth',
|
|
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', '
|
|
1
|
+
{"version":3,"sources":["../../../src/filters/constants/date-filter-options.ts"],"sourcesContent":["import { getLabel } from '../../labels';\nimport type { LabelKey, 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', 'last7Days', 'lastWeek', 'last30Days', 'lastMonth', 'allPast'] as const;\nexport const futureOptionKeys = ['today', 'next7Days', 'thisWeek', 'next30Days', 'thisMonth', '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 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":"AAAA,SAASA,QAAQ,QAAQ,eAAe;AAIxC,0DAA0D;AAC1D,OAAO,MAAMC,iBAAiB;IAAC;IAAa;IAAa;IAAY;IAAc;IAAa;CAAU,CAAU;AACpH,OAAO,MAAMC,mBAAmB;IAAC;IAAS;IAAa;IAAY;IAAc;IAAa;CAAY,CAAU;AAEpH,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"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAY,MAAM,cAAc,CAAC;AAEzD,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAItD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,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AG,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 '
|
|
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 '
|
|
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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O;gBACLoB,MAAMQ;gBACNP,IAAIQ;gBACJP,aAAa,CAAC,CAAC,EAAEf,WAAWqB,eAAe,SAAS,GAAG,EAAErB,WAAWsB,aAAa,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,W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EF,KAAK;YACH,MAAME,eAAerC,SAASlB,QAAQuC,KAAK;YAC3C,OAAO;gBACLE,MAAMzB,WAAWuB;gBACjBG,IAAIa;gBACJZ,aAAa,CAAC,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
|
@@ -21,10 +21,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
21
21
|
readonly yesterday: "Yesterday";
|
|
22
22
|
readonly lastWeek: "Last Week";
|
|
23
23
|
readonly lastMonth: "Last Month";
|
|
24
|
+
readonly last7Days: "Last 7 Days";
|
|
25
|
+
readonly last30Days: "Last 30 Days";
|
|
24
26
|
readonly allPast: "All Past";
|
|
25
27
|
readonly today: "Today";
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
+
readonly thisWeek: "This Week";
|
|
29
|
+
readonly thisMonth: "This Month";
|
|
30
|
+
readonly next7Days: "Next 7 Days";
|
|
31
|
+
readonly next30Days: "Next 30 Days";
|
|
28
32
|
readonly allFuture: "All Future";
|
|
29
33
|
};
|
|
30
34
|
readonly ar: {
|
|
@@ -48,10 +52,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
48
52
|
readonly yesterday: "أمس";
|
|
49
53
|
readonly lastWeek: "الأسبوع الماضي";
|
|
50
54
|
readonly lastMonth: "الشهر الماضي";
|
|
55
|
+
readonly last7Days: "آخر 7 أيام";
|
|
56
|
+
readonly last30Days: "آخر 30 يومًا";
|
|
51
57
|
readonly allPast: "كل الماضي";
|
|
52
58
|
readonly today: "اليوم";
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
59
|
+
readonly thisWeek: "هذا الأسبوع";
|
|
60
|
+
readonly thisMonth: "هذا الشهر";
|
|
61
|
+
readonly next7Days: "الـ 7 أيام القادمة";
|
|
62
|
+
readonly next30Days: "الـ 30 يومًا القادمة";
|
|
55
63
|
readonly allFuture: "كل المستقبل";
|
|
56
64
|
};
|
|
57
65
|
readonly fr: {
|
|
@@ -75,10 +83,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
75
83
|
readonly yesterday: "Hier";
|
|
76
84
|
readonly lastWeek: "Semaine dernière";
|
|
77
85
|
readonly lastMonth: "Mois dernier";
|
|
86
|
+
readonly last7Days: "7 derniers jours";
|
|
87
|
+
readonly last30Days: "30 derniers jours";
|
|
78
88
|
readonly allPast: "Tout le passé";
|
|
79
89
|
readonly today: "Aujourd’hui";
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
90
|
+
readonly thisWeek: "Cette semaine";
|
|
91
|
+
readonly thisMonth: "Ce mois";
|
|
92
|
+
readonly next7Days: "7 prochains jours";
|
|
93
|
+
readonly next30Days: "30 prochains jours";
|
|
82
94
|
readonly allFuture: "Tout le futur";
|
|
83
95
|
};
|
|
84
96
|
readonly es: {
|
|
@@ -102,10 +114,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
102
114
|
readonly yesterday: "Ayer";
|
|
103
115
|
readonly lastWeek: "Semana pasada";
|
|
104
116
|
readonly lastMonth: "Mes pasado";
|
|
117
|
+
readonly last7Days: "Últimos 7 días";
|
|
118
|
+
readonly last30Days: "Últimos 30 días";
|
|
105
119
|
readonly allPast: "Todo el pasado";
|
|
106
120
|
readonly today: "Hoy";
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
121
|
+
readonly thisWeek: "Esta semana";
|
|
122
|
+
readonly thisMonth: "Este mes";
|
|
123
|
+
readonly next7Days: "Próximos 7 días";
|
|
124
|
+
readonly next30Days: "Próximos 30 días";
|
|
109
125
|
readonly allFuture: "Todo el futuro";
|
|
110
126
|
};
|
|
111
127
|
readonly zh: {
|
|
@@ -129,10 +145,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
129
145
|
readonly yesterday: "昨天";
|
|
130
146
|
readonly lastWeek: "上周";
|
|
131
147
|
readonly lastMonth: "上个月";
|
|
148
|
+
readonly last7Days: "过去7天";
|
|
149
|
+
readonly last30Days: "过去30天";
|
|
132
150
|
readonly allPast: "所有过去";
|
|
133
151
|
readonly today: "今天";
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
152
|
+
readonly thisWeek: "本周";
|
|
153
|
+
readonly thisMonth: "本月";
|
|
154
|
+
readonly next7Days: "未来7天";
|
|
155
|
+
readonly next30Days: "未来30天";
|
|
136
156
|
readonly allFuture: "所有未来";
|
|
137
157
|
};
|
|
138
158
|
readonly he: {
|
|
@@ -156,10 +176,14 @@ export declare const PLUGIN_LABELS: {
|
|
|
156
176
|
readonly yesterday: "אתמול";
|
|
157
177
|
readonly lastWeek: "שבוע שעבר";
|
|
158
178
|
readonly lastMonth: "חודש שעבר";
|
|
179
|
+
readonly last7Days: "7 ימים אחרונים";
|
|
180
|
+
readonly last30Days: "30 ימים אחרונים";
|
|
159
181
|
readonly allPast: "בעבר";
|
|
160
182
|
readonly today: "היום";
|
|
161
|
-
readonly
|
|
162
|
-
readonly
|
|
183
|
+
readonly thisWeek: "השבוע";
|
|
184
|
+
readonly thisMonth: "החודש";
|
|
185
|
+
readonly next7Days: "7 ימים הבאים";
|
|
186
|
+
readonly next30Days: "30 ימים הבאים";
|
|
163
187
|
readonly allFuture: "בעתיד";
|
|
164
188
|
};
|
|
165
189
|
};
|
|
@@ -186,10 +210,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
186
210
|
readonly yesterday: "Yesterday";
|
|
187
211
|
readonly lastWeek: "Last Week";
|
|
188
212
|
readonly lastMonth: "Last Month";
|
|
213
|
+
readonly last7Days: "Last 7 Days";
|
|
214
|
+
readonly last30Days: "Last 30 Days";
|
|
189
215
|
readonly allPast: "All Past";
|
|
190
216
|
readonly today: "Today";
|
|
191
|
-
readonly
|
|
192
|
-
readonly
|
|
217
|
+
readonly thisWeek: "This Week";
|
|
218
|
+
readonly thisMonth: "This Month";
|
|
219
|
+
readonly next7Days: "Next 7 Days";
|
|
220
|
+
readonly next30Days: "Next 30 Days";
|
|
193
221
|
readonly allFuture: "All Future";
|
|
194
222
|
} | {
|
|
195
223
|
readonly quickFilters: "فلاتر سريعة";
|
|
@@ -212,10 +240,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
212
240
|
readonly yesterday: "أمس";
|
|
213
241
|
readonly lastWeek: "الأسبوع الماضي";
|
|
214
242
|
readonly lastMonth: "الشهر الماضي";
|
|
243
|
+
readonly last7Days: "آخر 7 أيام";
|
|
244
|
+
readonly last30Days: "آخر 30 يومًا";
|
|
215
245
|
readonly allPast: "كل الماضي";
|
|
216
246
|
readonly today: "اليوم";
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
247
|
+
readonly thisWeek: "هذا الأسبوع";
|
|
248
|
+
readonly thisMonth: "هذا الشهر";
|
|
249
|
+
readonly next7Days: "الـ 7 أيام القادمة";
|
|
250
|
+
readonly next30Days: "الـ 30 يومًا القادمة";
|
|
219
251
|
readonly allFuture: "كل المستقبل";
|
|
220
252
|
} | {
|
|
221
253
|
readonly quickFilters: "Filtres rapides";
|
|
@@ -238,10 +270,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
238
270
|
readonly yesterday: "Hier";
|
|
239
271
|
readonly lastWeek: "Semaine dernière";
|
|
240
272
|
readonly lastMonth: "Mois dernier";
|
|
273
|
+
readonly last7Days: "7 derniers jours";
|
|
274
|
+
readonly last30Days: "30 derniers jours";
|
|
241
275
|
readonly allPast: "Tout le passé";
|
|
242
276
|
readonly today: "Aujourd’hui";
|
|
243
|
-
readonly
|
|
244
|
-
readonly
|
|
277
|
+
readonly thisWeek: "Cette semaine";
|
|
278
|
+
readonly thisMonth: "Ce mois";
|
|
279
|
+
readonly next7Days: "7 prochains jours";
|
|
280
|
+
readonly next30Days: "30 prochains jours";
|
|
245
281
|
readonly allFuture: "Tout le futur";
|
|
246
282
|
} | {
|
|
247
283
|
readonly quickFilters: "Filtros rápidos";
|
|
@@ -264,10 +300,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
264
300
|
readonly yesterday: "Ayer";
|
|
265
301
|
readonly lastWeek: "Semana pasada";
|
|
266
302
|
readonly lastMonth: "Mes pasado";
|
|
303
|
+
readonly last7Days: "Últimos 7 días";
|
|
304
|
+
readonly last30Days: "Últimos 30 días";
|
|
267
305
|
readonly allPast: "Todo el pasado";
|
|
268
306
|
readonly today: "Hoy";
|
|
269
|
-
readonly
|
|
270
|
-
readonly
|
|
307
|
+
readonly thisWeek: "Esta semana";
|
|
308
|
+
readonly thisMonth: "Este mes";
|
|
309
|
+
readonly next7Days: "Próximos 7 días";
|
|
310
|
+
readonly next30Days: "Próximos 30 días";
|
|
271
311
|
readonly allFuture: "Todo el futuro";
|
|
272
312
|
} | {
|
|
273
313
|
readonly quickFilters: "快速筛选";
|
|
@@ -290,10 +330,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
290
330
|
readonly yesterday: "昨天";
|
|
291
331
|
readonly lastWeek: "上周";
|
|
292
332
|
readonly lastMonth: "上个月";
|
|
333
|
+
readonly last7Days: "过去7天";
|
|
334
|
+
readonly last30Days: "过去30天";
|
|
293
335
|
readonly allPast: "所有过去";
|
|
294
336
|
readonly today: "今天";
|
|
295
|
-
readonly
|
|
296
|
-
readonly
|
|
337
|
+
readonly thisWeek: "本周";
|
|
338
|
+
readonly thisMonth: "本月";
|
|
339
|
+
readonly next7Days: "未来7天";
|
|
340
|
+
readonly next30Days: "未来30天";
|
|
297
341
|
readonly allFuture: "所有未来";
|
|
298
342
|
} | {
|
|
299
343
|
readonly quickFilters: "סינון מהיר";
|
|
@@ -316,10 +360,14 @@ export declare const getLabels: (locale?: SupportedLocale) => {
|
|
|
316
360
|
readonly yesterday: "אתמול";
|
|
317
361
|
readonly lastWeek: "שבוע שעבר";
|
|
318
362
|
readonly lastMonth: "חודש שעבר";
|
|
363
|
+
readonly last7Days: "7 ימים אחרונים";
|
|
364
|
+
readonly last30Days: "30 ימים אחרונים";
|
|
319
365
|
readonly allPast: "בעבר";
|
|
320
366
|
readonly today: "היום";
|
|
321
|
-
readonly
|
|
322
|
-
readonly
|
|
367
|
+
readonly thisWeek: "השבוע";
|
|
368
|
+
readonly thisMonth: "החודש";
|
|
369
|
+
readonly next7Days: "7 ימים הבאים";
|
|
370
|
+
readonly next30Days: "30 ימים הבאים";
|
|
323
371
|
readonly allFuture: "בעתיד";
|
|
324
372
|
};
|
|
325
373
|
export declare const getLabel: (key: LabelKey, locale?: SupportedLocale) => string;
|
package/dist/labels.d.ts.map
CHANGED
|
@@ -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
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,UAAuC,CAAC;AAEtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6LhB,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
|
@@ -30,10 +30,14 @@ export const PLUGIN_LABELS = {
|
|
|
30
30
|
yesterday: 'Yesterday',
|
|
31
31
|
lastWeek: 'Last Week',
|
|
32
32
|
lastMonth: 'Last Month',
|
|
33
|
+
last7Days: 'Last 7 Days',
|
|
34
|
+
last30Days: 'Last 30 Days',
|
|
33
35
|
allPast: 'All Past',
|
|
34
36
|
today: 'Today',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
thisWeek: 'This Week',
|
|
38
|
+
thisMonth: 'This Month',
|
|
39
|
+
next7Days: 'Next 7 Days',
|
|
40
|
+
next30Days: 'Next 30 Days',
|
|
37
41
|
allFuture: 'All Future'
|
|
38
42
|
},
|
|
39
43
|
ar: {
|
|
@@ -57,10 +61,14 @@ export const PLUGIN_LABELS = {
|
|
|
57
61
|
yesterday: 'أمس',
|
|
58
62
|
lastWeek: 'الأسبوع الماضي',
|
|
59
63
|
lastMonth: 'الشهر الماضي',
|
|
64
|
+
last7Days: 'آخر 7 أيام',
|
|
65
|
+
last30Days: 'آخر 30 يومًا',
|
|
60
66
|
allPast: 'كل الماضي',
|
|
61
67
|
today: 'اليوم',
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
thisWeek: 'هذا الأسبوع',
|
|
69
|
+
thisMonth: 'هذا الشهر',
|
|
70
|
+
next7Days: 'الـ 7 أيام القادمة',
|
|
71
|
+
next30Days: 'الـ 30 يومًا القادمة',
|
|
64
72
|
allFuture: 'كل المستقبل'
|
|
65
73
|
},
|
|
66
74
|
fr: {
|
|
@@ -84,10 +92,14 @@ export const PLUGIN_LABELS = {
|
|
|
84
92
|
yesterday: 'Hier',
|
|
85
93
|
lastWeek: 'Semaine dernière',
|
|
86
94
|
lastMonth: 'Mois dernier',
|
|
95
|
+
last7Days: '7 derniers jours',
|
|
96
|
+
last30Days: '30 derniers jours',
|
|
87
97
|
allPast: 'Tout le passé',
|
|
88
98
|
today: 'Aujourd’hui',
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
thisWeek: 'Cette semaine',
|
|
100
|
+
thisMonth: 'Ce mois',
|
|
101
|
+
next7Days: '7 prochains jours',
|
|
102
|
+
next30Days: '30 prochains jours',
|
|
91
103
|
allFuture: 'Tout le futur'
|
|
92
104
|
},
|
|
93
105
|
es: {
|
|
@@ -111,10 +123,14 @@ export const PLUGIN_LABELS = {
|
|
|
111
123
|
yesterday: 'Ayer',
|
|
112
124
|
lastWeek: 'Semana pasada',
|
|
113
125
|
lastMonth: 'Mes pasado',
|
|
126
|
+
last7Days: 'Últimos 7 días',
|
|
127
|
+
last30Days: 'Últimos 30 días',
|
|
114
128
|
allPast: 'Todo el pasado',
|
|
115
129
|
today: 'Hoy',
|
|
116
|
-
|
|
117
|
-
|
|
130
|
+
thisWeek: 'Esta semana',
|
|
131
|
+
thisMonth: 'Este mes',
|
|
132
|
+
next7Days: 'Próximos 7 días',
|
|
133
|
+
next30Days: 'Próximos 30 días',
|
|
118
134
|
allFuture: 'Todo el futuro'
|
|
119
135
|
},
|
|
120
136
|
zh: {
|
|
@@ -138,10 +154,14 @@ export const PLUGIN_LABELS = {
|
|
|
138
154
|
yesterday: '昨天',
|
|
139
155
|
lastWeek: '上周',
|
|
140
156
|
lastMonth: '上个月',
|
|
157
|
+
last7Days: '过去7天',
|
|
158
|
+
last30Days: '过去30天',
|
|
141
159
|
allPast: '所有过去',
|
|
142
160
|
today: '今天',
|
|
143
|
-
|
|
144
|
-
|
|
161
|
+
thisWeek: '本周',
|
|
162
|
+
thisMonth: '本月',
|
|
163
|
+
next7Days: '未来7天',
|
|
164
|
+
next30Days: '未来30天',
|
|
145
165
|
allFuture: '所有未来'
|
|
146
166
|
},
|
|
147
167
|
he: {
|
|
@@ -165,10 +185,14 @@ export const PLUGIN_LABELS = {
|
|
|
165
185
|
yesterday: 'אתמול',
|
|
166
186
|
lastWeek: 'שבוע שעבר',
|
|
167
187
|
lastMonth: 'חודש שעבר',
|
|
188
|
+
last7Days: '7 ימים אחרונים',
|
|
189
|
+
last30Days: '30 ימים אחרונים',
|
|
168
190
|
allPast: 'בעבר',
|
|
169
191
|
today: 'היום',
|
|
170
|
-
|
|
171
|
-
|
|
192
|
+
thisWeek: 'השבוע',
|
|
193
|
+
thisMonth: 'החודש',
|
|
194
|
+
next7Days: '7 ימים הבאים',
|
|
195
|
+
next30Days: '30 ימים הבאים',
|
|
172
196
|
allFuture: 'בעתיד'
|
|
173
197
|
}
|
|
174
198
|
};
|
package/dist/labels.js.map
CHANGED
|
@@ -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
|
|
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 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 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 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 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 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 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","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,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,WAAW;IACb;IACAC,IAAI;QACF7B,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,WAA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