@seamware/odrl-policy-editor 1.7.0-PRE-56.21 → 1.7.0-PRE-56.23
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 +4 -3
- package/dist-component/odrl-policy-editor.d.ts +7 -4
- package/dist-component/odrl-policy-editor.js +10724 -10628
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -367,7 +367,7 @@ JavaScript properties on the element:
|
|
|
367
367
|
|---------------|------------------------------|------------------------------------------------------|
|
|
368
368
|
| `i18nStrings` | `DeepPartial<I18nStrings>` | Partial i18n overrides (deep-merged with defaults) |
|
|
369
369
|
| `themeConfig` | `Partial<ThemeConfig>` | Partial theme CSS custom property overrides |
|
|
370
|
-
| `
|
|
370
|
+
| `fieldTemplate` | `FieldTemplate` | Pre-fills the builder form and optionally locks fields (client-side; distinct from stored templates) |
|
|
371
371
|
| `policyContext` | `Record<string, string>` | Default `@context` for new policies (takes precedence over attribute) |
|
|
372
372
|
| `serviceId` | `string` | Service scope for policy/template operations (takes precedence over attribute) |
|
|
373
373
|
|
|
@@ -386,8 +386,9 @@ editor.themeConfig = {
|
|
|
386
386
|
'odrl-secondary-color': '#e8710a',
|
|
387
387
|
};
|
|
388
388
|
|
|
389
|
-
// Pre-fill and constrain the
|
|
390
|
-
|
|
389
|
+
// Pre-fill and constrain the builder form with a field template
|
|
390
|
+
// (distinct from the stored, placeholder-based templates in the template tabs)
|
|
391
|
+
editor.fieldTemplate = {
|
|
391
392
|
id: 'dome-access',
|
|
392
393
|
name: 'DOME Marketplace Access',
|
|
393
394
|
description: 'Grants access to a DOME resource',
|
|
@@ -150,7 +150,7 @@ export const TAG_NAME: 'odrl-policy-editor';
|
|
|
150
150
|
*
|
|
151
151
|
* - `i18nStrings` — partial i18n override object (deep-merged with defaults)
|
|
152
152
|
* - `themeConfig` — partial ThemeConfig override merged on top of the preset
|
|
153
|
-
* - `
|
|
153
|
+
* - `fieldTemplate` — a FieldTemplate object to pre-fill and constrain the editor
|
|
154
154
|
* - `policyContext` — custom JSON-LD `@context` object/string for new policies
|
|
155
155
|
* - `serviceId` — service ID string for service-scoped policy operations
|
|
156
156
|
*
|
|
@@ -190,11 +190,14 @@ export declare class OdrlPolicyEditorElement extends HTMLElement {
|
|
|
190
190
|
themeConfig: Record<string, string> | undefined;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* Field template to pre-fill and constrain the builder form.
|
|
194
|
+
*
|
|
195
|
+
* A client-side skeleton with editable/locked fields — distinct from the
|
|
196
|
+
* stored, placeholder-based templates managed through the template tabs.
|
|
194
197
|
*
|
|
195
198
|
* @example
|
|
196
199
|
* ```js
|
|
197
|
-
* editor.
|
|
200
|
+
* editor.fieldTemplate = {
|
|
198
201
|
* id: 'dome-access',
|
|
199
202
|
* name: 'DOME Marketplace Access',
|
|
200
203
|
* skeleton: { '@context': '...', '@type': 'odrl:Agreement', ... },
|
|
@@ -203,7 +206,7 @@ export declare class OdrlPolicyEditorElement extends HTMLElement {
|
|
|
203
206
|
* };
|
|
204
207
|
* ```
|
|
205
208
|
*/
|
|
206
|
-
|
|
209
|
+
fieldTemplate: Record<string, unknown> | undefined;
|
|
207
210
|
|
|
208
211
|
/**
|
|
209
212
|
* Custom JSON-LD `@context` for new policies.
|