jmapcloud-ng-types 2.0.13-qa.5 → 2.0.13-qa.7
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/index.ts +1 -1
- package/package.json +1 -1
- package/public/app.d.ts +13 -0
- package/public/panel.d.ts +8 -1
package/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { JAppMessageService, JEventModule } from "jmapcloud-ng-core-types"
|
|
|
2
2
|
|
|
3
3
|
// Re-exported so existing `import { JAppMessageService } from "jmapcloud-ng-types"`
|
|
4
4
|
// callers keep resolving after the slice moved into ng-core-types.
|
|
5
|
-
export type { JAppMessageService } from "jmapcloud-ng-core-types"
|
|
5
|
+
export type { JAppMessageService, JAppRenderableMessage } from "jmapcloud-ng-core-types"
|
|
6
6
|
|
|
7
7
|
export interface JAppState {
|
|
8
8
|
panel: JAppPanelState
|
package/package.json
CHANGED
package/public/app.d.ts
CHANGED
|
@@ -3346,6 +3346,19 @@ declare global {
|
|
|
3346
3346
|
*
|
|
3347
3347
|
* The optional onCancel callback is called when the cancel button is clicked.
|
|
3348
3348
|
*
|
|
3349
|
+
* Message content has three intended forms:
|
|
3350
|
+
* - Plain text: `message: "Delete project foo?"`
|
|
3351
|
+
* - Sanitized HTML string:
|
|
3352
|
+
* `message: { kind: "html", value: "Delete <b>foo</b>?", policy: "dialog" }`
|
|
3353
|
+
* This is especially useful with translated rich strings, for example:
|
|
3354
|
+
* `message: { kind: "html", value: JMap.Language.translate("project.delete.message", { projectName: "<b>My project</b>" }), policy: "dialog" }`
|
|
3355
|
+
* - JSX / ReactNode:
|
|
3356
|
+
* `message: { kind: "node", value: <>Delete <strong>{project.name}</strong>?</> }`
|
|
3357
|
+
*
|
|
3358
|
+
* Plain text is the default. Prefer JSX / node
|
|
3359
|
+
* content when formatting is needed; use HTML only for legacy rich
|
|
3360
|
+
* string flows that still require sanitization at render time.
|
|
3361
|
+
*
|
|
3349
3362
|
* @param params message parameters
|
|
3350
3363
|
* @example
|
|
3351
3364
|
* ```ts
|
package/public/panel.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JAppRenderableMessage } from "jmapcloud-ng-core-types"
|
|
1
2
|
export {}
|
|
2
3
|
export interface JAppPanelActivationParams {
|
|
3
4
|
ignoreConfirmationMessage?: boolean
|
|
@@ -9,7 +10,13 @@ export interface JAppPanelDeactivationParams extends JAppPanelActivationParams {
|
|
|
9
10
|
|
|
10
11
|
export interface JAppPanelLeaveResponse {
|
|
11
12
|
title: string
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Same contract as confirm-message content:
|
|
15
|
+
* - bare `string` means plain text by default
|
|
16
|
+
* - rich HTML must be explicit and sanitized by the renderer
|
|
17
|
+
* - JSX / node content is preferred when formatting is needed
|
|
18
|
+
*/
|
|
19
|
+
message: JAppRenderableMessage | string
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
export interface JAppPanel {
|