jamespot-front-business 1.3.11 → 1.3.13

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.
@@ -1,17 +1,10 @@
1
1
  import { ApiWrapper, PagingResults } from 'jamespot-user-api';
2
2
  export declare const fetchFiles: import('@reduxjs/toolkit').AsyncThunk<ApiWrapper<PagingResults<{
3
3
  type: string;
4
- uri: string;
5
4
  id: number;
6
5
  mainType: string;
6
+ uri: string;
7
7
  title: string;
8
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
9
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
10
- dateCreation: string;
11
- dateModified: string;
12
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
13
- };
14
- _right: import('jamespot-user-api').Rights;
15
8
  mimetype: string;
16
9
  _extend: {
17
10
  dateCreation: string;
@@ -24,6 +17,13 @@ export declare const fetchFiles: import('@reduxjs/toolkit').AsyncThunk<ApiWrappe
24
17
  parentFiles: number[];
25
18
  generalAccessHash?: string | undefined;
26
19
  };
20
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
21
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
22
+ dateCreation: string;
23
+ dateModified: string;
24
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
25
+ };
26
+ _right: import('jamespot-user-api').Rights;
27
27
  _audience: import('jamespot-user-api').jObjectLittle[];
28
28
  dateCreation?: string | undefined | undefined;
29
29
  dateModified?: string | null | undefined | undefined;
@@ -45,17 +45,10 @@ export declare const fetchFiles: import('@reduxjs/toolkit').AsyncThunk<ApiWrappe
45
45
  }>;
46
46
  export declare const fetchRecentFiles: import('@reduxjs/toolkit').AsyncThunk<ApiWrapper<PagingResults<{
47
47
  type: string;
48
- uri: string;
49
48
  id: number;
50
49
  mainType: string;
50
+ uri: string;
51
51
  title: string;
52
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
53
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
54
- dateCreation: string;
55
- dateModified: string;
56
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
57
- };
58
- _right: import('jamespot-user-api').Rights;
59
52
  mimetype: string;
60
53
  _extend: {
61
54
  dateCreation: string;
@@ -68,6 +61,13 @@ export declare const fetchRecentFiles: import('@reduxjs/toolkit').AsyncThunk<Api
68
61
  parentFiles: number[];
69
62
  generalAccessHash?: string | undefined;
70
63
  };
64
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
65
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
66
+ dateCreation: string;
67
+ dateModified: string;
68
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
69
+ };
70
+ _right: import('jamespot-user-api').Rights;
71
71
  _audience: import('jamespot-user-api').jObjectLittle[];
72
72
  dateCreation?: string | undefined | undefined;
73
73
  dateModified?: string | null | undefined | undefined;
@@ -9,17 +9,10 @@ export declare const WedocApp: {
9
9
  getFiles: (state: RootState) => {
10
10
  entities: {
11
11
  type: string;
12
- uri: string;
13
12
  id: number;
14
13
  mainType: string;
14
+ uri: string;
15
15
  title: string;
16
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
17
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
18
- dateCreation: string;
19
- dateModified: string;
20
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
21
- };
22
- _right: import('jamespot-user-api').Rights;
23
16
  mimetype: string;
24
17
  _extend: {
25
18
  dateCreation: string;
@@ -32,6 +25,13 @@ export declare const WedocApp: {
32
25
  parentFiles: number[];
33
26
  generalAccessHash?: string | undefined;
34
27
  };
28
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
29
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
30
+ dateCreation: string;
31
+ dateModified: string;
32
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
33
+ };
34
+ _right: import('jamespot-user-api').Rights;
35
35
  _audience: import('jamespot-user-api').jObjectLittle[];
36
36
  dateCreation?: string | undefined | undefined;
37
37
  dateModified?: string | null | undefined | undefined;
@@ -45,17 +45,10 @@ export declare const WedocApp: {
45
45
  getRecent: (state: RootState) => {
46
46
  entities: {
47
47
  type: string;
48
- uri: string;
49
48
  id: number;
50
49
  mainType: string;
50
+ uri: string;
51
51
  title: string;
52
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
53
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
54
- dateCreation: string;
55
- dateModified: string;
56
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
57
- };
58
- _right: import('jamespot-user-api').Rights;
59
52
  mimetype: string;
60
53
  _extend: {
61
54
  dateCreation: string;
@@ -68,6 +61,13 @@ export declare const WedocApp: {
68
61
  parentFiles: number[];
69
62
  generalAccessHash?: string | undefined;
70
63
  };
64
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
65
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
66
+ dateCreation: string;
67
+ dateModified: string;
68
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
69
+ };
70
+ _right: import('jamespot-user-api').Rights;
71
71
  _audience: import('jamespot-user-api').jObjectLittle[];
72
72
  dateCreation?: string | undefined | undefined;
73
73
  dateModified?: string | null | undefined | undefined;
@@ -79,17 +79,10 @@ export declare const WedocApp: {
79
79
  actions: {
80
80
  fetchFiles: import('@reduxjs/toolkit').AsyncThunk<import('jamespot-user-api').ApiWrapper<import('jamespot-user-api').PagingResults<{
81
81
  type: string;
82
- uri: string;
83
82
  id: number;
84
83
  mainType: string;
84
+ uri: string;
85
85
  title: string;
86
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
87
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
88
- dateCreation: string;
89
- dateModified: string;
90
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
91
- };
92
- _right: import('jamespot-user-api').Rights;
93
86
  mimetype: string;
94
87
  _extend: {
95
88
  dateCreation: string;
@@ -102,6 +95,13 @@ export declare const WedocApp: {
102
95
  parentFiles: number[];
103
96
  generalAccessHash?: string | undefined;
104
97
  };
98
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
99
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
100
+ dateCreation: string;
101
+ dateModified: string;
102
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
103
+ };
104
+ _right: import('jamespot-user-api').Rights;
105
105
  _audience: import('jamespot-user-api').jObjectLittle[];
106
106
  dateCreation?: string | undefined | undefined;
107
107
  dateModified?: string | null | undefined | undefined;
@@ -123,17 +123,10 @@ export declare const WedocApp: {
123
123
  }>;
124
124
  fetchRecentFiles: import('@reduxjs/toolkit').AsyncThunk<import('jamespot-user-api').ApiWrapper<import('jamespot-user-api').PagingResults<{
125
125
  type: string;
126
- uri: string;
127
126
  id: number;
128
127
  mainType: string;
128
+ uri: string;
129
129
  title: string;
130
- _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
131
- level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
132
- dateCreation: string;
133
- dateModified: string;
134
- variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
135
- };
136
- _right: import('jamespot-user-api').Rights;
137
130
  mimetype: string;
138
131
  _extend: {
139
132
  dateCreation: string;
@@ -146,6 +139,13 @@ export declare const WedocApp: {
146
139
  parentFiles: number[];
147
140
  generalAccessHash?: string | undefined;
148
141
  };
142
+ _user: Omit<import('jamespot-user-api').jObjectLittle, "dateCreation" | "dateModified" | "level" | "variant"> & {
143
+ level: typeof import('jamespot-user-api').UserLevel[keyof typeof import('jamespot-user-api').UserLevel];
144
+ dateCreation: string;
145
+ dateModified: string;
146
+ variant?: typeof import('jamespot-user-api').UserVariant[keyof typeof import('jamespot-user-api').UserVariant] | undefined;
147
+ };
148
+ _right: import('jamespot-user-api').Rights;
149
149
  _audience: import('jamespot-user-api').jObjectLittle[];
150
150
  dateCreation?: string | undefined | undefined;
151
151
  dateModified?: string | null | undefined | undefined;
@@ -108,7 +108,7 @@ export declare const Widget: {
108
108
  setAllWidgetStates: (state: import('@reduxjs/toolkit').WritableDraft<import('jamespot-user-api').WidgetsState>, action: import('@reduxjs/toolkit').PayloadAction<import('jamespot-user-api').WidgetStateProps>) => void;
109
109
  registerModal: (state: import('@reduxjs/toolkit').WritableDraft<import('jamespot-user-api').WidgetsState>, action: import('@reduxjs/toolkit').PayloadAction<{
110
110
  title?: string;
111
- view?: React.ReactNode;
111
+ view?: import('react').ReactNode;
112
112
  }>) => void;
113
113
  flushModal: (state: import('@reduxjs/toolkit').WritableDraft<import('jamespot-user-api').WidgetsState>) => void;
114
114
  }, "widgets", "widgets", import('@reduxjs/toolkit').SliceSelectors<import('jamespot-user-api').WidgetsState>>;
@@ -1,8 +1,9 @@
1
1
  import { PayloadAction } from '@reduxjs/toolkit';
2
2
  import { CombinedWidgetContent, jObjectLittle, jUserLittle, Rights, WidgetContext, WidgetFunctions, WidgetsState, WidgetStateProps, WidgetVector, WidgetWrapperLevel, WidgetWrapperProps } from 'jamespot-user-api';
3
+ import { ReactNode } from 'react';
3
4
  type WidgetModalProps = {
4
5
  title?: string;
5
- view?: React.ReactNode;
6
+ view?: ReactNode;
6
7
  };
7
8
  export declare const widgetsSlice: import('@reduxjs/toolkit').Slice<WidgetsState, {
8
9
  registerWidget: (state: import('@reduxjs/toolkit').WritableDraft<WidgetsState>, action: PayloadAction<{
@@ -1,11 +1,12 @@
1
1
  import { CombinedWidgetContent, WidgetDisplayMode, WidgetKeys } from 'jamespot-user-api';
2
+ import { ReactNode } from 'react';
2
3
  export type EditorProps = {
3
4
  uniqid: string;
4
5
  name: WidgetKeys;
5
6
  position: 'left' | 'right';
6
7
  mode: WidgetDisplayMode;
7
8
  popup?: boolean;
8
- view?: React.ReactNode;
9
+ view?: ReactNode;
9
10
  onSave?: <T = CombinedWidgetContent>(content: Partial<T>) => void;
10
11
  };
11
12
  export type EditorsState = {
@@ -1,9 +1,9 @@
1
1
  import { jObjectLittle, jTaxonomyLittle } from 'jamespot-user-api';
2
- declare const AUDIENCE: {
3
- readonly ALL: "1";
4
- readonly CUSTOM: "0";
2
+ type AUDIENCE = {
3
+ ALL: '1';
4
+ CUSTOM: '0';
5
5
  };
6
- type StudioAudienceType = typeof AUDIENCE.ALL | typeof AUDIENCE.CUSTOM;
6
+ type StudioAudienceType = AUDIENCE['ALL'] | AUDIENCE['CUSTOM'];
7
7
  export interface Application {
8
8
  idApp: string;
9
9
  isInWork?: boolean;
package/jest.config.ts ADDED
@@ -0,0 +1,26 @@
1
+ import type { Config } from 'jest';
2
+
3
+ const config: Config = {
4
+ preset: 'ts-jest',
5
+ roots: ['<rootDir>/src'],
6
+ testEnvironment: 'jsdom',
7
+ testMatch: ['**/src/**/*.test.ts'],
8
+ transform: {
9
+ '^.+\\.ts$': ['ts-jest', { useESM: true, disableSourceMapSupport: true }],
10
+ },
11
+ moduleNameMapper: {
12
+ '^jamespot-user-api$': '<rootDir>/node_modules/jamespot-user-api/dist/jamespot-user-api.cjs',
13
+ },
14
+ cacheDirectory: './node_modules/.cache/jest',
15
+ collectCoverage: true,
16
+ collectCoverageFrom: ['src/**/*.ts'],
17
+ coverageThreshold: {
18
+ global: {
19
+ statements: 100,
20
+ functions: 100,
21
+ },
22
+ },
23
+ coveragePathIgnorePatterns: ['appToXml.ts', 'migrateJson.ts', 'testsUtils.ts'],
24
+ };
25
+
26
+ export default config;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "jamespot-front-business",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "typescript utils",
5
5
  "main": "dist/jamespot-front-business.js",
6
6
  "module": "dist/jamespot-front-business.mjs",
7
7
  "types": "dist/index.d.ts",
8
+ "type": "module",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "git+ssh://git@github.com/Jamespot/jamespot-front-business.git"
@@ -18,33 +19,35 @@
18
19
  "author": "Jamespot",
19
20
  "peerDependencies": {
20
21
  "@reduxjs/toolkit": "^2.10.1",
22
+ "@types/react": "^19.2.6",
21
23
  "jamespot-user-api": "*",
22
- "react": "^18.3.1",
24
+ "react": "^19.2.0",
23
25
  "react-intl": "^7.1.14",
24
- "react-redux": "^8.1.3"
26
+ "react-redux": "^9.2.0"
25
27
  },
26
28
  "devDependencies": {
29
+ "@eslint/js": "^9.39.1",
27
30
  "@reduxjs/toolkit": "^2.10.1",
28
31
  "@types/jest": "^30.0.0",
29
- "@types/react": "^18.3.27",
32
+ "@types/react": "^19.2.6",
30
33
  "@types/uuid": "^10.0.0",
31
- "@typescript-eslint/eslint-plugin": "^5.62.0",
32
- "@typescript-eslint/parser": "^5.62.0",
33
34
  "@vitejs/plugin-react": "^5.1.1",
34
- "eslint": "^8.57.1",
35
- "eslint-config-prettier": "^8.10.2",
35
+ "eslint": "^9.39.1",
36
+ "eslint-config-prettier": "^10.1.8",
36
37
  "eslint-import-resolver-typescript": "^4.4.4",
37
38
  "eslint-plugin-import": "^2.32.0",
38
- "jamespot-user-api": "^1.3.11",
39
+ "globals": "^16.5.0",
40
+ "jamespot-user-api": "^1.3.13",
39
41
  "jest": "^30.2.0",
40
42
  "jest-environment-jsdom": "^30.2.0",
41
- "knip": "^5.69.1",
43
+ "knip": "^5.70.0",
42
44
  "prettier": "^3.6.2",
43
- "react": "^18.3.1",
45
+ "react": "^19.2.0",
44
46
  "react-intl": "^7.1.14",
45
- "react-redux": "^8.1.3",
47
+ "react-redux": "^9.2.0",
46
48
  "ts-jest": "^29.4.5",
47
49
  "typescript": "^5.9.3",
50
+ "typescript-eslint": "^8.47.0",
48
51
  "uuid": "^10.0.0",
49
52
  "vite": "^7.2.2",
50
53
  "vite-plugin-dts": "^4.5.4"
@@ -56,7 +59,7 @@
56
59
  "scripts": {
57
60
  "build": "vite build",
58
61
  "format": "prettier --write --plugin-search-dir=. .",
59
- "lint": "eslint --ignore-path .gitignore .",
62
+ "lint": "eslint",
60
63
  "test": "jest --runInBand",
61
64
  "test:one": "jest --coverage=0 --runInBand",
62
65
  "test:clearJest": "jest --clearCache"