@bigbinary/neeto-form-frontend 3.13.10 → 3.14.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/README.md +131 -81
- package/app/javascript/src/translations/ar.json +9 -1
- package/app/javascript/src/translations/cs.json +9 -1
- package/app/javascript/src/translations/de.json +9 -1
- package/app/javascript/src/translations/en.json +10 -1
- package/app/javascript/src/translations/es.json +9 -1
- package/app/javascript/src/translations/fr.json +9 -1
- package/app/javascript/src/translations/it.json +9 -1
- package/app/javascript/src/translations/nl.json +9 -1
- package/app/javascript/src/translations/pl.json +9 -1
- package/app/javascript/src/translations/pt.json +9 -1
- package/app/javascript/src/translations/ro.json +9 -1
- package/app/javascript/src/translations/ru.json +9 -1
- package/dist/BuildForm.js +32 -7
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +39 -32
- package/dist/ExternalForm.js.map +1 -1
- package/dist/Submission.js +1 -1
- package/dist/UrlBuilder.js +10 -6
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/{buildForm-miMj_S28.js → buildForm-CXy5L1RP.js} +2 -2
- package/dist/{buildForm-miMj_S28.js.map → buildForm-CXy5L1RP.js.map} +1 -1
- package/dist/{buildForm-DQ2wgwuW.js → buildForm-DNCW7prR.js} +2 -2
- package/dist/{buildForm-DQ2wgwuW.js.map → buildForm-DNCW7prR.js.map} +1 -1
- package/dist/cjs/BuildForm.js +32 -7
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +38 -31
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/Submission.js +1 -1
- package/dist/cjs/UrlBuilder.js +10 -6
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +4 -4
- package/dist/cjs/index.js +8 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/{constants-Dq9-rvtB.js → constants-BVZZfXua.js} +5 -1
- package/dist/constants-BVZZfXua.js.map +1 -0
- package/dist/{constants-R6y-Scns.js → constants-Bw2NSI7-.js} +5 -4
- package/dist/constants-Bw2NSI7-.js.map +1 -0
- package/dist/{constants-CDhYxmSQ.js → constants-VzpftVgP.js} +5 -3
- package/dist/constants-VzpftVgP.js.map +1 -0
- package/dist/{constants-DBuFEVFA.js → constants-b1EQ6-AS.js} +4 -2
- package/dist/constants-b1EQ6-AS.js.map +1 -0
- package/dist/hooks.js +4 -4
- package/dist/{index-CAtNQTCZ.js → index-BARvqe7c.js} +2 -2
- package/dist/{index-CAtNQTCZ.js.map → index-BARvqe7c.js.map} +1 -1
- package/dist/{index-BGEdOqsc.js → index-BkNaYmLc.js} +2 -2
- package/dist/{index-BGEdOqsc.js.map → index-BkNaYmLc.js.map} +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/{useFormSubmission-Bor3TuEO.js → useFormSubmission-CYqHLtkA.js} +2 -2
- package/dist/{useFormSubmission-Bor3TuEO.js.map → useFormSubmission-CYqHLtkA.js.map} +1 -1
- package/dist/{useFormSubmission-D3Bxhy6g.js → useFormSubmission-DMoyM44A.js} +2 -2
- package/dist/{useFormSubmission-D3Bxhy6g.js.map → useFormSubmission-DMoyM44A.js.map} +1 -1
- package/dist/{utils-BThu7JWp.js → utils-BjgmM0Qs.js} +521 -55
- package/dist/utils-BjgmM0Qs.js.map +1 -0
- package/dist/{utils-1blEk5zb.js → utils-DdrUdmyb.js} +512 -45
- package/dist/utils-DdrUdmyb.js.map +1 -0
- package/package.json +12 -12
- package/dist/constants-CDhYxmSQ.js.map +0 -1
- package/dist/constants-DBuFEVFA.js.map +0 -1
- package/dist/constants-Dq9-rvtB.js.map +0 -1
- package/dist/constants-R6y-Scns.js.map +0 -1
- package/dist/utils-1blEk5zb.js.map +0 -1
- package/dist/utils-BThu7JWp.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
# neeto-form-nano
|
|
2
2
|
|
|
3
|
-
The `neeto-form-nano` allows us to build forms within neeto applications. This
|
|
3
|
+
The `neeto-form-nano` allows us to build forms within neeto applications. This
|
|
4
|
+
nano exports `@bigbinary/neeto-form-frontend` NPM package and
|
|
5
|
+
`neeto-form-engine` Rails engine.
|
|
4
6
|
|
|
5
|
-
See
|
|
7
|
+
See
|
|
8
|
+
[this page](https://github.com/search?q=org%3Abigbinary+%22neeto-form-engine+%28%22&type=code)
|
|
9
|
+
to find host applications using this nano. Changes made in the nano should be
|
|
10
|
+
rolled out to all of them, especially migrations.
|
|
6
11
|
|
|
7
12
|
# Contents
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
1. [Development with Host Application](#development-with-host-application)
|
|
15
|
+
- [Engine](#engine)
|
|
16
|
+
- [Frontend package](#frontend-package)
|
|
17
|
+
- [Installation](#installation-1)
|
|
18
|
+
- [Instructions for development](#instructions-for-development)
|
|
19
|
+
- [Usage](#usage)
|
|
20
|
+
2. [Instructions for Publishing](#instructions-for-publishing)
|
|
15
21
|
|
|
16
22
|
# Development with Host Application
|
|
17
23
|
|
|
18
24
|
## Engine
|
|
19
|
-
|
|
25
|
+
|
|
26
|
+
The engine adds setup for form on backend and allows us to attach forms to any
|
|
27
|
+
model. It also stores submissions.
|
|
20
28
|
|
|
21
29
|
### Installation
|
|
22
30
|
|
|
@@ -48,13 +56,15 @@ The engine adds setup for form on backend and allows us to attach forms to any m
|
|
|
48
56
|
bundle exec rails db:migrate
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
5. Add this line to your application's `config/routes.rb` file (replace `at` to
|
|
59
|
+
5. Add this line to your application's `config/routes.rb` file (replace `at` to
|
|
60
|
+
your desired route):
|
|
52
61
|
|
|
53
62
|
```ruby
|
|
54
63
|
mount NeetoFormEngine::Engine, at: "/neeto_form_engine"
|
|
55
64
|
```
|
|
56
65
|
|
|
57
|
-
6. Create file `neeto_form_engine.rb` under `config/initializers` to provide the
|
|
66
|
+
6. Create file `neeto_form_engine.rb` under `config/initializers` to provide the
|
|
67
|
+
`owner_class` information
|
|
58
68
|
|
|
59
69
|
```ruby
|
|
60
70
|
NeetoFormEngine.owner_class = "Organization"
|
|
@@ -66,7 +76,8 @@ The engine adds setup for form on backend and allows us to attach forms to any m
|
|
|
66
76
|
has_many :forms, class_name: "::NeetoFormEngine::Form", as: :owner
|
|
67
77
|
```
|
|
68
78
|
|
|
69
|
-
8. Configure models to add below association to scope submission records
|
|
79
|
+
8. Configure models to add below association to scope submission records
|
|
80
|
+
(optional)
|
|
70
81
|
|
|
71
82
|
```ruby
|
|
72
83
|
has_one :submission, class_name: "::NeetoFormEngine::Submission", as: :record
|
|
@@ -80,83 +91,116 @@ The engine adds setup for form on backend and allows us to attach forms to any m
|
|
|
80
91
|
|
|
81
92
|
### Customizability
|
|
82
93
|
|
|
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
|
-
|
|
94
|
+
#### `NeetoFormEngine::Customizable::Forms::Createable`
|
|
95
|
+
|
|
96
|
+
The engine supports customizing the default behavior of `Forms::CreateService`
|
|
97
|
+
by overriding the supported methods in this concern.
|
|
98
|
+
|
|
99
|
+
#### Available methods:
|
|
100
|
+
|
|
101
|
+
1. `create_default_questions!`: If you want to use custom logic to create
|
|
102
|
+
default questions, you can specify them using this method. `owner`, `form`
|
|
103
|
+
and `params` will be available globally.
|
|
104
|
+
2. `additional_form_params`: If you want to include additional attributes while
|
|
105
|
+
creating forms, you can specify them using this method. It takes one argument
|
|
106
|
+
`params` which will be the form parameters passed from the front-end.
|
|
107
|
+
|
|
108
|
+
#### `NeetoFormEngine::Customizable::Questions::Createable`
|
|
109
|
+
|
|
110
|
+
The engine supports customizing the default behavior of
|
|
111
|
+
`Questions::CreateService` by overriding the supported methods in this concern.
|
|
112
|
+
|
|
113
|
+
#### Available methods:
|
|
114
|
+
|
|
115
|
+
1. `create_question!`: This method receives one argument `params` that contains
|
|
116
|
+
the question parameters passed from the front-end.
|
|
117
|
+
2. `additional_question_params`: If you want to include additional attributes
|
|
118
|
+
while creating questions, you can specify them using this method. It takes
|
|
119
|
+
one argument `params` which will be the question parameters passed from the
|
|
120
|
+
front-end.
|
|
121
|
+
|
|
122
|
+
#### `NeetoFormEngine::Customizable::Questions::Updateable`
|
|
123
|
+
|
|
124
|
+
The engine supports customizing the default behavior of
|
|
125
|
+
`Questions::UpdateService` by overriding the supported constants in this
|
|
126
|
+
concern.
|
|
127
|
+
|
|
128
|
+
#### Available constants:
|
|
129
|
+
|
|
130
|
+
1. `EXCLUDED_UPDATE_PARAMS`: If you have included extra parameters other than
|
|
131
|
+
`kind` for additional use cases that are not valid entity attributes, they
|
|
132
|
+
need to be specified as `EXCLUDED_UPDATE_PARAMS`.
|
|
133
|
+
|
|
134
|
+
#### `NeetoFormEngine::Customizable::QuestionResponses::Createable`
|
|
135
|
+
|
|
136
|
+
The engine supports customizing the default behavior of
|
|
137
|
+
`QuestionResponses::CreateService` by overriding the supported methods in this
|
|
138
|
+
concern.
|
|
139
|
+
|
|
140
|
+
#### Available methods:
|
|
141
|
+
|
|
142
|
+
1. `additional_initialization_logic`: If you want to initialize additional
|
|
143
|
+
variables, you can specify them using this method.
|
|
144
|
+
2. `additional_process_actions`: If you want to perform any additional actions
|
|
145
|
+
outside the transaction block, you can override this method.
|
|
146
|
+
3. `additional_create_submission_actions`: You can use this method to specify
|
|
147
|
+
any additional logic that needs to be executed after creating submissions.
|
|
148
|
+
4. `additional_create_response_actions`: If you want to perform some additional
|
|
149
|
+
actions on each of the responses, you can specify them using this method.
|
|
150
|
+
This method receives `question` and `response_param` passed from the
|
|
151
|
+
front-end as arguments.
|
|
152
|
+
|
|
153
|
+
### Set up Google reCAPTCHA
|
|
154
|
+
|
|
155
|
+
1. Sign up for an API key pair from the
|
|
156
|
+
[official website](http://www.google.com/recaptcha/admin).
|
|
157
|
+
2. Configure the following `environment variables` and `secrets` with suitable
|
|
158
|
+
values
|
|
159
|
+
|
|
160
|
+
- Under `.env` file:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
FORM_NANO_RECAPTCHA_V2_SITE_KEY=# Value from Google cloud console
|
|
164
|
+
FORM_NANO_RECAPTCHA_V2_SECRET_KEY=# Value from Google cloud console
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- Under `secrets.yml` file:
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
form_nano:
|
|
171
|
+
recaptcha_v2:
|
|
172
|
+
site_key: <%= ENV["FORM_NANO_RECAPTCHA_V2_SITE_KEY"] %>
|
|
173
|
+
secret_key: <%= ENV["FORM_NANO_RECAPTCHA_V2_SECRET_KEY"] %>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
3. Include the site key in `global_props`
|
|
177
|
+
```ruby
|
|
178
|
+
module ApplicationHelper
|
|
179
|
+
def get_client_props
|
|
180
|
+
# other variables
|
|
181
|
+
custom_props = {
|
|
182
|
+
# other props
|
|
183
|
+
form_nano_recaptcha_v2_site_key: Rails.application.secrets.form_nano.dig(:recaptcha_v2, :site_key)
|
|
184
|
+
}
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
```
|
|
146
188
|
|
|
147
189
|
## Frontend package
|
|
190
|
+
|
|
148
191
|
The frontend package allows us to create forms across neeto products.
|
|
149
192
|
|
|
150
193
|
### Installation
|
|
151
194
|
|
|
152
195
|
1. Install the NPM package
|
|
196
|
+
|
|
153
197
|
```zsh
|
|
154
198
|
yarn add @bigbinary/neeto-form-frontend
|
|
155
199
|
```
|
|
156
200
|
|
|
157
|
-
2. The frontend package has a few peer dependencies that are required for
|
|
158
|
-
|
|
159
|
-
the below command:
|
|
201
|
+
2. The frontend package has a few peer dependencies that are required for the
|
|
202
|
+
proper functioning of the package. Install all the peer dependencies using
|
|
203
|
+
the below command:
|
|
160
204
|
|
|
161
205
|
```zsh
|
|
162
206
|
yarn add @bigbinary/neetoui @bigbinary/neeto-icons ramda@^0.28.0 classnames@^2.3.1 formik@2.2.9 @bigbinary/neeto-commons-frontend react-google-recaptcha
|
|
@@ -170,14 +214,20 @@ the below command:
|
|
|
170
214
|
|
|
171
215
|
### Instructions for development
|
|
172
216
|
|
|
173
|
-
Check the
|
|
217
|
+
Check the
|
|
218
|
+
[Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0)
|
|
219
|
+
for step-by-step instructions to develop the frontend package.
|
|
174
220
|
|
|
175
221
|
### Usage
|
|
176
222
|
|
|
177
223
|
You can learn more about the usage here:
|
|
224
|
+
|
|
178
225
|
1. [Components](./docs/frontend/components.md)
|
|
179
226
|
2. [Hooks](./docs/frontend/hooks.md)
|
|
227
|
+
3. [Email Verification](./docs/email-verification.md)
|
|
180
228
|
|
|
181
229
|
# Instructions for Publishing
|
|
182
230
|
|
|
183
|
-
Consult the
|
|
231
|
+
Consult the
|
|
232
|
+
[building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages)
|
|
233
|
+
guide for details on how to publish.
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "اضغط على مفتاح المسافة أو تبويب أو مفتاح الإدخال بعد إضافة نطاق.",
|
|
203
203
|
"removeInvalidDomains": "انقر هنا لإزالة النطاقات غير الصالحة.",
|
|
204
204
|
"placeholder": "يرجى إدخال نطاقات البريد الإلكتروني"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "تأكيد البريد الإلكتروني",
|
|
208
|
+
"switchHelpText": "سيتم إرسال رمز تحقق إلى البريد الإلكتروني لحجز الاجتماع.",
|
|
209
|
+
"resendInSeconds": "تم إرسال رمز تحقق إلى بريدك الوارد. لم تستلم الرمز؟ أعد الإرسال خلال {{secondsLeft}} ثانية",
|
|
210
|
+
"resendCode": "تم إرسال رمز تحقق إلى بريدك الوارد. لم تستلم الرمز؟ <button>أعد إرسال رمز التحقق</button>",
|
|
211
|
+
"sendCode": "إرسال الرمز",
|
|
212
|
+
"verificationCode": "رمز التحقق"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Stiskněte mezerník, klávesu tab nebo enter po přidání domény.",
|
|
203
203
|
"removeInvalidDomains": "Klikněte zde pro odstranění neplatných domén.",
|
|
204
204
|
"placeholder": "Prosím, zadejte domény emailů"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Ověření e-mailu",
|
|
208
|
+
"switchHelpText": "Ověřovací kód bude zaslán na e-mail pro rezervaci schůzky.",
|
|
209
|
+
"resendInSeconds": "Ověřovací kód byl odeslán do vaší schránky. Nedostali jste kód? Znovu odeslat za {{secondsLeft}} sekund",
|
|
210
|
+
"resendCode": "Ověřovací kód byl odeslán do vaší schránky. Nedostali jste kód? <button>Znovu odeslat ověřovací kód</button>",
|
|
211
|
+
"sendCode": "Odeslat kód",
|
|
212
|
+
"verificationCode": "Ověřovací kód"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Drücken Sie die Leerzeichen-, Tabulator- oder Eingabetaste, nachdem Sie eine Domain hinzugefügt haben.",
|
|
203
203
|
"removeInvalidDomains": "Klicken Sie hier, um ungültige Domains zu entfernen.",
|
|
204
204
|
"placeholder": "Bitte geben Sie die E-Mail-Domains ein"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "E-Mail-Verifizierung",
|
|
208
|
+
"switchHelpText": "Ein Bestätigungscode wird an die E-Mail gesendet, um das Meeting zu buchen.",
|
|
209
|
+
"resendInSeconds": "Ein Bestätigungscode wurde an Ihr Postfach gesendet. Code nicht erhalten? Erneut senden in {{secondsLeft}} Sekunden",
|
|
210
|
+
"resendCode": "Ein Bestätigungscode wurde an Ihr Postfach gesendet. Code nicht erhalten? <button>Bestätigungscode erneut senden</button>",
|
|
211
|
+
"sendCode": "Code senden",
|
|
212
|
+
"verificationCode": "Bestätigungscode"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -157,7 +157,8 @@
|
|
|
157
157
|
"captchaVerificationFailed": "Captcha verification failed. Please try again.",
|
|
158
158
|
"invalidDomain": "Domain name is invalid",
|
|
159
159
|
"minOneEntity": "Please add atleast one {{entity}}",
|
|
160
|
-
"emailFromRestrictedDomain": "Emails with domain {{domain}} aren't accepted."
|
|
160
|
+
"emailFromRestrictedDomain": "Emails with domain {{domain}} aren't accepted.",
|
|
161
|
+
"mustBeASixDigitNumber": "{{entity}} must be a 6 digit number"
|
|
161
162
|
},
|
|
162
163
|
"fileTypes": {
|
|
163
164
|
"documents": "Documents",
|
|
@@ -202,6 +203,14 @@
|
|
|
202
203
|
"helpText": "Press space, tab or enter key after adding a domain.",
|
|
203
204
|
"removeInvalidDomains": "Click here to remove invalid domains.",
|
|
204
205
|
"placeholder": "Please enter the email domains"
|
|
206
|
+
},
|
|
207
|
+
"emailVerification": {
|
|
208
|
+
"label": "Email verification",
|
|
209
|
+
"popoverDescription": "When enabled, a verification code will be sent to the provided email, and submission will be blocked until verification is complete.",
|
|
210
|
+
"resendInSeconds": "A verification code has been sent to your inbox. Didn't receive a code? Resend in {{secondsLeft}} seconds",
|
|
211
|
+
"resendCode": "A verification code has been sent to your inbox. Didn't receive a code? <button>Resend verification code</button>",
|
|
212
|
+
"sendCode": "Send code",
|
|
213
|
+
"verificationCode": "Verification code"
|
|
205
214
|
}
|
|
206
215
|
}
|
|
207
216
|
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Presiona espacio, tabulador o tecla enter después de agregar un dominio.",
|
|
203
203
|
"removeInvalidDomains": "Haz clic aquí para eliminar dominios inválidos.",
|
|
204
204
|
"placeholder": "Por favor, introduce los dominios de correo electrónico"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Verificación de correo electrónico",
|
|
208
|
+
"switchHelpText": "Se enviará un código de verificación al correo electrónico para reservar la reunión.",
|
|
209
|
+
"resendInSeconds": "Se ha enviado un código de verificación a tu bandeja de entrada. ¿No recibiste el código? Reenviar en {{secondsLeft}} segundos",
|
|
210
|
+
"resendCode": "Se ha enviado un código de verificación a tu bandeja de entrada. ¿No recibiste el código? <button>Reenviar código de verificación</button>",
|
|
211
|
+
"sendCode": "Enviar código",
|
|
212
|
+
"verificationCode": "Código de verificación"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Appuyez sur la touche espace, tab ou entrée après avoir ajouté un domaine.",
|
|
203
203
|
"removeInvalidDomains": "Cliquez ici pour supprimer les domaines invalides.",
|
|
204
204
|
"placeholder": "Veuillez entrer les domaines d'email"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Vérification de l'e-mail",
|
|
208
|
+
"switchHelpText": "Un code de vérification sera envoyé à l'e-mail pour réserver la réunion.",
|
|
209
|
+
"resendInSeconds": "Un code de vérification a été envoyé dans votre boîte de réception. Vous n'avez pas reçu de code ? Renvoyer dans {{secondsLeft}} secondes",
|
|
210
|
+
"resendCode": "Un code de vérification a été envoyé dans votre boîte de réception. Vous n'avez pas reçu de code ? <button>Renvoyer le code de vérification</button>",
|
|
211
|
+
"sendCode": "Envoyer le code",
|
|
212
|
+
"verificationCode": "Code de vérification"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -203,6 +203,14 @@
|
|
|
203
203
|
"helpText": "Premi la barra spaziatrice, il tasto Tab o il tasto Invio dopo aver aggiunto un dominio.",
|
|
204
204
|
"removeInvalidDomains": "Clicca qui per rimuovere i domini non validi.",
|
|
205
205
|
"placeholder": "Inserisci i domini email"
|
|
206
|
+
},
|
|
207
|
+
"emailVerification": {
|
|
208
|
+
"switchLabel": "Verifica e-mail",
|
|
209
|
+
"switchHelpText": "Un codice di verifica verrà inviato all'e-mail per prenotare la riunione.",
|
|
210
|
+
"resendInSeconds": "Un codice di verifica è stato inviato alla tua casella di posta. Non hai ricevuto il codice? Invia di nuovo tra {{secondsLeft}} secondi",
|
|
211
|
+
"resendCode": "Un codice di verifica è stato inviato alla tua casella di posta. Non hai ricevuto il codice? <button>Invia nuovamente il codice di verifica</button>",
|
|
212
|
+
"sendCode": "Invia codice",
|
|
213
|
+
"verificationCode": "Codice di verifica"
|
|
206
214
|
}
|
|
207
215
|
}
|
|
208
|
-
}
|
|
216
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Druk op spatie, tab of enter toets na het toevoegen van een domein.",
|
|
203
203
|
"removeInvalidDomains": "Klik hier om ongeldige domeinen te verwijderen.",
|
|
204
204
|
"placeholder": "Voer de e-maildomeinen in"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "E-mailverificatie",
|
|
208
|
+
"switchHelpText": "Er wordt een verificatiecode naar het e-mailadres gestuurd om de vergadering te boeken.",
|
|
209
|
+
"resendInSeconds": "Er is een verificatiecode naar je inbox gestuurd. Geen code ontvangen? Opnieuw verzenden in {{secondsLeft}} seconden",
|
|
210
|
+
"resendCode": "Er is een verificatiecode naar je inbox gestuurd. Geen code ontvangen? <button>Verificatiecode opnieuw verzenden</button>",
|
|
211
|
+
"sendCode": "Code verzenden",
|
|
212
|
+
"verificationCode": "Verificatiecode"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Naciśnij spację, tabulator lub klawisz enter po dodaniu domeny.",
|
|
203
203
|
"removeInvalidDomains": "Kliknij tutaj, aby usunąć nieprawidłowe domeny.",
|
|
204
204
|
"placeholder": "Proszę wprowadzić domeny e-mail"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Weryfikacja e-maila",
|
|
208
|
+
"switchHelpText": "Kod weryfikacyjny zostanie wysłany na e-mail, aby zarezerwować spotkanie.",
|
|
209
|
+
"resendInSeconds": "Kod weryfikacyjny został wysłany na Twoją skrzynkę odbiorczą. Nie otrzymałeś kodu? Wyślij ponownie za {{secondsLeft}} sekund",
|
|
210
|
+
"resendCode": "Kod weryfikacyjny został wysłany na Twoją skrzynkę odbiorczą. Nie otrzymałeś kodu? <button>Wyślij ponownie kod weryfikacyjny</button>",
|
|
211
|
+
"sendCode": "Wyślij kod",
|
|
212
|
+
"verificationCode": "Kod weryfikacyjny"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Pressione espaço, tab ou a tecla enter após adicionar um domínio.",
|
|
203
203
|
"removeInvalidDomains": "Clique aqui para remover domínios inválidos.",
|
|
204
204
|
"placeholder": "Por favor, insira os domínios de email"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Verificação de e-mail",
|
|
208
|
+
"switchHelpText": "Um código de verificação será enviado para o e-mail para reservar a reunião.",
|
|
209
|
+
"resendInSeconds": "Um código de verificação foi enviado para sua caixa de entrada. Não recebeu o código? Reenviar em {{secondsLeft}} segundos",
|
|
210
|
+
"resendCode": "Um código de verificação foi enviado para sua caixa de entrada. Não recebeu o código? <button>Reenviar código de verificação</button>",
|
|
211
|
+
"sendCode": "Enviar código",
|
|
212
|
+
"verificationCode": "Código de verificação"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -202,6 +202,14 @@
|
|
|
202
202
|
"helpText": "Apasă spațiu, tab sau tasta enter după ce ai adăugat un domeniu.",
|
|
203
203
|
"removeInvalidDomains": "Click aici pentru a elimina domeniile invalide.",
|
|
204
204
|
"placeholder": "Te rog să introduci domeniile de email"
|
|
205
|
+
},
|
|
206
|
+
"emailVerification": {
|
|
207
|
+
"switchLabel": "Verificare e-mail",
|
|
208
|
+
"switchHelpText": "Un cod de verificare va fi trimis pe e-mail pentru a rezerva întâlnirea.",
|
|
209
|
+
"resendInSeconds": "Un cod de verificare a fost trimis în căsuța ta de e-mail. Nu ai primit codul? Retrimite în {{secondsLeft}} secunde",
|
|
210
|
+
"resendCode": "Un cod de verificare a fost trimis în căsuța ta de e-mail. Nu ai primit codul? <button>Retrimite codul de verificare</button>",
|
|
211
|
+
"sendCode": "Trimite codul",
|
|
212
|
+
"verificationCode": "Cod de verificare"
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
|
-
}
|
|
215
|
+
}
|
|
@@ -204,6 +204,14 @@
|
|
|
204
204
|
"helpText": "Нажмите пробел, табуляцию или клавишу ввода после добавления домена.",
|
|
205
205
|
"removeInvalidDomains": "Нажмите здесь, чтобы удалить недействительные домены.",
|
|
206
206
|
"placeholder": "Пожалуйста, введите домены электронной почты"
|
|
207
|
+
},
|
|
208
|
+
"emailVerification": {
|
|
209
|
+
"switchLabel": "Подтверждение электронной почты",
|
|
210
|
+
"switchHelpText": "Код подтверждения будет отправлен на электронную почту для бронирования встречи.",
|
|
211
|
+
"resendInSeconds": "Код подтверждения был отправлен на вашу почту. Не получили код? Повторно отправить через {{secondsLeft}} секунд",
|
|
212
|
+
"resendCode": "Код подтверждения был отправлен на вашу почту. Не получили код? <button>Отправить код подтверждения повторно</button>",
|
|
213
|
+
"sendCode": "Отправить код",
|
|
214
|
+
"verificationCode": "Код подтверждения"
|
|
207
215
|
}
|
|
208
216
|
}
|
|
209
|
-
}
|
|
217
|
+
}
|
package/dist/BuildForm.js
CHANGED
|
@@ -3,14 +3,14 @@ import classnames from 'classnames';
|
|
|
3
3
|
import { isPresent, truncate, findBy, isNotPresent, slugify, existsBy, hyphenate, noop, nullSafe, removeBy } from '@bigbinary/neeto-cist';
|
|
4
4
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
5
5
|
import { equals, path, curry, assoc, prop, dissoc, when, includes, isEmpty, reject, keys, pick, omit, evolve, map, mergeLeft, isNil, pipe, filter, isNotNil, uniq, join, pluck, test, paths, difference, split, last, either, T, F } from 'ramda';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { k as useDeleteQuestion, Q as QUESTION_TYPES, a as useForm, l as useCreateQuestion, m as useUpdateQuestion, C as CAPTCHA_TYPES, n as useReorderQuestions, i as QUERY_KEYS } from './constants-b1EQ6-AS.js';
|
|
7
|
+
import { e as buildDisplayLabel, f as INDEPENDENT_LABELS_MAP, h as QUESTION_ACTIONS, i as isElementOverflowing, D as Drag, j as SELECTABLE_KINDS, k as isAutoGeneratedQuestion, l as isRichTextQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, m as RESERVED_FIELD_CODES, L as LABEL_FIELDS, n as isDefaultLanguage, o as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, p as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, q as NON_HIDEABLE_FIELDS, r as NON_READ_ONLY_FIELDS, s as RICH_TEXT_QUESTIONS, t as FILE_TYPES_MAP, u as FILE_GROUPS, M as MINIMUM_OPTIONS, w as RATING_OPTIONS, x as STAR_RATING_MIN_VALUE_OPTIONS, y as STAR_RATING_MAX_VALUE_OPTIONS, z as STAR_RATING_ICONS_MAP, A as buildDisabledAddButtonHelpPopoverProps, B as buildReorderPayload, G as isMandatoryField, H as QUESTION_KINDS, a as QUESTION_KIND, J as getActiveQuestionKindDetails, K as DEFAULT_AVAILABLE_LANGUAGES, O as DEFAULT_ADVANCED_FEATURES, P as QUESTIONS_INITIAL_VALUE } from './constants-Bw2NSI7-.js';
|
|
8
8
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
9
9
|
import { useState, useRef, useEffect, createElement } from 'react';
|
|
10
10
|
import { Droppable, Draggable, DragDropContext } from '@hello-pangea/dnd';
|
|
11
11
|
import { withT, isMetaKeyPressed, useStateWithDependency, useFuncDebounce, useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
12
12
|
import { showThumbsUpToastr, withEventTargetValue, hyphenize } from '@bigbinary/neeto-commons-frontend/utils';
|
|
13
|
-
import { a as useBuildFormStore } from './buildForm-
|
|
13
|
+
import { a as useBuildFormStore } from './buildForm-DNCW7prR.js';
|
|
14
14
|
import { shallow } from 'zustand/shallow';
|
|
15
15
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
16
16
|
import { useTranslation, Trans } from 'react-i18next';
|
|
@@ -21,7 +21,7 @@ import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
|
21
21
|
import Dropdown from '@bigbinary/neetoui/Dropdown';
|
|
22
22
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
23
23
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
24
|
-
import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-
|
|
24
|
+
import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-BkNaYmLc.js';
|
|
25
25
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
26
26
|
import { t } from 'i18next';
|
|
27
27
|
import { v4 } from 'uuid';
|
|
@@ -1409,6 +1409,10 @@ var DOMAIN_RESTRICTION_TRANSLATIONS = {
|
|
|
1409
1409
|
popoverDescription: t("neetoForm.domainRestriction.blacklistedDomains.popoverDescription")
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
|
+
var EMAIL_VERIFICATION_TRANSLATIONS = {
|
|
1413
|
+
title: t("neetoForm.emailVerification.label"),
|
|
1414
|
+
popoverDescription: t("neetoForm.emailVerification.popoverDescription")
|
|
1415
|
+
};
|
|
1412
1416
|
|
|
1413
1417
|
var _excluded$2 = ["children"];
|
|
1414
1418
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -1712,7 +1716,6 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
1712
1716
|
className: "flex flex-col space-y-4",
|
|
1713
1717
|
"data-cy": "".concat(hyphenate(switchName), "-container"),
|
|
1714
1718
|
children: [/*#__PURE__*/jsx(SwitchBlock, {
|
|
1715
|
-
className: "mt-4",
|
|
1716
1719
|
name: switchName,
|
|
1717
1720
|
title: /*#__PURE__*/jsx(TitleWithHelpPopover, {
|
|
1718
1721
|
helpLink: helpLink,
|
|
@@ -1726,6 +1729,28 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
1726
1729
|
});
|
|
1727
1730
|
};
|
|
1728
1731
|
|
|
1732
|
+
var VerifyEmails = function VerifyEmails() {
|
|
1733
|
+
var _useBuildFormStore = useBuildFormStore(paths([["formState", "helpDocUrls", "emailVerification"], ["formState", "hostSpecificData", "emailVerification"]])),
|
|
1734
|
+
_useBuildFormStore2 = _slicedToArray(_useBuildFormStore, 2),
|
|
1735
|
+
helpLink = _useBuildFormStore2[0],
|
|
1736
|
+
hostSpecificTranslations = _useBuildFormStore2[1];
|
|
1737
|
+
var _mergeLeft = mergeLeft(hostSpecificTranslations, EMAIL_VERIFICATION_TRANSLATIONS),
|
|
1738
|
+
title = _mergeLeft.title,
|
|
1739
|
+
popoverDescription = _mergeLeft.popoverDescription;
|
|
1740
|
+
return /*#__PURE__*/jsx(Switch, {
|
|
1741
|
+
name: "isVerificationEnabled",
|
|
1742
|
+
label: /*#__PURE__*/jsx(Typography, {
|
|
1743
|
+
component: "span",
|
|
1744
|
+
style: "body1",
|
|
1745
|
+
children: /*#__PURE__*/jsx(TitleWithHelpPopover, {
|
|
1746
|
+
helpLink: helpLink,
|
|
1747
|
+
title: title,
|
|
1748
|
+
description: popoverDescription
|
|
1749
|
+
})
|
|
1750
|
+
})
|
|
1751
|
+
});
|
|
1752
|
+
};
|
|
1753
|
+
|
|
1729
1754
|
var Email = function Email(_ref) {
|
|
1730
1755
|
var usesCustomSubmissionComponent = _ref.usesCustomSubmissionComponent;
|
|
1731
1756
|
var _useFormikContext = useFormikContext(),
|
|
@@ -1735,7 +1760,7 @@ var Email = function Email(_ref) {
|
|
|
1735
1760
|
_useFormikContext$val3 = _useFormikContext$val.isDomainBlacklistingEnabled,
|
|
1736
1761
|
isDomainBlacklistingEnabled = _useFormikContext$val3 === void 0 ? false : _useFormikContext$val3;
|
|
1737
1762
|
return /*#__PURE__*/jsx("div", {
|
|
1738
|
-
className: "flex flex-col",
|
|
1763
|
+
className: "flex flex-col space-y-4",
|
|
1739
1764
|
children: !usesCustomSubmissionComponent && /*#__PURE__*/jsxs(Fragment, {
|
|
1740
1765
|
children: [/*#__PURE__*/jsx(RestrictDomainsBlock, {
|
|
1741
1766
|
domainName: "whitelistedDomains",
|
|
@@ -1745,7 +1770,7 @@ var Email = function Email(_ref) {
|
|
|
1745
1770
|
domainName: "blacklistedDomains",
|
|
1746
1771
|
isDomainRestrictionEnabled: isDomainBlacklistingEnabled,
|
|
1747
1772
|
switchName: "isDomainBlacklistingEnabled"
|
|
1748
|
-
})]
|
|
1773
|
+
}), /*#__PURE__*/jsx(VerifyEmails, {})]
|
|
1749
1774
|
})
|
|
1750
1775
|
});
|
|
1751
1776
|
};
|