1 | /**
|
2 | * Input Decorator
|
3 | */
|
4 | export declare type TInputDecoratorOptions = {
|
5 | /**
|
6 | * Listen to a different RootComponent group
|
7 | */
|
8 | group: string;
|
9 | /**
|
10 | * Name of the property for the component
|
11 | * default: [propName]RefId
|
12 | */
|
13 | propertyReferenceIdName: string;
|
14 | /**
|
15 | * Change the event you want to listen from
|
16 | * default: [propName]Saved
|
17 | */
|
18 | eventName: string;
|
19 | /**
|
20 | * Name of the key used to send referenceId to the intent (as query parameter)
|
21 | */
|
22 | intentReferenceIdKeyName: string;
|
23 | /**
|
24 | * Intent to retrieve data from
|
25 | */
|
26 | intentName: string;
|
27 | /**
|
28 | * Intent arguments
|
29 | */
|
30 | intentArguments: string[];
|
31 | /**
|
32 | * Autoload data when component mounted
|
33 | * default: true
|
34 | */
|
35 | autoLoad: boolean;
|
36 | };
|
37 | export declare type TInputDecorator = (options?: Partial<TInputDecoratorOptions>) => (target: any, key: string) => void;
|
38 | /**
|
39 | * Output Decorator options
|
40 | */
|
41 | export declare type TOutputDecoratorOptions = {
|
42 | /**
|
43 | * Specify an intent you would like to use instead of the default one
|
44 | */
|
45 | intentName: string;
|
46 | /**
|
47 | * Name of the key used to send the referenceId value to the intent
|
48 | * default : referenceId
|
49 | */
|
50 | intentReferenceIdKeyName: string;
|
51 | /**
|
52 | * Name of property used to populate the intent intentReferenceIdKeyName param
|
53 | */
|
54 | intentReferenceIdValue?: string;
|
55 | /**
|
56 | * Intent arguments
|
57 | */
|
58 | intentArguments: string[];
|
59 | /**
|
60 | * Name of the key name used to send the data to the intent (in the body)
|
61 | * default: [propertyName]
|
62 | */
|
63 | intentPropertyName: string;
|
64 | /**
|
65 | * Event name triggered when the data has been processed by the intent
|
66 | * default: [propertyName]Saved
|
67 | */
|
68 | eventName: string;
|
69 | /**
|
70 | * State or Prop you want to watch. Let you save data when a different property change:
|
71 | * @example
|
72 | * ```typescript
|
73 | * @State() otherData: string = "whatever"
|
74 | * @Ouput({ propertyWatchedName: 'otherData' }) data: string
|
75 | * ```
|
76 | * event will be emitted only when otherData will be updated.
|
77 | *
|
78 | * default: [propertyName]
|
79 | *
|
80 | */
|
81 | propertyWatchedName: string;
|
82 | /**
|
83 | * Name of the key used to send referenceId as property of the event.detail
|
84 | * default: referenceId
|
85 | */
|
86 | referenceKeyName: string;
|
87 | /**
|
88 | * Autoload data when component mounted
|
89 | * default: true
|
90 | */
|
91 | autoLoad: boolean;
|
92 | };
|
93 | /**
|
94 | * Ouput decorator
|
95 | * @example
|
96 | * ```typescript
|
97 | * @Ouput() goat: Goat
|
98 | * ```
|
99 | */
|
100 | export declare type TOutputDecorator = (options?: Partial<TOutputDecoratorOptions>) => (target: any, key: string) => void;
|