@naptics/vue-collection 1.0.0-beta.1 → 1.0.0-beta.2
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/lib/components/NAlert.d.ts +29 -0
- package/lib/components/NAlert.js +84 -0
- package/lib/components/NBadge.d.ts +73 -0
- package/lib/components/NBadge.js +64 -0
- package/lib/components/NBreadcrub.d.ts +69 -0
- package/lib/components/NBreadcrub.js +71 -0
- package/lib/components/NButton.d.ts +64 -0
- package/lib/components/NButton.js +70 -0
- package/lib/components/NCheckbox.d.ts +20 -0
- package/lib/components/NCheckbox.js +43 -0
- package/lib/components/NCheckboxLabel.d.ts +26 -0
- package/lib/components/NCheckboxLabel.js +42 -0
- package/lib/components/NCrudModal.d.ts +118 -0
- package/lib/components/NCrudModal.js +120 -0
- package/lib/components/NDialog.d.ts +81 -0
- package/lib/components/NDialog.js +161 -0
- package/lib/components/NDropdown.d.ts +67 -0
- package/lib/components/NDropdown.js +115 -0
- package/lib/components/NDropzone.d.ts +61 -0
- package/lib/components/NDropzone.js +218 -0
- package/lib/components/NForm.d.ts +21 -0
- package/lib/components/NForm.js +29 -0
- package/lib/components/NFormModal.d.ts +75 -0
- package/lib/components/NFormModal.js +59 -0
- package/lib/components/NIconButton.d.ts +83 -0
- package/lib/components/NIconButton.js +88 -0
- package/lib/components/NIconCircle.d.ts +49 -0
- package/lib/components/NIconCircle.js +67 -0
- package/lib/components/NInput.d.ts +94 -0
- package/lib/components/NInput.js +110 -0
- package/lib/components/NInputPhone.d.ts +58 -0
- package/lib/components/NInputPhone.js +47 -0
- package/lib/components/NInputSelect.d.ts +103 -0
- package/lib/components/NInputSelect.js +115 -0
- package/lib/components/NInputSuggestion.d.ts +79 -0
- package/lib/components/NInputSuggestion.js +64 -0
- package/lib/components/NLink.d.ts +47 -0
- package/lib/components/NLink.js +67 -0
- package/lib/components/NList.d.ts +37 -0
- package/lib/components/NList.js +40 -0
- package/lib/components/NLoadingIndicator.d.ts +29 -0
- package/lib/components/NLoadingIndicator.js +54 -0
- package/lib/components/NModal.d.ts +133 -0
- package/lib/components/NModal.js +235 -0
- package/{src/lib → lib}/components/NPagination.css +1 -1
- package/lib/components/NPagination.d.ts +37 -0
- package/lib/components/NPagination.js +105 -0
- package/lib/components/NSearchbar.d.ts +39 -0
- package/lib/components/NSearchbar.js +64 -0
- package/lib/components/NSearchbarList.d.ts +33 -0
- package/lib/components/NSearchbarList.js +41 -0
- package/lib/components/NSelect.d.ts +82 -0
- package/lib/components/NSelect.js +101 -0
- package/lib/components/NSuggestionList.d.ts +153 -0
- package/lib/components/NSuggestionList.js +160 -0
- package/{src/lib → lib}/components/NTable.css +1 -1
- package/lib/components/NTable.d.ts +97 -0
- package/lib/components/NTable.js +128 -0
- package/lib/components/NTableAction.d.ts +30 -0
- package/lib/components/NTableAction.js +50 -0
- package/lib/components/NTextArea.d.ts +96 -0
- package/lib/components/NTextArea.js +133 -0
- package/{src/lib → lib}/components/NTooltip.css +1 -1
- package/lib/components/NTooltip.d.ts +152 -0
- package/lib/components/NTooltip.js +241 -0
- package/lib/components/NValInput.d.ts +156 -0
- package/lib/components/NValInput.js +113 -0
- package/lib/components/ValidatedForm.d.ts +39 -0
- package/lib/components/ValidatedForm.js +35 -0
- package/{src/lib/i18n/index.ts → lib/i18n/index.d.ts} +9 -23
- package/lib/i18n/index.js +31 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/utils/breakpoints.d.ts +18 -0
- package/lib/utils/breakpoints.js +40 -0
- package/lib/utils/component.d.ts +57 -0
- package/lib/utils/component.js +79 -0
- package/lib/utils/deferred.d.ts +13 -0
- package/lib/utils/deferred.js +17 -0
- package/lib/utils/identifiable.d.ts +56 -0
- package/lib/utils/identifiable.js +81 -0
- package/lib/utils/stringMaxLength.d.ts +14 -0
- package/lib/utils/stringMaxLength.js +23 -0
- package/lib/utils/tailwind.d.ts +4 -0
- package/lib/utils/tailwind.js +1 -0
- package/lib/utils/utils.d.ts +47 -0
- package/lib/utils/utils.js +56 -0
- package/{src/lib/utils/vModel.ts → lib/utils/vModel.d.ts} +48 -126
- package/lib/utils/vModel.js +224 -0
- package/lib/utils/validation.d.ts +90 -0
- package/lib/utils/validation.js +147 -0
- package/lib/utils/vue.d.ts +13 -0
- package/lib/utils/vue.js +21 -0
- package/package.json +6 -2
- package/.github/workflows/build.yml +0 -26
- package/.github/workflows/deploy-demo.yml +0 -46
- package/.github/workflows/deploy-lib.yml +0 -59
- package/.gitlab-ci.yml +0 -57
- package/.nvmrc +0 -1
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +0 -10
- package/.vscode/launch.json +0 -23
- package/.vscode/settings.json +0 -13
- package/babel.config.json +0 -3
- package/env.d.ts +0 -15
- package/eslint.config.cjs +0 -27
- package/index.html +0 -13
- package/postcss.config.js +0 -3
- package/public/favicon.ico +0 -0
- package/scripts/build-lib.sh +0 -52
- package/scripts/sync-node-types.js +0 -70
- package/src/demo/App.css +0 -53
- package/src/demo/App.tsx +0 -5
- package/src/demo/components/ColorGrid.tsx +0 -26
- package/src/demo/components/ComponentGrid.tsx +0 -26
- package/src/demo/components/ComponentSection.tsx +0 -30
- package/src/demo/components/VariantSection.tsx +0 -18
- package/src/demo/i18n/de.ts +0 -7
- package/src/demo/i18n/en.ts +0 -7
- package/src/demo/i18n/index.ts +0 -24
- package/src/demo/main.ts +0 -13
- package/src/demo/router/index.ts +0 -21
- package/src/demo/views/HomeView.tsx +0 -94
- package/src/demo/views/NavigationView.tsx +0 -43
- package/src/demo/views/presentation/AlertView.tsx +0 -40
- package/src/demo/views/presentation/BadgeView.tsx +0 -61
- package/src/demo/views/presentation/BreadcrumbView.tsx +0 -52
- package/src/demo/views/presentation/ButtonView.tsx +0 -49
- package/src/demo/views/presentation/CheckboxView.tsx +0 -59
- package/src/demo/views/presentation/DropdownView.tsx +0 -59
- package/src/demo/views/presentation/DropzoneView.tsx +0 -39
- package/src/demo/views/presentation/IconButtonView.tsx +0 -47
- package/src/demo/views/presentation/IconCircleView.tsx +0 -38
- package/src/demo/views/presentation/InputView.tsx +0 -179
- package/src/demo/views/presentation/LinkView.tsx +0 -60
- package/src/demo/views/presentation/ListView.tsx +0 -29
- package/src/demo/views/presentation/LoadingIndicatorView.tsx +0 -38
- package/src/demo/views/presentation/ModalView.tsx +0 -210
- package/src/demo/views/presentation/PaginationView.tsx +0 -25
- package/src/demo/views/presentation/SearchbarView.tsx +0 -80
- package/src/demo/views/presentation/TableView.tsx +0 -146
- package/src/demo/views/presentation/TooltipView.tsx +0 -92
- package/src/lib/components/NAlert.tsx +0 -85
- package/src/lib/components/NBadge.tsx +0 -75
- package/src/lib/components/NBreadcrub.tsx +0 -97
- package/src/lib/components/NButton.tsx +0 -82
- package/src/lib/components/NCheckbox.tsx +0 -55
- package/src/lib/components/NCheckboxLabel.tsx +0 -51
- package/src/lib/components/NCrudModal.tsx +0 -133
- package/src/lib/components/NDialog.tsx +0 -182
- package/src/lib/components/NDropdown.tsx +0 -169
- package/src/lib/components/NDropzone.tsx +0 -265
- package/src/lib/components/NForm.tsx +0 -32
- package/src/lib/components/NFormModal.tsx +0 -66
- package/src/lib/components/NIconButton.tsx +0 -92
- package/src/lib/components/NIconCircle.tsx +0 -78
- package/src/lib/components/NInput.tsx +0 -139
- package/src/lib/components/NInputPhone.tsx +0 -53
- package/src/lib/components/NInputSelect.tsx +0 -126
- package/src/lib/components/NInputSuggestion.tsx +0 -80
- package/src/lib/components/NLink.tsx +0 -82
- package/src/lib/components/NList.tsx +0 -67
- package/src/lib/components/NLoadingIndicator.tsx +0 -63
- package/src/lib/components/NModal.tsx +0 -243
- package/src/lib/components/NPagination.tsx +0 -131
- package/src/lib/components/NSearchbar.tsx +0 -78
- package/src/lib/components/NSearchbarList.tsx +0 -47
- package/src/lib/components/NSelect.tsx +0 -128
- package/src/lib/components/NSuggestionList.tsx +0 -216
- package/src/lib/components/NTable.tsx +0 -247
- package/src/lib/components/NTableAction.tsx +0 -49
- package/src/lib/components/NTextArea.tsx +0 -159
- package/src/lib/components/NTooltip.tsx +0 -289
- package/src/lib/components/NValInput.tsx +0 -163
- package/src/lib/components/ValidatedForm.ts +0 -71
- package/src/lib/components/__tests__/NButton.spec.tsx +0 -26
- package/src/lib/components/__tests__/NCheckbox.spec.tsx +0 -39
- package/src/lib/index.ts +0 -2
- package/src/lib/jsx.d.ts +0 -13
- package/src/lib/utils/__tests__/identifiable.spec.ts +0 -72
- package/src/lib/utils/__tests__/validation.spec.ts +0 -92
- package/src/lib/utils/breakpoints.ts +0 -47
- package/src/lib/utils/component.tsx +0 -131
- package/src/lib/utils/deferred.ts +0 -28
- package/src/lib/utils/identifiable.ts +0 -87
- package/src/lib/utils/stringMaxLength.ts +0 -25
- package/src/lib/utils/tailwind.ts +0 -41
- package/src/lib/utils/utils.ts +0 -90
- package/src/lib/utils/validation.ts +0 -189
- package/src/lib/utils/vue.ts +0 -25
- package/tsconfig.config.json +0 -9
- package/tsconfig.demo.json +0 -19
- package/tsconfig.json +0 -16
- package/tsconfig.lib.json +0 -19
- package/tsconfig.vitest.json +0 -8
- package/vite.config.ts +0 -30
- /package/{src/lib → lib}/components/NInput.css +0 -0
- /package/{src/lib → lib}/components/NLoadingIndicator.css +0 -0
- /package/{src/lib → lib}/i18n/de/vue-collection.json +0 -0
- /package/{src/lib → lib}/i18n/en/vue-collection.json +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { trsl } from '../i18n'
|
|
2
|
-
|
|
3
|
-
export type ValidationResultValid = {
|
|
4
|
-
isValid: true
|
|
5
|
-
errorMessage?: undefined
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type ValidationResultInvalid = {
|
|
9
|
-
isValid: false
|
|
10
|
-
errorMessage: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type InputValue = string | null | undefined
|
|
14
|
-
export type ValidationResult = ValidationResultValid | ValidationResultInvalid
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A `ValidationRule` checks an input for a criteria and returns either
|
|
18
|
-
* a {@link ValidationResultValid} or a {@link ValidationResultInvalid}.
|
|
19
|
-
* A falsy input-value should always return a valid result to not interfere
|
|
20
|
-
* with the {@link required} rule.
|
|
21
|
-
*/
|
|
22
|
-
export type ValidationRule = (input: InputValue) => ValidationResult
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Creates a valid result.
|
|
26
|
-
*/
|
|
27
|
-
export function validResult(): ValidationResultValid {
|
|
28
|
-
return { isValid: true }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Creates an invalid result with the provided error message.
|
|
33
|
-
*/
|
|
34
|
-
export function invalidResult(errorMessage: string): ValidationResultInvalid {
|
|
35
|
-
return { isValid: false, errorMessage }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const TRANSLATION_KEY_BASE = 'vue-collection.validation.rules'
|
|
39
|
-
function invalidResultInternal(key: string, params?: Record<string, unknown>): ValidationResultInvalid {
|
|
40
|
-
return invalidResult(trsl(`${TRANSLATION_KEY_BASE}.${key}`, params))
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Validates a given input with the specified rules.
|
|
45
|
-
* The rules are evaluated in the order they're in the array.
|
|
46
|
-
* The {@link ValidationResult} will either contain the errorMessage of the failed rule
|
|
47
|
-
* or a valid result if all rules passed.
|
|
48
|
-
* @param input the input to validate.
|
|
49
|
-
* @param rules the rules which should be vaildated, in the order of priority.
|
|
50
|
-
* @returns an object containing the result of the validation.
|
|
51
|
-
*/
|
|
52
|
-
export function validate(input: InputValue, rules: ValidationRule[]): ValidationResult {
|
|
53
|
-
for (const rule of rules) {
|
|
54
|
-
const validationResult = rule(input)
|
|
55
|
-
if (!validationResult.isValid) return validationResult
|
|
56
|
-
}
|
|
57
|
-
return validResult()
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/*
|
|
61
|
-
* ---------- Validation Rules ----------
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* This rule expects the trimmed input-value to be truthy.
|
|
66
|
-
*/
|
|
67
|
-
export const required: ValidationRule = input => {
|
|
68
|
-
const trimmed = input?.trim()
|
|
69
|
-
if (trimmed) return validResult()
|
|
70
|
-
else return invalidResultInternal('required')
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* This rule expects the input to be an integer.
|
|
75
|
-
*/
|
|
76
|
-
export const integer: ValidationRule = input => {
|
|
77
|
-
if (!input || Number.isInteger(+input)) return validResult()
|
|
78
|
-
else return invalidResultInternal('integer')
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* This rule expects the input to be in the specified length range. An empty input
|
|
83
|
-
* will always be allowed by this rule to not interefere with the {@link required} rule.
|
|
84
|
-
* @param min The minimum length of the string.
|
|
85
|
-
* @param max The maximum length of the string.
|
|
86
|
-
*/
|
|
87
|
-
export function length(min: number | undefined, max: number | undefined): ValidationRule {
|
|
88
|
-
return input => {
|
|
89
|
-
if (!input) return validResult()
|
|
90
|
-
|
|
91
|
-
if (min !== undefined && max !== undefined && !(min <= input.length && input.length <= max))
|
|
92
|
-
return invalidResultInternal('length.min-max', { min, max })
|
|
93
|
-
else if (min !== undefined && !(min <= input.length)) return invalidResultInternal('length.min', { min })
|
|
94
|
-
else if (max !== undefined && !(input.length <= max)) return invalidResultInternal('length.max', { max })
|
|
95
|
-
|
|
96
|
-
return validResult()
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* This rule expects the input to be a number in the specified range.
|
|
102
|
-
* @param min the lower bound, if `undefined` there is no lower bound.
|
|
103
|
-
* @param max the upper bound, if `undefined` there is no upper bound.
|
|
104
|
-
*/
|
|
105
|
-
export function numberRange(min: number | undefined, max: number | undefined): ValidationRule {
|
|
106
|
-
return input => {
|
|
107
|
-
if (!input) return validResult()
|
|
108
|
-
|
|
109
|
-
const parsed = Number.parseFloat(input)
|
|
110
|
-
if (Number.isNaN(parsed)) return invalidResultInternal('number-range.nan')
|
|
111
|
-
|
|
112
|
-
if (min !== undefined && max !== undefined && !(min <= parsed && parsed <= max))
|
|
113
|
-
return invalidResultInternal('number-range.min-max', { min, max })
|
|
114
|
-
else if (min !== undefined && !(min <= parsed)) return invalidResultInternal('number-range.min', { min })
|
|
115
|
-
else if (max !== undefined && !(parsed <= max)) return invalidResultInternal('number-range.max', { max })
|
|
116
|
-
|
|
117
|
-
return validResult()
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export const VALIDATION_FORMAT_EMAIL = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* This rule expects the input-value to be a valid email adress matching {@link VALIDATION_FORMAT_EMAIL}.
|
|
125
|
-
*/
|
|
126
|
-
export const email: ValidationRule = input => {
|
|
127
|
-
if (!input || VALIDATION_FORMAT_EMAIL.test(input)) return validResult()
|
|
128
|
-
else return invalidResultInternal('email')
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export const VALIDATION_FORMAT_PASSWORD = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[#$^+\-=!*()@%&?]).{8,}$/
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* This rule expects the input-value to be a password matching {@link VALIDATION_FORMAT_PASSWORD}.
|
|
135
|
-
*/
|
|
136
|
-
export const password: ValidationRule = input => {
|
|
137
|
-
if (!input || VALIDATION_FORMAT_PASSWORD.test(input)) return validResult()
|
|
138
|
-
else if (input.length < 8) return invalidResultInternal('password.to-short')
|
|
139
|
-
else if (!/[a-z]+/.test(input)) return invalidResultInternal('password.no-lowercase')
|
|
140
|
-
else if (!/[A-Z]+/.test(input)) return invalidResultInternal('password.no-uppercase')
|
|
141
|
-
else if (!/\d+/.test(input)) return invalidResultInternal('password.no-digits')
|
|
142
|
-
else if (!/[#$^+\-=!*()@%&?]+/.test(input)) return invalidResultInternal('password.no-special-chars')
|
|
143
|
-
else return invalidResultInternal('password.unknown')
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* This rule expects the input-value to match another (input-) value.
|
|
148
|
-
* In difference to most other rules, this rule does not always return a valid result,
|
|
149
|
-
* when the input is falsy. The input is always required to match the other value.
|
|
150
|
-
* @param other the other value to match
|
|
151
|
-
*/
|
|
152
|
-
export function matches(other: string | null | undefined): ValidationRule {
|
|
153
|
-
return input => {
|
|
154
|
-
if (input === other) return validResult()
|
|
155
|
-
else return invalidResultInternal('matches')
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* This rule expects the input-value to match one option in an array.
|
|
161
|
-
* @param options the options which the input can match
|
|
162
|
-
*/
|
|
163
|
-
export function option(options: string[]): ValidationRule {
|
|
164
|
-
return input => {
|
|
165
|
-
if (!input || options.includes(input || '')) return validResult()
|
|
166
|
-
else return invalidResultInternal('option')
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* This rule expects the input-value to match the regex pattern
|
|
172
|
-
* @param pattern the pattern the input should match.
|
|
173
|
-
*/
|
|
174
|
-
export function regex(pattern: RegExp): ValidationRule {
|
|
175
|
-
return input => {
|
|
176
|
-
if (!input || pattern.test(input || '')) return validResult()
|
|
177
|
-
else return invalidResultInternal('regex')
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* This rule can be used if the validation logic happens somewhere else.
|
|
183
|
-
* When `isValid = true` is passed, the function will return a valid result,
|
|
184
|
-
* otherwise it will return the invalid result with the passed `errorKey`.
|
|
185
|
-
* Like always, a falsy input is always valid to not interefere with the {@link required} rule.
|
|
186
|
-
*/
|
|
187
|
-
export function external(isValid: boolean, errorMessage: string): ValidationRule {
|
|
188
|
-
return input => (!input || isValid ? validResult() : invalidResult(errorMessage))
|
|
189
|
-
}
|
package/src/lib/utils/vue.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Ref, watch, type ComputedRef } from 'vue'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Creates a watcher on the updater function, which sets the value of the ref on every change.
|
|
5
|
-
* @param ref the ref to update
|
|
6
|
-
* @param updater the updater funtion which provides the updates
|
|
7
|
-
*/
|
|
8
|
-
export function updateWith<T>(ref: Ref<T>, updater: () => T): void {
|
|
9
|
-
watch(
|
|
10
|
-
updater,
|
|
11
|
-
newValue => {
|
|
12
|
-
ref.value = newValue
|
|
13
|
-
},
|
|
14
|
-
{ immediate: true }
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Conveience function to create a watcher for a ref
|
|
20
|
-
* @param ref the ref to watch
|
|
21
|
-
* @param onChange the function, which is executed on change of a value
|
|
22
|
-
*/
|
|
23
|
-
export function watchRef<T>(ref: Ref<T> | ComputedRef<T>, onChange: (newValue: T) => void): void {
|
|
24
|
-
watch(() => ref.value, onChange)
|
|
25
|
-
}
|
package/tsconfig.config.json
DELETED
package/tsconfig.demo.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
// all files must be included, because demo uses lib.
|
|
4
|
-
"include": ["env.d.ts", "src/**/*", "src/**/*.json"],
|
|
5
|
-
"exclude": ["src/**/__tests__/*"],
|
|
6
|
-
"compilerOptions": {
|
|
7
|
-
"composite": true,
|
|
8
|
-
"baseUrl": ".",
|
|
9
|
-
"paths": {
|
|
10
|
-
"@/*": ["./src/*"]
|
|
11
|
-
},
|
|
12
|
-
"jsx": "preserve",
|
|
13
|
-
"jsxImportSource": "vue",
|
|
14
|
-
"noImplicitAny": false,
|
|
15
|
-
"noUncheckedIndexedAccess": false,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"noEmit": false
|
|
18
|
-
}
|
|
19
|
-
}
|
package/tsconfig.json
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["src/lib/**/*", "src/lib/**/*.json"],
|
|
4
|
-
"exclude": ["src/**/__tests__/*"],
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"composite": true,
|
|
7
|
-
// don't allow @ alias inside library
|
|
8
|
-
"paths": {},
|
|
9
|
-
"outDir": "lib",
|
|
10
|
-
"jsx": "preserve",
|
|
11
|
-
"jsxImportSource": "vue",
|
|
12
|
-
"noImplicitAny": false,
|
|
13
|
-
"downlevelIteration": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"allowImportingTsExtensions": false,
|
|
16
|
-
"noEmit": false,
|
|
17
|
-
"declaration": true
|
|
18
|
-
}
|
|
19
|
-
}
|
package/tsconfig.vitest.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'url'
|
|
2
|
-
import { defineConfig } from 'vite'
|
|
3
|
-
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
-
import vue from '@vitejs/plugin-vue'
|
|
5
|
-
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
6
|
-
import vueI18n from '@intlify/unplugin-vue-i18n/vite'
|
|
7
|
-
import { resolve, dirname } from 'path'
|
|
8
|
-
|
|
9
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
10
|
-
|
|
11
|
-
// https://vitejs.dev/config/
|
|
12
|
-
export default defineConfig({
|
|
13
|
-
plugins: [
|
|
14
|
-
tailwindcss(),
|
|
15
|
-
vue(),
|
|
16
|
-
vueJsx(),
|
|
17
|
-
vueI18n({
|
|
18
|
-
compositionOnly: true,
|
|
19
|
-
runtimeOnly: false,
|
|
20
|
-
fullInstall: false,
|
|
21
|
-
include: resolve(__dirname, 'src/i18n/*'),
|
|
22
|
-
}),
|
|
23
|
-
],
|
|
24
|
-
resolve: {
|
|
25
|
-
alias: {
|
|
26
|
-
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
base: process.env.VITE_BASE_PATH,
|
|
30
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|