@jahia/javascript-modules-library 0.3.0 → 0.5.1
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 +11 -10
- package/bin/jahia-deploy.mjs +27 -0
- package/dist/core/server/components/AbsoluteArea.d.ts +39 -0
- package/dist/core/server/components/AddContentButtons.d.ts +47 -0
- package/dist/core/server/components/AddResources.d.ts +63 -0
- package/dist/core/server/components/Area.d.ts +37 -0
- package/dist/core/server/components/render/HydrateInBrowser.d.ts +22 -0
- package/dist/core/server/components/render/Render.d.ts +31 -0
- package/dist/core/server/components/render/RenderInBrowser.d.ts +21 -0
- package/dist/core/server/components/render/internal/InBrowser.d.ts +6 -0
- package/dist/core/server/framework/defineJahiaComponent.d.ts +9 -0
- package/dist/core/server/framework/jahiaComponent.d.ts +28 -0
- package/dist/core/server/framework/register.d.ts +11 -0
- package/dist/core/server/hooks/useGQLQuery.d.ts +17 -0
- package/dist/core/server/hooks/useJCRQuery.d.ts +10 -0
- package/dist/core/server/hooks/useServerContext.d.ts +34 -0
- package/dist/core/server/hooks/useUrlBuilder.d.ts +52 -0
- package/dist/core/server/utils/jcr/getChildNodes.d.ts +14 -0
- package/dist/core/server/utils/jcr/getNodeFromPathOrId.d.ts +14 -0
- package/dist/core/server/utils/jcr/getNodeProps.d.ts +9 -0
- package/dist/core/server/utils/jcr/getNodesByJCRQuery.d.ts +14 -0
- package/dist/core/server/utils/urlBuilder/urlBuilder.d.ts +25 -0
- package/dist/globals.d.ts +47 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +5 -0
- package/dist/nav/server/navBuilder/navBuilder.d.ts +29 -0
- package/{types → dist}/org.jahia.modules.javascript.modules.engine.js.server.d.ts +1 -2
- package/dist/package.tgz +0 -0
- package/package.json +36 -57
- package/core/index.js +0 -1
- package/core/server/components/AbsoluteArea.js +0 -1
- package/core/server/components/AddContentButtons.js +0 -1
- package/core/server/components/AddResources.js +0 -1
- package/core/server/components/Area.js +0 -1
- package/core/server/components/index.js +0 -1
- package/core/server/components/render/HydrateInBrowser.js +0 -1
- package/core/server/components/render/Render.js +0 -1
- package/core/server/components/render/RenderInBrowser.js +0 -1
- package/core/server/components/render/index.js +0 -1
- package/core/server/components/render/internal/InBrowser.js +0 -1
- package/core/server/framework/defineJahiaComponent.js +0 -1
- package/core/server/framework/index.js +0 -1
- package/core/server/framework/register.js +0 -1
- package/core/server/hooks/index.js +0 -1
- package/core/server/hooks/useGQLQuery.js +0 -1
- package/core/server/hooks/useJCRQuery.js +0 -1
- package/core/server/hooks/useServerContext.js +0 -1
- package/core/server/hooks/useUrlBuilder.js +0 -1
- package/core/server/index.js +0 -1
- package/core/server/utils/index.js +0 -1
- package/core/server/utils/jcr/getChildNodes.js +0 -1
- package/core/server/utils/jcr/getNodeFromPathOrId.js +0 -1
- package/core/server/utils/jcr/getNodeProps.js +0 -1
- package/core/server/utils/jcr/getNodesByJCRQuery.js +0 -1
- package/core/server/utils/jcr/index.js +0 -1
- package/core/server/utils/urlBuilder/index.js +0 -1
- package/core/server/utils/urlBuilder/urlBuilder.js +0 -1
- package/index.js +0 -1
- package/nav/index.js +0 -1
- package/nav/server/index.js +0 -1
- package/nav/server/navBuilder/index.js +0 -1
- package/nav/server/navBuilder/navBuilder.js +0 -24
- package/types/@jahia/javascript-modules-library-private.d.ts +0 -60
- package/types/core/index.d.ts +0 -1
- package/types/core/server/components/AbsoluteArea.d.ts +0 -29
- package/types/core/server/components/AddContentButtons.d.ts +0 -13
- package/types/core/server/components/AddResources.d.ts +0 -31
- package/types/core/server/components/Area.d.ts +0 -27
- package/types/core/server/components/index.d.ts +0 -5
- package/types/core/server/components/render/HydrateInBrowser.d.ts +0 -13
- package/types/core/server/components/render/Render.d.ts +0 -23
- package/types/core/server/components/render/RenderInBrowser.d.ts +0 -13
- package/types/core/server/components/render/index.d.ts +0 -3
- package/types/core/server/components/render/internal/InBrowser.d.ts +0 -8
- package/types/core/server/framework/defineJahiaComponent.d.ts +0 -41
- package/types/core/server/framework/index.d.ts +0 -2
- package/types/core/server/framework/register.d.ts +0 -7
- package/types/core/server/hooks/index.d.ts +0 -4
- package/types/core/server/hooks/useGQLQuery.d.ts +0 -5
- package/types/core/server/hooks/useJCRQuery.d.ts +0 -3
- package/types/core/server/hooks/useServerContext.d.ts +0 -14
- package/types/core/server/hooks/useUrlBuilder.d.ts +0 -31
- package/types/core/server/index.d.ts +0 -4
- package/types/core/server/utils/index.d.ts +0 -2
- package/types/core/server/utils/jcr/getChildNodes.d.ts +0 -9
- package/types/core/server/utils/jcr/getNodeFromPathOrId.d.ts +0 -12
- package/types/core/server/utils/jcr/getNodeProps.d.ts +0 -7
- package/types/core/server/utils/jcr/getNodesByJCRQuery.d.ts +0 -9
- package/types/core/server/utils/jcr/index.d.ts +0 -4
- package/types/core/server/utils/urlBuilder/index.d.ts +0 -1
- package/types/core/server/utils/urlBuilder/urlBuilder.d.ts +0 -27
- package/types/globals.d.ts +0 -11
- package/types/index.d.ts +0 -19
- package/types/nav/index.d.ts +0 -1
- package/types/nav/server/index.d.ts +0 -1
- package/types/nav/server/navBuilder/index.d.ts +0 -1
- package/types/nav/server/navBuilder/navBuilder.d.ts +0 -78
- package/types/server.d.ts +0 -27
- package/types/servercontext.d.ts +0 -29
- /package/{types → dist}/java.io.d.ts +0 -0
- /package/{types → dist}/java.net.d.ts +0 -0
- /package/{types → dist}/java.security.d.ts +0 -0
- /package/{types → dist}/java.util.d.ts +0 -0
- /package/{types → dist}/javax.jcr.d.ts +0 -0
- /package/{types → dist}/javax.servlet.d.ts +0 -0
- /package/{types → dist}/javax.servlet.http.d.ts +0 -0
- /package/{types → dist}/org.jahia.services.content.d.ts +0 -0
- /package/{types → dist}/org.jahia.services.content.decorator.d.ts +0 -0
- /package/{types → dist}/org.jahia.services.query.d.ts +0 -0
- /package/{types → dist}/org.jahia.services.render.d.ts +0 -0
- /package/{types → dist}/org.jahia.services.usermanager.d.ts +0 -0
- /package/{types → dist}/org.osgi.framework.d.ts +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} JahiaComponent
|
|
3
|
-
* @property {string} [id] - The ID of the component (autogenerated but can be overridden)
|
|
4
|
-
* @property {string} name - The name of the component.
|
|
5
|
-
* @property {string} [displayName] - The display name of the component (in jahia's UI), optional.
|
|
6
|
-
* @property {"template"|"view"} componentType - The type of the component.
|
|
7
|
-
* @property {string} nodeType - The content node type the component applies to.
|
|
8
|
-
* @property {Record<string, string>} [properties] - Properties to add on the component, optional.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Using this function provides autocomplete on the jahiaComponent properties.
|
|
12
|
-
* @param {JahiaComponent} jahiaComponent - An object containing the Jahia component to define.
|
|
13
|
-
* @returns {JahiaComponent} The jahiaComponent object.
|
|
14
|
-
*/
|
|
15
|
-
export function defineJahiaComponent(jahiaComponent: JahiaComponent): JahiaComponent;
|
|
16
|
-
export type JahiaComponent = {
|
|
17
|
-
/**
|
|
18
|
-
* - The ID of the component (autogenerated but can be overridden)
|
|
19
|
-
*/
|
|
20
|
-
id?: string;
|
|
21
|
-
/**
|
|
22
|
-
* - The name of the component.
|
|
23
|
-
*/
|
|
24
|
-
name: string;
|
|
25
|
-
/**
|
|
26
|
-
* - The display name of the component (in jahia's UI), optional.
|
|
27
|
-
*/
|
|
28
|
-
displayName?: string;
|
|
29
|
-
/**
|
|
30
|
-
* - The type of the component.
|
|
31
|
-
*/
|
|
32
|
-
componentType: "template" | "view";
|
|
33
|
-
/**
|
|
34
|
-
* - The content node type the component applies to.
|
|
35
|
-
*/
|
|
36
|
-
nodeType: string;
|
|
37
|
-
/**
|
|
38
|
-
* - Properties to add on the component, optional.
|
|
39
|
-
*/
|
|
40
|
-
properties?: Record<string, string>;
|
|
41
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registers Jahia components into the global registry as views
|
|
3
|
-
* @param {object} jahiaComponents an object containing the jahia components to register
|
|
4
|
-
* @returns {void}
|
|
5
|
-
* TODO We will probably want to revisit this function once we handle global component registration in ticket https://jira.jahia.org/browse/BACKLOG-22400
|
|
6
|
-
*/
|
|
7
|
-
export function registerJahiaComponents(jahiaComponents: object): void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the current server context
|
|
3
|
-
* @returns {import('@jahia/javascript-modules-library').ServerContext} the server context
|
|
4
|
-
*/
|
|
5
|
-
export function useServerContext(): import('@jahia/javascript-modules-library').ServerContext;
|
|
6
|
-
export function ServerContextProvider({ renderContext, currentResource, currentNode, mainNode, bundleKey, children }: {
|
|
7
|
-
renderContext: any;
|
|
8
|
-
currentResource: any;
|
|
9
|
-
currentNode: any;
|
|
10
|
-
mainNode: any;
|
|
11
|
-
bundleKey: any;
|
|
12
|
-
children: any;
|
|
13
|
-
}): React.JSX.Element;
|
|
14
|
-
import React from "react";
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} UrlBuilderType
|
|
3
|
-
* @property {function({assetPath: string, moduleName?: string, parameters?: object}): string} buildStaticUrl
|
|
4
|
-
* @property {function({nodePath: string, extension?: string, language?:string, mode?:string, parameters?: object}): string} buildNodeUrl
|
|
5
|
-
* @property {function({nodePath: string, extension?: string, language?:string, mode?:string, parameters?: object}): string} buildHtmlFragmentUrl
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @returns {UrlBuilderType}
|
|
9
|
-
*/
|
|
10
|
-
export function useUrlBuilder(): UrlBuilderType;
|
|
11
|
-
export type UrlBuilderType = {
|
|
12
|
-
buildStaticUrl: (arg0: {
|
|
13
|
-
assetPath: string;
|
|
14
|
-
moduleName?: string;
|
|
15
|
-
parameters?: object;
|
|
16
|
-
}) => string;
|
|
17
|
-
buildNodeUrl: (arg0: {
|
|
18
|
-
nodePath: string;
|
|
19
|
-
extension?: string;
|
|
20
|
-
language?: string;
|
|
21
|
-
mode?: string;
|
|
22
|
-
parameters?: object;
|
|
23
|
-
}) => string;
|
|
24
|
-
buildHtmlFragmentUrl: (arg0: {
|
|
25
|
-
nodePath: string;
|
|
26
|
-
extension?: string;
|
|
27
|
-
language?: string;
|
|
28
|
-
mode?: string;
|
|
29
|
-
parameters?: object;
|
|
30
|
-
}) => string;
|
|
31
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns an array of child nodes of a given node.
|
|
3
|
-
* @param {import("org.jahia.services.content").JCRNodeWrapper} node - The node to get the child nodes from.
|
|
4
|
-
* @param {number} limit the maximum number of nodes to return (-1 to return all nodes, but be careful with this as it can be very slow and memory consuming, it's better to use a reasonable limit and use pagination if needed)
|
|
5
|
-
* @param {number} [offset=0] the offset to start from
|
|
6
|
-
* @param {function} [filter] - A function to filter the nodes to be returned.
|
|
7
|
-
* @returns {import("org.jahia.services.content").JCRNodeWrapper[]} An array of child nodes.
|
|
8
|
-
*/
|
|
9
|
-
export function getChildNodes(node: import("org.jahia.services.content").JCRNodeWrapper, limit: number, offset?: number, filter?: Function): import("org.jahia.services.content").JCRNodeWrapper[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a node from a path or identifier
|
|
3
|
-
* @param {object} props - The properties object containing either the node identifier or the node path.
|
|
4
|
-
* @param {string} [props.identifier] - The node identifier.
|
|
5
|
-
* @param {string} [props.path] - The node path.
|
|
6
|
-
* @param {import("org.jahia.services.content").JCRSessionWrapper} session - The JCR session.
|
|
7
|
-
* @returns {import("org.jahia.services.content").JCRNodeWrapper} The node.
|
|
8
|
-
*/
|
|
9
|
-
export function getNodeFromPathOrId(props: {
|
|
10
|
-
identifier?: string;
|
|
11
|
-
path?: string;
|
|
12
|
-
}, session: import("org.jahia.services.content").JCRSessionWrapper): import("org.jahia.services.content").JCRNodeWrapper;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the properties from a node
|
|
3
|
-
* @param {import("org.jahia.services.content").JCRNodeWrapper} node the node on which to extract the properties
|
|
4
|
-
* @param {Array} props the name of the properties to extract
|
|
5
|
-
* @returns {Object} an object containing the property values
|
|
6
|
-
*/
|
|
7
|
-
export function getNodeProps(node: import("org.jahia.services.content").JCRNodeWrapper, props: any[]): any;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Execute a JCR SQL2 query and return the result as an array of nodes
|
|
3
|
-
* @param {import("org.jahia.services.content").JCRSessionWrapper} session the JCR session to use
|
|
4
|
-
* @param {string} query the JCR SQL2 query to execute
|
|
5
|
-
* @param {number} limit the maximum number of nodes to return (-1 to return all nodes, but be careful with this as it can be very slow and memory consuming, it's better to use a reasonable limit and use pagination if needed)
|
|
6
|
-
* @param {number} [offset=0] the offset to start from
|
|
7
|
-
* @returns {import('org.jahia.services.content').JCRNodeWrapper[]} an array containing the nodes returned by the query
|
|
8
|
-
*/
|
|
9
|
-
export function getNodesByJCRQuery(session: import("org.jahia.services.content").JCRSessionWrapper, query: string, limit: number, offset?: number): import('org.jahia.services.content').JCRNodeWrapper[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./urlBuilder";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize the registry with default url builders
|
|
3
|
-
* @returns {void}
|
|
4
|
-
*/
|
|
5
|
-
export function initUrlBuilder(): void;
|
|
6
|
-
/**
|
|
7
|
-
* Provide URL generation for contents/files
|
|
8
|
-
* If parameters are not valid, or if a node couldn't be found, it will log an warning and return '#'
|
|
9
|
-
* @param {object} props props used to build the URL
|
|
10
|
-
* @param {string} [props.value] the value to use to build the URL
|
|
11
|
-
* @param {string} [props.path] the path of the resource to build the URL for
|
|
12
|
-
* @param {object} [props.parameters] the parameters to append to the URL
|
|
13
|
-
* @param {string} [props.mode] the mode to use to build the URL
|
|
14
|
-
* @param {string} [props.language] the language to use to build the URL
|
|
15
|
-
* @param {string} [props.extension] the extension to use to build the URL
|
|
16
|
-
* @param {import('org.jahia.services.render').RenderContext} renderContext the current renderContext
|
|
17
|
-
* @param {import('org.jahia.services.render').Resource} currentResource the current resource
|
|
18
|
-
* @returns {string} the final URL
|
|
19
|
-
*/
|
|
20
|
-
export function buildUrl(props: {
|
|
21
|
-
value?: string;
|
|
22
|
-
path?: string;
|
|
23
|
-
parameters?: object;
|
|
24
|
-
mode?: string;
|
|
25
|
-
language?: string;
|
|
26
|
-
extension?: string;
|
|
27
|
-
}, renderContext: import('org.jahia.services.render').RenderContext, currentResource: import('org.jahia.services.render').Resource): string;
|
package/types/globals.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {Bundle} from 'org.osgi.framework';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The global declarations, where top-level objects are exposed to server-side scripts
|
|
5
|
-
*/
|
|
6
|
-
declare global {
|
|
7
|
-
/**
|
|
8
|
-
* Exposed only during the server-side initial script registration process, not available during rendering
|
|
9
|
-
*/
|
|
10
|
-
export const bundle : Bundle;
|
|
11
|
-
}
|
package/types/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from "./core";
|
|
2
|
-
export * from "./nav";
|
|
3
|
-
export * from './globals';
|
|
4
|
-
export * from './java.io';
|
|
5
|
-
export * from './java.net';
|
|
6
|
-
export * from './java.security';
|
|
7
|
-
export * from './java.util';
|
|
8
|
-
export * from './javax.jcr';
|
|
9
|
-
export * from './javax.servlet';
|
|
10
|
-
export * from './javax.servlet.http';
|
|
11
|
-
export * from './org.jahia.modules.javascript.modules.engine.js.server';
|
|
12
|
-
export * from './org.jahia.services.content';
|
|
13
|
-
export * from './org.jahia.services.content.decorator';
|
|
14
|
-
export * from './org.jahia.services.query';
|
|
15
|
-
export * from './org.jahia.services.render';
|
|
16
|
-
export * from './org.jahia.services.usermanager';
|
|
17
|
-
export * from './org.osgi.framework';
|
|
18
|
-
export * from './server';
|
|
19
|
-
export * from './servercontext';
|
package/types/nav/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./server";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./navBuilder";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./navBuilder";
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build a navigation menu
|
|
3
|
-
* @param {number} maxDepth the maximum depth of the menu
|
|
4
|
-
* @param {string} base the base path of the menu
|
|
5
|
-
* @param {string} menuEntryView the view to use for each menu entry
|
|
6
|
-
* @param {number} startLevelValue the level at which to start the menu
|
|
7
|
-
* @param {import('org.jahia.services.render').RenderContext} renderContext the current render context
|
|
8
|
-
* @param {import('org.jahia.services.render').Resource} currentResource the current resource
|
|
9
|
-
* @returns {MenuEntry[]} an array of menu entries objects
|
|
10
|
-
*/
|
|
11
|
-
export function buildNavMenu(maxDepth: number, base: string, menuEntryView: string, startLevelValue: number, renderContext: import('org.jahia.services.render').RenderContext, currentResource: import('org.jahia.services.render').Resource): MenuEntry[];
|
|
12
|
-
export type MenuItemChild = {
|
|
13
|
-
/**
|
|
14
|
-
* - The page of a menu item child node
|
|
15
|
-
*/
|
|
16
|
-
path: string;
|
|
17
|
-
};
|
|
18
|
-
export type MenuEntry = {
|
|
19
|
-
/**
|
|
20
|
-
* - The HTML rendered HTML menu entry
|
|
21
|
-
*/
|
|
22
|
-
render: string;
|
|
23
|
-
/**
|
|
24
|
-
* - The node object for the menu entry
|
|
25
|
-
*/
|
|
26
|
-
node: import('org.jahia.services.content').JCRNodeWrapper;
|
|
27
|
-
/**
|
|
28
|
-
* - Whether the node is in the path.
|
|
29
|
-
*/
|
|
30
|
-
inPath: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* - Whether the node is selected.
|
|
33
|
-
*/
|
|
34
|
-
selected: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* - The level of the node.
|
|
37
|
-
*/
|
|
38
|
-
level: number;
|
|
39
|
-
/**
|
|
40
|
-
* - The children of the node
|
|
41
|
-
*/
|
|
42
|
-
children?: MenuEntry[];
|
|
43
|
-
};
|
|
44
|
-
export type MenuConfig = {
|
|
45
|
-
/**
|
|
46
|
-
* - The current render context
|
|
47
|
-
*/
|
|
48
|
-
renderContext: import('org.jahia.services.render').RenderContext;
|
|
49
|
-
/**
|
|
50
|
-
* - The current resource
|
|
51
|
-
*/
|
|
52
|
-
currentResource: import('org.jahia.services.render').Resource;
|
|
53
|
-
/**
|
|
54
|
-
* - The workspace to use: 'default' for the edit workspace, 'live' for the live workspace
|
|
55
|
-
*/
|
|
56
|
-
workspace: string;
|
|
57
|
-
/**
|
|
58
|
-
* - The name of the menu, used to match with the displayInMenuName property to see if this
|
|
59
|
-
* entry should be displayed in this specified menu
|
|
60
|
-
*/
|
|
61
|
-
menuName: string;
|
|
62
|
-
/**
|
|
63
|
-
* - The level at which to start the menu
|
|
64
|
-
*/
|
|
65
|
-
startLevelValue: number;
|
|
66
|
-
/**
|
|
67
|
-
* - The maximum depth of the menu
|
|
68
|
-
*/
|
|
69
|
-
maxDepth: number;
|
|
70
|
-
/**
|
|
71
|
-
* - The view to use for each menu entry
|
|
72
|
-
*/
|
|
73
|
-
menuEntryView?: string;
|
|
74
|
-
/**
|
|
75
|
-
* - The main resource node
|
|
76
|
-
*/
|
|
77
|
-
mainResourceNode: import('org.jahia.services.content').JCRNodeWrapper;
|
|
78
|
-
};
|
package/types/server.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {ConfigHelper, GQLHelper, OSGiHelper, RegistryHelper, RenderHelper} from 'org.jahia.modules.javascript.modules.engine.js.server';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A set of helpers that provide common functionality provided by Jahia for Javascript server-side rendering
|
|
5
|
-
*/
|
|
6
|
-
export const server: {
|
|
7
|
-
/**
|
|
8
|
-
* This helper provides access to OSGi configuration
|
|
9
|
-
*/
|
|
10
|
-
config: ConfigHelper,
|
|
11
|
-
/**
|
|
12
|
-
* This helper provides access Jahia's GraphQL API, to execute queries and mutations
|
|
13
|
-
*/
|
|
14
|
-
gql: GQLHelper,
|
|
15
|
-
/**
|
|
16
|
-
* This helper provides access to OSGi bundle for resource loading and service access
|
|
17
|
-
*/
|
|
18
|
-
osgi: OSGiHelper,
|
|
19
|
-
/**
|
|
20
|
-
* This helper provides access to Jahia's registry API, to register new UI objects or retrieving existing ones
|
|
21
|
-
*/
|
|
22
|
-
registry: RegistryHelper,
|
|
23
|
-
/**
|
|
24
|
-
* This helper provides rendering functions such as registering page resources, adding cache dependencies or rendering components
|
|
25
|
-
*/
|
|
26
|
-
render: RenderHelper
|
|
27
|
-
};
|
package/types/servercontext.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {RenderContext, Resource} from 'org.jahia.services.render';
|
|
2
|
-
import {JCRNodeWrapper} from 'org.jahia.services.content';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A context object that gives access to the underlying Jahia Java objects that are part of the current rendering context
|
|
6
|
-
*/
|
|
7
|
-
export interface ServerContext {
|
|
8
|
-
/**
|
|
9
|
-
* Jahia's rendering context, it provides access to all kinds of context information, such as the current request, response, user, mode, mainResource and more
|
|
10
|
-
*/
|
|
11
|
-
renderContext : RenderContext;
|
|
12
|
-
/**
|
|
13
|
-
* The current resource being rendered, which is a combination of the current node and its template/view information
|
|
14
|
-
*/
|
|
15
|
-
currentResource : Resource;
|
|
16
|
-
/**
|
|
17
|
-
* The current JCR node being rendered
|
|
18
|
-
*/
|
|
19
|
-
currentNode : JCRNodeWrapper;
|
|
20
|
-
/**
|
|
21
|
-
* The main JCR node being rendered, which is the root node of the current page
|
|
22
|
-
*/
|
|
23
|
-
mainNode : JCRNodeWrapper;
|
|
24
|
-
/**
|
|
25
|
-
* The OSGi bundle key of the current module being rendered
|
|
26
|
-
*/
|
|
27
|
-
bundleKey : string;
|
|
28
|
-
}
|
|
29
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|