@mistertemp/libs-front-shared 2.0.0 → 3.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.0](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@2.1.0...@mistertemp/libs-front-shared@3.0.0) (2026-04-27)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * replacing react-router-dom with react-router + eslint 9 ([#949](https://github.com/mistertemp/shared-libs-front/issues/949))
9
+
10
+ ### Features
11
+
12
+ * replacing react-router-dom with react-router + eslint 9 ([#949](https://github.com/mistertemp/shared-libs-front/issues/949)) ([585e796](https://github.com/mistertemp/shared-libs-front/commit/585e796fcf41709f90223fe26111fca158a9536b))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **deps:** bump i18next-http-backend in /libs-front-shared ([#927](https://github.com/mistertemp/shared-libs-front/issues/927)) ([a4e213e](https://github.com/mistertemp/shared-libs-front/commit/a4e213ee37559561297f23048b8c1a20b791a6bf))
18
+ * **deps:** bump postcss from 8.5.6 to 8.5.12 in /libs-front-shared ([#942](https://github.com/mistertemp/shared-libs-front/issues/942)) ([5785605](https://github.com/mistertemp/shared-libs-front/commit/578560559b3061887d6739e42cdeb312b6d754de))
19
+
20
+ ## [2.1.0](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@2.0.0...@mistertemp/libs-front-shared@2.1.0) (2026-04-17)
21
+
22
+
23
+ ### Features
24
+
25
+ * add spanish translations to filters ([06a9e0b](https://github.com/mistertemp/shared-libs-front/commit/06a9e0b2ba8b6825902e3fa7598c59b5d835b12c))
26
+ * add templatesDrawer filter to localstorage ([#856](https://github.com/mistertemp/shared-libs-front/issues/856)) ([39337f0](https://github.com/mistertemp/shared-libs-front/commit/39337f07037b6e77b7c3f96d437b70b1681a98cd))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **deps:** bump glob from 10.4.5 to 10.5.0 in /libs-front-shared ([#721](https://github.com/mistertemp/shared-libs-front/issues/721)) ([2217a45](https://github.com/mistertemp/shared-libs-front/commit/2217a458bdab9b13e727dcc1647e87cbf52baa54))
32
+ * **deps:** bump immutable from 5.1.3 to 5.1.5 in /libs-front-shared ([#838](https://github.com/mistertemp/shared-libs-front/issues/838)) ([92125c8](https://github.com/mistertemp/shared-libs-front/commit/92125c88801186936df78cb968e919eae0ebe6d8))
33
+ * **deps:** bump js-yaml from 3.14.1 to 3.14.2 in /libs-front-shared ([#715](https://github.com/mistertemp/shared-libs-front/issues/715)) ([22c559d](https://github.com/mistertemp/shared-libs-front/commit/22c559d047eb25b117ea892d4692056bf8e66a2e))
34
+ * **deps:** bump minimatch from 3.1.2 to 3.1.5 in /libs-front-shared ([#832](https://github.com/mistertemp/shared-libs-front/issues/832)) ([ade0b5d](https://github.com/mistertemp/shared-libs-front/commit/ade0b5df67126199acb8f8f08ea4fccb82daa2d6))
35
+ * **deps:** bump picomatch from 2.3.1 to 2.3.2 in /libs-front-shared ([#899](https://github.com/mistertemp/shared-libs-front/issues/899)) ([5e6e2b6](https://github.com/mistertemp/shared-libs-front/commit/5e6e2b6c6c5c366737b0a2f8262930f2ec6eb457))
36
+ * **deps:** bump react-router and react-router-dom in /libs-front-shared ([#805](https://github.com/mistertemp/shared-libs-front/issues/805)) ([cacdb1d](https://github.com/mistertemp/shared-libs-front/commit/cacdb1dfcf9077939ddc64ba480f4e71a7137e37))
37
+ * **deps:** bump vite from 7.1.4 to 7.1.11 in /libs-front-shared ([#687](https://github.com/mistertemp/shared-libs-front/issues/687)) ([af537cf](https://github.com/mistertemp/shared-libs-front/commit/af537cf73a86500f0385f1e2b7c1270d6fb65587))
38
+
3
39
  ## [2.0.0](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@1.2.1...@mistertemp/libs-front-shared@2.0.0) (2025-09-05)
4
40
 
5
41
 
@@ -0,0 +1,180 @@
1
+ import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
2
+ import { FlatCompat } from '@eslint/eslintrc';
3
+ import js from '@eslint/js';
4
+ import typescriptEslint from '@typescript-eslint/eslint-plugin';
5
+ import tsParser from '@typescript-eslint/parser';
6
+ import { defineConfig, globalIgnores } from 'eslint/config';
7
+ import _import from 'eslint-plugin-import';
8
+ import jsxA11Y from 'eslint-plugin-jsx-a11y';
9
+ import prettier from 'eslint-plugin-prettier';
10
+ import react from 'eslint-plugin-react';
11
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
12
+ import globals from 'globals';
13
+ import path from 'node:path';
14
+ import { fileURLToPath } from 'node:url';
15
+
16
+ const __filename = fileURLToPath(import.meta.url);
17
+ const __dirname = path.dirname(__filename);
18
+ const compat = new FlatCompat({
19
+ baseDirectory: __dirname,
20
+ recommendedConfig: js.configs.recommended,
21
+ allConfig: js.configs.all,
22
+ });
23
+
24
+ export default defineConfig([
25
+ globalIgnores([
26
+ '**/node_modules',
27
+ '**/dist',
28
+ '**/coverage',
29
+ '**/.eslintcache',
30
+ '**/pnpm-lock.yaml',
31
+ ]),
32
+ {
33
+ extends: fixupConfigRules(
34
+ compat.extends(
35
+ 'eslint:recommended',
36
+ 'plugin:prettier/recommended',
37
+ 'plugin:@typescript-eslint/eslint-recommended',
38
+ 'plugin:@typescript-eslint/recommended',
39
+ 'plugin:react/recommended',
40
+ 'plugin:react-hooks/recommended',
41
+ 'plugin:jsx-a11y/recommended',
42
+ ),
43
+ ),
44
+
45
+ plugins: {
46
+ import: fixupPluginRules(_import),
47
+ react: fixupPluginRules(react),
48
+ prettier: fixupPluginRules(prettier),
49
+ '@typescript-eslint': fixupPluginRules(typescriptEslint),
50
+ 'simple-import-sort': simpleImportSort,
51
+ 'jsx-a11y': fixupPluginRules(jsxA11Y),
52
+ },
53
+
54
+ languageOptions: {
55
+ globals: {
56
+ ...globals.browser,
57
+ ...globals.jest,
58
+ ...globals.node,
59
+ },
60
+
61
+ parser: tsParser,
62
+ ecmaVersion: 'latest',
63
+ sourceType: 'module',
64
+
65
+ parserOptions: {
66
+ ecmaFeatures: {
67
+ jsx: true,
68
+ },
69
+ },
70
+ },
71
+
72
+ settings: {
73
+ react: {
74
+ version: 'detect',
75
+ },
76
+
77
+ 'import/resolver': {
78
+ node: {
79
+ extensions: ['js', '.json', '.ts', '.d.ts', '.tsx'],
80
+ },
81
+ },
82
+ },
83
+
84
+ rules: {
85
+ 'import/extensions': [
86
+ 'error',
87
+ 'ignorePackages',
88
+ {
89
+ js: 'never',
90
+ ts: 'never',
91
+ tsx: 'never',
92
+ },
93
+ ],
94
+
95
+ 'simple-import-sort/imports': [
96
+ 'error',
97
+ {
98
+ groups: [['^@?\\w'], ['^\\u0000'], ['^[^.]'], ['^\\.']],
99
+ },
100
+ ],
101
+
102
+ 'padding-line-between-statements': [
103
+ 'error',
104
+ {
105
+ blankLine: 'always',
106
+ prev: '*',
107
+ next: ['return', 'if', 'for', 'switch'],
108
+ },
109
+ {
110
+ blankLine: 'always',
111
+ prev: 'class',
112
+ next: '*',
113
+ },
114
+ {
115
+ blankLine: 'always',
116
+ prev: ['const', 'let', 'var'],
117
+ next: '*',
118
+ },
119
+ {
120
+ blankLine: 'any',
121
+ prev: ['const', 'let', 'var'],
122
+ next: ['const', 'let', 'var'],
123
+ },
124
+ {
125
+ blankLine: 'always',
126
+ prev: 'multiline-const',
127
+ next: '*',
128
+ },
129
+ ],
130
+
131
+ '@typescript-eslint/no-explicit-any': ['error'],
132
+
133
+ '@typescript-eslint/no-use-before-define': [
134
+ 'error',
135
+ {
136
+ functions: false,
137
+ },
138
+ ],
139
+
140
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
141
+ '@typescript-eslint/no-non-null-assertion': 'off',
142
+ 'no-unused-vars': 'off',
143
+
144
+ '@typescript-eslint/no-unused-vars': [
145
+ 'error',
146
+ {
147
+ argsIgnorePattern: '^_',
148
+ varsIgnorePattern: '^_',
149
+ caughtErrorsIgnorePattern: '^_',
150
+ },
151
+ ],
152
+
153
+ 'react-hooks/rules-of-hooks': 'error',
154
+ 'react-hooks/exhaustive-deps': 'error',
155
+ 'react/prop-types': 'off',
156
+ 'react/react-in-jsx-scope': 'off',
157
+
158
+ 'react/jsx-filename-extension': [
159
+ 1,
160
+ {
161
+ extensions: ['.tsx'],
162
+ },
163
+ ],
164
+
165
+ 'react/no-unescaped-entities': 'off',
166
+
167
+ 'no-console': [
168
+ 'error',
169
+ {
170
+ allow: ['info', 'warn', 'error'],
171
+ },
172
+ ],
173
+
174
+ 'react-hooks/set-state-in-effect': 'off',
175
+
176
+ // because of the filters
177
+ 'react-hooks/refs': 'warn',
178
+ },
179
+ },
180
+ ]);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@mistertemp/libs-front-shared",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "main": "index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "demo": "vite --config ./demo/vite.config.ts",
8
- "lint": "eslint --cache . --ext .ts --ext .tsx",
9
- "lint:fix": "eslint . --ext .ts --ext .tsx --fix",
8
+ "lint": "eslint --cache .",
9
+ "lint:fix": "eslint . --fix",
10
10
  "lint-style": "stylelint '**/*.scss'",
11
11
  "lint-style:fix": "stylelint '**/*.scss' --fix",
12
12
  "type-check": "tsc --noEmit",
@@ -21,12 +21,14 @@
21
21
  "extends": "./.stylelintrc"
22
22
  },
23
23
  "devDependencies": {
24
- "@axe-core/react": "4.10.0",
25
- "@mistertemp/design-system": "13.0.0",
24
+ "@eslint/compat": "2.0.5",
25
+ "@eslint/eslintrc": "3.3.5",
26
+ "@eslint/js": "9.39.4",
27
+ "@mistertemp/design-system": "14.0.0",
26
28
  "@mistertemp/libs-work-environments": "0.8.1",
27
29
  "@mistertemp/types-shared": "2.7.0",
28
30
  "@testing-library/dom": "10.4.1",
29
- "@testing-library/jest-dom": "6.8.0",
31
+ "@testing-library/jest-dom": "6.9.0",
30
32
  "@testing-library/react": "16.3.0",
31
33
  "@testing-library/user-event": "14.6.1",
32
34
  "@types/jest": "30.0.0",
@@ -34,47 +36,48 @@
34
36
  "@types/react": "18.3.12",
35
37
  "@types/react-dom": "18.3.5",
36
38
  "@types/react-transition-group": "4.4.12",
37
- "@typescript-eslint/eslint-plugin": "8.41.0",
38
- "@typescript-eslint/parser": "8.41.0",
39
- "@vitejs/plugin-react-swc": "4.0.1",
39
+ "@typescript-eslint/eslint-plugin": "8.59.0",
40
+ "@typescript-eslint/parser": "8.59.0",
41
+ "@vitejs/plugin-react-swc": "4.1.0",
40
42
  "date-fns": "3.6.0",
41
- "eslint": "8.57.1",
43
+ "eslint": "9.39.4",
42
44
  "eslint-config-prettier": "10.1.8",
43
45
  "eslint-plugin-import": "2.32.0",
44
46
  "eslint-plugin-jsx-a11y": "6.10.2",
45
- "eslint-plugin-prettier": "5.5.4",
47
+ "eslint-plugin-prettier": "5.5.5",
46
48
  "eslint-plugin-react": "7.37.5",
47
- "eslint-plugin-react-hooks": "5.2.0",
48
- "eslint-plugin-simple-import-sort": "12.1.1",
49
- "eslint-plugin-testing-library": "7.6.6",
49
+ "eslint-plugin-react-hooks": "7.1.1",
50
+ "eslint-plugin-simple-import-sort": "13.0.0",
51
+ "eslint-plugin-testing-library": "7.16.2",
50
52
  "fuse.js": "7.1.0",
51
- "i18next": "25.4.2",
53
+ "globals": "17.5.0",
54
+ "i18next": "25.5.2",
52
55
  "i18next-browser-languagedetector": "8.2.0",
53
- "i18next-http-backend": "3.0.2",
56
+ "i18next-http-backend": "3.0.6",
54
57
  "identity-obj-proxy": "3.0.0",
55
- "jest-environment-jsdom": "30.1.2",
56
- "lodash": "4.17.21",
58
+ "jest-environment-jsdom": "30.2.0",
59
+ "lodash": "4.18.1",
57
60
  "prettier": "3.6.2",
58
61
  "react": "18.3.1",
59
62
  "react-dom": "18.3.1",
60
- "react-hook-form": "7.62.0",
63
+ "react-hook-form": "7.64.0",
61
64
  "react-i18next": "15.7.3",
62
- "react-router-dom": "7.8.2",
65
+ "react-router": "7.14.2",
63
66
  "react-transition-group": "4.4.5",
64
- "sass": "1.92.0",
65
- "stylelint": "16.23.1",
67
+ "sass": "1.93.2",
68
+ "stylelint": "16.25.0",
66
69
  "stylelint-config-idiomatic-order": "10.0.0",
67
- "stylelint-config-standard-scss": "15.0.1",
70
+ "stylelint-config-standard-scss": "16.0.0",
68
71
  "stylelint-prettier": "5.0.3",
69
72
  "ts-jest": "29.4.1",
70
73
  "ts-node": "10.9.2",
71
74
  "typescript": "5.9.2",
72
- "vite": "7.0.4",
75
+ "vite": "7.3.2",
73
76
  "vite-plugin-environment": "1.1.3",
74
77
  "vite-plugin-svgr": "4.5.0"
75
78
  },
76
79
  "peerDependencies": {
77
- "@mistertemp/design-system": ">=13.0.0",
80
+ "@mistertemp/design-system": ">=14.0.0",
78
81
  "@mistertemp/libs-work-environments": "^0.8.1",
79
82
  "i18next": "^25.4.2",
80
83
  "i18next-browser-languagedetector": ">=8.2.0",
@@ -1,6 +1,7 @@
1
- import React, { useState } from 'react';
1
+ import { useState } from 'react';
2
2
 
3
3
  import { useBundledTranslation } from '../../hooks';
4
+ import es from '../../locales/es/scc-common-filters.json';
4
5
  import fr from '../../locales/fr/scc-common-filters.json';
5
6
  import it from '../../locales/it/scc-common-filters.json';
6
7
  import { Filter, FilterDropdownOption, FilterProps } from '../Filter';
@@ -19,7 +20,7 @@ export const AccountFilter = ({
19
20
  options,
20
21
  ...props
21
22
  }: AccountFilterProps) => {
22
- const { t } = useBundledTranslation('scc-common-filters', { fr, it });
23
+ const { t } = useBundledTranslation('scc-common-filters', { fr, it, es });
23
24
  const [inputValue, setInputValue] = useState('');
24
25
 
25
26
  return (
@@ -66,7 +66,6 @@ describe('Components => ControlledInputDate', () => {
66
66
 
67
67
  expect(input).toBeInTheDocument();
68
68
 
69
- // eslint-disable-next-line testing-library/no-unnecessary-act
70
69
  await act(async () => {
71
70
  await userEvent.type(input, '2/2/22');
72
71
  fireEvent.focusOut(input);
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { useEffect } from 'react';
5
5
  import { useForm } from 'react-hook-form';
6
6
 
7
- import { act, render, screen } from '../../../../.jest/reactTestingLibrary.config';
7
+ import { render, screen } from '../../../../.jest/reactTestingLibrary.config';
8
8
  import { ControlledInputTime } from '../ControlledInputTime';
9
9
 
10
10
  describe('Components => ControlledInputTime', () => {
@@ -72,10 +72,7 @@ describe('Components => ControlledInputTime', () => {
72
72
 
73
73
  expect(input).toBeInTheDocument();
74
74
 
75
- // eslint-disable-next-line testing-library/no-unnecessary-act
76
- await act(async () => {
77
- await userEvent.type(input, '2020');
78
- });
75
+ await userEvent.type(input, '2020');
79
76
 
80
77
  expect(input).toHaveValue('20:20');
81
78
  expect(onChange).toHaveBeenCalledWith('20:20');
@@ -97,10 +94,7 @@ describe('Components => ControlledInputTime', () => {
97
94
 
98
95
  expect(input).toBeInTheDocument();
99
96
 
100
- // eslint-disable-next-line testing-library/no-unnecessary-act
101
- await act(async () => {
102
- await userEvent.type(input, '2020');
103
- });
97
+ await userEvent.type(input, '2020');
104
98
 
105
99
  expect(input).toHaveValue('20-20');
106
100
  expect(onChange).toHaveBeenCalledWith('20LL20');
@@ -1,10 +1,10 @@
1
1
  import { ENVIRONMENTS_CODE, getAllFlattenedEnvironments } from '@mistertemp/libs-work-environments';
2
2
  import Fuse, { IFuseOptions } from 'fuse.js';
3
3
  import { merge } from 'lodash';
4
- import React from 'react';
5
4
  import { useMemo, useState } from 'react';
6
5
 
7
6
  import { useBundledTranslation } from '../../hooks';
7
+ import es from '../../locales/es/scc-common-filters.json';
8
8
  import fr from '../../locales/fr/scc-common-filters.json';
9
9
  import it from '../../locales/it/scc-common-filters.json';
10
10
  import { Filter, FilterDropdownOption, FilterProps } from '../Filter';
@@ -57,7 +57,7 @@ export const EnvironmentFilter = ({
57
57
  fuseOptions,
58
58
  ...props
59
59
  }: EnvironmentFilterProps) => {
60
- const { t } = useBundledTranslation('scc-common-filters', { fr, it });
60
+ const { t } = useBundledTranslation('scc-common-filters', { fr, it, es });
61
61
  const [inputValue, setInputValue] = useState<string | undefined>(undefined);
62
62
 
63
63
  const fuse = useMemo(() => {
@@ -13,6 +13,7 @@ import React, { useEffect } from 'react';
13
13
  import { useCallback, useState } from 'react';
14
14
 
15
15
  import { useBundledTranslation } from '../../hooks';
16
+ import es from '../../locales/es/scc-common-filters.json';
16
17
  import fr from '../../locales/fr/scc-common-filters.json';
17
18
  import it from '../../locales/it/scc-common-filters.json';
18
19
 
@@ -89,7 +90,7 @@ export function Filter<T extends string = string>({
89
90
  selectorProps,
90
91
  ...props
91
92
  }: FilterProps<T>) {
92
- const { t } = useBundledTranslation('scc-common-filters', { fr, it });
93
+ const { t } = useBundledTranslation('scc-common-filters', { fr, it, es });
93
94
 
94
95
  const [internalDropdownValue, setInternalDropdownValue] = useState<
95
96
  FilterDropdownOption<T>[] | undefined
@@ -4,9 +4,10 @@ import {
4
4
  DropdownStaticListProvider,
5
5
  } from '@mistertemp/design-system';
6
6
  import { isEqual } from 'lodash';
7
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
8
8
 
9
9
  import { useBundledTranslation, useDebouncedSearchInput } from '../../hooks';
10
+ import es from '../../locales/es/scc-common-filters.json';
10
11
  import fr from '../../locales/fr/scc-common-filters.json';
11
12
  import it from '../../locales/it/scc-common-filters.json';
12
13
  import { SearchableFilterProps } from '../../typings';
@@ -63,7 +64,7 @@ export const ProfessionFilter = ({
63
64
  'data-testid': dataTestId = 'filters+profession',
64
65
  ...props
65
66
  }: ProfessionFilterProps) => {
66
- const { t } = useBundledTranslation('scc-common-filters', { fr, it });
67
+ const { t } = useBundledTranslation('scc-common-filters', { fr, it, es });
67
68
 
68
69
  const [searchInput, setSearchInput] = useState('');
69
70
  const [sortedOptions, setSortedOptions] = useState<FilterDropdownOption[]>([]);
@@ -41,10 +41,7 @@ describe('ProfessionFilter', () => {
41
41
  expect(screen.getByTestId('filters+profession-bottom-action-button')).toHaveTextContent(
42
42
  'scc-common-filters:actions.removeFilter',
43
43
  );
44
- expect(
45
- //eslint-disable-next-line testing-library/no-node-access
46
- screen.getByTestId('filters+profession-options').children.length,
47
- ).toBe(1);
44
+ expect(screen.getByTestId('filters+profession-options').children.length).toBe(1);
48
45
  });
49
46
 
50
47
  it('should render custom cta title and placeholder', () => {
@@ -8,9 +8,10 @@ import {
8
8
  import { InputTextProps } from '@mistertemp/design-system/src/components/design-system/Input/InputText';
9
9
  import isEmpty from 'lodash/isEmpty';
10
10
  import isString from 'lodash/isString';
11
- import React, { useEffect, useState, VFC } from 'react';
11
+ import { useEffect, useState, VFC } from 'react';
12
12
 
13
13
  import { useBundledTranslation } from '../../hooks';
14
+ import es from '../../locales/es/scc-common-filters.json';
14
15
  import fr from '../../locales/fr/scc-common-filters.json';
15
16
  import it from '../../locales/it/scc-common-filters.json';
16
17
  import styles from './TextFilter.module.scss';
@@ -74,7 +75,7 @@ export const TextFilter: VFC<TextFilterProps> = ({
74
75
  size = 'small',
75
76
  ...dropdownProps
76
77
  }) => {
77
- const { t } = useBundledTranslation('scc-common-filters', { fr, it });
78
+ const { t } = useBundledTranslation('scc-common-filters', { fr, it, es });
78
79
 
79
80
  const [inputValue, setInputValue] = useState(dropdownValue ?? '');
80
81
 
@@ -0,0 +1,25 @@
1
+ {
2
+ "filters": {
3
+ "account": {
4
+ "placeholder": "Buscar un cliente"
5
+ },
6
+ "profession": {
7
+ "label": "Cualificación",
8
+ "placeholder": "Cualificación",
9
+ "search": {
10
+ "placeholder": "Buscar una cualificación"
11
+ }
12
+ },
13
+ "environment": {
14
+ "placeholder": "Entorno"
15
+ },
16
+ "date": {
17
+ "placeholder": "Fecha"
18
+ },
19
+ "noResult": "Sin resultados"
20
+ },
21
+ "actions": {
22
+ "removeFilter": "Eliminar el filtro",
23
+ "resetFilter": "Restablecer el filtro"
24
+ }
25
+ }