strapi-plugin-magic-mark 4.0.2 → 4.0.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [4.0.3](https://github.com/Schero94/Magicmark/compare/v4.0.2...v4.0.3) (2026-11-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * keep advanced filters within the list limits of Strapi 5.63 ([#13](https://github.com/Schero94/Magicmark/issues/13)) ([e5d7dcb](https://github.com/Schero94/Magicmark/commit/e5d7dcbca72bca47d42035a3c9839f9dc819a2db))
7
+
8
+
9
+ ### Fixed
10
+
11
+ * Advanced filters stay within what Strapi accepts: at most 100 values for "is one of" / "is none of" and at most 100 conditions with "Any condition" (the `arrayLimit` of Strapi's `strapi::query` middleware; Strapi 5.63 answers a longer list with 400), and at most 20 conditions with "All conditions" (with more, the Content Manager list view does not render on Strapi 5.62 and 5.63). The editor says so next to the fields, in all five admin languages, instead of applying a filter that fails.
12
+ * Opening a bookmark whose filters exceed these limits shows a notice that explains how to fix it, instead of a list view that fails. Magic Mark 4.x already refuses to save more than 100 items in one list; older bookmarks can still hold more.
13
+ * The Advanced filters dialog no longer logs the Radix "Missing `Description`" warning: its title is its only label (`aria-describedby={undefined}`).
14
+
1
15
  ## [4.0.2](https://github.com/Schero94/Magicmark/compare/v4.0.1...v4.0.2) (2026-11-17)
2
16
 
3
17
 
package/README.md CHANGED
@@ -12,9 +12,10 @@ to external servers.
12
12
 
13
13
  [![npm version](https://img.shields.io/npm/v/strapi-plugin-magic-mark.svg)](https://www.npmjs.com/package/strapi-plugin-magic-mark)
14
14
  [![npm downloads](https://img.shields.io/npm/dm/strapi-plugin-magic-mark.svg)](https://www.npmjs.com/package/strapi-plugin-magic-mark)
15
- [![Test & Verify](https://github.com/Schero94/Magicmark/actions/workflows/test.yml/badge.svg)](https://github.com/Schero94/Magicmark/actions/workflows/test.yml)
16
- [![Strapi 5.57+](https://img.shields.io/badge/Strapi-5.57%2B-4945ff.svg)](#compatibility)
17
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Schero94/Magicmark/blob/main/LICENSE)
15
+ [![CI build status](https://img.shields.io/github/actions/workflow/status/Schero94/Magicmark/test.yml?branch=main&label=CI&logo=github)](https://github.com/Schero94/Magicmark/actions/workflows/test.yml?query=branch%3Amain)
16
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Schero94/Magicmark/blob/main/LICENSE)
17
+ [![Strapi 5.57+](https://img.shields.io/badge/Strapi-5.57%2B-4945FF.svg)](https://github.com/Schero94/Magicmark#compatibility)
18
+ [![Documentation site](https://img.shields.io/badge/docs-project%20site-6d4aff.svg)](https://schero94.github.io/Magicmark/)
18
19
 
19
20
  Website: [schero94.github.io/Magicmark](https://schero94.github.io/Magicmark/) ·
20
21
  npm: [strapi-plugin-magic-mark](https://www.npmjs.com/package/strapi-plugin-magic-mark) ·
@@ -146,6 +147,14 @@ appear as filter tags and can be removed one by one. With **Any condition** the
146
147
  correctly, but Strapi does not show those conditions as tags; open Advanced filters to change or
147
148
  clear them.
148
149
 
150
+ A filter can have at most 100 values for "is one of" / "is none of" and at most 100 conditions
151
+ with **Any condition**: that is the `arrayLimit` of Strapi's `strapi::query` middleware, and from
152
+ Strapi 5.63 a longer list is answered with 400. With **All conditions** the limit is 20, because
153
+ the Content Manager list view does not open with more `$and` conditions in the URL (Strapi 5.62
154
+ and 5.63). Advanced filters shows these limits next to the fields, and a bookmark with a longer
155
+ list is not opened: a notice asks you to narrow the filters and save the current view into the
156
+ bookmark again.
157
+
149
158
  ## Configuration
150
159
 
151
160
  Magic Mark has no configuration options and reads no environment variables. Access is controlled
@@ -313,7 +322,7 @@ restarts crashed workers).
313
322
 
314
323
  | Magic Mark | Strapi | Node.js | Notes |
315
324
  | ---------- | ------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
316
- | 4.x | 5.57.0 or newer 5.x | 22.22.2 or newer 22.x, 24.15.0 or newer | Free. Acceptance host: Strapi 5.62.0 on SQLite and Postgres 16. 3.x data and permissions migrate on the first start. |
325
+ | 4.x | 5.57.0 or newer 5.x | 22.22.2 or newer 22.x, 24.15.0 or newer | Free. Acceptance host: Strapi 5.63.0 on SQLite and Postgres 16. 3.x data and permissions migrate on the first start. |
317
326
  | 3.x | 5.x | 22 | Contained the license system. No longer maintained. |
318
327
 
319
328
  Install with npm, yarn 1 or pnpm. The plugin's peers match what a new Strapi 5 app already has:
@@ -322,6 +331,10 @@ required peers; `@strapi/design-system`, `@strapi/icons` and `react-intl` are op
322
331
  because a Strapi app gets them through `@strapi/admin`. Installing the plugin into a new Strapi
323
332
  5.61 app with npm 11, yarn 1.22 or pnpm prints no warning caused by the plugin.
324
333
 
334
+ The plugin develops against the `@strapi/design-system` and `@strapi/icons` minor that the
335
+ Strapi baseline's admin ships (2.3.x for Strapi 5.62). Dependabot does not propose newer minors
336
+ of these two packages; they are raised by hand with each Strapi baseline bump.
337
+
325
338
  ## Upgrading from 3.x
326
339
 
327
340
  There are no manual steps. Update the package, rebuild the admin (`npm run build`) and start
@@ -359,6 +372,7 @@ you deploy the upgrade.
359
372
  | Users are listed without email | Email is shown only to admins who can read admin users. |
360
373
  | Advanced filters show only some fields | The role can read only those fields of the content type in the Content Manager. |
361
374
  | "This bookmark does not point to a list view" | A 3.x bookmark had an unusual path. Delete it and save the view again. |
375
+ | "This bookmark was not opened: a filter in it has more than 100 values or conditions" | Strapi accepts at most 100 items in one filter list. Open the list, narrow that filter, then save the current view into the bookmark. |
362
376
  | After an upgrade with several instances, some processes stopped with "already exists" | Strapi's schema sync ran in several processes at once. Restart them; see [Running several instances](#running-several-instances-railway-replicas-pm2-cluster). |
363
377
  | The plugin does not show up after installing | Rebuild the admin panel (`npm run build`) and restart Strapi. |
364
378
 
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useNotification, useClipboard, useIsDesktop, useIsMobile, useMediaQuery, useRBAC, useQueryParams, Page, Layouts, SearchInput, Pagination, ConfirmDialog } from "@strapi/strapi/admin";
3
3
  import { useHref, NavLink, Routes, Route } from "react-router-dom";
4
- import { m as msg, u as useBookmarksApi, a as useOpenBookmark, b as useContentTypeNames, A as ALL_PERMISSIONS, B as BookmarkFormModal, g as getIcon, c as bookmarkLocation, L as LINK_TARGET, d as countConditions, p as parseQuery, e as pluginId, P as PERMISSIONS } from "./index-BJ8l6K7P.mjs";
4
+ import { m as msg, u as useBookmarksApi, a as useOpenBookmark, b as useContentTypeNames, A as ALL_PERMISSIONS, B as BookmarkFormModal, g as getIcon, c as bookmarkLocation, L as LINK_TARGET, d as countConditions, p as parseQuery, e as pluginId, P as PERMISSIONS } from "./index-JMvoPs_C.mjs";
5
5
  import { Flex, IconButton, Menu, LinkButton, Box, SingleSelect, SingleSelectOption, Button, EmptyStateLayout, Badge, Typography, Table, Thead, Tr, Th, VisuallyHidden, Tbody, Td, Dialog, Link as Link$1 } from "@strapi/design-system";
6
6
  import { Pin, More, ExternalLink, Pencil, Duplicate, Link, Trash, CaretDown, CaretUp, ArrowRight } from "@strapi/icons";
7
7
  import { EmptyDocuments, EmptyPictures } from "@strapi/icons/symbols";
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const admin = require("@strapi/strapi/admin");
5
5
  const reactRouterDom = require("react-router-dom");
6
- const index = require("./index-C9FMo0F_.js");
6
+ const index = require("./index-CcVZyEc_.js");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const symbols = require("@strapi/icons/symbols");
@@ -6,7 +6,7 @@ const admin = require("@strapi/strapi/admin");
6
6
  const react = require("react");
7
7
  const reactIntl = require("react-intl");
8
8
  const reactRouterDom = require("react-router-dom");
9
- const index = require("./index-C9FMo0F_.js");
9
+ const index = require("./index-CcVZyEc_.js");
10
10
  const PinnedBookmarksWidget = () => {
11
11
  const { formatMessage } = reactIntl.useIntl();
12
12
  const api = index.useBookmarksApi();
@@ -4,7 +4,7 @@ import { Widget } from "@strapi/strapi/admin";
4
4
  import { useState, useEffect } from "react";
5
5
  import { useIntl } from "react-intl";
6
6
  import { NavLink } from "react-router-dom";
7
- import { u as useBookmarksApi, a as useOpenBookmark, b as useContentTypeNames, m as msg, g as getIcon, c as bookmarkLocation, L as LINK_TARGET } from "./index-BJ8l6K7P.mjs";
7
+ import { u as useBookmarksApi, a as useOpenBookmark, b as useContentTypeNames, m as msg, g as getIcon, c as bookmarkLocation, L as LINK_TARGET } from "./index-JMvoPs_C.mjs";
8
8
  const PinnedBookmarksWidget = () => {
9
9
  const { formatMessage } = useIntl();
10
10
  const api = useBookmarksApi();
@@ -20,6 +20,9 @@ const de = {
20
20
  "filters.conditions": "Bedingungen",
21
21
  "filters.errorField": "Feld auswählen.",
22
22
  "filters.errorOperator": "Bedingung auswählen.",
23
+ "filters.errorTooManyConditions": "Bedingungen entfernen, bis höchstens {max} übrig sind. Mehr nimmt Strapi nicht an.",
24
+ "filters.errorTooManyConditionsAll": "Bei „Alle Bedingungen“ höchstens {max} Bedingungen verwenden: Mit mehr öffnet sich die Liste im Content Manager nicht. Bedingungen entfernen oder „Eine der Bedingungen“ wählen.",
25
+ "filters.errorTooManyValues": "Höchstens {max} Werte eingeben. Längere Listen nimmt Strapi nicht an.",
23
26
  "filters.errorValue": "Wert eingeben.",
24
27
  "filters.false": "falsch",
25
28
  "filters.field": "Feld",
@@ -32,6 +35,8 @@ const de = {
32
35
  "filters.matchAll": "Alle Bedingungen",
33
36
  "filters.matchAny": "Eine der Bedingungen",
34
37
  "filters.matchAnyHint": "Diese Bedingungen erscheinen nicht als Filter-Tags über der Liste.",
38
+ "filters.maxConditions": "Ein Filter kann höchstens {max} Bedingungen haben, mehr nimmt Strapi nicht an.",
39
+ "filters.maxConditionsAll": "Bei „Alle Bedingungen“ kann ein Filter höchstens {max} Bedingungen haben. Mit mehr öffnet sich die Liste im Content Manager nicht.",
35
40
  "filters.noFields": "Keine passenden Felder",
36
41
  "filters.operator": "Bedingung",
37
42
  "filters.remove": "Bedingung {number} entfernen",
@@ -108,6 +113,7 @@ const de = {
108
113
  "notification.invalidPath": "Dieses Lesezeichen verweist auf keine Listenansicht.",
109
114
  "notification.linkCopied": "Link kopiert.",
110
115
  "notification.linkCopyError": "Der Link konnte nicht kopiert werden.",
116
+ "notification.listTooLong": "Dieses Lesezeichen wurde nicht geöffnet: Seine Filter haben mehr Werte oder Bedingungen, als Strapi annimmt. Die Liste öffnen, die Filter eingrenzen und dann die aktuelle Ansicht in diesem Lesezeichen speichern.",
111
117
  "notification.pinError": "Das Lesezeichen konnte nicht angeheftet werden.",
112
118
  "notification.pinned": "Lesezeichen angeheftet.",
113
119
  "notification.saveError": "Das Lesezeichen konnte nicht gespeichert werden. Die Änderungen sind noch im Formular.",
@@ -18,6 +18,9 @@ const de = {
18
18
  "filters.conditions": "Bedingungen",
19
19
  "filters.errorField": "Feld auswählen.",
20
20
  "filters.errorOperator": "Bedingung auswählen.",
21
+ "filters.errorTooManyConditions": "Bedingungen entfernen, bis höchstens {max} übrig sind. Mehr nimmt Strapi nicht an.",
22
+ "filters.errorTooManyConditionsAll": "Bei „Alle Bedingungen“ höchstens {max} Bedingungen verwenden: Mit mehr öffnet sich die Liste im Content Manager nicht. Bedingungen entfernen oder „Eine der Bedingungen“ wählen.",
23
+ "filters.errorTooManyValues": "Höchstens {max} Werte eingeben. Längere Listen nimmt Strapi nicht an.",
21
24
  "filters.errorValue": "Wert eingeben.",
22
25
  "filters.false": "falsch",
23
26
  "filters.field": "Feld",
@@ -30,6 +33,8 @@ const de = {
30
33
  "filters.matchAll": "Alle Bedingungen",
31
34
  "filters.matchAny": "Eine der Bedingungen",
32
35
  "filters.matchAnyHint": "Diese Bedingungen erscheinen nicht als Filter-Tags über der Liste.",
36
+ "filters.maxConditions": "Ein Filter kann höchstens {max} Bedingungen haben, mehr nimmt Strapi nicht an.",
37
+ "filters.maxConditionsAll": "Bei „Alle Bedingungen“ kann ein Filter höchstens {max} Bedingungen haben. Mit mehr öffnet sich die Liste im Content Manager nicht.",
33
38
  "filters.noFields": "Keine passenden Felder",
34
39
  "filters.operator": "Bedingung",
35
40
  "filters.remove": "Bedingung {number} entfernen",
@@ -106,6 +111,7 @@ const de = {
106
111
  "notification.invalidPath": "Dieses Lesezeichen verweist auf keine Listenansicht.",
107
112
  "notification.linkCopied": "Link kopiert.",
108
113
  "notification.linkCopyError": "Der Link konnte nicht kopiert werden.",
114
+ "notification.listTooLong": "Dieses Lesezeichen wurde nicht geöffnet: Seine Filter haben mehr Werte oder Bedingungen, als Strapi annimmt. Die Liste öffnen, die Filter eingrenzen und dann die aktuelle Ansicht in diesem Lesezeichen speichern.",
109
115
  "notification.pinError": "Das Lesezeichen konnte nicht angeheftet werden.",
110
116
  "notification.pinned": "Lesezeichen angeheftet.",
111
117
  "notification.saveError": "Das Lesezeichen konnte nicht gespeichert werden. Die Änderungen sind noch im Formular.",
@@ -20,6 +20,9 @@ const en = {
20
20
  "filters.conditions": "Conditions",
21
21
  "filters.errorField": "Choose a field.",
22
22
  "filters.errorOperator": "Choose a condition.",
23
+ "filters.errorTooManyConditions": "Remove conditions until at most {max} are left. Strapi does not accept more.",
24
+ "filters.errorTooManyConditionsAll": "With All conditions, keep at most {max} conditions: the Content Manager list does not open with more. Remove conditions or choose Any condition.",
25
+ "filters.errorTooManyValues": "Enter at most {max} values. Strapi does not accept longer lists.",
23
26
  "filters.errorValue": "Enter a value.",
24
27
  "filters.false": "false",
25
28
  "filters.field": "Field",
@@ -32,6 +35,8 @@ const en = {
32
35
  "filters.matchAll": "All conditions",
33
36
  "filters.matchAny": "Any condition",
34
37
  "filters.matchAnyHint": "These conditions are not shown as filter tags above the list.",
38
+ "filters.maxConditions": "A filter can have at most {max} conditions, the most Strapi accepts.",
39
+ "filters.maxConditionsAll": "With All conditions, a filter can have at most {max} conditions. The Content Manager list does not open with more.",
35
40
  "filters.noFields": "No matching fields",
36
41
  "filters.operator": "Condition",
37
42
  "filters.remove": "Remove condition {number}",
@@ -108,6 +113,7 @@ const en = {
108
113
  "notification.invalidPath": "This bookmark does not point to a list view.",
109
114
  "notification.linkCopied": "Link copied.",
110
115
  "notification.linkCopyError": "The link could not be copied.",
116
+ "notification.listTooLong": "This bookmark was not opened: its filters have more values or conditions than Strapi accepts. Open the list, narrow the filters, then save the current view in this bookmark.",
111
117
  "notification.pinError": "The bookmark could not be pinned.",
112
118
  "notification.pinned": "Bookmark pinned.",
113
119
  "notification.saveError": "The bookmark could not be saved. Your changes are still in the form.",
@@ -18,6 +18,9 @@ const en = {
18
18
  "filters.conditions": "Conditions",
19
19
  "filters.errorField": "Choose a field.",
20
20
  "filters.errorOperator": "Choose a condition.",
21
+ "filters.errorTooManyConditions": "Remove conditions until at most {max} are left. Strapi does not accept more.",
22
+ "filters.errorTooManyConditionsAll": "With All conditions, keep at most {max} conditions: the Content Manager list does not open with more. Remove conditions or choose Any condition.",
23
+ "filters.errorTooManyValues": "Enter at most {max} values. Strapi does not accept longer lists.",
21
24
  "filters.errorValue": "Enter a value.",
22
25
  "filters.false": "false",
23
26
  "filters.field": "Field",
@@ -30,6 +33,8 @@ const en = {
30
33
  "filters.matchAll": "All conditions",
31
34
  "filters.matchAny": "Any condition",
32
35
  "filters.matchAnyHint": "These conditions are not shown as filter tags above the list.",
36
+ "filters.maxConditions": "A filter can have at most {max} conditions, the most Strapi accepts.",
37
+ "filters.maxConditionsAll": "With All conditions, a filter can have at most {max} conditions. The Content Manager list does not open with more.",
33
38
  "filters.noFields": "No matching fields",
34
39
  "filters.operator": "Condition",
35
40
  "filters.remove": "Remove condition {number}",
@@ -106,6 +111,7 @@ const en = {
106
111
  "notification.invalidPath": "This bookmark does not point to a list view.",
107
112
  "notification.linkCopied": "Link copied.",
108
113
  "notification.linkCopyError": "The link could not be copied.",
114
+ "notification.listTooLong": "This bookmark was not opened: its filters have more values or conditions than Strapi accepts. Open the list, narrow the filters, then save the current view in this bookmark.",
109
115
  "notification.pinError": "The bookmark could not be pinned.",
110
116
  "notification.pinned": "Bookmark pinned.",
111
117
  "notification.saveError": "The bookmark could not be saved. Your changes are still in the form.",
@@ -18,6 +18,9 @@ const es = {
18
18
  "filters.conditions": "Condiciones",
19
19
  "filters.errorField": "Elija un campo.",
20
20
  "filters.errorOperator": "Elija una condición.",
21
+ "filters.errorTooManyConditions": "Elimina condiciones hasta que queden como máximo {max}. Strapi no acepta más.",
22
+ "filters.errorTooManyConditionsAll": "Con «Todas las condiciones», usa como máximo {max} condiciones: la lista del Content Manager no se abre con más. Elimina condiciones o elige «Alguna condición».",
23
+ "filters.errorTooManyValues": "Introduce como máximo {max} valores. Strapi no acepta listas más largas.",
21
24
  "filters.errorValue": "Introduzca un valor.",
22
25
  "filters.false": "falso",
23
26
  "filters.field": "Campo",
@@ -30,6 +33,8 @@ const es = {
30
33
  "filters.matchAll": "Todas las condiciones",
31
34
  "filters.matchAny": "Alguna condición",
32
35
  "filters.matchAnyHint": "Estas condiciones no aparecen como etiquetas de filtro sobre la lista.",
36
+ "filters.maxConditions": "Un filtro puede tener como máximo {max} condiciones, el máximo que acepta Strapi.",
37
+ "filters.maxConditionsAll": "Con «Todas las condiciones», un filtro puede tener como máximo {max} condiciones. La lista del Content Manager no se abre con más.",
33
38
  "filters.noFields": "No hay campos coincidentes",
34
39
  "filters.operator": "Condición",
35
40
  "filters.remove": "Quitar la condición {number}",
@@ -106,6 +111,7 @@ const es = {
106
111
  "notification.invalidPath": "Este marcador no apunta a una vista de lista.",
107
112
  "notification.linkCopied": "Enlace copiado.",
108
113
  "notification.linkCopyError": "No se pudo copiar el enlace.",
114
+ "notification.listTooLong": "Este marcador no se abrió: sus filtros tienen más valores o condiciones de los que acepta Strapi. Abre la lista, reduce los filtros y guarda la vista actual en este marcador.",
109
115
  "notification.pinError": "No se pudo fijar el marcador.",
110
116
  "notification.pinned": "Marcador fijado.",
111
117
  "notification.saveError": "No se pudo guardar el marcador. Los cambios siguen en el formulario.",
@@ -20,6 +20,9 @@ const es = {
20
20
  "filters.conditions": "Condiciones",
21
21
  "filters.errorField": "Elija un campo.",
22
22
  "filters.errorOperator": "Elija una condición.",
23
+ "filters.errorTooManyConditions": "Elimina condiciones hasta que queden como máximo {max}. Strapi no acepta más.",
24
+ "filters.errorTooManyConditionsAll": "Con «Todas las condiciones», usa como máximo {max} condiciones: la lista del Content Manager no se abre con más. Elimina condiciones o elige «Alguna condición».",
25
+ "filters.errorTooManyValues": "Introduce como máximo {max} valores. Strapi no acepta listas más largas.",
23
26
  "filters.errorValue": "Introduzca un valor.",
24
27
  "filters.false": "falso",
25
28
  "filters.field": "Campo",
@@ -32,6 +35,8 @@ const es = {
32
35
  "filters.matchAll": "Todas las condiciones",
33
36
  "filters.matchAny": "Alguna condición",
34
37
  "filters.matchAnyHint": "Estas condiciones no aparecen como etiquetas de filtro sobre la lista.",
38
+ "filters.maxConditions": "Un filtro puede tener como máximo {max} condiciones, el máximo que acepta Strapi.",
39
+ "filters.maxConditionsAll": "Con «Todas las condiciones», un filtro puede tener como máximo {max} condiciones. La lista del Content Manager no se abre con más.",
35
40
  "filters.noFields": "No hay campos coincidentes",
36
41
  "filters.operator": "Condición",
37
42
  "filters.remove": "Quitar la condición {number}",
@@ -108,6 +113,7 @@ const es = {
108
113
  "notification.invalidPath": "Este marcador no apunta a una vista de lista.",
109
114
  "notification.linkCopied": "Enlace copiado.",
110
115
  "notification.linkCopyError": "No se pudo copiar el enlace.",
116
+ "notification.listTooLong": "Este marcador no se abrió: sus filtros tienen más valores o condiciones de los que acepta Strapi. Abre la lista, reduce los filtros y guarda la vista actual en este marcador.",
111
117
  "notification.pinError": "No se pudo fijar el marcador.",
112
118
  "notification.pinned": "Marcador fijado.",
113
119
  "notification.saveError": "No se pudo guardar el marcador. Los cambios siguen en el formulario.",
@@ -18,6 +18,9 @@ const fr = {
18
18
  "filters.conditions": "Conditions",
19
19
  "filters.errorField": "Choisissez un champ.",
20
20
  "filters.errorOperator": "Choisissez une condition.",
21
+ "filters.errorTooManyConditions": "Supprimez des conditions pour n'en garder que {max} au plus. Strapi n'en accepte pas davantage.",
22
+ "filters.errorTooManyConditionsAll": "Avec « Toutes les conditions », gardez au plus {max} conditions : la liste du Content Manager ne s'ouvre pas avec davantage. Supprimez des conditions ou choisissez « Au moins une condition ».",
23
+ "filters.errorTooManyValues": "Saisissez au plus {max} valeurs. Strapi n'accepte pas de listes plus longues.",
21
24
  "filters.errorValue": "Saisissez une valeur.",
22
25
  "filters.false": "faux",
23
26
  "filters.field": "Champ",
@@ -30,6 +33,8 @@ const fr = {
30
33
  "filters.matchAll": "Toutes les conditions",
31
34
  "filters.matchAny": "Au moins une condition",
32
35
  "filters.matchAnyHint": "Ces conditions ne s'affichent pas comme étiquettes de filtre au-dessus de la liste.",
36
+ "filters.maxConditions": "Un filtre peut avoir au plus {max} conditions, le maximum accepté par Strapi.",
37
+ "filters.maxConditionsAll": "Avec « Toutes les conditions », un filtre peut avoir au plus {max} conditions. La liste du Content Manager ne s'ouvre pas avec davantage.",
33
38
  "filters.noFields": "Aucun champ correspondant",
34
39
  "filters.operator": "Condition",
35
40
  "filters.remove": "Supprimer la condition {number}",
@@ -106,6 +111,7 @@ const fr = {
106
111
  "notification.invalidPath": "Ce favori ne pointe vers aucune vue de liste.",
107
112
  "notification.linkCopied": "Lien copié.",
108
113
  "notification.linkCopyError": "Le lien n'a pas pu être copié.",
114
+ "notification.listTooLong": "Ce favori n'a pas été ouvert : ses filtres ont plus de valeurs ou de conditions que Strapi n'en accepte. Ouvrez la liste, restreignez les filtres, puis enregistrez la vue actuelle dans ce favori.",
109
115
  "notification.pinError": "Le favori n'a pas pu être épinglé.",
110
116
  "notification.pinned": "Favori épinglé.",
111
117
  "notification.saveError": "Le favori n'a pas pu être enregistré. Vos modifications sont toujours dans le formulaire.",
@@ -20,6 +20,9 @@ const fr = {
20
20
  "filters.conditions": "Conditions",
21
21
  "filters.errorField": "Choisissez un champ.",
22
22
  "filters.errorOperator": "Choisissez une condition.",
23
+ "filters.errorTooManyConditions": "Supprimez des conditions pour n'en garder que {max} au plus. Strapi n'en accepte pas davantage.",
24
+ "filters.errorTooManyConditionsAll": "Avec « Toutes les conditions », gardez au plus {max} conditions : la liste du Content Manager ne s'ouvre pas avec davantage. Supprimez des conditions ou choisissez « Au moins une condition ».",
25
+ "filters.errorTooManyValues": "Saisissez au plus {max} valeurs. Strapi n'accepte pas de listes plus longues.",
23
26
  "filters.errorValue": "Saisissez une valeur.",
24
27
  "filters.false": "faux",
25
28
  "filters.field": "Champ",
@@ -32,6 +35,8 @@ const fr = {
32
35
  "filters.matchAll": "Toutes les conditions",
33
36
  "filters.matchAny": "Au moins une condition",
34
37
  "filters.matchAnyHint": "Ces conditions ne s'affichent pas comme étiquettes de filtre au-dessus de la liste.",
38
+ "filters.maxConditions": "Un filtre peut avoir au plus {max} conditions, le maximum accepté par Strapi.",
39
+ "filters.maxConditionsAll": "Avec « Toutes les conditions », un filtre peut avoir au plus {max} conditions. La liste du Content Manager ne s'ouvre pas avec davantage.",
35
40
  "filters.noFields": "Aucun champ correspondant",
36
41
  "filters.operator": "Condition",
37
42
  "filters.remove": "Supprimer la condition {number}",
@@ -108,6 +113,7 @@ const fr = {
108
113
  "notification.invalidPath": "Ce favori ne pointe vers aucune vue de liste.",
109
114
  "notification.linkCopied": "Lien copié.",
110
115
  "notification.linkCopyError": "Le lien n'a pas pu être copié.",
116
+ "notification.listTooLong": "Ce favori n'a pas été ouvert : ses filtres ont plus de valeurs ou de conditions que Strapi n'en accepte. Ouvrez la liste, restreignez les filtres, puis enregistrez la vue actuelle dans ce favori.",
111
117
  "notification.pinError": "Le favori n'a pas pu être épinglé.",
112
118
  "notification.pinned": "Favori épinglé.",
113
119
  "notification.saveError": "Le favori n'a pas pu être enregistré. Vos modifications sont toujours dans le formulaire.",
@@ -283,6 +283,9 @@ const ADMIN_QUERY_DEPTH = 5;
283
283
  const NO_VALUE_OPERATORS = ["$null", "$notNull"];
284
284
  const LIST_OPERATORS = ["$in", "$notIn"];
285
285
  const RANGE_OPERATORS = ["$between"];
286
+ const MAX_LIST_ITEMS = 100;
287
+ const MAX_ALL_CONDITIONS = 20;
288
+ const maxConditions = (match) => match === "all" ? MAX_ALL_CONDITIONS : MAX_LIST_ITEMS;
286
289
  const BASE$1 = ["$eq", "$ne", "$null", "$notNull"];
287
290
  const NUMERIC = ["$gt", "$gte", "$lt", "$lte"];
288
291
  const SENSITIVE = ["$eqi", "$nei"];
@@ -345,6 +348,7 @@ const inputToDatetime = (value) => {
345
348
  return Number.isNaN(date.getTime()) ? value : date.toISOString();
346
349
  };
347
350
  const splitList = (value) => value.split(",").map((item) => item.trim()).filter(Boolean);
351
+ const hasTooManyValues = (row) => LIST_OPERATORS.includes(row.operator) && splitList(row.value).length > MAX_LIST_ITEMS;
348
352
  const validateRow = (row, fields) => {
349
353
  const field = fields.get(row.field);
350
354
  if (!field) return "field";
@@ -353,7 +357,10 @@ const validateRow = (row, fields) => {
353
357
  }
354
358
  if (NO_VALUE_OPERATORS.includes(row.operator)) return null;
355
359
  if (field.type === "boolean") return BOOLEAN_VALUES.includes(row.value) ? null : "value";
356
- if (LIST_OPERATORS.includes(row.operator)) return splitList(row.value).length ? null : "value";
360
+ if (LIST_OPERATORS.includes(row.operator)) {
361
+ const count = splitList(row.value).length;
362
+ return count && count <= MAX_LIST_ITEMS ? null : "value";
363
+ }
357
364
  if (!row.value.trim()) return "value";
358
365
  if (RANGE_OPERATORS.includes(row.operator) && !(row.valueTo ?? "").trim()) return "valueTo";
359
366
  return null;
@@ -464,6 +471,31 @@ const countConditions = (filters) => {
464
471
  }
465
472
  return count;
466
473
  };
474
+ const INDEX_KEY = /^\d+$/;
475
+ const listLength = (value) => {
476
+ if (Array.isArray(value)) return value.length;
477
+ if (!value || typeof value !== "object") return 0;
478
+ const keys = Object.keys(value);
479
+ return keys.length && keys.every((key) => INDEX_KEY.test(key)) ? Math.max(...keys.map(Number)) + 1 : 0;
480
+ };
481
+ const exceedsItemLimit = (value) => {
482
+ if (Array.isArray(value)) {
483
+ return value.length > MAX_LIST_ITEMS || value.some(exceedsItemLimit);
484
+ }
485
+ if (!value || typeof value !== "object") return false;
486
+ const keys = Object.keys(value);
487
+ if (keys.length && keys.every((key) => INDEX_KEY.test(key))) {
488
+ if (keys.some((key) => Number(key) >= MAX_LIST_ITEMS)) return true;
489
+ }
490
+ return Object.values(value).some(exceedsItemLimit);
491
+ };
492
+ const exceedsListLimit = (value) => {
493
+ const filters = value?.filters;
494
+ if (filters && typeof filters === "object") {
495
+ if (listLength(filters.$and) > MAX_ALL_CONDITIONS) return true;
496
+ }
497
+ return exceedsItemLimit(value);
498
+ };
467
499
  const FOCUSABLE = [
468
500
  "a[href]",
469
501
  "button:not([disabled])",
@@ -539,7 +571,10 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
539
571
  const updateRow = (id, patch) => setRows((prev) => prev.map((row) => row.id === id ? { ...row, ...patch } : row));
540
572
  const activeRows = rows.filter((row) => row.field || row.value);
541
573
  const rowErrors = new Map(activeRows.map((row) => [row.id, validateRow(row, fieldMap)]));
542
- const hasErrors = [...rowErrors.values()].some(Boolean);
574
+ const rowLimit = maxConditions(match);
575
+ const tooManyRows = activeRows.length > rowLimit;
576
+ const atRowLimit = rows.length >= rowLimit;
577
+ const hasErrors = tooManyRows || [...rowErrors.values()].some(Boolean);
543
578
  const apply = () => {
544
579
  setShowErrors(true);
545
580
  if (hasErrors) return;
@@ -567,13 +602,22 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
567
602
  onOpenChange(false);
568
603
  };
569
604
  const errorText = (row, part) => {
605
+ if (part === "value" && hasTooManyValues(row)) {
606
+ return formatMessage(
607
+ msg(
608
+ "filters.errorTooManyValues",
609
+ "Enter at most {max} values. Strapi does not accept longer lists."
610
+ ),
611
+ { max: MAX_LIST_ITEMS }
612
+ );
613
+ }
570
614
  if (!showErrors || rowErrors.get(row.id) !== part) return void 0;
571
615
  if (part === "field") return formatMessage(msg("filters.errorField", "Choose a field."));
572
616
  if (part === "operator")
573
617
  return formatMessage(msg("filters.errorOperator", "Choose a condition."));
574
618
  return formatMessage(msg("filters.errorValue", "Enter a value."));
575
619
  };
576
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { onKeyDown: keepFocusInside, children: [
620
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { onKeyDown: keepFocusInside, "aria-describedby": void 0, children: [
577
621
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { closeLabel: formatMessage(msg("form.close", "Close")), children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: formatMessage(msg("filters.title", "Advanced filters")) }) }),
578
622
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", padding: 6, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { small: true, children: formatMessage(msg("state.loading", "Loading")) }) }) : error ? /* @__PURE__ */ jsxRuntime.jsx(
579
623
  designSystem.Alert,
@@ -653,15 +697,44 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
653
697
  ) }, row.id))
654
698
  }
655
699
  ),
656
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
657
- designSystem.TextButton,
658
- {
659
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
660
- ...TEXT_BUTTON_TARGET,
661
- onClick: () => setRows((prev) => [...prev, emptyRow()]),
662
- children: formatMessage(msg("filters.add", "Add condition"))
663
- }
664
- ) })
700
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 2, children: [
701
+ /* @__PURE__ */ jsxRuntime.jsx(
702
+ designSystem.TextButton,
703
+ {
704
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
705
+ ...TEXT_BUTTON_TARGET,
706
+ disabled: atRowLimit,
707
+ "aria-describedby": atRowLimit ? "magic-mark-filters-row-limit" : void 0,
708
+ onClick: () => setRows((prev) => [...prev, emptyRow()]),
709
+ children: formatMessage(msg("filters.add", "Add condition"))
710
+ }
711
+ ),
712
+ atRowLimit ? /* @__PURE__ */ jsxRuntime.jsx(
713
+ designSystem.Typography,
714
+ {
715
+ id: "magic-mark-filters-row-limit",
716
+ variant: "pi",
717
+ textColor: tooManyRows ? "danger600" : "neutral600",
718
+ role: tooManyRows ? "alert" : void 0,
719
+ children: formatMessage(
720
+ match === "all" ? tooManyRows ? msg(
721
+ "filters.errorTooManyConditionsAll",
722
+ "With All conditions, keep at most {max} conditions: the Content Manager list does not open with more. Remove conditions or choose Any condition."
723
+ ) : msg(
724
+ "filters.maxConditionsAll",
725
+ "With All conditions, a filter can have at most {max} conditions. The Content Manager list does not open with more."
726
+ ) : tooManyRows ? msg(
727
+ "filters.errorTooManyConditions",
728
+ "Remove conditions until at most {max} are left. Strapi does not accept more."
729
+ ) : msg(
730
+ "filters.maxConditions",
731
+ "A filter can have at most {max} conditions, the most Strapi accepts."
732
+ ),
733
+ { max: rowLimit }
734
+ )
735
+ }
736
+ ) : null
737
+ ] })
665
738
  ] }) }),
666
739
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
667
740
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "danger-light", onClick: clearAll, disabled: !query.filters, children: formatMessage(msg("filters.clear", "Clear all")) }),
@@ -990,6 +1063,19 @@ const useOpenBookmark = () => {
990
1063
  return;
991
1064
  }
992
1065
  const parsed = parseQuery(bookmark.query);
1066
+ if (exceedsListLimit(parsed)) {
1067
+ toggleNotification({
1068
+ type: "warning",
1069
+ timeout: 15e3,
1070
+ message: formatMessage(
1071
+ msg(
1072
+ "notification.listTooLong",
1073
+ "This bookmark was not opened: its filters have more values or conditions than Strapi accepts. Open the list, narrow the filters, then save the current view in this bookmark."
1074
+ )
1075
+ )
1076
+ });
1077
+ return;
1078
+ }
993
1079
  let saved = parsed;
994
1080
  try {
995
1081
  saved = normalizeSavedQuery(parsed, await loadInit(get), location.uid);
@@ -1798,7 +1884,7 @@ const index = {
1798
1884
  to: `plugins/${pluginId}`,
1799
1885
  icon: PluginIcon,
1800
1886
  intlLabel: { id: `${pluginId}.plugin.name`, defaultMessage: "Magic Mark" },
1801
- Component: () => Promise.resolve().then(() => require("./App-DxALpMK_.js")),
1887
+ Component: () => Promise.resolve().then(() => require("./App-uN9SP52K.js")),
1802
1888
  permissions: PERMISSIONS.read
1803
1889
  });
1804
1890
  app.registerPlugin({ id: pluginId, name: "Magic Mark" });
@@ -1813,7 +1899,7 @@ const index = {
1813
1899
  label: { id: `${pluginId}.widget.link`, defaultMessage: "Manage bookmarks" },
1814
1900
  href: `/plugins/${pluginId}`
1815
1901
  },
1816
- component: async () => (await Promise.resolve().then(() => require("./PinnedBookmarksWidget-VM6buexr.js"))).default,
1902
+ component: async () => (await Promise.resolve().then(() => require("./PinnedBookmarksWidget-BpJ0pz5_.js"))).default,
1817
1903
  permissions: PERMISSIONS.read
1818
1904
  });
1819
1905
  }
@@ -1829,7 +1915,7 @@ const index = {
1829
1915
  return Promise.all(
1830
1916
  locales.map(async (locale) => {
1831
1917
  try {
1832
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-Cn90CcnC.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-GDfO_EfL.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-6o-_RABX.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-BOZS5mJT.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-D13SxuK2.js")) }), `./translations/${locale}.json`, 3);
1918
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-D9BJ4u7r.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-BIMTC0Id.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-YRbu_LzT.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-b0q34Kvn.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-DkmTAK17.js")) }), `./translations/${locale}.json`, 3);
1833
1919
  return {
1834
1920
  data: Object.fromEntries(
1835
1921
  Object.entries(data).map(([key, value]) => [
@@ -1,6 +1,6 @@
1
1
  import { Plus, Trash, Book, Star, Heart, Lightning, Rocket, Sparkle, Pencil, File, Folder, Image, Link, PriceTag, Filter, Search, Calendar, Clock, Bell, CheckCircle, Mail, User, Briefcase, Gift, Globe, House, Feather, TrendUp, Stack, Cog, PuzzlePiece, Code, ChartPie, Cross, ArrowClockwise, Pin, SlidersHorizontal } from "@strapi/icons";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
- import { Modal, Flex, Loader, Alert, Button, Field, SingleSelect, SingleSelectOption, Box, TextButton, Grid, Combobox, ComboboxOption, IconButton, MultiSelect, MultiSelectOption, TextInput, Typography, Radio, Tag, Textarea, Dialog, Popover, Divider, Link as Link$1 } from "@strapi/design-system";
3
+ import { Modal, Flex, Loader, Alert, Button, Field, SingleSelect, SingleSelectOption, Box, TextButton, Typography, Grid, Combobox, ComboboxOption, IconButton, MultiSelect, MultiSelectOption, TextInput, Radio, Tag, Textarea, Dialog, Popover, Divider, Link as Link$1 } from "@strapi/design-system";
4
4
  import { useFetchClient, useAuth, useQueryParams, withEncodedUserParams, deepEncodeQueryValues, useNotification, ConfirmDialog, useRBAC } from "@strapi/strapi/admin";
5
5
  import { useState, useEffect, useMemo, useCallback, useRef } from "react";
6
6
  import { useIntl } from "react-intl";
@@ -280,6 +280,9 @@ const ADMIN_QUERY_DEPTH = 5;
280
280
  const NO_VALUE_OPERATORS = ["$null", "$notNull"];
281
281
  const LIST_OPERATORS = ["$in", "$notIn"];
282
282
  const RANGE_OPERATORS = ["$between"];
283
+ const MAX_LIST_ITEMS = 100;
284
+ const MAX_ALL_CONDITIONS = 20;
285
+ const maxConditions = (match) => match === "all" ? MAX_ALL_CONDITIONS : MAX_LIST_ITEMS;
283
286
  const BASE$1 = ["$eq", "$ne", "$null", "$notNull"];
284
287
  const NUMERIC = ["$gt", "$gte", "$lt", "$lte"];
285
288
  const SENSITIVE = ["$eqi", "$nei"];
@@ -342,6 +345,7 @@ const inputToDatetime = (value) => {
342
345
  return Number.isNaN(date.getTime()) ? value : date.toISOString();
343
346
  };
344
347
  const splitList = (value) => value.split(",").map((item) => item.trim()).filter(Boolean);
348
+ const hasTooManyValues = (row) => LIST_OPERATORS.includes(row.operator) && splitList(row.value).length > MAX_LIST_ITEMS;
345
349
  const validateRow = (row, fields) => {
346
350
  const field = fields.get(row.field);
347
351
  if (!field) return "field";
@@ -350,7 +354,10 @@ const validateRow = (row, fields) => {
350
354
  }
351
355
  if (NO_VALUE_OPERATORS.includes(row.operator)) return null;
352
356
  if (field.type === "boolean") return BOOLEAN_VALUES.includes(row.value) ? null : "value";
353
- if (LIST_OPERATORS.includes(row.operator)) return splitList(row.value).length ? null : "value";
357
+ if (LIST_OPERATORS.includes(row.operator)) {
358
+ const count = splitList(row.value).length;
359
+ return count && count <= MAX_LIST_ITEMS ? null : "value";
360
+ }
354
361
  if (!row.value.trim()) return "value";
355
362
  if (RANGE_OPERATORS.includes(row.operator) && !(row.valueTo ?? "").trim()) return "valueTo";
356
363
  return null;
@@ -461,6 +468,31 @@ const countConditions = (filters) => {
461
468
  }
462
469
  return count;
463
470
  };
471
+ const INDEX_KEY = /^\d+$/;
472
+ const listLength = (value) => {
473
+ if (Array.isArray(value)) return value.length;
474
+ if (!value || typeof value !== "object") return 0;
475
+ const keys = Object.keys(value);
476
+ return keys.length && keys.every((key) => INDEX_KEY.test(key)) ? Math.max(...keys.map(Number)) + 1 : 0;
477
+ };
478
+ const exceedsItemLimit = (value) => {
479
+ if (Array.isArray(value)) {
480
+ return value.length > MAX_LIST_ITEMS || value.some(exceedsItemLimit);
481
+ }
482
+ if (!value || typeof value !== "object") return false;
483
+ const keys = Object.keys(value);
484
+ if (keys.length && keys.every((key) => INDEX_KEY.test(key))) {
485
+ if (keys.some((key) => Number(key) >= MAX_LIST_ITEMS)) return true;
486
+ }
487
+ return Object.values(value).some(exceedsItemLimit);
488
+ };
489
+ const exceedsListLimit = (value) => {
490
+ const filters = value?.filters;
491
+ if (filters && typeof filters === "object") {
492
+ if (listLength(filters.$and) > MAX_ALL_CONDITIONS) return true;
493
+ }
494
+ return exceedsItemLimit(value);
495
+ };
464
496
  const FOCUSABLE = [
465
497
  "a[href]",
466
498
  "button:not([disabled])",
@@ -536,7 +568,10 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
536
568
  const updateRow = (id, patch) => setRows((prev) => prev.map((row) => row.id === id ? { ...row, ...patch } : row));
537
569
  const activeRows = rows.filter((row) => row.field || row.value);
538
570
  const rowErrors = new Map(activeRows.map((row) => [row.id, validateRow(row, fieldMap)]));
539
- const hasErrors = [...rowErrors.values()].some(Boolean);
571
+ const rowLimit = maxConditions(match);
572
+ const tooManyRows = activeRows.length > rowLimit;
573
+ const atRowLimit = rows.length >= rowLimit;
574
+ const hasErrors = tooManyRows || [...rowErrors.values()].some(Boolean);
540
575
  const apply = () => {
541
576
  setShowErrors(true);
542
577
  if (hasErrors) return;
@@ -564,13 +599,22 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
564
599
  onOpenChange(false);
565
600
  };
566
601
  const errorText = (row, part) => {
602
+ if (part === "value" && hasTooManyValues(row)) {
603
+ return formatMessage(
604
+ msg(
605
+ "filters.errorTooManyValues",
606
+ "Enter at most {max} values. Strapi does not accept longer lists."
607
+ ),
608
+ { max: MAX_LIST_ITEMS }
609
+ );
610
+ }
567
611
  if (!showErrors || rowErrors.get(row.id) !== part) return void 0;
568
612
  if (part === "field") return formatMessage(msg("filters.errorField", "Choose a field."));
569
613
  if (part === "operator")
570
614
  return formatMessage(msg("filters.errorOperator", "Choose a condition."));
571
615
  return formatMessage(msg("filters.errorValue", "Enter a value."));
572
616
  };
573
- return /* @__PURE__ */ jsx(Modal.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(Modal.Content, { onKeyDown: keepFocusInside, children: [
617
+ return /* @__PURE__ */ jsx(Modal.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(Modal.Content, { onKeyDown: keepFocusInside, "aria-describedby": void 0, children: [
574
618
  /* @__PURE__ */ jsx(Modal.Header, { closeLabel: formatMessage(msg("form.close", "Close")), children: /* @__PURE__ */ jsx(Modal.Title, { children: formatMessage(msg("filters.title", "Advanced filters")) }) }),
575
619
  /* @__PURE__ */ jsx(Modal.Body, { children: isLoading ? /* @__PURE__ */ jsx(Flex, { justifyContent: "center", padding: 6, children: /* @__PURE__ */ jsx(Loader, { small: true, children: formatMessage(msg("state.loading", "Loading")) }) }) : error ? /* @__PURE__ */ jsx(
576
620
  Alert,
@@ -650,15 +694,44 @@ const AdvancedFiltersModal = ({ open, onOpenChange, uid }) => {
650
694
  ) }, row.id))
651
695
  }
652
696
  ),
653
- /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
654
- TextButton,
655
- {
656
- startIcon: /* @__PURE__ */ jsx(Plus, {}),
657
- ...TEXT_BUTTON_TARGET,
658
- onClick: () => setRows((prev) => [...prev, emptyRow()]),
659
- children: formatMessage(msg("filters.add", "Add condition"))
660
- }
661
- ) })
697
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", gap: 2, children: [
698
+ /* @__PURE__ */ jsx(
699
+ TextButton,
700
+ {
701
+ startIcon: /* @__PURE__ */ jsx(Plus, {}),
702
+ ...TEXT_BUTTON_TARGET,
703
+ disabled: atRowLimit,
704
+ "aria-describedby": atRowLimit ? "magic-mark-filters-row-limit" : void 0,
705
+ onClick: () => setRows((prev) => [...prev, emptyRow()]),
706
+ children: formatMessage(msg("filters.add", "Add condition"))
707
+ }
708
+ ),
709
+ atRowLimit ? /* @__PURE__ */ jsx(
710
+ Typography,
711
+ {
712
+ id: "magic-mark-filters-row-limit",
713
+ variant: "pi",
714
+ textColor: tooManyRows ? "danger600" : "neutral600",
715
+ role: tooManyRows ? "alert" : void 0,
716
+ children: formatMessage(
717
+ match === "all" ? tooManyRows ? msg(
718
+ "filters.errorTooManyConditionsAll",
719
+ "With All conditions, keep at most {max} conditions: the Content Manager list does not open with more. Remove conditions or choose Any condition."
720
+ ) : msg(
721
+ "filters.maxConditionsAll",
722
+ "With All conditions, a filter can have at most {max} conditions. The Content Manager list does not open with more."
723
+ ) : tooManyRows ? msg(
724
+ "filters.errorTooManyConditions",
725
+ "Remove conditions until at most {max} are left. Strapi does not accept more."
726
+ ) : msg(
727
+ "filters.maxConditions",
728
+ "A filter can have at most {max} conditions, the most Strapi accepts."
729
+ ),
730
+ { max: rowLimit }
731
+ )
732
+ }
733
+ ) : null
734
+ ] })
662
735
  ] }) }),
663
736
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
664
737
  /* @__PURE__ */ jsx(Button, { variant: "danger-light", onClick: clearAll, disabled: !query.filters, children: formatMessage(msg("filters.clear", "Clear all")) }),
@@ -987,6 +1060,19 @@ const useOpenBookmark = () => {
987
1060
  return;
988
1061
  }
989
1062
  const parsed = parseQuery(bookmark.query);
1063
+ if (exceedsListLimit(parsed)) {
1064
+ toggleNotification({
1065
+ type: "warning",
1066
+ timeout: 15e3,
1067
+ message: formatMessage(
1068
+ msg(
1069
+ "notification.listTooLong",
1070
+ "This bookmark was not opened: its filters have more values or conditions than Strapi accepts. Open the list, narrow the filters, then save the current view in this bookmark."
1071
+ )
1072
+ )
1073
+ });
1074
+ return;
1075
+ }
990
1076
  let saved = parsed;
991
1077
  try {
992
1078
  saved = normalizeSavedQuery(parsed, await loadInit(get), location.uid);
@@ -1795,7 +1881,7 @@ const index = {
1795
1881
  to: `plugins/${pluginId}`,
1796
1882
  icon: PluginIcon,
1797
1883
  intlLabel: { id: `${pluginId}.plugin.name`, defaultMessage: "Magic Mark" },
1798
- Component: () => import("./App-BIc-2qv8.mjs"),
1884
+ Component: () => import("./App-CsSuEj9M.mjs"),
1799
1885
  permissions: PERMISSIONS.read
1800
1886
  });
1801
1887
  app.registerPlugin({ id: pluginId, name: "Magic Mark" });
@@ -1810,7 +1896,7 @@ const index = {
1810
1896
  label: { id: `${pluginId}.widget.link`, defaultMessage: "Manage bookmarks" },
1811
1897
  href: `/plugins/${pluginId}`
1812
1898
  },
1813
- component: async () => (await import("./PinnedBookmarksWidget-BWiAKlnA.mjs")).default,
1899
+ component: async () => (await import("./PinnedBookmarksWidget-hj8PkIR8.mjs")).default,
1814
1900
  permissions: PERMISSIONS.read
1815
1901
  });
1816
1902
  }
@@ -1826,7 +1912,7 @@ const index = {
1826
1912
  return Promise.all(
1827
1913
  locales.map(async (locale) => {
1828
1914
  try {
1829
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-BF0nCjGF.mjs"), "./translations/en.json": () => import("./en-D-EGHodf.mjs"), "./translations/es.json": () => import("./es-C33BufuB.mjs"), "./translations/fr.json": () => import("./fr-DJHTjkmb.mjs"), "./translations/pt.json": () => import("./pt-yoB1jrsq.mjs") }), `./translations/${locale}.json`, 3);
1915
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-DFgWtRSV.mjs"), "./translations/en.json": () => import("./en-fhVztOaB.mjs"), "./translations/es.json": () => import("./es-BYIWE02H.mjs"), "./translations/fr.json": () => import("./fr-7clZM722.mjs"), "./translations/pt.json": () => import("./pt-Chy7Dok7.mjs") }), `./translations/${locale}.json`, 3);
1830
1916
  return {
1831
1917
  data: Object.fromEntries(
1832
1918
  Object.entries(data).map(([key, value]) => [
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-C9FMo0F_.js");
3
+ const index = require("./index-CcVZyEc_.js");
4
4
  require("@strapi/icons");
5
5
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-BJ8l6K7P.mjs";
1
+ import { i } from "./index-JMvoPs_C.mjs";
2
2
  import "@strapi/icons";
3
3
  export {
4
4
  i as default
@@ -18,6 +18,9 @@ const pt = {
18
18
  "filters.conditions": "Condições",
19
19
  "filters.errorField": "Escolha um campo.",
20
20
  "filters.errorOperator": "Escolha uma condição.",
21
+ "filters.errorTooManyConditions": "Remova condições até restarem no máximo {max}. O Strapi não aceita mais.",
22
+ "filters.errorTooManyConditionsAll": 'Com "Todas as condições", use no máximo {max} condições: a lista do Content Manager não abre com mais. Remova condições ou escolha "Qualquer condição".',
23
+ "filters.errorTooManyValues": "Insira no máximo {max} valores. O Strapi não aceita listas mais longas.",
21
24
  "filters.errorValue": "Informe um valor.",
22
25
  "filters.false": "falso",
23
26
  "filters.field": "Campo",
@@ -30,6 +33,8 @@ const pt = {
30
33
  "filters.matchAll": "Todas as condições",
31
34
  "filters.matchAny": "Qualquer condição",
32
35
  "filters.matchAnyHint": "Estas condições não aparecem como etiquetas de filtro acima da lista.",
36
+ "filters.maxConditions": "Um filtro pode ter no máximo {max} condições, o máximo que o Strapi aceita.",
37
+ "filters.maxConditionsAll": 'Com "Todas as condições", um filtro pode ter no máximo {max} condições. A lista do Content Manager não abre com mais.',
33
38
  "filters.noFields": "Nenhum campo correspondente",
34
39
  "filters.operator": "Condição",
35
40
  "filters.remove": "Remover a condição {number}",
@@ -106,6 +111,7 @@ const pt = {
106
111
  "notification.invalidPath": "Este favorito não aponta para uma visualização de lista.",
107
112
  "notification.linkCopied": "Link copiado.",
108
113
  "notification.linkCopyError": "Não foi possível copiar o link.",
114
+ "notification.listTooLong": "Este favorito não foi aberto: os filtros têm mais valores ou condições do que o Strapi aceita. Abra a lista, restrinja os filtros e salve a visualização atual neste favorito.",
109
115
  "notification.pinError": "Não foi possível fixar o favorito.",
110
116
  "notification.pinned": "Favorito fixado.",
111
117
  "notification.saveError": "Não foi possível salvar o favorito. Suas alterações continuam no formulário.",
@@ -20,6 +20,9 @@ const pt = {
20
20
  "filters.conditions": "Condições",
21
21
  "filters.errorField": "Escolha um campo.",
22
22
  "filters.errorOperator": "Escolha uma condição.",
23
+ "filters.errorTooManyConditions": "Remova condições até restarem no máximo {max}. O Strapi não aceita mais.",
24
+ "filters.errorTooManyConditionsAll": 'Com "Todas as condições", use no máximo {max} condições: a lista do Content Manager não abre com mais. Remova condições ou escolha "Qualquer condição".',
25
+ "filters.errorTooManyValues": "Insira no máximo {max} valores. O Strapi não aceita listas mais longas.",
23
26
  "filters.errorValue": "Informe um valor.",
24
27
  "filters.false": "falso",
25
28
  "filters.field": "Campo",
@@ -32,6 +35,8 @@ const pt = {
32
35
  "filters.matchAll": "Todas as condições",
33
36
  "filters.matchAny": "Qualquer condição",
34
37
  "filters.matchAnyHint": "Estas condições não aparecem como etiquetas de filtro acima da lista.",
38
+ "filters.maxConditions": "Um filtro pode ter no máximo {max} condições, o máximo que o Strapi aceita.",
39
+ "filters.maxConditionsAll": 'Com "Todas as condições", um filtro pode ter no máximo {max} condições. A lista do Content Manager não abre com mais.',
35
40
  "filters.noFields": "Nenhum campo correspondente",
36
41
  "filters.operator": "Condição",
37
42
  "filters.remove": "Remover a condição {number}",
@@ -108,6 +113,7 @@ const pt = {
108
113
  "notification.invalidPath": "Este favorito não aponta para uma visualização de lista.",
109
114
  "notification.linkCopied": "Link copiado.",
110
115
  "notification.linkCopyError": "Não foi possível copiar o link.",
116
+ "notification.listTooLong": "Este favorito não foi aberto: os filtros têm mais valores ou condições do que o Strapi aceita. Abra a lista, restrinja os filtros e salve a visualização atual neste favorito.",
111
117
  "notification.pinError": "Não foi possível fixar o favorito.",
112
118
  "notification.pinned": "Favorito fixado.",
113
119
  "notification.saveError": "Não foi possível salvar o favorito. Suas alterações continuam no formulário.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-magic-mark",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "Bookmarks for the Strapi 5 Content Manager: save list views with their filters, sort order, search and locale, pin them and share them with roles or admin users.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -81,8 +81,8 @@
81
81
  "@strapi/design-system": "^2.3.1",
82
82
  "@strapi/icons": "^2.3.1",
83
83
  "@strapi/sdk-plugin": "^6.1.1",
84
- "@strapi/strapi": "^5.62.0",
85
- "@strapi/typescript-utils": "^5.62.0",
84
+ "@strapi/strapi": "^5.63.0",
85
+ "@strapi/typescript-utils": "^5.63.0",
86
86
  "@types/qs": "^6.15.1",
87
87
  "@types/react": "^18.3.31",
88
88
  "@types/react-dom": "^18.3.7",