@forthtilliath/react-native-kit 0.13.0 → 0.14.0
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 +18 -116
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/picker/PickerModal.d.ts +2 -29
- package/dist/components/picker/PickerModal.d.ts.map +1 -1
- package/dist/components/picker/PickerModal.js +10 -112
- package/dist/components/picker/PickerModal.styles.d.ts +32 -0
- package/dist/components/picker/PickerModal.styles.d.ts.map +1 -0
- package/dist/components/picker/PickerModal.styles.js +82 -0
- package/dist/components/picker/PickerModalRow.d.ts +17 -0
- package/dist/components/picker/PickerModalRow.d.ts.map +1 -0
- package/dist/components/picker/PickerModalRow.js +11 -0
- package/dist/components/picker/usePickerModalSections.d.ts +7 -0
- package/dist/components/picker/usePickerModalSections.d.ts.map +1 -0
- package/dist/components/picker/usePickerModalSections.js +28 -0
- package/dist/components/settings/UpdateSettingsScreen.d.ts +2 -46
- package/dist/components/settings/UpdateSettingsScreen.d.ts.map +1 -1
- package/dist/components/settings/UpdateSettingsScreen.js +4 -78
- package/dist/components/settings/UpdateSettingsScreen.styles.d.ts +49 -0
- package/dist/components/settings/UpdateSettingsScreen.styles.d.ts.map +1 -0
- package/dist/components/settings/UpdateSettingsScreen.styles.js +76 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.d.ts +20 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.d.ts.map +1 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.js +10 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/index.d.ts +8 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -11
- package/dist/utils/helpers/index.d.ts +1 -6
- package/dist/utils/helpers/index.d.ts.map +1 -1
- package/dist/utils/helpers/index.js +1 -6
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/package.json +4 -3
- package/dist/components/update/ChangelogNotes.d.ts +0 -22
- package/dist/components/update/ChangelogNotes.d.ts.map +0 -1
- package/dist/components/update/ChangelogNotes.js +0 -51
- package/dist/components/update/UpdateAvailableBanner.d.ts +0 -29
- package/dist/components/update/UpdateAvailableBanner.d.ts.map +0 -1
- package/dist/components/update/UpdateAvailableBanner.js +0 -63
- package/dist/components/update/index.d.ts +0 -3
- package/dist/components/update/index.d.ts.map +0 -1
- package/dist/components/update/index.js +0 -2
- package/dist/hooks/useUpdateCheck.d.ts +0 -35
- package/dist/hooks/useUpdateCheck.d.ts.map +0 -1
- package/dist/hooks/useUpdateCheck.js +0 -47
- package/dist/utils/format/escapeCsvField.d.ts +0 -2
- package/dist/utils/format/escapeCsvField.d.ts.map +0 -1
- package/dist/utils/format/escapeCsvField.js +0 -8
- package/dist/utils/format/escapeHtml.d.ts +0 -2
- package/dist/utils/format/escapeHtml.d.ts.map +0 -1
- package/dist/utils/format/escapeHtml.js +0 -9
- package/dist/utils/format/formatCsvNumber.d.ts +0 -2
- package/dist/utils/format/formatCsvNumber.d.ts.map +0 -1
- package/dist/utils/format/formatCsvNumber.js +0 -6
- package/dist/utils/format/index.d.ts +0 -4
- package/dist/utils/format/index.d.ts.map +0 -1
- package/dist/utils/format/index.js +0 -3
- package/dist/utils/helpers/getMostRecentIds.d.ts +0 -6
- package/dist/utils/helpers/getMostRecentIds.d.ts.map +0 -1
- package/dist/utils/helpers/getMostRecentIds.js +0 -19
- package/dist/utils/helpers/getPeriodStartMs.d.ts +0 -3
- package/dist/utils/helpers/getPeriodStartMs.d.ts.map +0 -1
- package/dist/utils/helpers/getPeriodStartMs.js +0 -14
- package/dist/utils/helpers/nextInCycle.d.ts +0 -2
- package/dist/utils/helpers/nextInCycle.d.ts.map +0 -1
- package/dist/utils/helpers/nextInCycle.js +0 -9
- package/dist/utils/helpers/normalizeForSearch.d.ts +0 -2
- package/dist/utils/helpers/normalizeForSearch.d.ts.map +0 -1
- package/dist/utils/helpers/normalizeForSearch.js +0 -15
- package/dist/utils/helpers/rankByNameMatch.d.ts +0 -2
- package/dist/utils/helpers/rankByNameMatch.d.ts.map +0 -1
- package/dist/utils/helpers/rankByNameMatch.js +0 -33
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface UpdateCheckRelease {
|
|
2
|
-
version: string;
|
|
3
|
-
notes: string;
|
|
4
|
-
apkUrl: string;
|
|
5
|
-
}
|
|
6
|
-
export type UpdateCheckState = {
|
|
7
|
-
status: "idle";
|
|
8
|
-
} | {
|
|
9
|
-
status: "available";
|
|
10
|
-
release: UpdateCheckRelease;
|
|
11
|
-
} | {
|
|
12
|
-
status: "error";
|
|
13
|
-
};
|
|
14
|
-
export interface UseUpdateCheckOptions {
|
|
15
|
-
/** The app's currently installed version, e.g. from its own version string. */
|
|
16
|
-
currentVersion: string;
|
|
17
|
-
/** Fetches the latest available release, or `null` if there is none. */
|
|
18
|
-
checkForUpdate: () => Promise<UpdateCheckRelease | null>;
|
|
19
|
-
/** Positive when `a` is newer than `b`, e.g. semver comparison. */
|
|
20
|
-
compareVersions: (a: string, b: string) => number;
|
|
21
|
-
/** Read once on mount: when the last check ran, and which version (if any) the user already dismissed. */
|
|
22
|
-
getLastCheck: () => {
|
|
23
|
-
lastCheckedAt: number | null;
|
|
24
|
-
dismissedVersion: string | null;
|
|
25
|
-
};
|
|
26
|
-
/** Called after each completed check (success or failure) so the caller can persist the timestamp. */
|
|
27
|
-
onChecked: (lastCheckedAt: number) => void;
|
|
28
|
-
/** Minimum delay between two checks. Defaults to 12h. */
|
|
29
|
-
minIntervalMs?: number;
|
|
30
|
-
now?: () => number;
|
|
31
|
-
}
|
|
32
|
-
export declare function useUpdateCheck({ currentVersion, checkForUpdate, compareVersions, getLastCheck, onChecked, minIntervalMs, now, }: UseUpdateCheckOptions): UpdateCheckState & {
|
|
33
|
-
dismiss: () => void;
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=useUpdateCheck.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateCheck.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdateCheck.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,kBAAkB,CAAA;CAAE,GACpD;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAExB,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,cAAc,EAAE,MAAM,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACzD,mEAAmE;IACnE,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,0GAA0G;IAC1G,YAAY,EAAE,MAAM;QAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,CAAC;IACF,sGAAsG;IACtG,SAAS,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAUD,wBAAgB,cAAc,CAAC,EAC7B,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,SAAS,EACT,aAAuC,EACvC,GAAc,GACf,EAAE,qBAAqB,GAAG,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAyCpE"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
const DEFAULT_MIN_INTERVAL_MS = 12 * 60 * 60 * 1000;
|
|
3
|
-
// Checks once per mount (e.g. app launch) whether a newer release is
|
|
4
|
-
// available, throttled to at most one real network check per `minIntervalMs`
|
|
5
|
-
// and silent for a release the user already dismissed. Persistence of
|
|
6
|
-
// "when did we last check" / "which version did the user dismiss" is left
|
|
7
|
-
// entirely to the caller (`getLastCheck`/`onChecked`, plus its own dismiss
|
|
8
|
-
// handler) — this hook has no opinion on where that lives.
|
|
9
|
-
export function useUpdateCheck({ currentVersion, checkForUpdate, compareVersions, getLastCheck, onChecked, minIntervalMs = DEFAULT_MIN_INTERVAL_MS, now = Date.now, }) {
|
|
10
|
-
const [state, setState] = useState({ status: "idle" });
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const { lastCheckedAt, dismissedVersion } = getLastCheck();
|
|
13
|
-
if (lastCheckedAt != null && now() - lastCheckedAt < minIntervalMs)
|
|
14
|
-
return;
|
|
15
|
-
let cancelled = false;
|
|
16
|
-
checkForUpdate()
|
|
17
|
-
.then((release) => {
|
|
18
|
-
if (cancelled)
|
|
19
|
-
return;
|
|
20
|
-
onChecked(now());
|
|
21
|
-
if (release &&
|
|
22
|
-
compareVersions(release.version, currentVersion) > 0 &&
|
|
23
|
-
release.version !== dismissedVersion) {
|
|
24
|
-
setState({ status: "available", release });
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
setState({ status: "idle" });
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
.catch(() => {
|
|
31
|
-
if (cancelled)
|
|
32
|
-
return;
|
|
33
|
-
onChecked(now());
|
|
34
|
-
setState({ status: "error" });
|
|
35
|
-
});
|
|
36
|
-
return () => {
|
|
37
|
-
cancelled = true;
|
|
38
|
-
};
|
|
39
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps, @eslint-react/exhaustive-deps -- runs once per mount by design (e.g. once per app launch); options are expected to be stable for the caller's lifetime.
|
|
40
|
-
}, []);
|
|
41
|
-
return {
|
|
42
|
-
...state,
|
|
43
|
-
dismiss: () => {
|
|
44
|
-
setState({ status: "idle" });
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escapeCsvField.d.ts","sourceRoot":"","sources":["../../../src/utils/format/escapeCsvField.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Échappe un champ CSV (RFC 4180) : entoure de guillemets et double les
|
|
2
|
-
// guillemets internes si la valeur contient un guillemet, un point-virgule
|
|
3
|
-
// (délimiteur) ou un saut de ligne — sinon la valeur est renvoyée telle quelle.
|
|
4
|
-
export function escapeCsvField(value) {
|
|
5
|
-
if (!/[";\n]/.test(value))
|
|
6
|
-
return value;
|
|
7
|
-
return `"${value.replace(/"/g, '""')}"`;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escapeHtml.d.ts","sourceRoot":"","sources":["../../../src/utils/format/escapeHtml.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM/C"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Échappement HTML basique (esperluette, chevrons, guillemets) pour insérer
|
|
2
|
-
// du texte utilisateur dans un gabarit HTML sans dépendance de templating.
|
|
3
|
-
export function escapeHtml(text) {
|
|
4
|
-
return text
|
|
5
|
-
.replace(/&/g, "&")
|
|
6
|
-
.replace(/</g, "<")
|
|
7
|
-
.replace(/>/g, ">")
|
|
8
|
-
.replace(/"/g, """);
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatCsvNumber.d.ts","sourceRoot":"","sources":["../../../src/utils/format/formatCsvNumber.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAI,GAAG,MAAM,CAEnE"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Nombre brut (pas de suffixe d'unité) pour rester exploitable dans un
|
|
2
|
-
// tableur (somme, moyenne...), avec la virgule décimale attendue par Excel
|
|
3
|
-
// en locale française plutôt que le point de JS.
|
|
4
|
-
export function formatCsvNumber(value, decimals = 1) {
|
|
5
|
-
return value.toFixed(decimals).replace(".", ",");
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/format/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMostRecentIds.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/getMostRecentIds.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,EAAE,EACnB,KAAK,SAAgB,GACpB,MAAM,EAAE,CAcV"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const DEFAULT_LIMIT = 5;
|
|
2
|
-
// Ids distincts les plus récents, du plus récent au plus ancien — utile pour
|
|
3
|
-
// un sélecteur "récents" (aliment, récipient, ou tout autre entité datée).
|
|
4
|
-
// `id` peut être null (référence supprimée depuis) : ignoré, on ne peut plus
|
|
5
|
-
// le proposer.
|
|
6
|
-
export function getMostRecentIds(rows, limit = DEFAULT_LIMIT) {
|
|
7
|
-
const sorted = [...rows].sort((a, b) => new Date(b.occurredAt).getTime() - new Date(a.occurredAt).getTime());
|
|
8
|
-
const seen = new Set();
|
|
9
|
-
const result = [];
|
|
10
|
-
for (const row of sorted) {
|
|
11
|
-
if (row.id == null || seen.has(row.id))
|
|
12
|
-
continue;
|
|
13
|
-
seen.add(row.id);
|
|
14
|
-
result.push(row.id);
|
|
15
|
-
if (result.length >= limit)
|
|
16
|
-
break;
|
|
17
|
-
}
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getPeriodStartMs.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/getPeriodStartMs.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC;AAK1D,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,YAAY,EACpB,GAAG,OAAa,GACf,MAAM,GAAG,IAAI,CASf"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Timestamp (ms) à partir duquel un enregistrement est inclus pour cette
|
|
2
|
-
// période, ou null pour "all" (pas de filtre de date). "today" part du début
|
|
3
|
-
// du jour calendaire courant, pas d'il y a 24h glissantes.
|
|
4
|
-
export function getPeriodStartMs(period, now = new Date()) {
|
|
5
|
-
if (period === "all")
|
|
6
|
-
return null;
|
|
7
|
-
if (period === "today") {
|
|
8
|
-
const startOfDay = new Date(now);
|
|
9
|
-
startOfDay.setHours(0, 0, 0, 0);
|
|
10
|
-
return startOfDay.getTime();
|
|
11
|
-
}
|
|
12
|
-
const days = period === "7d" ? 7 : 30;
|
|
13
|
-
return now.getTime() - days * 24 * 60 * 60 * 1000;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextInCycle.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/nextInCycle.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EAAE,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,MAAM,GAAG,IAAI,CAIf"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Élément suivant dans une liste courte (ex: cycler sur tap entre quelques
|
|
2
|
-
// éléments récents). Reprend au début si l'actuel n'y est plus (supprimé, ou
|
|
3
|
-
// hors de la liste) ou si on est en bout de liste.
|
|
4
|
-
export function nextInCycle(ids, currentId) {
|
|
5
|
-
if (ids.length === 0)
|
|
6
|
-
return null;
|
|
7
|
-
const currentIndex = currentId == null ? -1 : ids.indexOf(currentId);
|
|
8
|
-
return ids[(currentIndex + 1) % ids.length] ?? null;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeForSearch.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/normalizeForSearch.ts"],"names":[],"mappings":"AASA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Les ligatures œ/æ ne se décomposent PAS via normalize("NFD") (contrairement
|
|
2
|
-
// aux lettres accentuées) : ce sont des lettres Unicode à part entière, pas
|
|
3
|
-
// une base + un signe combinant. Sans ce remplacement explicite, chercher
|
|
4
|
-
// "Œuf" (avec la vraie ligature) ne trouve jamais "Oeuf" dans une base qui
|
|
5
|
-
// l'orthographie sans ligature (comme la plupart des bases de données texte).
|
|
6
|
-
function expandLigatures(text) {
|
|
7
|
-
return text.replace(/[œŒ]/g, "oe").replace(/[æÆ]/g, "ae");
|
|
8
|
-
}
|
|
9
|
-
export function normalizeForSearch(text) {
|
|
10
|
-
return expandLigatures(text)
|
|
11
|
-
.normalize("NFD")
|
|
12
|
-
.replace(/[̀-ͯ]/g, "")
|
|
13
|
-
.toLowerCase()
|
|
14
|
-
.trim();
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rankByNameMatch.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/rankByNameMatch.ts"],"names":[],"mappings":"AAsBA,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAC3B,CAAC,EAAE,CAiBL"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { normalizeForSearch } from "./normalizeForSearch.js";
|
|
2
|
-
// Cache le nom normalisé de chaque élément par référence d'objet : utile pour
|
|
3
|
-
// des listes figées (constantes de module) cherchées à chaque frappe clavier
|
|
4
|
-
// dans un champ de recherche, pour éviter de renormaliser tous les noms à
|
|
5
|
-
// chaque appel.
|
|
6
|
-
const normalizedNameCache = new WeakMap();
|
|
7
|
-
function getNormalizedName(item, getName) {
|
|
8
|
-
if (typeof item !== "object" || item === null)
|
|
9
|
-
return normalizeForSearch(getName(item));
|
|
10
|
-
const cached = normalizedNameCache.get(item);
|
|
11
|
-
if (cached !== undefined)
|
|
12
|
-
return cached;
|
|
13
|
-
const normalized = normalizeForSearch(getName(item));
|
|
14
|
-
normalizedNameCache.set(item, normalized);
|
|
15
|
-
return normalized;
|
|
16
|
-
}
|
|
17
|
-
// Classe des éléments par pertinence vis-à-vis d'une recherche texte :
|
|
18
|
-
// position du match dans le nom (plus tôt = plus pertinent), puis longueur
|
|
19
|
-
// du nom. Générique pour être réutilisable par n'importe quelle liste
|
|
20
|
-
// d'éléments ayant un nom affichable.
|
|
21
|
-
export function rankByNameMatch(items, query, getName) {
|
|
22
|
-
const normalizedQuery = normalizeForSearch(query);
|
|
23
|
-
const matches = [];
|
|
24
|
-
for (const item of items) {
|
|
25
|
-
const matchIndex = getNormalizedName(item, getName).indexOf(normalizedQuery);
|
|
26
|
-
if (matchIndex !== -1) {
|
|
27
|
-
matches.push({ item, matchIndex });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
matches.sort((a, b) => a.matchIndex - b.matchIndex ||
|
|
31
|
-
getName(a.item).length - getName(b.item).length);
|
|
32
|
-
return matches.map((m) => m.item);
|
|
33
|
-
}
|