@seamware/odrl-policy-editor 1.6.0 → 1.7.0-PRE-56.13
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-component/odrl-policy-editor.d.ts +32 -0
- package/dist-component/odrl-policy-editor.js +11739 -11145
- package/package.json +1 -1
|
@@ -18,6 +18,27 @@ export type EditorMode = 'create' | 'edit';
|
|
|
18
18
|
/** Theme preset names supported by the embedded component. */
|
|
19
19
|
export type EmbeddedThemePreset = 'light' | 'dark';
|
|
20
20
|
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Tab visibility
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Controls the visibility of individual editor tabs in the web component.
|
|
27
|
+
*
|
|
28
|
+
* Each property, when `true`, hides the corresponding tab.
|
|
29
|
+
* By default all tabs are visible (all values are `false`).
|
|
30
|
+
*/
|
|
31
|
+
export interface TabVisibility {
|
|
32
|
+
/** When `true`, hides the visual policy builder tab. */
|
|
33
|
+
hideBuilderTab: boolean;
|
|
34
|
+
/** When `true`, hides the raw ODRL JSON editor tab. */
|
|
35
|
+
hideRawTab: boolean;
|
|
36
|
+
/** When `true`, hides the template selection tab. */
|
|
37
|
+
hideTemplateTab: boolean;
|
|
38
|
+
/** When `true`, hides the template creation/management tab. */
|
|
39
|
+
hideTemplateCreateTab: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
21
42
|
// ---------------------------------------------------------------------------
|
|
22
43
|
// Event map
|
|
23
44
|
// ---------------------------------------------------------------------------
|
|
@@ -42,6 +63,10 @@ export interface EmbeddedEventMap {
|
|
|
42
63
|
'policy-validated': { result: Record<string, unknown> };
|
|
43
64
|
/** Fired when the user clicks Cancel. */
|
|
44
65
|
'editor-cancelled': Record<string, never>;
|
|
66
|
+
/** Fired after a new template is created via the template editor. */
|
|
67
|
+
'template-created': { template: Record<string, unknown>; id: string };
|
|
68
|
+
/** Fired after an existing template is updated via the template editor. */
|
|
69
|
+
'template-updated': { template: Record<string, unknown>; id: string };
|
|
45
70
|
}
|
|
46
71
|
|
|
47
72
|
/** Callback signature for dispatching custom events to the host. */
|
|
@@ -85,6 +110,13 @@ export interface EmbeddedConfig {
|
|
|
85
110
|
* endpoints (`POST /policy`).
|
|
86
111
|
*/
|
|
87
112
|
serviceId: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Controls which editor tabs are hidden.
|
|
115
|
+
*
|
|
116
|
+
* Each property, when `true`, hides the corresponding tab.
|
|
117
|
+
* Defaults to all tabs visible.
|
|
118
|
+
*/
|
|
119
|
+
hiddenTabs: TabVisibility;
|
|
88
120
|
}
|
|
89
121
|
|
|
90
122
|
// ---------------------------------------------------------------------------
|