oasys-lib 2.35.0 → 2.35.1
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 +21 -175
- package/fesm2022/oasys-lib.mjs.map +1 -1
- package/index.d.ts +6 -31
- package/index.d.ts.map +1 -1
- package/package.json +4 -4
- 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
|
@@ -943,19 +943,13 @@ class ImageComponent {
|
|
|
943
943
|
fetchpriority = 'auto';
|
|
944
944
|
loading = 'lazy';
|
|
945
945
|
preload_aspect_ratio = '1:1';
|
|
946
|
-
image_width = null; //
|
|
946
|
+
image_width = null; // explicit rendered width in px, when known by the consumer
|
|
947
|
+
image_sizes = null; // fallback `sizes` value for non-lazy / no-auto-support cases
|
|
947
948
|
image_loaded = new EventEmitter();
|
|
948
949
|
imageUrlProvider = inject(IMAGE_URL_PROVIDER);
|
|
949
|
-
el = inject((ElementRef));
|
|
950
950
|
image = signal(null, ...(ngDevMode ? [{ debugName: "image" }] : []));
|
|
951
951
|
breakpoints = inject(IMAGE_BREAKPOINTS);
|
|
952
952
|
fallbackBreakpoint = 768;
|
|
953
|
-
imageSizes = this.breakpoints.map((size) => `(max-width: ${size}px) ${size}px`).join(', ');
|
|
954
|
-
measuredWidthPx = signal(null, ...(ngDevMode ? [{ debugName: "measuredWidthPx" }] : []));
|
|
955
|
-
resizeObserver = null;
|
|
956
|
-
intersectionObserver = null;
|
|
957
|
-
lazySourcesApplied = false;
|
|
958
|
-
viewInitialized = false;
|
|
959
953
|
get class() {
|
|
960
954
|
return this.image_fill ? 'imageFill' : '';
|
|
961
955
|
}
|
|
@@ -965,203 +959,53 @@ class ImageComponent {
|
|
|
965
959
|
ngOnInit() {
|
|
966
960
|
this.createImage();
|
|
967
961
|
}
|
|
968
|
-
ngAfterViewInit() {
|
|
969
|
-
this.viewInitialized = true;
|
|
970
|
-
this.setupResizeObserver();
|
|
971
|
-
void this.setupLazyLoading();
|
|
972
|
-
}
|
|
973
962
|
/**
|
|
974
963
|
* On changes, handle any changes in input properties.
|
|
975
964
|
*/
|
|
976
965
|
ngOnChanges(changes) {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
this.measuredWidthPx.set(null);
|
|
980
|
-
if (this.image_width) {
|
|
981
|
-
this.cleanupResizeObserver();
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
this.lazySourcesApplied = false;
|
|
985
|
-
this.cleanupObserver();
|
|
966
|
+
const hasSubsequentChange = Object.values(changes).some((change) => !change.firstChange);
|
|
967
|
+
if (hasSubsequentChange) {
|
|
986
968
|
this.createImage();
|
|
987
|
-
if (this.viewInitialized) {
|
|
988
|
-
this.setupResizeObserver();
|
|
989
|
-
void this.setupLazyLoading();
|
|
990
|
-
}
|
|
991
969
|
}
|
|
992
970
|
}
|
|
993
|
-
/**
|
|
994
|
-
* Clean up the observer when the component is destroyed.
|
|
995
|
-
*/
|
|
996
|
-
ngOnDestroy() {
|
|
997
|
-
this.cleanupObserver();
|
|
998
|
-
this.cleanupResizeObserver();
|
|
999
|
-
}
|
|
1000
971
|
/**
|
|
1001
972
|
* Creates the image object with the provided properties.
|
|
1002
973
|
*/
|
|
1003
974
|
createImage() {
|
|
1004
975
|
const ratios = this.preload_aspect_ratio.split(':');
|
|
1005
976
|
const imageUrlResponse = this.imageUrlProvider.generateImageUrl(this.image_src, this.breakpoints, this.fallbackBreakpoint);
|
|
977
|
+
const loading = this.resolveLoading();
|
|
1006
978
|
const newImage = {
|
|
1007
979
|
...imageUrlResponse,
|
|
1008
980
|
ratioWidth: parseInt(ratios[0], 10),
|
|
1009
981
|
ratioHeight: parseInt(ratios[1], 10),
|
|
1010
|
-
loading
|
|
982
|
+
loading,
|
|
1011
983
|
fill: this.image_fill,
|
|
1012
984
|
fetchpriority: this.fetchpriority,
|
|
1013
985
|
preloadAspectRatio: this.preload_aspect_ratio,
|
|
1014
986
|
width: this.image_width ? `${this.image_width}px` : null,
|
|
987
|
+
sizes: this.resolveSizes(loading),
|
|
1015
988
|
altText: this.image_alt_text,
|
|
1016
989
|
ariaDescribedby: this.image_aria_describedby ?? null,
|
|
1017
990
|
};
|
|
1018
991
|
this.image.set(newImage);
|
|
1019
992
|
}
|
|
1020
|
-
|
|
993
|
+
resolveLoading() {
|
|
994
|
+
return this.fetchpriority === 'high' ? 'eager' : this.loading;
|
|
995
|
+
}
|
|
996
|
+
resolveSizes(loading) {
|
|
1021
997
|
if (this.image_width) {
|
|
1022
998
|
return `${this.image_width}px`;
|
|
1023
999
|
}
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1026
|
-
return `${measured}px`;
|
|
1027
|
-
}
|
|
1028
|
-
return this.imageSizes;
|
|
1029
|
-
}
|
|
1030
|
-
setupResizeObserver() {
|
|
1031
|
-
if (this.image_width || typeof ResizeObserver === 'undefined' || this.resizeObserver) {
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
const host = this.el.nativeElement;
|
|
1035
|
-
const syncWidth = Math.round(host.getBoundingClientRect().width || host.offsetWidth || 0);
|
|
1036
|
-
if (syncWidth > 0) {
|
|
1037
|
-
this.measuredWidthPx.set(syncWidth);
|
|
1038
|
-
return;
|
|
1039
|
-
}
|
|
1040
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1041
|
-
const width = entries[0].borderBoxSize[0].inlineSize;
|
|
1042
|
-
const rounded = Math.round(width);
|
|
1043
|
-
if (rounded <= 0 || rounded === this.measuredWidthPx()) {
|
|
1044
|
-
return;
|
|
1045
|
-
}
|
|
1046
|
-
this.measuredWidthPx.set(rounded);
|
|
1047
|
-
this.cleanupResizeObserver();
|
|
1048
|
-
});
|
|
1049
|
-
this.resizeObserver.observe(host);
|
|
1050
|
-
}
|
|
1051
|
-
cleanupResizeObserver() {
|
|
1052
|
-
this.resizeObserver?.disconnect();
|
|
1053
|
-
this.resizeObserver = null;
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Sets up lazy loading for the image using IntersectionObserver.
|
|
1057
|
-
* This method observes the image element and loads the image when it comes into view.
|
|
1058
|
-
* It sets the `src` attribute for the image and the `srcset` attribute for the source element.
|
|
1059
|
-
* The observer is configured to remove the image after it has been observed to save memory.
|
|
1060
|
-
*/
|
|
1061
|
-
setupLazyLoading() {
|
|
1062
|
-
return Promise.resolve().then(() => {
|
|
1063
|
-
// Defer setup until after the view is initialized to ensure the <img> element exists.
|
|
1064
|
-
if (this.intersectionObserver) {
|
|
1065
|
-
return;
|
|
1066
|
-
}
|
|
1067
|
-
const imageElement = this.el.nativeElement.querySelector('img');
|
|
1068
|
-
if (!imageElement) {
|
|
1069
|
-
return;
|
|
1070
|
-
}
|
|
1071
|
-
if (this.loading === 'eager' || this.fetchpriority === 'high') {
|
|
1072
|
-
this.loadImageSources(imageElement);
|
|
1073
|
-
return;
|
|
1074
|
-
}
|
|
1075
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
1076
|
-
entries.forEach((entry) => {
|
|
1077
|
-
if (entry.isIntersecting) {
|
|
1078
|
-
this.loadImageSources(entry.target);
|
|
1079
|
-
// Stop observing this image once it's loaded.
|
|
1080
|
-
this.intersectionObserver?.unobserve(entry.target);
|
|
1081
|
-
}
|
|
1082
|
-
});
|
|
1083
|
-
}, {
|
|
1084
|
-
root: null,
|
|
1085
|
-
rootMargin: '100px',
|
|
1086
|
-
threshold: 0.01,
|
|
1087
|
-
});
|
|
1088
|
-
this.intersectionObserver.observe(imageElement);
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
loadImageSources(img) {
|
|
1092
|
-
if (this.lazySourcesApplied) {
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
if (!this.image_width) {
|
|
1096
|
-
const host = this.el.nativeElement;
|
|
1097
|
-
const width = Math.round(host.getBoundingClientRect().width || host.offsetWidth || 0);
|
|
1098
|
-
if (width > 0) {
|
|
1099
|
-
this.measuredWidthPx.set(width);
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
const source = img.parentElement?.querySelector('source');
|
|
1103
|
-
const dataSrcset = source?.getAttribute('data-srcset');
|
|
1104
|
-
if (source) {
|
|
1105
|
-
source.setAttribute('sizes', this.resolvedSizes());
|
|
1106
|
-
if (dataSrcset) {
|
|
1107
|
-
// Move the URLs from data-srcset to srcset
|
|
1108
|
-
source.setAttribute('srcset', dataSrcset);
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
const dataSrc = img.getAttribute('data-src');
|
|
1112
|
-
const slotWidthPx = this.image_width ?? this.measuredWidthPx() ?? 0;
|
|
1113
|
-
let imgSrc = dataSrc;
|
|
1114
|
-
if (dataSrcset && slotWidthPx > 0) {
|
|
1115
|
-
imgSrc = this.pickSrcsetUrlForSlot(dataSrcset, slotWidthPx) ?? dataSrc;
|
|
1116
|
-
}
|
|
1117
|
-
if (imgSrc) {
|
|
1118
|
-
// Move the URL from data-src to src
|
|
1119
|
-
img.setAttribute('src', imgSrc);
|
|
1120
|
-
}
|
|
1121
|
-
this.lazySourcesApplied = true;
|
|
1122
|
-
}
|
|
1123
|
-
pickSrcsetUrlForSlot(srcset, slotWidthPx) {
|
|
1124
|
-
const targetWidth = Math.ceil(slotWidthPx * (window.devicePixelRatio || 1));
|
|
1125
|
-
const candidates = srcset
|
|
1126
|
-
.split(',')
|
|
1127
|
-
.map((candidate) => candidate.trim())
|
|
1128
|
-
.map((candidate) => {
|
|
1129
|
-
const descriptorIndex = candidate.lastIndexOf(' ');
|
|
1130
|
-
if (descriptorIndex === -1) {
|
|
1131
|
-
return null;
|
|
1132
|
-
}
|
|
1133
|
-
const url = candidate.slice(0, descriptorIndex).trim();
|
|
1134
|
-
const width = parseInt(candidate.slice(descriptorIndex + 1), 10);
|
|
1135
|
-
return url && !Number.isNaN(width) ? { url, width } : null;
|
|
1136
|
-
})
|
|
1137
|
-
.filter((candidate) => candidate !== null);
|
|
1138
|
-
if (candidates.length === 0) {
|
|
1139
|
-
return null;
|
|
1140
|
-
}
|
|
1141
|
-
const atOrAbove = candidates
|
|
1142
|
-
.filter(({ width }) => width >= targetWidth)
|
|
1143
|
-
.sort((a, b) => a.width - b.width);
|
|
1144
|
-
if (atOrAbove.length > 0) {
|
|
1145
|
-
return atOrAbove[0].url;
|
|
1146
|
-
}
|
|
1147
|
-
return candidates.sort((a, b) => b.width - a.width)[0].url;
|
|
1148
|
-
}
|
|
1149
|
-
/**
|
|
1150
|
-
* Cleans up the IntersectionObserver to prevent memory leaks.
|
|
1151
|
-
* This method disconnects the observer and sets it to null.
|
|
1152
|
-
*/
|
|
1153
|
-
cleanupObserver() {
|
|
1154
|
-
if (this.intersectionObserver) {
|
|
1155
|
-
this.intersectionObserver.disconnect();
|
|
1156
|
-
this.intersectionObserver = null;
|
|
1157
|
-
}
|
|
1000
|
+
const fallback = this.image_sizes ?? '100vw';
|
|
1001
|
+
return loading === 'lazy' ? `auto, ${fallback}` : fallback;
|
|
1158
1002
|
}
|
|
1159
1003
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1160
|
-
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" }, outputs: { image_loaded: "image_loaded" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0, template: "@if (image()) {\n <picture>\n <source\n [attr.
|
|
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"] }] });
|
|
1161
1005
|
}
|
|
1162
1006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ImageComponent, decorators: [{
|
|
1163
1007
|
type: Component,
|
|
1164
|
-
args: [{ standalone: true, imports: [NgStyle], selector: 'ui-image', template: "@if (image()) {\n <picture>\n <source\n [attr.
|
|
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"] }]
|
|
1165
1009
|
}], propDecorators: { image_src: [{
|
|
1166
1010
|
type: Input,
|
|
1167
1011
|
args: [{ required: true }]
|
|
@@ -1179,6 +1023,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1179
1023
|
type: Input
|
|
1180
1024
|
}], image_width: [{
|
|
1181
1025
|
type: Input
|
|
1026
|
+
}], image_sizes: [{
|
|
1027
|
+
type: Input
|
|
1182
1028
|
}], image_loaded: [{
|
|
1183
1029
|
type: Output
|
|
1184
1030
|
}], class: [{
|
|
@@ -1236,7 +1082,7 @@ class CardComponent {
|
|
|
1236
1082
|
}
|
|
1237
1083
|
}
|
|
1238
1084
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CardComponent, deps: [{ token: TokenService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1239
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: CardComponent, isStandalone: true, selector: "ui-card", inputs: { label_text: "label_text", image: "image", alt_text: "alt_text", image_format: "image_format", small_title_left: "small_title_left", small_sub_title_right: "small_sub_title_right", standard_content: "standard_content", bold_content: "bold_content" }, host: { listeners: { "window:resize": "setStackPlacement($event)" } }, providers: [TokenService], viewQueries: [{ propertyName: "imageLabel", first: true, predicate: ["imagelabel"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ui-box class=\"ui-card\" box_background=\"core-primary\" box_space=\"none\">\n <ui-stack stack_align=\"center\" stack_gap=\"tight\">\n <ui-box\n class=\"ui-card__image\"\n [ngStyle]=\"{ 'aspect-ratio': aspectRatio }\"\n box_background=\"transparent\"\n box_align_x=\"center\"\n box_space=\"none\"\n >\n <ui-image [image_src]=\"image\" [image_alt_text]=\"alt_text\" [image_fill]=\"true\"></ui-image>\n </ui-box>\n <ui-stack stack_gap=\"tight\" [ngStyle]=\"{ 'margin-top': stackOffset }\">\n <ui-box\n #imagelabel\n *ngIf=\"label_text\"\n class=\"card__image-label center-content\"\n box_background=\"tint-highlight\"\n box_align_x=\"center\"\n box_align_y=\"center\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"tight\"\n box_space_top=\"tight\"\n >\n <h5>{{ label_text }}</h5>\n </ui-box>\n <ui-box\n *ngIf=\"small_title_left || small_sub_title_right\"\n [box_space_top]=\"label_text ? 'none' : 'tight'\"\n box_space=\"none\"\n box_background=\"transparent\"\n >\n <ui-stack stack_direction=\"x\" stack_distribute=\"space-between\" stack_gap=\"tight\">\n <span class=\"text-body--supporting text-color--supporting\">{{ small_title_left }}</span>\n <span class=\"text-body--supporting text-color--supporting\">{{\n small_sub_title_right\n }}</span>\n </ui-stack>\n </ui-box>\n <p *ngIf=\"standard_content\" class=\"text-label--default center-content\">\n {{ standard_content }}\n </p>\n <p *ngIf=\"bold_content\" class=\"text-label--primary text-body--emphasis\">{{ bold_content }}</p>\n </ui-stack>\n </ui-stack>\n</ui-box>\n", styles: [".ui-card__image{position:relative}.ui-card__image ui-image{position:absolute;height:100%;object-fit:cover;width:100%;left:0}.ui-card .center-content{text-align:center;align-self:center}.ui-card .card__image-label{width:auto;height:auto;border-radius:var(--oasys-radius-soften);margin:0 var(--oasys-spacing-tight);text-align:center;overflow:hidden;z-index:2}\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: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"], outputs: ["image_loaded"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1085
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: CardComponent, isStandalone: true, selector: "ui-card", inputs: { label_text: "label_text", image: "image", alt_text: "alt_text", image_format: "image_format", small_title_left: "small_title_left", small_sub_title_right: "small_sub_title_right", standard_content: "standard_content", bold_content: "bold_content" }, host: { listeners: { "window:resize": "setStackPlacement($event)" } }, providers: [TokenService], viewQueries: [{ propertyName: "imageLabel", first: true, predicate: ["imagelabel"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ui-box class=\"ui-card\" box_background=\"core-primary\" box_space=\"none\">\n <ui-stack stack_align=\"center\" stack_gap=\"tight\">\n <ui-box\n class=\"ui-card__image\"\n [ngStyle]=\"{ 'aspect-ratio': aspectRatio }\"\n box_background=\"transparent\"\n box_align_x=\"center\"\n box_space=\"none\"\n >\n <ui-image [image_src]=\"image\" [image_alt_text]=\"alt_text\" [image_fill]=\"true\"></ui-image>\n </ui-box>\n <ui-stack stack_gap=\"tight\" [ngStyle]=\"{ 'margin-top': stackOffset }\">\n <ui-box\n #imagelabel\n *ngIf=\"label_text\"\n class=\"card__image-label center-content\"\n box_background=\"tint-highlight\"\n box_align_x=\"center\"\n box_align_y=\"center\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"tight\"\n box_space_top=\"tight\"\n >\n <h5>{{ label_text }}</h5>\n </ui-box>\n <ui-box\n *ngIf=\"small_title_left || small_sub_title_right\"\n [box_space_top]=\"label_text ? 'none' : 'tight'\"\n box_space=\"none\"\n box_background=\"transparent\"\n >\n <ui-stack stack_direction=\"x\" stack_distribute=\"space-between\" stack_gap=\"tight\">\n <span class=\"text-body--supporting text-color--supporting\">{{ small_title_left }}</span>\n <span class=\"text-body--supporting text-color--supporting\">{{\n small_sub_title_right\n }}</span>\n </ui-stack>\n </ui-box>\n <p *ngIf=\"standard_content\" class=\"text-label--default center-content\">\n {{ standard_content }}\n </p>\n <p *ngIf=\"bold_content\" class=\"text-label--primary text-body--emphasis\">{{ bold_content }}</p>\n </ui-stack>\n </ui-stack>\n</ui-box>\n", styles: [".ui-card__image{position:relative}.ui-card__image ui-image{position:absolute;height:100%;object-fit:cover;width:100%;left:0}.ui-card .center-content{text-align:center;align-self:center}.ui-card .card__image-label{width:auto;height:auto;border-radius:var(--oasys-radius-soften);margin:0 var(--oasys-spacing-tight);text-align:center;overflow:hidden;z-index:2}\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: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1240
1086
|
}
|
|
1241
1087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CardComponent, decorators: [{
|
|
1242
1088
|
type: Component,
|
|
@@ -2470,7 +2316,7 @@ class SectionComponent {
|
|
|
2470
2316
|
}
|
|
2471
2317
|
}
|
|
2472
2318
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SectionComponent, deps: [{ token: TokenService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2473
|
-
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"], 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"] }] });
|
|
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"] }] });
|
|
2474
2320
|
}
|
|
2475
2321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SectionComponent, decorators: [{
|
|
2476
2322
|
type: Component,
|
|
@@ -3053,7 +2899,7 @@ class PromoCardComponent {
|
|
|
3053
2899
|
this.cta_clicked.emit();
|
|
3054
2900
|
}
|
|
3055
2901
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PromoCardComponent, deps: [{ token: TokenService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3056
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: PromoCardComponent, isStandalone: true, selector: "ui-promo-card", inputs: { image: "image", alt_text: "alt_text", title: "title", subtitle: "subtitle", primary_cta_text: "primary_cta_text", href_primary_cta: "href_primary_cta", background_colour: "background_colour", font_colour: "font_colour", layout: "layout" }, outputs: { cta_clicked: "cta_clicked" }, providers: [TokenService], ngImport: i0, template: "<ui-box box_space=\"none\" [ngStyle]=\"{ 'background-color': background_colour, color: font_colour }\">\n <ui-stack [stack_gap]=\"layoutConfig.spacing\" stack_align=\"center\">\n <ui-box box_space=\"none\">\n <ui-image\n [image_fill]=\"true\"\n [image_src]=\"image\"\n [image_alt_text]=\"alt_text\"\n [preload_aspect_ratio]=\"aspectRatio\"\n ></ui-image>\n </ui-box>\n <ui-box\n [box_align_y]=\"alignment\"\n box_space_top=\"none\"\n [box_space]=\"layoutConfig.spacing\"\n [ngStyle]=\"{ 'background-color': background_colour }\"\n >\n <ui-stack stack_gap=\"near\" stack_distribute=\"center\" [stack_align]=\"alignment\">\n <h3\n [ngClass]=\"{\n 'text-heading--body--expressive': layoutConfig.headingType === 'body-expressive',\n 'text-heading--secondary': layoutConfig.headingType === 'secondary',\n }\"\n role=\"heading\"\n class=\"seo-h2\"\n >\n <span class=\"heading-title text-heading\">{{ title }}</span>\n </h3>\n <p\n [ngClass]=\"{\n 'text-body--default': layoutConfig.bodyType === 'body-default',\n 'text-body--supporting': layoutConfig.bodyType === 'body-supporting',\n }\"\n >\n {{ subtitle }}\n </p>\n <a\n class=\"text-link text-link--standalone\"\n bwtrackas=\"component.modular-content-card.cta\"\n href=\"{{ href_primary_cta }}\"\n (click)=\"ctaClicked()\"\n >{{ primary_cta_text }}</a\n >\n </ui-stack>\n </ui-box>\n </ui-stack>\n</ui-box>\n", styles: ["ui-image img{object-fit:cover}p,h3{text-align:var(--oasys-component-promo-card-heading-alignment)}\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: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: ImageComponent, selector: "ui-image", inputs: ["image_src", "image_alt_text", "image_aria_describedby", "image_fill", "fetchpriority", "loading", "preload_aspect_ratio", "image_width"], outputs: ["image_loaded"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: OasysHrefDirective, selector: "a, uiHref, [uiHref]" }] });
|
|
2902
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: PromoCardComponent, isStandalone: true, selector: "ui-promo-card", inputs: { image: "image", alt_text: "alt_text", title: "title", subtitle: "subtitle", primary_cta_text: "primary_cta_text", href_primary_cta: "href_primary_cta", background_colour: "background_colour", font_colour: "font_colour", layout: "layout" }, outputs: { cta_clicked: "cta_clicked" }, providers: [TokenService], ngImport: i0, template: "<ui-box box_space=\"none\" [ngStyle]=\"{ 'background-color': background_colour, color: font_colour }\">\n <ui-stack [stack_gap]=\"layoutConfig.spacing\" stack_align=\"center\">\n <ui-box box_space=\"none\">\n <ui-image\n [image_fill]=\"true\"\n [image_src]=\"image\"\n [image_alt_text]=\"alt_text\"\n [preload_aspect_ratio]=\"aspectRatio\"\n ></ui-image>\n </ui-box>\n <ui-box\n [box_align_y]=\"alignment\"\n box_space_top=\"none\"\n [box_space]=\"layoutConfig.spacing\"\n [ngStyle]=\"{ 'background-color': background_colour }\"\n >\n <ui-stack stack_gap=\"near\" stack_distribute=\"center\" [stack_align]=\"alignment\">\n <h3\n [ngClass]=\"{\n 'text-heading--body--expressive': layoutConfig.headingType === 'body-expressive',\n 'text-heading--secondary': layoutConfig.headingType === 'secondary',\n }\"\n role=\"heading\"\n class=\"seo-h2\"\n >\n <span class=\"heading-title text-heading\">{{ title }}</span>\n </h3>\n <p\n [ngClass]=\"{\n 'text-body--default': layoutConfig.bodyType === 'body-default',\n 'text-body--supporting': layoutConfig.bodyType === 'body-supporting',\n }\"\n >\n {{ subtitle }}\n </p>\n <a\n class=\"text-link text-link--standalone\"\n bwtrackas=\"component.modular-content-card.cta\"\n href=\"{{ href_primary_cta }}\"\n (click)=\"ctaClicked()\"\n >{{ primary_cta_text }}</a\n >\n </ui-stack>\n </ui-box>\n </ui-stack>\n</ui-box>\n", styles: ["ui-image img{object-fit:cover}p,h3{text-align:var(--oasys-component-promo-card-heading-alignment)}\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: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: OasysHrefDirective, selector: "a, uiHref, [uiHref]" }] });
|
|
3057
2903
|
}
|
|
3058
2904
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PromoCardComponent, decorators: [{
|
|
3059
2905
|
type: Component,
|
|
@@ -3174,7 +3020,7 @@ class SelectCardComponent {
|
|
|
3174
3020
|
}
|
|
3175
3021
|
}
|
|
3176
3022
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectCardComponent, deps: [{ token: TokenService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3177
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SelectCardComponent, isStandalone: true, selector: "ui-select-card", inputs: { image: "image", alt_text: "alt_text", image_format: "image_format", title: "title", primary_copy: "primary_copy", secondary_copy: "secondary_copy", price: "price", price_before_discount: "price_before_discount", selected: "selected", select_card_type: "select_card_type" }, outputs: { clicked: "clicked" }, providers: [TokenService], ngImport: i0, template: "<button\n role=\"button\"\n class=\"ui-select-card--{{ select_card_type }}\"\n tabindex=\"0\"\n [ngClass]=\"{ selected: selected }\"\n [attr.aria-pressed]=\"selected ? 'true' : 'false'\"\n (click)=\"onClick()\"\n>\n <ui-box box_space=\"none\" box_background=\"transparent\">\n <ui-stack stack_gap=\"none\" stack_align=\"center\">\n <ui-box\n class=\"ui-select-card__image\"\n [ngStyle]=\"{ 'aspect-ratio': aspectRatio }\"\n box_background=\"transparent\"\n box_align_x=\"center\"\n box_space=\"none\"\n >\n <ui-image\n *ngIf=\"image\"\n [image_src]=\"image\"\n [image_alt_text]=\"alt_text\"\n [image_fill]=\"true\"\n ></ui-image>\n <ng-content></ng-content>\n </ui-box>\n <ng-template\n *ngIf=\"select_card_type === 'gift-card'\"\n [ngTemplateOutlet]=\"giftcard\"\n ></ng-template>\n <ng-template\n *ngIf=\"select_card_type === 'product-card'\"\n [ngTemplateOutlet]=\"productcard\"\n ></ng-template>\n </ui-stack>\n </ui-box>\n</button>\n\n<!--- GIFT CARD TEMPLATE -->\n<ng-template #giftcard>\n <ui-box box_space=\"tight\" box_background=\"transparent\">\n <ui-stack class=\"ui-select-card__text-stack\" stack_direction=\"y\" stack_gap=\"tight\">\n <span class=\"ui-select-card__text-body text-label--primary\">{{ title }}</span>\n\n <ui-price\n [price]=\"price\"\n [price_before_discount]=\"price_before_discount\"\n price_type=\"primary\"\n ></ui-price>\n </ui-stack>\n </ui-box>\n</ng-template>\n\n<!--- PRODUCT CARD TEMPLATE -->\n<ng-template #productcard>\n <ui-box box_fill_mode=\"fit\" box_space=\"near\" box_background=\"transparent\">\n <ui-stack stack_direction=\"y\" stack_gap=\"near\">\n <ui-stack class=\"ui-select-card__text-stack\" stack_direction=\"y\" stack_gap=\"none\">\n <h5>{{ title }}</h5>\n <ui-stack stack_direction=\"x\" stack_gap=\"near\" stack_align=\"center\">\n <ui-price\n [price]=\"price\"\n [price_before_discount]=\"price_before_discount\"\n price_type=\"hero\"\n ></ui-price>\n <ui-icon\n *ngIf=\"price_before_discount\"\n class=\"ui-select-card--product-card__discount-icon\"\n icon_name=\"tag\"\n icon_size_override=\"1.5\"\n ></ui-icon>\n </ui-stack>\n </ui-stack>\n <ui-stack stack_gap=\"near\">\n <p class=\"text-body--supporting\">{{ secondary_copy }}</p>\n <p class=\"text-body--default\">{{ primary_copy }}</p>\n </ui-stack>\n </ui-stack>\n </ui-box>\n</ng-template>\n", styles: [".ui-select-card--gift-card,.ui-select-card--product-card{background-color:transparent;border:1px solid transparent;width:100%;display:block;padding:0;appearance:none;cursor:pointer;overflow:hidden}.ui-select-card--gift-card .ui-select-card__image .ui-box-content,.ui-select-card--product-card .ui-select-card__image .ui-box-content{height:100%}.ui-select-card--gift-card__text-stack,.ui-select-card--product-card__text-stack{width:100%}.ui-select-card--gift-card{border-radius:var(--oasys-radius-soften)}.ui-select-card--gift-card .ui-select-card__text-body{text-align:left;min-height:calc(var(--oasys-typography-heading-label-primary-line-height) * 2)}.ui-select-card--product-card{border-radius:var(--oasys-radius-layout);border:1px solid var(--oasys-color-brand-border-secondary)}.ui-select-card--product-card .text-body--default{text-align:left}.ui-select-card--product-card__discount-icon{border-radius:var(--oasys-radius-round);border:1px solid transparent;padding:var(--oasys-spacing-tiny);background-color:var(--oasys-color-brand-foreground-highlight)}.ui-select-card--gift-card.selected,.ui-select-card--product-card.selected{--_select-border-width: var(--oasys-border-width-primary);--_select-border-color: var(--oasys-color-interaction-border-selected);--_select-background-color: var(--oasys-color-interaction-background-selected);background-color:var(--_select-background-color);border:var(--_select-border-width) solid var(--_select-border-color)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"], outputs: ["image_loaded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OasysPriceComponent, selector: "ui-price", inputs: ["price", "price_before_discount", "price_type"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["icon_size", "icon_size_override", "icon_name", "icon_context", "alt_text", "icon_class"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3023
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SelectCardComponent, isStandalone: true, selector: "ui-select-card", inputs: { image: "image", alt_text: "alt_text", image_format: "image_format", title: "title", primary_copy: "primary_copy", secondary_copy: "secondary_copy", price: "price", price_before_discount: "price_before_discount", selected: "selected", select_card_type: "select_card_type" }, outputs: { clicked: "clicked" }, providers: [TokenService], ngImport: i0, template: "<button\n role=\"button\"\n class=\"ui-select-card--{{ select_card_type }}\"\n tabindex=\"0\"\n [ngClass]=\"{ selected: selected }\"\n [attr.aria-pressed]=\"selected ? 'true' : 'false'\"\n (click)=\"onClick()\"\n>\n <ui-box box_space=\"none\" box_background=\"transparent\">\n <ui-stack stack_gap=\"none\" stack_align=\"center\">\n <ui-box\n class=\"ui-select-card__image\"\n [ngStyle]=\"{ 'aspect-ratio': aspectRatio }\"\n box_background=\"transparent\"\n box_align_x=\"center\"\n box_space=\"none\"\n >\n <ui-image\n *ngIf=\"image\"\n [image_src]=\"image\"\n [image_alt_text]=\"alt_text\"\n [image_fill]=\"true\"\n ></ui-image>\n <ng-content></ng-content>\n </ui-box>\n <ng-template\n *ngIf=\"select_card_type === 'gift-card'\"\n [ngTemplateOutlet]=\"giftcard\"\n ></ng-template>\n <ng-template\n *ngIf=\"select_card_type === 'product-card'\"\n [ngTemplateOutlet]=\"productcard\"\n ></ng-template>\n </ui-stack>\n </ui-box>\n</button>\n\n<!--- GIFT CARD TEMPLATE -->\n<ng-template #giftcard>\n <ui-box box_space=\"tight\" box_background=\"transparent\">\n <ui-stack class=\"ui-select-card__text-stack\" stack_direction=\"y\" stack_gap=\"tight\">\n <span class=\"ui-select-card__text-body text-label--primary\">{{ title }}</span>\n\n <ui-price\n [price]=\"price\"\n [price_before_discount]=\"price_before_discount\"\n price_type=\"primary\"\n ></ui-price>\n </ui-stack>\n </ui-box>\n</ng-template>\n\n<!--- PRODUCT CARD TEMPLATE -->\n<ng-template #productcard>\n <ui-box box_fill_mode=\"fit\" box_space=\"near\" box_background=\"transparent\">\n <ui-stack stack_direction=\"y\" stack_gap=\"near\">\n <ui-stack class=\"ui-select-card__text-stack\" stack_direction=\"y\" stack_gap=\"none\">\n <h5>{{ title }}</h5>\n <ui-stack stack_direction=\"x\" stack_gap=\"near\" stack_align=\"center\">\n <ui-price\n [price]=\"price\"\n [price_before_discount]=\"price_before_discount\"\n price_type=\"hero\"\n ></ui-price>\n <ui-icon\n *ngIf=\"price_before_discount\"\n class=\"ui-select-card--product-card__discount-icon\"\n icon_name=\"tag\"\n icon_size_override=\"1.5\"\n ></ui-icon>\n </ui-stack>\n </ui-stack>\n <ui-stack stack_gap=\"near\">\n <p class=\"text-body--supporting\">{{ secondary_copy }}</p>\n <p class=\"text-body--default\">{{ primary_copy }}</p>\n </ui-stack>\n </ui-stack>\n </ui-box>\n</ng-template>\n", styles: [".ui-select-card--gift-card,.ui-select-card--product-card{background-color:transparent;border:1px solid transparent;width:100%;display:block;padding:0;appearance:none;cursor:pointer;overflow:hidden}.ui-select-card--gift-card .ui-select-card__image .ui-box-content,.ui-select-card--product-card .ui-select-card__image .ui-box-content{height:100%}.ui-select-card--gift-card__text-stack,.ui-select-card--product-card__text-stack{width:100%}.ui-select-card--gift-card{border-radius:var(--oasys-radius-soften)}.ui-select-card--gift-card .ui-select-card__text-body{text-align:left;min-height:calc(var(--oasys-typography-heading-label-primary-line-height) * 2)}.ui-select-card--product-card{border-radius:var(--oasys-radius-layout);border:1px solid var(--oasys-color-brand-border-secondary)}.ui-select-card--product-card .text-body--default{text-align:left}.ui-select-card--product-card__discount-icon{border-radius:var(--oasys-radius-round);border:1px solid transparent;padding:var(--oasys-spacing-tiny);background-color:var(--oasys-color-brand-foreground-highlight)}.ui-select-card--gift-card.selected,.ui-select-card--product-card.selected{--_select-border-width: var(--oasys-border-width-primary);--_select-border-color: var(--oasys-color-interaction-border-selected);--_select-background-color: var(--oasys-color-interaction-background-selected);background-color:var(--_select-background-color);border:var(--_select-border-width) solid var(--_select-border-color)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap", "stack_collapse_below", "stack_as_list"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OasysPriceComponent, selector: "ui-price", inputs: ["price", "price_before_discount", "price_type"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["icon_size", "icon_size_override", "icon_name", "icon_context", "alt_text", "icon_class"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3178
3024
|
}
|
|
3179
3025
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SelectCardComponent, decorators: [{
|
|
3180
3026
|
type: Component,
|