strapi-plugin-magic-mark 3.2.6 → 3.2.8
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/dist/_chunks/{App-B6x0aSMN.js → App-C6Crb_w7.js} +1 -1
- package/dist/_chunks/{App-BCliVBSB.mjs → App-C6T1ltR3.mjs} +1 -1
- package/dist/_chunks/{UpgradePage-GoocQ4av.mjs → UpgradePage-BWjKwdCf.mjs} +1 -1
- package/dist/_chunks/{UpgradePage-Bm0SkuCi.js → UpgradePage-CYrqGUnv.js} +1 -1
- package/dist/_chunks/{index-DdTUt6EH.mjs → index-C7wF7iqT.mjs} +3 -3
- package/dist/_chunks/{index-D5-84IjV.js → index-svfBWq9B.js} +3 -3
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -11
- package/dist/admin/src/components/AdvancedFilterButton.d.ts +0 -3
- package/dist/admin/src/components/AdvancedFilterModal.d.ts +0 -21
- package/dist/admin/src/components/CreateEditModal.d.ts +0 -11
- package/dist/admin/src/components/CreateViewModal.d.ts +0 -9
- package/dist/admin/src/components/CustomSelect.d.ts +0 -13
- package/dist/admin/src/components/FilterPreview.d.ts +0 -6
- package/dist/admin/src/components/HomePage.d.ts +0 -0
- package/dist/admin/src/components/Initializer.d.ts +0 -6
- package/dist/admin/src/components/LicenseGuard.d.ts +0 -6
- package/dist/admin/src/components/PluginIcon.d.ts +0 -3
- package/dist/admin/src/components/QueryBuilder.d.ts +0 -34
- package/dist/admin/src/components/RelationFieldSelector.d.ts +0 -24
- package/dist/admin/src/components/SimpleAdvancedFilterModal.d.ts +0 -17
- package/dist/admin/src/components/UpgradePrompt.d.ts +0 -22
- package/dist/admin/src/components/ViewsListPopover.d.ts +0 -2
- package/dist/admin/src/components/ViewsWidget.d.ts +0 -8
- package/dist/admin/src/hooks/useFeatureGate.d.ts +0 -88
- package/dist/admin/src/hooks/useRelationSchema.d.ts +0 -27
- package/dist/admin/src/index.d.ts +0 -15
- package/dist/admin/src/pages/App.d.ts +0 -3
- package/dist/admin/src/pages/HomePage.d.ts +0 -3
- package/dist/admin/src/pages/HomePageModern.d.ts +0 -3
- package/dist/admin/src/pages/License/index.d.ts +0 -3
- package/dist/admin/src/pages/UpgradePage.d.ts +0 -6
- package/dist/admin/src/permissions.d.ts +0 -15
- package/dist/admin/src/pluginId.d.ts +0 -2
- package/dist/admin/src/utils/queryGenerator.d.ts +0 -32
- package/dist/admin/src/utils/queryParser.d.ts +0 -25
- package/dist/admin/src/utils/queryToStructure.d.ts +0 -27
- package/dist/admin/src/utils/theme.d.ts +0 -95
- package/dist/server/src/bootstrap.d.ts +0 -5
- package/dist/server/src/config/index.d.ts +0 -7
- package/dist/server/src/content-types/index.d.ts +0 -92
- package/dist/server/src/controllers/controller.d.ts +0 -49
- package/dist/server/src/controllers/index.d.ts +0 -21
- package/dist/server/src/controllers/license.d.ts +0 -31
- package/dist/server/src/destroy.d.ts +0 -5
- package/dist/server/src/index.d.ts +0 -218
- package/dist/server/src/middlewares/index.d.ts +0 -4
- package/dist/server/src/middlewares/license-check.d.ts +0 -6
- package/dist/server/src/policies/index.d.ts +0 -4
- package/dist/server/src/policies/license-check.d.ts +0 -6
- package/dist/server/src/register.d.ts +0 -5
- package/dist/server/src/routes/admin.d.ts +0 -12
- package/dist/server/src/routes/content-api.d.ts +0 -5
- package/dist/server/src/routes/index.d.ts +0 -18
- package/dist/server/src/services/index.d.ts +0 -67
- package/dist/server/src/services/license-guard.d.ts +0 -149
- package/dist/server/src/services/service.d.ts +0 -78
- package/dist/server/src/utils/logger.d.ts +0 -15
|
@@ -8,7 +8,7 @@ const styled = require("styled-components");
|
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const icons = require("@strapi/icons");
|
|
10
10
|
const admin = require("@strapi/strapi/admin");
|
|
11
|
-
const index = require("./index-
|
|
11
|
+
const index = require("./index-svfBWq9B.js");
|
|
12
12
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
13
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
14
14
|
const theme = {
|
|
@@ -6,7 +6,7 @@ import styled, { keyframes } from "styled-components";
|
|
|
6
6
|
import { Flex, Loader, Box, Typography, SingleSelect, SingleSelectOption, Thead, Tr, Th, VisuallyHidden, Tbody, Td, Button, Table, TextInput } from "@strapi/design-system";
|
|
7
7
|
import { Book, User, Sparkle, Pin, Link, Eye, Pencil, Trash, Search, Cross, Key, Mail, Check } from "@strapi/icons";
|
|
8
8
|
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
9
|
-
import { u as useLicenseInfo, p as pluginId, C as CreateEditModal } from "./index-
|
|
9
|
+
import { u as useLicenseInfo, p as pluginId, C as CreateEditModal } from "./index-C7wF7iqT.mjs";
|
|
10
10
|
const theme = {
|
|
11
11
|
colors: {
|
|
12
12
|
primary: {
|
|
@@ -5,7 +5,7 @@ import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import { Flex, Typography, Box, Badge, Button } from "@strapi/design-system";
|
|
7
7
|
import { Check, Cross, Sparkle, Lightning, Rocket } from "@strapi/icons";
|
|
8
|
-
import { p as pluginId } from "./index-
|
|
8
|
+
import { p as pluginId } from "./index-C7wF7iqT.mjs";
|
|
9
9
|
const Container = styled(Box)`
|
|
10
10
|
padding: 32px;
|
|
11
11
|
max-width: 1400px;
|
|
@@ -7,7 +7,7 @@ const admin = require("@strapi/strapi/admin");
|
|
|
7
7
|
const styled = require("styled-components");
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const icons = require("@strapi/icons");
|
|
10
|
-
const index = require("./index-
|
|
10
|
+
const index = require("./index-svfBWq9B.js");
|
|
11
11
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
12
12
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
13
13
|
const Container = styled__default.default(designSystem.Box)`
|
|
@@ -3242,13 +3242,13 @@ const index = {
|
|
|
3242
3242
|
register(app) {
|
|
3243
3243
|
console.log(`[${pluginId}] Registering plugin...`);
|
|
3244
3244
|
app.addMenuLink({
|
|
3245
|
-
to:
|
|
3245
|
+
to: `plugins/${pluginId}`,
|
|
3246
3246
|
icon: PluginIcon,
|
|
3247
3247
|
intlLabel: {
|
|
3248
3248
|
id: `${pluginId}.Admin.MainMenu.PluginName`,
|
|
3249
3249
|
defaultMessage: name
|
|
3250
3250
|
},
|
|
3251
|
-
Component: () => import("./App-
|
|
3251
|
+
Component: () => import("./App-C6T1ltR3.mjs"),
|
|
3252
3252
|
permissions: []
|
|
3253
3253
|
});
|
|
3254
3254
|
app.createSettingSection(
|
|
@@ -3269,7 +3269,7 @@ const index = {
|
|
|
3269
3269
|
to: `${pluginId}/upgrade`,
|
|
3270
3270
|
Component: () => import(
|
|
3271
3271
|
/* webpackChunkName: "magic-mark-upgrade" */
|
|
3272
|
-
"./UpgradePage-
|
|
3272
|
+
"./UpgradePage-BWjKwdCf.mjs"
|
|
3273
3273
|
),
|
|
3274
3274
|
permissions: []
|
|
3275
3275
|
},
|
|
@@ -3248,13 +3248,13 @@ const index = {
|
|
|
3248
3248
|
register(app) {
|
|
3249
3249
|
console.log(`[${pluginId}] Registering plugin...`);
|
|
3250
3250
|
app.addMenuLink({
|
|
3251
|
-
to:
|
|
3251
|
+
to: `plugins/${pluginId}`,
|
|
3252
3252
|
icon: PluginIcon,
|
|
3253
3253
|
intlLabel: {
|
|
3254
3254
|
id: `${pluginId}.Admin.MainMenu.PluginName`,
|
|
3255
3255
|
defaultMessage: name
|
|
3256
3256
|
},
|
|
3257
|
-
Component: () => Promise.resolve().then(() => require("./App-
|
|
3257
|
+
Component: () => Promise.resolve().then(() => require("./App-C6Crb_w7.js")),
|
|
3258
3258
|
permissions: []
|
|
3259
3259
|
});
|
|
3260
3260
|
app.createSettingSection(
|
|
@@ -3275,7 +3275,7 @@ const index = {
|
|
|
3275
3275
|
to: `${pluginId}/upgrade`,
|
|
3276
3276
|
Component: () => Promise.resolve().then(() => require(
|
|
3277
3277
|
/* webpackChunkName: "magic-mark-upgrade" */
|
|
3278
|
-
"./UpgradePage-
|
|
3278
|
+
"./UpgradePage-CYrqGUnv.js"
|
|
3279
3279
|
)),
|
|
3280
3280
|
permissions: []
|
|
3281
3281
|
},
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.2.
|
|
2
|
+
"version": "3.2.8",
|
|
3
3
|
"keywords": [
|
|
4
4
|
"strapi",
|
|
5
5
|
"strapi-plugin",
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
"exports": {
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
"./strapi-admin": {
|
|
18
|
-
"types": "./dist/admin/src/index.d.ts",
|
|
19
18
|
"source": "./admin/src/index.ts",
|
|
20
19
|
"import": "./dist/admin/index.mjs",
|
|
21
20
|
"require": "./dist/admin/index.js",
|
|
22
21
|
"default": "./dist/admin/index.js"
|
|
23
22
|
},
|
|
24
23
|
"./strapi-server": {
|
|
25
|
-
"types": "./dist/server/src/index.d.ts",
|
|
26
24
|
"source": "./server/src/index.ts",
|
|
27
25
|
"import": "./dist/server/index.mjs",
|
|
28
26
|
"require": "./dist/server/index.js",
|
|
@@ -73,14 +71,6 @@
|
|
|
73
71
|
"styled-components": "^6.1.19",
|
|
74
72
|
"typescript": "^5.9.3"
|
|
75
73
|
},
|
|
76
|
-
"optionalDependencies": {
|
|
77
|
-
"@swc/core-darwin-arm64": "*",
|
|
78
|
-
"@swc/core-linux-x64-gnu": "*",
|
|
79
|
-
"@swc/core-linux-x64-musl": "*",
|
|
80
|
-
"@rollup/rollup-darwin-arm64": "*",
|
|
81
|
-
"@rollup/rollup-linux-x64-gnu": "*",
|
|
82
|
-
"@rollup/rollup-linux-x64-musl": "*"
|
|
83
|
-
},
|
|
84
74
|
"peerDependencies": {
|
|
85
75
|
"@strapi/sdk-plugin": "^5.3.2",
|
|
86
76
|
"@strapi/strapi": "^5.29.0",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface FilterCondition {
|
|
3
|
-
id: string;
|
|
4
|
-
field: string;
|
|
5
|
-
operator: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
interface AdvancedFilterModalProps {
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
onApply: (queryString: string) => void;
|
|
11
|
-
availableFields: Array<{
|
|
12
|
-
name: string;
|
|
13
|
-
type: string;
|
|
14
|
-
}>;
|
|
15
|
-
availableRelations?: Array<{
|
|
16
|
-
name: string;
|
|
17
|
-
}>;
|
|
18
|
-
currentFilters?: FilterCondition[];
|
|
19
|
-
}
|
|
20
|
-
declare const AdvancedFilterModal: React.FC<AdvancedFilterModalProps>;
|
|
21
|
-
export default AdvancedFilterModal;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface CreateEditModalProps {
|
|
3
|
-
bookmark: any | null;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
onSuccess: () => void;
|
|
6
|
-
pluginId: string;
|
|
7
|
-
currentPath?: string;
|
|
8
|
-
currentQuery?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const CreateEditModal: React.FC<CreateEditModalProps>;
|
|
11
|
-
export default CreateEditModal;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface CustomSelectProps {
|
|
3
|
-
value: string;
|
|
4
|
-
onChange: (value: string) => void;
|
|
5
|
-
options: Array<{
|
|
6
|
-
value: string;
|
|
7
|
-
label: string;
|
|
8
|
-
}>;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
searchable?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
13
|
-
export default CustomSelect;
|
|
File without changes
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Condition {
|
|
3
|
-
id: string;
|
|
4
|
-
field: string;
|
|
5
|
-
/** Field path for deep filtering (e.g., ['user', 'role', 'name']) */
|
|
6
|
-
fieldPath?: string[];
|
|
7
|
-
operator: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
interface ConditionGroup {
|
|
11
|
-
id: string;
|
|
12
|
-
logic: 'AND' | 'OR';
|
|
13
|
-
conditions: (Condition | ConditionGroup)[];
|
|
14
|
-
isGroup?: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface RelationInfo {
|
|
17
|
-
name: string;
|
|
18
|
-
target?: string;
|
|
19
|
-
}
|
|
20
|
-
interface QueryBuilderProps {
|
|
21
|
-
availableFields: Array<{
|
|
22
|
-
name: string;
|
|
23
|
-
type: string;
|
|
24
|
-
}>;
|
|
25
|
-
/** Relations with their target UIDs for deep filtering */
|
|
26
|
-
availableRelations?: RelationInfo[];
|
|
27
|
-
onQueryChange: (query: ConditionGroup) => void;
|
|
28
|
-
initialStructure?: ConditionGroup | null;
|
|
29
|
-
isPremium?: boolean;
|
|
30
|
-
/** Enable deep relation filtering (requires Premium) */
|
|
31
|
-
enableDeepFiltering?: boolean;
|
|
32
|
-
}
|
|
33
|
-
declare const QueryBuilder: React.FC<QueryBuilderProps>;
|
|
34
|
-
export default QueryBuilder;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Field {
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
isRelation?: boolean;
|
|
6
|
-
target?: string;
|
|
7
|
-
}
|
|
8
|
-
interface Props {
|
|
9
|
-
availableFields: Field[];
|
|
10
|
-
availableRelations: Array<{
|
|
11
|
-
name: string;
|
|
12
|
-
target?: string;
|
|
13
|
-
}>;
|
|
14
|
-
fieldPath: string[];
|
|
15
|
-
onChange: (fieldPath: string[]) => void;
|
|
16
|
-
maxDepth?: number;
|
|
17
|
-
showBreadcrumb?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Horizontal cascading field selector for relation filtering
|
|
21
|
-
* Layout: [Field] > [Nested] > [Nested] in one row
|
|
22
|
-
*/
|
|
23
|
-
declare const RelationFieldSelector: React.FC<Props>;
|
|
24
|
-
export default RelationFieldSelector;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface SimpleAdvancedFilterModalProps {
|
|
3
|
-
onClose: () => void;
|
|
4
|
-
onApply: (queryString: string) => void;
|
|
5
|
-
availableFields: Array<{
|
|
6
|
-
name: string;
|
|
7
|
-
type: string;
|
|
8
|
-
}>;
|
|
9
|
-
/** Relations with their target UIDs for deep filtering */
|
|
10
|
-
availableRelations?: Array<{
|
|
11
|
-
name: string;
|
|
12
|
-
target?: string;
|
|
13
|
-
}>;
|
|
14
|
-
currentQuery?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const SimpleAdvancedFilterModal: React.FC<SimpleAdvancedFilterModalProps>;
|
|
17
|
-
export default SimpleAdvancedFilterModal;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface UpgradePromptProps {
|
|
3
|
-
feature: string;
|
|
4
|
-
tier?: 'premium' | 'advanced';
|
|
5
|
-
variant?: 'inline' | 'banner' | 'modal';
|
|
6
|
-
title?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
showIcon?: boolean;
|
|
9
|
-
onUpgradeClick?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare const UpgradePrompt: React.FC<UpgradePromptProps>;
|
|
12
|
-
/**
|
|
13
|
-
* Higher-order component to wrap features with paywall
|
|
14
|
-
*/
|
|
15
|
-
export declare const withFeatureGate: <P extends object>(WrappedComponent: React.ComponentType<P>, feature: string, tier?: 'premium' | 'advanced') => (props: P & {
|
|
16
|
-
canUse?: boolean;
|
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* Feature lock overlay for disabling UI elements
|
|
20
|
-
*/
|
|
21
|
-
export declare const FeatureLockOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
-
export default UpgradePrompt;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature definitions for MagicMark
|
|
3
|
-
* Maps feature keys to their required tier
|
|
4
|
-
*/
|
|
5
|
-
export declare const FEATURES: {
|
|
6
|
-
readonly basicBookmarks: {
|
|
7
|
-
readonly tier: "free";
|
|
8
|
-
readonly limit: 10;
|
|
9
|
-
};
|
|
10
|
-
readonly basicFilters: {
|
|
11
|
-
readonly tier: "free";
|
|
12
|
-
};
|
|
13
|
-
readonly extendedBookmarks: {
|
|
14
|
-
readonly tier: "premium";
|
|
15
|
-
readonly limit: 50;
|
|
16
|
-
};
|
|
17
|
-
readonly queryHistory: {
|
|
18
|
-
readonly tier: "premium";
|
|
19
|
-
};
|
|
20
|
-
readonly exportBookmarks: {
|
|
21
|
-
readonly tier: "premium";
|
|
22
|
-
};
|
|
23
|
-
readonly sharedBookmarks: {
|
|
24
|
-
readonly tier: "premium";
|
|
25
|
-
};
|
|
26
|
-
readonly unlimitedBookmarks: {
|
|
27
|
-
readonly tier: "advanced";
|
|
28
|
-
readonly limit: -1;
|
|
29
|
-
};
|
|
30
|
-
readonly advancedFilters: {
|
|
31
|
-
readonly tier: "advanced";
|
|
32
|
-
};
|
|
33
|
-
readonly subGroups: {
|
|
34
|
-
readonly tier: "advanced";
|
|
35
|
-
};
|
|
36
|
-
readonly bulkOperations: {
|
|
37
|
-
readonly tier: "advanced";
|
|
38
|
-
};
|
|
39
|
-
readonly analytics: {
|
|
40
|
-
readonly tier: "advanced";
|
|
41
|
-
};
|
|
42
|
-
readonly customIntegrations: {
|
|
43
|
-
readonly tier: "advanced";
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export type FeatureKey = keyof typeof FEATURES;
|
|
47
|
-
interface LicenseLimits {
|
|
48
|
-
maxBookmarks: number;
|
|
49
|
-
currentBookmarks: number;
|
|
50
|
-
canCreate: boolean;
|
|
51
|
-
tier: 'free' | 'premium' | 'advanced';
|
|
52
|
-
features: {
|
|
53
|
-
queryHistory: boolean;
|
|
54
|
-
export: boolean;
|
|
55
|
-
analytics: boolean;
|
|
56
|
-
bulkOperations: boolean;
|
|
57
|
-
customIntegrations: boolean;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
interface UseFeatureGateResult {
|
|
61
|
-
canUse: boolean;
|
|
62
|
-
tier: string;
|
|
63
|
-
requiredTier: string;
|
|
64
|
-
isLoading: boolean;
|
|
65
|
-
showUpgrade: () => void;
|
|
66
|
-
limits: LicenseLimits | null;
|
|
67
|
-
isPremium: boolean;
|
|
68
|
-
isAdvanced: boolean;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Hook to check if a feature is available based on license
|
|
72
|
-
* @param feature - Feature key to check
|
|
73
|
-
* @returns Object with canUse boolean and upgrade function
|
|
74
|
-
*/
|
|
75
|
-
export declare const useFeatureGate: (feature: FeatureKey) => UseFeatureGateResult;
|
|
76
|
-
/**
|
|
77
|
-
* Simplified hook to get all license info
|
|
78
|
-
*/
|
|
79
|
-
export declare const useLicenseInfo: () => {
|
|
80
|
-
isLoading: boolean;
|
|
81
|
-
limits: LicenseLimits;
|
|
82
|
-
tier: "free" | "premium" | "advanced";
|
|
83
|
-
isFree: boolean;
|
|
84
|
-
isPremium: boolean;
|
|
85
|
-
isAdvanced: boolean;
|
|
86
|
-
canUseFeature: (feature: FeatureKey) => boolean;
|
|
87
|
-
};
|
|
88
|
-
export default useFeatureGate;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface SchemaAttribute {
|
|
2
|
-
type: string;
|
|
3
|
-
relation?: string;
|
|
4
|
-
target?: string;
|
|
5
|
-
required?: boolean;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
interface RelationField {
|
|
9
|
-
name: string;
|
|
10
|
-
type: string;
|
|
11
|
-
isRelation: boolean;
|
|
12
|
-
target?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook to fetch and cache relation schemas from the content-type-builder API
|
|
16
|
-
* Used for deep filtering on relation fields (e.g., user.email, user.role.name)
|
|
17
|
-
*/
|
|
18
|
-
export declare const useRelationSchema: () => {
|
|
19
|
-
fetchSchema: (uid: string) => Promise<Record<string, SchemaAttribute> | null>;
|
|
20
|
-
getFilterableFields: (uid: string) => Promise<RelationField[]>;
|
|
21
|
-
getRelationFields: (relationTarget: string) => Promise<RelationField[]>;
|
|
22
|
-
clearCache: () => void;
|
|
23
|
-
getCachedSchema: (uid: string) => Record<string, SchemaAttribute> | null;
|
|
24
|
-
loading: Record<string, boolean>;
|
|
25
|
-
errors: Record<string, string>;
|
|
26
|
-
};
|
|
27
|
-
export default useRelationSchema;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { StrapiApp } from '@strapi/strapi/admin';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
register(app: StrapiApp): void;
|
|
4
|
-
bootstrap(app: StrapiApp): Promise<void>;
|
|
5
|
-
registerTrads({ locales }: {
|
|
6
|
-
locales: string[];
|
|
7
|
-
}): Promise<({
|
|
8
|
-
data: Record<string, any>;
|
|
9
|
-
locale: string;
|
|
10
|
-
} | {
|
|
11
|
-
data: {};
|
|
12
|
-
locale: string;
|
|
13
|
-
})[]>;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const pluginPermissions: {
|
|
2
|
-
accessSettings: {
|
|
3
|
-
action: string;
|
|
4
|
-
subject: any;
|
|
5
|
-
}[];
|
|
6
|
-
readSettings: {
|
|
7
|
-
action: string;
|
|
8
|
-
subject: any;
|
|
9
|
-
}[];
|
|
10
|
-
updateSettings: {
|
|
11
|
-
action: string;
|
|
12
|
-
subject: any;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
export default pluginPermissions;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates correct Strapi v5 filter query strings from QueryBuilder structure
|
|
3
|
-
* Based on: https://docs.strapi.io/cms/api/document-service/filters
|
|
4
|
-
* Supports deep relation filtering (e.g., user.role.name)
|
|
5
|
-
*/
|
|
6
|
-
export interface Condition {
|
|
7
|
-
id: string;
|
|
8
|
-
field: string;
|
|
9
|
-
/** Field path for deep filtering (e.g., ['user', 'role', 'name']) */
|
|
10
|
-
fieldPath?: string[];
|
|
11
|
-
operator: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ConditionGroup {
|
|
15
|
-
id: string;
|
|
16
|
-
logic: 'AND' | 'OR';
|
|
17
|
-
conditions: (Condition | ConditionGroup)[];
|
|
18
|
-
isGroup?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Convert QueryBuilder structure to Strapi filter object
|
|
22
|
-
* Supports deep relation filtering via fieldPath
|
|
23
|
-
*/
|
|
24
|
-
export declare const structureToFilters: (group: ConditionGroup) => any;
|
|
25
|
-
/**
|
|
26
|
-
* Generate complete query string with filters, sort, and populate
|
|
27
|
-
*/
|
|
28
|
-
export declare const generateQueryString: (structure: ConditionGroup, sortField?: string, sortOrder?: 'ASC' | 'DESC', populateFields?: Array<{
|
|
29
|
-
name: string;
|
|
30
|
-
enabled: boolean;
|
|
31
|
-
deep: boolean;
|
|
32
|
-
}>) => string;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parses URL query parameters and extracts filters, sorting, and population info
|
|
3
|
-
* into a human-readable format
|
|
4
|
-
*/
|
|
5
|
-
export interface ParsedFilter {
|
|
6
|
-
field: string;
|
|
7
|
-
operator: string;
|
|
8
|
-
value: string;
|
|
9
|
-
logic?: 'AND' | 'OR';
|
|
10
|
-
}
|
|
11
|
-
export interface ParsedQuery {
|
|
12
|
-
filters: ParsedFilter[];
|
|
13
|
-
sort: string[];
|
|
14
|
-
populate: string[];
|
|
15
|
-
page?: number;
|
|
16
|
-
pageSize?: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Parses query string into structured filter information
|
|
20
|
-
*/
|
|
21
|
-
export declare const parseQueryString: (queryString: string) => ParsedQuery;
|
|
22
|
-
/**
|
|
23
|
-
* Generates a human-readable summary of parsed query
|
|
24
|
-
*/
|
|
25
|
-
export declare const generateQuerySummary: (parsed: ParsedQuery) => string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts URL query string back into QueryBuilder structure
|
|
3
|
-
* Supports deep relation filtering (e.g., filters[user][email][$contains]=admin)
|
|
4
|
-
*/
|
|
5
|
-
export interface Condition {
|
|
6
|
-
id: string;
|
|
7
|
-
field: string;
|
|
8
|
-
/** Field path for deep filtering (e.g., ['user', 'email']) */
|
|
9
|
-
fieldPath?: string[];
|
|
10
|
-
operator: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ConditionGroup {
|
|
14
|
-
id: string;
|
|
15
|
-
logic: 'AND' | 'OR';
|
|
16
|
-
conditions: (Condition | ConditionGroup)[];
|
|
17
|
-
isGroup?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Parse URL query parameters into QueryBuilder structure
|
|
21
|
-
* Supports:
|
|
22
|
-
* - Simple filters: filters[$and][0][field][$eq]=value
|
|
23
|
-
* - Deep filters: filters[$and][0][user][email][$contains]=admin
|
|
24
|
-
* - Very deep filters: filters[$and][0][user][role][name][$eq]=Admin
|
|
25
|
-
* - Nested groups: filters[$and][1][$or][0][field][$eq]=value
|
|
26
|
-
*/
|
|
27
|
-
export declare const parseQueryToStructure: (queryString: string) => ConditionGroup;
|