@crowdin/app-project-module 0.22.0 → 0.22.2
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 +7 -0
- package/out/models/index.d.ts +12 -0
- package/out/storage/mysql.js +1 -1
- package/out/storage/postgre.js +1 -1
- package/out/util/defaults.js +3 -0
- package/out/views/login.handlebars +3 -0
- package/out/views/main.handlebars +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,6 +113,13 @@ const configuration = {
|
|
|
113
113
|
{
|
|
114
114
|
id: '11',
|
|
115
115
|
name: 'Folder from integratio2'
|
|
116
|
+
customContent: `<div style='color: red;'>Custom Folder name</div>`,
|
|
117
|
+
parentId: '1'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: '1',
|
|
121
|
+
name: 'Branch from integratio',
|
|
122
|
+
nodeType: '2'
|
|
116
123
|
},
|
|
117
124
|
];
|
|
118
125
|
},
|
package/out/models/index.d.ts
CHANGED
|
@@ -231,6 +231,10 @@ export interface ConfigurationField {
|
|
|
231
231
|
* only for select
|
|
232
232
|
*/
|
|
233
233
|
isMulti?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* only for select
|
|
236
|
+
*/
|
|
237
|
+
isSearchable?: boolean;
|
|
234
238
|
/**
|
|
235
239
|
* only for select
|
|
236
240
|
*/
|
|
@@ -363,6 +367,10 @@ export interface FormField {
|
|
|
363
367
|
* only for select
|
|
364
368
|
*/
|
|
365
369
|
isMulti?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* only for select
|
|
372
|
+
*/
|
|
373
|
+
isSearchable?: boolean;
|
|
366
374
|
/**
|
|
367
375
|
* only for select
|
|
368
376
|
*/
|
|
@@ -377,11 +385,15 @@ export interface File {
|
|
|
377
385
|
name: string;
|
|
378
386
|
type: SourceFilesModel.FileType;
|
|
379
387
|
parentId?: string;
|
|
388
|
+
nodeType?: string;
|
|
389
|
+
customContent?: string;
|
|
380
390
|
}
|
|
381
391
|
export interface Folder {
|
|
382
392
|
id: string;
|
|
383
393
|
name: string;
|
|
384
394
|
parentId?: string;
|
|
395
|
+
nodeType?: string;
|
|
396
|
+
customContent?: string;
|
|
385
397
|
}
|
|
386
398
|
export interface IntegrationRequest extends CrowdinClientRequest {
|
|
387
399
|
integrationCredentials: any;
|
package/out/storage/mysql.js
CHANGED
|
@@ -233,7 +233,7 @@ class MySQLStorage {
|
|
|
233
233
|
updateMetadata(id, metadata) {
|
|
234
234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
235
235
|
yield this.dbPromise;
|
|
236
|
-
yield this.executeQuery(connection => connection.execute('UPDATE app_metadata SET data = ? WHERE id = ?', [
|
|
236
|
+
yield this.executeQuery(connection => connection.execute('UPDATE app_metadata SET data = ? WHERE id = ?', [JSON.stringify(metadata), id]));
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
getMetadata(id) {
|
package/out/storage/postgre.js
CHANGED
|
@@ -229,7 +229,7 @@ class PostgreStorage {
|
|
|
229
229
|
updateMetadata(id, metadata) {
|
|
230
230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
231
|
yield this.dbPromise;
|
|
232
|
-
yield this.executeQuery(client => client.query('UPDATE app_metadata SET data = $1 WHERE id = $2', [
|
|
232
|
+
yield this.executeQuery(client => client.query('UPDATE app_metadata SET data = $1 WHERE id = $2', [JSON.stringify(metadata), id]));
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
getMetadata(id) {
|
package/out/util/defaults.js
CHANGED
|
@@ -140,6 +140,9 @@ function applyDefaults(config, integration) {
|
|
|
140
140
|
},
|
|
141
141
|
],
|
|
142
142
|
},
|
|
143
|
+
{
|
|
144
|
+
label: "To avoid downloading partially translated files, we recommend enabling the 'Skip untranslated files' option in your Crowdin project.",
|
|
145
|
+
},
|
|
143
146
|
...fields,
|
|
144
147
|
];
|
|
145
148
|
});
|
|
@@ -93,6 +93,9 @@
|
|
|
93
93
|
is-multi
|
|
94
94
|
close-on-select="false"
|
|
95
95
|
{{/if}}
|
|
96
|
+
{{#if isSearchable}}
|
|
97
|
+
is-searchable
|
|
98
|
+
{{/if}}
|
|
96
99
|
id="{{key}}-settings"
|
|
97
100
|
key="{{key}}"
|
|
98
101
|
label="{{label}}"
|
|
@@ -186,12 +189,13 @@
|
|
|
186
189
|
parent_id: e.parentId ? e.parentId : '0',
|
|
187
190
|
name: e.name,
|
|
188
191
|
id: e.id,
|
|
192
|
+
customContent: e.customContent,
|
|
189
193
|
};
|
|
190
194
|
if (e.type) {
|
|
191
195
|
item.type = e.type;
|
|
192
196
|
item.node_type = fileType;
|
|
193
197
|
} else {
|
|
194
|
-
item.node_type = folderType;
|
|
198
|
+
item.node_type = e.nodeType || folderType;
|
|
195
199
|
}
|
|
196
200
|
return item;
|
|
197
201
|
});
|
|
@@ -223,12 +227,13 @@
|
|
|
223
227
|
parent_id: e.parentId ? e.parentId : '0',
|
|
224
228
|
name: e.name,
|
|
225
229
|
id: e.id,
|
|
230
|
+
customContent: e.customContent,
|
|
226
231
|
};
|
|
227
232
|
if (e.type) {
|
|
228
233
|
item.type = e.type;
|
|
229
234
|
item.node_type = fileType;
|
|
230
235
|
} else {
|
|
231
|
-
item.node_type = folderType;
|
|
236
|
+
item.node_type = e.nodeType || folderType;
|
|
232
237
|
}
|
|
233
238
|
return item;
|
|
234
239
|
});
|
package/package.json
CHANGED