@vicacha-devs/strapi-plugin-notes 0.0.0-stage → 1.1.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.
Files changed (66) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +20 -2
  3. package/dist/admin/NotesHomePage-CIWSOu3n.js +457 -0
  4. package/dist/admin/NotesHomePage-Da5Eu2o9.cjs +475 -0
  5. package/dist/admin/ar-NJ-XJhAU.cjs +64 -0
  6. package/dist/admin/ar-uSBvoP4-.js +64 -0
  7. package/dist/admin/de-DlFY4yCr.js +64 -0
  8. package/dist/admin/de-d-M42GQs.cjs +64 -0
  9. package/dist/admin/en-C8MGI5Fp.cjs +64 -0
  10. package/dist/admin/en-DQUtJt3K.js +64 -0
  11. package/dist/admin/es-BZY_kUPd.cjs +64 -0
  12. package/dist/admin/es-DcTVGahO.js +64 -0
  13. package/dist/admin/fr-D6Ism7Y3.cjs +64 -0
  14. package/dist/admin/fr-QW7vMjBs.js +64 -0
  15. package/dist/admin/index-BD0jLH1y.cjs +1458 -0
  16. package/dist/admin/index-ClQtejgN.js +1442 -0
  17. package/dist/admin/index.cjs +4 -0
  18. package/dist/admin/index.js +4 -0
  19. package/dist/admin/index.mjs +4 -0
  20. package/dist/admin/it-DyBVYzjD.cjs +64 -0
  21. package/dist/admin/it-F24NTVne.js +64 -0
  22. package/dist/admin/pt-B4OG4ZiY.js +64 -0
  23. package/dist/admin/pt-BOHJueLP.cjs +64 -0
  24. package/dist/admin/ru-DGiT4YZI.js +64 -0
  25. package/dist/admin/ru-DhigZM8k.cjs +64 -0
  26. package/dist/admin/src/components/DeleteNoteDialog.d.ts +10 -0
  27. package/dist/admin/src/components/Initializer.d.ts +5 -0
  28. package/dist/admin/src/components/NoteListItem.d.ts +10 -0
  29. package/dist/admin/src/components/NoteModal.d.ts +18 -0
  30. package/dist/admin/src/components/NotesHubFilterBar.d.ts +14 -0
  31. package/dist/admin/src/components/NotesSidePanel.d.ts +13 -0
  32. package/dist/admin/src/components/PluginIcon.d.ts +2 -0
  33. package/dist/admin/src/hooks/useNotes.d.ts +12 -0
  34. package/dist/admin/src/index.d.ts +21 -0
  35. package/dist/admin/src/pages/NotesHomePage.d.ts +3 -0
  36. package/dist/admin/src/pluginId.d.ts +4 -0
  37. package/dist/admin/src/utils/getTrad.d.ts +2 -0
  38. package/dist/admin/src/utils/index.d.ts +1 -0
  39. package/dist/admin/tr-CNFZeutu.cjs +64 -0
  40. package/dist/admin/tr-CwzORNP2.js +64 -0
  41. package/dist/admin/zh-BriU4KiK.cjs +64 -0
  42. package/dist/admin/zh-C1EjzGrj.js +64 -0
  43. package/dist/package.json +3 -0
  44. package/dist/server/index.cjs +1212 -0
  45. package/dist/server/index.js +1212 -0
  46. package/dist/server/index.mjs +1212 -0
  47. package/dist/server/src/bootstrap.d.ts +5 -0
  48. package/dist/server/src/config/index.d.ts +8 -0
  49. package/dist/server/src/content-types/index.d.ts +70 -0
  50. package/dist/server/src/content-types/note/schema.json.d.ts +68 -0
  51. package/dist/server/src/controllers/index.d.ts +2 -0
  52. package/dist/server/src/controllers/notesController.d.ts +27 -0
  53. package/dist/server/src/destroy.d.ts +5 -0
  54. package/dist/server/src/index.d.ts +2 -0
  55. package/dist/server/src/register.d.ts +5 -0
  56. package/dist/server/src/routes/admin.d.ts +17 -0
  57. package/dist/server/src/routes/content-api.d.ts +12 -0
  58. package/dist/server/src/routes/index.d.ts +30 -0
  59. package/dist/server/src/services/index.d.ts +2 -0
  60. package/dist/server/src/services/notesQueryHelpers.d.ts +11 -0
  61. package/dist/server/src/services/notesService.d.ts +25 -0
  62. package/dist/shared/index.cjs +525 -0
  63. package/dist/shared/index.d.ts +1 -0
  64. package/dist/shared/index.js +525 -0
  65. package/dist/shared/index.mjs +525 -0
  66. package/package.json +102 -3
@@ -0,0 +1,475 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const designSystem = require("@strapi/design-system");
5
+ const icons = require("@strapi/icons");
6
+ const admin = require("@strapi/strapi/admin");
7
+ const React = require("react");
8
+ const reactIntl = require("react-intl");
9
+ const reactRouterDom = require("react-router-dom");
10
+ const index = require("./index-BD0jLH1y.cjs");
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== "default") {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+ const React__namespace = /* @__PURE__ */ _interopNamespace(React);
29
+ const NotesHubFilterBar = ({
30
+ summary,
31
+ search,
32
+ selectedCategory,
33
+ selectedSlug,
34
+ pinnedOnly,
35
+ onSearchChange,
36
+ onCategoryChange,
37
+ onSlugChange,
38
+ onPinnedOnlyChange
39
+ }) => {
40
+ const { formatMessage } = reactIntl.useIntl();
41
+ const t = (id, defaultMessage) => formatMessage({ id: index.getTrad(id), defaultMessage });
42
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
43
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid.Root, { gap: 4, children: [
44
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 3, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
45
+ designSystem.Box,
46
+ {
47
+ padding: 4,
48
+ background: "neutral0",
49
+ hasRadius: true,
50
+ shadow: "tableShadow",
51
+ style: { width: "100%" },
52
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
53
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", children: t("hub.stats.total", "Total Notes") }),
54
+ /* @__PURE__ */ jsxRuntime.jsx(
55
+ designSystem.Typography,
56
+ {
57
+ variant: "alpha",
58
+ fontWeight: "bold",
59
+ textColor: "neutral800",
60
+ children: summary.total
61
+ }
62
+ )
63
+ ] })
64
+ }
65
+ ) }),
66
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 3, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
67
+ designSystem.Box,
68
+ {
69
+ padding: 4,
70
+ background: "neutral0",
71
+ hasRadius: true,
72
+ shadow: "tableShadow",
73
+ style: { width: "100%" },
74
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
75
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "primary600", children: t("hub.stats.pinned", "Pinned Notes") }),
76
+ /* @__PURE__ */ jsxRuntime.jsx(
77
+ designSystem.Typography,
78
+ {
79
+ variant: "alpha",
80
+ fontWeight: "bold",
81
+ textColor: "primary700",
82
+ children: summary.pinned
83
+ }
84
+ )
85
+ ] })
86
+ }
87
+ ) }),
88
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 3, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
89
+ designSystem.Box,
90
+ {
91
+ padding: 4,
92
+ background: "neutral0",
93
+ hasRadius: true,
94
+ shadow: "tableShadow",
95
+ style: { width: "100%" },
96
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
97
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "danger600", children: t("hub.stats.blockers", "Blockers") }),
98
+ /* @__PURE__ */ jsxRuntime.jsx(
99
+ designSystem.Typography,
100
+ {
101
+ variant: "alpha",
102
+ fontWeight: "bold",
103
+ textColor: "danger700",
104
+ children: summary.byCategory.blocker
105
+ }
106
+ )
107
+ ] })
108
+ }
109
+ ) }),
110
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 3, s: 6, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
111
+ designSystem.Box,
112
+ {
113
+ padding: 4,
114
+ background: "neutral0",
115
+ hasRadius: true,
116
+ shadow: "tableShadow",
117
+ style: { width: "100%" },
118
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
119
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", children: t("hub.stats.todos", "Open Todos") }),
120
+ /* @__PURE__ */ jsxRuntime.jsx(
121
+ designSystem.Typography,
122
+ {
123
+ variant: "alpha",
124
+ fontWeight: "bold",
125
+ textColor: "neutral800",
126
+ children: summary.byCategory.todo
127
+ }
128
+ )
129
+ ] })
130
+ }
131
+ ) })
132
+ ] }),
133
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 4, background: "neutral0", hasRadius: true, shadow: "tableShadow", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, wrap: "wrap", alignItems: "flex-end", children: [
134
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: "2 1 240px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "hubSearch", children: [
135
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: t("hub.filters.search", "Search notes") }),
136
+ /* @__PURE__ */ jsxRuntime.jsx(
137
+ designSystem.TextInput,
138
+ {
139
+ name: "hubSearch",
140
+ value: search,
141
+ onChange: (e) => onSearchChange(e.target.value),
142
+ placeholder: t(
143
+ "hub.filters.search.placeholder",
144
+ "Search by title, content, content type, or author..."
145
+ )
146
+ }
147
+ )
148
+ ] }) }),
149
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: "1 1 180px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "hubCategory", children: [
150
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: t("note.modal.fields.category", "Category") }),
151
+ /* @__PURE__ */ jsxRuntime.jsxs(
152
+ designSystem.SingleSelect,
153
+ {
154
+ value: selectedCategory,
155
+ onChange: (val) => onCategoryChange(
156
+ String(val) || "all"
157
+ ),
158
+ children: [
159
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "all", children: t("category.all", "All categories") }),
160
+ index.NOTE_CATEGORIES.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: cat, children: t(
161
+ index.NOTE_CATEGORY_META[cat].labelKey,
162
+ index.NOTE_CATEGORY_META[cat].defaultLabel
163
+ ) }, cat))
164
+ ]
165
+ }
166
+ )
167
+ ] }) }),
168
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: "1 1 200px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "hubContentType", children: [
169
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: t("hub.filters.contentType", "Content Type") }),
170
+ /* @__PURE__ */ jsxRuntime.jsxs(
171
+ designSystem.SingleSelect,
172
+ {
173
+ value: selectedSlug,
174
+ onChange: (val) => onSlugChange(String(val) || "all"),
175
+ children: [
176
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "all", children: t("hub.filters.contentType.all", "All content types") }),
177
+ summary.entitySlugs.map((slug) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: slug, children: slug }, slug))
178
+ ]
179
+ }
180
+ )
181
+ ] }) }),
182
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(
183
+ designSystem.Checkbox,
184
+ {
185
+ checked: pinnedOnly,
186
+ onCheckedChange: (checked) => onPinnedOnlyChange(Boolean(checked)),
187
+ children: t("hub.filters.pinnedOnly", "Pinned only")
188
+ }
189
+ ) })
190
+ ] }) })
191
+ ] });
192
+ };
193
+ function formatNoteContentPreview(content) {
194
+ return content.length > 90 ? `${content.slice(0, 90)}…` : content;
195
+ }
196
+ const NoteHubActionsCell = ({
197
+ note,
198
+ deepLink,
199
+ t,
200
+ onNavigate,
201
+ onEdit,
202
+ onDelete,
203
+ onTogglePin
204
+ }) => {
205
+ const pinVariant = note.isPinned ? "secondary" : "ghost";
206
+ const pinLabel = note.isPinned ? t("note.actions.unpin", "Unpin note") : t("note.actions.pin", "Pin note");
207
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, alignItems: "center", children: [
208
+ deepLink && /* @__PURE__ */ jsxRuntime.jsx(
209
+ designSystem.IconButton,
210
+ {
211
+ withTooltip: false,
212
+ variant: "ghost",
213
+ label: t("hub.actions.openEntry", "Open Content Manager entry"),
214
+ onClick: () => onNavigate(deepLink),
215
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, {})
216
+ }
217
+ ),
218
+ /* @__PURE__ */ jsxRuntime.jsx(
219
+ designSystem.IconButton,
220
+ {
221
+ withTooltip: false,
222
+ variant: pinVariant,
223
+ label: pinLabel,
224
+ onClick: () => onTogglePin(note),
225
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pin, {})
226
+ }
227
+ ),
228
+ /* @__PURE__ */ jsxRuntime.jsx(
229
+ designSystem.IconButton,
230
+ {
231
+ withTooltip: false,
232
+ variant: "ghost",
233
+ label: t("note.actions.edit", "Edit"),
234
+ onClick: () => onEdit(note),
235
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
236
+ }
237
+ ),
238
+ /* @__PURE__ */ jsxRuntime.jsx(
239
+ designSystem.IconButton,
240
+ {
241
+ withTooltip: false,
242
+ variant: "ghost",
243
+ label: t("note.actions.delete", "Delete"),
244
+ onClick: () => onDelete(note),
245
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
246
+ }
247
+ )
248
+ ] });
249
+ };
250
+ const NoteHubRow = ({
251
+ note,
252
+ locale,
253
+ t,
254
+ onNavigate,
255
+ onEdit,
256
+ onDelete,
257
+ onTogglePin
258
+ }) => {
259
+ const catMeta = index.NOTE_CATEGORY_META[note.category] ?? index.NOTE_CATEGORY_META.general;
260
+ const deepLink = index.buildContentManagerNoteLink(note);
261
+ const entityBadgeText = note.entityDocumentId || String(note.entityId ?? "");
262
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
263
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
264
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
265
+ note.isPinned && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "primary100", textColor: "primary700", children: t("hub.badge.pinned", "PINNED") }),
266
+ /* @__PURE__ */ jsxRuntime.jsx(
267
+ designSystem.Typography,
268
+ {
269
+ fontWeight: "bold",
270
+ textColor: "neutral800",
271
+ role: "button",
272
+ tabIndex: 0,
273
+ style: { cursor: "pointer" },
274
+ onClick: () => onEdit(note),
275
+ onKeyDown: (e) => {
276
+ if (e.key === "Enter" || e.key === " ") {
277
+ e.preventDefault();
278
+ onEdit(note);
279
+ }
280
+ },
281
+ children: note.title
282
+ }
283
+ )
284
+ ] }),
285
+ note.content && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", ellipsis: true, children: formatNoteContentPreview(note.content) })
286
+ ] }) }),
287
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
288
+ designSystem.Badge,
289
+ {
290
+ backgroundColor: catMeta.badgeBackground,
291
+ textColor: catMeta.badgeTextColor,
292
+ children: t(catMeta.labelKey, catMeta.defaultLabel)
293
+ }
294
+ ) }),
295
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
296
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral800", children: note.entitySlug }),
297
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "neutral100", textColor: "neutral700", children: entityBadgeText }),
298
+ note.entityLocale && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "secondary100", textColor: "secondary700", children: note.entityLocale.toUpperCase() })
299
+ ] }) }),
300
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral800", children: index.formatNoteAuthorDisplay(note.createdBy) }) }),
301
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 0, children: [
302
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral800", children: index.formatNoteTimestamp(note.updatedAt ?? note.createdAt, locale) }),
303
+ note.updatedBy && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", children: index.formatNoteAuthorDisplay(note.updatedBy) })
304
+ ] }) }),
305
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
306
+ NoteHubActionsCell,
307
+ {
308
+ note,
309
+ deepLink,
310
+ t,
311
+ onNavigate,
312
+ onEdit,
313
+ onDelete,
314
+ onTogglePin
315
+ }
316
+ ) })
317
+ ] });
318
+ };
319
+ const NotesHomePage = () => {
320
+ const { formatMessage, locale } = reactIntl.useIntl();
321
+ const navigate = reactRouterDom.useNavigate();
322
+ const {
323
+ notes,
324
+ summary,
325
+ isLoading,
326
+ isMutating,
327
+ refetch,
328
+ updateNote,
329
+ deleteNote
330
+ } = index.useNotes({
331
+ includeAllLocales: true
332
+ });
333
+ const [search, setSearch] = React__namespace.useState("");
334
+ const [selectedCategory, setSelectedCategory] = React__namespace.useState("all");
335
+ const [selectedSlug, setSelectedSlug] = React__namespace.useState("all");
336
+ const [pinnedOnly, setPinnedOnly] = React__namespace.useState(false);
337
+ const [editingNote, setEditingNote] = React__namespace.useState(null);
338
+ const [deletingNote, setDeletingNote] = React__namespace.useState(
339
+ null
340
+ );
341
+ React__namespace.useEffect(() => {
342
+ if (!isLoading && selectedSlug !== "all" && !summary.entitySlugs.includes(selectedSlug)) {
343
+ setSelectedSlug("all");
344
+ }
345
+ }, [isLoading, selectedSlug, summary.entitySlugs]);
346
+ const t = (id, defaultMessage, values) => formatMessage({ id: index.getTrad(id), defaultMessage }, values);
347
+ const filteredNotes = React__namespace.useMemo(
348
+ () => index.filterNotesList(notes, {
349
+ search,
350
+ category: selectedCategory,
351
+ entitySlug: selectedSlug === "all" ? void 0 : selectedSlug,
352
+ isPinned: pinnedOnly ? true : void 0,
353
+ includeAllLocales: true,
354
+ sort: "DESC"
355
+ }),
356
+ [notes, search, selectedCategory, selectedSlug, pinnedOnly]
357
+ );
358
+ const handleSaveEdit = async (payload, existingId) => {
359
+ if (existingId !== void 0 && existingId !== "") {
360
+ const updated = await updateNote(existingId, payload);
361
+ if (updated) {
362
+ setEditingNote(null);
363
+ }
364
+ }
365
+ };
366
+ const handleTogglePin = async (note) => {
367
+ const id = note.id || note.documentId;
368
+ if (!id) return;
369
+ await updateNote(id, { isPinned: !note.isPinned });
370
+ };
371
+ const handleConfirmDelete = async (note) => {
372
+ const id = note.id || note.documentId;
373
+ if (!id) return;
374
+ const deleted = await deleteNote(id);
375
+ if (deleted) {
376
+ setDeletingNote(null);
377
+ }
378
+ };
379
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { children: [
380
+ /* @__PURE__ */ jsxRuntime.jsx(
381
+ admin.Layouts.Header,
382
+ {
383
+ title: t("hub.title", "Editorial Notes Hub"),
384
+ subtitle: t(
385
+ "hub.subtitle",
386
+ "Search, filter, and manage editorial notes across all Strapi v5 Content Manager entries."
387
+ ),
388
+ primaryAction: /* @__PURE__ */ jsxRuntime.jsx(
389
+ designSystem.Button,
390
+ {
391
+ variant: "secondary",
392
+ onClick: () => void refetch(),
393
+ loading: isLoading,
394
+ children: t("hub.actions.refresh", "Refresh")
395
+ }
396
+ )
397
+ }
398
+ ),
399
+ /* @__PURE__ */ jsxRuntime.jsxs(admin.Layouts.Content, { children: [
400
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
401
+ /* @__PURE__ */ jsxRuntime.jsx(
402
+ NotesHubFilterBar,
403
+ {
404
+ summary,
405
+ search,
406
+ selectedCategory,
407
+ selectedSlug,
408
+ pinnedOnly,
409
+ onSearchChange: setSearch,
410
+ onCategoryChange: setSelectedCategory,
411
+ onSlugChange: setSelectedSlug,
412
+ onPinnedOnlyChange: setPinnedOnly
413
+ }
414
+ ),
415
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children: t("notes.loading", "Loading Content ...") }) }) : filteredNotes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
416
+ designSystem.EmptyStateLayout,
417
+ {
418
+ content: t(
419
+ "hub.empty",
420
+ "No editorial notes found matching your current filters."
421
+ )
422
+ }
423
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 6, rowCount: filteredNotes.length + 1, children: [
424
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
425
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("note.modal.fields.title", "Title") }) }),
426
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("note.modal.fields.category", "Category") }) }),
427
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("hub.table.targetEntity", "Target Entry") }) }),
428
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("note.modal.meta.createdBy", "Created By") }) }),
429
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("note.modal.meta.updatedAt", "Updated At") }) }),
430
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: t("hub.table.actions", "Actions") }) })
431
+ ] }) }),
432
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: filteredNotes.map((note) => /* @__PURE__ */ jsxRuntime.jsx(
433
+ NoteHubRow,
434
+ {
435
+ note,
436
+ locale,
437
+ t,
438
+ onNavigate: navigate,
439
+ onEdit: setEditingNote,
440
+ onDelete: setDeletingNote,
441
+ onTogglePin: (selected) => void handleTogglePin(selected)
442
+ },
443
+ String(note.id || note.documentId)
444
+ )) })
445
+ ] })
446
+ ] }),
447
+ editingNote && /* @__PURE__ */ jsxRuntime.jsx(
448
+ index.NoteModal,
449
+ {
450
+ entity: {
451
+ id: editingNote.entityId,
452
+ documentId: editingNote.entityDocumentId,
453
+ slug: editingNote.entitySlug,
454
+ locale: editingNote.entityLocale
455
+ },
456
+ note: editingNote,
457
+ isOpen: Boolean(editingNote),
458
+ isSubmitting: isMutating,
459
+ onClose: () => setEditingNote(null),
460
+ onSubmit: handleSaveEdit
461
+ }
462
+ ),
463
+ /* @__PURE__ */ jsxRuntime.jsx(
464
+ index.DeleteNoteDialog,
465
+ {
466
+ note: deletingNote,
467
+ isSubmitting: isMutating,
468
+ onCancel: () => setDeletingNote(null),
469
+ onConfirm: handleConfirmDelete
470
+ }
471
+ )
472
+ ] })
473
+ ] });
474
+ };
475
+ exports.NotesHomePage = NotesHomePage;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ar = {
4
+ "plugin.name": "ملاحظات",
5
+ "notes.loading": "جارٍ تحميل المحتوى ...",
6
+ "notes.notification.loadError": "تعذر تحميل الملاحظات.",
7
+ "notes.notification.created": "تم إنشاء الملاحظة بنجاح.",
8
+ "notes.notification.createError": "فشل إنشاء الملاحظة.",
9
+ "notes.notification.updated": "تم تحديث الملاحظة بنجاح.",
10
+ "notes.notification.updateError": "فشل تحديث الملاحظة.",
11
+ "notes.notification.deleted": "تم حذف الملاحظة بنجاح.",
12
+ "notes.notification.deleteError": "فشل حذف الملاحظة.",
13
+ "notes.sidePanel.count": "{count} ملاحظة",
14
+ "notes.sidePanel.search.placeholder": "تصفية الملاحظات...",
15
+ "notes.sidePanel.empty": "لا توجد ملاحظات تحريرية مرفقة بهذا الإدخال بعد.",
16
+ "notes.sidePanel.noMatches": "لا توجد ملاحظات تطابق عامل التصفية الحالي.",
17
+ "note.modal.new.title": "إضافة ملاحظة",
18
+ "note.modal.existing.title": "تعديل ملاحظة",
19
+ "note.modal.meta.createdAt": "تاريخ الإنشاء",
20
+ "note.modal.meta.createdBy": "أنشئ بواسطة",
21
+ "note.modal.meta.updatedAt": "تاريخ التحديث",
22
+ "note.modal.meta.updatedBy": "حُدّث بواسطة",
23
+ "note.modal.fields.title": "العنوان",
24
+ "note.modal.fields.title.placeholder": "ملخص قصير لهذه الملاحظة...",
25
+ "note.modal.fields.category": "الفئة",
26
+ "note.modal.fields.content": "المحتوى",
27
+ "note.modal.fields.content.placeholder": "اكتب السياق التحريري المفصل أو ملاحظات المراجعة أو الخطوات التالية...",
28
+ "note.modal.fields.isPinned": "تثبيت الملاحظة في الأعلى",
29
+ "note.modal.fields.scopeToLocale": "قصر الملاحظة على اللغة ({locale})",
30
+ "note.modal.validation.titleRequired": "العنوان مطلوب.",
31
+ "note.modal.actions.cancel": "إلغاء",
32
+ "note.modal.actions.save": "حفظ",
33
+ "note.modal.actions.close": "إغلاق النافذة",
34
+ "note.actions.edit": "تعديل",
35
+ "note.actions.delete": "حذف",
36
+ "note.actions.pin": "تثبيت الملاحظة",
37
+ "note.actions.unpin": "إلغاء تثبيت الملاحظة",
38
+ "note.delete.dialog.title": "تأكيد",
39
+ "note.delete.dialog.description": 'هل أنت متأكد من رغبتك في حذف الملاحظة "{title}"؟',
40
+ "note.delete.dialog.confirm": "تأكيد",
41
+ "category.all": "جميع الفئات",
42
+ "category.general": "عام",
43
+ "category.todo": "مهمة",
44
+ "category.blocker": "عائق",
45
+ "category.idea": "فكرة",
46
+ "hub.title": "مركز الملاحظات التحريرية",
47
+ "hub.subtitle": "ابحث وصفِّ وأدر الملاحظات التحريرية عبر جميع إدخالات مدير المحتوى في Strapi v5.",
48
+ "hub.actions.refresh": "تحديث",
49
+ "hub.actions.openEntry": "فتح الإدخال في مدير المحتوى",
50
+ "hub.stats.total": "إجمالي الملاحظات",
51
+ "hub.stats.pinned": "الملاحظات المثبتة",
52
+ "hub.stats.blockers": "العوائق",
53
+ "hub.stats.todos": "المهام المفتوحة",
54
+ "hub.filters.search": "البحث في الملاحظات",
55
+ "hub.filters.search.placeholder": "البحث حسب العنوان أو المحتوى أو نوع المحتوى أو الكاتب...",
56
+ "hub.filters.contentType": "نوع المحتوى",
57
+ "hub.filters.contentType.all": "جميع أنواع المحتوى",
58
+ "hub.filters.pinnedOnly": "المثبتة فقط",
59
+ "hub.table.targetEntity": "الإدخال المستهدف",
60
+ "hub.table.actions": "الإجراءات",
61
+ "hub.badge.pinned": "مثبتة",
62
+ "hub.empty": "لم يتم العثور على ملاحظات تحريرية تطابق عوامل التصفية الحالية."
63
+ };
64
+ exports.default = ar;
@@ -0,0 +1,64 @@
1
+ const ar = {
2
+ "plugin.name": "ملاحظات",
3
+ "notes.loading": "جارٍ تحميل المحتوى ...",
4
+ "notes.notification.loadError": "تعذر تحميل الملاحظات.",
5
+ "notes.notification.created": "تم إنشاء الملاحظة بنجاح.",
6
+ "notes.notification.createError": "فشل إنشاء الملاحظة.",
7
+ "notes.notification.updated": "تم تحديث الملاحظة بنجاح.",
8
+ "notes.notification.updateError": "فشل تحديث الملاحظة.",
9
+ "notes.notification.deleted": "تم حذف الملاحظة بنجاح.",
10
+ "notes.notification.deleteError": "فشل حذف الملاحظة.",
11
+ "notes.sidePanel.count": "{count} ملاحظة",
12
+ "notes.sidePanel.search.placeholder": "تصفية الملاحظات...",
13
+ "notes.sidePanel.empty": "لا توجد ملاحظات تحريرية مرفقة بهذا الإدخال بعد.",
14
+ "notes.sidePanel.noMatches": "لا توجد ملاحظات تطابق عامل التصفية الحالي.",
15
+ "note.modal.new.title": "إضافة ملاحظة",
16
+ "note.modal.existing.title": "تعديل ملاحظة",
17
+ "note.modal.meta.createdAt": "تاريخ الإنشاء",
18
+ "note.modal.meta.createdBy": "أنشئ بواسطة",
19
+ "note.modal.meta.updatedAt": "تاريخ التحديث",
20
+ "note.modal.meta.updatedBy": "حُدّث بواسطة",
21
+ "note.modal.fields.title": "العنوان",
22
+ "note.modal.fields.title.placeholder": "ملخص قصير لهذه الملاحظة...",
23
+ "note.modal.fields.category": "الفئة",
24
+ "note.modal.fields.content": "المحتوى",
25
+ "note.modal.fields.content.placeholder": "اكتب السياق التحريري المفصل أو ملاحظات المراجعة أو الخطوات التالية...",
26
+ "note.modal.fields.isPinned": "تثبيت الملاحظة في الأعلى",
27
+ "note.modal.fields.scopeToLocale": "قصر الملاحظة على اللغة ({locale})",
28
+ "note.modal.validation.titleRequired": "العنوان مطلوب.",
29
+ "note.modal.actions.cancel": "إلغاء",
30
+ "note.modal.actions.save": "حفظ",
31
+ "note.modal.actions.close": "إغلاق النافذة",
32
+ "note.actions.edit": "تعديل",
33
+ "note.actions.delete": "حذف",
34
+ "note.actions.pin": "تثبيت الملاحظة",
35
+ "note.actions.unpin": "إلغاء تثبيت الملاحظة",
36
+ "note.delete.dialog.title": "تأكيد",
37
+ "note.delete.dialog.description": 'هل أنت متأكد من رغبتك في حذف الملاحظة "{title}"؟',
38
+ "note.delete.dialog.confirm": "تأكيد",
39
+ "category.all": "جميع الفئات",
40
+ "category.general": "عام",
41
+ "category.todo": "مهمة",
42
+ "category.blocker": "عائق",
43
+ "category.idea": "فكرة",
44
+ "hub.title": "مركز الملاحظات التحريرية",
45
+ "hub.subtitle": "ابحث وصفِّ وأدر الملاحظات التحريرية عبر جميع إدخالات مدير المحتوى في Strapi v5.",
46
+ "hub.actions.refresh": "تحديث",
47
+ "hub.actions.openEntry": "فتح الإدخال في مدير المحتوى",
48
+ "hub.stats.total": "إجمالي الملاحظات",
49
+ "hub.stats.pinned": "الملاحظات المثبتة",
50
+ "hub.stats.blockers": "العوائق",
51
+ "hub.stats.todos": "المهام المفتوحة",
52
+ "hub.filters.search": "البحث في الملاحظات",
53
+ "hub.filters.search.placeholder": "البحث حسب العنوان أو المحتوى أو نوع المحتوى أو الكاتب...",
54
+ "hub.filters.contentType": "نوع المحتوى",
55
+ "hub.filters.contentType.all": "جميع أنواع المحتوى",
56
+ "hub.filters.pinnedOnly": "المثبتة فقط",
57
+ "hub.table.targetEntity": "الإدخال المستهدف",
58
+ "hub.table.actions": "الإجراءات",
59
+ "hub.badge.pinned": "مثبتة",
60
+ "hub.empty": "لم يتم العثور على ملاحظات تحريرية تطابق عوامل التصفية الحالية."
61
+ };
62
+ export {
63
+ ar as default
64
+ };
@@ -0,0 +1,64 @@
1
+ const de = {
2
+ "plugin.name": "Notizen",
3
+ "notes.loading": "Inhalt wird geladen ...",
4
+ "notes.notification.loadError": "Notizen konnten nicht geladen werden.",
5
+ "notes.notification.created": "Notiz wurde erfolgreich erstellt.",
6
+ "notes.notification.createError": "Notiz konnte nicht erstellt werden.",
7
+ "notes.notification.updated": "Notiz wurde erfolgreich aktualisiert.",
8
+ "notes.notification.updateError": "Notiz konnte nicht aktualisiert werden.",
9
+ "notes.notification.deleted": "Notiz wurde erfolgreich gelöscht.",
10
+ "notes.notification.deleteError": "Notiz konnte nicht gelöscht werden.",
11
+ "notes.sidePanel.count": "{count} Notiz(en)",
12
+ "notes.sidePanel.search.placeholder": "Notizen filtern...",
13
+ "notes.sidePanel.empty": "Noch keine redaktionellen Notizen für diesen Eintrag vorhanden.",
14
+ "notes.sidePanel.noMatches": "Keine Notizen entsprechen dem aktuellen Filter.",
15
+ "note.modal.new.title": "Notiz hinzufügen",
16
+ "note.modal.existing.title": "Notiz bearbeiten",
17
+ "note.modal.meta.createdAt": "Erstellt am",
18
+ "note.modal.meta.createdBy": "Erstellt von",
19
+ "note.modal.meta.updatedAt": "Aktualisiert am",
20
+ "note.modal.meta.updatedBy": "Aktualisiert von",
21
+ "note.modal.fields.title": "Titel",
22
+ "note.modal.fields.title.placeholder": "Kurze Zusammenfassung dieser Notiz...",
23
+ "note.modal.fields.category": "Kategorie",
24
+ "note.modal.fields.content": "Inhalt",
25
+ "note.modal.fields.content.placeholder": "Redaktionellen Kontext, Feedback oder nächste Schritte eingeben...",
26
+ "note.modal.fields.isPinned": "Notiz oben anheften",
27
+ "note.modal.fields.scopeToLocale": "Nur auf Sprache ({locale}) beschränken",
28
+ "note.modal.validation.titleRequired": "Ein Titel ist erforderlich.",
29
+ "note.modal.actions.cancel": "Abbrechen",
30
+ "note.modal.actions.save": "Speichern",
31
+ "note.modal.actions.close": "Dialog schließen",
32
+ "note.actions.edit": "Bearbeiten",
33
+ "note.actions.delete": "Löschen",
34
+ "note.actions.pin": "Notiz anheften",
35
+ "note.actions.unpin": "Notiz lösen",
36
+ "note.delete.dialog.title": "Bestätigung",
37
+ "note.delete.dialog.description": 'Möchten Sie die Notiz "{title}" wirklich löschen?',
38
+ "note.delete.dialog.confirm": "Bestätigen",
39
+ "category.all": "Alle Kategorien",
40
+ "category.general": "Allgemein",
41
+ "category.todo": "Aufgabe",
42
+ "category.blocker": "Blocker",
43
+ "category.idea": "Idee",
44
+ "hub.title": "Redaktionelle Notizen-Zentrale",
45
+ "hub.subtitle": "Redaktionelle Notizen über alle Strapi v5 Content-Manager-Einträge hinweg durchsuchen, filtern und verwalten.",
46
+ "hub.actions.refresh": "Aktualisieren",
47
+ "hub.actions.openEntry": "Eintrag im Content Manager öffnen",
48
+ "hub.stats.total": "Notizen Gesamt",
49
+ "hub.stats.pinned": "Angeheftete Notizen",
50
+ "hub.stats.blockers": "Blocker",
51
+ "hub.stats.todos": "Offene Aufgaben",
52
+ "hub.filters.search": "Notizen suchen",
53
+ "hub.filters.search.placeholder": "Nach Titel, Inhalt, Inhaltstyp oder Autor suchen...",
54
+ "hub.filters.contentType": "Inhaltstyp",
55
+ "hub.filters.contentType.all": "Alle Inhaltstypen",
56
+ "hub.filters.pinnedOnly": "Nur angeheftete",
57
+ "hub.table.targetEntity": "Zieleintrag",
58
+ "hub.table.actions": "Aktionen",
59
+ "hub.badge.pinned": "ANGEHEFTET",
60
+ "hub.empty": "Keine redaktionellen Notizen für die aktuellen Filter gefunden."
61
+ };
62
+ export {
63
+ de as default
64
+ };