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