@finema/finework-layer 0.2.77 → 0.2.79
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/.husky/pre-commit +1 -1
- package/.playground/app/assets/css/main.css +6 -6
- package/.playground/app/pages/layout-admin/[id]/index.vue +145 -145
- package/.playground/app/pages/layout-admin/test/[id]/index.vue +286 -286
- package/.playground/app/pages/layout-admin.vue +283 -285
- package/.playground/app/pages/layout-user.vue +284 -284
- package/.playground/app/pages/submenu/layout-admin.vue +210 -210
- package/.vscode/settings.json +5 -1
- package/CHANGELOG.md +382 -374
- package/app/app.config.ts +144 -144
- package/app/app.vue +10 -10
- package/app/assets/css/main.css +77 -77
- package/app/components/Button/ActionIcon.vue +29 -29
- package/app/components/Button/Back.vue +22 -22
- package/app/components/Format/Currency.vue +17 -17
- package/app/components/Format/Date.vue +24 -24
- package/app/components/Format/DateTime.vue +24 -24
- package/app/components/Format/Number.vue +17 -17
- package/app/components/Format/Percent.vue +38 -38
- package/app/components/Format/TimeFromNow.vue +38 -38
- package/app/components/InfoItemList.vue +196 -196
- package/app/components/Layout/Admin/Sidebar.vue +343 -329
- package/app/components/Layout/Admin/index.vue +240 -224
- package/app/components/Layout/Apps.vue +45 -45
- package/app/components/Layout/User/index.vue +102 -102
- package/app/components/Notifications/index.vue +162 -162
- package/app/components/StatusBox.vue +56 -56
- package/app/composables/useAuth.ts +207 -207
- package/app/composables/useNotification.ts +76 -76
- package/app/composables/useRequestOptions.ts +86 -86
- package/app/constants/routes.ts +86 -86
- package/app/error.vue +218 -218
- package/app/middleware/auth.ts +45 -45
- package/app/middleware/common.ts +12 -12
- package/app/middleware/guest.ts +7 -7
- package/app/middleware/permissions.ts +29 -29
- package/bun.lock +2758 -2758
- package/eslint.config.js +206 -2
- package/index.d.ts +16 -16
- package/nuxt.config.ts +41 -41
- package/package.json +38 -38
package/eslint.config.js
CHANGED
|
@@ -1,5 +1,209 @@
|
|
|
1
1
|
// @ts-no-check
|
|
2
2
|
import withNuxt from './.playground/.nuxt/eslint.config.mjs'
|
|
3
|
-
import
|
|
3
|
+
import eslintPluginBetterTailwindcss from 'eslint-plugin-better-tailwindcss'
|
|
4
|
+
import unusedImports from 'eslint-plugin-unused-imports'
|
|
4
5
|
|
|
5
|
-
export default withNuxt(
|
|
6
|
+
export default withNuxt({
|
|
7
|
+
plugins: {
|
|
8
|
+
'unused-imports': unusedImports,
|
|
9
|
+
'better-tailwindcss': eslintPluginBetterTailwindcss,
|
|
10
|
+
},
|
|
11
|
+
settings: {},
|
|
12
|
+
rules: {
|
|
13
|
+
...eslintPluginBetterTailwindcss.configs['recommended-error'].rules,
|
|
14
|
+
'better-tailwindcss/no-unregistered-classes': 'off',
|
|
15
|
+
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
16
|
+
'unused-imports/no-unused-imports': 'error',
|
|
17
|
+
'@stylistic/object-property-newline': 'error',
|
|
18
|
+
'@stylistic/object-curly-newline': [
|
|
19
|
+
'error',
|
|
20
|
+
{
|
|
21
|
+
ObjectExpression: {
|
|
22
|
+
multiline: true,
|
|
23
|
+
minProperties: 1,
|
|
24
|
+
consistent: true,
|
|
25
|
+
},
|
|
26
|
+
ObjectPattern: {
|
|
27
|
+
multiline: true,
|
|
28
|
+
minProperties: 1,
|
|
29
|
+
consistent: true,
|
|
30
|
+
},
|
|
31
|
+
ImportDeclaration: {
|
|
32
|
+
multiline: true,
|
|
33
|
+
consistent: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
'@stylistic/template-curly-spacing': 'error',
|
|
38
|
+
'@stylistic/brace-style': [
|
|
39
|
+
'error',
|
|
40
|
+
'1tbs',
|
|
41
|
+
{
|
|
42
|
+
allowSingleLine: true,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
'@stylistic/max-len': [
|
|
46
|
+
'error',
|
|
47
|
+
{
|
|
48
|
+
code: 120,
|
|
49
|
+
ignoreTrailingComments: true,
|
|
50
|
+
ignoreRegExpLiterals: true,
|
|
51
|
+
ignoreUrls: true,
|
|
52
|
+
ignoreStrings: true,
|
|
53
|
+
ignoreTemplateLiterals: true,
|
|
54
|
+
ignorePattern: '^\\s*(<[a-zA-Z]+\\s|d="[^"]*"|[a-zA-Z-]+="[^"]*")',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
'vue/max-len': [
|
|
58
|
+
'error',
|
|
59
|
+
{
|
|
60
|
+
code: 120,
|
|
61
|
+
ignoreTrailingComments: true,
|
|
62
|
+
ignoreRegExpLiterals: true,
|
|
63
|
+
ignoreUrls: true,
|
|
64
|
+
ignoreStrings: true,
|
|
65
|
+
ignoreTemplateLiterals: true,
|
|
66
|
+
ignorePattern: '^\\s*(<[a-zA-Z]+\\s|d="[^"]*"|[a-zA-Z-]+="[^"]*")',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
'vue/multiline-html-element-content-newline': [
|
|
70
|
+
'error',
|
|
71
|
+
{
|
|
72
|
+
ignoreWhenEmpty: true,
|
|
73
|
+
allowEmptyLines: false,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
'@stylistic/indent': ['error', 2],
|
|
77
|
+
'@stylistic/indent-binary-ops': ['error', 2],
|
|
78
|
+
'@stylistic/array-element-newline': ['error', 'consistent'],
|
|
79
|
+
'vue/array-element-newline': ['error', 'consistent'],
|
|
80
|
+
'@stylistic/multiline-ternary': ['error', 'always-multiline'],
|
|
81
|
+
'vue/multiline-ternary': ['error', 'always-multiline'],
|
|
82
|
+
'@stylistic/arrow-parens': ['error', 'always'],
|
|
83
|
+
'@stylistic/func-call-spacing': 'off',
|
|
84
|
+
'@stylistic/no-multi-spaces': 'error',
|
|
85
|
+
'@stylistic/operator-linebreak': 'error',
|
|
86
|
+
'@stylistic/nonblock-statement-body-position': 'error',
|
|
87
|
+
'@stylistic/padding-line-between-statements': [
|
|
88
|
+
'error',
|
|
89
|
+
{
|
|
90
|
+
blankLine: 'always',
|
|
91
|
+
prev: ['block-like', 'multiline-expression', 'multiline-const', 'multiline-let'],
|
|
92
|
+
next: '*',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
blankLine: 'always',
|
|
96
|
+
prev: '*',
|
|
97
|
+
next: ['block-like', 'export', 'break'],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
blankLine: 'always',
|
|
101
|
+
prev: ['const', 'let'],
|
|
102
|
+
next: 'expression',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
blankLine: 'always',
|
|
106
|
+
prev: '*',
|
|
107
|
+
next: 'return',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
'tailwindcss/no-custom-classname': 'off',
|
|
111
|
+
'@typescript-eslint/unified-signatures': 'off',
|
|
112
|
+
'@typescript-eslint/no-floating-promises': 'off',
|
|
113
|
+
'@typescript-eslint/no-require-imports': 'warn',
|
|
114
|
+
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
115
|
+
'@typescript-eslint/consistent-type-assertions': 'off',
|
|
116
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
117
|
+
'@typescript-eslint/no-empty-object-type': 'warn',
|
|
118
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
119
|
+
'@typescript-eslint/no-extraneous-class': 'off',
|
|
120
|
+
'@typescript-eslint/no-misused-promises': 'off',
|
|
121
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
122
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
123
|
+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
124
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
125
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
126
|
+
'@typescript-eslint/return-await': 'off',
|
|
127
|
+
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
128
|
+
'@typescript-eslint/triple-slash-reference': 'off',
|
|
129
|
+
'func-style': 'error',
|
|
130
|
+
'prefer-arrow-callback': 'error',
|
|
131
|
+
'no-param-reassign': 'error',
|
|
132
|
+
'dot-notation': 'error',
|
|
133
|
+
'no-else-return': 'error',
|
|
134
|
+
'no-multi-assign': 'error',
|
|
135
|
+
'radix': 'error',
|
|
136
|
+
'no-new-wrappers': 'error',
|
|
137
|
+
'no-case-declarations': 'error',
|
|
138
|
+
'no-unneeded-ternary': 'error',
|
|
139
|
+
'import/named': 'off',
|
|
140
|
+
'import/namespace': 'off',
|
|
141
|
+
'import/newline-after-import': 'error',
|
|
142
|
+
'import/no-named-as-default-member': 'off',
|
|
143
|
+
'no-prototype-builtins': 'off',
|
|
144
|
+
'no-useless-escape': 'off',
|
|
145
|
+
'prefer-regex-literals': 'off',
|
|
146
|
+
'require-await': 'off',
|
|
147
|
+
'vue/html-self-closing': [
|
|
148
|
+
'error',
|
|
149
|
+
{
|
|
150
|
+
html: {
|
|
151
|
+
void: 'always',
|
|
152
|
+
normal: 'always',
|
|
153
|
+
component: 'always',
|
|
154
|
+
},
|
|
155
|
+
svg: 'any',
|
|
156
|
+
math: 'any',
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
'vue/eqeqeq': 'error',
|
|
160
|
+
'vue/html-closing-bracket-newline': 'error',
|
|
161
|
+
'vue/multi-word-component-names': 'off',
|
|
162
|
+
'vue/no-multiple-template-root': 'off',
|
|
163
|
+
'vue/no-reserved-props': [
|
|
164
|
+
'error',
|
|
165
|
+
{
|
|
166
|
+
vueVersion: 3,
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
'vue/no-v-for-template-key': 'off',
|
|
170
|
+
'vue/no-v-html': 'off',
|
|
171
|
+
'vue/no-v-model-argument': 'off',
|
|
172
|
+
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
173
|
+
'vue/block-lang': [
|
|
174
|
+
'error',
|
|
175
|
+
{
|
|
176
|
+
script: {
|
|
177
|
+
lang: ['ts', 'tsx'],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
182
|
+
'vue/require-default-prop': 'off',
|
|
183
|
+
'vue/no-ref-object-reactivity-loss': 'error',
|
|
184
|
+
'vue/v-on-event-hyphenation': 'off',
|
|
185
|
+
'vue/object-curly-newline': [
|
|
186
|
+
'error',
|
|
187
|
+
{
|
|
188
|
+
ObjectExpression: {
|
|
189
|
+
multiline: true,
|
|
190
|
+
minProperties: 3,
|
|
191
|
+
consistent: true,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
'vue/object-property-newline': [
|
|
196
|
+
'error',
|
|
197
|
+
{
|
|
198
|
+
allowAllPropertiesOnSameLine: false,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
'vue/define-macros-order': [
|
|
202
|
+
'error',
|
|
203
|
+
{
|
|
204
|
+
order: ['defineEmits', 'defineProps', 'defineOptions', 'defineSlots', 'defineExpose'],
|
|
205
|
+
defineExposeLast: false,
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
})
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { IStatus } from '#core/types/lib'
|
|
2
|
-
import { ArrayHelper } from '#core/utils/ArrayHelper'
|
|
3
|
-
import { NumberHelper } from '#core/utils/NumberHelper'
|
|
4
|
-
import { StringHelper } from '#core/utils/StringHelper'
|
|
5
|
-
|
|
6
|
-
export {}
|
|
7
|
-
|
|
8
|
-
declare global {
|
|
9
|
-
export type { IStatus }
|
|
10
|
-
|
|
11
|
-
export { NumberHelper }
|
|
12
|
-
|
|
13
|
-
export { StringHelper }
|
|
14
|
-
|
|
15
|
-
export { ArrayHelper }
|
|
16
|
-
}
|
|
1
|
+
import type { IStatus } from '#core/types/lib'
|
|
2
|
+
import { ArrayHelper } from '#core/utils/ArrayHelper'
|
|
3
|
+
import { NumberHelper } from '#core/utils/NumberHelper'
|
|
4
|
+
import { StringHelper } from '#core/utils/StringHelper'
|
|
5
|
+
|
|
6
|
+
export {}
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
export type { IStatus }
|
|
10
|
+
|
|
11
|
+
export { NumberHelper }
|
|
12
|
+
|
|
13
|
+
export { StringHelper }
|
|
14
|
+
|
|
15
|
+
export { ArrayHelper }
|
|
16
|
+
}
|
package/nuxt.config.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { createResolver } from '@nuxt/kit'
|
|
2
|
-
import { fileURLToPath } from 'node:url'
|
|
3
|
-
import { dirname, join } from 'node:path'
|
|
4
|
-
|
|
5
|
-
const currentDir = dirname(fileURLToPath(import.meta.url))
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
resolve,
|
|
9
|
-
} = createResolver(import.meta.url)
|
|
10
|
-
|
|
11
|
-
export default defineNuxtConfig({
|
|
12
|
-
modules: ['@nuxt/eslint', '@nuxt/test-utils', '@finema/core'],
|
|
13
|
-
imports: {
|
|
14
|
-
dirs: ['./constants', './loaders', './loaders/pmo', './helpers', './types'],
|
|
15
|
-
},
|
|
16
|
-
devtools: {
|
|
17
|
-
enabled: true,
|
|
18
|
-
},
|
|
19
|
-
css: [join(currentDir, './app/assets/css/main.css'), '@vuepic/vue-datepicker/dist/main.css'],
|
|
20
|
-
alias: {
|
|
21
|
-
'#layer': resolve('./'),
|
|
22
|
-
},
|
|
23
|
-
build: {
|
|
24
|
-
transpile: ['@vuepic/vue-datepicker'],
|
|
25
|
-
},
|
|
26
|
-
compatibilityDate: '2025-07-15',
|
|
27
|
-
vite: {
|
|
28
|
-
optimizeDeps: {
|
|
29
|
-
include: [
|
|
30
|
-
'@vue/devtools-kit',
|
|
31
|
-
'@vue/devtools-core',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
eslint: {
|
|
36
|
-
config: {
|
|
37
|
-
stylistic: true,
|
|
38
|
-
tooling: true,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
})
|
|
1
|
+
import { createResolver } from '@nuxt/kit'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { dirname, join } from 'node:path'
|
|
4
|
+
|
|
5
|
+
const currentDir = dirname(fileURLToPath(import.meta.url))
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
resolve,
|
|
9
|
+
} = createResolver(import.meta.url)
|
|
10
|
+
|
|
11
|
+
export default defineNuxtConfig({
|
|
12
|
+
modules: ['@nuxt/eslint', '@nuxt/test-utils', '@finema/core'],
|
|
13
|
+
imports: {
|
|
14
|
+
dirs: ['./constants', './loaders', './loaders/pmo', './helpers', './types'],
|
|
15
|
+
},
|
|
16
|
+
devtools: {
|
|
17
|
+
enabled: true,
|
|
18
|
+
},
|
|
19
|
+
css: [join(currentDir, './app/assets/css/main.css'), '@vuepic/vue-datepicker/dist/main.css'],
|
|
20
|
+
alias: {
|
|
21
|
+
'#layer': resolve('./'),
|
|
22
|
+
},
|
|
23
|
+
build: {
|
|
24
|
+
transpile: ['@vuepic/vue-datepicker'],
|
|
25
|
+
},
|
|
26
|
+
compatibilityDate: '2025-07-15',
|
|
27
|
+
vite: {
|
|
28
|
+
optimizeDeps: {
|
|
29
|
+
include: [
|
|
30
|
+
'@vue/devtools-kit',
|
|
31
|
+
'@vue/devtools-core',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
eslint: {
|
|
36
|
+
config: {
|
|
37
|
+
stylistic: true,
|
|
38
|
+
tooling: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
})
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@finema/finework-layer",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
5
|
-
"main": "./nuxt.config.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "nuxi dev .playground -o",
|
|
8
|
-
"dev:prepare": "nuxt prepare .playground",
|
|
9
|
-
"build": "nuxt build .playground",
|
|
10
|
-
"generate": "nuxt generate .playground",
|
|
11
|
-
"preview": "nuxt preview .playground",
|
|
12
|
-
"lint": "eslint . --cache",
|
|
13
|
-
"lint:fix": "eslint --fix . --cache",
|
|
14
|
-
"release": "release-it --ci",
|
|
15
|
-
"prepare": "husky",
|
|
16
|
-
"postinstall": "nuxt prepare .playground"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@finema/eslint-config": "^2.0.3",
|
|
20
|
-
"@iconify-json/ph": "^1.2.2",
|
|
21
|
-
"@nuxt/eslint": "latest",
|
|
22
|
-
"@nuxt/test-utils": "^3.19.2",
|
|
23
|
-
"@release-it/conventional-changelog": "^10.0.1",
|
|
24
|
-
"@types/node": "^24.7.0",
|
|
25
|
-
"husky": "^9.1.7",
|
|
26
|
-
"lint-staged": "^16.1.2",
|
|
27
|
-
"nuxt": "^4.1.3",
|
|
28
|
-
"release-it": "^19.0.5",
|
|
29
|
-
"typescript": "^5.9.3",
|
|
30
|
-
"vue": "latest"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@finema/core": "^3.1.0"
|
|
34
|
-
},
|
|
35
|
-
"lint-staged": {
|
|
36
|
-
"*": "eslint"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@finema/finework-layer",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.2.79",
|
|
5
|
+
"main": "./nuxt.config.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "nuxi dev .playground -o",
|
|
8
|
+
"dev:prepare": "nuxt prepare .playground",
|
|
9
|
+
"build": "nuxt build .playground",
|
|
10
|
+
"generate": "nuxt generate .playground",
|
|
11
|
+
"preview": "nuxt preview .playground",
|
|
12
|
+
"lint": "eslint . --cache",
|
|
13
|
+
"lint:fix": "eslint --fix . --cache",
|
|
14
|
+
"release": "release-it --ci",
|
|
15
|
+
"prepare": "husky",
|
|
16
|
+
"postinstall": "nuxt prepare .playground"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@finema/eslint-config": "^2.0.3",
|
|
20
|
+
"@iconify-json/ph": "^1.2.2",
|
|
21
|
+
"@nuxt/eslint": "latest",
|
|
22
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
23
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
24
|
+
"@types/node": "^24.7.0",
|
|
25
|
+
"husky": "^9.1.7",
|
|
26
|
+
"lint-staged": "^16.1.2",
|
|
27
|
+
"nuxt": "^4.1.3",
|
|
28
|
+
"release-it": "^19.0.5",
|
|
29
|
+
"typescript": "^5.9.3",
|
|
30
|
+
"vue": "latest"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@finema/core": "^3.1.0"
|
|
34
|
+
},
|
|
35
|
+
"lint-staged": {
|
|
36
|
+
"*": "eslint"
|
|
37
|
+
}
|
|
38
|
+
}
|