@asd20/ui-next 2.0.2 → 2.0.4
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 +4 -0
- package/package.json +1 -1
- package/src/components/atoms/Asd20Badge/index.vue +1 -0
- package/src/components/molecules/Asd20Share/index.vue +1 -0
- package/src/components/organisms/Asd20AiSearch/index.vue +4 -0
- package/src/components/organisms/Asd20CampusHeader/index.vue +5 -7
- package/src/components/organisms/Asd20ImageGallery/index.vue +1 -0
- package/src/components/organisms/Asd20ImageHeader/index.vue +4 -6
- package/src/components/organisms/Asd20PageHeader/index.vue +4 -6
- package/src/components/organisms/Asd20SiteMenu/index.vue +2 -0
- package/src/components/organisms/Asd20SiteNavigation/index.vue +10 -8
- package/src/components/organisms/Asd20SiteSearch/index.vue +1 -0
- package/src/components/templates/Asd20AppTemplate/index.vue +18 -24
- package/src/components/templates/Asd20ArticleDigestCompactTemplate/index.vue +20 -26
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +20 -26
- package/src/components/templates/Asd20ArticleListTemplate/index.vue +20 -26
- package/src/components/templates/Asd20ArticleTemplate/index.vue +14 -18
- package/src/components/templates/Asd20BasePageTemplate/index.vue +26 -34
- package/src/components/templates/Asd20CampusDetailTemplate/index.vue +20 -26
- package/src/components/templates/Asd20CampusTemplate/index.vue +50 -58
- package/src/components/templates/Asd20ClubsTemplate/index.vue +20 -26
- package/src/components/templates/Asd20DetailAlternateTemplate/index.vue +20 -26
- package/src/components/templates/Asd20DetailImageFullTemplate/index.vue +20 -26
- package/src/components/templates/Asd20DetailImageTemplate/index.vue +20 -26
- package/src/components/templates/Asd20DetailTemplate/index.vue +20 -26
- package/src/components/templates/Asd20DistrictHomeTemplate/index.vue +45 -55
- package/src/components/templates/Asd20DistrictVideoTemplate/index.vue +45 -55
- package/src/components/templates/Asd20FileListPageTemplate/index.vue +20 -26
- package/src/components/templates/Asd20GroupFeatureTemplate/index.vue +20 -26
- package/src/components/templates/Asd20LoginsTemplate/index.vue +21 -27
- package/src/components/templates/Asd20PeopleFeatureTemplate/index.vue +20 -26
- package/src/components/templates/Asd20ProfileTemplate/index.vue +20 -26
- package/src/components/templates/Asd20SalaryCalculatorTemplate/index.vue +20 -26
- package/src/components/templates/Asd20SchoolHomeTemplate/index.vue +84 -96
- package/src/components/templates/Asd20SchoolHomeVideoTemplate/index.vue +81 -93
- package/src/components/templates/Asd20WayfindingAccessibilityTemplate/index.vue +21 -27
- package/src/components/templates/Asd20WayfindingAlternateTemplate/index.vue +21 -27
- package/src/components/templates/Asd20WayfindingImageTemplate/index.vue +21 -27
- package/src/components/templates/Asd20WayfindingTemplate/index.vue +21 -27
- package/src/design/_template.scss +1 -1
- package/src/helpers/linkPolicy.js +4 -10
- package/src/mixins/inputComponentMixin.js +18 -11
- package/src/utils/createComponentInstanceId.js +6 -3
|
@@ -17,14 +17,12 @@
|
|
|
17
17
|
</asd20-site-navigation>
|
|
18
18
|
|
|
19
19
|
<!-- Banner Notifications -->
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
></asd20-notification-group>
|
|
27
|
-
</client-only>
|
|
20
|
+
<asd20-notification-group
|
|
21
|
+
:notifications="activeNotificationsByType.banner"
|
|
22
|
+
group-type="banner"
|
|
23
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
24
|
+
@toggle-all="$emit('toggle-all')"
|
|
25
|
+
></asd20-notification-group>
|
|
28
26
|
|
|
29
27
|
<!-- Page Header -->
|
|
30
28
|
<asd20-image-header
|
|
@@ -39,30 +37,26 @@
|
|
|
39
37
|
>
|
|
40
38
|
<!-- Floating Notifications -->
|
|
41
39
|
<template #top>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
></asd20-notification-group>
|
|
51
|
-
</client-only>
|
|
40
|
+
<asd20-notification-group
|
|
41
|
+
class="asd20-notification-group--floating"
|
|
42
|
+
:notifications="activeNotificationsByType.floating"
|
|
43
|
+
:total-dismissed-notifications="totalDismissedNotifications"
|
|
44
|
+
group-type="floating"
|
|
45
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
46
|
+
@toggle-all="$emit('toggle-all')"
|
|
47
|
+
></asd20-notification-group>
|
|
52
48
|
</template>
|
|
53
49
|
<!-- <template #top><asd20-breadcrumb :links="breadcrumbLinks"></asd20-breadcrumb></template> -->
|
|
54
50
|
</asd20-image-header>
|
|
55
51
|
|
|
56
52
|
<!-- Inline-Notifications -->
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
></asd20-notification-group>
|
|
65
|
-
</client-only>
|
|
53
|
+
<asd20-notification-group
|
|
54
|
+
class="asd20-notification-group--inline"
|
|
55
|
+
:notifications="activeNotificationsByType.inline"
|
|
56
|
+
group-type="inline"
|
|
57
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
58
|
+
@toggle-all="$emit('toggle-all')"
|
|
59
|
+
></asd20-notification-group>
|
|
66
60
|
|
|
67
61
|
<!-- Page Content -->
|
|
68
62
|
<asd20-page-content
|
|
@@ -17,14 +17,12 @@
|
|
|
17
17
|
</asd20-site-navigation>
|
|
18
18
|
|
|
19
19
|
<!-- Banner Notifications -->
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
></asd20-notification-group>
|
|
27
|
-
</client-only>
|
|
20
|
+
<asd20-notification-group
|
|
21
|
+
:notifications="activeNotificationsByType.banner"
|
|
22
|
+
group-type="banner"
|
|
23
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
24
|
+
@toggle-all="$emit('toggle-all')"
|
|
25
|
+
></asd20-notification-group>
|
|
28
26
|
|
|
29
27
|
<!-- Page Header -->
|
|
30
28
|
<asd20-page-header
|
|
@@ -39,30 +37,26 @@
|
|
|
39
37
|
>
|
|
40
38
|
<!-- Floating Notifications -->
|
|
41
39
|
<template #top>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
></asd20-notification-group>
|
|
51
|
-
</client-only>
|
|
40
|
+
<asd20-notification-group
|
|
41
|
+
class="asd20-notification-group--floating"
|
|
42
|
+
:notifications="activeNotificationsByType.floating"
|
|
43
|
+
:total-dismissed-notifications="totalDismissedNotifications"
|
|
44
|
+
group-type="floating"
|
|
45
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
46
|
+
@toggle-all="$emit('toggle-all')"
|
|
47
|
+
></asd20-notification-group>
|
|
52
48
|
</template>
|
|
53
49
|
<!-- <template #top><asd20-breadcrumb :links="breadcrumbLinks"></asd20-breadcrumb></template> -->
|
|
54
50
|
</asd20-page-header>
|
|
55
51
|
|
|
56
52
|
<!-- Inline-Notifications -->
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
></asd20-notification-group>
|
|
65
|
-
</client-only>
|
|
53
|
+
<asd20-notification-group
|
|
54
|
+
class="asd20-notification-group--inline"
|
|
55
|
+
:notifications="activeNotificationsByType.inline"
|
|
56
|
+
group-type="inline"
|
|
57
|
+
@dismiss="$emit('dismiss-notification', $event)"
|
|
58
|
+
@toggle-all="$emit('toggle-all')"
|
|
59
|
+
></asd20-notification-group>
|
|
66
60
|
|
|
67
61
|
<!-- Page Content -->
|
|
68
62
|
<asd20-page-content
|
|
@@ -50,20 +50,14 @@ export function shouldOpenInNewWindow(href, options) {
|
|
|
50
50
|
return !isAsd20Hostname(url.hostname, options)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export function resolveCurrentHostname(
|
|
53
|
+
export function resolveCurrentHostname(_vm, options = {}) {
|
|
54
54
|
if (typeof window !== 'undefined' && window.location) {
|
|
55
55
|
return normalizeHostname(window.location.hostname, options)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
vm.$ssrContext.req &&
|
|
62
|
-
vm.$ssrContext.req.headers &&
|
|
63
|
-
(vm.$ssrContext.req.headers['x-forwarded-host'] ||
|
|
64
|
-
vm.$ssrContext.req.headers.host)
|
|
65
|
-
|
|
66
|
-
return normalizeHostname(requestHost, options)
|
|
58
|
+
// Server renders should stay deterministic and avoid reaching through the
|
|
59
|
+
// component proxy for SSR internals that are not part of the Vue 3 public API.
|
|
60
|
+
return normalizeHostname(options.currentHostname || '', options)
|
|
67
61
|
}
|
|
68
62
|
|
|
69
63
|
export function shouldShowExternalIcon(href, currentHostname, options) {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import kebabCase from 'lodash/kebabCase'
|
|
2
|
+
import createComponentInstanceId from '../utils/createComponentInstanceId'
|
|
2
3
|
|
|
3
4
|
const INPUT_MODEL_LISTENER_KEYS = ['onInput', 'onUpdate:modelValue']
|
|
5
|
+
const DEFAULT_INPUT_COMPONENT_NAME = 'asd20-input'
|
|
6
|
+
|
|
7
|
+
function resolveKebabComponentName(componentName = DEFAULT_INPUT_COMPONENT_NAME) {
|
|
8
|
+
return kebabCase(componentName).replace(/-([0-9])/g, '$1')
|
|
9
|
+
}
|
|
4
10
|
|
|
5
11
|
function omitKeys(source, keys) {
|
|
6
12
|
const target = { ...(source || {}) }
|
|
@@ -46,18 +52,23 @@ export default {
|
|
|
46
52
|
reversed: { type: Boolean, default: false },
|
|
47
53
|
taggable: { type: Boolean, default: true },
|
|
48
54
|
},
|
|
49
|
-
data
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
isDirty: false,
|
|
58
|
+
isActive: false,
|
|
59
|
+
validationErrors: [],
|
|
60
|
+
generatedInputId: createComponentInstanceId(
|
|
61
|
+
resolveKebabComponentName(this.$options.name)
|
|
62
|
+
),
|
|
63
|
+
}
|
|
64
|
+
},
|
|
54
65
|
mounted() {
|
|
55
66
|
this.validate(this.resolvedValue)
|
|
56
67
|
},
|
|
57
68
|
|
|
58
69
|
computed: {
|
|
59
70
|
kebabComponentName() {
|
|
60
|
-
return
|
|
71
|
+
return resolveKebabComponentName(this.$options.name)
|
|
61
72
|
},
|
|
62
73
|
classes() {
|
|
63
74
|
let classes = {}
|
|
@@ -92,11 +103,7 @@ export default {
|
|
|
92
103
|
},
|
|
93
104
|
|
|
94
105
|
computedId() {
|
|
95
|
-
return this.$attrs.id
|
|
96
|
-
? this.$attrs.id
|
|
97
|
-
: `${this.kebabComponentName}_${Math.round(
|
|
98
|
-
Math.random() * 10000000000000000
|
|
99
|
-
)}`
|
|
106
|
+
return this.$attrs.id ? this.$attrs.id : this.generatedInputId
|
|
100
107
|
},
|
|
101
108
|
|
|
102
109
|
selectedItem() {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { getCurrentInstance, useId } from 'vue'
|
|
2
2
|
|
|
3
3
|
export default function createComponentInstanceId(prefix = 'asd20-component') {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
if (getCurrentInstance()) {
|
|
5
|
+
return `${prefix}-${useId()}`
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return `${prefix}-detached`
|
|
6
9
|
}
|