fix: update GridlerStore setState type to accept full state values
fix: change defaultItems type in GlidlerFormAdaptor to use MantineBetterMenuInstanceItem[] test: update global ResizeObserver and IntersectionObserver mocks to use globalThis build: change moduleResolution to 'bundler' in tsconfig.app.json build: add missing newline at end of file in tsconfig.node.json
This commit is contained in:
@@ -11,7 +11,7 @@ const config = defineConfig([
|
|||||||
{
|
{
|
||||||
extends: ['js/recommended'],
|
extends: ['js/recommended'],
|
||||||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||||
|
ignores: ['**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', '*stories.tsx','dist/**'],
|
||||||
languageOptions: { globals: globals.browser },
|
languageOptions: { globals: globals.browser },
|
||||||
plugins: { js },
|
plugins: { js },
|
||||||
},
|
},
|
||||||
@@ -20,7 +20,7 @@ const config = defineConfig([
|
|||||||
tseslint.configs.recommended,
|
tseslint.configs.recommended,
|
||||||
{
|
{
|
||||||
...pluginReact.configs.flat.recommended,
|
...pluginReact.configs.flat.recommended,
|
||||||
ignores: ['**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', '*stories.tsx'],
|
ignores: ['**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', '*stories.tsx','dist/**'],
|
||||||
rules: {
|
rules: {
|
||||||
...pluginReact.configs.flat.recommended.rules,
|
...pluginReact.configs.flat.recommended.rules,
|
||||||
'react/react-in-jsx-scope': 'off',
|
'react/react-in-jsx-scope': 'off',
|
||||||
@@ -34,6 +34,7 @@ const config = defineConfig([
|
|||||||
'@typescript-eslint/ban-ts-comment': 'off',
|
'@typescript-eslint/ban-ts-comment': 'off',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ignores: ['dist/**']},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
79
package.json
79
package.json
@@ -3,6 +3,26 @@
|
|||||||
"author": "Warky Devs",
|
"author": "Warky Devs",
|
||||||
"version": "0.0.29",
|
"version": "0.0.29",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"types": "./dist/lib.d.ts",
|
||||||
|
"main": "./dist/lib.cjs.js",
|
||||||
|
"module": "./dist/lib.es.js",
|
||||||
|
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/lib.d.ts",
|
||||||
|
"import": "./dist/lib.es.js",
|
||||||
|
"require": "./dist/lib.cjs.js"
|
||||||
|
|
||||||
|
},
|
||||||
|
"./oranguru.css": "./dist/oranguru.css",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist/**",
|
||||||
|
"assets/**",
|
||||||
|
"public/**",
|
||||||
|
"global.d.ts"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
@@ -17,71 +37,40 @@
|
|||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build"
|
"build-storybook": "storybook build"
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"dist/**",
|
|
||||||
"assets/**",
|
|
||||||
"public/**",
|
|
||||||
"global.d.ts"
|
|
||||||
],
|
|
||||||
"module": "./src.lib.ts",
|
|
||||||
"types": "./src/lib.ts",
|
|
||||||
"publishConfig": {
|
|
||||||
"main": "./dist/lib.cjs.js",
|
|
||||||
"module": "./dist/lib.es.js",
|
|
||||||
"require": "./dist/lib.cjs.js",
|
|
||||||
"types": "./dist/lib.d.ts",
|
|
||||||
"typings": "./dist/lib.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"import": "./dist/lib.es.js",
|
|
||||||
"types": "./dist/lib.d.ts",
|
|
||||||
"default": "./dist/lib.cjs.js"
|
|
||||||
},
|
|
||||||
"./package.json": "./package.json",
|
|
||||||
"./oranguru.css": "./dist/oranguru.css"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./src/lib.ts",
|
|
||||||
"default": "./src/lib.ts"
|
|
||||||
},
|
|
||||||
"./oranguru.css": "./src/oranguru.css"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tanstack/react-virtual": "^3.13.18",
|
"@tanstack/react-virtual": "^3.13.18",
|
||||||
"moment": "^2.30.1"
|
"moment": "^2.30.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@changesets/cli": "^2.29.7",
|
"@changesets/cli": "^2.29.8",
|
||||||
"@eslint/js": "^9.38.0",
|
"@eslint/js": "^9.39.2",
|
||||||
"@storybook/react-vite": "^9.1.15",
|
"@storybook/react-vite": "^10.2.1",
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
"@testing-library/jest-dom": "^6.9.1",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.2",
|
||||||
"@testing-library/user-event": "^14.6.1",
|
"@testing-library/user-event": "^14.6.1",
|
||||||
"@types/node": "^24.9.1",
|
"@types/node": "^25.1.0",
|
||||||
"@types/react": "^19.2.2",
|
"@types/react": "^19.2.10",
|
||||||
"@types/react-dom": "^19.2.2",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@typescript-eslint/parser": "^8.46.2",
|
"@typescript-eslint/parser": "^8.54.0",
|
||||||
"@vitejs/plugin-react-swc": "^4.2.0",
|
"@vitejs/plugin-react-swc": "^4.2.2",
|
||||||
"eslint": "^9.38.0",
|
"eslint": "^9.38.0",
|
||||||
"eslint-config-mantine": "^4.0.3",
|
"eslint-config-mantine": "^4.0.3",
|
||||||
"eslint-plugin-perfectionist": "^4.15.1",
|
"eslint-plugin-perfectionist": "^5.4.0",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-react-hooks": "^7.0.1",
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
"eslint-plugin-react-refresh": "^0.4.24",
|
"eslint-plugin-react-refresh": "^0.4.24",
|
||||||
"eslint-plugin-storybook": "^9.1.15",
|
"eslint-plugin-storybook": "^9.1.15",
|
||||||
"global": "^4.4.0",
|
"global": "^4.4.0",
|
||||||
"globals": "^16.4.0",
|
"globals": "^17.2.0",
|
||||||
"jiti": "^2.6.1",
|
"jiti": "^2.6.1",
|
||||||
"jsdom": "^27.0.1",
|
"jsdom": "^27.4.0",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"postcss-preset-mantine": "^1.18.0",
|
"postcss-preset-mantine": "^1.18.0",
|
||||||
"postcss-simple-vars": "^7.0.1",
|
"postcss-simple-vars": "^7.0.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"prettier-eslint": "^16.4.2",
|
"prettier-eslint": "^16.4.2",
|
||||||
"react": "^19.2.0",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.4",
|
||||||
"storybook": "^9.1.15",
|
"storybook": "^9.1.15",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"typescript-eslint": "^8.46.2",
|
"typescript-eslint": "^8.46.2",
|
||||||
|
|||||||
1095
pnpm-lock.yaml
generated
1095
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -202,7 +202,7 @@ export interface GridlerState {
|
|||||||
renderColumns?: GridlerColumns;
|
renderColumns?: GridlerColumns;
|
||||||
setState: <K extends keyof GridlerStoreState>(
|
setState: <K extends keyof GridlerStoreState>(
|
||||||
key: K,
|
key: K,
|
||||||
value: Partial<GridlerStoreState[K]>
|
value: GridlerStoreState[K]
|
||||||
) => void;
|
) => void;
|
||||||
setStateFN: <K extends keyof GridlerStoreState>(
|
setStateFN: <K extends keyof GridlerStoreState>(
|
||||||
key: K,
|
key: K,
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ export function GlidlerFormAdaptor(props: {
|
|||||||
storeState: GridlerState,
|
storeState: GridlerState,
|
||||||
row?: Record<string, unknown>,
|
row?: Record<string, unknown>,
|
||||||
col?: GridlerColumn,
|
col?: GridlerColumn,
|
||||||
defaultItems?: Array<unknown>
|
defaultItems?: MantineBetterMenuInstanceItem[]
|
||||||
) => {
|
): MantineBetterMenuInstanceItem[] => {
|
||||||
//console.log('GlidlerFormInterface getMenuItems', id);
|
//console.log('GlidlerFormInterface getMenuItems', id);
|
||||||
|
|
||||||
if (id === 'header-menu') {
|
if (id === 'header-menu') {
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ Object.defineProperty(window, 'matchMedia', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Mock ResizeObserver
|
// Mock ResizeObserver
|
||||||
global.ResizeObserver = vi.fn().mockImplementation(() => ({
|
globalThis.ResizeObserver = vi.fn().mockImplementation(() => ({
|
||||||
disconnect: vi.fn(),
|
disconnect: vi.fn(),
|
||||||
observe: vi.fn(),
|
observe: vi.fn(),
|
||||||
unobserve: vi.fn(),
|
unobserve: vi.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Mock IntersectionObserver
|
// Mock IntersectionObserver
|
||||||
global.IntersectionObserver = vi.fn().mockImplementation(() => ({
|
globalThis.IntersectionObserver = vi.fn().mockImplementation(() => ({
|
||||||
disconnect: vi.fn(),
|
disconnect: vi.fn(),
|
||||||
observe: vi.fn(),
|
observe: vi.fn(),
|
||||||
unobserve: vi.fn(),
|
unobserve: vi.fn(),
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "bundler",
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"verbatimModuleSyntax": true,
|
"verbatimModuleSyntax": true,
|
||||||
@@ -37,5 +37,6 @@
|
|||||||
"src",
|
"src",
|
||||||
"lib.ts",
|
"lib.ts",
|
||||||
"*.d.ts",
|
"*.d.ts",
|
||||||
]
|
],
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,5 +23,5 @@
|
|||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"vite.config.ts"
|
"vite.config.ts"
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user