w-web-perm 1.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.
Files changed (101) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +55 -0
  4. package/.github/workflows/ci-test.yml +24 -0
  5. package/.jsdoc +25 -0
  6. package/.vscode/launch.json +21 -0
  7. package/LICENSE +21 -0
  8. package/README.md +24 -0
  9. package/SECURITY.md +5 -0
  10. package/babel.config.js +15 -0
  11. package/dist/css/app.79b4b59b.css +1 -0
  12. package/dist/css/chunk-vendors.65775501.css +5 -0
  13. package/dist/index.tmp +1 -0
  14. package/dist/js/app-legacy.954e168c.js +2 -0
  15. package/dist/js/app-legacy.954e168c.js.map +1 -0
  16. package/dist/js/app.954e168c.js +2 -0
  17. package/dist/js/app.954e168c.js.map +1 -0
  18. package/dist/js/chunk-vendors-legacy.f5f1a231.js +13 -0
  19. package/dist/js/chunk-vendors-legacy.f5f1a231.js.map +1 -0
  20. package/dist/js/chunk-vendors.f5f1a231.js +13 -0
  21. package/dist/js/chunk-vendors.f5f1a231.js.map +1 -0
  22. package/dist/w-web-perm.umd.js +7 -0
  23. package/dist/w-web-perm.umd.js.map +1 -0
  24. package/docs/WWebPerm.html +826 -0
  25. package/docs/WWebPerm.mjs.html +558 -0
  26. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  27. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  28. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  29. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  30. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  31. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  32. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  33. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  34. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  35. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  36. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  37. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  38. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  39. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  40. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  42. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  43. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  44. package/docs/index.html +84 -0
  45. package/docs/scripts/collapse.js +39 -0
  46. package/docs/scripts/commonNav.js +28 -0
  47. package/docs/scripts/linenumber.js +25 -0
  48. package/docs/scripts/nav.js +12 -0
  49. package/docs/scripts/polyfill.js +4 -0
  50. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  51. package/docs/scripts/prettify/lang-css.js +2 -0
  52. package/docs/scripts/prettify/prettify.js +28 -0
  53. package/docs/scripts/search.js +99 -0
  54. package/docs/styles/jsdoc.css +776 -0
  55. package/docs/styles/prettify.css +80 -0
  56. package/g.getSettings.mjs +17 -0
  57. package/g.mDb.mjs +10 -0
  58. package/g.mInitialTestData.mjs +20 -0
  59. package/g.mOrm.mjs +24 -0
  60. package/package.json +75 -0
  61. package/public/index.html +23 -0
  62. package/server/WWebPerm.mjs +486 -0
  63. package/src/App.vue +153 -0
  64. package/src/components/Common/CheckYes.vue +85 -0
  65. package/src/components/Common/CheckYesNo.vue +91 -0
  66. package/src/components/Common/LabelItem.vue +106 -0
  67. package/src/components/Common/LoadingWinBar.vue +87 -0
  68. package/src/components/Layout.vue +152 -0
  69. package/src/components/LayoutContent.vue +246 -0
  70. package/src/components/LayoutContentGroups.vue +664 -0
  71. package/src/components/LayoutContentTargets.vue +538 -0
  72. package/src/components/LayoutContentUsers.vue +493 -0
  73. package/src/components/LayoutState.vue +91 -0
  74. package/src/components/VeUser.vue +453 -0
  75. package/src/components/ruleGroup.vue +667 -0
  76. package/src/main.js +103 -0
  77. package/src/perm.mjs +61 -0
  78. package/src/plugins/mDataSelectorSchema.mjs +30 -0
  79. package/src/plugins/mDataSupport.mjs +66 -0
  80. package/src/plugins/mShare.mjs +366 -0
  81. package/src/plugins/mUI.mjs +229 -0
  82. package/src/plugins/mVuetify.mjs +12 -0
  83. package/src/schema/gi.mjs +8 -0
  84. package/src/schema/index.mjs +20 -0
  85. package/src/schema/tables/ruleGroups.mjs +100 -0
  86. package/src/schema/tables/targets.mjs +100 -0
  87. package/src/schema/tables/users.mjs +125 -0
  88. package/src/store/actions.mjs +1 -0
  89. package/src/store/getters.mjs +1 -0
  90. package/src/store/index.mjs +25 -0
  91. package/src/store/mutations.mjs +201 -0
  92. package/src/store/types.mjs +15 -0
  93. package/srv.mjs +52 -0
  94. package/tableTags-web-perm.json +1 -0
  95. package/test/all.test.mjs +10 -0
  96. package/toolg/addVersion.mjs +4 -0
  97. package/toolg/cleanFolder.mjs +4 -0
  98. package/toolg/gDistRollup.mjs +36 -0
  99. package/toolg/genEntry.mjs +23 -0
  100. package/toolg/modifyReadme.mjs +4 -0
  101. package/vue.config.js +15 -0
package/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 4
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
package/.eslintignore ADDED
@@ -0,0 +1,3 @@
1
+ /build/
2
+ /config/
3
+ /dist/
package/.eslintrc.js ADDED
@@ -0,0 +1,55 @@
1
+ module.exports = {
2
+ 'env': {
3
+ 'browser': true,
4
+ 'es6': true,
5
+ 'mocha': true
6
+ },
7
+ 'extends': ['plugin:vue/base', 'plugin:vue/essential', 'standard'],
8
+ 'plugins': [
9
+ 'vue'
10
+ ],
11
+ 'globals': {
12
+ 'Atomics': 'readonly',
13
+ 'SharedArrayBuffer': 'readonly'
14
+ },
15
+ 'parser': 'vue-eslint-parser',
16
+ 'parserOptions': {
17
+ 'parser': '@babel/eslint-parser',
18
+ 'ecmaVersion': 2019,
19
+ 'sourceType': 'module',
20
+ },
21
+ 'rules': {
22
+ 'generator-star-spacing': 'off',
23
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
24
+ 'indent': ['error', 4],
25
+ 'no-console': 'off',
26
+ 'comma-dangle': ['error', {
27
+ 'arrays': 'ignore',
28
+ 'objects': 'ignore',
29
+ 'imports': 'never',
30
+ 'exports': 'never',
31
+ 'functions': 'ignore'
32
+ }],
33
+ 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 2 }],
34
+ //'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never' }],
35
+ 'space-before-function-paren': 'off',
36
+ 'spaced-comment': 'off',
37
+ 'brace-style': ['error', 'stroustrup'],
38
+ 'padded-blocks': 'off',
39
+ 'no-constant-condition': 'off',
40
+ 'camelcase': 'off',
41
+ 'no-new': 'off',
42
+ 'prefer-const': 'off',
43
+ 'quote-props': ['error', 'consistent'],
44
+ 'dot-notation': 'off',
45
+ 'standard/no-callback-literal': 'off',
46
+ 'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
47
+ 'prefer-promise-reject-errors': 'off',
48
+ 'no-unused-vars': ['error', { 'args': 'none', 'ignoreRestSiblings': true, 'argsIgnorePattern': '^_' }],
49
+ 'node/no-callback-literal': 'off',
50
+ 'prefer-regex-literals': 'off',
51
+ 'array-callback-return': 'off',
52
+ 'no-unreachable-loop': 'off',
53
+ 'vue/multi-word-component-names': 'off',
54
+ }
55
+ }
@@ -0,0 +1,24 @@
1
+ name: Node.js CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ matrix:
12
+ node-version: [18.x]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Use Node.js ${{ matrix.node-version }}
17
+ uses: actions/setup-node@v1
18
+ with:
19
+ node-version: ${{ matrix.node-version }}
20
+ - run: npm cache clean -f
21
+ - run: npm install
22
+ - run: npm test
23
+ env:
24
+ CI: true
package/.jsdoc ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "tags": {
3
+ "allowUnknownTags": false
4
+ },
5
+ "source": {
6
+ "include": ["src/", "server/"],
7
+ "includePattern": ".+\\.(js(doc|x)?|mjs|vue)$",
8
+ "excludePattern": "(node_modules/|docs)"
9
+ },
10
+ "plugins": [
11
+ "plugins/markdown",
12
+ "node_modules/jsdoc-vuejs"
13
+ ],
14
+ "opts": {
15
+ "template": "node_modules/docdash",
16
+ "encoding": "utf8",
17
+ "destination": "docs/",
18
+ "recurse": true,
19
+ "verbose": true
20
+ },
21
+ "templates": {
22
+ "cleverLinks": false,
23
+ "monospaceLinks": false
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ // 使用 IntelliSense 以得知可用的屬性。
3
+ // 暫留以檢視現有屬性的描述。
4
+ // 如需詳細資訊,請瀏覽: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ "name": "啟動程式",
11
+ "skipFiles": [
12
+ "<node_internals>/**"
13
+ ],
14
+ "program": "${workspaceFolder}/srv.mjs",
15
+ "runtimeArgs": [
16
+ "--experimental-modules",
17
+ "--es-module-specifier-resolution=node"
18
+ ]
19
+ }
20
+ ]
21
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 semisphere(yu-da, lyu 呂昱達)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # w-web-perm
2
+ A web service for permissions.
3
+
4
+ ![language](https://img.shields.io/badge/language-JavaScript-orange.svg)
5
+ [![npm version](http://img.shields.io/npm/v/w-web-perm.svg?style=flat)](https://npmjs.org/package/w-web-perm)
6
+ [![license](https://img.shields.io/npm/l/w-web-perm.svg?style=flat)](https://npmjs.org/package/w-web-perm)
7
+ [![gzip file size](http://img.badgesize.io/yuda-lyu/w-web-perm/master/dist/w-web-perm-server.umd.js.svg?compression=gzip)](https://github.com/yuda-lyu/w-web-perm)
8
+ [![npm download](https://img.shields.io/npm/dt/w-web-perm.svg)](https://npmjs.org/package/w-web-perm)
9
+ [![jsdelivr download](https://img.shields.io/jsdelivr/npm/hm/w-web-perm.svg)](https://www.jsdelivr.com/package/npm/w-web-perm)
10
+
11
+ ## Documentation
12
+ To view documentation or get support, visit [docs](https://yuda-lyu.github.io/w-web-perm/WWebPerm.html).
13
+
14
+ ## Installation
15
+ ### Using npm(ES6 module):
16
+ ```alias
17
+ npm i w-web-perm
18
+ ```
19
+
20
+ #### Example for server:
21
+ > **Link:** [[dev source code](https://github.com/yuda-lyu/w-web-perm/blob/master/srv.mjs)]
22
+ ```alias
23
+
24
+ ```
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Please report security issues to `firsemisphere@gmail.com`
@@ -0,0 +1,15 @@
1
+ module.exports = {
2
+ 'presets': [
3
+ ['@babel/preset-env', {
4
+ 'useBuiltIns': 'entry',
5
+ 'corejs': 3
6
+ }]
7
+ ],
8
+ 'plugins': [
9
+ '@babel/plugin-transform-runtime',
10
+ '@babel/plugin-syntax-import-assertions',
11
+ '@babel/plugin-proposal-export-default-from',
12
+ '@babel/plugin-proposal-nullish-coalescing-operator',
13
+ '@babel/plugin-proposal-optional-chaining'
14
+ ]
15
+ }
@@ -0,0 +1 @@
1
+ body,html{font-family:微軟正黑體,Microsoft JhengHei,MicrosoftJhengHeiRegular,Avenir,Helvetica,Arial,sans-serif;overflow-y:hidden}.v-application,.v-application--wrap,a,button,div,input,p,pre,span,textarea{font-family:inherit}.v-chip{cursor:inherit}.fade-enter-active{-webkit-animation:go 1s;animation:go 1s}.fade-leave-active{-webkit-animation:back 1s;animation:back 1s}@-webkit-keyframes go{0%{opacity:0}to{opacity:1}}@keyframes go{0%{opacity:0}to{opacity:1}}@-webkit-keyframes back{0%{opacity:1}to{opacity:0}}@keyframes back{0%{opacity:1}to{opacity:0}}