@cratis/scene.model 4.7.0 → 4.9.0
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/BindingExpression.ts +47 -3
- package/common/BindingMode.ts +13 -0
- package/common/BindingNullBehavior.ts +16 -0
- package/common/BindingSourceKind.ts +19 -0
- package/common/DestinationKind.ts +11 -0
- package/common/DestinationReference.ts +33 -6
- package/common/index.ts +4 -0
- package/contributionPoints/NavigationItem.ts +19 -2
- package/descriptors/ComponentDescriptor.ts +11 -1
- package/descriptors/DesignTimeActionDescriptor.ts +28 -0
- package/descriptors/DesignTimeActionPlacement.ts +11 -0
- package/descriptors/PackageDesignTimeMetadata.ts +26 -0
- package/descriptors/PropertyDescriptor.ts +11 -0
- package/descriptors/index.ts +3 -0
- package/dist/cjs/common/BindingExpression.js +10 -5
- package/dist/cjs/common/BindingExpression.js.map +1 -1
- package/dist/cjs/common/BindingMode.js +14 -0
- package/dist/cjs/common/BindingMode.js.map +1 -0
- package/dist/cjs/common/BindingNullBehavior.js +15 -0
- package/dist/cjs/common/BindingNullBehavior.js.map +1 -0
- package/dist/cjs/common/BindingSourceKind.js +16 -0
- package/dist/cjs/common/BindingSourceKind.js.map +1 -0
- package/dist/cjs/common/DestinationKind.js +15 -0
- package/dist/cjs/common/DestinationKind.js.map +1 -0
- package/dist/cjs/common/DestinationReference.js +7 -0
- package/dist/cjs/common/DestinationReference.js.map +1 -1
- package/dist/cjs/contributionPoints/NavigationItem.js +4 -0
- package/dist/cjs/contributionPoints/NavigationItem.js.map +1 -1
- package/dist/cjs/descriptors/ComponentDescriptor.js +4 -1
- package/dist/cjs/descriptors/ComponentDescriptor.js.map +1 -1
- package/dist/cjs/descriptors/DesignTimeActionDescriptor.js +14 -0
- package/dist/cjs/descriptors/DesignTimeActionDescriptor.js.map +1 -0
- package/dist/cjs/descriptors/DesignTimeActionPlacement.js +15 -0
- package/dist/cjs/descriptors/DesignTimeActionPlacement.js.map +1 -0
- package/dist/cjs/descriptors/PackageDesignTimeMetadata.js +16 -0
- package/dist/cjs/descriptors/PackageDesignTimeMetadata.js.map +1 -0
- package/dist/cjs/descriptors/PropertyDescriptor.js +4 -1
- package/dist/cjs/descriptors/PropertyDescriptor.js.map +1 -1
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts/Layout.js +3 -1
- package/dist/cjs/layouts/Layout.js.map +1 -1
- package/dist/cjs/packages/ScenePackage.js +4 -1
- package/dist/cjs/packages/ScenePackage.js.map +1 -1
- package/dist/cjs/screens/DialogTemplate.js +2 -1
- package/dist/cjs/screens/DialogTemplate.js.map +1 -1
- package/dist/cjs/screens/Outlet.js +13 -0
- package/dist/cjs/screens/Outlet.js.map +1 -0
- package/dist/cjs/screens/ScreenTemplate.js +3 -1
- package/dist/cjs/screens/ScreenTemplate.js.map +1 -1
- package/dist/cjs/screens/TemplateMetadata.js +21 -0
- package/dist/cjs/screens/TemplateMetadata.js.map +1 -0
- package/dist/esm/common/BindingExpression.d.ts +12 -0
- package/dist/esm/common/BindingExpression.d.ts.map +1 -1
- package/dist/esm/common/BindingExpression.js +10 -5
- package/dist/esm/common/BindingExpression.js.map +1 -1
- package/dist/esm/common/BindingMode.d.ts +5 -0
- package/dist/esm/common/BindingMode.d.ts.map +1 -0
- package/dist/esm/common/BindingMode.js +12 -0
- package/dist/esm/common/BindingMode.js.map +1 -0
- package/dist/esm/common/BindingNullBehavior.d.ts +6 -0
- package/dist/esm/common/BindingNullBehavior.d.ts.map +1 -0
- package/dist/esm/common/BindingNullBehavior.js +13 -0
- package/dist/esm/common/BindingNullBehavior.js.map +1 -0
- package/dist/esm/common/BindingSourceKind.d.ts +7 -0
- package/dist/esm/common/BindingSourceKind.d.ts.map +1 -0
- package/dist/esm/common/BindingSourceKind.js +14 -0
- package/dist/esm/common/BindingSourceKind.js.map +1 -0
- package/dist/esm/common/DestinationKind.d.ts +6 -0
- package/dist/esm/common/DestinationKind.d.ts.map +1 -0
- package/dist/esm/common/DestinationKind.js +13 -0
- package/dist/esm/common/DestinationKind.js.map +1 -0
- package/dist/esm/common/DestinationReference.d.ts +9 -1
- package/dist/esm/common/DestinationReference.d.ts.map +1 -1
- package/dist/esm/common/DestinationReference.js +7 -0
- package/dist/esm/common/DestinationReference.js.map +1 -1
- package/dist/esm/common/index.d.ts +4 -0
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/index.js +4 -0
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/contributionPoints/NavigationItem.d.ts +5 -1
- package/dist/esm/contributionPoints/NavigationItem.d.ts.map +1 -1
- package/dist/esm/contributionPoints/NavigationItem.js +4 -0
- package/dist/esm/contributionPoints/NavigationItem.js.map +1 -1
- package/dist/esm/descriptors/ComponentDescriptor.d.ts +4 -0
- package/dist/esm/descriptors/ComponentDescriptor.d.ts.map +1 -1
- package/dist/esm/descriptors/ComponentDescriptor.js +4 -1
- package/dist/esm/descriptors/ComponentDescriptor.js.map +1 -1
- package/dist/esm/descriptors/DesignTimeActionDescriptor.d.ts +10 -0
- package/dist/esm/descriptors/DesignTimeActionDescriptor.d.ts.map +1 -0
- package/dist/esm/descriptors/DesignTimeActionDescriptor.js +12 -0
- package/dist/esm/descriptors/DesignTimeActionDescriptor.js.map +1 -0
- package/dist/esm/descriptors/DesignTimeActionPlacement.d.ts +6 -0
- package/dist/esm/descriptors/DesignTimeActionPlacement.d.ts.map +1 -0
- package/dist/esm/descriptors/DesignTimeActionPlacement.js +13 -0
- package/dist/esm/descriptors/DesignTimeActionPlacement.js.map +1 -0
- package/dist/esm/descriptors/PackageDesignTimeMetadata.d.ts +9 -0
- package/dist/esm/descriptors/PackageDesignTimeMetadata.d.ts.map +1 -0
- package/dist/esm/descriptors/PackageDesignTimeMetadata.js +14 -0
- package/dist/esm/descriptors/PackageDesignTimeMetadata.js.map +1 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts +4 -0
- package/dist/esm/descriptors/PropertyDescriptor.d.ts.map +1 -1
- package/dist/esm/descriptors/PropertyDescriptor.js +4 -1
- package/dist/esm/descriptors/PropertyDescriptor.js.map +1 -1
- package/dist/esm/descriptors/index.d.ts +3 -0
- package/dist/esm/descriptors/index.d.ts.map +1 -1
- package/dist/esm/descriptors/index.js +3 -0
- package/dist/esm/descriptors/index.js.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/Layout.d.ts +4 -0
- package/dist/esm/layouts/Layout.d.ts.map +1 -1
- package/dist/esm/layouts/Layout.js +3 -1
- package/dist/esm/layouts/Layout.js.map +1 -1
- package/dist/esm/packages/ScenePackage.d.ts +4 -0
- package/dist/esm/packages/ScenePackage.d.ts.map +1 -1
- package/dist/esm/packages/ScenePackage.js +4 -1
- package/dist/esm/packages/ScenePackage.js.map +1 -1
- package/dist/esm/screens/DialogTemplate.d.ts +2 -0
- package/dist/esm/screens/DialogTemplate.d.ts.map +1 -1
- package/dist/esm/screens/DialogTemplate.js +2 -1
- package/dist/esm/screens/DialogTemplate.js.map +1 -1
- package/dist/esm/screens/Outlet.d.ts +6 -0
- package/dist/esm/screens/Outlet.d.ts.map +1 -0
- package/dist/esm/screens/Outlet.js +11 -0
- package/dist/esm/screens/Outlet.js.map +1 -0
- package/dist/esm/screens/ScreenTemplate.d.ts +4 -0
- package/dist/esm/screens/ScreenTemplate.d.ts.map +1 -1
- package/dist/esm/screens/ScreenTemplate.js +3 -1
- package/dist/esm/screens/ScreenTemplate.js.map +1 -1
- package/dist/esm/screens/TemplateMetadata.d.ts +14 -0
- package/dist/esm/screens/TemplateMetadata.d.ts.map +1 -0
- package/dist/esm/screens/TemplateMetadata.js +18 -0
- package/dist/esm/screens/TemplateMetadata.js.map +1 -0
- package/dist/esm/screens/index.d.ts +2 -0
- package/dist/esm/screens/index.d.ts.map +1 -1
- package/dist/esm/screens/index.js +2 -0
- package/dist/esm/screens/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/layouts/Layout.ts +9 -1
- package/package.json +1 -1
- package/packages/ScenePackage.ts +13 -0
- package/screens/DialogTemplate.ts +5 -0
- package/screens/Outlet.ts +15 -0
- package/screens/ScreenTemplate.ts +10 -0
- package/screens/TemplateMetadata.ts +26 -0
- package/screens/index.ts +2 -0
|
@@ -1,12 +1,56 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
+
import { BindingMode } from './BindingMode';
|
|
5
|
+
import { BindingNullBehavior } from './BindingNullBehavior';
|
|
6
|
+
import { BindingSourceKind } from './BindingSourceKind';
|
|
7
|
+
import { PropertyValueType } from '../descriptors';
|
|
8
|
+
|
|
4
9
|
/**
|
|
5
|
-
* A reference to a value
|
|
6
|
-
*
|
|
10
|
+
* A typed reference to a value resolved by the shared Scene runtime.
|
|
11
|
+
*
|
|
12
|
+
* Legacy authored content that only carries `path` is treated as a data-context binding. New content may
|
|
13
|
+
* name the source explicitly: the inherited data context, a query result, another component's output
|
|
14
|
+
* property, or a literal value. Invalid bindings are preserved and reported by validation; they are not
|
|
15
|
+
* rewritten by the resolver.
|
|
7
16
|
*/
|
|
8
17
|
export interface BindingExpression {
|
|
18
|
+
/** Source kind; absent means `dataContext` for backward compatibility. */
|
|
19
|
+
kind?: BindingSourceKind;
|
|
20
|
+
|
|
21
|
+
/** The path inside the selected source. */
|
|
9
22
|
path: string;
|
|
23
|
+
|
|
24
|
+
/** The named query binding when `kind` is `queryResult`. */
|
|
25
|
+
query?: string;
|
|
26
|
+
|
|
27
|
+
/** Stable component identity when `kind` is `componentProperty`. */
|
|
28
|
+
componentId?: string;
|
|
29
|
+
|
|
30
|
+
/** Property path on the source component when it differs from `path`. */
|
|
31
|
+
componentPropertyPath?: string;
|
|
32
|
+
|
|
33
|
+
/** Update mode requested by the author. */
|
|
34
|
+
mode?: BindingMode;
|
|
35
|
+
|
|
36
|
+
/** How null or undefined source values affect the target. */
|
|
37
|
+
nullBehavior?: BindingNullBehavior;
|
|
38
|
+
|
|
39
|
+
/** Optional expected target/source value type for validation. */
|
|
40
|
+
expectedValueType?: PropertyValueType;
|
|
41
|
+
|
|
42
|
+
/** Literal value when `kind` is `literal`. */
|
|
43
|
+
value?: unknown;
|
|
10
44
|
}
|
|
11
45
|
|
|
12
|
-
export const BindingExpressionPropertyNames: (keyof BindingExpression)[] = [
|
|
46
|
+
export const BindingExpressionPropertyNames: (keyof BindingExpression)[] = [
|
|
47
|
+
'kind',
|
|
48
|
+
'path',
|
|
49
|
+
'query',
|
|
50
|
+
'componentId',
|
|
51
|
+
'componentPropertyPath',
|
|
52
|
+
'mode',
|
|
53
|
+
'nullBehavior',
|
|
54
|
+
'expectedValueType',
|
|
55
|
+
'value',
|
|
56
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How updates flow between a binding source and target.
|
|
6
|
+
*/
|
|
7
|
+
export enum BindingMode {
|
|
8
|
+
/** Source changes update the target; target changes are not written back. */
|
|
9
|
+
OneWay = 'oneWay',
|
|
10
|
+
|
|
11
|
+
/** Source and target changes flow both directions when both properties declare support. */
|
|
12
|
+
TwoWay = 'twoWay',
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What a binding target does when its source resolves to null or undefined.
|
|
6
|
+
*/
|
|
7
|
+
export enum BindingNullBehavior {
|
|
8
|
+
/** Propagate null to the target. */
|
|
9
|
+
Propagate = 'propagate',
|
|
10
|
+
|
|
11
|
+
/** Clear the target to its empty state. */
|
|
12
|
+
Clear = 'clear',
|
|
13
|
+
|
|
14
|
+
/** Leave the target's current value unchanged. */
|
|
15
|
+
Preserve = 'preserve',
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The source a binding reads from.
|
|
6
|
+
*/
|
|
7
|
+
export enum BindingSourceKind {
|
|
8
|
+
/** The inherited effective data context for the element. */
|
|
9
|
+
DataContext = 'dataContext',
|
|
10
|
+
|
|
11
|
+
/** The latest result of a named query binding. */
|
|
12
|
+
QueryResult = 'queryResult',
|
|
13
|
+
|
|
14
|
+
/** An output property from another stable component identity. */
|
|
15
|
+
ComponentProperty = 'componentProperty',
|
|
16
|
+
|
|
17
|
+
/** A literal value carried by the binding. */
|
|
18
|
+
Literal = 'literal',
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The navigational surface a destination opens.
|
|
6
|
+
*/
|
|
7
|
+
export enum DestinationKind {
|
|
8
|
+
Outlet = 'outlet',
|
|
9
|
+
Dialog = 'dialog',
|
|
10
|
+
External = 'external',
|
|
11
|
+
}
|
|
@@ -3,16 +3,43 @@
|
|
|
3
3
|
|
|
4
4
|
import { BindingExpression } from './BindingExpression';
|
|
5
5
|
|
|
6
|
+
import { DestinationKind } from './DestinationKind';
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
|
-
* Where activating something takes the user
|
|
8
|
-
*
|
|
9
|
+
* Where activating something takes the user.
|
|
10
|
+
*
|
|
11
|
+
* Stable module/feature/slice identity is carried separately from labels and authored URLs. A renderer maps
|
|
12
|
+
* the destination to a URL, route state, native deep link, dialog or named outlet without guessing from text.
|
|
9
13
|
*/
|
|
10
14
|
export interface DestinationReference {
|
|
11
|
-
/** The
|
|
12
|
-
screen
|
|
15
|
+
/** The legacy or explicit screen name to go to. */
|
|
16
|
+
screen?: string;
|
|
17
|
+
|
|
18
|
+
/** Stable module identity. */
|
|
19
|
+
module?: string;
|
|
20
|
+
|
|
21
|
+
/** Stable feature identity inside the module. */
|
|
22
|
+
feature?: string;
|
|
23
|
+
|
|
24
|
+
/** Stable slice identity inside the feature. */
|
|
25
|
+
slice?: string;
|
|
26
|
+
|
|
27
|
+
/** The named outlet to replace; absent means the host's primary outlet. */
|
|
28
|
+
outlet?: string;
|
|
29
|
+
|
|
30
|
+
/** The authored URL/path override, when the default route should not be derived from identity. */
|
|
31
|
+
route?: string;
|
|
32
|
+
|
|
33
|
+
/** Whether this opens in an outlet, a dialog, or an external target. */
|
|
34
|
+
kind?: DestinationKind;
|
|
35
|
+
|
|
36
|
+
/** A dialog template or dialog identity when `kind` is `dialog`. */
|
|
37
|
+
dialog?: string;
|
|
13
38
|
|
|
14
|
-
/** The values for
|
|
39
|
+
/** The values for route or screen parameters, keyed by parameter name. */
|
|
15
40
|
routeParameterBindings?: Record<string, BindingExpression>;
|
|
16
41
|
}
|
|
17
42
|
|
|
18
|
-
export const DestinationReferencePropertyNames: (keyof DestinationReference)[] = [
|
|
43
|
+
export const DestinationReferencePropertyNames: (keyof DestinationReference)[] = [
|
|
44
|
+
'screen', 'module', 'feature', 'slice', 'outlet', 'route', 'kind', 'dialog', 'routeParameterBindings',
|
|
45
|
+
];
|
package/common/index.ts
CHANGED
|
@@ -8,8 +8,12 @@ export * from './HorizontalAlignment';
|
|
|
8
8
|
export * from './VerticalAlignment';
|
|
9
9
|
export * from './Visibility';
|
|
10
10
|
export * from './BindingExpression';
|
|
11
|
+
export * from './BindingSourceKind';
|
|
12
|
+
export * from './BindingMode';
|
|
13
|
+
export * from './BindingNullBehavior';
|
|
11
14
|
export * from './Orientation';
|
|
12
15
|
export * from './Dock';
|
|
13
16
|
export * from './GridUnitType';
|
|
14
17
|
export * from './GridLength';
|
|
15
18
|
export * from './DestinationReference';
|
|
19
|
+
export * from './DestinationKind';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
-
import { BindingExpression } from '../common';
|
|
4
|
+
import { BindingExpression, DestinationReference } from '../common';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A contribution to the built-in `Navigation` contribution point. How `navigate to <Screen>` becomes a
|
|
@@ -9,13 +9,30 @@ import { BindingExpression } from '../common';
|
|
|
9
9
|
* not this record — this only carries the declared shape.
|
|
10
10
|
*/
|
|
11
11
|
export interface NavigationItem {
|
|
12
|
+
/** Stable identity for this contribution, independent of the label. */
|
|
13
|
+
id?: string;
|
|
14
|
+
|
|
12
15
|
label: string;
|
|
16
|
+
|
|
17
|
+
/** Qualified icon reference (`library:name`) for toolbar/navigation chrome. */
|
|
18
|
+
icon?: string;
|
|
19
|
+
|
|
20
|
+
/** Whether chrome shows icon, text, or both. */
|
|
21
|
+
presentation?: string;
|
|
22
|
+
|
|
23
|
+
/** Legacy screen target; prefer `destination` for new content. */
|
|
13
24
|
targetScreen: string;
|
|
25
|
+
|
|
26
|
+
/** Legacy parameter bindings; prefer `destination.routeParameterBindings` for new content. */
|
|
14
27
|
routeParameterBindings: Record<string, BindingExpression>;
|
|
28
|
+
|
|
29
|
+
/** The typed destination this item activates. */
|
|
30
|
+
destination?: DestinationReference;
|
|
31
|
+
|
|
15
32
|
order?: number;
|
|
16
33
|
group?: string;
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
export const NavigationItemPropertyNames: (keyof NavigationItem)[] = [
|
|
20
|
-
'label', 'targetScreen', 'routeParameterBindings', 'order', 'group',
|
|
37
|
+
'id', 'label', 'icon', 'presentation', 'targetScreen', 'routeParameterBindings', 'destination', 'order', 'group',
|
|
21
38
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
+
import { DesignTimeActionDescriptor } from './DesignTimeActionDescriptor';
|
|
4
5
|
import { PropertyDescriptor } from './PropertyDescriptor';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -26,8 +27,17 @@ export interface ComponentDescriptor {
|
|
|
26
27
|
editorKind?: string;
|
|
27
28
|
|
|
28
29
|
properties: PropertyDescriptor[];
|
|
30
|
+
|
|
31
|
+
/** Package-provided design-time actions for this component. */
|
|
32
|
+
actions?: DesignTimeActionDescriptor[];
|
|
33
|
+
|
|
34
|
+
/** Names an optional package-provided preview renderer. */
|
|
35
|
+
previewKind?: string;
|
|
36
|
+
|
|
37
|
+
/** Names an optional package-provided property display renderer set. */
|
|
38
|
+
propertyDisplayKind?: string;
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
export const ComponentDescriptorPropertyNames: (keyof ComponentDescriptor)[] = [
|
|
32
|
-
'component', 'displayName', 'description', 'editorKind', 'properties',
|
|
42
|
+
'component', 'displayName', 'description', 'editorKind', 'properties', 'actions', 'previewKind', 'propertyDisplayKind',
|
|
33
43
|
];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { DesignTimeActionPlacement } from './DesignTimeActionPlacement';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A package-provided design-time action that edits Scene model data through canonical edit batches.
|
|
8
|
+
*/
|
|
9
|
+
export interface DesignTimeActionDescriptor {
|
|
10
|
+
/** Stable package-owned action identity. */
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
/** The label a designer shows. */
|
|
14
|
+
label: string;
|
|
15
|
+
|
|
16
|
+
/** Where a designer may show the action. */
|
|
17
|
+
placement?: DesignTimeActionPlacement;
|
|
18
|
+
|
|
19
|
+
/** Owner-controlled visible/enabled rule name interpreted by the package's design-time bundle. */
|
|
20
|
+
availability?: string;
|
|
21
|
+
|
|
22
|
+
/** Help text for the designer. */
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const DesignTimeActionDescriptorPropertyNames: (keyof DesignTimeActionDescriptor)[] = [
|
|
27
|
+
'id', 'label', 'placement', 'availability', 'description',
|
|
28
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Where a design-time action is presented.
|
|
6
|
+
*/
|
|
7
|
+
export enum DesignTimeActionPlacement {
|
|
8
|
+
Toolbar = 'toolbar',
|
|
9
|
+
ContextMenu = 'contextMenu',
|
|
10
|
+
Inspector = 'inspector',
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Platform-neutral names of optional design-time extension points a package provides.
|
|
6
|
+
*/
|
|
7
|
+
export interface PackageDesignTimeMetadata {
|
|
8
|
+
/** Named component preview renderers available in the package's design-time bundle. */
|
|
9
|
+
previews: string[];
|
|
10
|
+
|
|
11
|
+
/** Named full-component designers available in the package's design-time bundle. */
|
|
12
|
+
designers: string[];
|
|
13
|
+
|
|
14
|
+
/** Named property editors available in the package's design-time bundle. */
|
|
15
|
+
propertyEditors: string[];
|
|
16
|
+
|
|
17
|
+
/** Named property display renderers available in the package's design-time bundle. */
|
|
18
|
+
propertyDisplays: string[];
|
|
19
|
+
|
|
20
|
+
/** Named design-time action handlers available in the package's design-time bundle. */
|
|
21
|
+
actions: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const PackageDesignTimeMetadataPropertyNames: (keyof PackageDesignTimeMetadata)[] = [
|
|
25
|
+
'previews', 'designers', 'propertyEditors', 'propertyDisplays', 'actions',
|
|
26
|
+
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
+
import { BindingMode, BindingSourceKind } from '../common';
|
|
4
5
|
import { CollectionItemDescriptor } from './CollectionItemDescriptor';
|
|
5
6
|
import { PropertyChoice } from './PropertyChoice';
|
|
6
7
|
import { PropertyConstraints } from './PropertyConstraints';
|
|
@@ -48,8 +49,18 @@ export interface PropertyDescriptor {
|
|
|
48
49
|
|
|
49
50
|
/** The value is shown but never edited. */
|
|
50
51
|
readOnly?: boolean;
|
|
52
|
+
|
|
53
|
+
/** This property is emitted by the component and may be bound by other elements. */
|
|
54
|
+
output?: boolean;
|
|
55
|
+
|
|
56
|
+
/** Which binding source kinds may be assigned to this property. */
|
|
57
|
+
acceptedBindingKinds?: BindingSourceKind[];
|
|
58
|
+
|
|
59
|
+
/** The strongest binding mode the property supports. */
|
|
60
|
+
bindingMode?: BindingMode;
|
|
51
61
|
}
|
|
52
62
|
|
|
53
63
|
export const PropertyDescriptorPropertyNames: (keyof PropertyDescriptor)[] = [
|
|
54
64
|
'path', 'label', 'group', 'valueType', 'choices', 'default', 'constraints', 'editorKind', 'description', 'item', 'readOnly',
|
|
65
|
+
'output', 'acceptedBindingKinds', 'bindingMode',
|
|
55
66
|
];
|
package/descriptors/index.ts
CHANGED
|
@@ -5,6 +5,9 @@ export * from './PropertyValueType';
|
|
|
5
5
|
export * from './PropertyChoice';
|
|
6
6
|
export * from './PropertyConstraints';
|
|
7
7
|
export * from './CollectionItemDescriptor';
|
|
8
|
+
export * from './DesignTimeActionDescriptor';
|
|
9
|
+
export * from './DesignTimeActionPlacement';
|
|
10
|
+
export * from './PackageDesignTimeMetadata';
|
|
8
11
|
export * from './PropertyDescriptor';
|
|
9
12
|
export * from './ComponentDescriptor';
|
|
10
13
|
export * from './CollectionOperation';
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
// Copyright (c) Cratis. All rights reserved.
|
|
4
4
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'
|
|
5
|
+
const BindingExpressionPropertyNames = [
|
|
6
|
+
'kind',
|
|
7
|
+
'path',
|
|
8
|
+
'query',
|
|
9
|
+
'componentId',
|
|
10
|
+
'componentPropertyPath',
|
|
11
|
+
'mode',
|
|
12
|
+
'nullBehavior',
|
|
13
|
+
'expectedValueType',
|
|
14
|
+
'value'
|
|
10
15
|
];
|
|
11
16
|
|
|
12
17
|
exports.BindingExpressionPropertyNames = BindingExpressionPropertyNames;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BindingExpression.js","sources":["../../../common/BindingExpression.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * A reference to a value
|
|
1
|
+
{"version":3,"file":"BindingExpression.js","sources":["../../../common/BindingExpression.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingMode } from './BindingMode';\nimport { BindingNullBehavior } from './BindingNullBehavior';\nimport { BindingSourceKind } from './BindingSourceKind';\nimport { PropertyValueType } from '../descriptors';\n\n/**\n * A typed reference to a value resolved by the shared Scene runtime.\n *\n * Legacy authored content that only carries `path` is treated as a data-context binding. New content may\n * name the source explicitly: the inherited data context, a query result, another component's output\n * property, or a literal value. Invalid bindings are preserved and reported by validation; they are not\n * rewritten by the resolver.\n */\nexport interface BindingExpression {\n /** Source kind; absent means `dataContext` for backward compatibility. */\n kind?: BindingSourceKind;\n\n /** The path inside the selected source. */\n path: string;\n\n /** The named query binding when `kind` is `queryResult`. */\n query?: string;\n\n /** Stable component identity when `kind` is `componentProperty`. */\n componentId?: string;\n\n /** Property path on the source component when it differs from `path`. */\n componentPropertyPath?: string;\n\n /** Update mode requested by the author. */\n mode?: BindingMode;\n\n /** How null or undefined source values affect the target. */\n nullBehavior?: BindingNullBehavior;\n\n /** Optional expected target/source value type for validation. */\n expectedValueType?: PropertyValueType;\n\n /** Literal value when `kind` is `literal`. */\n value?: unknown;\n}\n\nexport const BindingExpressionPropertyNames: (keyof BindingExpression)[] = [\n 'kind',\n 'path',\n 'query',\n 'componentId',\n 'componentPropertyPath',\n 'mode',\n 'nullBehavior',\n 'expectedValueType',\n 'value',\n];\n"],"names":["BindingExpressionPropertyNames"],"mappings":";;AAAA;AACA;MA4CaA,8BAAAA,GAA8D;AACvE,IAAA,MAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,uBAAA;AACA,IAAA,MAAA;AACA,IAAA,cAAA;AACA,IAAA,mBAAA;AACA,IAAA;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* How updates flow between a binding source and target.
|
|
7
|
+
*/ var BindingMode = /*#__PURE__*/ function(BindingMode) {
|
|
8
|
+
/** Source changes update the target; target changes are not written back. */ BindingMode["OneWay"] = "oneWay";
|
|
9
|
+
/** Source and target changes flow both directions when both properties declare support. */ BindingMode["TwoWay"] = "twoWay";
|
|
10
|
+
return BindingMode;
|
|
11
|
+
}({});
|
|
12
|
+
|
|
13
|
+
exports.BindingMode = BindingMode;
|
|
14
|
+
//# sourceMappingURL=BindingMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BindingMode.js","sources":["../../../common/BindingMode.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * How updates flow between a binding source and target.\n */\nexport enum BindingMode {\n /** Source changes update the target; target changes are not written back. */\n OneWay = 'oneWay',\n\n /** Source and target changes flow both directions when both properties declare support. */\n TwoWay = 'twoWay',\n}\n"],"names":["BindingMode"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,WAAAA,iBAAAA,SAAAA,WAAAA,EAAAA;kFACmE,WAAA,CAAA,QAAA,CAAA,GAAA,QAAA;gGAGc,WAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AAJjFA,IAAAA,OAAAA,WAAAA;AAMX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* What a binding target does when its source resolves to null or undefined.
|
|
7
|
+
*/ var BindingNullBehavior = /*#__PURE__*/ function(BindingNullBehavior) {
|
|
8
|
+
/** Propagate null to the target. */ BindingNullBehavior["Propagate"] = "propagate";
|
|
9
|
+
/** Clear the target to its empty state. */ BindingNullBehavior["Clear"] = "clear";
|
|
10
|
+
/** Leave the target's current value unchanged. */ BindingNullBehavior["Preserve"] = "preserve";
|
|
11
|
+
return BindingNullBehavior;
|
|
12
|
+
}({});
|
|
13
|
+
|
|
14
|
+
exports.BindingNullBehavior = BindingNullBehavior;
|
|
15
|
+
//# sourceMappingURL=BindingNullBehavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BindingNullBehavior.js","sources":["../../../common/BindingNullBehavior.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * What a binding target does when its source resolves to null or undefined.\n */\nexport enum BindingNullBehavior {\n /** Propagate null to the target. */\n Propagate = 'propagate',\n\n /** Clear the target to its empty state. */\n Clear = 'clear',\n\n /** Leave the target's current value unchanged. */\n Preserve = 'preserve',\n}\n"],"names":["BindingNullBehavior"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,mBAAAA,iBAAAA,SAAAA,mBAAAA,EAAAA;yCAC0B,mBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;gDAGO,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAA;uDAGO,mBAAA,CAAA,UAAA,CAAA,GAAA,UAAA;AAPxCA,IAAAA,OAAAA,mBAAAA;AASX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The source a binding reads from.
|
|
7
|
+
*/ var BindingSourceKind = /*#__PURE__*/ function(BindingSourceKind) {
|
|
8
|
+
/** The inherited effective data context for the element. */ BindingSourceKind["DataContext"] = "dataContext";
|
|
9
|
+
/** The latest result of a named query binding. */ BindingSourceKind["QueryResult"] = "queryResult";
|
|
10
|
+
/** An output property from another stable component identity. */ BindingSourceKind["ComponentProperty"] = "componentProperty";
|
|
11
|
+
/** A literal value carried by the binding. */ BindingSourceKind["Literal"] = "literal";
|
|
12
|
+
return BindingSourceKind;
|
|
13
|
+
}({});
|
|
14
|
+
|
|
15
|
+
exports.BindingSourceKind = BindingSourceKind;
|
|
16
|
+
//# sourceMappingURL=BindingSourceKind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BindingSourceKind.js","sources":["../../../common/BindingSourceKind.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The source a binding reads from.\n */\nexport enum BindingSourceKind {\n /** The inherited effective data context for the element. */\n DataContext = 'dataContext',\n\n /** The latest result of a named query binding. */\n QueryResult = 'queryResult',\n\n /** An output property from another stable component identity. */\n ComponentProperty = 'componentProperty',\n\n /** A literal value carried by the binding. */\n Literal = 'literal',\n}\n"],"names":["BindingSourceKind"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;uDAGV,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sEAGe,iBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAA;mDAGnB,iBAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAVpCA,IAAAA,OAAAA,iBAAAA;AAYX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The navigational surface a destination opens.
|
|
7
|
+
*/ var DestinationKind = /*#__PURE__*/ function(DestinationKind) {
|
|
8
|
+
DestinationKind["Outlet"] = "outlet";
|
|
9
|
+
DestinationKind["Dialog"] = "dialog";
|
|
10
|
+
DestinationKind["External"] = "external";
|
|
11
|
+
return DestinationKind;
|
|
12
|
+
}({});
|
|
13
|
+
|
|
14
|
+
exports.DestinationKind = DestinationKind;
|
|
15
|
+
//# sourceMappingURL=DestinationKind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DestinationKind.js","sources":["../../../common/DestinationKind.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The navigational surface a destination opens.\n */\nexport enum DestinationKind {\n Outlet = 'outlet',\n Dialog = 'dialog',\n External = 'external',\n}\n"],"names":["DestinationKind"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,eAAAA,iBAAAA,SAAAA,eAAAA,EAAAA;;;;AAAAA,IAAAA,OAAAA,eAAAA;AAIX,CAAA,CAAA,EAAA;;"}
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
5
|
const DestinationReferencePropertyNames = [
|
|
6
6
|
'screen',
|
|
7
|
+
'module',
|
|
8
|
+
'feature',
|
|
9
|
+
'slice',
|
|
10
|
+
'outlet',
|
|
11
|
+
'route',
|
|
12
|
+
'kind',
|
|
13
|
+
'dialog',
|
|
7
14
|
'routeParameterBindings'
|
|
8
15
|
];
|
|
9
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DestinationReference.js","sources":["../../../common/DestinationReference.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression } from './BindingExpression';\n\n/**\n * Where activating something takes the user
|
|
1
|
+
{"version":3,"file":"DestinationReference.js","sources":["../../../common/DestinationReference.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression } from './BindingExpression';\n\nimport { DestinationKind } from './DestinationKind';\n\n/**\n * Where activating something takes the user.\n *\n * Stable module/feature/slice identity is carried separately from labels and authored URLs. A renderer maps\n * the destination to a URL, route state, native deep link, dialog or named outlet without guessing from text.\n */\nexport interface DestinationReference {\n /** The legacy or explicit screen name to go to. */\n screen?: string;\n\n /** Stable module identity. */\n module?: string;\n\n /** Stable feature identity inside the module. */\n feature?: string;\n\n /** Stable slice identity inside the feature. */\n slice?: string;\n\n /** The named outlet to replace; absent means the host's primary outlet. */\n outlet?: string;\n\n /** The authored URL/path override, when the default route should not be derived from identity. */\n route?: string;\n\n /** Whether this opens in an outlet, a dialog, or an external target. */\n kind?: DestinationKind;\n\n /** A dialog template or dialog identity when `kind` is `dialog`. */\n dialog?: string;\n\n /** The values for route or screen parameters, keyed by parameter name. */\n routeParameterBindings?: Record<string, BindingExpression>;\n}\n\nexport const DestinationReferencePropertyNames: (keyof DestinationReference)[] = [\n 'screen', 'module', 'feature', 'slice', 'outlet', 'route', 'kind', 'dialog', 'routeParameterBindings',\n];\n"],"names":["DestinationReferencePropertyNames"],"mappings":";;AAAA;AACA;MAyCaA,iCAAAA,GAAoE;AAC7E,IAAA,QAAA;AAAU,IAAA,QAAA;AAAU,IAAA,SAAA;AAAW,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,QAAA;AAAU,IAAA;;;"}
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
// Copyright (c) Cratis. All rights reserved.
|
|
4
4
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
5
|
const NavigationItemPropertyNames = [
|
|
6
|
+
'id',
|
|
6
7
|
'label',
|
|
8
|
+
'icon',
|
|
9
|
+
'presentation',
|
|
7
10
|
'targetScreen',
|
|
8
11
|
'routeParameterBindings',
|
|
12
|
+
'destination',
|
|
9
13
|
'order',
|
|
10
14
|
'group'
|
|
11
15
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationItem.js","sources":["../../../contributionPoints/NavigationItem.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression } from '../common';\n\n/**\n * A contribution to the built-in `Navigation` contribution point. How `navigate to <Screen>` becomes a\n * concrete route (URL path, query string, or native deep link) is owned by the renderer's NavBar widget,\n * not this record — this only carries the declared shape.\n */\nexport interface NavigationItem {\n label: string;\n targetScreen: string;\n routeParameterBindings: Record<string, BindingExpression>;\n order?: number;\n group?: string;\n}\n\nexport const NavigationItemPropertyNames: (keyof NavigationItem)[] = [\n 'label', 'targetScreen', 'routeParameterBindings', 'order', 'group',\n];\n"],"names":["NavigationItemPropertyNames"],"mappings":";;AAAA;AACA;
|
|
1
|
+
{"version":3,"file":"NavigationItem.js","sources":["../../../contributionPoints/NavigationItem.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression, DestinationReference } from '../common';\n\n/**\n * A contribution to the built-in `Navigation` contribution point. How `navigate to <Screen>` becomes a\n * concrete route (URL path, query string, or native deep link) is owned by the renderer's NavBar widget,\n * not this record — this only carries the declared shape.\n */\nexport interface NavigationItem {\n /** Stable identity for this contribution, independent of the label. */\n id?: string;\n\n label: string;\n\n /** Qualified icon reference (`library:name`) for toolbar/navigation chrome. */\n icon?: string;\n\n /** Whether chrome shows icon, text, or both. */\n presentation?: string;\n\n /** Legacy screen target; prefer `destination` for new content. */\n targetScreen: string;\n\n /** Legacy parameter bindings; prefer `destination.routeParameterBindings` for new content. */\n routeParameterBindings: Record<string, BindingExpression>;\n\n /** The typed destination this item activates. */\n destination?: DestinationReference;\n\n order?: number;\n group?: string;\n}\n\nexport const NavigationItemPropertyNames: (keyof NavigationItem)[] = [\n 'id', 'label', 'icon', 'presentation', 'targetScreen', 'routeParameterBindings', 'destination', 'order', 'group',\n];\n"],"names":["NavigationItemPropertyNames"],"mappings":";;AAAA;AACA;MAkCaA,2BAAAA,GAAwD;AACjE,IAAA,IAAA;AAAM,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,cAAA;AAAgB,IAAA,cAAA;AAAgB,IAAA,wBAAA;AAA0B,IAAA,aAAA;AAAe,IAAA,OAAA;AAAS,IAAA;;;"}
|
|
@@ -7,7 +7,10 @@ const ComponentDescriptorPropertyNames = [
|
|
|
7
7
|
'displayName',
|
|
8
8
|
'description',
|
|
9
9
|
'editorKind',
|
|
10
|
-
'properties'
|
|
10
|
+
'properties',
|
|
11
|
+
'actions',
|
|
12
|
+
'previewKind',
|
|
13
|
+
'propertyDisplayKind'
|
|
11
14
|
];
|
|
12
15
|
|
|
13
16
|
exports.ComponentDescriptorPropertyNames = ComponentDescriptorPropertyNames;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentDescriptor.js","sources":["../../../descriptors/ComponentDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyDescriptor } from './PropertyDescriptor';\n\n/**\n * What can be edited on one component a package provides.\n *\n * Packages contribute these alongside the components themselves (a bundle's `descriptors`), through the same\n * package mechanism that already carries components, layouts and themes - there is no second registry to keep in\n * step.\n */\nexport interface ComponentDescriptor {\n /**\n * The component this describes, as the package names it: `<package>:<bare name>`, the same key a bundle\n * registers the component under (for example `Cratis.Components:dataTable`).\n */\n component: string;\n\n /** A human-readable name for a palette or an inspector title. */\n displayName?: string;\n\n description?: string;\n\n /** Names a specialised editor for the component as a whole, when its properties are not edited one by one. */\n editorKind?: string;\n\n properties: PropertyDescriptor[];\n}\n\nexport const ComponentDescriptorPropertyNames: (keyof ComponentDescriptor)[] = [\n 'component', 'displayName', 'description', 'editorKind', 'properties',\n];\n"],"names":["ComponentDescriptorPropertyNames"],"mappings":";;AAAA;AACA;
|
|
1
|
+
{"version":3,"file":"ComponentDescriptor.js","sources":["../../../descriptors/ComponentDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DesignTimeActionDescriptor } from './DesignTimeActionDescriptor';\nimport { PropertyDescriptor } from './PropertyDescriptor';\n\n/**\n * What can be edited on one component a package provides.\n *\n * Packages contribute these alongside the components themselves (a bundle's `descriptors`), through the same\n * package mechanism that already carries components, layouts and themes - there is no second registry to keep in\n * step.\n */\nexport interface ComponentDescriptor {\n /**\n * The component this describes, as the package names it: `<package>:<bare name>`, the same key a bundle\n * registers the component under (for example `Cratis.Components:dataTable`).\n */\n component: string;\n\n /** A human-readable name for a palette or an inspector title. */\n displayName?: string;\n\n description?: string;\n\n /** Names a specialised editor for the component as a whole, when its properties are not edited one by one. */\n editorKind?: string;\n\n properties: PropertyDescriptor[];\n\n /** Package-provided design-time actions for this component. */\n actions?: DesignTimeActionDescriptor[];\n\n /** Names an optional package-provided preview renderer. */\n previewKind?: string;\n\n /** Names an optional package-provided property display renderer set. */\n propertyDisplayKind?: string;\n}\n\nexport const ComponentDescriptorPropertyNames: (keyof ComponentDescriptor)[] = [\n 'component', 'displayName', 'description', 'editorKind', 'properties', 'actions', 'previewKind', 'propertyDisplayKind',\n];\n"],"names":["ComponentDescriptorPropertyNames"],"mappings":";;AAAA;AACA;MAuCaA,gCAAAA,GAAkE;AAC3E,IAAA,WAAA;AAAa,IAAA,aAAA;AAAe,IAAA,aAAA;AAAe,IAAA,YAAA;AAAc,IAAA,YAAA;AAAc,IAAA,SAAA;AAAW,IAAA,aAAA;AAAe,IAAA;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
const DesignTimeActionDescriptorPropertyNames = [
|
|
6
|
+
'id',
|
|
7
|
+
'label',
|
|
8
|
+
'placement',
|
|
9
|
+
'availability',
|
|
10
|
+
'description'
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
exports.DesignTimeActionDescriptorPropertyNames = DesignTimeActionDescriptorPropertyNames;
|
|
14
|
+
//# sourceMappingURL=DesignTimeActionDescriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignTimeActionDescriptor.js","sources":["../../../descriptors/DesignTimeActionDescriptor.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DesignTimeActionPlacement } from './DesignTimeActionPlacement';\n\n/**\n * A package-provided design-time action that edits Scene model data through canonical edit batches.\n */\nexport interface DesignTimeActionDescriptor {\n /** Stable package-owned action identity. */\n id: string;\n\n /** The label a designer shows. */\n label: string;\n\n /** Where a designer may show the action. */\n placement?: DesignTimeActionPlacement;\n\n /** Owner-controlled visible/enabled rule name interpreted by the package's design-time bundle. */\n availability?: string;\n\n /** Help text for the designer. */\n description?: string;\n}\n\nexport const DesignTimeActionDescriptorPropertyNames: (keyof DesignTimeActionDescriptor)[] = [\n 'id', 'label', 'placement', 'availability', 'description',\n];\n"],"names":["DesignTimeActionDescriptorPropertyNames"],"mappings":";;AAAA;AACA;MAwBaA,uCAAAA,GAAgF;AACzF,IAAA,IAAA;AAAM,IAAA,OAAA;AAAS,IAAA,WAAA;AAAa,IAAA,cAAA;AAAgB,IAAA;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Where a design-time action is presented.
|
|
7
|
+
*/ var DesignTimeActionPlacement = /*#__PURE__*/ function(DesignTimeActionPlacement) {
|
|
8
|
+
DesignTimeActionPlacement["Toolbar"] = "toolbar";
|
|
9
|
+
DesignTimeActionPlacement["ContextMenu"] = "contextMenu";
|
|
10
|
+
DesignTimeActionPlacement["Inspector"] = "inspector";
|
|
11
|
+
return DesignTimeActionPlacement;
|
|
12
|
+
}({});
|
|
13
|
+
|
|
14
|
+
exports.DesignTimeActionPlacement = DesignTimeActionPlacement;
|
|
15
|
+
//# sourceMappingURL=DesignTimeActionPlacement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignTimeActionPlacement.js","sources":["../../../descriptors/DesignTimeActionPlacement.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Where a design-time action is presented.\n */\nexport enum DesignTimeActionPlacement {\n Toolbar = 'toolbar',\n ContextMenu = 'contextMenu',\n Inspector = 'inspector',\n}\n"],"names":["DesignTimeActionPlacement"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,yBAAAA,iBAAAA,SAAAA,yBAAAA,EAAAA;;;;AAAAA,IAAAA,OAAAA,yBAAAA;AAIX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Platform-neutral names of optional design-time extension points a package provides.
|
|
7
|
+
*/ const PackageDesignTimeMetadataPropertyNames = [
|
|
8
|
+
'previews',
|
|
9
|
+
'designers',
|
|
10
|
+
'propertyEditors',
|
|
11
|
+
'propertyDisplays',
|
|
12
|
+
'actions'
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
exports.PackageDesignTimeMetadataPropertyNames = PackageDesignTimeMetadataPropertyNames;
|
|
16
|
+
//# sourceMappingURL=PackageDesignTimeMetadata.js.map
|