@sap/ux-specification 1.124.35 → 1.124.37
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/CHANGELOG.md +68 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +278 -269
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +202 -7
- package/dist/schemas/v4/ApplicationV4.json +14 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +75 -4
- package/dist/specification/package.json +10 -10
- package/dist/specification/scripts/macros/corrections.d.ts +1 -0
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +126 -2
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +36 -10
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +39 -3
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +1 -0
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +2 -1
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
- package/dist/specification/src/i18n/i18n.d.ts.map +1 -1
- package/dist/specification/src/i18n/i18n.js +2 -1
- package/dist/specification/src/i18n/i18n.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts +91 -0
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js +139 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts +95 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js +210 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +5 -22
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +6 -48
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +26 -106
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +4 -0
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +4 -0
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts +38 -0
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js +3 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js +50 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js +46 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts +26 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js +77 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js +43 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js +68 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts +19 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js +48 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts +6 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js +14 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js.map +1 -0
- package/dist/specification/src/sync/common/i18n.json +22 -0
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +2 -0
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +4 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +29 -20
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +3 -2
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +48 -19
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +54 -6
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +106 -12
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +7 -7
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +56 -2
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +4 -4
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts +12 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js +167 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +59 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +582 -7
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +29 -6
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +2 -0
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +25 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +28 -4
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +12 -0
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +26 -1
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +3 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +10 -7
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +212 -46
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/app.d.ts +11 -0
- package/dist/specification/src/sync/v4/generate/app.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/app.js +31 -0
- package/dist/specification/src/sync/v4/generate/app.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +13 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +93 -13
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +4 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +29 -27
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +12 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +17 -23
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +20 -0
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +2 -4
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +2 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +3 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +119 -127
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +172 -171
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +7 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +19 -0
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +34 -0
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -1
- package/dist/specification/test/test-utils/utils.js +4 -0
- package/dist/specification/test/test-utils/utils.js.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +2 -2
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.js +6 -6
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +15 -5
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +1 -0
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +1 -0
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +2 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.js +1 -0
- package/dist/types/src/common/webapp/manifest/Manifest.js.map +1 -1
- package/dist/types/src/v4/application.d.ts +15 -0
- package/dist/types/src/v4/application.d.ts.map +1 -1
- package/dist/types/src/v4/application.js +10 -0
- package/dist/types/src/v4/application.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":";;;;;AASA,
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":";;;;;AASA,4BAgBC;AAzBD,sDAA8B;AAC9B,yFAAiD;AACjD,uCAAwD;AAExD;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,QAAQ,GAAG,IAAI;IACpC,sCAAsC;IACtC,iBAAO,CAAC,IAAI,CAAC;QACT,SAAS,EAAE;YACP,EAAE,EAAE;gBACA,WAAW,EAAE,gCAAM;aACtB;SACJ;QACD,GAAG,EAAE,QAAQ;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;QAClB,iBAAiB,EAAE,KAAK;KAC3B,CAAC,CAAC;IAEH,oCAAoC;IACpC,IAAA,eAAY,EAAC,iBAAO,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Definition } from 'typescript-json-schema';
|
|
2
|
+
import type { DecoratorContext, DecoratorStep } from './interfaces';
|
|
3
|
+
type DecoratorClass = new (...args: unknown[]) => object;
|
|
4
|
+
/**
|
|
5
|
+
* Options for configuring the Decorator processor.
|
|
6
|
+
*/
|
|
7
|
+
export interface DecoratorOptions {
|
|
8
|
+
/** Custom steps (replaces defaults entirely) */
|
|
9
|
+
steps?: DecoratorStep[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decorator processor - applies decorator metadata to schema definitions.
|
|
13
|
+
*
|
|
14
|
+
* This class processes decorator annotations (@hide, @message, @enums, @validity)
|
|
15
|
+
* through a configurable pipeline of steps.
|
|
16
|
+
*
|
|
17
|
+
* If the target class defines an `init(context: DecoratorContext)` method, it will be
|
|
18
|
+
* called automatically after all steps have been executed.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // Define a class with decorators (no base class needed)
|
|
23
|
+
* class TableSettings implements v4.TableSettings {
|
|
24
|
+
* @hide(when(tableContext.type, 'AnalyticalTable'))
|
|
25
|
+
* @validity({ since: '1.84.0' })
|
|
26
|
+
* creationMode?: v4.TableCreationModeLR;
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* // Create decorator processor with context
|
|
30
|
+
* const decorator = new Decorator({ schema: appSchema, app, page });
|
|
31
|
+
*
|
|
32
|
+
* // Apply decorators - just pass the class
|
|
33
|
+
* const definition = decorator.apply(TableSettings, { type: 'GridTable' });
|
|
34
|
+
*
|
|
35
|
+
* // Apply with an explicit definition (e.g., view-specific copy)
|
|
36
|
+
* const definition = decorator.apply(Table, customContext, tableDefinition);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class Decorator {
|
|
40
|
+
private readonly context;
|
|
41
|
+
private readonly steps;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new Decorator processor.
|
|
44
|
+
*
|
|
45
|
+
* @param context - Runtime context for decorator evaluation (app, page, schema)
|
|
46
|
+
* @param options - Optional configuration for steps
|
|
47
|
+
*/
|
|
48
|
+
constructor(context: DecoratorContext, options?: DecoratorOptions);
|
|
49
|
+
/**
|
|
50
|
+
* Initialize all decorator metadata to a schema definition.
|
|
51
|
+
*
|
|
52
|
+
* Resolves the definition by class name from the schema, or uses an explicit
|
|
53
|
+
* definition if provided. Runs all configured steps in order, then calls
|
|
54
|
+
* `init(context)` on the target class if it defines one.
|
|
55
|
+
*
|
|
56
|
+
* @param Target - Class constructor with decorator metadata
|
|
57
|
+
* @param customContext - Optional runtime context (e.g., table state, section state)
|
|
58
|
+
* @param definition - Optional explicit definition (overrides schema lookup by class name)
|
|
59
|
+
* @returns The modified schema definition, or undefined if not found
|
|
60
|
+
*/
|
|
61
|
+
init<T extends DecoratorClass>(Target: T | T[], customContext?: Record<string, unknown>, definition?: Definition): Definition | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Apply decorator metadata to a schema definition.
|
|
64
|
+
*
|
|
65
|
+
* Resolves the definition by class name from the schema, or uses an explicit
|
|
66
|
+
* definition if provided. Runs all configured steps in order, then calls
|
|
67
|
+
* `init(context)` on the target class if it defines one.
|
|
68
|
+
*
|
|
69
|
+
* @param Target - Class constructor with decorator metadata
|
|
70
|
+
* @param customContext - Optional runtime context (e.g., table state, section state)
|
|
71
|
+
* @param definition - Optional explicit definition (overrides schema lookup by class name)
|
|
72
|
+
* @returns The modified schema definition, or undefined if not found
|
|
73
|
+
*/
|
|
74
|
+
private apply;
|
|
75
|
+
/**
|
|
76
|
+
* Apply description decorator from class metadata.
|
|
77
|
+
*
|
|
78
|
+
* @param Target - Class constructor with decorator metadata
|
|
79
|
+
* @param definition - The schema definition to modify
|
|
80
|
+
*/
|
|
81
|
+
private applyDescription;
|
|
82
|
+
/**
|
|
83
|
+
* Apply isViewNode decorator from class metadata.
|
|
84
|
+
*
|
|
85
|
+
* @param Target - Class constructor with decorator metadata
|
|
86
|
+
* @param definition - The schema definition to modify
|
|
87
|
+
*/
|
|
88
|
+
private applyIsViewNode;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=Decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Decorator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/Decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAYpE,KAAK,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,gDAAgD;IAChD,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,SAAS;IAClB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IAExC;;;;;OAKG;gBACS,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAKjE;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,CAAC,SAAS,cAAc,EACzB,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EACf,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,UAAU,CAAC,EAAE,UAAU,GACxB,UAAU,GAAG,SAAS;IAUzB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,KAAK;IAoCb;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;CAO1B"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Decorator = void 0;
|
|
4
|
+
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
5
|
+
const decorators_1 = require("./decorators");
|
|
6
|
+
const steps_1 = require("./steps");
|
|
7
|
+
/**
|
|
8
|
+
* Default steps executed in order.
|
|
9
|
+
* Order: enums -> message -> hide
|
|
10
|
+
* Validity is opt-in - add new Validity() to steps to enable it.
|
|
11
|
+
* TODO: add @validity for general enablement
|
|
12
|
+
*/
|
|
13
|
+
const DEFAULT_STEPS = [new steps_1.Enums(), new steps_1.Message(), new steps_1.Hide()];
|
|
14
|
+
/**
|
|
15
|
+
* Decorator processor - applies decorator metadata to schema definitions.
|
|
16
|
+
*
|
|
17
|
+
* This class processes decorator annotations (@hide, @message, @enums, @validity)
|
|
18
|
+
* through a configurable pipeline of steps.
|
|
19
|
+
*
|
|
20
|
+
* If the target class defines an `init(context: DecoratorContext)` method, it will be
|
|
21
|
+
* called automatically after all steps have been executed.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // Define a class with decorators (no base class needed)
|
|
26
|
+
* class TableSettings implements v4.TableSettings {
|
|
27
|
+
* @hide(when(tableContext.type, 'AnalyticalTable'))
|
|
28
|
+
* @validity({ since: '1.84.0' })
|
|
29
|
+
* creationMode?: v4.TableCreationModeLR;
|
|
30
|
+
* }
|
|
31
|
+
*
|
|
32
|
+
* // Create decorator processor with context
|
|
33
|
+
* const decorator = new Decorator({ schema: appSchema, app, page });
|
|
34
|
+
*
|
|
35
|
+
* // Apply decorators - just pass the class
|
|
36
|
+
* const definition = decorator.apply(TableSettings, { type: 'GridTable' });
|
|
37
|
+
*
|
|
38
|
+
* // Apply with an explicit definition (e.g., view-specific copy)
|
|
39
|
+
* const definition = decorator.apply(Table, customContext, tableDefinition);
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
class Decorator {
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new Decorator processor.
|
|
45
|
+
*
|
|
46
|
+
* @param context - Runtime context for decorator evaluation (app, page, schema)
|
|
47
|
+
* @param options - Optional configuration for steps
|
|
48
|
+
*/
|
|
49
|
+
constructor(context, options) {
|
|
50
|
+
this.context = context;
|
|
51
|
+
this.steps = options?.steps ?? DEFAULT_STEPS;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Initialize all decorator metadata to a schema definition.
|
|
55
|
+
*
|
|
56
|
+
* Resolves the definition by class name from the schema, or uses an explicit
|
|
57
|
+
* definition if provided. Runs all configured steps in order, then calls
|
|
58
|
+
* `init(context)` on the target class if it defines one.
|
|
59
|
+
*
|
|
60
|
+
* @param Target - Class constructor with decorator metadata
|
|
61
|
+
* @param customContext - Optional runtime context (e.g., table state, section state)
|
|
62
|
+
* @param definition - Optional explicit definition (overrides schema lookup by class name)
|
|
63
|
+
* @returns The modified schema definition, or undefined if not found
|
|
64
|
+
*/
|
|
65
|
+
init(Target, customContext, definition) {
|
|
66
|
+
if (Array.isArray(Target)) {
|
|
67
|
+
for (const SingleTarget of Target) {
|
|
68
|
+
this.apply(SingleTarget, customContext, definition);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return this.apply(Target, customContext, definition);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Apply decorator metadata to a schema definition.
|
|
77
|
+
*
|
|
78
|
+
* Resolves the definition by class name from the schema, or uses an explicit
|
|
79
|
+
* definition if provided. Runs all configured steps in order, then calls
|
|
80
|
+
* `init(context)` on the target class if it defines one.
|
|
81
|
+
*
|
|
82
|
+
* @param Target - Class constructor with decorator metadata
|
|
83
|
+
* @param customContext - Optional runtime context (e.g., table state, section state)
|
|
84
|
+
* @param definition - Optional explicit definition (overrides schema lookup by class name)
|
|
85
|
+
* @returns The modified schema definition, or undefined if not found
|
|
86
|
+
*/
|
|
87
|
+
apply(Target, customContext, definition) {
|
|
88
|
+
// Resolve definition: explicit parameter takes precedence, then schema lookup by class name
|
|
89
|
+
const resolvedDefinition = definition ?? this.context.schema?.getDefinition(Target.name);
|
|
90
|
+
if (!resolvedDefinition) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
// Class-level decorators (inline, not steps)
|
|
94
|
+
this.applyDescription(Target, resolvedDefinition);
|
|
95
|
+
this.applyIsViewNode(Target, resolvedDefinition);
|
|
96
|
+
// Build runtime context with custom context merged
|
|
97
|
+
const context = {
|
|
98
|
+
...this.context,
|
|
99
|
+
custom: customContext
|
|
100
|
+
};
|
|
101
|
+
// Run steps in order (using Target.prototype for metadata lookup)
|
|
102
|
+
for (const step of this.steps) {
|
|
103
|
+
step.init(Target.prototype, resolvedDefinition, context);
|
|
104
|
+
}
|
|
105
|
+
// Auto-call init() if the target class defines a single-argument post-processing hook.
|
|
106
|
+
// Guards against DecoratorStep classes (whose init takes 3 args) being invoked incorrectly.
|
|
107
|
+
if (typeof Target.prototype.init === 'function' && Target.prototype.init.length === 1) {
|
|
108
|
+
Target.prototype.init(context);
|
|
109
|
+
}
|
|
110
|
+
return resolvedDefinition;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Apply description decorator from class metadata.
|
|
114
|
+
*
|
|
115
|
+
* @param Target - Class constructor with decorator metadata
|
|
116
|
+
* @param definition - The schema definition to modify
|
|
117
|
+
*/
|
|
118
|
+
applyDescription(Target, definition) {
|
|
119
|
+
const description = Reflect.getMetadata(decorators_1.metadataKeys.description, Target);
|
|
120
|
+
if (description !== undefined) {
|
|
121
|
+
definition.description = description;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Apply isViewNode decorator from class metadata.
|
|
126
|
+
*
|
|
127
|
+
* @param Target - Class constructor with decorator metadata
|
|
128
|
+
* @param definition - The schema definition to modify
|
|
129
|
+
*/
|
|
130
|
+
applyIsViewNode(Target, definition) {
|
|
131
|
+
const isViewNode = Reflect.getMetadata(decorators_1.metadataKeys.isViewNode, Target);
|
|
132
|
+
if (isViewNode !== undefined) {
|
|
133
|
+
definition[ux_specification_types_1.SchemaTag.isViewNode] = isViewNode;
|
|
134
|
+
definition.properties = definition.properties || {};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.Decorator = Decorator;
|
|
139
|
+
//# sourceMappingURL=Decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Decorator.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/Decorator.ts"],"names":[],"mappings":";;;AACA,wEAAwD;AAExD,6CAA4C;AAC5C,mCAA+C;AAE/C;;;;;GAKG;AACH,MAAM,aAAa,GAAoB,CAAC,IAAI,aAAK,EAAE,EAAE,IAAI,eAAO,EAAE,EAAE,IAAI,YAAI,EAAE,CAAC,CAAC;AAYhF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,SAAS;IAIlB;;;;;OAKG;IACH,YAAY,OAAyB,EAAE,OAA0B;QAC7D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,aAAa,CAAC;IACjD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACA,MAAe,EACf,aAAuC,EACvC,UAAuB;QAEvB,IAAI,KAAK,CAAC,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AED,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACK,gBAAgB,CAA2B,MAAS,EAAE,UAAsB;QAChF,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC1E,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;QACzC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACK,eAAe,CAA2B,MAAS,EAAE,UAAsB;QAC/E,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACxE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,UAAU,CAAC,kCAAS,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;YAC9C,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;QACxD,CAAC;IACL,CAAC;CACJ;AAnHD,8BAmHC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Condition evaluation utilities for decorator steps.
|
|
3
|
+
* Extracted from DecoratorClass to be shared across all steps.
|
|
4
|
+
*/
|
|
5
|
+
import type { DependsOnCondition } from '@sap/ux-specification-types';
|
|
6
|
+
import type { DecoratorContext } from './interfaces';
|
|
7
|
+
/**
|
|
8
|
+
* Result of evaluating a single condition.
|
|
9
|
+
*/
|
|
10
|
+
export type EvaluateConditionResult = {
|
|
11
|
+
passed: boolean;
|
|
12
|
+
value: unknown;
|
|
13
|
+
key: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Result of evaluating a condition with context for messages.
|
|
17
|
+
*/
|
|
18
|
+
export type ConditionEvaluationResult = {
|
|
19
|
+
passed: boolean;
|
|
20
|
+
context: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Evaluates decorator conditions against runtime context.
|
|
24
|
+
* Supports single conditions, AND conditions, and OR conditions with nesting.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ConditionEvaluator {
|
|
27
|
+
private readonly context;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new ConditionEvaluator with the given decorator context.
|
|
30
|
+
*
|
|
31
|
+
* @param context - The decorator context containing app, page, and custom runtime data
|
|
32
|
+
*/
|
|
33
|
+
constructor(context: DecoratorContext);
|
|
34
|
+
/**
|
|
35
|
+
* Gets property value from the decorator context using a property path.
|
|
36
|
+
* Supports JSONPath syntax for complex paths.
|
|
37
|
+
*
|
|
38
|
+
* @param propertyPath - JSONPath-style path to resolve (e.g. 'page.isALP', 'custom.type')
|
|
39
|
+
* @returns The key/value pair at the resolved path, or undefined if not found
|
|
40
|
+
*/
|
|
41
|
+
getPropertyKeyValue(propertyPath: string): {
|
|
42
|
+
key: string;
|
|
43
|
+
value: unknown;
|
|
44
|
+
} | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Resolves PathNode values in message params to their actual values.
|
|
47
|
+
*
|
|
48
|
+
* @param params - Optional map of parameter names to values (may contain PathNodes)
|
|
49
|
+
* @returns Resolved params with PathNodes replaced by their runtime values
|
|
50
|
+
*/
|
|
51
|
+
resolveMessageParams(params?: Record<string, unknown>): Record<string, unknown> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Evaluates a condition and returns whether it passed and context for messages.
|
|
54
|
+
*
|
|
55
|
+
* @param conditionInfo - The condition to evaluate (single, AND, or OR)
|
|
56
|
+
* @returns Whether the condition passed and a context string for message interpolation
|
|
57
|
+
*/
|
|
58
|
+
evaluate(conditionInfo: DependsOnCondition): ConditionEvaluationResult;
|
|
59
|
+
/**
|
|
60
|
+
* Evaluates a single dependency condition.
|
|
61
|
+
*
|
|
62
|
+
* @param condition - A single condition with path, optional expectedValue, and optional negate
|
|
63
|
+
* @returns The evaluation result with passed flag, resolved value, and key
|
|
64
|
+
*/
|
|
65
|
+
private evaluateSingleCondition;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the context message from evaluation results.
|
|
68
|
+
*
|
|
69
|
+
* @param results - Array of evaluation results to summarize
|
|
70
|
+
* @returns A comma-separated string of failed condition key/value pairs
|
|
71
|
+
*/
|
|
72
|
+
private getContextForMessage;
|
|
73
|
+
/**
|
|
74
|
+
* Evaluates an AND condition item which can be a single condition or nested OR group.
|
|
75
|
+
*
|
|
76
|
+
* @param conditionItem - A single condition or an OR group nested inside AND
|
|
77
|
+
* @returns Whether the item passed and the individual evaluation results
|
|
78
|
+
*/
|
|
79
|
+
private evaluateAndConditionItem;
|
|
80
|
+
/**
|
|
81
|
+
* Evaluates OR conditions (at least one must match).
|
|
82
|
+
*
|
|
83
|
+
* @param orConditions - Array of OR condition items (single conditions or AND groups)
|
|
84
|
+
* @returns Whether any condition passed and all individual evaluation results
|
|
85
|
+
*/
|
|
86
|
+
private evaluateOrConditions;
|
|
87
|
+
/**
|
|
88
|
+
* Evaluates AND conditions (all must match).
|
|
89
|
+
*
|
|
90
|
+
* @param andConditions - Array of AND condition items (single conditions or OR groups)
|
|
91
|
+
* @returns Whether all conditions passed and all individual evaluation results
|
|
92
|
+
*/
|
|
93
|
+
private evaluateAndConditions;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=condition-evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-evaluator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/condition-evaluator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACR,kBAAkB,EAIrB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAYrD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAE5C;;;;OAIG;gBACS,OAAO,EAAE,gBAAgB;IAUrC;;;;;;OAMG;IACH,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS;IA2BtF;;;;;OAKG;IACH,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAiB3F;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,kBAAkB,GAAG,yBAAyB;IAqBtE;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAYhC;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAqC5B;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;CAkBhC"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConditionEvaluator = void 0;
|
|
4
|
+
const jsonpath_plus_1 = require("jsonpath-plus");
|
|
5
|
+
const decorator_paths_1 = require("./decorator-paths");
|
|
6
|
+
/**
|
|
7
|
+
* Evaluates decorator conditions against runtime context.
|
|
8
|
+
* Supports single conditions, AND conditions, and OR conditions with nesting.
|
|
9
|
+
*/
|
|
10
|
+
class ConditionEvaluator {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new ConditionEvaluator with the given decorator context.
|
|
13
|
+
*
|
|
14
|
+
* @param context - The decorator context containing app, page, and custom runtime data
|
|
15
|
+
*/
|
|
16
|
+
constructor(context) {
|
|
17
|
+
this.context = {
|
|
18
|
+
// Use app.config (plain AppContext) for JSONPath evaluation, not the full App instance.
|
|
19
|
+
// app.config holds manifest and other plain data that path builders reference (e.g. app.manifest).
|
|
20
|
+
app: context.app?.config,
|
|
21
|
+
page: context.page?.config,
|
|
22
|
+
custom: context.custom
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets property value from the decorator context using a property path.
|
|
27
|
+
* Supports JSONPath syntax for complex paths.
|
|
28
|
+
*
|
|
29
|
+
* @param propertyPath - JSONPath-style path to resolve (e.g. 'page.isALP', 'custom.type')
|
|
30
|
+
* @returns The key/value pair at the resolved path, or undefined if not found
|
|
31
|
+
*/
|
|
32
|
+
getPropertyKeyValue(propertyPath) {
|
|
33
|
+
if (!propertyPath || !this.context) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const jsonPath = propertyPath.startsWith('$') ? propertyPath : `$.${propertyPath}`;
|
|
38
|
+
const results = (0, jsonpath_plus_1.JSONPath)({
|
|
39
|
+
path: jsonPath,
|
|
40
|
+
json: this.context,
|
|
41
|
+
resultType: 'all'
|
|
42
|
+
});
|
|
43
|
+
if (!results || results.length === 0) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
const result = results[0];
|
|
47
|
+
const key = String(result.parentProperty);
|
|
48
|
+
const value = result.value;
|
|
49
|
+
return { key, value };
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolves PathNode values in message params to their actual values.
|
|
57
|
+
*
|
|
58
|
+
* @param params - Optional map of parameter names to values (may contain PathNodes)
|
|
59
|
+
* @returns Resolved params with PathNodes replaced by their runtime values
|
|
60
|
+
*/
|
|
61
|
+
resolveMessageParams(params) {
|
|
62
|
+
if (!params) {
|
|
63
|
+
return params;
|
|
64
|
+
}
|
|
65
|
+
const resolved = {};
|
|
66
|
+
for (const [key, value] of Object.entries(params)) {
|
|
67
|
+
if ((0, decorator_paths_1.isPathNode)(value)) {
|
|
68
|
+
const result = this.getPropertyKeyValue((0, decorator_paths_1.getPath)(value));
|
|
69
|
+
resolved[key] = result?.value ?? '';
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
resolved[key] = value;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return resolved;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Evaluates a condition and returns whether it passed and context for messages.
|
|
79
|
+
*
|
|
80
|
+
* @param conditionInfo - The condition to evaluate (single, AND, or OR)
|
|
81
|
+
* @returns Whether the condition passed and a context string for message interpolation
|
|
82
|
+
*/
|
|
83
|
+
evaluate(conditionInfo) {
|
|
84
|
+
let passed = false;
|
|
85
|
+
let context = '';
|
|
86
|
+
if (conditionInfo.orConditions && Array.isArray(conditionInfo.orConditions)) {
|
|
87
|
+
const result = this.evaluateOrConditions(conditionInfo.orConditions);
|
|
88
|
+
passed = result.passed;
|
|
89
|
+
context = this.getContextForMessage(result.results);
|
|
90
|
+
}
|
|
91
|
+
else if (conditionInfo.conditions && Array.isArray(conditionInfo.conditions)) {
|
|
92
|
+
const result = this.evaluateAndConditions(conditionInfo.conditions);
|
|
93
|
+
passed = result.passed;
|
|
94
|
+
context = this.getContextForMessage(result.results);
|
|
95
|
+
}
|
|
96
|
+
else if (conditionInfo.path) {
|
|
97
|
+
const result = this.evaluateSingleCondition(conditionInfo);
|
|
98
|
+
passed = result.passed;
|
|
99
|
+
context = this.getContextForMessage([result]);
|
|
100
|
+
}
|
|
101
|
+
return { passed, context };
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Evaluates a single dependency condition.
|
|
105
|
+
*
|
|
106
|
+
* @param condition - A single condition with path, optional expectedValue, and optional negate
|
|
107
|
+
* @returns The evaluation result with passed flag, resolved value, and key
|
|
108
|
+
*/
|
|
109
|
+
evaluateSingleCondition(condition) {
|
|
110
|
+
if (condition.path === '__always__') {
|
|
111
|
+
return { passed: true, value: true, key: '__always__' };
|
|
112
|
+
}
|
|
113
|
+
const result = this.getPropertyKeyValue(condition.path);
|
|
114
|
+
const key = result?.key ?? condition.path;
|
|
115
|
+
const value = result?.value;
|
|
116
|
+
let passed = false;
|
|
117
|
+
if (condition.dependsOn) {
|
|
118
|
+
passed = condition.dependsOn(value);
|
|
119
|
+
}
|
|
120
|
+
else if (condition.expectedValue !== undefined) {
|
|
121
|
+
passed = value === condition.expectedValue;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
passed = !!value;
|
|
125
|
+
}
|
|
126
|
+
if (condition.negate) {
|
|
127
|
+
passed = !passed;
|
|
128
|
+
}
|
|
129
|
+
return { passed, value, key };
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Gets the context message from evaluation results.
|
|
133
|
+
*
|
|
134
|
+
* @param results - Array of evaluation results to summarize
|
|
135
|
+
* @returns A comma-separated string of failed condition key/value pairs
|
|
136
|
+
*/
|
|
137
|
+
getContextForMessage(results) {
|
|
138
|
+
return results
|
|
139
|
+
.filter((result) => !result.passed)
|
|
140
|
+
.map((result) => `${result.key}: ${result.value}`)
|
|
141
|
+
.join(', ');
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Evaluates an AND condition item which can be a single condition or nested OR group.
|
|
145
|
+
*
|
|
146
|
+
* @param conditionItem - A single condition or an OR group nested inside AND
|
|
147
|
+
* @returns Whether the item passed and the individual evaluation results
|
|
148
|
+
*/
|
|
149
|
+
evaluateAndConditionItem(conditionItem) {
|
|
150
|
+
if ((0, decorator_paths_1.isOrConditionGroup)(conditionItem)) {
|
|
151
|
+
return this.evaluateOrConditions(conditionItem.__orConditions);
|
|
152
|
+
}
|
|
153
|
+
const result = this.evaluateSingleCondition(conditionItem);
|
|
154
|
+
return { passed: result.passed, results: [result] };
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Evaluates OR conditions (at least one must match).
|
|
158
|
+
*
|
|
159
|
+
* @param orConditions - Array of OR condition items (single conditions or AND groups)
|
|
160
|
+
* @returns Whether any condition passed and all individual evaluation results
|
|
161
|
+
*/
|
|
162
|
+
evaluateOrConditions(orConditions) {
|
|
163
|
+
const allResults = [];
|
|
164
|
+
for (const conditionItem of orConditions) {
|
|
165
|
+
if ((0, decorator_paths_1.isAndConditionGroup)(conditionItem)) {
|
|
166
|
+
const andResults = [];
|
|
167
|
+
let allAndPassed = true;
|
|
168
|
+
for (const andItem of conditionItem.__andConditions) {
|
|
169
|
+
const { passed, results } = this.evaluateAndConditionItem(andItem);
|
|
170
|
+
andResults.push(...results);
|
|
171
|
+
if (!passed) {
|
|
172
|
+
allAndPassed = false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
allResults.push(...andResults);
|
|
176
|
+
if (allAndPassed) {
|
|
177
|
+
return { passed: true, results: allResults };
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
const result = this.evaluateSingleCondition(conditionItem);
|
|
182
|
+
allResults.push(result);
|
|
183
|
+
if (result.passed) {
|
|
184
|
+
return { passed: true, results: allResults };
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return { passed: false, results: allResults };
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Evaluates AND conditions (all must match).
|
|
192
|
+
*
|
|
193
|
+
* @param andConditions - Array of AND condition items (single conditions or OR groups)
|
|
194
|
+
* @returns Whether all conditions passed and all individual evaluation results
|
|
195
|
+
*/
|
|
196
|
+
evaluateAndConditions(andConditions) {
|
|
197
|
+
const allResults = [];
|
|
198
|
+
let allPassed = true;
|
|
199
|
+
for (const conditionItem of andConditions) {
|
|
200
|
+
const { passed, results } = this.evaluateAndConditionItem(conditionItem);
|
|
201
|
+
allResults.push(...results);
|
|
202
|
+
if (!passed) {
|
|
203
|
+
allPassed = false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return { passed: allPassed, results: allResults };
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.ConditionEvaluator = ConditionEvaluator;
|
|
210
|
+
//# sourceMappingURL=condition-evaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-evaluator.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/condition-evaluator.ts"],"names":[],"mappings":";;;AAUA,iDAAyC;AACzC,uDAAiG;AA+BjG;;;GAGG;AACH,MAAa,kBAAkB;IAG3B;;;;OAIG;IACH,YAAY,OAAyB;QACjC,IAAI,CAAC,OAAO,GAAG;YACX,wFAAwF;YACxF,mGAAmG;YACnG,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM;YAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACH,mBAAmB,CAAC,YAAoB;QACpC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACjC,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;YACnF,MAAM,OAAO,GAAG,IAAA,wBAAQ,EAAC;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,UAAU,EAAE,KAAK;aACpB,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnC,OAAO,SAAS,CAAC;YACrB,CAAC;YAED,MAAM,MAAM,GAAG,OAAO,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EAAE,CAAC;gBACV,SAAS,GAAG,KAAK,CAAC;YACtB,CAAC;QACL,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACtD,CAAC;CACJ;AAxOD,gDAwOC"}
|
|
@@ -56,6 +56,8 @@ import type { Manifest, v4, AndConditionItem, OrConditionItem, AndConditionGroup
|
|
|
56
56
|
export type AppContext = {
|
|
57
57
|
/** The application manifest */
|
|
58
58
|
manifest: Manifest;
|
|
59
|
+
/** Returns the minimum UI5 version for the application */
|
|
60
|
+
minUI5Version: string;
|
|
59
61
|
};
|
|
60
62
|
/**
|
|
61
63
|
* Page context (sourced from page.config).
|
|
@@ -64,7 +66,9 @@ export type AppContext = {
|
|
|
64
66
|
* These properties are determined by the Page class and its configuration.
|
|
65
67
|
* Extend this type when new config properties are added to Page.
|
|
66
68
|
*/
|
|
67
|
-
export type PageContext = {
|
|
69
|
+
export type PageContext = {
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
};
|
|
68
72
|
/**
|
|
69
73
|
* Settings for the Table Class context, taken from manifest.
|
|
70
74
|
*
|
|
@@ -476,26 +480,5 @@ export declare function isOrConditionGroup(item: AndConditionItem): item is OrCo
|
|
|
476
480
|
* @returns True if item is an AndConditionGroup
|
|
477
481
|
*/
|
|
478
482
|
export declare function isAndConditionGroup(item: OrConditionItem): item is AndConditionGroup;
|
|
479
|
-
/**
|
|
480
|
-
* The complete decorator context type used internally.
|
|
481
|
-
* Contains app, page and custom context.
|
|
482
|
-
*/
|
|
483
|
-
export type DecoratorContextType = {
|
|
484
|
-
/**
|
|
485
|
-
* App context - auto-injected from app.config.
|
|
486
|
-
* Provides access to manifest and other app-level properties.
|
|
487
|
-
*/
|
|
488
|
-
app?: Partial<AppContext>;
|
|
489
|
-
/**
|
|
490
|
-
* Page context - auto-injected from page.config.
|
|
491
|
-
* Provides access to page-level properties like isALP, visualization, etc.
|
|
492
|
-
*/
|
|
493
|
-
page?: Partial<PageContext>;
|
|
494
|
-
/**
|
|
495
|
-
* Custom context - provided via init().
|
|
496
|
-
* Use for runtime-specific conditions like table state, section state, etc.
|
|
497
|
-
*/
|
|
498
|
-
custom?: Record<string, unknown>;
|
|
499
|
-
};
|
|
500
483
|
export {};
|
|
501
484
|
//# sourceMappingURL=decorator-paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorator-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EACR,QAAQ,EACR,EAAE,EACF,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,6BAA6B,CAAC;AAMrC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,+BAA+B;IAC/B,QAAQ,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"decorator-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorator-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EACR,QAAQ,EACR,EAAE,EACF,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,6BAA6B,CAAC;AAMrC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,+BAA+B;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE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,GAAG,WAAW,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,cAAc,CAAC;AAMxD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CAAC,GAAG,UAAU,EAAE,cAAc,EAAE,GAAG,YAAY,CAKjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,EAAE,CAAC,GAAG,UAAU,EAAE,cAAc,EAAE,GAAG,WAAW,CAK/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAMD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,IAAI,gBAAgB,CAEnF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,IAAI,iBAAiB,CAEpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-paths.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorator-paths.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;;;
|
|
1
|
+
{"version":3,"file":"decorator-paths.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorator-paths.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;;;AAsIH,0BAEC;AAQD,gCAEC;AAwHD,0CAEC;AAuBD,oBAMC;AAgCD,wCAEC;AA8BD,kBAkBC;AA2BD,wBAEC;AAoCD,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