Paket Deprecated uyarıları kaldırıldı

This commit is contained in:
Sedat Öztürk 2026-07-01 21:02:42 +03:00
parent deb7fdfee6
commit 47faf2a6ff
9 changed files with 1093 additions and 1449 deletions

View file

@ -1,5 +0,0 @@
node_modules/
dist/
.prettierrc.js
.eslintrc.js
env.d.ts

View file

@ -1,67 +0,0 @@
{
"env": { "browser": true, "es2021": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"standard-with-typescript",
"plugin:import/recommended",
"plugin:react/jsx-runtime",
"prettier",
// This disables the formatting rules in ESLint that Prettier is going to be responsible for handling.
// Make sure it's always the last config, so it gets the chance to override other configs.
"eslint-config-prettier"
],
"ignorePatterns": ["dist", ".eslintrc.json"],
"settings": {
"react": {
// Tells eslint-plugin-react to automatically detect the version of React to use.
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"] // use typescript-eslint parser for .ts|tsx files.
},
// Tells eslint how to resolve imports
"import/resolver": {
// "node": {
// "paths": ["src"],
// "extensions": [".js", ".jsx", ".ts", ".tsx"]
// },
"typescript": {
"project": "./tsconfig.eslint.json",
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`.
}
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"plugins": ["react", "react-refresh", "typescript-eslint"],
"rules": {
// Add your own rules here to override ones from the extended configs.
"react-refresh/only-export-components": ["warn", { "allowConstantExport": true }],
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
"import/first": "warn",
"import/default": "off",
"import/newline-after-import": "warn",
"import/no-named-as-default-member": "off",
"import/no-duplicates": "error",
"import/no-named-as-default": 0,
"react/prop-types": "off",
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": true,
"shorthandFirst": true,
"ignoreCase": true,
"reservedFirst": true,
"noSortAlphabetically": true
}
]
}
}

77
ui/eslint.config.js Normal file
View file

@ -0,0 +1,77 @@
import js from '@eslint/js'
import tsParser from '@typescript-eslint/parser'
import tsPlugin from '@typescript-eslint/eslint-plugin'
import importPlugin from 'eslint-plugin-import'
import reactPlugin from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import prettier from 'eslint-config-prettier'
import globals from 'globals'
export default [
{
ignores: [
'node_modules/**',
'dist/**',
'dev-dist/**',
'public/**',
'env.d.ts',
],
},
js.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.browser,
parserOptions: { ecmaFeatures: { jsx: true } },
},
plugins: {
import: importPlugin,
react: reactPlugin,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
settings: {
react: { version: 'detect' },
'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'] },
'import/resolver': {
typescript: { project: './tsconfig.eslint.json', alwaysTryTypes: true },
},
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactPlugin.configs['jsx-runtime'].rules,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
...importPlugin.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react/react-in-jsx-scope': 'off',
'import/first': 'warn',
'import/default': 'off',
'import/newline-after-import': 'warn',
'import/no-named-as-default-member': 'off',
'import/no-duplicates': 'error',
'import/no-named-as-default': 'off',
'react/prop-types': 'off',
'react/jsx-sort-props': [
'warn',
{
callbacksLast: true,
shorthandFirst: true,
ignoreCase: true,
reservedFirst: true,
noSortAlphabetically: true,
},
],
},
},
{
files: ['**/*.{ts,tsx}'],
languageOptions: { parser: tsParser },
plugins: { '@typescript-eslint': tsPlugin },
rules: tsPlugin.configs.recommended.rules,
},
prettier,
]

2279
ui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@
"build": "node scripts/generate-version.js && vite build",
"build:production": "vite build",
"preview": "vite preview",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"prettier": "prettier --ignore-path .gitignore src --check",
"prettier:fix": "npm run prettier -- --write",
@ -34,7 +34,7 @@
"@monaco-editor/react": "^4.6.0",
"@tanstack/react-query": "^4.29.19",
"@tanstack/react-table": "^8.8.5",
"axios": "^1.7.9",
"axios": "^1.18.1",
"classnames": "^2.5.1",
"dayjs": "^1.11.13",
"devexpress-reporting-react": "^25.2.3",
@ -42,13 +42,13 @@
"devextreme-react": "^25.2.3",
"easy-peasy": "^6.0.5",
"emoji-picker-react": "^4.14.1",
"exceljs": "^4.4.0",
"devextreme-exceljs-fork": "^4.4.11",
"file-saver": "^2.0.2",
"formik": "^2.4.6",
"framer-motion": "^11.15.0",
"jspdf": "^4.0.0",
"jspdf": "^4.2.1",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"lodash": "^4.18.1",
"react": "^18.3.1",
"react-advanced-cropper": "^0.20.0",
"react-arborist": "^3.4.0",
@ -59,9 +59,8 @@
"react-highlight-words": "^0.20.0",
"react-icons": "^5.4.0",
"react-modal": "^3.16.3",
"react-router-dom": "^6.14.1",
"react-router-dom": "^6.30.4",
"react-select": "^5.9.0",
"redux-state-sync": "^3.1.4",
"yet-another-react-lightbox": "^3.25.0",
"yup": "^1.6.1"
},
@ -76,33 +75,36 @@
"@types/react-helmet": "^6.1.9",
"@types/react-highlight-words": "^0.16.4",
"@types/react-modal": "^3.13.1",
"@types/redux-state-sync": "^3.1.9",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@eslint/js": "^9.39.0",
"@typescript-eslint/eslint-plugin": "^8.62.1",
"@typescript-eslint/parser": "^8.62.1",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.14",
"baseline-browser-mapping": "^2.9.19",
"browserslist": "^4.25.2",
"caniuse-lite": "^1.0.30001734",
"cssnano": "^6.0.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^9.39.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.1",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"globals": "^16.0.0",
"postcss": "^8.4.21",
"prettier": "^3.1.1",
"tailwindcss": "^3.4.17",
"typescript": "^4.9.3",
"vite": "^7.1.2",
"vite-plugin-pwa": "^1.0.2"
"vite": "^7.3.6",
"vite-plugin-pwa": "^1.3.0"
},
"overrides": {
"dompurify": "3.4.11",
"glob": "13.0.6"
},
"volta": {
"node": "24.13.0",

39
ui/src/store/stateSync.ts Normal file
View file

@ -0,0 +1,39 @@
const syncedActionTypes = new Set([
'@action.auth.signOut',
'@action.auth.signIn',
'@action.locale.setLang',
])
const channel =
typeof BroadcastChannel === 'undefined'
? undefined
: new BroadcastChannel('sozsoft-platform-state-sync')
const receivedActions = new WeakSet<object>()
const isSyncedAction = (action: unknown): action is { type: string } =>
typeof action === 'object' &&
action !== null &&
'type' in action &&
typeof action.type === 'string' &&
syncedActionTypes.has(action.type)
export const stateSyncMiddleware = () => (next: (action: unknown) => unknown) =>
(action: unknown) => {
const result = next(action)
if (isSyncedAction(action) && !receivedActions.has(action)) {
channel?.postMessage(action)
}
return result
}
export const initStateSync = (store: { dispatch: (action: never) => unknown }) => {
channel?.addEventListener('message', ({ data }: MessageEvent<unknown>) => {
if (!isSyncedAction(data)) return
receivedActions.add(data)
store.dispatch(data as never)
})
}

View file

@ -1,9 +1,4 @@
import { createStore, createTypedHooks, persist } from 'easy-peasy'
import {
Config as ReduxStateSyncConfig,
createStateSyncMiddleware,
initMessageListener,
} from 'redux-state-sync'
import * as abpConfigService from '../services/abpConfig.service'
import * as listFormService from '../services/admin/list-form.service'
import { AbpConfigModel, abpConfigModel } from './abpConfig.model'
@ -14,6 +9,7 @@ import { LocaleModel, localeModel } from './locale.model'
import { ThemeModel, themeModel } from './theme.model'
import { refreshToken } from '../services/auth.service'
import { MenuService } from '../services/menu.service'
import { initStateSync, stateSyncMiddleware } from './stateSync'
export interface StoreModel {
abpConfig: AbpConfigModel
@ -34,25 +30,6 @@ const injections = {
}
export type Injections = typeof injections
const reduxStateSyncConfig: ReduxStateSyncConfig = {
predicate: (action) => {
const blacklist = [
'persist/FLUSH',
'persist/REHYDRATE',
'persist/PAUSE',
'persist/PERSIST',
'persist/PURGE',
'persist/REGISTER',
]
const whitelist = ['@action.auth.signOut', '@action.auth.signIn', '@action.locale.setLang']
if (typeof action !== 'function') {
return whitelist.indexOf(action.type) >= 0
// return blacklist.indexOf(action.type) < 0
}
return false
},
}
export const store = createStore<StoreModel>(
persist(
{
@ -69,13 +46,13 @@ export const store = createStore<StoreModel>(
},
),
{
middleware: [createStateSyncMiddleware(reduxStateSyncConfig)],
middleware: [stateSyncMiddleware],
devTools: import.meta.env.DEV,
injections,
},
)
initMessageListener(store)
initStateSync(store)
const typedHooks = createTypedHooks<StoreModel>()

View file

@ -1345,7 +1345,7 @@ const Grid = (props: GridProps) => {
if (e.format === 'xlsx') {
// Sadece Excel için gerekli kütüphaneleri yükle
const [{ Workbook }, { saveAs }, { exportDataGrid }] = await Promise.all([
import('exceljs'),
import('devextreme-exceljs-fork'),
import('file-saver'),
import('devextreme/excel_exporter'),
])
@ -1367,7 +1367,7 @@ const Grid = (props: GridProps) => {
} else if (e.format === 'csv') {
// Sadece CSV için gerekli kütüphaneleri yükle (exceljs CSV desteği için)
const [{ Workbook }, { saveAs }] = await Promise.all([
import('exceljs'),
import('devextreme-exceljs-fork'),
import('file-saver'),
])

View file

@ -206,7 +206,7 @@ const Pivot = (props: PivotProps) => {
try {
// PivotGrid sadece Excel export destekliyor
const [{ Workbook }, { saveAs }, { exportPivotGrid }] = await Promise.all([
import('exceljs'),
import('devextreme-exceljs-fork'),
import('file-saver'),
import('devextreme/excel_exporter'),
])