@crowdin/app-project-module 0.26.4 → 0.26.6
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 +4 -0
- package/out/handlers/manifest.js +1 -0
- package/out/models/index.d.ts +8 -4
- package/out/views/login.handlebars +58 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -230,6 +230,9 @@ configuration.projectIntegration.loginForm = {
|
|
|
230
230
|
label: 'Password',
|
|
231
231
|
type: 'password'
|
|
232
232
|
},
|
|
233
|
+
{
|
|
234
|
+
label: 'Api creds',
|
|
235
|
+
},
|
|
233
236
|
{
|
|
234
237
|
helpText: 'Api Key for http requests',
|
|
235
238
|
key: 'apiKey',
|
|
@@ -650,6 +653,7 @@ const configuration = {
|
|
|
650
653
|
filesFolder: __dirname,
|
|
651
654
|
type: 'type-xyz',
|
|
652
655
|
stringsExport: true,
|
|
656
|
+
multilingualExport: true,
|
|
653
657
|
extensions: [
|
|
654
658
|
'.resx'
|
|
655
659
|
],
|
package/out/handlers/manifest.js
CHANGED
|
@@ -26,6 +26,7 @@ function handle(config) {
|
|
|
26
26
|
customSrxSupported: !!config.customFileFormat.customSrxSupported,
|
|
27
27
|
extensions: config.customFileFormat.extensions,
|
|
28
28
|
signaturePatterns: config.customFileFormat.signaturePatterns,
|
|
29
|
+
multilingualExport: config.customFileFormat.multilingualExport,
|
|
29
30
|
url: '/process',
|
|
30
31
|
},
|
|
31
32
|
];
|
package/out/models/index.d.ts
CHANGED
|
@@ -195,7 +195,7 @@ export interface IntegrationLogic {
|
|
|
195
195
|
/**
|
|
196
196
|
* function to define configuration(settings) modal for you app (by default app will not have any custom settings)
|
|
197
197
|
*/
|
|
198
|
-
getConfiguration?: (projectId: number, client: Crowdin, apiCredentials: any) => Promise<
|
|
198
|
+
getConfiguration?: (projectId: number, client: Crowdin, apiCredentials: any) => Promise<FormEntity[]>;
|
|
199
199
|
/**
|
|
200
200
|
* Logout hook for cleanup logic
|
|
201
201
|
*/
|
|
@@ -236,12 +236,12 @@ export interface IntegrationLogic {
|
|
|
236
236
|
*/
|
|
237
237
|
integrationPagination?: boolean;
|
|
238
238
|
}
|
|
239
|
-
export declare type
|
|
240
|
-
export interface
|
|
239
|
+
export declare type FormEntity = FormField | FormDelimeter;
|
|
240
|
+
export interface FormDelimeter {
|
|
241
241
|
label: string;
|
|
242
242
|
}
|
|
243
243
|
export interface LoginForm {
|
|
244
|
-
fields:
|
|
244
|
+
fields: FormEntity[];
|
|
245
245
|
}
|
|
246
246
|
export interface OAuthLogin {
|
|
247
247
|
/**
|
|
@@ -495,6 +495,10 @@ export interface CustomFileFormatLogic {
|
|
|
495
495
|
* Enable custom srx
|
|
496
496
|
*/
|
|
497
497
|
customSrxSupported?: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* Enable multi language strings export
|
|
500
|
+
*/
|
|
501
|
+
multilingualExport?: boolean;
|
|
498
502
|
/**
|
|
499
503
|
* Used for initial source file upload, source file update, and translation upload
|
|
500
504
|
*/
|
|
@@ -10,64 +10,69 @@
|
|
|
10
10
|
<crowdin-h4 id="integration-name">{{ name }}</crowdin-h4>
|
|
11
11
|
<div class="inputs">
|
|
12
12
|
{{#each loginFields}}
|
|
13
|
-
{{#
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
label="{{label}}"
|
|
17
|
-
value="false"
|
|
18
|
-
use-switch
|
|
19
|
-
{{#if helpText}}
|
|
20
|
-
help-text="{{helpText}}"
|
|
21
|
-
{{/if}}
|
|
22
|
-
{{#if helpTextHtml}}
|
|
23
|
-
help-text-html="{{helpTextHtml}}"
|
|
24
|
-
{{/if}}
|
|
25
|
-
{{#ifeq defaultValue true}}
|
|
26
|
-
checked="{{defaultValue}}"
|
|
27
|
-
{{/ifeq}}
|
|
28
|
-
>
|
|
29
|
-
</crowdin-checkbox>
|
|
30
|
-
{{else}}
|
|
31
|
-
{{#ifeq type "select"}}
|
|
32
|
-
<crowdin-select
|
|
33
|
-
{{#if isMulti}}
|
|
34
|
-
is-multi
|
|
35
|
-
close-on-select="false"
|
|
36
|
-
{{/if}}
|
|
37
|
-
{{#if isSearchable}}
|
|
38
|
-
is-searchable
|
|
39
|
-
{{/if}}
|
|
13
|
+
{{#if key}}
|
|
14
|
+
{{#ifeq type "checkbox"}}
|
|
15
|
+
<crowdin-checkbox
|
|
40
16
|
id="{{key}}"
|
|
41
17
|
label="{{label}}"
|
|
18
|
+
value="false"
|
|
19
|
+
use-switch
|
|
42
20
|
{{#if helpText}}
|
|
43
21
|
help-text="{{helpText}}"
|
|
44
22
|
{{/if}}
|
|
45
23
|
{{#if helpTextHtml}}
|
|
46
24
|
help-text-html="{{helpTextHtml}}"
|
|
47
25
|
{{/if}}
|
|
26
|
+
{{#ifeq defaultValue true}}
|
|
27
|
+
checked="{{defaultValue}}"
|
|
28
|
+
{{/ifeq}}
|
|
48
29
|
>
|
|
49
|
-
|
|
50
|
-
<option {{#ifeq ../defaultValue value}} selected {{/ifeq}} value="{{value}}">{{label}}</option>
|
|
51
|
-
{{/each}}
|
|
52
|
-
</crowdin-select>
|
|
30
|
+
</crowdin-checkbox>
|
|
53
31
|
{{else}}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
32
|
+
{{#ifeq type "select"}}
|
|
33
|
+
<crowdin-select
|
|
34
|
+
{{#if isMulti}}
|
|
35
|
+
is-multi
|
|
36
|
+
close-on-select="false"
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{#if isSearchable}}
|
|
39
|
+
is-searchable
|
|
40
|
+
{{/if}}
|
|
41
|
+
id="{{key}}"
|
|
42
|
+
label="{{label}}"
|
|
43
|
+
{{#if helpText}}
|
|
44
|
+
help-text="{{helpText}}"
|
|
45
|
+
{{/if}}
|
|
46
|
+
{{#if helpTextHtml}}
|
|
47
|
+
help-text-html="{{helpTextHtml}}"
|
|
48
|
+
{{/if}}
|
|
49
|
+
>
|
|
50
|
+
{{#each options}}
|
|
51
|
+
<option {{#ifeq ../defaultValue value}} selected {{/ifeq}} value="{{value}}">{{label}}</option>
|
|
52
|
+
{{/each}}
|
|
53
|
+
</crowdin-select>
|
|
54
|
+
{{else}}
|
|
55
|
+
<crowdin-input
|
|
56
|
+
id="{{key}}"
|
|
57
|
+
label="{{label}}"
|
|
58
|
+
{{#if helpText}}
|
|
59
|
+
help-text="{{helpText}}"
|
|
60
|
+
{{/if}}
|
|
61
|
+
{{#if helpTextHtml}}
|
|
62
|
+
help-text-html="{{helpTextHtml}}"
|
|
63
|
+
{{/if}}
|
|
64
|
+
{{#if type}}
|
|
65
|
+
type="{{type}}"
|
|
66
|
+
{{/if}}
|
|
67
|
+
value="{{#if defaultValue}}{{defaultValue}}{{/if}}">
|
|
68
|
+
</crowdin-input>
|
|
68
69
|
{{/ifeq}}
|
|
69
70
|
{{/ifeq}}
|
|
70
|
-
{{
|
|
71
|
+
{{else}}
|
|
72
|
+
<crowdin-p>{{label}}</crowdin-p>
|
|
73
|
+
{{/if}}
|
|
74
|
+
<div style="padding: 8px"></div>
|
|
75
|
+
{{/each}}
|
|
71
76
|
</div>
|
|
72
77
|
<crowdin-button
|
|
73
78
|
outlined icon-after="arrow_forward"
|
|
@@ -153,11 +158,13 @@
|
|
|
153
158
|
function getLoginForm() {
|
|
154
159
|
return {
|
|
155
160
|
{{#each loginFields}}
|
|
156
|
-
{{#
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
{{#if key}}
|
|
162
|
+
{{#ifeq type "checkbox"}}
|
|
163
|
+
'{{key}}': !!document.querySelector('#{{key}}').checked,
|
|
164
|
+
{{else}}
|
|
165
|
+
'{{key}}': document.querySelector('#{{key}}').getAttribute('value'),
|
|
166
|
+
{{/ifeq}}
|
|
167
|
+
{{/if}}
|
|
161
168
|
{{/each}}
|
|
162
169
|
};
|
|
163
170
|
}
|
package/package.json
CHANGED