@explorer-1/vue 0.2.30 → 0.2.31
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/dist/explorer-1-vue.js +4868 -4777
- package/dist/explorer-1-vue.umd.cjs +13 -13
- package/dist/src/components/MetaPanel/MetaPanel.stories.d.ts +4 -1
- package/dist/src/components/MetadataEvent/MetadataEvent.stories.d.ts +3 -1
- package/dist/src/components/NavSecondary/NavSecondary.vue.d.ts +9 -0
- package/dist/src/interfaces.d.ts +1 -0
- package/dist/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.d.ts +1 -0
- package/dist/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.d.ts +3 -0
- package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +18 -6
- package/dist/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.d.ts +1 -0
- package/dist/src/utils/rangeifyGrades.d.ts +1 -1
- package/package.json +1 -1
- package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +39 -4
- package/src/templates/edu/PageEduLesson/PageEduLesson.vue +0 -1
- package/src/templates/edu/PageEduLesson/PageEduLessonSection.vue +94 -32
|
@@ -13,10 +13,12 @@ export namespace MetadataEventData {
|
|
|
13
13
|
export let location: string;
|
|
14
14
|
export let startDate: string;
|
|
15
15
|
export let startDatetime: string;
|
|
16
|
+
export let startTime: string;
|
|
16
17
|
export let endDate: string;
|
|
18
|
+
export let endDatetime: string;
|
|
19
|
+
export let endTime: string;
|
|
17
20
|
export let ongoing: boolean;
|
|
18
21
|
export let isVirtualEvent: boolean;
|
|
19
|
-
export let endDatetime: string;
|
|
20
22
|
export let locationName: string;
|
|
21
23
|
export let locationLink: string;
|
|
22
24
|
export let customDate: undefined;
|
|
@@ -16,6 +16,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
16
16
|
required: false;
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
|
+
jumpMenu: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
19
23
|
}, unknown, {
|
|
20
24
|
isSticky: boolean;
|
|
21
25
|
stickyElement?: HTMLElement | undefined;
|
|
@@ -58,9 +62,14 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
58
62
|
required: false;
|
|
59
63
|
default: boolean;
|
|
60
64
|
};
|
|
65
|
+
jumpMenu: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
61
69
|
}>>, {
|
|
62
70
|
invert: boolean;
|
|
63
71
|
breadcrumb: string;
|
|
64
72
|
hasIntro: boolean;
|
|
73
|
+
jumpMenu: boolean;
|
|
65
74
|
}, {}>;
|
|
66
75
|
export default _default;
|
package/dist/src/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as PageEduExplainerArticle } from './PageEduExplainerArticle.vue';
|
|
2
2
|
import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js';
|
|
3
|
+
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories';
|
|
3
4
|
declare namespace _default {
|
|
4
5
|
export let title: string;
|
|
5
6
|
export { PageEduExplainerArticle as component };
|
|
@@ -169,6 +170,8 @@ export namespace BaseStory {
|
|
|
169
170
|
let title_1: string;
|
|
170
171
|
export { title_1 as title };
|
|
171
172
|
export let readTime: string;
|
|
173
|
+
export let lastPublishedAt: string;
|
|
174
|
+
export { AboutTheAuthorData as authors };
|
|
172
175
|
export let heroConstrain: boolean;
|
|
173
176
|
export let heroPosition: string;
|
|
174
177
|
export let hero: {
|
|
@@ -167,14 +167,26 @@ export namespace BaseStory {
|
|
|
167
167
|
value: string;
|
|
168
168
|
}[];
|
|
169
169
|
export let backgroundHeading: string;
|
|
170
|
-
export let procedures: {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
export let procedures: ({
|
|
171
|
+
sectionHeading: string;
|
|
172
|
+
stepsNumbering: boolean;
|
|
173
|
+
steps: {
|
|
174
|
+
blocks: {
|
|
175
|
+
blockType: string;
|
|
176
|
+
value: string;
|
|
177
|
+
}[];
|
|
174
178
|
}[];
|
|
175
|
-
}
|
|
179
|
+
} | {
|
|
180
|
+
stepsNumbering: boolean;
|
|
181
|
+
steps: {
|
|
182
|
+
blocks: {
|
|
183
|
+
blockType: string;
|
|
184
|
+
value: string;
|
|
185
|
+
}[];
|
|
186
|
+
}[];
|
|
187
|
+
sectionHeading?: undefined;
|
|
188
|
+
})[];
|
|
176
189
|
export let proceduresHeading: string;
|
|
177
|
-
export let proceduresStepsNumbering: boolean;
|
|
178
190
|
export let discussion: {
|
|
179
191
|
blockType: string;
|
|
180
192
|
value: string;
|
package/package.json
CHANGED
|
@@ -169,17 +169,52 @@ export const BaseStory = {
|
|
|
169
169
|
|
|
170
170
|
procedures: [
|
|
171
171
|
{
|
|
172
|
-
|
|
172
|
+
sectionHeading: 'Section Heading 1',
|
|
173
|
+
stepsNumbering: true,
|
|
174
|
+
steps: [
|
|
175
|
+
{
|
|
176
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
183
|
+
}
|
|
184
|
+
]
|
|
173
185
|
},
|
|
174
186
|
{
|
|
175
|
-
|
|
187
|
+
// sectionHeading: 'Section Heading 2',
|
|
188
|
+
stepsNumbering: true,
|
|
189
|
+
steps: [
|
|
190
|
+
{
|
|
191
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
198
|
+
}
|
|
199
|
+
]
|
|
176
200
|
},
|
|
177
201
|
{
|
|
178
|
-
|
|
202
|
+
sectionHeading: 'Section Heading 3',
|
|
203
|
+
stepsNumbering: false,
|
|
204
|
+
steps: [
|
|
205
|
+
{
|
|
206
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
blocks: BlockStreamfieldMinimalData.body
|
|
213
|
+
}
|
|
214
|
+
]
|
|
179
215
|
}
|
|
180
216
|
],
|
|
181
217
|
proceduresHeading: 'Procedures heading',
|
|
182
|
-
proceduresStepsNumbering: true,
|
|
183
218
|
|
|
184
219
|
discussion: BlockStreamfieldMinimalData.body,
|
|
185
220
|
discussionHeading: 'Discussion heading',
|
|
@@ -342,7 +342,6 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
|
|
|
342
342
|
:heading="value.heading"
|
|
343
343
|
:blocks="value.blocks"
|
|
344
344
|
:procedures="value.procedures"
|
|
345
|
-
:procedure-steps="value.procedureSteps"
|
|
346
345
|
:text="value.text"
|
|
347
346
|
:image="value.image"
|
|
348
347
|
/>
|
|
@@ -15,9 +15,12 @@ export interface PageEduLessonSectionProps {
|
|
|
15
15
|
heading: BlockHeadingObject
|
|
16
16
|
blocks?: StreamfieldBlockData[]
|
|
17
17
|
procedures?: {
|
|
18
|
-
|
|
18
|
+
sectionHeading: string
|
|
19
|
+
stepsNumbering: boolean
|
|
20
|
+
steps: {
|
|
21
|
+
blocks: StreamfieldBlockData[]
|
|
22
|
+
}[]
|
|
19
23
|
}[]
|
|
20
|
-
procedureSteps?: boolean
|
|
21
24
|
text?: string
|
|
22
25
|
image?: ImageObject
|
|
23
26
|
}
|
|
@@ -26,7 +29,6 @@ const props = withDefaults(defineProps<PageEduLessonSectionProps>(), {
|
|
|
26
29
|
heading: undefined,
|
|
27
30
|
blocks: undefined,
|
|
28
31
|
procedures: undefined,
|
|
29
|
-
procedureSteps: false,
|
|
30
32
|
text: undefined,
|
|
31
33
|
image: undefined
|
|
32
34
|
})
|
|
@@ -68,23 +70,51 @@ const anchorId = computed(() => {
|
|
|
68
70
|
/>
|
|
69
71
|
<template v-else-if="procedures?.length">
|
|
70
72
|
<template
|
|
71
|
-
v-for="(
|
|
72
|
-
:key="
|
|
73
|
+
v-for="(section, _index) in procedures"
|
|
74
|
+
:key="_index"
|
|
73
75
|
>
|
|
74
|
-
<LayoutHelper
|
|
75
|
-
v-if="procedureSteps"
|
|
76
|
-
indent="col-3"
|
|
77
|
-
class="lg:mb-8 mb-5"
|
|
78
|
-
>
|
|
79
|
-
<BaseHeading level="h3">
|
|
80
|
-
{{ 'Section ' + (Number(index) + 1) }}
|
|
81
|
-
</BaseHeading>
|
|
82
|
-
</LayoutHelper>
|
|
83
76
|
<div class="PageEduProcedureSection">
|
|
84
|
-
<
|
|
85
|
-
v-if="
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
<LayoutHelper
|
|
78
|
+
v-if="section.sectionHeading"
|
|
79
|
+
indent="col-3"
|
|
80
|
+
class="lg:mb-8 mb-5"
|
|
81
|
+
>
|
|
82
|
+
<BaseHeading level="h3">
|
|
83
|
+
{{ section.sectionHeading }}
|
|
84
|
+
</BaseHeading>
|
|
85
|
+
</LayoutHelper>
|
|
86
|
+
<div
|
|
87
|
+
v-if="section.steps?.length"
|
|
88
|
+
class="PageEduProcedureSectionSteps"
|
|
89
|
+
>
|
|
90
|
+
<template v-if="section.stepsNumbering">
|
|
91
|
+
<ol class="PageEduProcedureSectionSingleStep">
|
|
92
|
+
<template
|
|
93
|
+
v-for="(step, _step_index) of section.steps"
|
|
94
|
+
:key="_step_index"
|
|
95
|
+
>
|
|
96
|
+
<li v-if="step.blocks?.length">
|
|
97
|
+
<BlockStreamfield
|
|
98
|
+
v-if="step?.blocks"
|
|
99
|
+
:data="step.blocks"
|
|
100
|
+
/>
|
|
101
|
+
</li>
|
|
102
|
+
</template>
|
|
103
|
+
</ol>
|
|
104
|
+
</template>
|
|
105
|
+
<template v-else>
|
|
106
|
+
<template
|
|
107
|
+
v-for="(step, _step_index) of section.steps"
|
|
108
|
+
:key="_step_index"
|
|
109
|
+
>
|
|
110
|
+
<BlockStreamfield
|
|
111
|
+
v-if="step.blocks?.length"
|
|
112
|
+
class="PageEduProcedureSectionSingleStep"
|
|
113
|
+
:data="step.blocks"
|
|
114
|
+
/>
|
|
115
|
+
</template>
|
|
116
|
+
</template>
|
|
117
|
+
</div>
|
|
88
118
|
</div>
|
|
89
119
|
</template>
|
|
90
120
|
</template>
|
|
@@ -98,23 +128,55 @@ const anchorId = computed(() => {
|
|
|
98
128
|
</section>
|
|
99
129
|
</template>
|
|
100
130
|
<style lang="scss">
|
|
131
|
+
@use 'sass:math';
|
|
132
|
+
@function pxToRem($pxValue) {
|
|
133
|
+
// Assumes font-size for body element is a constant 16px
|
|
134
|
+
@return math.div($pxValue, 16) * 1rem;
|
|
135
|
+
}
|
|
101
136
|
.PageEduProcedureSection {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
137
|
+
.PageEduProcedureSectionSteps {
|
|
138
|
+
counter-reset: step;
|
|
139
|
+
}
|
|
140
|
+
.PageEduProcedureSectionSingleStep {
|
|
141
|
+
li:not(:last-of-type) .BlockStreamfield {
|
|
142
|
+
@apply -mb-5 lg:-mb-10;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
ol.PageEduProcedureSectionSingleStep {
|
|
146
|
+
@apply list-none;
|
|
106
147
|
> li {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
148
|
+
@apply relative w-full;
|
|
149
|
+
counter-increment: step;
|
|
150
|
+
&::before {
|
|
151
|
+
@apply relative block w-[45rem] mx-auto h-0 pl-3;
|
|
152
|
+
content: counter(step) '. ';
|
|
153
|
+
// mimicking .text-body-lg
|
|
154
|
+
font-size: pxToRem(18);
|
|
155
|
+
line-height: 1.6667;
|
|
110
156
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
157
|
+
|
|
158
|
+
@screen sm {
|
|
159
|
+
&::before {
|
|
160
|
+
@apply w-[47rem];
|
|
161
|
+
font-size: pxToRem(19);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
@screen md {
|
|
165
|
+
&::before {
|
|
166
|
+
@apply w-[50rem];
|
|
167
|
+
font-size: pxToRem(20);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
@screen lg {
|
|
171
|
+
&::before {
|
|
172
|
+
@apply w-[47rem] pl-0;
|
|
173
|
+
font-size: pxToRem(21);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
@screen xl {
|
|
177
|
+
&::before {
|
|
178
|
+
@apply w-[59rem];
|
|
179
|
+
font-size: pxToRem(22);
|
|
118
180
|
}
|
|
119
181
|
}
|
|
120
182
|
}
|