@shefing/quickfilter 1.0.10 → 1.0.12
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/README.md +873 -0
- package/dist/FilterField.d.ts.map +1 -1
- package/dist/FilterField.js +18 -9
- package/dist/FilterField.js.map +1 -1
- package/dist/QuickFilter.d.ts.map +1 -1
- package/dist/QuickFilter.js +227 -55
- package/dist/QuickFilter.js.map +1 -1
- package/dist/filters/components/checkbox-filter.d.ts +2 -1
- package/dist/filters/components/checkbox-filter.d.ts.map +1 -1
- package/dist/filters/components/checkbox-filter.js +11 -29
- package/dist/filters/components/checkbox-filter.js.map +1 -1
- package/dist/filters/components/date-filter.d.ts +2 -1
- package/dist/filters/components/date-filter.d.ts.map +1 -1
- package/dist/filters/components/date-filter.js +26 -24
- package/dist/filters/components/date-filter.js.map +1 -1
- package/dist/filters/components/select-filter.d.ts +2 -1
- package/dist/filters/components/select-filter.d.ts.map +1 -1
- package/dist/filters/components/select-filter.js +20 -18
- package/dist/filters/components/select-filter.js.map +1 -1
- package/dist/filters/components/small-select-filter.d.ts +2 -1
- package/dist/filters/components/small-select-filter.d.ts.map +1 -1
- package/dist/filters/components/small-select-filter.js +4 -3
- package/dist/filters/components/small-select-filter.js.map +1 -1
- package/dist/filters/constants/date-filter-options.d.ts +7 -4
- package/dist/filters/constants/date-filter-options.d.ts.map +1 -1
- package/dist/filters/constants/date-filter-options.js +25 -70
- package/dist/filters/constants/date-filter-options.js.map +1 -1
- package/dist/filters/types/filters-type.d.ts.map +1 -1
- package/dist/filters/types/filters-type.js.map +1 -1
- package/dist/filters/utils/date-helpers.d.ts +4 -3
- package/dist/filters/utils/date-helpers.d.ts.map +1 -1
- package/dist/filters/utils/date-helpers.js +14 -11
- package/dist/filters/utils/date-helpers.js.map +1 -1
- package/dist/filters/utils/layout-helpers.d.ts.map +1 -1
- package/dist/filters/utils/layout-helpers.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/labels.d.ts +326 -0
- package/dist/labels.d.ts.map +1 -0
- package/dist/labels.js +192 -0
- package/dist/labels.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../labels';
|
|
1
2
|
export declare function addDays(date: Date, days: number): Date;
|
|
2
3
|
export declare function subDays(date: Date, days: number): Date;
|
|
3
4
|
export declare function addWeeks(date: Date, weeks: number): Date;
|
|
@@ -15,9 +16,9 @@ export declare function endOfWeek(date: Date, options?: {
|
|
|
15
16
|
export declare function startOfMonth(date: Date): Date;
|
|
16
17
|
export declare function endOfMonth(date: Date): Date;
|
|
17
18
|
export declare function formatDate(date: Date, formatStr: string): string;
|
|
18
|
-
export declare function getDateRangeForOption(option: string, locale?:
|
|
19
|
-
from: Date;
|
|
20
|
-
to: Date;
|
|
19
|
+
export declare function getDateRangeForOption(option: string, locale?: SupportedLocale): {
|
|
20
|
+
from: Date | undefined;
|
|
21
|
+
to: Date | undefined;
|
|
21
22
|
description: string;
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=date-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-helpers.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/date-helpers.ts"],"names":[],"mappings":"
|
|
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,EAAE,MAAM,GAAG,IAAI,CAExD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAExD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAI1D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAI3C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAIzC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAOrF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAKnF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAI7C;AAED,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,CA8EvE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Custom date utilities to replace date-fns
|
|
2
|
+
import { getLabel } from '../../labels';
|
|
2
3
|
export function addDays(date, days) {
|
|
3
4
|
const result = new Date(date);
|
|
4
5
|
result.setDate(result.getDate() + days);
|
|
@@ -80,7 +81,6 @@ export function formatDate(date, formatStr) {
|
|
|
80
81
|
}
|
|
81
82
|
export function getDateRangeForOption(option, locale = 'he') {
|
|
82
83
|
const now = new Date();
|
|
83
|
-
const isHebrew = locale === 'he';
|
|
84
84
|
switch(option){
|
|
85
85
|
case 'yesterday':
|
|
86
86
|
const yesterday = subDays(now, 1);
|
|
@@ -110,11 +110,14 @@ export function getDateRangeForOption(option, locale = 'he') {
|
|
|
110
110
|
description: `(${formatDate(lastMonthStart, 'MM/yyyy')})`
|
|
111
111
|
};
|
|
112
112
|
case 'allPast':
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
{
|
|
114
|
+
const yesterday = subDays(now, 1);
|
|
115
|
+
return {
|
|
116
|
+
from: undefined,
|
|
117
|
+
to: endOfDay(yesterday),
|
|
118
|
+
description: `(${getLabel('allPast', locale)})`
|
|
119
|
+
};
|
|
120
|
+
}
|
|
118
121
|
case 'today':
|
|
119
122
|
return {
|
|
120
123
|
from: startOfDay(now),
|
|
@@ -143,14 +146,14 @@ export function getDateRangeForOption(option, locale = 'he') {
|
|
|
143
146
|
};
|
|
144
147
|
case 'allFuture':
|
|
145
148
|
return {
|
|
146
|
-
from: now,
|
|
147
|
-
to:
|
|
148
|
-
description:
|
|
149
|
+
from: startOfDay(now),
|
|
150
|
+
to: undefined,
|
|
151
|
+
description: `(${getLabel('allFuture', locale)})`
|
|
149
152
|
};
|
|
150
153
|
default:
|
|
151
154
|
return {
|
|
152
|
-
from: now,
|
|
153
|
-
to: now,
|
|
155
|
+
from: startOfDay(now),
|
|
156
|
+
to: endOfDay(now),
|
|
154
157
|
description: ''
|
|
155
158
|
};
|
|
156
159
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/filters/utils/date-helpers.ts"],"sourcesContent":["// Custom date utilities to replace date-fns\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date)
|
|
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;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,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AC,EAAEf,WAAWkB,gBAAgB,WAAW,CAAC,CAAC;YAC3D;QAEF,KAAK;YAAW;gBACd,MAAMN,YAAYjC,QAAQgC,KAAK;gBAC/B,OAAO;oBACLE,MAAMO;oBACNN,IAAIxB,SAASsB;oBACbG,aAAa,CAAC,CAAC,EAAE5C,SAAS,WAAWuC,QAAQ,CAAC,CAAC;gBACjD;YACF;QAEA,KAAK;YACH,OAAO;gBACLG,MAAMzB,WAAWuB;gBACjBG,IAAIxB,SAASqB;gBACbI,aAAa,CAAC,CAAC,EAAEf,WAAWW,KAAK,cAAc,CAAC,CAAC;YACnD;QAEF,KAAK;YACH,MAAMU,gBAAgB9B,YAAYoB,KAAK;gBAAElB,cAAc;YAAE;YACzD,MAAM6B,cAAczB,UAAUc,KAAK;gBAAElB,cAAc;YAAE;YACrD,OAAO;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-helpers.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/layout-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"layout-helpers.d.ts","sourceRoot":"","sources":["../../../src/filters/utils/layout-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAuBvE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAgB1D;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAiBhE;AAED,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,MAAM,EA4BjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/filters/utils/layout-helpers.ts"],"sourcesContent":["import { FilterDetaild, FilterRow } from '../types/filters-type'
|
|
1
|
+
{"version":3,"sources":["../../../src/filters/utils/layout-helpers.ts"],"sourcesContent":["import { FilterDetaild, FilterRow } from '../types/filters-type';\n\nexport function groupFiltersByRow(filters: FilterDetaild[]): FilterRow[] {\n // Group filters by row number\n const groupedFilters = filters.reduce(\n (acc, filter) => {\n const rowNumber = filter.row ?? 0;\n if (!acc[rowNumber]) {\n acc[rowNumber] = [];\n }\n acc[rowNumber].push(filter);\n return acc;\n },\n {} as Record<number, FilterDetaild[]>,\n );\n\n // Convert to array and sort filters within each row by order\n const rows: FilterRow[] = Object.entries(groupedFilters)\n .map(([rowNumber, filters]) => ({\n rowNumber: Number.parseInt(rowNumber),\n filters: filters,\n }))\n .sort((a, b) => a.rowNumber - b.rowNumber);\n\n return rows;\n}\n\nexport function getFilterWidthClass(width?: string): string {\n switch (width) {\n case 'sm':\n return 'w-full max-w-xs';\n case 'md':\n return 'w-full max-w-sm';\n case 'lg':\n return 'w-full max-w-md';\n case 'xl':\n return 'w-full max-w-lg';\n case 'full':\n return 'w-full';\n case 'auto':\n default:\n return 'w-auto min-w-fit';\n }\n}\n\nexport function getGridColumnsClass(filtersCount: number): string {\n switch (filtersCount) {\n case 1:\n return 'grid-cols-1';\n case 2:\n return 'grid-cols-1 md:grid-cols-2';\n case 3:\n return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3';\n case 4:\n return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4';\n case 5:\n return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5';\n case 6:\n return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6';\n default:\n return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4';\n }\n}\n\nexport const parseColumns = (raw: unknown): string[] => {\n if (Array.isArray(raw)) {\n return raw;\n }\n\n if (typeof raw === 'string') {\n try {\n const cleaned = raw\n .trim()\n .replace(/^\"+/, '')\n .replace(/\"+$/, '')\n .replace(/\\\\\"/g, '\"')\n .replace(/\\\\+\"/g, '\"')\n .replace(/\\\\\\\\/g, '\\\\');\n\n const parsed = JSON.parse(cleaned);\n\n if (Array.isArray(parsed)) {\n console.log('Parsed columns:', parsed);\n console.log('row:', raw);\n return parsed;\n }\n } catch (err) {\n console.warn('Failed to parse columns string:', raw, err);\n }\n }\n\n return [];\n};\n"],"names":["groupFiltersByRow","filters","groupedFilters","reduce","acc","filter","rowNumber","row","push","rows","Object","entries","map","Number","parseInt","sort","a","b","getFilterWidthClass","width","getGridColumnsClass","filtersCount","parseColumns","raw","Array","isArray","cleaned","trim","replace","parsed","JSON","parse","console","log","err","warn"],"mappings":"AAEA,OAAO,SAASA,kBAAkBC,OAAwB;IACxD,8BAA8B;IAC9B,MAAMC,iBAAiBD,QAAQE,MAAM,CACnC,CAACC,KAAKC;QACJ,MAAMC,YAAYD,OAAOE,GAAG,IAAI;QAChC,IAAI,CAACH,GAAG,CAACE,UAAU,EAAE;YACnBF,GAAG,CAACE,UAAU,GAAG,EAAE;QACrB;QACAF,GAAG,CAACE,UAAU,CAACE,IAAI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vD;IACF;IAEA,OAAO,EAAE;AACX,EAAE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { Config } from 'payload';
|
|
2
|
-
|
|
2
|
+
export type CollectionFilterPluginConfig = {
|
|
3
|
+
/**
|
|
4
|
+
* List of collections to add filters to
|
|
5
|
+
*/
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
3
8
|
export declare const CollectionQuickFilterPlugin: (pluginOptions?: CollectionFilterPluginConfig) => (config: Config) => Config;
|
|
4
9
|
export default CollectionQuickFilterPlugin;
|
|
5
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,2BAA2B,mBACtB,4BAA4B,cACnC,MAAM,KAAG,MAuDjB,CAAC;AAEJ,eAAe,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ export const CollectionQuickFilterPlugin = (pluginOptions = {})=>(config)=>{
|
|
|
28
28
|
}
|
|
29
29
|
// Add the QuickFilter component
|
|
30
30
|
newCollection.admin.components.beforeListTable.push({
|
|
31
|
-
path: '
|
|
31
|
+
path: '/plugins/quickfilter/QuickFilter',
|
|
32
32
|
clientProps: {
|
|
33
33
|
filterList: collection.custom.filterList,
|
|
34
34
|
slug: collection.slug
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload';\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload';\n\nexport type CollectionFilterPluginConfig = {\n /**\n * List of collections to add filters to\n */\n disabled?: boolean;\n};\n\nexport const CollectionQuickFilterPlugin =\n (pluginOptions: CollectionFilterPluginConfig = {}) =>\n (config: Config): Config => {\n if (!config.collections) {\n config.collections = [];\n }\n\n // Process each collection to add the QuickFilter component\n config.collections = config.collections.map((collection) => {\n // Check if the collection has a filterList configuration\n // or if it's specified in the plugin options\n if (collection.custom?.filterList && Array.isArray(collection.custom.filterList)) {\n // Clone the collection to avoid mutating the original\n const newCollection = { ...collection };\n\n // Initialize components if not exists\n if (!newCollection.admin) {\n newCollection.admin = {};\n }\n\n if (!newCollection.admin.components) {\n newCollection.admin.components = {};\n }\n\n if (!newCollection.admin.components.beforeListTable) {\n newCollection.admin.components.beforeListTable = [];\n } else if (!Array.isArray(newCollection.admin.components.beforeListTable)) {\n // If it's not an array, convert it to an array\n newCollection.admin.components.beforeListTable = [\n newCollection.admin.components.beforeListTable,\n ];\n }\n\n // Add the QuickFilter component\n newCollection.admin.components.beforeListTable.push({\n path: '/plugins/quickfilter/QuickFilter',\n clientProps: {\n filterList: collection.custom.filterList,\n slug: collection.slug,\n },\n });\n\n return newCollection;\n }\n\n return collection;\n });\n\n /**\n * If the plugin is disabled, we still want to keep added collections/fields so the database schema is consistent which is important for migrations.\n * If your plugin heavily modifies the database schema, you may want to remove this property.\n */\n if (pluginOptions.disabled) {\n return config;\n }\n\n return config;\n };\n\nexport default CollectionQuickFilterPlugin;\n"],"names":["CollectionQuickFilterPlugin","pluginOptions","config","collections","map","collection","custom","filterList","Array","isArray","newCollection","admin","components","beforeListTable","push","path","clientProps","slug","disabled"],"mappings":"AASA,OAAO,MAAMA,8BACX,CAACC,gBAA8C,CAAC,CAAC,GACjD,CAACC;QACC,IAAI,CAACA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ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
export declare const acceptedLanguages: string[];
|
|
2
|
+
export declare const PLUGIN_LABELS: {
|
|
3
|
+
readonly en: {
|
|
4
|
+
readonly quickFilters: "Quick Filters";
|
|
5
|
+
readonly clearFilters: "Clear Filters";
|
|
6
|
+
readonly activeFilterSingular: "Active filter on column";
|
|
7
|
+
readonly activeFilterPlural: "Active filters on columns";
|
|
8
|
+
readonly custom: "Custom";
|
|
9
|
+
readonly all: "All";
|
|
10
|
+
readonly yes: "Yes";
|
|
11
|
+
readonly no: "No";
|
|
12
|
+
readonly selectOption: "Select Option";
|
|
13
|
+
readonly from: "From";
|
|
14
|
+
readonly to: "To";
|
|
15
|
+
readonly selectDate: "Select Date";
|
|
16
|
+
readonly past: "Past";
|
|
17
|
+
readonly future: "Future";
|
|
18
|
+
readonly customRange: "Custom Range";
|
|
19
|
+
readonly apply: "Apply";
|
|
20
|
+
readonly cancel: "Cancel";
|
|
21
|
+
readonly yesterday: "Yesterday";
|
|
22
|
+
readonly lastWeek: "Last Week";
|
|
23
|
+
readonly lastMonth: "Last Month";
|
|
24
|
+
readonly allPast: "All Past";
|
|
25
|
+
readonly today: "Today";
|
|
26
|
+
readonly nextWeek: "Next Week";
|
|
27
|
+
readonly nextMonth: "Next Month";
|
|
28
|
+
readonly allFuture: "All Future";
|
|
29
|
+
};
|
|
30
|
+
readonly ar: {
|
|
31
|
+
readonly quickFilters: "فلاتر سريعة";
|
|
32
|
+
readonly clearFilters: "مسح الفلاتر";
|
|
33
|
+
readonly activeFilterSingular: "فلتر نشط على العمود";
|
|
34
|
+
readonly activeFilterPlural: "فلاتر نشطة على الأعمدة";
|
|
35
|
+
readonly custom: "مخصص";
|
|
36
|
+
readonly all: "الكل";
|
|
37
|
+
readonly yes: "نعم";
|
|
38
|
+
readonly no: "لا";
|
|
39
|
+
readonly selectOption: "اختر خيارًا";
|
|
40
|
+
readonly from: "من";
|
|
41
|
+
readonly to: "إلى";
|
|
42
|
+
readonly selectDate: "اختر التاريخ";
|
|
43
|
+
readonly past: "الماضي";
|
|
44
|
+
readonly future: "المستقبل";
|
|
45
|
+
readonly customRange: "نطاق مخصص";
|
|
46
|
+
readonly apply: "تطبيق";
|
|
47
|
+
readonly cancel: "إلغاء";
|
|
48
|
+
readonly yesterday: "أمس";
|
|
49
|
+
readonly lastWeek: "الأسبوع الماضي";
|
|
50
|
+
readonly lastMonth: "الشهر الماضي";
|
|
51
|
+
readonly allPast: "كل الماضي";
|
|
52
|
+
readonly today: "اليوم";
|
|
53
|
+
readonly nextWeek: "الأسبوع القادم";
|
|
54
|
+
readonly nextMonth: "الشهر القادم";
|
|
55
|
+
readonly allFuture: "كل المستقبل";
|
|
56
|
+
};
|
|
57
|
+
readonly fr: {
|
|
58
|
+
readonly quickFilters: "Filtres rapides";
|
|
59
|
+
readonly clearFilters: "Effacer les filtres";
|
|
60
|
+
readonly activeFilterSingular: "Filtre actif sur la colonne";
|
|
61
|
+
readonly activeFilterPlural: "Filtres actifs sur les colonnes";
|
|
62
|
+
readonly custom: "Personnalisé";
|
|
63
|
+
readonly all: "Tous";
|
|
64
|
+
readonly yes: "Oui";
|
|
65
|
+
readonly no: "Non";
|
|
66
|
+
readonly selectOption: "Sélectionner une option";
|
|
67
|
+
readonly from: "De";
|
|
68
|
+
readonly to: "À";
|
|
69
|
+
readonly selectDate: "Sélectionner une date";
|
|
70
|
+
readonly past: "Passé";
|
|
71
|
+
readonly future: "Futur";
|
|
72
|
+
readonly customRange: "Plage personnalisée";
|
|
73
|
+
readonly apply: "Appliquer";
|
|
74
|
+
readonly cancel: "Annuler";
|
|
75
|
+
readonly yesterday: "Hier";
|
|
76
|
+
readonly lastWeek: "Semaine dernière";
|
|
77
|
+
readonly lastMonth: "Mois dernier";
|
|
78
|
+
readonly allPast: "Tout le passé";
|
|
79
|
+
readonly today: "Aujourd’hui";
|
|
80
|
+
readonly nextWeek: "Semaine prochaine";
|
|
81
|
+
readonly nextMonth: "Mois prochain";
|
|
82
|
+
readonly allFuture: "Tout le futur";
|
|
83
|
+
};
|
|
84
|
+
readonly es: {
|
|
85
|
+
readonly quickFilters: "Filtros rápidos";
|
|
86
|
+
readonly clearFilters: "Borrar filtros";
|
|
87
|
+
readonly activeFilterSingular: "Filtro activo en la columna";
|
|
88
|
+
readonly activeFilterPlural: "Filtros activos en las columnas";
|
|
89
|
+
readonly custom: "Personalizado";
|
|
90
|
+
readonly all: "Todos";
|
|
91
|
+
readonly yes: "Sí";
|
|
92
|
+
readonly no: "No";
|
|
93
|
+
readonly selectOption: "Seleccionar opción";
|
|
94
|
+
readonly from: "Desde";
|
|
95
|
+
readonly to: "Hasta";
|
|
96
|
+
readonly selectDate: "Seleccionar fecha";
|
|
97
|
+
readonly past: "Pasado";
|
|
98
|
+
readonly future: "Futuro";
|
|
99
|
+
readonly customRange: "Rango personalizado";
|
|
100
|
+
readonly apply: "Aplicar";
|
|
101
|
+
readonly cancel: "Cancelar";
|
|
102
|
+
readonly yesterday: "Ayer";
|
|
103
|
+
readonly lastWeek: "Semana pasada";
|
|
104
|
+
readonly lastMonth: "Mes pasado";
|
|
105
|
+
readonly allPast: "Todo el pasado";
|
|
106
|
+
readonly today: "Hoy";
|
|
107
|
+
readonly nextWeek: "Próxima semana";
|
|
108
|
+
readonly nextMonth: "Próximo mes";
|
|
109
|
+
readonly allFuture: "Todo el futuro";
|
|
110
|
+
};
|
|
111
|
+
readonly zh: {
|
|
112
|
+
readonly quickFilters: "快速筛选";
|
|
113
|
+
readonly clearFilters: "清除筛选";
|
|
114
|
+
readonly activeFilterSingular: "列上激活的筛选";
|
|
115
|
+
readonly activeFilterPlural: "多列上激活的筛选";
|
|
116
|
+
readonly custom: "自定义";
|
|
117
|
+
readonly all: "全部";
|
|
118
|
+
readonly yes: "是";
|
|
119
|
+
readonly no: "否";
|
|
120
|
+
readonly selectOption: "选择选项";
|
|
121
|
+
readonly from: "从";
|
|
122
|
+
readonly to: "到";
|
|
123
|
+
readonly selectDate: "选择日期";
|
|
124
|
+
readonly past: "过去";
|
|
125
|
+
readonly future: "未来";
|
|
126
|
+
readonly customRange: "自定义范围";
|
|
127
|
+
readonly apply: "应用";
|
|
128
|
+
readonly cancel: "取消";
|
|
129
|
+
readonly yesterday: "昨天";
|
|
130
|
+
readonly lastWeek: "上周";
|
|
131
|
+
readonly lastMonth: "上个月";
|
|
132
|
+
readonly allPast: "所有过去";
|
|
133
|
+
readonly today: "今天";
|
|
134
|
+
readonly nextWeek: "下周";
|
|
135
|
+
readonly nextMonth: "下个月";
|
|
136
|
+
readonly allFuture: "所有未来";
|
|
137
|
+
};
|
|
138
|
+
readonly he: {
|
|
139
|
+
readonly quickFilters: "סינון מהיר";
|
|
140
|
+
readonly clearFilters: "נקה סינון";
|
|
141
|
+
readonly activeFilterSingular: "סינון פעיל בעמודה";
|
|
142
|
+
readonly activeFilterPlural: "סינון פעיל בעמודות";
|
|
143
|
+
readonly custom: "מותאם אישית";
|
|
144
|
+
readonly all: "הכל";
|
|
145
|
+
readonly yes: "כן";
|
|
146
|
+
readonly no: "לא";
|
|
147
|
+
readonly selectOption: "בחר אפשרות";
|
|
148
|
+
readonly from: "מתאריך";
|
|
149
|
+
readonly to: "עד תאריך";
|
|
150
|
+
readonly selectDate: "בחר תאריך";
|
|
151
|
+
readonly past: "עבר";
|
|
152
|
+
readonly future: "עתיד";
|
|
153
|
+
readonly customRange: "טווח מותאם אישית";
|
|
154
|
+
readonly apply: "החל";
|
|
155
|
+
readonly cancel: "ביטול";
|
|
156
|
+
readonly yesterday: "אתמול";
|
|
157
|
+
readonly lastWeek: "שבוע שעבר";
|
|
158
|
+
readonly lastMonth: "חודש שעבר";
|
|
159
|
+
readonly allPast: "בעבר";
|
|
160
|
+
readonly today: "היום";
|
|
161
|
+
readonly nextWeek: "השבוע הבא";
|
|
162
|
+
readonly nextMonth: "החודש הבא";
|
|
163
|
+
readonly allFuture: "בעתיד";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export type SupportedLocale = keyof typeof PLUGIN_LABELS;
|
|
167
|
+
export type LabelKey = keyof typeof PLUGIN_LABELS.en;
|
|
168
|
+
export declare const getLabels: (locale?: SupportedLocale) => {
|
|
169
|
+
readonly quickFilters: "Quick Filters";
|
|
170
|
+
readonly clearFilters: "Clear Filters";
|
|
171
|
+
readonly activeFilterSingular: "Active filter on column";
|
|
172
|
+
readonly activeFilterPlural: "Active filters on columns";
|
|
173
|
+
readonly custom: "Custom";
|
|
174
|
+
readonly all: "All";
|
|
175
|
+
readonly yes: "Yes";
|
|
176
|
+
readonly no: "No";
|
|
177
|
+
readonly selectOption: "Select Option";
|
|
178
|
+
readonly from: "From";
|
|
179
|
+
readonly to: "To";
|
|
180
|
+
readonly selectDate: "Select Date";
|
|
181
|
+
readonly past: "Past";
|
|
182
|
+
readonly future: "Future";
|
|
183
|
+
readonly customRange: "Custom Range";
|
|
184
|
+
readonly apply: "Apply";
|
|
185
|
+
readonly cancel: "Cancel";
|
|
186
|
+
readonly yesterday: "Yesterday";
|
|
187
|
+
readonly lastWeek: "Last Week";
|
|
188
|
+
readonly lastMonth: "Last Month";
|
|
189
|
+
readonly allPast: "All Past";
|
|
190
|
+
readonly today: "Today";
|
|
191
|
+
readonly nextWeek: "Next Week";
|
|
192
|
+
readonly nextMonth: "Next Month";
|
|
193
|
+
readonly allFuture: "All Future";
|
|
194
|
+
} | {
|
|
195
|
+
readonly quickFilters: "فلاتر سريعة";
|
|
196
|
+
readonly clearFilters: "مسح الفلاتر";
|
|
197
|
+
readonly activeFilterSingular: "فلتر نشط على العمود";
|
|
198
|
+
readonly activeFilterPlural: "فلاتر نشطة على الأعمدة";
|
|
199
|
+
readonly custom: "مخصص";
|
|
200
|
+
readonly all: "الكل";
|
|
201
|
+
readonly yes: "نعم";
|
|
202
|
+
readonly no: "لا";
|
|
203
|
+
readonly selectOption: "اختر خيارًا";
|
|
204
|
+
readonly from: "من";
|
|
205
|
+
readonly to: "إلى";
|
|
206
|
+
readonly selectDate: "اختر التاريخ";
|
|
207
|
+
readonly past: "الماضي";
|
|
208
|
+
readonly future: "المستقبل";
|
|
209
|
+
readonly customRange: "نطاق مخصص";
|
|
210
|
+
readonly apply: "تطبيق";
|
|
211
|
+
readonly cancel: "إلغاء";
|
|
212
|
+
readonly yesterday: "أمس";
|
|
213
|
+
readonly lastWeek: "الأسبوع الماضي";
|
|
214
|
+
readonly lastMonth: "الشهر الماضي";
|
|
215
|
+
readonly allPast: "كل الماضي";
|
|
216
|
+
readonly today: "اليوم";
|
|
217
|
+
readonly nextWeek: "الأسبوع القادم";
|
|
218
|
+
readonly nextMonth: "الشهر القادم";
|
|
219
|
+
readonly allFuture: "كل المستقبل";
|
|
220
|
+
} | {
|
|
221
|
+
readonly quickFilters: "Filtres rapides";
|
|
222
|
+
readonly clearFilters: "Effacer les filtres";
|
|
223
|
+
readonly activeFilterSingular: "Filtre actif sur la colonne";
|
|
224
|
+
readonly activeFilterPlural: "Filtres actifs sur les colonnes";
|
|
225
|
+
readonly custom: "Personnalisé";
|
|
226
|
+
readonly all: "Tous";
|
|
227
|
+
readonly yes: "Oui";
|
|
228
|
+
readonly no: "Non";
|
|
229
|
+
readonly selectOption: "Sélectionner une option";
|
|
230
|
+
readonly from: "De";
|
|
231
|
+
readonly to: "À";
|
|
232
|
+
readonly selectDate: "Sélectionner une date";
|
|
233
|
+
readonly past: "Passé";
|
|
234
|
+
readonly future: "Futur";
|
|
235
|
+
readonly customRange: "Plage personnalisée";
|
|
236
|
+
readonly apply: "Appliquer";
|
|
237
|
+
readonly cancel: "Annuler";
|
|
238
|
+
readonly yesterday: "Hier";
|
|
239
|
+
readonly lastWeek: "Semaine dernière";
|
|
240
|
+
readonly lastMonth: "Mois dernier";
|
|
241
|
+
readonly allPast: "Tout le passé";
|
|
242
|
+
readonly today: "Aujourd’hui";
|
|
243
|
+
readonly nextWeek: "Semaine prochaine";
|
|
244
|
+
readonly nextMonth: "Mois prochain";
|
|
245
|
+
readonly allFuture: "Tout le futur";
|
|
246
|
+
} | {
|
|
247
|
+
readonly quickFilters: "Filtros rápidos";
|
|
248
|
+
readonly clearFilters: "Borrar filtros";
|
|
249
|
+
readonly activeFilterSingular: "Filtro activo en la columna";
|
|
250
|
+
readonly activeFilterPlural: "Filtros activos en las columnas";
|
|
251
|
+
readonly custom: "Personalizado";
|
|
252
|
+
readonly all: "Todos";
|
|
253
|
+
readonly yes: "Sí";
|
|
254
|
+
readonly no: "No";
|
|
255
|
+
readonly selectOption: "Seleccionar opción";
|
|
256
|
+
readonly from: "Desde";
|
|
257
|
+
readonly to: "Hasta";
|
|
258
|
+
readonly selectDate: "Seleccionar fecha";
|
|
259
|
+
readonly past: "Pasado";
|
|
260
|
+
readonly future: "Futuro";
|
|
261
|
+
readonly customRange: "Rango personalizado";
|
|
262
|
+
readonly apply: "Aplicar";
|
|
263
|
+
readonly cancel: "Cancelar";
|
|
264
|
+
readonly yesterday: "Ayer";
|
|
265
|
+
readonly lastWeek: "Semana pasada";
|
|
266
|
+
readonly lastMonth: "Mes pasado";
|
|
267
|
+
readonly allPast: "Todo el pasado";
|
|
268
|
+
readonly today: "Hoy";
|
|
269
|
+
readonly nextWeek: "Próxima semana";
|
|
270
|
+
readonly nextMonth: "Próximo mes";
|
|
271
|
+
readonly allFuture: "Todo el futuro";
|
|
272
|
+
} | {
|
|
273
|
+
readonly quickFilters: "快速筛选";
|
|
274
|
+
readonly clearFilters: "清除筛选";
|
|
275
|
+
readonly activeFilterSingular: "列上激活的筛选";
|
|
276
|
+
readonly activeFilterPlural: "多列上激活的筛选";
|
|
277
|
+
readonly custom: "自定义";
|
|
278
|
+
readonly all: "全部";
|
|
279
|
+
readonly yes: "是";
|
|
280
|
+
readonly no: "否";
|
|
281
|
+
readonly selectOption: "选择选项";
|
|
282
|
+
readonly from: "从";
|
|
283
|
+
readonly to: "到";
|
|
284
|
+
readonly selectDate: "选择日期";
|
|
285
|
+
readonly past: "过去";
|
|
286
|
+
readonly future: "未来";
|
|
287
|
+
readonly customRange: "自定义范围";
|
|
288
|
+
readonly apply: "应用";
|
|
289
|
+
readonly cancel: "取消";
|
|
290
|
+
readonly yesterday: "昨天";
|
|
291
|
+
readonly lastWeek: "上周";
|
|
292
|
+
readonly lastMonth: "上个月";
|
|
293
|
+
readonly allPast: "所有过去";
|
|
294
|
+
readonly today: "今天";
|
|
295
|
+
readonly nextWeek: "下周";
|
|
296
|
+
readonly nextMonth: "下个月";
|
|
297
|
+
readonly allFuture: "所有未来";
|
|
298
|
+
} | {
|
|
299
|
+
readonly quickFilters: "סינון מהיר";
|
|
300
|
+
readonly clearFilters: "נקה סינון";
|
|
301
|
+
readonly activeFilterSingular: "סינון פעיל בעמודה";
|
|
302
|
+
readonly activeFilterPlural: "סינון פעיל בעמודות";
|
|
303
|
+
readonly custom: "מותאם אישית";
|
|
304
|
+
readonly all: "הכל";
|
|
305
|
+
readonly yes: "כן";
|
|
306
|
+
readonly no: "לא";
|
|
307
|
+
readonly selectOption: "בחר אפשרות";
|
|
308
|
+
readonly from: "מתאריך";
|
|
309
|
+
readonly to: "עד תאריך";
|
|
310
|
+
readonly selectDate: "בחר תאריך";
|
|
311
|
+
readonly past: "עבר";
|
|
312
|
+
readonly future: "עתיד";
|
|
313
|
+
readonly customRange: "טווח מותאם אישית";
|
|
314
|
+
readonly apply: "החל";
|
|
315
|
+
readonly cancel: "ביטול";
|
|
316
|
+
readonly yesterday: "אתמול";
|
|
317
|
+
readonly lastWeek: "שבוע שעבר";
|
|
318
|
+
readonly lastMonth: "חודש שעבר";
|
|
319
|
+
readonly allPast: "בעבר";
|
|
320
|
+
readonly today: "היום";
|
|
321
|
+
readonly nextWeek: "השבוע הבא";
|
|
322
|
+
readonly nextMonth: "החודש הבא";
|
|
323
|
+
readonly allFuture: "בעתיד";
|
|
324
|
+
};
|
|
325
|
+
export declare const getLabel: (key: LabelKey, locale?: SupportedLocale) => string;
|
|
326
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +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"}
|