strapi-plugin-navigation 2.2.14 → 2.2.16
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/README.md +68 -1
- package/admin/src/pages/View/components/NavigationHeader/index.js +8 -1
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.d.ts +6 -6
- package/admin/src/translations/ca.json +1 -0
- package/admin/src/translations/en.json +1 -0
- package/admin/src/translations/fr.json +1 -0
- package/package.json +7 -2
- package/server/controllers/client.js +15 -0
- package/server/i18n/navigationSetupStrategy.js +59 -39
- package/server/routes/client.js +8 -0
- package/server/services/admin.js +113 -56
- package/server/services/client.js +16 -0
- package/server/services/common.js +6 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/types/controllers.d.ts +1 -0
- package/types/services.d.ts +5 -1
package/types/controllers.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface IClientController {
|
|
|
44
44
|
getService: <T extends NavigationService = IClientService>(name?: NavigationServiceName) => T;
|
|
45
45
|
render: (ctx: StrapiControllerContext) => ToBeFixed;
|
|
46
46
|
renderChild: (ctx: StrapiControllerContext) => ToBeFixed;
|
|
47
|
+
readAll: (ctx: StrapiControllerContext) => ToBeFixed;
|
|
47
48
|
}
|
|
48
49
|
export type NavigationController = {
|
|
49
50
|
admin: IAdminController;
|
package/types/services.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type NavigationServiceName = "common" | "admin" | "client";
|
|
|
7
7
|
export type NavigationService = ICommonService | IAdminService | IClientService;
|
|
8
8
|
export interface IAdminService {
|
|
9
9
|
config: (viaSettingsPage?: boolean) => Promise<NavigationPluginConfig>;
|
|
10
|
-
get: () => Promise<Navigation[]>;
|
|
10
|
+
get: (ids?: Array<number>) => Promise<Navigation[]>;
|
|
11
11
|
getById: (id: Id) => Promise<Navigation>;
|
|
12
12
|
post: (payload: ToBeFixed, auditLog: AuditLogContext) => ToBeFixed;
|
|
13
13
|
put: (id: Id, payload: ToBeFixed, auditLog: AuditLogContext) => ToBeFixed;
|
|
@@ -44,6 +44,10 @@ export interface ICommonService {
|
|
|
44
44
|
getSlug(query: string): Promise<string>;
|
|
45
45
|
}
|
|
46
46
|
export interface IClientService {
|
|
47
|
+
readAll: (input: {
|
|
48
|
+
orderBy?: string;
|
|
49
|
+
orderDirection?: string;
|
|
50
|
+
} & I18nQueryParams) => Promise<ToBeFixed>;
|
|
47
51
|
render: (input: {
|
|
48
52
|
idOrSlug: Id;
|
|
49
53
|
type?: RenderType;
|