@sitevision/api 2025.7.1 → 2025.9.2
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/common/router/index.d.ts +1 -1
- package/package.json +2 -2
- package/server/ImageUtil/index.d.ts +18 -0
- package/server/ImageUtil/index.js +2 -1
- package/server/OutputUtil/index.d.ts +18 -15
- package/server/PermissionUtil.Permission/index.d.ts +1 -0
- package/server/PermissionUtil.Permission/index.js +2 -1
- package/server/storage/index.d.ts +1 -1
- package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +2 -2
package/common/router/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface Request {
|
|
|
22
22
|
updateSession(): Session;
|
|
23
23
|
header(headerName: string): string | null;
|
|
24
24
|
file(fileParameterName: string): Node;
|
|
25
|
-
params: { [key: string]: string };
|
|
25
|
+
params: { [key: string]: string | string[] };
|
|
26
26
|
cookies: { [key: string]: string };
|
|
27
27
|
xhr: boolean;
|
|
28
28
|
serverside: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitevision/api",
|
|
3
|
-
"version": "2025.
|
|
3
|
+
"version": "2025.9.2",
|
|
4
4
|
"author": "Sitevision AB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"access": "public",
|
|
31
31
|
"directory": "dist"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "8982238e5bcb02d044c9fce2addb01a225972f2c"
|
|
34
34
|
}
|
|
@@ -302,6 +302,24 @@ export interface ImageUtil {
|
|
|
302
302
|
* @since Sitevision 2024.07.1
|
|
303
303
|
*/
|
|
304
304
|
setCaptionText(aImage: Node, aCaptionText: String | string): void;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Sets the source property for an image Node.
|
|
308
|
+
*
|
|
309
|
+
* <p>
|
|
310
|
+
* <strong>Permission note!</strong> Current user (the invoker of this method) must have
|
|
311
|
+
* {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE WRITE} permission
|
|
312
|
+
* on the image node that should be updated. <em>Updating an image for a <code>sv:userIdentity</code> requires
|
|
313
|
+
* {@link senselogic.sitevision.api.security.PermissionUtil.Permission#MANAGE_USER_IDENTITIES MANAGE_USER_IDENTITIES} permission
|
|
314
|
+
* on current page.</em>
|
|
315
|
+
* </p>
|
|
316
|
+
* @param aImage the sv:image Node, may not be null
|
|
317
|
+
* @param aSourceText the source text to set
|
|
318
|
+
* @throws ConstraintViolationException if aImage is not a sv:image or if current user is not authorized to alter the image node
|
|
319
|
+
* @throws RepositoryException if something else goes wrong
|
|
320
|
+
* @since Sitevision 2025.07.1
|
|
321
|
+
*/
|
|
322
|
+
setSourceText(aImage: Node, aSourceText: String | string): void;
|
|
305
323
|
}
|
|
306
324
|
|
|
307
325
|
declare namespace ImageUtil {}
|
|
@@ -15,5 +15,6 @@ var _default = exports["default"] = {
|
|
|
15
15
|
renameImage: function renameImage() {},
|
|
16
16
|
toBase64: function toBase64() {},
|
|
17
17
|
setAltText: function setAltText() {},
|
|
18
|
-
setCaptionText: function setCaptionText() {}
|
|
18
|
+
setCaptionText: function setCaptionText() {},
|
|
19
|
+
setSourceText: function setSourceText() {}
|
|
19
20
|
};
|
|
@@ -361,10 +361,8 @@ export interface OutputUtil extends OutputUtilConstants {
|
|
|
361
361
|
* Convenience method for rendering a linked web path to a specified node.
|
|
362
362
|
*
|
|
363
363
|
* <p>
|
|
364
|
-
*
|
|
365
|
-
* <
|
|
366
|
-
* with a pretty "double arrow" between the links<br>
|
|
367
|
-
* ---------------------------------------------------------
|
|
364
|
+
* <strong>Example:</strong> You use Velocity and want to do a simple "path to this page" trail using the
|
|
365
|
+
* <a href="https://envisionui.io/components/breadcrumb/" target="_blank">Envision Breadcrumb Component</a> markup.
|
|
368
366
|
* </p>
|
|
369
367
|
*
|
|
370
368
|
* <p><strong>A) The explicit way:</strong></p>
|
|
@@ -382,15 +380,20 @@ export interface OutputUtil extends OutputUtilConstants {
|
|
|
382
380
|
* #set ($linkRenderer = $sitevisionUtils.getLinkRenderer())
|
|
383
381
|
*
|
|
384
382
|
* <em>## Render links to all nodes</em>
|
|
385
|
-
* <
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
383
|
+
* <nav class="normal">
|
|
384
|
+
* <em>## Use a list for accessibility (https://envisionui.io/components/breadcrumb/)</em>
|
|
385
|
+
* <ol class="env-breadcrumb">
|
|
386
|
+
* #foreach ($node in $pathList)
|
|
387
|
+
* $linkRenderer.update($node)
|
|
388
|
+
* <li class="env-breadcrumb__item">
|
|
389
|
+
* $linkRenderer.render()
|
|
390
|
+
* #if (!$foreach.last)
|
|
391
|
+
* <span aria-hidden=true class="env-breadcrumb__separator">&raquo;</span>
|
|
392
|
+
* #end
|
|
393
|
+
* </li>
|
|
394
|
+
* #end
|
|
395
|
+
* </ol>
|
|
396
|
+
* </nav>
|
|
394
397
|
* #end</code></pre>
|
|
395
398
|
*
|
|
396
399
|
* <p><strong>B) The convenient way:</strong></p>
|
|
@@ -403,7 +406,7 @@ export interface OutputUtil extends OutputUtilConstants {
|
|
|
403
406
|
* <em>## Render</em>
|
|
404
407
|
* #set ($result = $outputUtil.renderWebPathNodes($currentPage, $linkRenderer, ' &raquo; '))
|
|
405
408
|
* #if ($result != '')
|
|
406
|
-
* <
|
|
409
|
+
* <nav aria-label="Breadcrumb" class="normal">$result</nav>
|
|
407
410
|
* #end</code></pre>
|
|
408
411
|
*
|
|
409
412
|
* <p>
|
|
@@ -412,7 +415,7 @@ export interface OutputUtil extends OutputUtilConstants {
|
|
|
412
415
|
* @param aDescendantNode the node the web path should be rendered for
|
|
413
416
|
* @param aLinkRenderer the link renderer that determines how links are rendered
|
|
414
417
|
* @param aSeparator the separator that should be put between the links. <em>Note! This is not encoded by this method.</em>
|
|
415
|
-
* @return a linked web
|
|
418
|
+
* @return a HTML list of linked web paths, or empty string if aDescendantNode is <code>null</code>,
 <code>aLinkRenderer</code> is <code>null</code> or no web path could be created.
|
|
416
419
|
* @see senselogic.sitevision.api.node.NodeTreeUtil#getWebPathNodes(javax.jcr.Node)
|
|
417
420
|
* @since Sitevision 3.0.2
|
|
418
421
|
*/
|
|
@@ -39,5 +39,6 @@ var _default = exports["default"] = {
|
|
|
39
39
|
MANAGE_TYPES_IDENTIFIERS: "MANAGE_TYPES_IDENTIFIERS",
|
|
40
40
|
MANAGE_CUSTOM_SEARCH_INDEX: "MANAGE_CUSTOM_SEARCH_INDEX",
|
|
41
41
|
MANAGE_PUBLISHING_LOCK: "MANAGE_PUBLISHING_LOCK",
|
|
42
|
-
MANAGE_DASHBOARDS: "MANAGE_DASHBOARDS"
|
|
42
|
+
MANAGE_DASHBOARDS: "MANAGE_DASHBOARDS",
|
|
43
|
+
MANAGE_AI: "MANAGE_AI"
|
|
43
44
|
};
|
|
@@ -14,7 +14,7 @@ export interface CollectionDataStore {
|
|
|
14
14
|
addAll(data: any[]): void;
|
|
15
15
|
get(dsid: string): unknown;
|
|
16
16
|
set(dsid: string, data: any): void;
|
|
17
|
-
remove(dsid: string):
|
|
17
|
+
remove(dsid: string): unknown;
|
|
18
18
|
removeAll(): void;
|
|
19
19
|
|
|
20
20
|
find(query: string, options?: FindOptions): SearchResult;
|
|
@@ -250,8 +250,8 @@ export type TextModuleRenderer = {
|
|
|
250
250
|
* Renders Markdown for the loaded Text module.
|
|
251
251
|
*
|
|
252
252
|
* <p>
|
|
253
|
-
*
|
|
254
|
-
*
|
|
253
|
+
* <strong>Note!</strong> The returned value will always be empty string if the {@link #isLoaded()} state is <code>false</code>
|
|
254
|
+
* when invoking this render method <em>(i.e. you would typically always check the loaded state before calling this method).</em>
|
|
255
255
|
* </p>
|
|
256
256
|
* @return the Markdown representation of the loaded Text module, or empty String if rendering fails or no Text module is loaded
|
|
257
257
|
* @since Sitevision 2025.07.1
|