n8n-nodes-extended-forms 0.2.6 → 0.3.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/dist/credentials/GithubIssuesApi.credentials.js +1 -36
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +1 -53
- package/dist/nodes/Form123/Form.node.js +1 -388
- package/dist/nodes/Form123/Form.node.js.map +1 -1
- package/dist/nodes/Form123/FormTrigger.node.js +1 -27
- package/dist/nodes/Form123/common.descriptions.js +1 -647
- package/dist/nodes/Form123/cssVariables.js +1 -73
- package/dist/nodes/Form123/interfaces.d.ts +4 -0
- package/dist/nodes/Form123/interfaces.js +1 -4
- package/dist/nodes/Form123/interfaces.js.map +1 -1
- package/dist/nodes/Form123/templates/form-trigger-completion.handlebars +1 -1
- package/dist/nodes/Form123/templates/form-trigger.handlebars +694 -71
- package/dist/nodes/Form123/utils/descriptions.js +1 -10
- package/dist/nodes/Form123/utils/formCompletionUtils.js +1 -106
- package/dist/nodes/Form123/utils/formNodeUtils.js +3 -75
- package/dist/nodes/Form123/utils/formNodeUtils.js.map +1 -1
- package/dist/nodes/Form123/utils/templateRenderer.js +1 -71
- package/dist/nodes/Form123/utils/utilities.js +3 -47
- package/dist/nodes/Form123/utils/utils.d.ts +11 -3
- package/dist/nodes/Form123/utils/utils.js +3 -593
- package/dist/nodes/Form123/utils/utils.js.map +1 -1
- package/dist/nodes/Form123/utils/waitUtils.js +1 -67
- package/dist/nodes/Form123/v1/FormTriggerV1.node.js +1 -82
- package/dist/nodes/Form123/v2/FormTriggerV2.node.js +1 -193
- package/dist/nodes/Form123/v2/FormTriggerV2.node.js.map +1 -1
- package/dist/package.json +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GithubIssuesApi = void 0;
|
|
4
|
-
class GithubIssuesApi {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = 'githubIssuesApi';
|
|
7
|
-
this.displayName = 'GitHub Issues API';
|
|
8
|
-
this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
|
|
9
|
-
this.documentationUrl = 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#deleting-a-personal-access-token';
|
|
10
|
-
this.properties = [
|
|
11
|
-
{
|
|
12
|
-
displayName: 'Access Token',
|
|
13
|
-
name: 'accessToken',
|
|
14
|
-
type: 'string',
|
|
15
|
-
typeOptions: { password: true },
|
|
16
|
-
default: '',
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
this.authenticate = {
|
|
20
|
-
type: 'generic',
|
|
21
|
-
properties: {
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: '=token {{$credentials?.accessToken}}',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
this.test = {
|
|
28
|
-
request: {
|
|
29
|
-
baseURL: 'https://api.github.com',
|
|
30
|
-
url: '/user',
|
|
31
|
-
method: 'GET',
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.GithubIssuesApi = GithubIssuesApi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GithubIssuesApi=void 0;class GithubIssuesApi{constructor(){this.name="githubIssuesApi",this.displayName="GitHub Issues API",this.icon={light:"file:../icons/github.svg",dark:"file:../icons/github.dark.svg"},this.documentationUrl="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#deleting-a-personal-access-token",this.properties=[{displayName:"Access Token",name:"accessToken",type:"string",typeOptions:{password:!0},default:""}],this.authenticate={type:"generic",properties:{headers:{Authorization:"=token {{$credentials?.accessToken}}"}}},this.test={request:{baseURL:"https://api.github.com",url:"/user",method:"GET"}}}}exports.GithubIssuesApi=GithubIssuesApi;
|
|
37
2
|
//# sourceMappingURL=GithubIssuesApi.credentials.js.map
|
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GithubIssuesOAuth2Api = void 0;
|
|
4
|
-
class GithubIssuesOAuth2Api {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = 'githubIssuesOAuth2Api';
|
|
7
|
-
this.extends = ['oAuth2Api'];
|
|
8
|
-
this.displayName = 'GitHub Issues OAuth2 API';
|
|
9
|
-
this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
|
|
10
|
-
this.documentationUrl = 'https://docs.github.com/en/apps/oauth-apps';
|
|
11
|
-
this.properties = [
|
|
12
|
-
{
|
|
13
|
-
displayName: 'Grant Type',
|
|
14
|
-
name: 'grantType',
|
|
15
|
-
type: 'hidden',
|
|
16
|
-
default: 'authorizationCode',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
displayName: 'Authorization URL',
|
|
20
|
-
name: 'authUrl',
|
|
21
|
-
type: 'hidden',
|
|
22
|
-
default: 'https://github.com/login/oauth/authorize',
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
displayName: 'Access Token URL',
|
|
27
|
-
name: 'accessTokenUrl',
|
|
28
|
-
type: 'hidden',
|
|
29
|
-
default: 'https://github.com/login/oauth/access_token',
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
displayName: 'Scope',
|
|
34
|
-
name: 'scope',
|
|
35
|
-
type: 'hidden',
|
|
36
|
-
default: 'repo',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
displayName: 'Auth URI Query Parameters',
|
|
40
|
-
name: 'authQueryParameters',
|
|
41
|
-
type: 'hidden',
|
|
42
|
-
default: '',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
displayName: 'Authentication',
|
|
46
|
-
name: 'authentication',
|
|
47
|
-
type: 'hidden',
|
|
48
|
-
default: 'header',
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.GithubIssuesOAuth2Api = GithubIssuesOAuth2Api;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GithubIssuesOAuth2Api=void 0;class GithubIssuesOAuth2Api{constructor(){this.name="githubIssuesOAuth2Api",this.extends=["oAuth2Api"],this.displayName="GitHub Issues OAuth2 API",this.icon={light:"file:../icons/github.svg",dark:"file:../icons/github.dark.svg"},this.documentationUrl="https://docs.github.com/en/apps/oauth-apps",this.properties=[{displayName:"Grant Type",name:"grantType",type:"hidden",default:"authorizationCode"},{displayName:"Authorization URL",name:"authUrl",type:"hidden",default:"https://github.com/login/oauth/authorize",required:!0},{displayName:"Access Token URL",name:"accessTokenUrl",type:"hidden",default:"https://github.com/login/oauth/access_token",required:!0},{displayName:"Scope",name:"scope",type:"hidden",default:"repo"},{displayName:"Auth URI Query Parameters",name:"authQueryParameters",type:"hidden",default:""},{displayName:"Authentication",name:"authentication",type:"hidden",default:"header"}]}}exports.GithubIssuesOAuth2Api=GithubIssuesOAuth2Api;
|
|
54
2
|
//# sourceMappingURL=GithubIssuesOAuth2Api.credentials.js.map
|
|
@@ -1,389 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Form = exports.formFieldsProperties = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const cssVariables_1 = require("./cssVariables");
|
|
6
|
-
const formCompletionUtils_1 = require("./utils/formCompletionUtils");
|
|
7
|
-
const formNodeUtils_1 = require("./utils/formNodeUtils");
|
|
8
|
-
const utils_1 = require("./utils/utils");
|
|
9
|
-
const waitUtils_1 = require("./utils/waitUtils");
|
|
10
|
-
const common_descriptions_1 = require("./common.descriptions");
|
|
11
|
-
const waitTimeProperties = [
|
|
12
|
-
{
|
|
13
|
-
displayName: 'Limit Wait Time',
|
|
14
|
-
name: 'limitWaitTime',
|
|
15
|
-
type: 'boolean',
|
|
16
|
-
default: false,
|
|
17
|
-
description: 'Whether to limit the time this node should wait for a user response before execution resumes',
|
|
18
|
-
},
|
|
19
|
-
...(0, n8n_workflow_1.updateDisplayOptions)({
|
|
20
|
-
show: {
|
|
21
|
-
limitWaitTime: [true],
|
|
22
|
-
},
|
|
23
|
-
}, waitUtils_1.limitWaitTimeProperties),
|
|
24
|
-
];
|
|
25
|
-
exports.formFieldsProperties = [
|
|
26
|
-
{
|
|
27
|
-
displayName: 'Define Form',
|
|
28
|
-
name: 'defineForm',
|
|
29
|
-
type: 'options',
|
|
30
|
-
noDataExpression: true,
|
|
31
|
-
options: [
|
|
32
|
-
{
|
|
33
|
-
name: 'Using Fields Below',
|
|
34
|
-
value: 'fields',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'Using JSON',
|
|
38
|
-
value: 'json',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
default: 'fields',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
displayName: 'Form Fields',
|
|
45
|
-
name: 'jsonOutput',
|
|
46
|
-
type: 'json',
|
|
47
|
-
typeOptions: {
|
|
48
|
-
rows: 5,
|
|
49
|
-
},
|
|
50
|
-
default: '[\n {\n "fieldLabel": "Name",\n "placeholder": "enter your name",\n "requiredField": true\n },\n {\n "fieldLabel": "Age",\n "fieldType": "number",\n "placeholder": "enter your age"\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "requiredField": true\n },\n {\n "fieldLabel": "Textarea",\n "fieldType": "textarea"\n },\n {\n "fieldLabel": "Dropdown Options",\n "fieldType": "dropdown",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n },\n "requiredField": true\n },\n {\n "fieldLabel": "Checkboxes",\n "fieldType": "checkbox",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Radio",\n "fieldType": "radio",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "placeholder": "me@mail.con"\n },\n {\n "fieldLabel": "File",\n "fieldType": "file",\n "multipleFiles": true,\n "acceptFileTypes": ".jpg, .png"\n },\n {\n "fieldLabel": "Number",\n "fieldType": "number"\n },\n {\n "fieldLabel": "Password",\n "fieldType": "password"\n }\n]\n',
|
|
51
|
-
validateType: 'form-fields',
|
|
52
|
-
ignoreValidationDuringExecution: true,
|
|
53
|
-
hint: '<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank">See docs</a> for field syntax',
|
|
54
|
-
displayOptions: {
|
|
55
|
-
show: {
|
|
56
|
-
defineForm: ['json'],
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{ ...common_descriptions_1.formFields, displayOptions: { show: { defineForm: ['fields'] } } },
|
|
61
|
-
];
|
|
62
|
-
const pageProperties = (0, n8n_workflow_1.updateDisplayOptions)({
|
|
63
|
-
show: {
|
|
64
|
-
operation: ['page'],
|
|
65
|
-
},
|
|
66
|
-
}, [
|
|
67
|
-
...exports.formFieldsProperties,
|
|
68
|
-
...waitTimeProperties,
|
|
69
|
-
{
|
|
70
|
-
displayName: 'Options',
|
|
71
|
-
name: 'options',
|
|
72
|
-
type: 'collection',
|
|
73
|
-
placeholder: 'Add option',
|
|
74
|
-
default: {},
|
|
75
|
-
options: [
|
|
76
|
-
{ ...common_descriptions_1.formHeader, required: false },
|
|
77
|
-
{ ...common_descriptions_1.formTitle, required: false },
|
|
78
|
-
common_descriptions_1.formDescription,
|
|
79
|
-
{
|
|
80
|
-
displayName: 'Button Label',
|
|
81
|
-
name: 'buttonLabel',
|
|
82
|
-
type: 'string',
|
|
83
|
-
default: 'Submit',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
displayName: 'Custom Form Styling',
|
|
87
|
-
name: 'customCss',
|
|
88
|
-
type: 'string',
|
|
89
|
-
typeOptions: {
|
|
90
|
-
rows: 10,
|
|
91
|
-
editor: 'cssEditor',
|
|
92
|
-
},
|
|
93
|
-
default: cssVariables_1.cssVariables.trim(),
|
|
94
|
-
description: 'Override default styling of the public form interface with CSS',
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
]);
|
|
99
|
-
const completionProperties = (0, n8n_workflow_1.updateDisplayOptions)({
|
|
100
|
-
show: {
|
|
101
|
-
operation: ['completion'],
|
|
102
|
-
},
|
|
103
|
-
}, [
|
|
104
|
-
{
|
|
105
|
-
displayName: 'On n8n Form Submission',
|
|
106
|
-
name: 'respondWith',
|
|
107
|
-
type: 'options',
|
|
108
|
-
default: 'text',
|
|
109
|
-
options: [
|
|
110
|
-
{
|
|
111
|
-
name: 'Show Completion Screen',
|
|
112
|
-
value: 'text',
|
|
113
|
-
description: 'Show a response text to the user',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: 'Redirect to URL',
|
|
117
|
-
value: 'redirect',
|
|
118
|
-
description: 'Redirect the user to a URL',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: 'Show Text',
|
|
122
|
-
value: 'showText',
|
|
123
|
-
description: 'Display simple text or HTML',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: 'Return Binary File',
|
|
127
|
-
value: 'returnBinary',
|
|
128
|
-
description: 'Return incoming binary file',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
displayName: 'URL',
|
|
134
|
-
name: 'redirectUrl',
|
|
135
|
-
validateType: 'url',
|
|
136
|
-
type: 'string',
|
|
137
|
-
default: '',
|
|
138
|
-
required: true,
|
|
139
|
-
displayOptions: {
|
|
140
|
-
show: {
|
|
141
|
-
respondWith: ['redirect'],
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
displayName: 'Completion Title',
|
|
147
|
-
name: 'completionTitle',
|
|
148
|
-
type: 'string',
|
|
149
|
-
default: '',
|
|
150
|
-
required: true,
|
|
151
|
-
displayOptions: {
|
|
152
|
-
show: {
|
|
153
|
-
respondWith: ['text', 'returnBinary'],
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
displayName: 'Completion Message',
|
|
159
|
-
name: 'completionMessage',
|
|
160
|
-
type: 'string',
|
|
161
|
-
default: '',
|
|
162
|
-
typeOptions: {
|
|
163
|
-
rows: 2,
|
|
164
|
-
},
|
|
165
|
-
displayOptions: {
|
|
166
|
-
show: {
|
|
167
|
-
respondWith: ['text', 'returnBinary'],
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
displayName: 'Text',
|
|
173
|
-
name: 'responseText',
|
|
174
|
-
type: 'string',
|
|
175
|
-
displayOptions: {
|
|
176
|
-
show: {
|
|
177
|
-
respondWith: ['showText'],
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
typeOptions: {
|
|
181
|
-
rows: 2,
|
|
182
|
-
},
|
|
183
|
-
default: '',
|
|
184
|
-
placeholder: 'e.g. Thanks for filling the form',
|
|
185
|
-
description: 'The text to display on the page. Use HTML to show a customized web page.',
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
displayName: 'Input Data Field Name',
|
|
189
|
-
name: 'inputDataFieldName',
|
|
190
|
-
type: 'string',
|
|
191
|
-
displayOptions: {
|
|
192
|
-
show: {
|
|
193
|
-
respondWith: ['returnBinary'],
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
default: 'data',
|
|
197
|
-
placeholder: 'e.g. data',
|
|
198
|
-
description: 'Find the name of input field containing the binary data to return in the Input panel on the left, in the Binary tab',
|
|
199
|
-
hint: 'The name of the input field containing the binary file data to be returned',
|
|
200
|
-
},
|
|
201
|
-
...waitTimeProperties,
|
|
202
|
-
{
|
|
203
|
-
displayName: 'Options',
|
|
204
|
-
name: 'options',
|
|
205
|
-
type: 'collection',
|
|
206
|
-
placeholder: 'Add option',
|
|
207
|
-
default: {},
|
|
208
|
-
options: [
|
|
209
|
-
{ ...common_descriptions_1.formHeader, required: false },
|
|
210
|
-
{ ...common_descriptions_1.formTitle, required: false, displayName: 'Completion Page Title' },
|
|
211
|
-
{
|
|
212
|
-
displayName: 'Custom Form Styling',
|
|
213
|
-
name: 'customCss',
|
|
214
|
-
type: 'string',
|
|
215
|
-
typeOptions: {
|
|
216
|
-
rows: 10,
|
|
217
|
-
editor: 'cssEditor',
|
|
218
|
-
},
|
|
219
|
-
default: cssVariables_1.cssVariables.trim(),
|
|
220
|
-
description: 'Override default styling of the public form interface with CSS',
|
|
221
|
-
},
|
|
222
|
-
],
|
|
223
|
-
displayOptions: {
|
|
224
|
-
show: {
|
|
225
|
-
respondWith: ['text', 'returnBinary', 'redirect'],
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
]);
|
|
230
|
-
class Form extends n8n_workflow_1.Node {
|
|
231
|
-
constructor() {
|
|
232
|
-
super(...arguments);
|
|
233
|
-
this.nodeInputData = [];
|
|
234
|
-
this.description = {
|
|
235
|
-
displayName: 'n8n Form',
|
|
236
|
-
name: 'form',
|
|
237
|
-
icon: 'file:form.svg',
|
|
238
|
-
group: ['input'],
|
|
239
|
-
version: [1, 2.3],
|
|
240
|
-
description: 'Extended n8n Forms',
|
|
241
|
-
defaults: {
|
|
242
|
-
name: 'Form',
|
|
243
|
-
},
|
|
244
|
-
usableAsTool: true,
|
|
245
|
-
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
246
|
-
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
247
|
-
waitingNodeTooltip: '=Execution will continue when form is submitted on <a href="{{ $execution.resumeFormUrl }}" target="_blank">{{ $execution.resumeFormUrl }}</a>',
|
|
248
|
-
webhooks: [
|
|
249
|
-
{
|
|
250
|
-
name: 'default',
|
|
251
|
-
httpMethod: 'GET',
|
|
252
|
-
responseMode: 'onReceived',
|
|
253
|
-
path: '',
|
|
254
|
-
restartWebhook: true,
|
|
255
|
-
isFullPath: true,
|
|
256
|
-
nodeType: 'form',
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
name: 'default',
|
|
260
|
-
httpMethod: 'POST',
|
|
261
|
-
responseMode: 'formPage',
|
|
262
|
-
path: '',
|
|
263
|
-
restartWebhook: true,
|
|
264
|
-
isFullPath: true,
|
|
265
|
-
nodeType: 'form',
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
properties: [
|
|
269
|
-
{
|
|
270
|
-
displayName: 'An n8n Form Trigger node must be set up before this node',
|
|
271
|
-
name: 'triggerNotice',
|
|
272
|
-
type: 'notice',
|
|
273
|
-
default: '',
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
displayName: 'Page Type',
|
|
277
|
-
name: 'operation',
|
|
278
|
-
type: 'options',
|
|
279
|
-
default: 'page',
|
|
280
|
-
noDataExpression: true,
|
|
281
|
-
options: [
|
|
282
|
-
{
|
|
283
|
-
name: 'Next Form Page',
|
|
284
|
-
value: 'page',
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: 'Form Ending',
|
|
288
|
-
value: 'completion',
|
|
289
|
-
},
|
|
290
|
-
],
|
|
291
|
-
},
|
|
292
|
-
...pageProperties,
|
|
293
|
-
...completionProperties,
|
|
294
|
-
],
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
async webhook(context) {
|
|
298
|
-
console.log('in webhook function');
|
|
299
|
-
const res = context.getResponseObject();
|
|
300
|
-
console.log('use 2');
|
|
301
|
-
const operation = context.getNodeParameter('operation', '');
|
|
302
|
-
const trigger = (0, formNodeUtils_1.getFormTriggerNode)(context);
|
|
303
|
-
const mode = context.evaluateExpression(`{{ $('${trigger.name}').first().json.formMode }}`);
|
|
304
|
-
const defineForm = context.getNodeParameter('defineForm', false);
|
|
305
|
-
let fields = [];
|
|
306
|
-
if (defineForm === 'json') {
|
|
307
|
-
try {
|
|
308
|
-
console.log('use 5');
|
|
309
|
-
const jsonOutput = context.getNodeParameter('jsonOutput', '', {
|
|
310
|
-
rawExpressions: true,
|
|
311
|
-
});
|
|
312
|
-
fields = (0, n8n_workflow_1.tryToParseJsonToFormFields)((0, utils_1.resolveRawData)(context, jsonOutput));
|
|
313
|
-
}
|
|
314
|
-
catch (error) {
|
|
315
|
-
throw new n8n_workflow_1.NodeOperationError(context.getNode(), error.message, {
|
|
316
|
-
description: error.message,
|
|
317
|
-
type: mode === 'test' ? 'manual-form-test' : undefined,
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
fields = context.getNodeParameter('formFields.values', []);
|
|
323
|
-
}
|
|
324
|
-
const method = context.getRequestObject().method;
|
|
325
|
-
if (operation === 'completion' && method === 'GET') {
|
|
326
|
-
return await (0, formCompletionUtils_1.renderFormCompletion)(context, res, trigger);
|
|
327
|
-
}
|
|
328
|
-
if (operation === 'completion' && method === 'POST') {
|
|
329
|
-
return {
|
|
330
|
-
workflowData: [context.evaluateExpression('{{ $input.all() }}')],
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
if (method === 'GET') {
|
|
334
|
-
return await (0, formNodeUtils_1.renderFormNode)(context, res, trigger, fields, mode);
|
|
335
|
-
}
|
|
336
|
-
let useWorkflowTimezone = context.evaluateExpression(`{{ $('${trigger.name}').params.options?.useWorkflowTimezone }}`);
|
|
337
|
-
if (useWorkflowTimezone === undefined && (trigger === null || trigger === void 0 ? void 0 : trigger.typeVersion) > 2) {
|
|
338
|
-
useWorkflowTimezone = true;
|
|
339
|
-
}
|
|
340
|
-
console.log('preparing return item...');
|
|
341
|
-
const returnItem = await (0, utils_1.prepareFormReturnItem)(context, fields, mode, useWorkflowTimezone);
|
|
342
|
-
console.log('return item: ', returnItem);
|
|
343
|
-
return {
|
|
344
|
-
webhookResponse: { status: 200 },
|
|
345
|
-
workflowData: [[returnItem]],
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
async execute(context) {
|
|
349
|
-
console.log('use 66');
|
|
350
|
-
const realContext = (context && typeof context.getNodeParameter === 'function')
|
|
351
|
-
? context
|
|
352
|
-
: this;
|
|
353
|
-
console.log('REAL CONTEXT:', realContext);
|
|
354
|
-
const operation = realContext.getNodeParameter('operation', 0);
|
|
355
|
-
console.log('hello&&');
|
|
356
|
-
if (operation === 'completion') {
|
|
357
|
-
this.nodeInputData = realContext.getInputData();
|
|
358
|
-
}
|
|
359
|
-
const parentNodes = realContext.getParentNodes(realContext.getNode().name);
|
|
360
|
-
const hasFormTrigger = parentNodes.some((node) => node.type === n8n_workflow_1.FORM_TRIGGER_NODE_TYPE);
|
|
361
|
-
console.log('proceeding...');
|
|
362
|
-
if (!hasFormTrigger) {
|
|
363
|
-
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Form Trigger node must be set before this node');
|
|
364
|
-
}
|
|
365
|
-
const childNodes = realContext.getChildNodes(realContext.getNode().name);
|
|
366
|
-
const hasNextPage = childNodes.some((node) => node.type === n8n_workflow_1.FORM_NODE_TYPE);
|
|
367
|
-
console.log('form node type:', n8n_workflow_1.FORM_NODE_TYPE);
|
|
368
|
-
console.log('child Nodeds', childNodes);
|
|
369
|
-
console.log('hasNext page', hasNextPage);
|
|
370
|
-
if (operation === 'completion' && hasNextPage) {
|
|
371
|
-
throw new n8n_workflow_1.NodeOperationError(realContext.getNode(), 'Completion has to be the last Form node in the workflow');
|
|
372
|
-
}
|
|
373
|
-
const waitTill = (0, waitUtils_1.configureWaitTillDate)(realContext, 'root');
|
|
374
|
-
await realContext.putExecutionToWait(waitTill);
|
|
375
|
-
const location = realContext.evaluateExpression('{{ $execution.resumeFormUrl }}', 0);
|
|
376
|
-
console.log('LOCATION', location);
|
|
377
|
-
realContext.sendResponse({
|
|
378
|
-
headers: {
|
|
379
|
-
location: location
|
|
380
|
-
},
|
|
381
|
-
statusCode: 307,
|
|
382
|
-
});
|
|
383
|
-
console.log('sent response');
|
|
384
|
-
const inputData = realContext.getInputData();
|
|
385
|
-
return [inputData];
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
exports.Form = Form;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Form=exports.formFieldsProperties=void 0;const n8n_workflow_1=require("n8n-workflow"),cssVariables_1=require("./cssVariables"),formCompletionUtils_1=require("./utils/formCompletionUtils"),formNodeUtils_1=require("./utils/formNodeUtils"),utils_1=require("./utils/utils"),waitUtils_1=require("./utils/waitUtils"),common_descriptions_1=require("./common.descriptions");function isFormTriggerNode(nodeType){return"CUSTOM.formTrigger"===nodeType||nodeType.includes(".formTrigger")||"formTrigger"===nodeType}function isFormNode(nodeType){return"CUSTOM.form"===nodeType||nodeType.includes(".form")||"form"===nodeType}const waitTimeProperties=[{displayName:"Limit Wait Time",name:"limitWaitTime",type:"boolean",default:!1,description:"Whether to limit the time this node should wait for a user response before execution resumes"},...(0,n8n_workflow_1.updateDisplayOptions)({show:{limitWaitTime:[!0]}},waitUtils_1.limitWaitTimeProperties)];exports.formFieldsProperties=[{displayName:"Define Form",name:"defineForm",type:"options",noDataExpression:!0,options:[{name:"Using Fields Below",value:"fields"},{name:"Using JSON",value:"json"}],default:"fields"},{displayName:"Form Fields",name:"jsonOutput",type:"json",typeOptions:{rows:5},default:'[\n {\n "fieldLabel": "Name",\n "placeholder": "enter your name",\n "requiredField": true\n },\n {\n "fieldLabel": "Age",\n "fieldType": "number",\n "placeholder": "enter your age"\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "requiredField": true\n },\n {\n "fieldLabel": "Textarea",\n "fieldType": "textarea"\n },\n {\n "fieldLabel": "Dropdown Options",\n "fieldType": "dropdown",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n },\n "requiredField": true\n },\n {\n "fieldLabel": "Checkboxes",\n "fieldType": "checkbox",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Radio",\n "fieldType": "radio",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "placeholder": "me@mail.con"\n },\n {\n "fieldLabel": "File",\n "fieldType": "file",\n "multipleFiles": true,\n "acceptFileTypes": ".jpg, .png"\n },\n {\n "fieldLabel": "Number",\n "fieldType": "number"\n },\n {\n "fieldLabel": "Password",\n "fieldType": "password"\n }\n]\n',validateType:"form-fields",ignoreValidationDuringExecution:!0,hint:'<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank">See docs</a> for field syntax',displayOptions:{show:{defineForm:["json"]}}},{...common_descriptions_1.formFields,displayOptions:{show:{defineForm:["fields"]}}}];const pageProperties=(0,n8n_workflow_1.updateDisplayOptions)({show:{operation:["page"]}},[...exports.formFieldsProperties,...waitTimeProperties,{displayName:"Options",name:"options",type:"collection",placeholder:"Add option",default:{},options:[{...common_descriptions_1.formHeader,required:!1},{...common_descriptions_1.formTitle,required:!1},common_descriptions_1.formDescription,{displayName:"Button Label",name:"buttonLabel",type:"string",default:"Submit"},{displayName:"Custom Form Styling",name:"customCss",type:"string",typeOptions:{rows:10,editor:"cssEditor"},default:cssVariables_1.cssVariables.trim(),description:"Override default styling of the public form interface with CSS"}]}]),completionProperties=(0,n8n_workflow_1.updateDisplayOptions)({show:{operation:["completion"]}},[{displayName:"On n8n Form Submission",name:"respondWith",type:"options",default:"text",options:[{name:"Show Completion Screen",value:"text",description:"Show a response text to the user"},{name:"Redirect to URL",value:"redirect",description:"Redirect the user to a URL"},{name:"Show Text",value:"showText",description:"Display simple text or HTML"},{name:"Return Binary File",value:"returnBinary",description:"Return incoming binary file"}]},{displayName:"URL",name:"redirectUrl",validateType:"url",type:"string",default:"",required:!0,displayOptions:{show:{respondWith:["redirect"]}}},{displayName:"Completion Title",name:"completionTitle",type:"string",default:"",required:!0,displayOptions:{show:{respondWith:["text","returnBinary"]}}},{displayName:"Completion Message",name:"completionMessage",type:"string",default:"",typeOptions:{rows:2},displayOptions:{show:{respondWith:["text","returnBinary"]}}},{displayName:"Text",name:"responseText",type:"string",displayOptions:{show:{respondWith:["showText"]}},typeOptions:{rows:2},default:"",placeholder:"e.g. Thanks for filling the form",description:"The text to display on the page. Use HTML to show a customized web page."},{displayName:"Input Data Field Name",name:"inputDataFieldName",type:"string",displayOptions:{show:{respondWith:["returnBinary"]}},default:"data",placeholder:"e.g. data",description:"Find the name of input field containing the binary data to return in the Input panel on the left, in the Binary tab",hint:"The name of the input field containing the binary file data to be returned"},...waitTimeProperties,{displayName:"Options",name:"options",type:"collection",placeholder:"Add option",default:{},options:[{...common_descriptions_1.formHeader,required:!1},{...common_descriptions_1.formTitle,required:!1,displayName:"Completion Page Title"},{displayName:"Custom Form Styling",name:"customCss",type:"string",typeOptions:{rows:10,editor:"cssEditor"},default:cssVariables_1.cssVariables.trim(),description:"Override default styling of the public form interface with CSS"}],displayOptions:{show:{respondWith:["text","returnBinary","redirect"]}}}]);class Form extends n8n_workflow_1.Node{constructor(){super(...arguments),this.nodeInputData=[],this.description={displayName:"n8n Form",name:"form",icon:"file:form.svg",group:["input"],version:[1,2.3],description:"Extended n8n Forms",defaults:{name:"Form"},usableAsTool:!0,inputs:[n8n_workflow_1.NodeConnectionTypes.Main],outputs:[n8n_workflow_1.NodeConnectionTypes.Main],waitingNodeTooltip:'=Execution will continue when form is submitted on <a href="{{ $execution.resumeFormUrl }}" target="_blank">{{ $execution.resumeFormUrl }}</a>',webhooks:[{name:"default",httpMethod:"GET",responseMode:"onReceived",path:"",restartWebhook:!0,isFullPath:!0,nodeType:"form"},{name:"default",httpMethod:"POST",responseMode:"formPage",path:"",restartWebhook:!0,isFullPath:!0,nodeType:"form"}],properties:[{displayName:"An n8n Form Trigger node must be set up before this node",name:"triggerNotice",type:"notice",default:""},{displayName:"Page Type",name:"operation",type:"options",default:"page",noDataExpression:!0,options:[{name:"Next Form Page",value:"page"},{name:"Form Ending",value:"completion"}]},...pageProperties,...completionProperties]}}async webhook(context){const res=context.getResponseObject(),operation=context.getNodeParameter("operation",""),trigger=(0,formNodeUtils_1.getFormTriggerNode)(context),mode=context.evaluateExpression(`{{ $('${trigger.name}').first().json.formMode }}`);let fields=[];if("json"===context.getNodeParameter("defineForm",!1))try{const jsonOutput=context.getNodeParameter("jsonOutput","",{rawExpressions:!0});fields=(0,n8n_workflow_1.tryToParseJsonToFormFields)((0,utils_1.resolveRawData)(context,jsonOutput))}catch(error){throw new n8n_workflow_1.NodeOperationError(context.getNode(),error.message,{description:error.message,type:"test"===mode?"manual-form-test":void 0})}else fields=context.getNodeParameter("formFields.values",[]);const method=context.getRequestObject().method;if("completion"===operation&&"GET"===method)return await(0,formCompletionUtils_1.renderFormCompletion)(context,res,trigger);if("completion"===operation&&"POST"===method)return{workflowData:[context.evaluateExpression("{{ $input.all() }}")]};if("GET"===method)return await(0,formNodeUtils_1.renderFormNode)(context,res,trigger,fields,mode);let useWorkflowTimezone=context.evaluateExpression(`{{ $('${trigger.name}').params.options?.useWorkflowTimezone }}`);void 0===useWorkflowTimezone&&(null==trigger?void 0:trigger.typeVersion)>2&&(useWorkflowTimezone=!0);return{webhookResponse:{status:200},workflowData:[[await(0,utils_1.prepareFormReturnItem)(context,fields,mode,useWorkflowTimezone)]]}}async execute(context){const realContext=context&&"function"==typeof context.getNodeParameter?context:this,operation=realContext.getNodeParameter("operation",0);"completion"===operation&&(this.nodeInputData=realContext.getInputData());if(!realContext.getParentNodes(realContext.getNode().name).some(node=>isFormTriggerNode(node.type)))throw new n8n_workflow_1.NodeOperationError(context.getNode(),"Form Trigger node must be set before this node");const hasNextPage=realContext.getChildNodes(realContext.getNode().name).some(node=>isFormNode(node.type));if("completion"===operation&&hasNextPage)throw new n8n_workflow_1.NodeOperationError(realContext.getNode(),"Completion has to be the last Form node in the workflow");const waitTill=(0,waitUtils_1.configureWaitTillDate)(realContext,"root");await realContext.putExecutionToWait(waitTill);const location=realContext.evaluateExpression("{{ $execution.resumeFormUrl }}",0);realContext.sendResponse({headers:{location:location},statusCode:307});return[realContext.getInputData()]}}exports.Form=Form;
|
|
389
2
|
//# sourceMappingURL=Form.node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.node.js","sourceRoot":"","sources":["../../../nodes/Form123/Form.node.ts"],"names":[],"mappings":";;;AASA,+CAQsB;AAEtB,iDAA8C;AAC9C,qEAAmE;AACnE,yDAA2E;AAC3E,yCAAsE;AACtE,iDAAmF;AACnF,+DAA2F;
|
|
1
|
+
{"version":3,"file":"Form.node.js","sourceRoot":"","sources":["../../../nodes/Form123/Form.node.ts"],"names":[],"mappings":";;;AASA,+CAQsB;AAEtB,iDAA8C;AAC9C,qEAAmE;AACnE,yDAA2E;AAC3E,yCAAsE;AACtE,iDAAmF;AACnF,+DAA2F;AAG3F,SAAS,iBAAiB,CAAC,QAAgB;IAC1C,OAAO,QAAQ,KAAK,oBAAoB;QACjC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC;QACjC,QAAQ,KAAK,aAAa,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,QAAgB;IACnC,OAAO,QAAQ,KAAK,aAAa;QAC1B,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC1B,QAAQ,KAAK,MAAM,CAAC;AAC5B,CAAC;AAGD,MAAM,kBAAkB,GAAsB;IAC7C;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EACV,8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U,EAAE,QAAQ,CAAC,CAAA;QAEjC,WAAW,CAAC,YAAY,CAAC;YACxB,OAAO,EAAE;gBACR,QAAQ,EAAE,QAAQ;aAClB;YACD,UAAU,EAAE,GAAG;SACf,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QAC5B,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,EAAE,CAAC;QAC7C,OAAO,CAAC,SAAS,CAAC,CAAC;IACpB,CAAC;CACD;AA5MD,oBA4MC"}
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormTrigger = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const FormTriggerV1_node_1 = require("./v1/FormTriggerV1.node");
|
|
6
|
-
const FormTriggerV2_node_1 = require("./v2/FormTriggerV2.node");
|
|
7
|
-
class FormTrigger extends n8n_workflow_1.VersionedNodeType {
|
|
8
|
-
constructor() {
|
|
9
|
-
const baseDescription = {
|
|
10
|
-
displayName: 'n8n Form Trigger',
|
|
11
|
-
name: 'formTrigger',
|
|
12
|
-
icon: 'file:form.svg',
|
|
13
|
-
group: ['trigger'],
|
|
14
|
-
description: 'Custom n8n Forms',
|
|
15
|
-
defaultVersion: 2.3,
|
|
16
|
-
};
|
|
17
|
-
const nodeVersions = {
|
|
18
|
-
1: new FormTriggerV1_node_1.FormTriggerV1(baseDescription),
|
|
19
|
-
2: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
|
|
20
|
-
2.1: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
|
|
21
|
-
2.2: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
|
|
22
|
-
2.3: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
|
|
23
|
-
};
|
|
24
|
-
super(nodeVersions, baseDescription);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.FormTrigger = FormTrigger;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormTrigger=void 0;const n8n_workflow_1=require("n8n-workflow"),FormTriggerV1_node_1=require("./v1/FormTriggerV1.node"),FormTriggerV2_node_1=require("./v2/FormTriggerV2.node");class FormTrigger extends n8n_workflow_1.VersionedNodeType{constructor(){const baseDescription={displayName:"n8n Form Trigger",name:"formTrigger",icon:"file:form.svg",group:["trigger"],description:"Custom n8n Forms",defaultVersion:2.3};super({1:new FormTriggerV1_node_1.FormTriggerV1(baseDescription),2:new FormTriggerV2_node_1.FormTriggerV2(baseDescription),2.1:new FormTriggerV2_node_1.FormTriggerV2(baseDescription),2.2:new FormTriggerV2_node_1.FormTriggerV2(baseDescription),2.3:new FormTriggerV2_node_1.FormTriggerV2(baseDescription)},baseDescription)}}exports.FormTrigger=FormTrigger;
|
|
28
2
|
//# sourceMappingURL=FormTrigger.node.js.map
|