@imaginario27/air-ui-ds 1.10.0 → 1.10.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/CHANGELOG.md +11 -0
- package/components/layouts/ErrorDisplay.vue +5 -1
- package/components/layouts/headers/CompactHeader.vue +4 -1
- package/components/tabs/TabBar.vue +15 -11
- package/models/types/prefetch.ts +3 -1
- package/models/types/selects.ts +5 -0
- package/package.json +1 -1
- package/models/constants/app.ts +0 -8
- package/models/constants/form.ts +0 -22
- package/models/types/pdfExportTable.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this package are documented in this file.
|
|
|
5
5
|
Historical releases were reconstructed from git history (GitHub repository) and npm publish dates.
|
|
6
6
|
Future releases will include detailed entries generated with Changesets.
|
|
7
7
|
|
|
8
|
+
## 1.10.0 - 2026-04-09
|
|
9
|
+
|
|
10
|
+
Release type: minor.
|
|
11
|
+
Commits found in range: 1.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
1. add prefetchOn and disabled states to navigation components ([04f9124](https://github.com/imaginario27/air-ui/commit/04f91246519958fdf3619427f39504269a49a911))
|
|
16
|
+
|
|
17
|
+
- Package: @imaginario27/air-ui-ds.
|
|
18
|
+
|
|
8
19
|
## 1.9.4 - 2026-04-06
|
|
9
20
|
|
|
10
21
|
Release type: patch.
|
|
@@ -157,6 +157,10 @@ const props = defineProps({
|
|
|
157
157
|
},
|
|
158
158
|
})
|
|
159
159
|
|
|
160
|
+
// Runtime constants
|
|
161
|
+
const config = useRuntimeConfig()
|
|
162
|
+
const { public: { appName } } = config
|
|
163
|
+
|
|
160
164
|
// Constants
|
|
161
165
|
const defaultErrorMappings: ErrorMapping[] = [
|
|
162
166
|
// 4xx Client Errors
|
|
@@ -253,7 +257,7 @@ const pageTitleText = computed(() => resolvedErrorMapping.value.title)
|
|
|
253
257
|
|
|
254
258
|
watchEffect(() => {
|
|
255
259
|
if (props.setPageTitle) {
|
|
256
|
-
document.title = pageTitle(pageTitleText.value,
|
|
260
|
+
document.title = pageTitle(pageTitleText.value, appName as string)
|
|
257
261
|
}
|
|
258
262
|
})
|
|
259
263
|
|
|
@@ -255,8 +255,11 @@ const currentPageTitle = computed<string>(() =>
|
|
|
255
255
|
(route.meta.title as string) ?? 'Page title'
|
|
256
256
|
)
|
|
257
257
|
|
|
258
|
+
const config = useRuntimeConfig()
|
|
259
|
+
const { public: { appName } } = config
|
|
260
|
+
|
|
258
261
|
// Dynamically set the page title
|
|
259
262
|
useHead(() => ({
|
|
260
|
-
title: pageTitle(currentPageTitle.value,
|
|
263
|
+
title: pageTitle(currentPageTitle.value, appName as string, props.pageTitleFormat),
|
|
261
264
|
}))
|
|
262
265
|
</script>
|
|
@@ -90,23 +90,27 @@ const handleTabClick = (index: number, to?: string) => {
|
|
|
90
90
|
emit('update:modelValue', index)
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
const isPrefetchOnOptions = (prefetchOn: PrefetchOnStrategy): prefetchOn is PrefetchOnOptions => {
|
|
94
|
+
return typeof prefetchOn === 'object' && prefetchOn !== null
|
|
95
|
+
}
|
|
96
|
+
|
|
93
97
|
const shouldPrefetchOn = (trigger: PrefetchOn): boolean => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
if (!isPrefetchOnOptions(props.prefetchOn)) {
|
|
99
|
+
return props.prefetchOn === trigger
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return trigger === PrefetchOn.VISIBILITY
|
|
103
|
+
? !!props.prefetchOn.visibility
|
|
104
|
+
: !!props.prefetchOn.interaction
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
const handleTabPrefetch = (to?: string) => {
|
|
104
|
-
|
|
108
|
+
if (!to) return
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
if (!shouldPrefetchOn(PrefetchOn.INTERACTION)) return
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
// fire and forget - do not await to avoid blocking
|
|
113
|
+
preloadRouteComponents(to)
|
|
110
114
|
}
|
|
111
115
|
// Watchers
|
|
112
116
|
watch(() => props.modelValue, (newVal) => {
|
package/models/types/prefetch.ts
CHANGED
package/models/types/selects.ts
CHANGED
package/package.json
CHANGED
package/models/constants/app.ts
DELETED
package/models/constants/form.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const FieldMaxLength = {
|
|
3
|
-
FULLNAME: 80,
|
|
4
|
-
LASTNAME: 80,
|
|
5
|
-
EMAIL: 254,
|
|
6
|
-
PHONE: 15,
|
|
7
|
-
SUBJECT: 100,
|
|
8
|
-
MESSAGE: 500,
|
|
9
|
-
PASSWORD: 64,
|
|
10
|
-
SEARCH: 80,
|
|
11
|
-
DESCRIPTION: 400,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const FieldError = {
|
|
15
|
-
REQUIRED_FIELD: 'This field is required.',
|
|
16
|
-
REQUIRED_EMAIL: 'Email is required.',
|
|
17
|
-
INVALID_EMAIL: 'Invalid email address.',
|
|
18
|
-
REQUIRED_OPTION: 'Please select an option.',
|
|
19
|
-
INVALID_DATE_RANGE: 'Start date must be before or equal to end date',
|
|
20
|
-
PASSWORDS_DO_NOT_MATCH: 'Passwords do not match.',
|
|
21
|
-
INVALID_URL: 'Invalid URL.',
|
|
22
|
-
}
|