@questwork/vue-q-list-vue3 3.1.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/.babelrc.json +16 -0
- package/LICENSE +9 -0
- package/dist/q-list.min.js +32 -0
- package/dist/q-list.min.js.LICENSE.txt +106 -0
- package/lib/factories/index.js +6 -0
- package/lib/factories/qListButtonFactory/index.js +5 -0
- package/lib/factories/qListButtonFactory/qListButtonFactory.js +16 -0
- package/lib/helpers/getPopupPosition.js +64 -0
- package/lib/helpers/index.js +6 -0
- package/lib/index.js +11 -0
- package/lib/models/index.js +9 -0
- package/lib/models/keyValueObject/index.js +7 -0
- package/lib/models/keyValueObject/keyValueObject.js +161 -0
- package/lib/models/keyValueObject/keyValueObject.spec.js +59 -0
- package/lib/models/qListBulkButton/index.js +5 -0
- package/lib/models/qListBulkButton/qListBulkButton.js +44 -0
- package/lib/models/qListButton/index.js +5 -0
- package/lib/models/qListButton/qListButton.js +241 -0
- package/lib/models/qRow/index.js +5 -0
- package/lib/models/qRow/qRow.js +212 -0
- package/lib/models/qRow/qRow.spec.js +185 -0
- package/lib/test.setup.js +15 -0
- package/package.json +70 -0
- package/vite.config.js +63 -0
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@questwork/vue-q-list-vue3",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "Questwork vue component for displaying a list",
|
|
5
|
+
"main": "dist/q-list.min.js",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Questwork Consulting Limited",
|
|
8
|
+
"email": "info@questwork.com",
|
|
9
|
+
"url": "http://www.questwork.com/"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@babel/core": "^7.17.8",
|
|
14
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
15
|
+
"@babel/preset-env": "^7.22.10",
|
|
16
|
+
"@questwork/utilities": "^0.1.51",
|
|
17
|
+
"@questwork/vue-q-buttons-vue3": "^3.1.0",
|
|
18
|
+
"@questwork/vue-q-paginator-vue3": "^3.1.0",
|
|
19
|
+
"@storybook/addon-links": "^7.3.2",
|
|
20
|
+
"@storybook/addon-viewport": "^7.3.2",
|
|
21
|
+
"@storybook/source-loader": "^7.3.2",
|
|
22
|
+
"@storybook/vue": "^7.3.2",
|
|
23
|
+
"@storybook/vue-webpack5": "^7.3.2",
|
|
24
|
+
"@storybook/vue3": "^7.3.2",
|
|
25
|
+
"@storybook/vue3-vite": "^7.3.2",
|
|
26
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
27
|
+
"babel-loader": "^8.2.4",
|
|
28
|
+
"chai": "^4.3.6",
|
|
29
|
+
"chromedriver": "^116.0.0",
|
|
30
|
+
"clean-webpack-plugin": "^3.0.0",
|
|
31
|
+
"cross-env": "^7.0.3",
|
|
32
|
+
"css-loader": "^3.6.0",
|
|
33
|
+
"eslint": "^8.47.0",
|
|
34
|
+
"eslint-plugin-storybook": "^0.9.0",
|
|
35
|
+
"eslint-plugin-vue": "^9.29.0",
|
|
36
|
+
"file-loader": "^6.2.0",
|
|
37
|
+
"gulp": "^4.0.2",
|
|
38
|
+
"mocha": "^9.2.2",
|
|
39
|
+
"rollup-plugin-license": "^3.5.3",
|
|
40
|
+
"rollup-webpack-umd": "^0.1.2",
|
|
41
|
+
"sass": "^1.49.11",
|
|
42
|
+
"sass-loader": "^8.0.2",
|
|
43
|
+
"selenium-webdriver": "^4.11.1",
|
|
44
|
+
"sinon": "^9.2.4",
|
|
45
|
+
"sinon-chai": "^3.7.0",
|
|
46
|
+
"storybook": "^7.3.2",
|
|
47
|
+
"style-loader": "^1.3.0",
|
|
48
|
+
"url-loader": "^4.1.1",
|
|
49
|
+
"vite": "^5.4.9",
|
|
50
|
+
"vite-plugin-commonjs": "^0.10.3",
|
|
51
|
+
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
52
|
+
"vue": "^3.5.12",
|
|
53
|
+
"vue-loader": "^15.9.8",
|
|
54
|
+
"vue-template-compiler": "^2.6.14",
|
|
55
|
+
"webpack": "^5.71.0",
|
|
56
|
+
"webpack-cli": "^4.9.2",
|
|
57
|
+
"webpack-merge": "^4.2.2",
|
|
58
|
+
"webpack-node-externals": "^1.7.2"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=10.0.0"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "vite build",
|
|
65
|
+
"build:storybook": "storybook build -c .storybook -o storybook",
|
|
66
|
+
"storybook": "storybook dev -p 6017",
|
|
67
|
+
"test:playground": "NODE_ENV=test mocha --no-timeouts 'lib/test.setup.js' 'lib/**/*.spec.js'",
|
|
68
|
+
"test:selenium": "NODE_ENV=test mocha --no-timeouts 'test/selenium/test.setup.js' 'test/selenium/**/*.spec.js'"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
import { libInjectCss } from 'vite-plugin-lib-inject-css'
|
|
4
|
+
import vue from '@vitejs/plugin-vue'
|
|
5
|
+
import license from 'rollup-plugin-license'
|
|
6
|
+
import commonjs from 'vite-plugin-commonjs'
|
|
7
|
+
import rewriteUmdPlugin from 'rollup-webpack-umd'
|
|
8
|
+
|
|
9
|
+
// 与 ./webpack/prod.config.js 的 output.library 名一致
|
|
10
|
+
const libName = 'QList'
|
|
11
|
+
// libName 的 kebab-case 格式
|
|
12
|
+
const fileName = 'q-list'
|
|
13
|
+
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
build: {
|
|
16
|
+
target: ['chrome100', 'safari15', 'firefox91'],
|
|
17
|
+
lib: {
|
|
18
|
+
entry: './src/index.js',
|
|
19
|
+
name: libName,
|
|
20
|
+
fileName: () => `${fileName}.min.js`,
|
|
21
|
+
formats: ['umd'],
|
|
22
|
+
},
|
|
23
|
+
rollupOptions: {
|
|
24
|
+
external: ['vue'],
|
|
25
|
+
output: {
|
|
26
|
+
globals: {
|
|
27
|
+
vue: 'Vue',
|
|
28
|
+
},
|
|
29
|
+
exports: 'named',
|
|
30
|
+
},
|
|
31
|
+
plugins: [
|
|
32
|
+
license({
|
|
33
|
+
thirdParty: {
|
|
34
|
+
output: `./dist/${fileName}.min.js.LICENSE.txt`,
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
rewriteUmdPlugin({
|
|
38
|
+
banner: `/*! For license information please see ${fileName}.min.js.LICENSE.txt */`,
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
esbuild: {
|
|
44
|
+
legalComments: 'none',
|
|
45
|
+
},
|
|
46
|
+
plugins: [
|
|
47
|
+
vue(),
|
|
48
|
+
libInjectCss(),
|
|
49
|
+
commonjs(),
|
|
50
|
+
],
|
|
51
|
+
resolve: {
|
|
52
|
+
alias: {
|
|
53
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
css: {
|
|
57
|
+
preprocessorOptions: {
|
|
58
|
+
scss: {
|
|
59
|
+
api: 'modern-compiler',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
})
|