jamespot-react-core 1.3.6 → 1.3.8

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.
Files changed (50) hide show
  1. package/build/346.5e80d1d74f0d543bfa32.chunk.js +2 -0
  2. package/build/346.5e80d1d74f0d543bfa32.chunk.js.map +1 -0
  3. package/build/605.e14ede6ac53f82a861c7.chunk.js +707 -0
  4. package/build/605.e14ede6ac53f82a861c7.chunk.js.map +1 -0
  5. package/build/app.bundle.js +879 -879
  6. package/build/app.bundle.js.LICENSE.txt +92 -1
  7. package/build/app.bundle.js.map +1 -1
  8. package/build/script/checkDependencies.d.ts +1 -0
  9. package/build/socket.sharedworker.6e975754295fd9584be6.js.map +1 -1
  10. package/build/src/App.d.ts +33 -5
  11. package/build/src/hooks/useAI.d.ts +1 -1
  12. package/build/src/redux/middleware/index.d.ts +0 -1
  13. package/build/src/redux/middleware/logger.d.ts +1 -1
  14. package/build/src/redux/slice/Article.slice.d.ts +21 -21
  15. package/build/src/redux/slice/User.slice.d.ts +21 -21
  16. package/build/src/redux/store.d.ts +191 -531
  17. package/externals.json +13 -2
  18. package/package.json +26 -28
  19. package/README.internal.md +0 -20
  20. package/build/534.606ae244f89e01f0c5fa.chunk.js +0 -2
  21. package/build/534.606ae244f89e01f0c5fa.chunk.js.map +0 -1
  22. package/build/605.2ea491387427c666537a.chunk.js +0 -707
  23. package/build/605.2ea491387427c666537a.chunk.js.map +0 -1
  24. package/build/assets/404.6ddcf23842aa398fdb2521ed61e26426.png +0 -0
  25. package/build/assets/ai.0bd1828cb6ec10ad92d900c710079cac.png +0 -0
  26. package/build/assets/check.e04c3374d2c43bd03d5c52b37639d90c.svg +0 -4
  27. package/build/assets/default.2ca3180f8cdd6f14c4184439f06173cb.png +0 -0
  28. package/build/assets/docx.d99aeeb833c328dc360bb2dc1d99126f.png +0 -0
  29. package/build/assets/gif.605d1d151a01356b376d5c4ac2f40d19.png +0 -0
  30. package/build/assets/group-background.daf782321c7f65cde0fc3d5918d27762.png +0 -0
  31. package/build/assets/jamespot-2025-216.d681af07a093035b056f3a3589dfb6f8.png +0 -0
  32. package/build/assets/jamespot-blue-2025-216.cbe9350502876bd1e0495637f73b0ce6.png +0 -0
  33. package/build/assets/mp3.c4f6cf8e048c8d1fd70ea5676f9e35bb.png +0 -0
  34. package/build/assets/mp4.c631e40ab77a5009bec629505396f88b.png +0 -0
  35. package/build/assets/pdf.25c19fbb11dacc87994bdce830d7e5ed.png +0 -0
  36. package/build/assets/pptx.fc266e95afba9abd862da4d909e1ad68.png +0 -0
  37. package/build/assets/psd.cca4c1ac52e6e24770486bf5bc6d6ff9.png +0 -0
  38. package/build/assets/svg.21a77099744d94b9214c52043ef39d95.png +0 -0
  39. package/build/assets/ttf.28668a6c059779e01fe7dc66dd70ef40.png +0 -0
  40. package/build/assets/txt.d0b32e515641b99e8e31165279361eb4.png +0 -0
  41. package/build/assets/x.609ccec1e6c6c10c412a1ab325258b42.svg +0 -1
  42. package/build/assets/xlsx.a3b00a8cd84f504b94d1cfc617b4080f.png +0 -0
  43. package/build/assets/zip.b8f8ab347fc92f763a2d44617a82b66e.png +0 -0
  44. package/build/jest.config.d.ts +0 -3
  45. package/build/jest.setup.d.ts +0 -1
  46. package/jest.config.ts +0 -17
  47. package/jest.setup.ts +0 -1
  48. package/script/checkDependencies.js +0 -48
  49. package/script/traduction-react.php +0 -95
  50. package/styled-components.d.ts +0 -6
@@ -1,4 +0,0 @@
1
- <svg width="12" height="9" viewBox="0 0 12 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M1 3.7648L4.45955 7.3191L11 1" stroke="#1ED492" stroke-width="1.5"/>
3
- <path d="M1 3.7648L4.45955 7.3191L11 1" stroke="black" stroke-opacity="0.1" stroke-width="1.5"/>
4
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#FF2653" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
@@ -1,3 +0,0 @@
1
- import type { Config } from 'jest';
2
- declare const config: Config;
3
- export default config;
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom';
package/jest.config.ts DELETED
@@ -1,17 +0,0 @@
1
- import type { Config } from 'jest';
2
-
3
- const config: Config = {
4
- preset: 'ts-jest',
5
- testEnvironment: 'jsdom',
6
- roots: ['<rootDir>'],
7
- testMatch: ['**/*.test.ts', '**/*.test.tsx'],
8
- transform: {
9
- '^.+\\.tsx?$': ['ts-jest', { disableSourceMapSupport: true }],
10
- },
11
- setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
12
- moduleDirectories: ['src', 'node_modules'],
13
- cacheDirectory: './node_modules/.cache/jest',
14
- collectCoverage: true,
15
- };
16
-
17
- export default config;
package/jest.setup.ts DELETED
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom';
@@ -1,48 +0,0 @@
1
- /* eslint-disable no-undef */
2
- /* eslint-disable no-console */
3
- /* eslint-disable @typescript-eslint/no-var-requires */
4
- const fs = require('fs');
5
-
6
- const fileJson = (path) => {
7
- if (!fs.existsSync(path)) {
8
- console.log('Path not found', path);
9
- return;
10
- }
11
- let json = fs.readFileSync(path);
12
- return JSON.parse(json);
13
- };
14
-
15
- const checkDependencies = (dependencies, package) => {
16
- checkDependenciesList(dependencies, package.devDependencies ? package.devDependencies : {});
17
- checkDependenciesList(dependencies, package.dependencies ? package.dependencies : {});
18
- };
19
-
20
- const checkDependenciesList = (dependencies, list) => {
21
- Object.keys(list).forEach((k) => {
22
- if (!dependencies[k] || !Array.isArray(dependencies[k])) {
23
- dependencies[k] = [];
24
- }
25
-
26
- const version = list[k].replace(/\^/g, '').replace(/file:/g, '');
27
- if (dependencies[k].indexOf(version) === -1) {
28
- dependencies[k].push(version);
29
- }
30
- });
31
- };
32
-
33
- const userApiPackage = fileJson('../../jamespot-user-api/package.json');
34
- const componentPackage = fileJson('../../jamespot-react-components/package.json');
35
- const frontBusinessPackage = fileJson('../../jamespot-front-business/package.json');
36
- const corePackage = fileJson('../package.json');
37
- const extensionPackage = fileJson('../../jamespot-react-extensions/package.json');
38
-
39
- let dependencies = {};
40
-
41
- checkDependencies(dependencies, userApiPackage);
42
- checkDependencies(dependencies, componentPackage);
43
- checkDependencies(dependencies, frontBusinessPackage);
44
- checkDependencies(dependencies, corePackage);
45
- checkDependencies(dependencies, extensionPackage);
46
-
47
- console.log('MISMATCH VERSION');
48
- console.log(Object.entries(dependencies).filter(([dependency]) => dependencies[dependency].length > 1));
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This script is intended to inject the jameslation translations in the lang.json files of
5
- * the jamespot-react-components and all the extensions of the jamespot-react-extensions projects
6
- * for all languages based on the default english values
7
- */
8
- class Translator
9
- {
10
-
11
- const JAMESPOT_RESOURCE_PATH = "../../jamespot-pro/jpro/lang/%s.i.php";
12
- const EXTENSION_RESOURCE_PATH = "../../jamespot-react-extensions/src/extensions/*/translation/lang.json";
13
- const EXTENSION_RESOURCE_PATH_SUB = "../../jamespot-react-extensions/src/extensions/*/*/translation/lang.json";
14
- const COMPONENT_RESOURCE_PATH = "../../jamespot-react-components/src/translation/lang.json";
15
- const CORE_RESOURCE_PATH = "../../jamespot-react-core/src/translation/lang.json";
16
-
17
- const LANGUAGES = ['en', 'fr', 'es', 'fl', 'nl', 'de', 'it', 'pl', 'pt', 'ro', 'tr'];
18
-
19
- public $traductionKeys = [];
20
- public $traductionKeysTmp = [];
21
-
22
- // Load all traduction keys in $traductionKeys
23
- function loadJameslationResources()
24
- {
25
- echo "\nLoading resources";
26
- foreach (self::LANGUAGES as $language) {
27
- $this->traductionKeysTmp = [];
28
- require(sprintf(self::JAMESPOT_RESOURCE_PATH, $language));
29
- $this->traductionKeys[$language] = $this->traductionKeysTmp;
30
- }
31
- echo "\nDONE";
32
- }
33
-
34
- function translateReactResources()
35
- {
36
- $this->translateResource(self::COMPONENT_RESOURCE_PATH);
37
- $this->translateResource(self::CORE_RESOURCE_PATH);
38
- $error = false;
39
- foreach ([self::EXTENSION_RESOURCE_PATH, self::EXTENSION_RESOURCE_PATH_SUB] as $path) {
40
- foreach (glob($path) as $file) {
41
- $res = $this->translateResource($file);
42
- $error = $res ? true : $error;
43
- }
44
- }
45
- if ($error) {
46
- exit(2);
47
- }
48
- }
49
-
50
- function translateResource($file)
51
- {
52
- $error = false;
53
- $json = json_decode(file_get_contents($file), false);
54
- $resourcesEN = array_keys((array)$json->en);
55
- $outputAllTranslations = [];
56
- foreach (self::LANGUAGES as $language) {
57
- // echo "\n- translating file $file for language $language";
58
- $output = [];
59
- $this->traductionKeysTmp = $this->traductionKeys[$language];
60
- /*
61
- * For each key:
62
- * - either take it from jameslation in the language
63
- * - either take it from jameslation in english
64
- * - or from the default extension english value
65
- */
66
- foreach ($resourcesEN as $key) {
67
- if (array_key_exists($key, $this->traductionKeysTmp)) {
68
- $output[$key] = $this->traductionKeysTmp[$key];
69
- continue;
70
- } else if (array_key_exists($key, $this->traductionKeys["en"])) {
71
- $output[$key] = $this->traductionKeys["en"][$key];
72
- continue;
73
- }
74
- if ($language === 'en') {
75
- echo "\nKey not found: $key";
76
- $error = true;
77
- }
78
- }
79
- $outputAllTranslations[$language] = $output;
80
- }
81
- file_put_contents($file, json_encode($outputAllTranslations, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
82
- return $error;
83
- }
84
- }
85
-
86
- $translator = new Translator();
87
- $translator->loadJameslationResources();
88
- $translator->translateReactResources();
89
-
90
- // override addTrans method called in every jameslation language files
91
- function addTrans($key, $value)
92
- {
93
- global $translator;
94
- $translator->traductionKeysTmp[$key] = $value;
95
- }
@@ -1,6 +0,0 @@
1
- import 'styled-components';
2
- import { ThemeType } from 'jamespot-react-components';
3
-
4
- declare module 'styled-components' {
5
- export interface DefaultTheme extends ThemeType {}
6
- }