@retikolo/drag-drop-content-types-strapi 2.0.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 (51) hide show
  1. package/README.md +77 -0
  2. package/dist/_chunks/Settings-BUJ6OWyE.js +3632 -0
  3. package/dist/_chunks/Settings-Cx22s5Bk.mjs +3615 -0
  4. package/dist/_chunks/en-I3-CH3Sy.js +31 -0
  5. package/dist/_chunks/en-bxpER_P-.mjs +31 -0
  6. package/dist/_chunks/fr-C8Qw4iPZ.js +4 -0
  7. package/dist/_chunks/fr-hkSxFuzl.mjs +4 -0
  8. package/dist/_chunks/index-CxWC49Ye.mjs +477 -0
  9. package/dist/_chunks/index-D5Ne-GrP.js +478 -0
  10. package/dist/admin/index.js +3 -0
  11. package/dist/admin/index.mjs +4 -0
  12. package/dist/admin/src/components/Initializer.d.ts +5 -0
  13. package/dist/admin/src/components/PluginIcon.d.ts +2 -0
  14. package/dist/admin/src/components/SettingsTextField.d.ts +14 -0
  15. package/dist/admin/src/components/SettingsToggleField.d.ts +13 -0
  16. package/dist/admin/src/components/SortModal/CustomItem.d.ts +12 -0
  17. package/dist/admin/src/components/SortModal/SortMenu.d.ts +3 -0
  18. package/dist/admin/src/components/SortModal/SortableList.d.ts +3 -0
  19. package/dist/admin/src/components/SortModal/SortableListItem.d.ts +7 -0
  20. package/dist/admin/src/components/SortModal/index.d.ts +2 -0
  21. package/dist/admin/src/components/SortModal/utils.d.ts +2 -0
  22. package/dist/admin/src/components/TooltipIconButton.d.ts +11 -0
  23. package/dist/admin/src/index.d.ts +13 -0
  24. package/dist/admin/src/pages/App.d.ts +2 -0
  25. package/dist/admin/src/pages/HomePage.d.ts +2 -0
  26. package/dist/admin/src/pages/Settings.d.ts +2 -0
  27. package/dist/admin/src/permissions.d.ts +7 -0
  28. package/dist/admin/src/pluginId.d.ts +1 -0
  29. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  30. package/dist/admin/src/utils/strapi.d.ts +13 -0
  31. package/dist/admin/src/utils/useQueryParams.d.ts +7 -0
  32. package/dist/server/index.js +266 -0
  33. package/dist/server/index.mjs +267 -0
  34. package/dist/server/src/bootstrap.d.ts +5 -0
  35. package/dist/server/src/config/index.d.ts +5 -0
  36. package/dist/server/src/content-types/index.d.ts +2 -0
  37. package/dist/server/src/controllers/dragdrop.d.ts +9 -0
  38. package/dist/server/src/controllers/index.d.ts +16 -0
  39. package/dist/server/src/controllers/settings.d.ts +8 -0
  40. package/dist/server/src/destroy.d.ts +5 -0
  41. package/dist/server/src/index.d.ts +79 -0
  42. package/dist/server/src/middlewares/index.d.ts +2 -0
  43. package/dist/server/src/policies/index.d.ts +2 -0
  44. package/dist/server/src/register.d.ts +5 -0
  45. package/dist/server/src/routes/dragdrop.d.ts +13 -0
  46. package/dist/server/src/routes/index.d.ts +26 -0
  47. package/dist/server/src/routes/settings.d.ts +12 -0
  48. package/dist/server/src/services/dragdrop.d.ts +21 -0
  49. package/dist/server/src/services/index.d.ts +21 -0
  50. package/dist/server/src/services/settings.d.ts +8 -0
  51. package/package.json +98 -0
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ dragdrop: {
3
+ type: string;
4
+ routes: {
5
+ method: string;
6
+ path: string;
7
+ handler: string;
8
+ config: {
9
+ policies: any[];
10
+ auth: boolean;
11
+ };
12
+ }[];
13
+ };
14
+ settings: {
15
+ type: string;
16
+ routes: {
17
+ method: string;
18
+ path: string;
19
+ handler: string;
20
+ config: {
21
+ policies: any[];
22
+ };
23
+ }[];
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ type: string;
3
+ routes: {
4
+ method: string;
5
+ path: string;
6
+ handler: string;
7
+ config: {
8
+ policies: any[];
9
+ };
10
+ }[];
11
+ };
12
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ import type * as StrapiTypes from '@strapi/types/dist';
3
+ import { PluginSettingsResponse, RankUpdate } from '../../../typings';
4
+ declare const dragdrop: ({ strapi }: {
5
+ strapi: Core.Strapi;
6
+ }) => {
7
+ getWelcomeMessage(): {
8
+ body: string;
9
+ };
10
+ sortIndex(contentType: StrapiTypes.UID.CollectionType, start: number, limit: number, locale: string, rankFieldName: string): Promise<{}>;
11
+ /**
12
+ *
13
+ * @param {RankUpdate[]} updates
14
+ * @param {StrapiTypes.UID.CollectionType} contentType
15
+ */
16
+ batchUpdate(config: PluginSettingsResponse, updates: RankUpdate[], contentType: StrapiTypes.UID.CollectionType): Promise<{
17
+ id: any;
18
+ rank: any;
19
+ }[]>;
20
+ };
21
+ export default dragdrop;
@@ -0,0 +1,21 @@
1
+ declare const _default: {
2
+ dragdrop: ({ strapi }: {
3
+ strapi: import("@strapi/types/dist/core").Strapi;
4
+ }) => {
5
+ getWelcomeMessage(): {
6
+ body: string;
7
+ };
8
+ sortIndex(contentType: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, start: number, limit: number, locale: string, rankFieldName: string): Promise<{}>;
9
+ batchUpdate(config: import("../../../typings").PluginSettingsResponse, updates: import("../../../typings").RankUpdate[], contentType: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`): Promise<{
10
+ id: any;
11
+ rank: any;
12
+ }[]>;
13
+ };
14
+ settings: ({ strapi }: {
15
+ strapi: import("@strapi/types/dist/core").Strapi;
16
+ }) => {
17
+ getSettings(): Promise<unknown>;
18
+ setSettings(settings: any): Promise<unknown>;
19
+ };
20
+ };
21
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const _default: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ getSettings(): Promise<unknown>;
6
+ setSettings(settings: any): Promise<unknown>;
7
+ };
8
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "@retikolo/drag-drop-content-types-strapi",
3
+ "version": "2.0.0",
4
+ "description": "This plugin add a drag and droppable list that allows you to sort content type entries.",
5
+ "strapi": {
6
+ "kind": "plugin",
7
+ "name": "drag-drop-content-types",
8
+ "displayName": "Drag Drop Content Types",
9
+ "description": "This plugin add a drag and droppable list that allows you to sort content type entries."
10
+ },
11
+ "keywords": [
12
+ "strapi",
13
+ "strapi5",
14
+ "strapi-5",
15
+ "strapi-plugin",
16
+ "drag",
17
+ "drop",
18
+ "drag and drop",
19
+ "dnd-kit",
20
+ "content types",
21
+ "sort",
22
+ "order",
23
+ "reorder"
24
+ ],
25
+ "license": "MIT",
26
+ "type": "commonjs",
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ "./strapi-admin": {
30
+ "types": "./dist/admin/src/index.d.ts",
31
+ "source": "./admin/src/index.ts",
32
+ "import": "./dist/admin/index.mjs",
33
+ "require": "./dist/admin/index.js",
34
+ "default": "./dist/admin/index.js"
35
+ },
36
+ "./strapi-server": {
37
+ "types": "./dist/server/src/index.d.ts",
38
+ "source": "./server/src/index.ts",
39
+ "import": "./dist/server/index.mjs",
40
+ "require": "./dist/server/index.js",
41
+ "default": "./dist/server/index.js"
42
+ }
43
+ },
44
+ "files": [
45
+ "dist"
46
+ ],
47
+ "scripts": {
48
+ "build": "strapi-plugin build",
49
+ "test:ts:back": "run -T tsc -p server/tsconfig.json",
50
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
51
+ "verify": "strapi-plugin verify",
52
+ "watch": "strapi-plugin watch",
53
+ "watch:link": "strapi-plugin watch:link"
54
+ },
55
+ "dependencies": {
56
+ "@dnd-kit/core": "^6.1.0",
57
+ "@dnd-kit/sortable": "^8.0.0",
58
+ "@dnd-kit/utilities": "^3.2.2",
59
+ "@strapi/design-system": "^2.0.0-rc.11",
60
+ "@strapi/icons": "^2.0.0-rc.11",
61
+ "array-move": "^4.0.0",
62
+ "react-intl": "^6.6.8",
63
+ "zod": "^3.23.8"
64
+ },
65
+ "devDependencies": {
66
+ "@strapi/sdk-plugin": "^5.2.6",
67
+ "@strapi/strapi": "^5.0.0",
68
+ "@strapi/typescript-utils": "^5.0.0",
69
+ "@types/react": "^18.3.8",
70
+ "@types/react-dom": "^18.3.0",
71
+ "prettier": "^3.3.3",
72
+ "react": "^18.3.1",
73
+ "react-dom": "^18.3.1",
74
+ "react-router-dom": "^6.26.2",
75
+ "styled-components": "^6.1.13",
76
+ "typescript": "^5.6.2"
77
+ },
78
+ "peerDependencies": {
79
+ "@strapi/sdk-plugin": "^5.2.6",
80
+ "@strapi/strapi": "^5.0.0",
81
+ "react": "^18.3.1",
82
+ "react-dom": "^18.3.1",
83
+ "react-router-dom": "^6.26.2",
84
+ "styled-components": "^6.1.13"
85
+ },
86
+ "author": {
87
+ "name": "Aeneas Meier",
88
+ "email": "aeneas@retikolo.xyz",
89
+ "url": "https://rgb.retikolo.xyz"
90
+ },
91
+ "maintainers": [
92
+ {
93
+ "name": "Aeneas Meier",
94
+ "email": "aeneas@retikolo.xyz",
95
+ "url": "https://rgb.retikolo.xyz"
96
+ }
97
+ ]
98
+ }