strapi-plugin-magic-mark 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.
- package/COPYRIGHT_NOTICE.txt +20 -0
- package/LICENSE +28 -0
- package/README.md +372 -0
- package/dist/_chunks/App-7ZH1Reka.mjs +1390 -0
- package/dist/_chunks/App-CMSut1pt.js +1392 -0
- package/dist/_chunks/de-Bag-366k.mjs +49 -0
- package/dist/_chunks/de-Dic_hhjg.js +49 -0
- package/dist/_chunks/en-C5BvHqNo.js +54 -0
- package/dist/_chunks/en-zokEerzt.mjs +54 -0
- package/dist/_chunks/es-BlSQpU1z.js +54 -0
- package/dist/_chunks/es-Br1ucP3h.mjs +54 -0
- package/dist/_chunks/fr-BHciYPYG.js +54 -0
- package/dist/_chunks/fr-Dzo3kt_q.mjs +54 -0
- package/dist/_chunks/index-B-Cc7QNW.mjs +322 -0
- package/dist/_chunks/index-B11QBtag.js +324 -0
- package/dist/_chunks/index-DYHEyGJr.mjs +2020 -0
- package/dist/_chunks/index-DkkmdRgb.js +2024 -0
- package/dist/_chunks/pt-DQoGyzyD.mjs +54 -0
- package/dist/_chunks/pt-Dawo5aUA.js +54 -0
- package/dist/admin/index.js +3 -0
- package/dist/admin/index.mjs +4 -0
- package/dist/admin/src/components/AdvancedFilterButton.d.ts +3 -0
- package/dist/admin/src/components/AdvancedFilterModal.d.ts +21 -0
- package/dist/admin/src/components/CreateEditModal.d.ts +11 -0
- package/dist/admin/src/components/CreateViewModal.d.ts +9 -0
- package/dist/admin/src/components/CustomSelect.d.ts +13 -0
- package/dist/admin/src/components/FilterPreview.d.ts +6 -0
- package/dist/admin/src/components/HomePage.d.ts +0 -0
- package/dist/admin/src/components/Initializer.d.ts +6 -0
- package/dist/admin/src/components/LicenseGuard.d.ts +6 -0
- package/dist/admin/src/components/PluginIcon.d.ts +3 -0
- package/dist/admin/src/components/QueryBuilder.d.ts +23 -0
- package/dist/admin/src/components/SimpleAdvancedFilterModal.d.ts +15 -0
- package/dist/admin/src/components/ViewsListPopover.d.ts +2 -0
- package/dist/admin/src/components/ViewsWidget.d.ts +8 -0
- package/dist/admin/src/index.d.ts +15 -0
- package/dist/admin/src/pages/App.d.ts +3 -0
- package/dist/admin/src/pages/HomePage.d.ts +3 -0
- package/dist/admin/src/pages/HomePageModern.d.ts +3 -0
- package/dist/admin/src/pages/License/index.d.ts +3 -0
- package/dist/admin/src/permissions.d.ts +15 -0
- package/dist/admin/src/pluginId.d.ts +2 -0
- package/dist/admin/src/utils/queryGenerator.d.ts +28 -0
- package/dist/admin/src/utils/queryParser.d.ts +25 -0
- package/dist/admin/src/utils/queryToStructure.d.ts +20 -0
- package/dist/server/index.js +1309 -0
- package/dist/server/index.mjs +1307 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +5 -0
- package/dist/server/src/content-types/index.d.ts +82 -0
- package/dist/server/src/controllers/controller.d.ts +11 -0
- package/dist/server/src/controllers/index.d.ts +20 -0
- package/dist/server/src/controllers/license.d.ts +27 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +195 -0
- package/dist/server/src/middlewares/index.d.ts +4 -0
- package/dist/server/src/middlewares/license-check.d.ts +6 -0
- package/dist/server/src/policies/index.d.ts +4 -0
- package/dist/server/src/policies/license-check.d.ts +6 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin.d.ts +12 -0
- package/dist/server/src/routes/content-api.d.ts +5 -0
- package/dist/server/src/routes/index.d.ts +18 -0
- package/dist/server/src/services/index.d.ts +57 -0
- package/dist/server/src/services/license-guard.d.ts +103 -0
- package/dist/server/src/services/service.d.ts +33 -0
- package/package.json +108 -0
- package/strapi-server.js +4 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MagicMark - Advanced Query Builder for Strapi
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Schero A. (begservice)
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
*
|
|
8
|
+
* This plugin is free to use for personal and commercial projects.
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANT RESTRICTION:
|
|
11
|
+
* The license validation system (license-guard.ts and related components)
|
|
12
|
+
* must remain intact and functional. Removing or bypassing this system
|
|
13
|
+
* is strictly prohibited.
|
|
14
|
+
*
|
|
15
|
+
* See LICENSE file for full terms.
|
|
16
|
+
*
|
|
17
|
+
* Repository: https://github.com/begservice/strapi-plugin-magic-mark
|
|
18
|
+
* Issues: https://github.com/begservice/strapi-plugin-magic-mark/issues
|
|
19
|
+
*/
|
|
20
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Schero A. (begservice)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
**ADDITIONAL CONDITION:**
|
|
16
|
+
The license validation system (including but not limited to license-guard.ts,
|
|
17
|
+
license controller, and related API endpoints) must remain intact and functional.
|
|
18
|
+
Removing, bypassing, or disabling the license validation system is strictly
|
|
19
|
+
prohibited.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# MagicMark - Advanced Query Builder for Strapi v5
|
|
2
|
+
|
|
3
|
+
Save and apply complex Content Manager queries with one click. Professional bookmark management with role-based sharing and advanced filtering.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/strapi-plugin-magic-mark)
|
|
7
|
+
|
|
8
|
+
## 🌍 Supported Languages
|
|
9
|
+
|
|
10
|
+
The admin interface is available in **5 languages** for international accessibility:
|
|
11
|
+
|
|
12
|
+
- 🇬🇧 **English** - Global standard
|
|
13
|
+
- 🇩🇪 **Deutsch** - German (DACH region)
|
|
14
|
+
- 🇫🇷 **Français** - French
|
|
15
|
+
- 🇪🇸 **Español** - Spanish (Spain & Latin America)
|
|
16
|
+
- 🇵🇹 **Português** - Portuguese (Brazil & Portugal)
|
|
17
|
+
|
|
18
|
+
The language automatically follows your Strapi admin interface language setting.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 📜 License
|
|
23
|
+
|
|
24
|
+
This plugin is licensed under the **MIT License** - free for everyone to use!
|
|
25
|
+
|
|
26
|
+
### What you CAN do:
|
|
27
|
+
- ✅ Use the plugin freely (personal & commercial)
|
|
28
|
+
- ✅ View and study the source code
|
|
29
|
+
- ✅ Report issues and contribute improvements
|
|
30
|
+
- ✅ Deploy in production without fees
|
|
31
|
+
- ✅ Integrate in your commercial projects
|
|
32
|
+
|
|
33
|
+
### What you CANNOT do:
|
|
34
|
+
- ❌ Remove or bypass the license validation system
|
|
35
|
+
- ❌ Modify `license-guard.ts` or license-related endpoints
|
|
36
|
+
- ❌ Disable license activation requirements
|
|
37
|
+
|
|
38
|
+
**Important:** The license validation system must remain intact and functional. This ensures quality, support, and continued development. Users must activate the plugin (free) through the admin interface.
|
|
39
|
+
|
|
40
|
+
📄 See [LICENSE](./LICENSE) for full terms
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ✨ Features
|
|
45
|
+
|
|
46
|
+
### Core Functionality
|
|
47
|
+
- 🔖 **Query Bookmarks** - Save complex Content Manager queries
|
|
48
|
+
- 🎯 **One-Click Apply** - Restore filters, sorting, and pagination instantly
|
|
49
|
+
- 📱 **Mobile Optimized** - Perfect responsive design
|
|
50
|
+
- 🎨 **Emoji Icons** - Visual bookmark identification
|
|
51
|
+
- 📌 **Pin Important** - Keep frequently used bookmarks on top
|
|
52
|
+
|
|
53
|
+
### Advanced Features
|
|
54
|
+
- 👥 **Role-Based Sharing** - Share bookmarks with specific admin roles
|
|
55
|
+
- 🔐 **User Sharing** - Share with individual admin users
|
|
56
|
+
- 🌍 **Public Bookmarks** - Make bookmarks visible to all users
|
|
57
|
+
- 🔄 **Drag & Drop Reorder** - Organize bookmarks with drag-and-drop
|
|
58
|
+
- 📊 **Filter Preview** - See exactly what filters are saved
|
|
59
|
+
- 🌐 **License Management** - Built-in license activation interface
|
|
60
|
+
|
|
61
|
+
### User Experience
|
|
62
|
+
- ⚡ **Instant Save** - Capture current query state in one click
|
|
63
|
+
- 🎭 **Context Aware** - Automatically detects current content type
|
|
64
|
+
- 🔍 **Quick Access** - Bookmark button in Content Manager toolbar
|
|
65
|
+
- 📝 **Descriptions** - Add notes to remember bookmark purpose
|
|
66
|
+
- 🎨 **Professional UI** - Beautiful gradient design
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 📦 Installation
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install strapi-plugin-magic-mark
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
or
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
yarn add strapi-plugin-magic-mark
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Then add the plugin to your `config/plugins.ts`:
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
export default {
|
|
86
|
+
'magic-mark': {
|
|
87
|
+
enabled: true,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Rebuild your admin panel:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm run build
|
|
96
|
+
# or
|
|
97
|
+
yarn build
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 🚀 Quick Start
|
|
103
|
+
|
|
104
|
+
### 1. Activate License
|
|
105
|
+
|
|
106
|
+
On first use, a modal will appear:
|
|
107
|
+
- Click **"Activate License"** to auto-create with your admin account
|
|
108
|
+
- Or enter license details manually
|
|
109
|
+
- Or use an existing license key
|
|
110
|
+
|
|
111
|
+
### 2. Save Your First Bookmark
|
|
112
|
+
|
|
113
|
+
1. Navigate to any Content Manager collection
|
|
114
|
+
2. Apply filters, sorting, or search
|
|
115
|
+
3. Click the **MagicMark** button in the toolbar
|
|
116
|
+
4. Click **"Save Bookmark"**
|
|
117
|
+
5. Add a name, emoji, and description
|
|
118
|
+
6. Save!
|
|
119
|
+
|
|
120
|
+
### 3. Use Bookmarks
|
|
121
|
+
|
|
122
|
+
- Click **MagicMark** button → Select bookmark → Done!
|
|
123
|
+
- Filters are instantly applied
|
|
124
|
+
- Navigate faster than ever before
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 🎯 Use Cases
|
|
129
|
+
|
|
130
|
+
### Content Management
|
|
131
|
+
- **Published Articles** - Quick access to published content
|
|
132
|
+
- **Draft Posts** - Filter for unpublished drafts
|
|
133
|
+
- **Recent Updates** - Items modified in last 7 days
|
|
134
|
+
- **My Content** - Content created by you
|
|
135
|
+
|
|
136
|
+
### Team Collaboration
|
|
137
|
+
- **Shared Queries** - Team members access same filtered views
|
|
138
|
+
- **Role-Based Access** - Editors see different bookmarks than Authors
|
|
139
|
+
- **Public Bookmarks** - Common queries for everyone
|
|
140
|
+
|
|
141
|
+
### Power Users
|
|
142
|
+
- **Complex Filters** - Save multi-condition queries
|
|
143
|
+
- **Sorted Views** - Specific sort orders for different needs
|
|
144
|
+
- **Pinned Favorites** - Most used bookmarks always on top
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 📸 Screenshots
|
|
149
|
+
|
|
150
|
+
### Bookmark Management
|
|
151
|
+
Professional interface for managing query bookmarks.
|
|
152
|
+
|
|
153
|
+

|
|
154
|
+
|
|
155
|
+
### Save Bookmark Modal
|
|
156
|
+
Create bookmarks with emoji, name, and sharing options.
|
|
157
|
+
|
|
158
|
+

|
|
159
|
+
|
|
160
|
+
### Content Manager Integration
|
|
161
|
+
Seamless integration in Content Manager toolbar.
|
|
162
|
+
|
|
163
|
+

|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 🔧 Configuration
|
|
168
|
+
|
|
169
|
+
### Basic Setup
|
|
170
|
+
|
|
171
|
+
The plugin works out of the box with no configuration required!
|
|
172
|
+
|
|
173
|
+
### Advanced Options
|
|
174
|
+
|
|
175
|
+
Configure in `config/plugins.ts`:
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
export default {
|
|
179
|
+
'magic-mark': {
|
|
180
|
+
enabled: true,
|
|
181
|
+
config: {
|
|
182
|
+
// Future configuration options
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 🛠️ Development
|
|
191
|
+
|
|
192
|
+
### Build Plugin
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm run build
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Watch Mode
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
npm run watch
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Link for Development
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
npm run watch:link
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Then in your Strapi project:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
yalc add strapi-plugin-magic-mark
|
|
214
|
+
npm install
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 📚 API
|
|
220
|
+
|
|
221
|
+
### Create Bookmark
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
POST /magic-mark/bookmarks
|
|
225
|
+
{
|
|
226
|
+
"name": "Published Articles",
|
|
227
|
+
"path": "/content-manager/collection-types/api::article.article",
|
|
228
|
+
"query": "filters[$and][0][publishedAt][$notNull]=true",
|
|
229
|
+
"emoji": "📰",
|
|
230
|
+
"description": "All published articles",
|
|
231
|
+
"isPublic": false,
|
|
232
|
+
"sharedWithRoles": [1, 2],
|
|
233
|
+
"sharedWithUsers": []
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Get Bookmarks
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
GET /magic-mark/bookmarks
|
|
241
|
+
// Returns bookmarks accessible to current user
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Update Bookmark
|
|
245
|
+
|
|
246
|
+
```typescript
|
|
247
|
+
PUT /magic-mark/bookmarks/:id
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Delete Bookmark
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
DELETE /magic-mark/bookmarks/:id
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Reorder Bookmarks
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
POST /magic-mark/bookmarks/reorder
|
|
260
|
+
{
|
|
261
|
+
"bookmarkIds": [3, 1, 2]
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 🔐 License System
|
|
268
|
+
|
|
269
|
+
MagicMark uses a secure license validation system:
|
|
270
|
+
|
|
271
|
+
- **Free to use** - No payment required
|
|
272
|
+
- **One-click activation** - Auto-create with your admin account
|
|
273
|
+
- **Offline mode** - 24-hour grace period
|
|
274
|
+
- **Multiple options** - Auto-create, manual, or existing key
|
|
275
|
+
|
|
276
|
+
The license ensures:
|
|
277
|
+
- Quality support and updates
|
|
278
|
+
- Spam prevention
|
|
279
|
+
- Usage analytics for improvements
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 🤝 Contributing
|
|
284
|
+
|
|
285
|
+
Contributions are welcome! Please:
|
|
286
|
+
|
|
287
|
+
1. Fork the repository
|
|
288
|
+
2. Create a feature branch
|
|
289
|
+
3. Make your changes
|
|
290
|
+
4. Submit a pull request
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 🐛 Bug Reports
|
|
295
|
+
|
|
296
|
+
Found a bug? Please report it:
|
|
297
|
+
|
|
298
|
+
**GitHub Issues:** https://github.com/fame361/Magicmark/issues
|
|
299
|
+
|
|
300
|
+
Include:
|
|
301
|
+
- Strapi version
|
|
302
|
+
- Plugin version
|
|
303
|
+
- Steps to reproduce
|
|
304
|
+
- Expected vs actual behavior
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## 💡 Feature Requests
|
|
309
|
+
|
|
310
|
+
Have an idea? We'd love to hear it!
|
|
311
|
+
|
|
312
|
+
Open an issue with:
|
|
313
|
+
- Clear description
|
|
314
|
+
- Use case
|
|
315
|
+
- Why it would be useful
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## 📝 Changelog
|
|
320
|
+
|
|
321
|
+
See [CHANGELOG.md](./CHANGELOG.md) for version history and updates.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## 👨💻 Author
|
|
326
|
+
|
|
327
|
+
**Schero A.**
|
|
328
|
+
- GitHub: [@fame361](https://github.com/fame361)
|
|
329
|
+
- Email: schero1894@gmail.com
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## 🌟 Support
|
|
334
|
+
|
|
335
|
+
If you find this plugin useful:
|
|
336
|
+
|
|
337
|
+
- ⭐ Star the repository
|
|
338
|
+
- 🐦 Share on social media
|
|
339
|
+
- 📝 Write a review
|
|
340
|
+
- 🤝 Contribute improvements
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 📄 License
|
|
345
|
+
|
|
346
|
+
MIT License - see [LICENSE](./LICENSE) file for details
|
|
347
|
+
|
|
348
|
+
**Copyright (c) 2025 Schero A. (begservice)**
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## 🔗 Links
|
|
353
|
+
|
|
354
|
+
- **NPM Package:** https://www.npmjs.com/package/strapi-plugin-magic-mark
|
|
355
|
+
- **GitHub Repository:** https://github.com/fame361/Magicmark
|
|
356
|
+
- **Issues:** https://github.com/fame361/Magicmark/issues
|
|
357
|
+
- **Strapi Market:** Coming soon
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## 🙏 Acknowledgments
|
|
362
|
+
|
|
363
|
+
Built with ❤️ for the Strapi community.
|
|
364
|
+
|
|
365
|
+
Special thanks to:
|
|
366
|
+
- Strapi team for the amazing CMS
|
|
367
|
+
- Community contributors
|
|
368
|
+
- All users providing feedback
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
**Made with 🔖 by fame361**
|