@crowdin/app-project-module 0.75.0 → 0.76.1

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/out/types.d.ts CHANGED
@@ -456,6 +456,6 @@ export interface SignaturePatterns {
456
456
  export declare enum storageFiles {
457
457
  SQLITE = "app.sqlite",
458
458
  SQLITE_BACKUP = "backup_app.sqlite",
459
- DUMP_CHUNK = "dump_chunk_%d.sql"
459
+ DUMP = "dump_table_%s.sql"
460
460
  }
461
461
  export {};
package/out/types.js CHANGED
@@ -70,5 +70,5 @@ var storageFiles;
70
70
  (function (storageFiles) {
71
71
  storageFiles["SQLITE"] = "app.sqlite";
72
72
  storageFiles["SQLITE_BACKUP"] = "backup_app.sqlite";
73
- storageFiles["DUMP_CHUNK"] = "dump_chunk_%d.sql";
73
+ storageFiles["DUMP"] = "dump_table_%s.sql";
74
74
  })(storageFiles = exports.storageFiles || (exports.storageFiles = {}));
@@ -15,3 +15,7 @@ export declare function getPreviousDate(days: number): Date;
15
15
  export declare function prepareFormDataMetadataId(req: CrowdinClientRequest, config: Config): Promise<string>;
16
16
  export declare function validateEmail(email: string | number): boolean;
17
17
  export declare function isApiRequest(req: Request, config: Config): boolean;
18
+ export declare function getFormattedDate({ date, userTimezone }: {
19
+ date: Date | number;
20
+ userTimezone: string | undefined;
21
+ }): string;
package/out/util/index.js CHANGED
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.isApiRequest = exports.validateEmail = exports.prepareFormDataMetadataId = exports.getPreviousDate = exports.isJson = exports.isAuthorizedConfig = exports.getLogoUrl = exports.executeWithRetry = exports.decryptData = exports.encryptData = exports.runAsyncWrapper = exports.CodeError = void 0;
35
+ exports.getFormattedDate = exports.isApiRequest = exports.validateEmail = exports.prepareFormDataMetadataId = exports.getPreviousDate = exports.isJson = exports.isAuthorizedConfig = exports.getLogoUrl = exports.executeWithRetry = exports.decryptData = exports.encryptData = exports.runAsyncWrapper = exports.CodeError = void 0;
36
36
  const crypto = __importStar(require("crypto-js"));
37
37
  const storage_1 = require("../storage");
38
38
  const types_1 = require("../types");
@@ -167,3 +167,19 @@ function isApiRequest(req, config) {
167
167
  return !origin || !origin.includes(config.baseUrl);
168
168
  }
169
169
  exports.isApiRequest = isApiRequest;
170
+ // Format the date as 'MMM DD, YYYY HH:mm'
171
+ function getFormattedDate({ date, userTimezone }) {
172
+ if (!userTimezone) {
173
+ userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
174
+ }
175
+ return new Intl.DateTimeFormat('en-US', {
176
+ year: 'numeric',
177
+ month: 'short',
178
+ day: 'numeric',
179
+ hour: '2-digit',
180
+ minute: '2-digit',
181
+ hour12: false,
182
+ timeZone: userTimezone,
183
+ }).format(date);
184
+ }
185
+ exports.getFormattedDate = getFormattedDate;
@@ -296,20 +296,20 @@
296
296
  {{/ifeq}}
297
297
  {{#ifeq type "text"}}
298
298
  <crowdin-input
299
- id="{{key}}-settings"
300
- label="{{label}}"
301
- key="{{key}}"
302
- with-fixed-height
303
- {{#if helpText}}
304
- help-text="{{helpText}}"
305
- {{/if}}
306
- {{#if helpTextHtml}}
307
- help-text-html="{{helpTextHtml}}"
308
- {{/if}}
309
- {{#if dependencySettings}}
310
- data-dependency="{{dependencySettings}}"
311
- {{/if}}
312
- value="{{#if defaultValue}}{{defaultValue}}{{/if}}"
299
+ id="{{key}}-settings"
300
+ label="{{label}}"
301
+ key="{{key}}"
302
+ with-fixed-height
303
+ {{#if helpText}}
304
+ help-text="{{helpText}}"
305
+ {{/if}}
306
+ {{#if helpTextHtml}}
307
+ help-text-html="{{helpTextHtml}}"
308
+ {{/if}}
309
+ {{#if dependencySettings}}
310
+ data-dependency="{{dependencySettings}}"
311
+ {{/if}}
312
+ value="{{#if defaultValue}}{{defaultValue}}{{/if}}"
313
313
  >
314
314
  </crowdin-input>
315
315
  {{/ifeq}}
@@ -350,21 +350,21 @@
350
350
  {{/ifeq}}
351
351
  {{else}}
352
352
  {{#if labelHtml}}
353
- <crowdin-p
354
- {{#if dependencySettings}}
355
- data-dependency="{{dependencySettings}}"
356
- {{/if}}
357
- >
358
- {{{labelHtml}}}
359
- </crowdin-p>
353
+ <crowdin-p
354
+ {{#if dependencySettings}}
355
+ data-dependency="{{dependencySettings}}"
356
+ {{/if}}
357
+ >
358
+ {{{labelHtml}}}
359
+ </crowdin-p>
360
360
  {{else}}
361
- <crowdin-p
362
- {{#if dependencySettings}}
363
- data-dependency="{{dependencySettings}}"
364
- {{/if}}
365
- >
366
- {{label}}
367
- </crowdin-p>
361
+ <crowdin-p
362
+ {{#if dependencySettings}}
363
+ data-dependency="{{dependencySettings}}"
364
+ {{/if}}
365
+ >
366
+ {{label}}
367
+ </crowdin-p>
368
368
  {{/if}}
369
369
  {{/if}}
370
370
  <div
@@ -391,19 +391,19 @@
391
391
  body-overflow-unset
392
392
  >
393
393
  <crowdin-checkbox
394
- id="selected-files"
395
- name="selected-files"
396
- label="Selected files"
397
- class="hydrated"
398
- onchange="onChangeAutoSynchronizationOptions(this)"
394
+ id="selected-files"
395
+ name="selected-files"
396
+ label="Selected files"
397
+ class="hydrated"
398
+ onchange="onChangeAutoSynchronizationOptions(this)"
399
399
  >
400
400
  </crowdin-checkbox>
401
401
  <crowdin-checkbox
402
- id="new-files"
403
- name="new-files"
404
- label="New files"
405
- class="hydrated"
406
- onchange="onChangeAutoSynchronizationOptions(this)"
402
+ id="new-files"
403
+ name="new-files"
404
+ label="New files"
405
+ class="hydrated"
406
+ onchange="onChangeAutoSynchronizationOptions(this)"
407
407
  >
408
408
  </crowdin-checkbox>
409
409
  <div slot="footer">
@@ -510,6 +510,7 @@
510
510
  if (e.type) {
511
511
  item.type = e.type;
512
512
  item.node_type = fileType;
513
+ item.failed = e.failed;
513
514
  } else {
514
515
  item.node_type = e.nodeType || folderType;
515
516
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.75.0",
3
+ "version": "0.76.1",
4
4
  "description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -43,14 +43,14 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@babel/preset-react": "^7.24.7",
46
- "@emotion/react": "^11.13.5",
47
- "@emotion/styled": "^11.11.5",
48
- "@mui/icons-material": "^5.16.13",
49
- "@mui/material": "^5.16.13",
50
- "@rjsf/core": "^5.23.2",
51
- "@rjsf/mui": "^5.23.2",
46
+ "@emotion/react": "^11.14.0",
47
+ "@emotion/styled": "^11.14.0",
48
+ "@mui/icons-material": "^5.16.14",
49
+ "@mui/material": "^5.16.14",
50
+ "@rjsf/core": "^5.24.2",
51
+ "@rjsf/mui": "^5.24.2",
52
52
  "@rjsf/utils": "^5.23.2",
53
- "@rjsf/validator-ajv8": "^5.23.2",
53
+ "@rjsf/validator-ajv8": "^5.24.2",
54
54
  "@rollup/plugin-babel": "^6.0.4",
55
55
  "@rollup/plugin-commonjs": "^24.1.0",
56
56
  "@rollup/plugin-json": "^6.1.0",