oasys-lib 2.35.2 → 2.35.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/fesm2022/oasys-lib.mjs +34 -100
- package/fesm2022/oasys-lib.mjs.map +1 -1
- package/index.d.ts +27 -39
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/bloomandwild/variables.css +1 -1
- package/src/assets/bloomon/variables.css +1 -1
- package/src/assets/global/scss-breakpoints.scss +1 -1
package/fesm2022/oasys-lib.mjs
CHANGED
|
@@ -942,7 +942,7 @@ class ImageComponent {
|
|
|
942
942
|
image_fill = false;
|
|
943
943
|
fetchpriority = 'auto';
|
|
944
944
|
loading = 'lazy';
|
|
945
|
-
preload_aspect_ratio =
|
|
945
|
+
preload_aspect_ratio = null;
|
|
946
946
|
image_width = null; // explicit rendered width in px, when known by the consumer
|
|
947
947
|
image_sizes = null; // fallback `sizes` value for non-lazy / no-auto-support cases
|
|
948
948
|
image_loaded = new EventEmitter();
|
|
@@ -972,19 +972,19 @@ class ImageComponent {
|
|
|
972
972
|
* Creates the image object with the provided properties.
|
|
973
973
|
*/
|
|
974
974
|
createImage() {
|
|
975
|
-
const ratios = this.preload_aspect_ratio
|
|
975
|
+
const ratios = this.preload_aspect_ratio?.split(':');
|
|
976
976
|
const imageUrlResponse = this.imageUrlProvider.generateImageUrl(this.image_src, this.breakpoints, this.fallbackBreakpoint);
|
|
977
977
|
const loading = this.resolveLoading();
|
|
978
978
|
const newImage = {
|
|
979
979
|
...imageUrlResponse,
|
|
980
|
-
ratioWidth: parseInt(ratios[0], 10),
|
|
981
|
-
ratioHeight: parseInt(ratios[1], 10),
|
|
980
|
+
ratioWidth: ratios ? parseInt(ratios[0], 10) : undefined,
|
|
981
|
+
ratioHeight: ratios ? parseInt(ratios[1], 10) : undefined,
|
|
982
982
|
loading,
|
|
983
983
|
fill: this.image_fill,
|
|
984
984
|
fetchpriority: this.fetchpriority,
|
|
985
985
|
preloadAspectRatio: this.preload_aspect_ratio,
|
|
986
986
|
width: this.image_width ? `${this.image_width}px` : null,
|
|
987
|
-
sizes: this.resolveSizes(
|
|
987
|
+
sizes: this.resolveSizes(),
|
|
988
988
|
altText: this.image_alt_text,
|
|
989
989
|
ariaDescribedby: this.image_aria_describedby ?? null,
|
|
990
990
|
};
|
|
@@ -993,19 +993,18 @@ class ImageComponent {
|
|
|
993
993
|
resolveLoading() {
|
|
994
994
|
return this.fetchpriority === 'high' ? 'eager' : this.loading;
|
|
995
995
|
}
|
|
996
|
-
resolveSizes(
|
|
996
|
+
resolveSizes() {
|
|
997
997
|
if (this.image_width) {
|
|
998
998
|
return `${this.image_width}px`;
|
|
999
999
|
}
|
|
1000
|
-
|
|
1001
|
-
return loading === 'lazy' ? `auto, ${fallback}` : fallback;
|
|
1000
|
+
return this.image_sizes ?? '100vw';
|
|
1002
1001
|
}
|
|
1003
1002
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1004
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ImageComponent, isStandalone: true, selector: "ui-image", inputs: { image_src: "image_src", image_alt_text: "image_alt_text", image_aria_describedby: "image_aria_describedby", image_fill: "image_fill", fetchpriority: "fetchpriority", loading: "loading", preload_aspect_ratio: "preload_aspect_ratio", image_width: "image_width", image_sizes: "image_sizes" }, outputs: { image_loaded: "image_loaded" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0, template: "@if (image()) {\n <picture>\n <source\n [attr.srcset]=\"image().srcSetUrls\"\n [attr.sizes]=\"image().sizes\"\n type=\"image/webp\"\n />\n\n <img\n [class.imageFill]=\"image().fill\"\n [attr.width]=\"image().ratioWidth\"\n [attr.height]=\"image().ratioHeight\"\n [attr.src]=\"image().fallbackUrl\"\n [attr.sizes]=\"image().sizes\"\n [attr.loading]=\"image().loading\"\n [attr.fetchpriority]=\"image().fetchpriority\"\n [attr.alt]=\"image().altText\"\n [attr.aria-describedby]=\"image().ariaDescribedby\"\n [ngStyle]=\"{ 'aspect-ratio': image().preloadAspectRatio }\"\n (load)=\"image_loaded.emit()\"\n [attr.role]=\"image().altText?.length > 0 ? 'img' : 'presentation'\"\n />\n </picture>\n}\n", styles: [":host.imageFill{display:block;width:100%;height:100%}:host.imageFill picture,:host.imageFill img{display:block;width:100%;height:100%}:host.imageFill img{object-fit:cover}:host{display:block}img{display:block;width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1003
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ImageComponent, isStandalone: true, selector: "ui-image", inputs: { image_src: "image_src", image_alt_text: "image_alt_text", image_aria_describedby: "image_aria_describedby", image_fill: "image_fill", fetchpriority: "fetchpriority", loading: "loading", preload_aspect_ratio: "preload_aspect_ratio", image_width: "image_width", image_sizes: "image_sizes" }, outputs: { image_loaded: "image_loaded" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0, template: "@if (image()) {\n <picture>\n <source\n [attr.srcset]=\"image().srcSetUrls\"\n [attr.sizes]=\"image().sizes\"\n type=\"image/webp\"\n />\n\n <img\n [class.imageFill]=\"image().fill\"\n [attr.width]=\"image().ratioWidth\"\n [attr.height]=\"image().ratioHeight\"\n [attr.src]=\"image().fallbackUrl\"\n [attr.sizes]=\"image().sizes\"\n [attr.loading]=\"image().loading\"\n [attr.fetchpriority]=\"image().fetchpriority\"\n [attr.alt]=\"image().altText\"\n [attr.aria-describedby]=\"image().ariaDescribedby\"\n [ngStyle]=\"image().preloadAspectRatio ? { 'aspect-ratio': image().preloadAspectRatio } : {}\"\n (load)=\"image_loaded.emit()\"\n [attr.role]=\"image().altText?.length > 0 ? 'img' : 'presentation'\"\n />\n </picture>\n}\n", styles: [":host.imageFill{display:block;width:100%;height:100%}:host.imageFill picture,:host.imageFill img{display:block;width:100%;height:100%}:host.imageFill img{object-fit:cover}:host{display:block}img{display:block;width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1005
1004
|
}
|
|
1006
1005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ImageComponent, decorators: [{
|
|
1007
1006
|
type: Component,
|
|
1008
|
-
args: [{ standalone: true, imports: [NgStyle], selector: 'ui-image', template: "@if (image()) {\n <picture>\n <source\n [attr.srcset]=\"image().srcSetUrls\"\n [attr.sizes]=\"image().sizes\"\n type=\"image/webp\"\n />\n\n <img\n [class.imageFill]=\"image().fill\"\n [attr.width]=\"image().ratioWidth\"\n [attr.height]=\"image().ratioHeight\"\n [attr.src]=\"image().fallbackUrl\"\n [attr.sizes]=\"image().sizes\"\n [attr.loading]=\"image().loading\"\n [attr.fetchpriority]=\"image().fetchpriority\"\n [attr.alt]=\"image().altText\"\n [attr.aria-describedby]=\"image().ariaDescribedby\"\n [ngStyle]=\"{ 'aspect-ratio': image().preloadAspectRatio }\"\n (load)=\"image_loaded.emit()\"\n [attr.role]=\"image().altText?.length > 0 ? 'img' : 'presentation'\"\n />\n </picture>\n}\n", styles: [":host.imageFill{display:block;width:100%;height:100%}:host.imageFill picture,:host.imageFill img{display:block;width:100%;height:100%}:host.imageFill img{object-fit:cover}:host{display:block}img{display:block;width:100%;height:auto}\n"] }]
|
|
1007
|
+
args: [{ standalone: true, imports: [NgStyle], selector: 'ui-image', template: "@if (image()) {\n <picture>\n <source\n [attr.srcset]=\"image().srcSetUrls\"\n [attr.sizes]=\"image().sizes\"\n type=\"image/webp\"\n />\n\n <img\n [class.imageFill]=\"image().fill\"\n [attr.width]=\"image().ratioWidth\"\n [attr.height]=\"image().ratioHeight\"\n [attr.src]=\"image().fallbackUrl\"\n [attr.sizes]=\"image().sizes\"\n [attr.loading]=\"image().loading\"\n [attr.fetchpriority]=\"image().fetchpriority\"\n [attr.alt]=\"image().altText\"\n [attr.aria-describedby]=\"image().ariaDescribedby\"\n [ngStyle]=\"image().preloadAspectRatio ? { 'aspect-ratio': image().preloadAspectRatio } : {}\"\n (load)=\"image_loaded.emit()\"\n [attr.role]=\"image().altText?.length > 0 ? 'img' : 'presentation'\"\n />\n </picture>\n}\n", styles: [":host.imageFill{display:block;width:100%;height:100%}:host.imageFill picture,:host.imageFill img{display:block;width:100%;height:100%}:host.imageFill img{object-fit:cover}:host{display:block}img{display:block;width:100%;height:auto}\n"] }]
|
|
1009
1008
|
}], propDecorators: { image_src: [{
|
|
1010
1009
|
type: Input,
|
|
1011
1010
|
args: [{ required: true }]
|
|
@@ -2253,70 +2252,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2253
2252
|
}] });
|
|
2254
2253
|
|
|
2255
2254
|
class SectionComponent {
|
|
2256
|
-
tokenService;
|
|
2257
2255
|
// Style input variables
|
|
2258
|
-
brand_background_colour;
|
|
2259
|
-
non_brand_background_colour;
|
|
2260
|
-
text_on_dark_override = false; // This is for custom/non-brand BG colours
|
|
2261
|
-
image_on_left = false;
|
|
2262
|
-
section_type = 'inform';
|
|
2256
|
+
brand_background_colour = input(...(ngDevMode ? [undefined, { debugName: "brand_background_colour" }] : []));
|
|
2257
|
+
non_brand_background_colour = input(...(ngDevMode ? [undefined, { debugName: "non_brand_background_colour" }] : []));
|
|
2258
|
+
text_on_dark_override = input(false, ...(ngDevMode ? [{ debugName: "text_on_dark_override" }] : [])); // This is for custom/non-brand BG colours
|
|
2259
|
+
image_on_left = input(false, ...(ngDevMode ? [{ debugName: "image_on_left" }] : []));
|
|
2260
|
+
section_type = input('inform', ...(ngDevMode ? [{ debugName: "section_type" }] : []));
|
|
2263
2261
|
// Content input variables
|
|
2264
|
-
heading_title;
|
|
2265
|
-
heading_subtitle;
|
|
2266
|
-
primary_cta_text;
|
|
2267
|
-
secondary_cta_text;
|
|
2268
|
-
image;
|
|
2269
|
-
alt_text;
|
|
2262
|
+
heading_title = input(...(ngDevMode ? [undefined, { debugName: "heading_title" }] : []));
|
|
2263
|
+
heading_subtitle = input(...(ngDevMode ? [undefined, { debugName: "heading_subtitle" }] : []));
|
|
2264
|
+
primary_cta_text = input(...(ngDevMode ? [undefined, { debugName: "primary_cta_text" }] : []));
|
|
2265
|
+
secondary_cta_text = input(...(ngDevMode ? [undefined, { debugName: "secondary_cta_text" }] : []));
|
|
2266
|
+
image = input(...(ngDevMode ? [undefined, { debugName: "image" }] : []));
|
|
2267
|
+
alt_text = input(...(ngDevMode ? [undefined, { debugName: "alt_text" }] : []));
|
|
2270
2268
|
// Event input variables
|
|
2271
|
-
href_primary_cta = '';
|
|
2272
|
-
href_secondary_cta = '';
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
imageAspectRatio;
|
|
2283
|
-
constructor(tokenService) {
|
|
2284
|
-
this.tokenService = tokenService;
|
|
2285
|
-
}
|
|
2286
|
-
ngAfterViewInit() {
|
|
2287
|
-
if (this.non_brand_background_colour) {
|
|
2288
|
-
this.setNonBrandBackgroundColour();
|
|
2289
|
-
}
|
|
2290
|
-
// This doesn't appear to be used anywhere
|
|
2291
|
-
this.backgroundIsDark = this.tokenService.getTokenValue(`--oasys-component-box-on-dark-${this.brand_background_colour}`);
|
|
2292
|
-
}
|
|
2293
|
-
ngOnInit() {
|
|
2294
|
-
this.containerInsetSpaceSmall = this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-container-small`);
|
|
2295
|
-
this.containerInsetSpaceLarge = this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-container-large`);
|
|
2296
|
-
this.contentInsetSpaceSmall = this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-content-small-${this.section_type}`);
|
|
2297
|
-
this.contentInsetSpaceLarge = this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-content-large-${this.section_type}`);
|
|
2298
|
-
this.imageAspectRatio = this.tokenService.getTokenValue(`--oasys-component-section-image-aspect-ratio-${this.section_type}`);
|
|
2299
|
-
// Setting a unique ID, this is important & needed to apply
|
|
2300
|
-
// styles to ui-box
|
|
2301
|
-
this.uiBoxId = Date.now() + '-' + Math.random();
|
|
2302
|
-
}
|
|
2303
|
-
/**
|
|
2304
|
-
* Users are able to set custom non brand background colours
|
|
2305
|
-
* If a non brand background colour is provided we ignore branded colours
|
|
2306
|
-
* even if they are provided.
|
|
2307
|
-
*/
|
|
2308
|
-
setNonBrandBackgroundColour() {
|
|
2309
|
-
const box = document.getElementById(`ui-box-${this.uiBoxId}`);
|
|
2310
|
-
if (box) {
|
|
2311
|
-
this.brand_background_colour = undefined;
|
|
2312
|
-
box.style.background = this.non_brand_background_colour;
|
|
2313
|
-
if (this.text_on_dark_override) {
|
|
2314
|
-
box.classList.add('text-color--on-dark');
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SectionComponent, deps: [{ token: TokenService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2319
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SectionComponent, isStandalone: true, selector: "ui-section", inputs: { brand_background_colour: "brand_background_colour", non_brand_background_colour: "non_brand_background_colour", text_on_dark_override: "text_on_dark_override", image_on_left: "image_on_left", section_type: "section_type", heading_title: "heading_title", heading_subtitle: "heading_subtitle", primary_cta_text: "primary_cta_text", secondary_cta_text: "secondary_cta_text", image: "image", alt_text: "alt_text", href_primary_cta: "href_primary_cta", href_secondary_cta: "href_secondary_cta" }, providers: [TokenService], ngImport: i0, template: "<ui-box\n id=\"ui-box-{{ uiBoxId }}\"\n [box_background]=\"brand_background_colour\"\n [box_space_left]=\"section_type === 'spotlight' && !image_on_left ? 'none' : undefined\"\n [box_space_right]=\"section_type === 'spotlight' && image_on_left ? 'none' : undefined\"\n [box_space]=\"\n section_type === 'spotlight'\n ? 'none'\n : {\n mobile: containerInsetSpaceSmall,\n tablet: containerInsetSpaceLarge,\n laptop: containerInsetSpaceLarge,\n desktop: containerInsetSpaceLarge,\n }\n \"\n>\n <ui-grid [grid_gap]=\"section_type === 'spotlight' ? 'none' : 'default'\">\n <ui-column\n [columns]=\"6\"\n [ngClass]=\"{ 'image-left': image_on_left, 'image-top-mobile': image_on_left }\"\n >\n <ui-box box_space=\"none\" box_background=\"transparent\" box_align_y=\"center\">\n <ui-image\n [image_src]=\"image\"\n [image_alt_text]=\"alt_text\"\n [preload_aspect_ratio]=\"imageAspectRatio\"\n ></ui-image>\n </ui-box>\n </ui-column>\n\n <ui-column [columns]=\"6\">\n <ui-box\n [box_background]=\"brand_background_colour\"\n box_align_y=\"center\"\n [box_space]=\"\n section_type === 'spotlight'\n ? {\n mobile: contentInsetSpaceSmall,\n tablet: contentInsetSpaceLarge,\n laptop: contentInsetSpaceLarge,\n desktop: contentInsetSpaceLarge,\n }\n : {\n mobile: contentInsetSpaceSmall,\n tablet: contentInsetSpaceSmall,\n laptop: contentInsetSpaceLarge,\n desktop: contentInsetSpaceLarge,\n }\n \"\n >\n <ui-stack\n stack_direction=\"y\"\n stack_align=\"center\"\n stack_distribute=\"center\"\n [stack_wrap]=\"true\"\n >\n <ui-heading\n [heading_type]=\"section_type === 'spotlight' ? 'primary' : 'functional-primary'\"\n [heading_title]=\"heading_title\"\n [heading_subtitle]=\"heading_subtitle\"\n >\n </ui-heading>\n\n <ui-stack\n stack_direction=\"x\"\n stack_align=\"start\"\n [stack_distribute]=\"section_type === 'spotlight' ? 'center' : 'start'\"\n [stack_wrap]=\"true\"\n stack_gap=\"near\"\n >\n <a\n class=\"text-link text-link--standalone\"\n [href]=\"href_primary_cta\"\n bwtrackas=\"oasys.story-block.primary-cta\"\n >{{ primary_cta_text }}</a\n >\n <a\n *ngIf=\"\n section_type !== 'spotlight' &&\n href_secondary_cta.length > 0 &&\n href_secondary_cta.length > 0\n \"\n class=\"text-link text-link--standalone\"\n [href]=\"href_secondary_cta\"\n bwtrackas=\"oasys.story-block.secondary-cta\"\n >{{ secondary_cta_text }}</a\n >\n </ui-stack>\n </ui-stack>\n </ui-box>\n </ui-column>\n </ui-grid>\n</ui-box>\n", styles: ["ui-grid ui-column img{width:100%;display:block}ui-grid .image-left{order:1}@media only screen and (max-width:766px){ui-grid .image-top-mobile{order:0}}\n"], dependencies: [{ kind: "component", type: LayoutBoxComponent, selector: "ui-box", inputs: ["box_space", "box_role", "box_space_top", "box_space_right", "box_space_bottom", "box_space_left", "box_align_x", "box_align_y", "box_fill_mode", "box_background", "box_content_fill_width", "box_border_color", "box_border_width", "box_border_style", "box_border_radius"] }, { kind: "component", type: LayoutGridComponent, selector: "ui-grid", inputs: ["grid_auto", "grid_collapse_below", "grid_gap", "grid_base"] }, { kind: "component", type: LayoutGridColumnComponent, selector: "ui-column", inputs: ["columns", "column_inset"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ImageComponent, selector: "ui-image", inputs: ["image_src", "image_alt_text", "image_aria_describedby", "image_fill", "fetchpriority", "loading", "preload_aspect_ratio", "image_width", "image_sizes"], outputs: ["image_loaded"] }, { kind: "component", type: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "component", type: OasysHeadingComponent, selector: "ui-heading", inputs: ["heading_type", "heading_on_dark", "heading_title", "heading_seo_priority", "heading_priority", "heading_alignment_override", "heading_subtitle", "heading_surtitle", "heading_level"] }, { kind: "directive", type: OasysHrefDirective, selector: "a, uiHref, [uiHref]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2269
|
+
href_primary_cta = input('', ...(ngDevMode ? [{ debugName: "href_primary_cta" }] : []));
|
|
2270
|
+
href_secondary_cta = input('', ...(ngDevMode ? [{ debugName: "href_secondary_cta" }] : []));
|
|
2271
|
+
tokenService = inject(TokenService);
|
|
2272
|
+
uiBoxId = computed(() => `ui-box-${Date.now()}-${Math.random()}`, ...(ngDevMode ? [{ debugName: "uiBoxId" }] : []));
|
|
2273
|
+
displayBrandBackgroundColour = computed(() => this.non_brand_background_colour() ? undefined : this.brand_background_colour(), ...(ngDevMode ? [{ debugName: "displayBrandBackgroundColour" }] : []));
|
|
2274
|
+
containerInsetSpaceSmall = computed(() => this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-container-small`), ...(ngDevMode ? [{ debugName: "containerInsetSpaceSmall" }] : []));
|
|
2275
|
+
containerInsetSpaceLarge = computed(() => this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-container-large`), ...(ngDevMode ? [{ debugName: "containerInsetSpaceLarge" }] : []));
|
|
2276
|
+
contentInsetSpaceSmall = computed(() => this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-content-small-${this.section_type()}`), ...(ngDevMode ? [{ debugName: "contentInsetSpaceSmall" }] : []));
|
|
2277
|
+
contentInsetSpaceLarge = computed(() => this.tokenService.getTokenValue(`--oasys-component-section-inset-spacing-content-large-${this.section_type()}`), ...(ngDevMode ? [{ debugName: "contentInsetSpaceLarge" }] : []));
|
|
2278
|
+
imageAspectRatio = computed(() => this.tokenService.getTokenValue(`--oasys-component-section-image-aspect-ratio-${this.section_type()}`), ...(ngDevMode ? [{ debugName: "imageAspectRatio" }] : []));
|
|
2279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SectionComponent, isStandalone: true, selector: "ui-section", inputs: { brand_background_colour: { classPropertyName: "brand_background_colour", publicName: "brand_background_colour", isSignal: true, isRequired: false, transformFunction: null }, non_brand_background_colour: { classPropertyName: "non_brand_background_colour", publicName: "non_brand_background_colour", isSignal: true, isRequired: false, transformFunction: null }, text_on_dark_override: { classPropertyName: "text_on_dark_override", publicName: "text_on_dark_override", isSignal: true, isRequired: false, transformFunction: null }, image_on_left: { classPropertyName: "image_on_left", publicName: "image_on_left", isSignal: true, isRequired: false, transformFunction: null }, section_type: { classPropertyName: "section_type", publicName: "section_type", isSignal: true, isRequired: false, transformFunction: null }, heading_title: { classPropertyName: "heading_title", publicName: "heading_title", isSignal: true, isRequired: false, transformFunction: null }, heading_subtitle: { classPropertyName: "heading_subtitle", publicName: "heading_subtitle", isSignal: true, isRequired: false, transformFunction: null }, primary_cta_text: { classPropertyName: "primary_cta_text", publicName: "primary_cta_text", isSignal: true, isRequired: false, transformFunction: null }, secondary_cta_text: { classPropertyName: "secondary_cta_text", publicName: "secondary_cta_text", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, alt_text: { classPropertyName: "alt_text", publicName: "alt_text", isSignal: true, isRequired: false, transformFunction: null }, href_primary_cta: { classPropertyName: "href_primary_cta", publicName: "href_primary_cta", isSignal: true, isRequired: false, transformFunction: null }, href_secondary_cta: { classPropertyName: "href_secondary_cta", publicName: "href_secondary_cta", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TokenService], ngImport: i0, template: "<ui-box\n [id]=\"uiBoxId()\"\n [box_background]=\"displayBrandBackgroundColour()\"\n [style.background]=\"non_brand_background_colour() ?? null\"\n [class.text-color--on-dark]=\"!!non_brand_background_colour() && text_on_dark_override()\"\n [box_space_left]=\"section_type() === 'spotlight' && !image_on_left() ? 'none' : undefined\"\n [box_space_right]=\"section_type() === 'spotlight' && image_on_left() ? 'none' : undefined\"\n [box_space]=\"\n section_type() === 'spotlight'\n ? 'none'\n : {\n mobile: containerInsetSpaceSmall(),\n tablet: containerInsetSpaceLarge(),\n laptop: containerInsetSpaceLarge(),\n desktop: containerInsetSpaceLarge(),\n }\n \"\n>\n <ui-grid [grid_gap]=\"section_type() === 'spotlight' ? 'none' : 'default'\">\n @if (image(); as resolvedImage) {\n <ui-column\n [columns]=\"6\"\n [ngClass]=\"{ 'image-left': image_on_left(), 'image-top-mobile': image_on_left() }\"\n >\n <ui-box box_space=\"none\" box_background=\"transparent\" box_align_y=\"center\">\n <ui-image\n [image_src]=\"resolvedImage\"\n [image_alt_text]=\"alt_text() ?? ''\"\n [preload_aspect_ratio]=\"imageAspectRatio()\"\n ></ui-image>\n </ui-box>\n </ui-column>\n }\n <ui-column [columns]=\"6\">\n <ui-box\n [box_background]=\"displayBrandBackgroundColour()\"\n box_align_y=\"center\"\n [box_space]=\"\n section_type() === 'spotlight'\n ? {\n mobile: contentInsetSpaceSmall(),\n tablet: contentInsetSpaceLarge(),\n laptop: contentInsetSpaceLarge(),\n desktop: contentInsetSpaceLarge(),\n }\n : {\n mobile: contentInsetSpaceSmall(),\n tablet: contentInsetSpaceSmall(),\n laptop: contentInsetSpaceLarge(),\n desktop: contentInsetSpaceLarge(),\n }\n \"\n >\n @if (heading_title() || primary_cta_text() || secondary_cta_text()) {\n <ui-stack\n stack_direction=\"y\"\n stack_align=\"center\"\n stack_distribute=\"center\"\n [stack_wrap]=\"true\"\n >\n @if (heading_title(); as title) {\n <ui-heading\n [heading_type]=\"section_type() === 'spotlight' ? 'primary' : 'functional-primary'\"\n [heading_title]=\"title\"\n [heading_subtitle]=\"heading_subtitle() ?? ''\"\n >\n </ui-heading>\n }\n\n @if (primary_cta_text() || secondary_cta_text()) {\n <ui-stack\n stack_direction=\"x\"\n stack_align=\"start\"\n [stack_distribute]=\"section_type() === 'spotlight' ? 'center' : 'start'\"\n [stack_wrap]=\"true\"\n stack_gap=\"near\"\n >\n @if (primary_cta_text(); as primaryCtaText) {\n @if (href_primary_cta(); as hrefPrimaryCta) {\n <a\n class=\"text-link text-link--standalone\"\n [href]=\"hrefPrimaryCta\"\n bwtrackas=\"oasys.story-block.primary-cta\"\n >{{ primaryCtaText }}</a\n >\n }\n }\n @if (secondary_cta_text(); as secondaryCtaText) {\n @if (href_secondary_cta(); as hrefSecondaryCta) {\n <a\n class=\"text-link text-link--standalone\"\n [href]=\"hrefSecondaryCta\"\n bwtrackas=\"oasys.story-block.secondary-cta\"\n >{{ secondaryCtaText }}</a\n >\n }\n }\n </ui-stack>\n }\n </ui-stack>\n }\n </ui-box>\n </ui-column>\n </ui-grid>\n</ui-box>\n", styles: ["ui-grid ui-column img{width:100%;display:block}ui-grid .image-left{order:1}@media only screen and (max-width:766px){ui-grid .image-top-mobile{order:0}}\n"], dependencies: [{ kind: "component", type: LayoutBoxComponent, selector: "ui-box", inputs: ["box_space", "box_role", "box_space_top", "box_space_right", "box_space_bottom", "box_space_left", "box_align_x", "box_align_y", "box_fill_mode", "box_background", "box_content_fill_width", "box_border_color", "box_border_width", "box_border_style", "box_border_radius"] }, { kind: "component", type: LayoutGridComponent, selector: "ui-grid", inputs: ["grid_auto", "grid_collapse_below", "grid_gap", "grid_base"] }, { kind: "component", type: LayoutGridColumnComponent, selector: "ui-column", inputs: ["columns", "column_inset"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ImageComponent, selector: "ui-image", inputs: ["image_src", "image_alt_text", "image_aria_describedby", "image_fill", "fetchpriority", "loading", "preload_aspect_ratio", "image_width", "image_sizes"], outputs: ["image_loaded"] }, { kind: "component", type: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "component", type: OasysHeadingComponent, selector: "ui-heading", inputs: ["heading_type", "heading_on_dark", "heading_title", "heading_seo_priority", "heading_priority", "heading_alignment_override", "heading_subtitle", "heading_surtitle", "heading_level"] }, { kind: "directive", type: OasysHrefDirective, selector: "a, uiHref, [uiHref]" }] });
|
|
2320
2281
|
}
|
|
2321
2282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SectionComponent, decorators: [{
|
|
2322
2283
|
type: Component,
|
|
@@ -2329,35 +2290,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2329
2290
|
LayoutStackComponent,
|
|
2330
2291
|
OasysHeadingComponent,
|
|
2331
2292
|
OasysHrefDirective,
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
}], ctorParameters: () => [{ type: TokenService }], propDecorators: { brand_background_colour: [{
|
|
2335
|
-
type: Input
|
|
2336
|
-
}], non_brand_background_colour: [{
|
|
2337
|
-
type: Input
|
|
2338
|
-
}], text_on_dark_override: [{
|
|
2339
|
-
type: Input
|
|
2340
|
-
}], image_on_left: [{
|
|
2341
|
-
type: Input
|
|
2342
|
-
}], section_type: [{
|
|
2343
|
-
type: Input
|
|
2344
|
-
}], heading_title: [{
|
|
2345
|
-
type: Input
|
|
2346
|
-
}], heading_subtitle: [{
|
|
2347
|
-
type: Input
|
|
2348
|
-
}], primary_cta_text: [{
|
|
2349
|
-
type: Input
|
|
2350
|
-
}], secondary_cta_text: [{
|
|
2351
|
-
type: Input
|
|
2352
|
-
}], image: [{
|
|
2353
|
-
type: Input
|
|
2354
|
-
}], alt_text: [{
|
|
2355
|
-
type: Input
|
|
2356
|
-
}], href_primary_cta: [{
|
|
2357
|
-
type: Input
|
|
2358
|
-
}], href_secondary_cta: [{
|
|
2359
|
-
type: Input
|
|
2360
|
-
}] } });
|
|
2293
|
+
], providers: [TokenService], template: "<ui-box\n [id]=\"uiBoxId()\"\n [box_background]=\"displayBrandBackgroundColour()\"\n [style.background]=\"non_brand_background_colour() ?? null\"\n [class.text-color--on-dark]=\"!!non_brand_background_colour() && text_on_dark_override()\"\n [box_space_left]=\"section_type() === 'spotlight' && !image_on_left() ? 'none' : undefined\"\n [box_space_right]=\"section_type() === 'spotlight' && image_on_left() ? 'none' : undefined\"\n [box_space]=\"\n section_type() === 'spotlight'\n ? 'none'\n : {\n mobile: containerInsetSpaceSmall(),\n tablet: containerInsetSpaceLarge(),\n laptop: containerInsetSpaceLarge(),\n desktop: containerInsetSpaceLarge(),\n }\n \"\n>\n <ui-grid [grid_gap]=\"section_type() === 'spotlight' ? 'none' : 'default'\">\n @if (image(); as resolvedImage) {\n <ui-column\n [columns]=\"6\"\n [ngClass]=\"{ 'image-left': image_on_left(), 'image-top-mobile': image_on_left() }\"\n >\n <ui-box box_space=\"none\" box_background=\"transparent\" box_align_y=\"center\">\n <ui-image\n [image_src]=\"resolvedImage\"\n [image_alt_text]=\"alt_text() ?? ''\"\n [preload_aspect_ratio]=\"imageAspectRatio()\"\n ></ui-image>\n </ui-box>\n </ui-column>\n }\n <ui-column [columns]=\"6\">\n <ui-box\n [box_background]=\"displayBrandBackgroundColour()\"\n box_align_y=\"center\"\n [box_space]=\"\n section_type() === 'spotlight'\n ? {\n mobile: contentInsetSpaceSmall(),\n tablet: contentInsetSpaceLarge(),\n laptop: contentInsetSpaceLarge(),\n desktop: contentInsetSpaceLarge(),\n }\n : {\n mobile: contentInsetSpaceSmall(),\n tablet: contentInsetSpaceSmall(),\n laptop: contentInsetSpaceLarge(),\n desktop: contentInsetSpaceLarge(),\n }\n \"\n >\n @if (heading_title() || primary_cta_text() || secondary_cta_text()) {\n <ui-stack\n stack_direction=\"y\"\n stack_align=\"center\"\n stack_distribute=\"center\"\n [stack_wrap]=\"true\"\n >\n @if (heading_title(); as title) {\n <ui-heading\n [heading_type]=\"section_type() === 'spotlight' ? 'primary' : 'functional-primary'\"\n [heading_title]=\"title\"\n [heading_subtitle]=\"heading_subtitle() ?? ''\"\n >\n </ui-heading>\n }\n\n @if (primary_cta_text() || secondary_cta_text()) {\n <ui-stack\n stack_direction=\"x\"\n stack_align=\"start\"\n [stack_distribute]=\"section_type() === 'spotlight' ? 'center' : 'start'\"\n [stack_wrap]=\"true\"\n stack_gap=\"near\"\n >\n @if (primary_cta_text(); as primaryCtaText) {\n @if (href_primary_cta(); as hrefPrimaryCta) {\n <a\n class=\"text-link text-link--standalone\"\n [href]=\"hrefPrimaryCta\"\n bwtrackas=\"oasys.story-block.primary-cta\"\n >{{ primaryCtaText }}</a\n >\n }\n }\n @if (secondary_cta_text(); as secondaryCtaText) {\n @if (href_secondary_cta(); as hrefSecondaryCta) {\n <a\n class=\"text-link text-link--standalone\"\n [href]=\"hrefSecondaryCta\"\n bwtrackas=\"oasys.story-block.secondary-cta\"\n >{{ secondaryCtaText }}</a\n >\n }\n }\n </ui-stack>\n }\n </ui-stack>\n }\n </ui-box>\n </ui-column>\n </ui-grid>\n</ui-box>\n", styles: ["ui-grid ui-column img{width:100%;display:block}ui-grid .image-left{order:1}@media only screen and (max-width:766px){ui-grid .image-top-mobile{order:0}}\n"] }]
|
|
2294
|
+
}], propDecorators: { brand_background_colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand_background_colour", required: false }] }], non_brand_background_colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "non_brand_background_colour", required: false }] }], text_on_dark_override: [{ type: i0.Input, args: [{ isSignal: true, alias: "text_on_dark_override", required: false }] }], image_on_left: [{ type: i0.Input, args: [{ isSignal: true, alias: "image_on_left", required: false }] }], section_type: [{ type: i0.Input, args: [{ isSignal: true, alias: "section_type", required: false }] }], heading_title: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading_title", required: false }] }], heading_subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading_subtitle", required: false }] }], primary_cta_text: [{ type: i0.Input, args: [{ isSignal: true, alias: "primary_cta_text", required: false }] }], secondary_cta_text: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondary_cta_text", required: false }] }], image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: false }] }], alt_text: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt_text", required: false }] }], href_primary_cta: [{ type: i0.Input, args: [{ isSignal: true, alias: "href_primary_cta", required: false }] }], href_secondary_cta: [{ type: i0.Input, args: [{ isSignal: true, alias: "href_secondary_cta", required: false }] }] } });
|
|
2361
2295
|
|
|
2362
2296
|
/** @deprecated Import the standalone SectionComponent directly instead. */
|
|
2363
2297
|
class SectionModule {
|