This repository was archived by the owner on Oct 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathARCActionsPanelElement.d.ts
179 lines (149 loc) · 5.27 KB
/
ARCActionsPanelElement.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
import { CSSResult, LitElement, TemplateResult } from 'lit-element';
import { RunnableAction } from '@advanced-rest-client/arc-types/src/actions/Actions';
import { ActionCondition } from './ActionCondition.js';
import { ArcAction } from './ArcAction.js';
import {
tutorialTpl,
addActionTpl,
addConditionTpl,
actionsListTpl,
actionTpl,
introTextTpl,
duplicateHandler,
notifyChange,
changeHandler,
removeHandler,
addHandler,
openTutorialHandler,
} from './internals.js';
/** @typedef {import('./ArcAction.js').ArcAction} ArcAction */
/** @typedef {import('lit-html').TemplateResult} TemplateResult */
/** @typedef {import('@anypoint-web-components/anypoint-listbox').AnypointListbox} AnypointListbox */
/** @typedef {import('@anypoint-web-components/anypoint-menu-button').AnypointMenuButton} AnypointMenuButton */
/** @typedef {import('@advanced-rest-client/arc-types').Actions.Condition} Condition */
export declare const conditionsValue: unique symbol;
export declare const actionsItemTemplate: unique symbol;
export declare const conditionTemplate: unique symbol;
export declare const addConditionHandler: unique symbol;
export declare const conditionRemoveHandler: unique symbol;
export declare const conditionChangeHandler: unique symbol;
export declare const addResponseAction: unique symbol;
export declare const addRequestAction: unique symbol;
export declare const duplicateRequestAction: unique symbol;
export declare const duplicateResponseAction: unique symbol;
/**
* @deprecated Use `@advanced-rest-client/app` instead.
*/
export declare class ARCActionsPanelElement extends LitElement {
static get styles(): CSSResult[];
/**
* Enables compatibility with the Anypoint theme
* @attribute
*/
compatibility: boolean;
/**
* Enables outlined MD theme
* @attribute
*/
outlined: boolean;
/**
* A type of actions this panel renders. The actions are using
* type defined in the action definition. This property is used by the tutorial.
* @attribute
*/
type: string;
/**
* Current list of actions
*/
conditions: (RunnableAction|ActionCondition)[]|null;
[conditionsValue]: ActionCondition[]|null;
/**
* Returns true when the element has any condition set.
*/
get hasConditions(): boolean;
constructor();
/**
* Adds a new, empty action to the list of actions for a condition identified by its index.
*
* @param name The name of the action to add.
* @param index For the response actions, index of the condition
*/
add(name: string, index?: number): void;
/**
* Adds a new empty action to the request actions.
* @param name
* @param index For the response actions, index of the condition
*/
[addRequestAction](name: string, index?: number): void;
/**
* Adds a new empty action to the response actions.
* @param name The name of the action
* @param index The condition index to where to put the action into
*/
[addResponseAction](name: string, index?: number): void;
/**
* Dispatches the URL open event to open an URL.
*/
[openTutorialHandler](): void;
/**
* Handler for a click on "Add action button".
*/
[addHandler](e: CustomEvent): void;
/**
* Handler for a click on "Delete action button".
*/
[removeHandler](e: CustomEvent): void;
/**
* Handler for a change made in the editor.
*/
[changeHandler](e: CustomEvent): void;
[notifyChange](): void;
/**
* A handler for the duplicate action event
*/
[duplicateHandler](e: CustomEvent): void;
/**
* Duplicates a request condition and adds it to the conditions list
* @param conditionIndex The index of the condition object to copy
*/
[duplicateRequestAction](conditionIndex: number): void;
/**
* Duplicates an action inside a response condition
* @param conditionIndex The index of the condition object that contains the action to copy
* @param actionIndex The action index to copy into the condition
*/
[duplicateResponseAction](conditionIndex: number, actionIndex: number): void;
[addConditionHandler](): void;
[conditionChangeHandler](e: CustomEvent): void;
[conditionRemoveHandler](e: CustomEvent): void;
render(): TemplateResult;
/**
* @returns Template for the tutorial.
*/
[tutorialTpl](): TemplateResult;
[introTextTpl](): TemplateResult;
/**
* @param index An index of a condition to add the action to.
* @returns Template for the add action dropdown button
*/
[addActionTpl](index?: number): TemplateResult;
[addConditionTpl](): TemplateResult;
/**
* @returns List of templates for current actions.
*/
[actionsListTpl](): TemplateResult[];
[actionsItemTemplate](conditionAction: ActionCondition, index: number): TemplateResult;
/**
* @param conditionAction The definition of the condition
* @param conditionIndex Condition action's index in the `actions` array.
* @returns Template for the condition
*/
[conditionTemplate](conditionAction: ActionCondition, conditionIndex: number): TemplateResult;
/**
* @param action An action definition
* @param conditionIndex Condition action's index in the `actions` array.
* @param actionIndex Action index in the condition
* @returns Template for an action
*/
[actionTpl](action: ArcAction, conditionIndex: number, actionIndex: number): TemplateResult|string;
}