Fixed #7173 - Eslint 9 version update changes
parent
0f58abbec9
commit
2a2c07ddb2
99
.eslintrc.js
99
.eslintrc.js
|
@ -1,99 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
jest: true
|
||||
},
|
||||
extends: ['plugin:nuxt/recommended', 'plugin:vue/vue3-essential', 'prettier'],
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
requireConfigFile: false,
|
||||
babelOptions: {
|
||||
parserOpts: {
|
||||
plugins: ['typescript']
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: ['prettier'],
|
||||
ignorePatterns: ['**/public/**', '**/dist/**'],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-fallthrough': 'off',
|
||||
'vue/this-in-template': ['error', 'never'],
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-reserved-component-names': 'off',
|
||||
'vue/component-tags-order': [
|
||||
'error',
|
||||
{
|
||||
order: ['template', 'script', 'style']
|
||||
}
|
||||
],
|
||||
'vue/require-explicit-emits': [
|
||||
'error',
|
||||
{
|
||||
allowProps: false
|
||||
}
|
||||
],
|
||||
'vue/attributes-order': [
|
||||
'error',
|
||||
{
|
||||
order: ['CONDITIONALS', 'LIST_RENDERING', 'DEFINITION', ['UNIQUE', 'SLOT'], 'RENDER_MODIFIERS', 'GLOBAL', 'TWO_WAY_BINDING', 'OTHER_DIRECTIVES', ['OTHER_ATTR', 'EVENTS'], 'CONTENT'],
|
||||
alphabetical: false
|
||||
}
|
||||
],
|
||||
'vue/order-in-components': [
|
||||
'error',
|
||||
{
|
||||
order: [
|
||||
'el',
|
||||
'name',
|
||||
'key',
|
||||
'parent',
|
||||
'functional',
|
||||
'extends',
|
||||
'mixins',
|
||||
['delimiters', 'comments'],
|
||||
'ROUTER_GUARDS',
|
||||
'layout',
|
||||
'middleware',
|
||||
'validate',
|
||||
'scrollToTop',
|
||||
'transition',
|
||||
'loading',
|
||||
'inheritAttrs',
|
||||
'model',
|
||||
'emits',
|
||||
'setup',
|
||||
'fetch',
|
||||
'head',
|
||||
['props', 'propsData'],
|
||||
['provide', 'inject'],
|
||||
'asyncData',
|
||||
'data',
|
||||
'watch',
|
||||
'watchQuery',
|
||||
'LIFECYCLE_HOOKS',
|
||||
'methods',
|
||||
'computed',
|
||||
['components', 'directives', 'filters'],
|
||||
['template', 'render'],
|
||||
'renderError'
|
||||
]
|
||||
}
|
||||
],
|
||||
'padding-line-between-statements': [
|
||||
'error',
|
||||
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
|
||||
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
|
||||
{ blankLine: 'any', prev: ['case', 'default'], next: 'break' },
|
||||
{ blankLine: 'any', prev: 'case', next: 'case' },
|
||||
{ blankLine: 'always', prev: '*', next: 'return' },
|
||||
{ blankLine: 'always', prev: 'block', next: '*' },
|
||||
{ blankLine: 'always', prev: '*', next: 'block' },
|
||||
{ blankLine: 'always', prev: 'block-like', next: '*' },
|
||||
{ blankLine: 'always', prev: '*', next: 'block-like' },
|
||||
{ blankLine: 'always', prev: ['import'], next: ['const', 'let', 'var'] }
|
||||
]
|
||||
}
|
||||
};
|
|
@ -11,7 +11,7 @@ PrimeVue is a rich set of open source UI Components for Vue. See [PrimeVue homep
|
|||
## Packages
|
||||
|
||||
| Name | Version |
|
||||
| --- | --- |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [primevue](https://github.com/primefaces/primevue/tree/master/packages/primevue) | [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) |
|
||||
| [@primevue/core](https://github.com/primefaces/primevue/tree/master/packages/core) | [![npm version](https://badge.fury.io/js/@primevue%2Fcore.svg)](https://badge.fury.io/js/@primevue%2Fcore) |
|
||||
| [@primevue/icons](https://github.com/primefaces/primevue/tree/master/packages/icons) | [![npm version](https://badge.fury.io/js/@primevue%2Ficons.svg)](https://badge.fury.io/js/@primevue%2Ficons) |
|
||||
|
|
|
@ -28,7 +28,7 @@ const core_dependencies = {
|
|||
// create-vue -> https://github.com/vuejs/create-vue
|
||||
const getVueApp = (props = {}, sourceType) => {
|
||||
const path = 'src/';
|
||||
const { code: sources, title = 'primevue_demo', description = '', service, extPages, dependencies: deps, component, extFiles } = props;
|
||||
const { code: sources, title = 'primevue_demo', description = '', service, dependencies: deps, component, extFiles } = props;
|
||||
const dependencies = { ...core_dependencies, ...deps };
|
||||
|
||||
const fileExtension = '.vue';
|
||||
|
@ -827,7 +827,7 @@ export default {
|
|||
}
|
||||
}
|
||||
};
|
||||
<\/script>
|
||||
</script>
|
||||
`
|
||||
},
|
||||
[`${path}plugins/appState.js`]: {
|
||||
|
|
|
@ -40,7 +40,9 @@ export const getPTOptions = (name) => {
|
|||
};
|
||||
|
||||
export const getStyleOptions = (name) => {
|
||||
const { members = [] } = APIDocs[name.toLowerCase() + 'style']?.enumerations?.values?.[`${name}Classes`];
|
||||
const styleDoc = APIDocs[name.toLowerCase() + 'style'];
|
||||
const enumValues = styleDoc && styleDoc.enumerations && styleDoc.enumerations.values;
|
||||
const { members = [] } = enumValues ? enumValues[`${name}Classes`] || {} : {};
|
||||
let data = [];
|
||||
|
||||
for (const member of members) {
|
||||
|
@ -59,8 +61,11 @@ export const getTokenOptions = (name) => {
|
|||
const values = APIDocs[`themes/${name.toLowerCase()}`]?.tokens?.values;
|
||||
let data = [];
|
||||
|
||||
for (const [key, value] of Object.entries(values || {})) {
|
||||
for (const tokens of value?.props) {
|
||||
if (values) {
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
if (value && value.props) {
|
||||
for (const tokens of value.props) {
|
||||
const { token, description } = tokens;
|
||||
const designToken = $dt(token);
|
||||
|
||||
|
@ -71,6 +76,8 @@ export const getTokenOptions = (name) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ import PrimeVue from 'primevue/config';
|
|||
import { reactive } from 'vue';
|
||||
|
||||
const $appState = {
|
||||
install: (Vue, options) => {
|
||||
install: (Vue) => {
|
||||
Vue.config.globalProperties.$appState = reactive({
|
||||
preset: 'Aura',
|
||||
primary: 'noir',
|
||||
|
|
|
@ -103,10 +103,10 @@ const getTypeDoc = (typeDocOptions) => {
|
|||
description: '',
|
||||
values: []
|
||||
};
|
||||
const emit = {
|
||||
description: staticMessages['emit'],
|
||||
values: []
|
||||
};
|
||||
// const emit = {
|
||||
// description: staticMessages['emit'],
|
||||
// values: []
|
||||
// };
|
||||
|
||||
if (component_props) {
|
||||
props.description = component_props.comment ? component_props.comment.summary.map((s) => parseText(s.text || '')).join(' ') : '';
|
||||
|
@ -615,18 +615,16 @@ const getTypeDoc = (typeDocOptions) => {
|
|||
module_interfaces_group &&
|
||||
module_interfaces_group.children.forEach((event) => {
|
||||
const event_props_description = event.comment && event.comment.summary.map((s) => s.text || '').join(' ');
|
||||
let component_prop = '';
|
||||
|
||||
if (event.comment && event.comment.getTag('@see')) {
|
||||
const tag = event.comment.getTag('@see');
|
||||
const content = tag.content[0];
|
||||
|
||||
if (content.text.includes("['")) {
|
||||
component_prop = `${content.target.name}${content.text}`;
|
||||
} else {
|
||||
component_prop = `${content.text === content.target?.name ? content.target.parent.name : content.target?.name}.${content.text}`;
|
||||
}
|
||||
}
|
||||
// let component_prop = '';
|
||||
// if (event.comment && event.comment.getTag('@see')) {
|
||||
// const tag = event.comment.getTag('@see');
|
||||
// const content = tag.content[0];
|
||||
// if (content.text.includes("['")) {
|
||||
// component_prop = `${content.target.name}${content.text}`;
|
||||
// } else {
|
||||
// component_prop = `${content.text === content.target?.name ? content.target.parent.name : content.target?.name}.${content.text}`;
|
||||
// }
|
||||
// }
|
||||
|
||||
!doc[name]['tokens'] &&
|
||||
(doc[name]['tokens'] = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default defineEventHandler((event) => {
|
||||
export default defineEventHandler(() => {
|
||||
return {
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
statusCode: 200,
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"include": [
|
||||
"../../packages/primevue/src/**/*.d.ts",
|
||||
"../../packages/forms/src/**/*.d.ts",
|
||||
"../../node_modules/@primeuix/themes/types/**/*.d.ts"
|
||||
],
|
||||
"include": ["../../packages/primevue/src/**/*.d.ts", "../../packages/forms/src/**/*.d.ts", "../../node_modules/@primeuix/themes/types/**/*.d.ts"],
|
||||
"exclude": ["node_modules", "**/node_modules", "**/dist"]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
import eslint from '@eslint/js';
|
||||
import eslintPluginVue from 'eslint-plugin-vue';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
eslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.jest,
|
||||
vi: 'readonly',
|
||||
defineNuxtConfig: 'readonly',
|
||||
defineNuxtPlugin: 'readonly',
|
||||
defineNuxtLink: 'readonly',
|
||||
defineNuxtRouteMiddleware: 'readonly',
|
||||
defineEventHandler: 'readonly',
|
||||
useRuntimeConfig: 'readonly',
|
||||
useNuxtApp: 'readonly'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'no-empty': 'off',
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-fallthrough': 'off',
|
||||
'padding-line-between-statements': [
|
||||
'error',
|
||||
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
|
||||
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
|
||||
{ blankLine: 'any', prev: ['case', 'default'], next: 'break' },
|
||||
{ blankLine: 'any', prev: 'case', next: 'case' },
|
||||
{ blankLine: 'always', prev: '*', next: 'return' },
|
||||
{ blankLine: 'always', prev: 'block', next: '*' },
|
||||
{ blankLine: 'always', prev: '*', next: 'block' },
|
||||
{ blankLine: 'always', prev: 'block-like', next: '*' },
|
||||
{ blankLine: 'always', prev: '*', next: 'block-like' },
|
||||
{ blankLine: 'always', prev: ['import'], next: ['const', 'let', 'var'] }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['vue'],
|
||||
plugins: {
|
||||
vue: eslintPluginVue
|
||||
},
|
||||
rules: {
|
||||
'vue/valid-template-root': 'error',
|
||||
'vue/no-multiple-template-root': 'off',
|
||||
'vue/this-in-template': ['error', 'never'],
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-reserved-component-names': 'off',
|
||||
'vue/component-tags-order': [
|
||||
'error',
|
||||
{
|
||||
order: ['template', 'script', 'style']
|
||||
}
|
||||
],
|
||||
'vue/require-explicit-emits': [
|
||||
'error',
|
||||
{
|
||||
allowProps: false
|
||||
}
|
||||
],
|
||||
'vue/attributes-order': [
|
||||
'error',
|
||||
{
|
||||
order: ['CONDITIONALS', 'LIST_RENDERING', 'DEFINITION', ['UNIQUE', 'SLOT'], 'RENDER_MODIFIERS', 'GLOBAL', 'TWO_WAY_BINDING', 'OTHER_DIRECTIVES', ['OTHER_ATTR', 'EVENTS'], 'CONTENT'],
|
||||
alphabetical: false
|
||||
}
|
||||
],
|
||||
'vue/order-in-components': [
|
||||
'error',
|
||||
{
|
||||
order: [
|
||||
'el',
|
||||
'name',
|
||||
'key',
|
||||
'parent',
|
||||
'functional',
|
||||
'extends',
|
||||
'mixins',
|
||||
['delimiters', 'comments'],
|
||||
'ROUTER_GUARDS',
|
||||
'layout',
|
||||
'middleware',
|
||||
'validate',
|
||||
'scrollToTop',
|
||||
'transition',
|
||||
'loading',
|
||||
'inheritAttrs',
|
||||
'model',
|
||||
'emits',
|
||||
'setup',
|
||||
'fetch',
|
||||
'head',
|
||||
['props', 'propsData'],
|
||||
['provide', 'inject'],
|
||||
'asyncData',
|
||||
'data',
|
||||
'watch',
|
||||
'watchQuery',
|
||||
'LIFECYCLE_HOOKS',
|
||||
'methods',
|
||||
'computed',
|
||||
['components', 'directives', 'filters'],
|
||||
['template', 'render'],
|
||||
'renderError'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts'],
|
||||
plugins: {
|
||||
vue: eslintPluginVue
|
||||
},
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: ['**/dist/**', '**/node_modules/**', '**/.nuxt/**', 'build/**', '**/prism.js']
|
||||
}
|
||||
];
|
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
|
@ -37,29 +37,28 @@
|
|||
"hot:dev": "DEV_ENV=hot pnpm --filter showcase dev",
|
||||
"module:dev": "pnpm --filter @primevue/nuxt-module dev",
|
||||
"security:check": "pnpm audit --prod --audit-level high",
|
||||
"format": "prettier --write \"**/*.{vue,js,mjs,ts,d.ts}\" --cache",
|
||||
"format:check": "prettier --check \"**/*.{vue,js,mjs,ts,d.ts}\"",
|
||||
"lint": "eslint --ext \".vue,.js,.mjs,.ts\" --ignore-path .gitignore . --cache",
|
||||
"lint:fix": "eslint --fix --ext \".vue,.js,.mjs,.ts\" --ignore-path .gitignore .",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"test:unit": "pnpm --filter primevue test:unit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.18.9",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"@rollup/plugin-babel": "^6.0.3",
|
||||
"@rollup/plugin-alias": "^5.1.0",
|
||||
"@rollup/plugin-babel": "^6.0.3",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.14.0",
|
||||
"pnpm": "^9.6.0",
|
||||
"prettier": "3.4.2",
|
||||
"rollup-plugin-postcss": "^4.0.0",
|
||||
"rollup-plugin-vue": "^6.0.0-beta.9",
|
||||
"eslint": "^8.30.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-nuxt": "^4.0.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.4.0",
|
||||
"typescript": "^4.9.4",
|
||||
"prettier": "2.7.1",
|
||||
"pnpm": "^9.6.0"
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -203,7 +203,6 @@ function addStyle() {
|
|||
try {
|
||||
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + folderName + '/style')).forEach((file) => {
|
||||
if (/\.js$/.test(file)) {
|
||||
const name = file.split(/(.js)$/)[0].toLowerCase();
|
||||
const input = process.env.INPUT_DIR + folderName + '/style/' + file;
|
||||
const output = process.env.OUTPUT_DIR + folderName + '/style/index';
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ const BaseDirective = {
|
|||
return computedValue?.[_key] ?? computedValue;
|
||||
};
|
||||
|
||||
return pt?.hasOwnProperty('_usept')
|
||||
return Object.hasOwn(pt, '_usept')
|
||||
? {
|
||||
_usept: pt['_usept'],
|
||||
originalValue: getValue(pt.originalValue),
|
||||
|
@ -51,7 +51,7 @@ const BaseDirective = {
|
|||
_usePT: (instance = {}, pt, callback, key, params) => {
|
||||
const fn = (value) => callback(value, key, params);
|
||||
|
||||
if (pt?.hasOwnProperty('_usept')) {
|
||||
if (Object.hasOwn(pt, '_usept')) {
|
||||
const { mergeSections = true, mergeProps: useMergeProps = false } = pt['_usept'] || instance.$primevueConfig?.ptOptions || {};
|
||||
const originalValue = fn(pt.originalValue);
|
||||
const value = fn(pt.value);
|
||||
|
@ -152,6 +152,7 @@ const BaseDirective = {
|
|||
selfHook?.(instance, options);
|
||||
defaultHook?.(instance, options);
|
||||
},
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
_mergeProps(instance = {}, fn, ...args) {
|
||||
return isFunction(fn) ? fn(...args) : mergeProps(...args);
|
||||
},
|
||||
|
|
|
@ -4,7 +4,8 @@ declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomP
|
|||
|
||||
declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
||||
|
||||
export declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V>
|
||||
export declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> =
|
||||
Options extends Array<infer V>
|
||||
? (e: V, ...args: any[]) => void
|
||||
: {} extends Options
|
||||
? (e: string, ...args: any[]) => void
|
||||
|
|
|
@ -198,7 +198,6 @@ function addStyle() {
|
|||
try {
|
||||
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + folderName + '/style')).forEach((file) => {
|
||||
if (/\.js$/.test(file)) {
|
||||
const name = file.split(/(.js)$/)[0].toLowerCase();
|
||||
const input = process.env.INPUT_DIR + folderName + '/style/' + file;
|
||||
const output = process.env.OUTPUT_DIR + folderName + '/style/index';
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ function watchPausable(source, callback, options) {
|
|||
// @todo: move to utils
|
||||
function groupKeys(obj) {
|
||||
return Object.entries(obj).reduce((result, [key, value]) => {
|
||||
/* eslint-disable-next-line no-useless-escape */
|
||||
key.split(/[\.\[\]]+/)
|
||||
.filter(Boolean)
|
||||
.reduce((acc, curr, idx, arr) => (acc[curr] ??= isNaN(arr[idx + 1]) ? (idx === arr.length - 1 ? value : {}) : []), result);
|
||||
|
@ -55,6 +56,7 @@ function getValueByPath(obj, path) {
|
|||
// do nothing and continue to other methods to resolve path data
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line no-useless-escape */
|
||||
const keys = path.split(/[\.\[\]]+/).filter(Boolean);
|
||||
|
||||
return keys.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj);
|
||||
|
@ -118,10 +120,10 @@ export const useForm = (options = {}) => {
|
|||
validateFieldOn(field, fieldOptions, 'validateOnBlur');
|
||||
},
|
||||
onInput: (event) => {
|
||||
_states[field].value = event.hasOwnProperty('value') ? event.value : event.target.value;
|
||||
_states[field].value = Object.hasOwn(event, 'value') ? event.value : event.target.value;
|
||||
},
|
||||
onChange: (event) => {
|
||||
_states[field].value = event.hasOwnProperty('value') ? event.value : event.target.type === 'checkbox' || event.target.type === 'radio' ? event.target.checked : event.target.value;
|
||||
_states[field].value = Object.hasOwn(event, 'value') ? event.value : event.target.type === 'checkbox' || event.target.type === 'radio' ? event.target.checked : event.target.value;
|
||||
},
|
||||
onInvalid: (errors) => {
|
||||
_states[field].invalid = true;
|
||||
|
|
|
@ -201,7 +201,6 @@ function addStyle() {
|
|||
try {
|
||||
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + folderName + '/style')).forEach((file) => {
|
||||
if (/\.js$/.test(file)) {
|
||||
const name = file.split(/(.js)$/)[0].toLowerCase();
|
||||
const input = process.env.INPUT_DIR + folderName + '/style/' + file;
|
||||
const output = process.env.OUTPUT_DIR + folderName + '/style/index';
|
||||
|
||||
|
|
|
@ -22,22 +22,18 @@ npx nuxi@latest module add primevue
|
|||
|
||||
```js
|
||||
{
|
||||
modules: [
|
||||
'@primevue/nuxt-module'
|
||||
]
|
||||
modules: ['@primevue/nuxt-module'];
|
||||
}
|
||||
```
|
||||
|
||||
That's it! You can now use `@primevue/nuxt-module` in your Nuxt app ✨
|
||||
|
||||
<!-- Badges -->
|
||||
|
||||
[npm-version-src]: https://img.shields.io/npm/v/@primevue/nuxt-module/latest.svg?color
|
||||
[npm-version-href]: https://npmjs.com/package/@primevue/nuxt-module
|
||||
|
||||
[npm-downloads-src]: https://img.shields.io/npm/dm/@primevue/nuxt-module
|
||||
[npm-downloads-href]: https://npmjs.com/package/@primevue/nuxt-module
|
||||
|
||||
[discord-src]: https://img.shields.io/discord/557940238991753223.svg?colorB=7289da&label=chat&logo=discord
|
||||
|
||||
[license-src]: https://img.shields.io/npm/l/@primevue/nuxt-module.svg?style=flat&colorB=yellow
|
||||
[license-href]: https://npmjs.com/package/@primevue/nuxt-module
|
||||
|
|
|
@ -215,7 +215,6 @@ function addStyle() {
|
|||
try {
|
||||
fs.readdirSync(path.resolve(__dirname, process.env.INPUT_DIR + folderName + '/style')).forEach((file) => {
|
||||
if (/\.js$/.test(file)) {
|
||||
const name = file.split(/(.js)$/)[0].toLowerCase();
|
||||
const input = process.env.INPUT_DIR + folderName + '/style/' + file;
|
||||
const output = process.env.OUTPUT_DIR + folderName + '/style/index';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ const classes = {
|
|||
}
|
||||
],
|
||||
pcInputText: 'p-autocomplete-input',
|
||||
inputMultiple: ({ props, instance }) => [
|
||||
inputMultiple: ({ instance }) => [
|
||||
'p-autocomplete-input-multiple',
|
||||
{
|
||||
'p-variant-filled': instance.$variant === 'filled'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { addClass, removeClass } from '@primeuix/utils/dom';
|
||||
import { addClass } from '@primeuix/utils/dom';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { style } from '@primeuix/styles/floatlabel';
|
|||
import BaseStyle from '@primevue/core/base/style';
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
root: ({ props }) => [
|
||||
'p-floatlabel',
|
||||
{
|
||||
'p-floatlabel-over': props.variant === 'over',
|
||||
|
|
|
@ -9,7 +9,7 @@ const KeyFilter = BaseKeyFilter.extend('keyfilter', {
|
|||
|
||||
target.$_pkeyfilterModifier = this.getModifiers(options);
|
||||
|
||||
if (typeof options.value) {
|
||||
if (options.value !== undefined) {
|
||||
target.$_pkeyfilterPattern = options.value?.pattern || options.value;
|
||||
target.$_pkeyfilterValidateOnly = options.value?.validateOnly || false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ const KeyFilter = BaseKeyFilter.extend('keyfilter', {
|
|||
target.$_pkeyfilterModifier = this.getModifiers(options);
|
||||
this.unbindEvents(el, options);
|
||||
|
||||
if (typeof options.value) {
|
||||
if (options.value !== undefined) {
|
||||
target.$_pkeyfilterPattern = options.value?.pattern || options.value;
|
||||
target.$_pkeyfilterValidateOnly = options.value?.validateOnly || false;
|
||||
}
|
||||
|
@ -38,14 +38,14 @@ const KeyFilter = BaseKeyFilter.extend('keyfilter', {
|
|||
},
|
||||
DEFAULT_PATTERNS: {
|
||||
pint: /[\d]/,
|
||||
int: /[\d\-]/,
|
||||
pnum: /[\d\.]/,
|
||||
money: /[\d\.\s,]/,
|
||||
num: /[\d\-\.]/,
|
||||
int: /[\d-]/,
|
||||
pnum: /[\d.]/,
|
||||
money: /[\d.\s,]/,
|
||||
num: /[\d-.]/,
|
||||
hex: /[0-9a-f]/i,
|
||||
email: /[a-z0-9_\.\-@]/i,
|
||||
email: /[a-z0-9_.-@]/i,
|
||||
alpha: /[a-z_]/i,
|
||||
alphanum: /[a-z0-9_]/i
|
||||
alphanum: /[a-z0-9_]/
|
||||
},
|
||||
methods: {
|
||||
getTarget(el) {
|
||||
|
|
|
@ -503,7 +503,7 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
|||
return targetLeft + width > viewport.width || targetLeft < 0 || targetTop < 0 || targetTop + height > viewport.height;
|
||||
},
|
||||
getTarget(el) {
|
||||
return hasClass(el, 'p-inputwrapper') ? findSingle(el, 'input') ?? el : el;
|
||||
return hasClass(el, 'p-inputwrapper') ? (findSingle(el, 'input') ?? el) : el;
|
||||
},
|
||||
getModifiers(options) {
|
||||
// modifiers
|
||||
|
|
583
pnpm-lock.yaml
583
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue