@kirbydesign/extensions-angular 3.5.0 → 4.1.0

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.
@@ -0,0 +1,5 @@
1
+ <svg width="96" height="96" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg">
2
+ <path part="background" fill="silver" d="M87.1396 79.6172C87.1395 84.0352 83.5577 87.617 79.1396 87.6172H16.2822C11.864 87.6172 8.28237 84.0353 8.28223 79.6172V64.8359L8.7627 67.5615C9.03436 69.1021 9.73882 70.4573 10.7275 71.5264C11.3148 72.531 12.3192 73.2332 13.4639 73.4424C14.8076 74.0071 16.3232 74.2075 17.8652 73.9355L18.6064 73.8047C19.1499 73.7086 19.5126 73.1901 19.417 72.6465L19.416 72.6455L21.0039 72.3652C21.1721 76.635 24.6851 80.0449 28.9961 80.0449H66.4248C70.7285 80.0449 74.2359 76.6464 74.415 72.3867L75.8867 72.6465C75.8033 73.1828 76.1633 73.6903 76.7002 73.7852L77.5557 73.9355C79.102 74.2082 80.6213 74.0059 81.9678 73.4375C83.0172 73.2246 83.9418 72.5968 84.5254 71.7021C85.602 70.6077 86.3714 69.1886 86.6582 67.5625L87.1396 64.832V79.6172ZM79.1396 8.75977C83.5578 8.75993 87.1396 12.3416 87.1396 16.7598V26.6924C86.7546 26.56 86.3541 26.4558 85.9404 26.3828L77.2129 24.8447C76.6691 24.7488 76.1507 25.1115 76.0547 25.6553C76.0534 25.6623 76.0528 25.6697 76.0518 25.6768L74.4248 25.3896V24.3311C74.4248 19.9128 70.843 16.3311 66.4248 16.3311H28.9961C24.5778 16.3311 20.9961 19.9128 20.9961 24.3311V25.3672L19.1533 25.6924C19.0573 25.1487 18.5388 24.786 17.9951 24.8818L9.48047 26.3828C9.06723 26.4557 8.66693 26.5602 8.28223 26.6924V16.7598C8.28224 12.3415 11.8639 8.75977 16.2822 8.75977H79.1396Z"/>
3
+ <path part="highlight" fill="cadetblue" d="M32.2822 58.7139C34.1757 58.7139 35.7109 60.2491 35.7109 62.1426V67.2852C35.7109 69.1787 34.1757 70.7138 32.2822 70.7139C30.3887 70.7139 28.8535 69.1787 28.8535 67.2852V62.1426C28.8535 60.249 30.3887 58.7139 32.2822 58.7139ZM47.1387 51.8574C49.3478 51.8574 51.1387 53.6483 51.1387 55.8574V66.7139C51.1387 68.923 49.3478 70.7139 47.1387 70.7139H46.5674C44.3582 70.7139 42.5674 68.923 42.5674 66.7139V55.8574C42.5674 53.6483 44.3582 51.8574 46.5674 51.8574H47.1387ZM62.5674 41.5713C64.7765 41.5713 66.5674 43.3621 66.5674 45.5713V66.7139C66.5674 68.923 64.7765 70.7139 62.5674 70.7139H61.9961C59.787 70.7139 57.9961 68.923 57.9961 66.7139V45.5713C57.9961 43.3621 59.787 41.5713 61.9961 41.5713H62.5674Z"/>
4
+ <path part="outline" fill="black" d="M66.4441 16.2988C70.866 16.2995 74.444 19.9 74.4441 24.3311V35.7227L77.2888 36.2275L77.3875 36.25C77.8748 36.3886 78.1889 36.877 78.0994 37.3867C78.0099 37.8962 77.5496 38.2468 77.0447 38.21L76.9431 38.1973L74.4441 37.7539V43.6094L82.7683 45.084C83.3114 45.1808 83.674 45.6997 83.5789 46.2432C83.4834 46.787 82.9644 47.1499 82.4207 47.0537L74.4441 45.6406V72.2598C74.4438 76.6905 70.8659 80.2905 66.4441 80.291H29.0154C24.593 80.2909 21.0156 76.6909 21.0154 72.2598V45.1709L13.0242 46.5869C12.4806 46.6829 11.9614 46.3201 11.866 45.7764C11.7708 45.2327 12.1351 44.7137 12.6785 44.6172L21.0154 43.1396V37.749L18.5251 38.1904C17.9817 38.2863 17.4636 37.9234 17.3679 37.3799C17.2724 36.8359 17.6367 36.3161 18.1804 36.2197L21.0154 35.7178V24.3311C21.0155 19.8997 24.593 16.2989 29.0154 16.2988H66.4441ZM29.0154 18.2998C25.7061 18.2999 23.0155 20.9958 23.0154 24.3311V72.2598C23.0156 75.5947 25.7061 78.2909 29.0154 78.291H66.4441C69.7529 78.2905 72.4438 75.5944 72.4441 72.2598V24.3311C72.444 20.9962 69.753 18.3005 66.4441 18.2998H29.0154ZM18.0095 24.8877C18.5532 24.7915 19.0711 25.1546 19.1667 25.6982C19.2622 26.2422 18.8989 26.761 18.3552 26.8574L9.84058 28.3662C6.65923 28.93 4.52716 31.9798 5.0896 35.1855L10.7458 67.4072C11.3089 70.6129 14.3505 72.7467 17.532 72.1836L18.2732 72.0518C18.8167 71.9556 19.3347 72.3187 19.4304 72.8623C19.5259 73.4062 19.1626 73.9251 18.6189 74.0215L17.8777 74.1533C13.6007 74.9106 9.52868 72.0418 8.77612 67.7559L3.11987 35.5342C2.36802 31.2483 5.21817 27.1542 9.49487 26.3965L18.0095 24.8877ZM76.0691 25.6611C76.1646 25.1173 76.6827 24.7545 77.2263 24.8506L85.9539 26.3965C90.2307 27.1542 93.0809 31.249 92.3289 35.5352L86.6726 67.7559C85.9201 72.0418 81.848 74.9104 77.571 74.1533L76.7156 74.002C76.1721 73.9054 75.8088 73.3865 75.9041 72.8428C75.9996 72.299 76.5177 71.9362 77.0613 72.0322L77.9167 72.1836C81.0983 72.7467 84.1399 70.6131 84.7029 67.4072L90.3591 35.1855C90.9214 31.9798 88.7894 28.9299 85.6082 28.3662L76.8806 26.8203C76.337 26.7239 75.9737 26.205 76.0691 25.6611ZM77.0984 51.2012C77.1941 50.6576 77.7121 50.2946 78.2556 50.3906L81.6316 50.9893C82.175 51.0857 82.5395 51.6047 82.4441 52.1484C82.3486 52.6922 81.8294 53.0549 81.2859 52.959L77.9099 52.3613C77.3662 52.265 77.0029 51.745 77.0984 51.2012ZM17.1882 50.3887C17.732 50.2924 18.2509 50.6554 18.3464 51.1992C18.4419 51.7431 18.0777 52.262 17.5339 52.3584L14.158 52.957C13.6146 53.053 13.0964 52.69 13.0007 52.1465C12.9054 51.6027 13.2687 51.0829 13.8123 50.9863L17.1882 50.3887ZM66.3367 24.04C66.6561 23.5896 67.2816 23.4834 67.7322 23.8027C68.1821 24.1222 68.2884 24.746 67.9695 25.1963L60.5408 35.6748C60.2392 36.0996 59.6615 36.2223 59.2136 35.9561L51.9998 31.6621L43.9656 42.8252C43.6656 43.2413 43.0985 43.3636 42.6541 43.1074L35.9402 39.2324L29.0525 47.1826C28.6908 47.5995 28.0585 47.6444 27.6414 47.2832C27.2246 46.9216 27.1798 46.2903 27.5408 45.873L34.9695 37.2998L35.031 37.2344C35.3489 36.9277 35.8357 36.8638 36.2244 37.0879L42.8699 40.9229L50.9138 29.749L50.9734 29.6738C51.2878 29.3151 51.8194 29.226 52.2371 29.4746L59.4431 33.7646L66.3367 24.04ZM14.8054 36.8213C15.349 36.7254 15.8681 37.0881 15.9636 37.6318C16.0588 38.1755 15.6945 38.6945 15.1511 38.791L11.7751 39.3887C11.2315 39.4848 10.7134 39.122 10.6179 38.5781C10.5225 38.0343 10.8858 37.5154 11.4294 37.4189L14.8054 36.8213ZM79.4978 37.6299C79.5934 37.0861 80.1114 36.7232 80.655 36.8193L84.031 37.417C84.5743 37.5135 84.9386 38.0326 84.8435 38.5762C84.748 39.1199 84.2289 39.4828 83.6853 39.3867L80.3093 38.7891C79.7657 38.6926 79.4024 38.1737 79.4978 37.6299Z"/>
5
+ </svg>
@@ -36,10 +36,10 @@ class ImageBannerHeightDirective {
36
36
  this.currentHeight = cardHeight;
37
37
  this.renderer.setStyle(hostElement, 'min-height', `${cardHeight}px`);
38
38
  }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ImageBannerHeightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ImageBannerHeightDirective, isStandalone: true, selector: "[kirbyImageBannerResize]", ngImport: i0 }); }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageBannerHeightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: ImageBannerHeightDirective, isStandalone: true, selector: "[kirbyImageBannerResize]", ngImport: i0 }); }
41
41
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ImageBannerHeightDirective, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageBannerHeightDirective, decorators: [{
43
43
  type: Directive,
44
44
  args: [{
45
45
  selector: `[kirbyImageBannerResize]`,
@@ -87,10 +87,10 @@ class ImageBannerComponent {
87
87
  onImageError($event) {
88
88
  this.imageError.emit($event);
89
89
  }
90
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ImageBannerComponent, deps: [{ token: i1.TranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
91
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ImageBannerComponent, isStandalone: true, selector: "kirby-x-image-banner", inputs: { title: "title", imagePath: "imagePath", bodyText: "bodyText", showButtonInNarrowView: "showButtonInNarrowView", actionButtonText: "actionButtonText", externalLink: "externalLink", backgroundBlur: "backgroundBlur" }, outputs: { bannerClick: "bannerClick", dismissClick: "dismissClick", imageError: "imageError" }, host: { properties: { "class.show-button-in-narrow-view": "this.showButtonInNarrowView", "class": "this.backgroundBlur" } }, hostDirectives: [{ directive: ImageBannerHeightDirective }], ngImport: i0, template: "<kirby-card [themeColor]=\"backgroundBlur === 'none' ? 'white' : backgroundBlur\">\n <div class=\"blur-image-wrapper\">\n <img class=\"blur-image\" [src]=\"imagePath\" alt=\"\" />\n </div>\n\n <div class=\"main-content-wrapper\">\n <div class=\"main-content-image-wrapper\">\n <img class=\"main-content-image\" [src]=\"imagePath\" alt=\"\" (error)=\"onImageError($event)\" />\n </div>\n\n <div class=\"main-content\">\n <div class=\"text-content-layout\">\n <div class=\"main-content-header\">\n @if (title) {\n <p class=\"kirby-text-normal-bold\">\n {{ title }}\n </p>\n } @else {\n <div class=\"title kirby-text-normal-bold\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n }\n </div>\n\n <div class=\"main-content-body\">\n <p class=\"main-content-body-text kirby-text-small\">\n @if (bodyText) {\n {{ bodyText }}\n } @else {\n <ng-content select=\"[bodyText]\"></ng-content>\n }\n </p>\n </div>\n </div>\n @if (externalLink) {\n <!-- Only one of below anchors is displayed at a time -\n we want different behavior on varying screen widths -->\n <a\n kirby-button\n class=\"breakout wide-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n\n <a\n kirby-button\n class=\"breakout narrow-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n }\n\n @if (!externalLink) {\n <!-- Only one of below buttons is displayed at a time -\n we want different behavior on varying screen widths -->\n <button\n kirby-button\n class=\"breakout wide-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n >\n {{ actionButtonText }}\n </button>\n\n <button\n kirby-button\n class=\"breakout narrow-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n >\n <span class=\"kirby-visually-hidden\">\n {{ actionButtonText }}\n </span>\n </button>\n }\n </div>\n </div>\n\n @if (dismissClick.observed) {\n <div class=\"dismiss\">\n <button\n kirby-button\n size=\"xs\"\n (click)=\"dismissClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [showIconOnly]=\"true\"\n [attr.aria-label]=\"translations.get('close') + ' ' + title\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </div>\n }\n</kirby-card>\n", styles: [":host{display:block}:host(.none) .blur-image{display:none}@container banner (width < 600px){:host(.none) .dismiss{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black)}}:host(.none) .main-content-body-action-link{color:var(--kirby-semi-dark)}:host(.dark) .blur-image{filter:blur(110px)}:host(.light) .blur-image{filter:blur(110px)}:host(.dark) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000052;z-index:1}:host(.light) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff73;z-index:1}.blur-image-wrapper{position:absolute;inset:-330px;z-index:-1}.blur-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transform:translateZ(0)}kirby-card{container-name:banner;container-type:inline-size;height:100%}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)){transition:all 80ms linear 0ms;box-shadow:0 1px 24px #1c1c1c0a,0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)) .breakout{box-shadow:none}.main-content-wrapper{width:100%;padding:8px;box-sizing:border-box;display:flex;flex-direction:column}@container banner (width >= 600px){.main-content-wrapper{gap:16px;flex-direction:initial}}.main-content-image-wrapper{display:flex;overflow:hidden;border-radius:8px}@container banner (width >= 600px){.main-content-image-wrapper{flex:1}}.main-content{display:flex;flex-direction:column;justify-content:space-between}@container banner (width < 600px){.main-content{flex-direction:row}}.main-content{min-height:var(--kirby-x-image-banner-min-height, 84px);box-sizing:border-box;padding:12px 0 8px 8px;overflow:hidden}.main-content .main-content-header{padding-inline-end:8px}@container banner (width >= 600px){.main-content .main-content-header{padding-inline-end:40px}}.main-content:has(.main-content-body-action-link) .main-content-header{padding-inline-end:40px}@container banner (width >= 600px){.main-content{flex:1;gap:12px;padding:8px 8px 8px 0}}.main-content-header p{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;padding:0}.main-content-image{width:100%;height:132px;object-fit:cover;object-position:center}@container banner (width >= 600px){.main-content-image{height:164px}}.main-content-body{display:flex;flex:1;justify-content:space-between;height:100%}.main-content-body p{text-wrap-mode:wrap;margin-bottom:0}@container banner (width >= 600px){.main-content-body{flex-direction:column;max-width:324px}}@container banner (width >= 600px){.main-content-body .main-content-body-action-link{display:none}}.main-content-body-text{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;padding-inline-end:8px}@container banner (width >= 600px){.main-content-body-text{padding-inline-end:48px}}@container banner (width < 600px){.main-content-body-text{-webkit-line-clamp:2;line-clamp:2;max-height:3em}}.breakout{position:initial;border-radius:16px;align-self:center}.breakout:before{content:\"\";display:block;position:absolute;inset:0}.wide-view-action{display:none}@container banner (width >= 600px){.wide-view-action{display:inline-flex;align-self:start;margin:0}}.narrow-view-action{display:inline-flex;margin:0}@container banner (width >= 600px){.narrow-view-action{display:none}}.narrow-view-action:is(a){width:24px;min-width:24px}.narrow-view-action:is(a) kirby-icon{font-size:24px}.narrow-view-action:is(button){min-width:1px;width:1px;height:1px}:host(.show-button-in-narrow-view) .wide-view-action{display:inline-flex}:host(.show-button-in-narrow-view) .narrow-view-action{display:none}.dismiss{position:absolute;top:16px;right:16px;height:fit-content}.dismiss button{margin:0}.text-content-layout{display:flex;flex:1;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container banner (width >= 600px){.text-content-layout{gap:12px}}.title ::ng-deep>h1,.title ::ng-deep>h2,.title ::ng-deep>h3,.title ::ng-deep>h4,.title ::ng-deep>h5,.title ::ng-deep>h6{margin-bottom:0;font-size:16px;font-weight:700;line-height:24px}\n"], dependencies: [{ kind: "component", type: CardComponent, selector: "kirby-card", inputs: ["title", "subtitle", "backgroundImageUrl", "hasPadding", "sizes", "variant"] }, { kind: "component", type: ButtonComponent, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: ["attentionLevel", "noDecoration", "themeColor", "expand", "isFloating", "size", "showIconOnly"] }, { kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "directive", type: ThemeColorDirective, selector: "kirby-avatar[themeColor], kirby-card[themeColor], kirby-icon[themeColor], kirby-progress-circle-ring[themeColor], kirby-modal-footer[themeColor], kirby-empty-state[themeColor]", inputs: ["themeColor"] }] }); }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageBannerComponent, deps: [{ token: i1.TranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: ImageBannerComponent, isStandalone: true, selector: "kirby-x-image-banner", inputs: { title: "title", imagePath: "imagePath", bodyText: "bodyText", showButtonInNarrowView: "showButtonInNarrowView", actionButtonText: "actionButtonText", externalLink: "externalLink", backgroundBlur: "backgroundBlur" }, outputs: { bannerClick: "bannerClick", dismissClick: "dismissClick", imageError: "imageError" }, host: { properties: { "class.show-button-in-narrow-view": "this.showButtonInNarrowView", "class": "this.backgroundBlur" } }, hostDirectives: [{ directive: ImageBannerHeightDirective }], ngImport: i0, template: "<kirby-card [themeColor]=\"backgroundBlur === 'none' ? 'white' : backgroundBlur\">\n <div class=\"blur-image-wrapper\">\n <img class=\"blur-image\" [src]=\"imagePath\" alt=\"\" />\n </div>\n\n <div class=\"main-content-wrapper\">\n <div class=\"main-content-image-wrapper\">\n <img class=\"main-content-image\" [src]=\"imagePath\" alt=\"\" (error)=\"onImageError($event)\" />\n </div>\n\n <div class=\"main-content\">\n <div class=\"text-content-layout\">\n <div class=\"main-content-header\">\n @if (title) {\n <p class=\"kirby-text-normal-bold\">\n {{ title }}\n </p>\n } @else {\n <div class=\"title kirby-text-normal-bold\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n }\n </div>\n\n <div class=\"main-content-body\">\n <p class=\"main-content-body-text kirby-text-small\">\n @if (bodyText) {\n {{ bodyText }}\n } @else {\n <ng-content select=\"[bodyText]\"></ng-content>\n }\n </p>\n </div>\n </div>\n @if (externalLink) {\n <!-- Only one of below anchors is displayed at a time -\n we want different behavior on varying screen widths -->\n <a\n kirby-button\n class=\"breakout wide-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n\n <a\n kirby-button\n class=\"breakout narrow-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n }\n\n @if (!externalLink) {\n <!-- Only one of below buttons is displayed at a time -\n we want different behavior on varying screen widths -->\n <button\n kirby-button\n class=\"breakout wide-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n >\n {{ actionButtonText }}\n </button>\n\n <button\n kirby-button\n class=\"breakout narrow-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n >\n <span class=\"kirby-visually-hidden\">\n {{ actionButtonText }}\n </span>\n </button>\n }\n </div>\n </div>\n\n @if (dismissClick.observed) {\n <div class=\"dismiss\">\n <button\n kirby-button\n size=\"xs\"\n (click)=\"dismissClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [showIconOnly]=\"true\"\n [attr.aria-label]=\"translations.get('close') + ' ' + title\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </div>\n }\n</kirby-card>\n", styles: [":host{display:block}:host(.none) .blur-image{display:none}@container banner (width < 600px){:host(.none) .dismiss{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black)}}:host(.none) .main-content-body-action-link{color:var(--kirby-semi-dark)}:host(.dark) .blur-image{filter:blur(110px)}:host(.light) .blur-image{filter:blur(110px)}:host(.dark) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000052;z-index:1}:host(.light) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff73;z-index:1}.blur-image-wrapper{position:absolute;inset:-330px;z-index:-1}.blur-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transform:translateZ(0)}kirby-card{container-name:banner;container-type:inline-size;height:100%}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)){transition:all 80ms linear 0ms;box-shadow:0 1px 24px #1c1c1c0a,0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)) .breakout{box-shadow:none}.main-content-wrapper{width:100%;padding:8px;box-sizing:border-box;display:flex;flex-direction:column}@container banner (width >= 600px){.main-content-wrapper{gap:16px;flex-direction:initial}}.main-content-image-wrapper{display:flex;overflow:hidden;border-radius:8px}@container banner (width >= 600px){.main-content-image-wrapper{flex:1}}.main-content{display:flex;flex-direction:column;justify-content:space-between}@container banner (width < 600px){.main-content{flex-direction:row}}.main-content{min-height:var(--kirby-x-image-banner-min-height, 84px);box-sizing:border-box;padding:12px 0 8px 8px;overflow:hidden}.main-content .main-content-header{padding-inline-end:8px}@container banner (width >= 600px){.main-content .main-content-header{padding-inline-end:40px}}.main-content:has(.main-content-body-action-link) .main-content-header{padding-inline-end:40px}@container banner (width >= 600px){.main-content{flex:1;gap:12px;padding:8px 8px 8px 0}}.main-content-header p{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;padding:0}.main-content-image{width:100%;height:132px;object-fit:cover;object-position:center}@container banner (width >= 600px){.main-content-image{height:164px}}.main-content-body{display:flex;flex:1;justify-content:space-between;height:100%}.main-content-body p{text-wrap-mode:wrap;margin-bottom:0}@container banner (width >= 600px){.main-content-body{flex-direction:column;max-width:324px}}@container banner (width >= 600px){.main-content-body .main-content-body-action-link{display:none}}.main-content-body-text{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;padding-inline-end:8px}@container banner (width >= 600px){.main-content-body-text{padding-inline-end:48px}}@container banner (width < 600px){.main-content-body-text{-webkit-line-clamp:2;line-clamp:2;max-height:3em}}.breakout{position:initial;border-radius:16px;align-self:center}.breakout:before{content:\"\";display:block;position:absolute;inset:0}.wide-view-action{display:none}@container banner (width >= 600px){.wide-view-action{display:inline-flex;align-self:start;margin:0}}.narrow-view-action{display:inline-flex;margin:0}@container banner (width >= 600px){.narrow-view-action{display:none}}.narrow-view-action:is(a){width:24px;min-width:24px}.narrow-view-action:is(a) kirby-icon{font-size:24px}.narrow-view-action:is(button){min-width:1px;width:1px;height:1px}:host(.show-button-in-narrow-view) .wide-view-action{display:inline-flex}:host(.show-button-in-narrow-view) .narrow-view-action{display:none}.dismiss{position:absolute;top:16px;right:16px;height:fit-content}.dismiss button{margin:0}.text-content-layout{display:flex;flex:1;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container banner (width >= 600px){.text-content-layout{gap:12px}}.title ::ng-deep>h1,.title ::ng-deep>h2,.title ::ng-deep>h3,.title ::ng-deep>h4,.title ::ng-deep>h5,.title ::ng-deep>h6{margin-bottom:0;font-size:16px;font-weight:700;line-height:24px}\n"], dependencies: [{ kind: "component", type: CardComponent, selector: "kirby-card", inputs: ["title", "subtitle", "backgroundImageUrl", "hasPadding", "sizes", "variant"] }, { kind: "component", type: ButtonComponent, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: ["attentionLevel", "noDecoration", "themeColor", "expand", "isFloating", "size", "showIconOnly"] }, { kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "directive", type: ThemeColorDirective, selector: "kirby-avatar[themeColor], kirby-card[themeColor], kirby-icon[themeColor], kirby-progress-circle-ring[themeColor], kirby-modal-footer[themeColor], kirby-empty-state[themeColor]", inputs: ["themeColor"] }] }); }
92
92
  }
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ImageBannerComponent, decorators: [{
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageBannerComponent, decorators: [{
94
94
  type: Component,
95
95
  args: [{ selector: 'kirby-x-image-banner', imports: [CardComponent, ButtonComponent, IconComponent, ThemeColorDirective], hostDirectives: [ImageBannerHeightDirective], template: "<kirby-card [themeColor]=\"backgroundBlur === 'none' ? 'white' : backgroundBlur\">\n <div class=\"blur-image-wrapper\">\n <img class=\"blur-image\" [src]=\"imagePath\" alt=\"\" />\n </div>\n\n <div class=\"main-content-wrapper\">\n <div class=\"main-content-image-wrapper\">\n <img class=\"main-content-image\" [src]=\"imagePath\" alt=\"\" (error)=\"onImageError($event)\" />\n </div>\n\n <div class=\"main-content\">\n <div class=\"text-content-layout\">\n <div class=\"main-content-header\">\n @if (title) {\n <p class=\"kirby-text-normal-bold\">\n {{ title }}\n </p>\n } @else {\n <div class=\"title kirby-text-normal-bold\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n }\n </div>\n\n <div class=\"main-content-body\">\n <p class=\"main-content-body-text kirby-text-small\">\n @if (bodyText) {\n {{ bodyText }}\n } @else {\n <ng-content select=\"[bodyText]\"></ng-content>\n }\n </p>\n </div>\n </div>\n @if (externalLink) {\n <!-- Only one of below anchors is displayed at a time -\n we want different behavior on varying screen widths -->\n <a\n kirby-button\n class=\"breakout wide-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n\n <a\n kirby-button\n class=\"breakout narrow-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n }\n\n @if (!externalLink) {\n <!-- Only one of below buttons is displayed at a time -\n we want different behavior on varying screen widths -->\n <button\n kirby-button\n class=\"breakout wide-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n >\n {{ actionButtonText }}\n </button>\n\n <button\n kirby-button\n class=\"breakout narrow-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n >\n <span class=\"kirby-visually-hidden\">\n {{ actionButtonText }}\n </span>\n </button>\n }\n </div>\n </div>\n\n @if (dismissClick.observed) {\n <div class=\"dismiss\">\n <button\n kirby-button\n size=\"xs\"\n (click)=\"dismissClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [showIconOnly]=\"true\"\n [attr.aria-label]=\"translations.get('close') + ' ' + title\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </div>\n }\n</kirby-card>\n", styles: [":host{display:block}:host(.none) .blur-image{display:none}@container banner (width < 600px){:host(.none) .dismiss{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black)}}:host(.none) .main-content-body-action-link{color:var(--kirby-semi-dark)}:host(.dark) .blur-image{filter:blur(110px)}:host(.light) .blur-image{filter:blur(110px)}:host(.dark) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000052;z-index:1}:host(.light) .blur-image-wrapper:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff73;z-index:1}.blur-image-wrapper{position:absolute;inset:-330px;z-index:-1}.blur-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transform:translateZ(0)}kirby-card{container-name:banner;container-type:inline-size;height:100%}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)){transition:all 80ms linear 0ms;box-shadow:0 1px 24px #1c1c1c0a,0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}kirby-card:focus-within:has(:focus-visible):not(:has(.dismiss :focus)) .breakout{box-shadow:none}.main-content-wrapper{width:100%;padding:8px;box-sizing:border-box;display:flex;flex-direction:column}@container banner (width >= 600px){.main-content-wrapper{gap:16px;flex-direction:initial}}.main-content-image-wrapper{display:flex;overflow:hidden;border-radius:8px}@container banner (width >= 600px){.main-content-image-wrapper{flex:1}}.main-content{display:flex;flex-direction:column;justify-content:space-between}@container banner (width < 600px){.main-content{flex-direction:row}}.main-content{min-height:var(--kirby-x-image-banner-min-height, 84px);box-sizing:border-box;padding:12px 0 8px 8px;overflow:hidden}.main-content .main-content-header{padding-inline-end:8px}@container banner (width >= 600px){.main-content .main-content-header{padding-inline-end:40px}}.main-content:has(.main-content-body-action-link) .main-content-header{padding-inline-end:40px}@container banner (width >= 600px){.main-content{flex:1;gap:12px;padding:8px 8px 8px 0}}.main-content-header p{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;padding:0}.main-content-image{width:100%;height:132px;object-fit:cover;object-position:center}@container banner (width >= 600px){.main-content-image{height:164px}}.main-content-body{display:flex;flex:1;justify-content:space-between;height:100%}.main-content-body p{text-wrap-mode:wrap;margin-bottom:0}@container banner (width >= 600px){.main-content-body{flex-direction:column;max-width:324px}}@container banner (width >= 600px){.main-content-body .main-content-body-action-link{display:none}}.main-content-body-text{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;padding-inline-end:8px}@container banner (width >= 600px){.main-content-body-text{padding-inline-end:48px}}@container banner (width < 600px){.main-content-body-text{-webkit-line-clamp:2;line-clamp:2;max-height:3em}}.breakout{position:initial;border-radius:16px;align-self:center}.breakout:before{content:\"\";display:block;position:absolute;inset:0}.wide-view-action{display:none}@container banner (width >= 600px){.wide-view-action{display:inline-flex;align-self:start;margin:0}}.narrow-view-action{display:inline-flex;margin:0}@container banner (width >= 600px){.narrow-view-action{display:none}}.narrow-view-action:is(a){width:24px;min-width:24px}.narrow-view-action:is(a) kirby-icon{font-size:24px}.narrow-view-action:is(button){min-width:1px;width:1px;height:1px}:host(.show-button-in-narrow-view) .wide-view-action{display:inline-flex}:host(.show-button-in-narrow-view) .narrow-view-action{display:none}.dismiss{position:absolute;top:16px;right:16px;height:fit-content}.dismiss button{margin:0}.text-content-layout{display:flex;flex:1;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container banner (width >= 600px){.text-content-layout{gap:12px}}.title ::ng-deep>h1,.title ::ng-deep>h2,.title ::ng-deep>h3,.title ::ng-deep>h4,.title ::ng-deep>h5,.title ::ng-deep>h6{margin-bottom:0;font-size:16px;font-weight:700;line-height:24px}\n"] }]
96
96
  }], ctorParameters: () => [{ type: i1.TranslationService }], propDecorators: { title: [{
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-extensions-angular-image-banner.mjs","sources":["../../image-banner/src/image-banner-height.directive.ts","../../image-banner/src/image-banner.component.ts","../../image-banner/src/image-banner.component.html","../../image-banner/src/kirbydesign-extensions-angular-image-banner.ts"],"sourcesContent":["import { Directive, ElementRef, inject, OnDestroy, OnInit, Renderer2 } from '@angular/core';\nimport { ResizeObserverService } from '@kirbydesign/designsystem/shared';\n\n/**\n * @Description Temporary directive to ensure correct scroll position behavior on Safari.\n *\n * When navigating between stacked pages, scroll position is not correctly restored on Safari,\n * when the nested kirby-card element uses containment and the host element does not have an explicit height.\n */\n@Directive({\n selector: `[kirbyImageBannerResize]`,\n})\nexport class ImageBannerHeightDirective implements OnInit, OnDestroy {\n private currentHeight: number = 0;\n private host = inject(ElementRef);\n private resizeObserverService = inject(ResizeObserverService);\n private renderer = inject(Renderer2);\n\n ngOnInit() {\n this.resizeObserverService.observe(this.host, (entry) => this.setCardHeightOnHost(entry));\n }\n\n ngOnDestroy() {\n this.resizeObserverService.unobserve(this.host);\n }\n\n private setCardHeightOnHost(entry: ResizeObserverEntry) {\n const hostElement = entry.target as HTMLElement;\n const card = hostElement.querySelector('kirby-card');\n const cardHeight = card?.getBoundingClientRect().height;\n\n if (!hostElement || !cardHeight) return;\n if (cardHeight === this.currentHeight) return;\n\n this.currentHeight = cardHeight;\n this.renderer.setStyle(hostElement, 'min-height', `${cardHeight}px`);\n }\n}\n","import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\nimport { ThemeColorDirective, TranslationService } from '@kirbydesign/designsystem/shared';\nimport { CardComponent } from '@kirbydesign/designsystem/card';\nimport { ImageBannerHeightDirective } from './image-banner-height.directive';\n\n@Component({\n selector: 'kirby-x-image-banner',\n imports: [CardComponent, ButtonComponent, IconComponent, ThemeColorDirective],\n hostDirectives: [ImageBannerHeightDirective],\n templateUrl: './image-banner.component.html',\n styleUrl: './image-banner.component.scss',\n})\nexport class ImageBannerComponent {\n /**\n * The title placed inside the image banners header.\n */\n @Input() title: string | undefined;\n\n /**\n * The image shown on the banner, and used for the background blur effect.\n */\n @Input() imagePath: string | undefined;\n\n /**\n * The body text placed below the title.\n */\n @Input() bodyText: string | undefined;\n\n /**\n * Whether the button should be shown in narrow view or not.\n */\n @HostBinding('class.show-button-in-narrow-view')\n @Input()\n showButtonInNarrowView: boolean = false;\n\n /**\n * The text of the button in the content area of the image banner. If left empty, will default to 'Read more' (or equivalent translation for [supported locales](https://cookbook.kirby.design/#/home/localization)).\n */\n @Input() actionButtonText: string | undefined = this.translations.get('readMore');\n\n /**\n * When an external link is supplied the entire banner will be an anchor-tag and navigate when activated.\n */\n @Input() externalLink: string | undefined;\n\n /**\n * The blur-effect used for the background.\n */\n @HostBinding('class')\n @Input()\n backgroundBlur: 'dark' | 'light' | 'none' = 'dark';\n\n /**\n * Emitted every time the banner is activated. The entire banner is interactive, and will be activated by click and keyboard interaction.\n */\n @Output() bannerClick = new EventEmitter<Event>();\n\n /**\n * If subscribed to, a dismiss button will be shown. Emitted every time the dismiss button is activated by click and keyboard interaction.\n */\n @Output() dismissClick = new EventEmitter<Event>();\n\n /**\n * If the input imagePath results in an error, it will be reflected in this output.\n */\n @Output()\n imageError = new EventEmitter<ErrorEvent>();\n\n constructor(public translations: TranslationService) {}\n\n public bannerClicked(event: Event) {\n const eventTarget = event.target as HTMLElement;\n const dismissButtonClicked = eventTarget.closest('.dismiss');\n if (dismissButtonClicked) return;\n this.bannerClick.emit(event);\n }\n\n public dismissClicked(event: Event) {\n this.dismissClick.emit(event);\n }\n\n public onImageError($event: ErrorEvent) {\n this.imageError.emit($event);\n }\n}\n","<kirby-card [themeColor]=\"backgroundBlur === 'none' ? 'white' : backgroundBlur\">\n <div class=\"blur-image-wrapper\">\n <img class=\"blur-image\" [src]=\"imagePath\" alt=\"\" />\n </div>\n\n <div class=\"main-content-wrapper\">\n <div class=\"main-content-image-wrapper\">\n <img class=\"main-content-image\" [src]=\"imagePath\" alt=\"\" (error)=\"onImageError($event)\" />\n </div>\n\n <div class=\"main-content\">\n <div class=\"text-content-layout\">\n <div class=\"main-content-header\">\n @if (title) {\n <p class=\"kirby-text-normal-bold\">\n {{ title }}\n </p>\n } @else {\n <div class=\"title kirby-text-normal-bold\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n }\n </div>\n\n <div class=\"main-content-body\">\n <p class=\"main-content-body-text kirby-text-small\">\n @if (bodyText) {\n {{ bodyText }}\n } @else {\n <ng-content select=\"[bodyText]\"></ng-content>\n }\n </p>\n </div>\n </div>\n @if (externalLink) {\n <!-- Only one of below anchors is displayed at a time -\n we want different behavior on varying screen widths -->\n <a\n kirby-button\n class=\"breakout wide-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n\n <a\n kirby-button\n class=\"breakout narrow-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n }\n\n @if (!externalLink) {\n <!-- Only one of below buttons is displayed at a time -\n we want different behavior on varying screen widths -->\n <button\n kirby-button\n class=\"breakout wide-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n >\n {{ actionButtonText }}\n </button>\n\n <button\n kirby-button\n class=\"breakout narrow-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n >\n <span class=\"kirby-visually-hidden\">\n {{ actionButtonText }}\n </span>\n </button>\n }\n </div>\n </div>\n\n @if (dismissClick.observed) {\n <div class=\"dismiss\">\n <button\n kirby-button\n size=\"xs\"\n (click)=\"dismissClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [showIconOnly]=\"true\"\n [attr.aria-label]=\"translations.get('close') + ' ' + title\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </div>\n }\n</kirby-card>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.ImageBannerHeightDirective"],"mappings":";;;;;;;;AAGA;;;;;AAKG;MAIU,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;QAIU,IAAA,CAAA,aAAa,GAAW,CAAC;AACzB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,QAAA,IAAA,CAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAqBrC,IAAA;IAnBC,QAAQ,GAAA;QACN,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3F;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;IACjD;AAEQ,IAAA,mBAAmB,CAAC,KAA0B,EAAA;AACpD,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAqB;QAC/C,MAAM,IAAI,GAAG,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC;QACpD,MAAM,UAAU,GAAG,IAAI,EAAE,qBAAqB,EAAE,CAAC,MAAM;AAEvD,QAAA,IAAI,CAAC,WAAW,IAAI,CAAC,UAAU;YAAE;AACjC,QAAA,IAAI,UAAU,KAAK,IAAI,CAAC,aAAa;YAAE;AAEvC,QAAA,IAAI,CAAC,aAAa,GAAG,UAAU;AAC/B,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EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,6OAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKjE,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,OAAA,EACvB,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,CAAC,EAAA,cAAA,EAC7D,CAAC,0BAA0B,CAAC,EAAA,QAAA,EAAA,04GAAA,EAAA,MAAA,EAAA,CAAA,4wIAAA,CAAA,EAAA;;sBAQ3C;;sBAKA;;sBAKA;;sBAKA,WAAW;uBAAC,kCAAkC;;sBAC9C;;sBAMA;;sBAKA;;sBAKA,WAAW;uBAAC,OAAO;;sBACnB;;sBAMA;;sBAKA;;sBAKA;;;AEnEH;;AAEG;;;;"}
1
+ {"version":3,"file":"kirbydesign-extensions-angular-image-banner.mjs","sources":["../../image-banner/src/image-banner-height.directive.ts","../../image-banner/src/image-banner.component.ts","../../image-banner/src/image-banner.component.html","../../image-banner/src/kirbydesign-extensions-angular-image-banner.ts"],"sourcesContent":["import { Directive, ElementRef, inject, OnDestroy, OnInit, Renderer2 } from '@angular/core';\nimport { ResizeObserverService } from '@kirbydesign/designsystem/shared';\n\n/**\n * @Description Temporary directive to ensure correct scroll position behavior on Safari.\n *\n * When navigating between stacked pages, scroll position is not correctly restored on Safari,\n * when the nested kirby-card element uses containment and the host element does not have an explicit height.\n */\n@Directive({\n selector: `[kirbyImageBannerResize]`,\n})\nexport class ImageBannerHeightDirective implements OnInit, OnDestroy {\n private currentHeight: number = 0;\n private host = inject(ElementRef);\n private resizeObserverService = inject(ResizeObserverService);\n private renderer = inject(Renderer2);\n\n ngOnInit() {\n this.resizeObserverService.observe(this.host, (entry) => this.setCardHeightOnHost(entry));\n }\n\n ngOnDestroy() {\n this.resizeObserverService.unobserve(this.host);\n }\n\n private setCardHeightOnHost(entry: ResizeObserverEntry) {\n const hostElement = entry.target as HTMLElement;\n const card = hostElement.querySelector('kirby-card');\n const cardHeight = card?.getBoundingClientRect().height;\n\n if (!hostElement || !cardHeight) return;\n if (cardHeight === this.currentHeight) return;\n\n this.currentHeight = cardHeight;\n this.renderer.setStyle(hostElement, 'min-height', `${cardHeight}px`);\n }\n}\n","import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\nimport { ThemeColorDirective, TranslationService } from '@kirbydesign/designsystem/shared';\nimport { CardComponent } from '@kirbydesign/designsystem/card';\nimport { ImageBannerHeightDirective } from './image-banner-height.directive';\n\n@Component({\n selector: 'kirby-x-image-banner',\n imports: [CardComponent, ButtonComponent, IconComponent, ThemeColorDirective],\n hostDirectives: [ImageBannerHeightDirective],\n templateUrl: './image-banner.component.html',\n styleUrl: './image-banner.component.scss',\n})\nexport class ImageBannerComponent {\n /**\n * The title placed inside the image banners header.\n */\n @Input() title: string | undefined;\n\n /**\n * The image shown on the banner, and used for the background blur effect.\n */\n @Input() imagePath: string | undefined;\n\n /**\n * The body text placed below the title.\n */\n @Input() bodyText: string | undefined;\n\n /**\n * Whether the button should be shown in narrow view or not.\n */\n @HostBinding('class.show-button-in-narrow-view')\n @Input()\n showButtonInNarrowView: boolean = false;\n\n /**\n * The text of the button in the content area of the image banner. If left empty, will default to 'Read more' (or equivalent translation for [supported locales](https://cookbook.kirby.design/#/home/localization)).\n */\n @Input() actionButtonText: string | undefined = this.translations.get('readMore');\n\n /**\n * When an external link is supplied the entire banner will be an anchor-tag and navigate when activated.\n */\n @Input() externalLink: string | undefined;\n\n /**\n * The blur-effect used for the background.\n */\n @HostBinding('class')\n @Input()\n backgroundBlur: 'dark' | 'light' | 'none' = 'dark';\n\n /**\n * Emitted every time the banner is activated. The entire banner is interactive, and will be activated by click and keyboard interaction.\n */\n @Output() bannerClick = new EventEmitter<Event>();\n\n /**\n * If subscribed to, a dismiss button will be shown. Emitted every time the dismiss button is activated by click and keyboard interaction.\n */\n @Output() dismissClick = new EventEmitter<Event>();\n\n /**\n * If the input imagePath results in an error, it will be reflected in this output.\n */\n @Output()\n imageError = new EventEmitter<ErrorEvent>();\n\n constructor(public translations: TranslationService) {}\n\n public bannerClicked(event: Event) {\n const eventTarget = event.target as HTMLElement;\n const dismissButtonClicked = eventTarget.closest('.dismiss');\n if (dismissButtonClicked) return;\n this.bannerClick.emit(event);\n }\n\n public dismissClicked(event: Event) {\n this.dismissClick.emit(event);\n }\n\n public onImageError($event: ErrorEvent) {\n this.imageError.emit($event);\n }\n}\n","<kirby-card [themeColor]=\"backgroundBlur === 'none' ? 'white' : backgroundBlur\">\n <div class=\"blur-image-wrapper\">\n <img class=\"blur-image\" [src]=\"imagePath\" alt=\"\" />\n </div>\n\n <div class=\"main-content-wrapper\">\n <div class=\"main-content-image-wrapper\">\n <img class=\"main-content-image\" [src]=\"imagePath\" alt=\"\" (error)=\"onImageError($event)\" />\n </div>\n\n <div class=\"main-content\">\n <div class=\"text-content-layout\">\n <div class=\"main-content-header\">\n @if (title) {\n <p class=\"kirby-text-normal-bold\">\n {{ title }}\n </p>\n } @else {\n <div class=\"title kirby-text-normal-bold\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n }\n </div>\n\n <div class=\"main-content-body\">\n <p class=\"main-content-body-text kirby-text-small\">\n @if (bodyText) {\n {{ bodyText }}\n } @else {\n <ng-content select=\"[bodyText]\"></ng-content>\n }\n </p>\n </div>\n </div>\n @if (externalLink) {\n <!-- Only one of below anchors is displayed at a time -\n we want different behavior on varying screen widths -->\n <a\n kirby-button\n class=\"breakout wide-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n\n <a\n kirby-button\n class=\"breakout narrow-view-action\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [href]=\"externalLink\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n target=\"_blank\"\n size=\"sm\"\n >\n {{ actionButtonText }}\n <kirby-icon name=\"link\"></kirby-icon>\n </a>\n }\n\n @if (!externalLink) {\n <!-- Only one of below buttons is displayed at a time -\n we want different behavior on varying screen widths -->\n <button\n kirby-button\n class=\"breakout wide-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n >\n {{ actionButtonText }}\n </button>\n\n <button\n kirby-button\n class=\"breakout narrow-view-action\"\n size=\"sm\"\n (click)=\"bannerClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [noDecoration]=\"true\"\n [showIconOnly]=\"true\"\n >\n <span class=\"kirby-visually-hidden\">\n {{ actionButtonText }}\n </span>\n </button>\n }\n </div>\n </div>\n\n @if (dismissClick.observed) {\n <div class=\"dismiss\">\n <button\n kirby-button\n size=\"xs\"\n (click)=\"dismissClicked($event)\"\n [attentionLevel]=\"backgroundBlur === 'none' ? '3' : '2'\"\n [showIconOnly]=\"true\"\n [attr.aria-label]=\"translations.get('close') + ' ' + title\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </div>\n }\n</kirby-card>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.ImageBannerHeightDirective"],"mappings":";;;;;;;;AAGA;;;;;AAKG;MAIU,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;QAIU,IAAA,CAAA,aAAa,GAAW,CAAC;AACzB,QAAA,IAAA,CAAA,IAAI,GA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B,CAAC,EAAA,cAAA,EAC7D,CAAC,0BAA0B,CAAC,EAAA,QAAA,EAAA,04GAAA,EAAA,MAAA,EAAA,CAAA,4wIAAA,CAAA,EAAA;;sBAQ3C;;sBAKA;;sBAKA;;sBAKA,WAAW;uBAAC,kCAAkC;;sBAC9C;;sBAMA;;sBAKA;;sBAKA,WAAW;uBAAC,OAAO;;sBACnB;;sBAMA;;sBAKA;;sBAKA;;;AEnEH;;AAEG;;;;"}
@@ -89,10 +89,10 @@ class DateOnlyPipe extends AbstractTimezoneCompensatingPipe {
89
89
  transform(input) {
90
90
  return this.format(input, DateFormats.SHORT_DATE_FORMAT);
91
91
  }
92
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DateOnlyPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
93
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: DateOnlyPipe, isStandalone: true, name: "dateOnly" }); }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DateOnlyPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
93
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: DateOnlyPipe, isStandalone: true, name: "dateOnly" }); }
94
94
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DateOnlyPipe, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DateOnlyPipe, decorators: [{
96
96
  type: Pipe,
97
97
  args: [{
98
98
  name: 'dateOnly',
@@ -122,10 +122,10 @@ class TimeOnlyPipe extends AbstractTimezoneCompensatingPipe {
122
122
  throw new Error(`Unable to derive format from "${format}"`);
123
123
  }
124
124
  }
125
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TimeOnlyPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
126
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: TimeOnlyPipe, isStandalone: true, name: "timeOnly" }); }
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimeOnlyPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
126
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: TimeOnlyPipe, isStandalone: true, name: "timeOnly" }); }
127
127
  }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TimeOnlyPipe, decorators: [{
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimeOnlyPipe, decorators: [{
129
129
  type: Pipe,
130
130
  args: [{
131
131
  name: 'timeOnly',
@@ -160,10 +160,10 @@ class TimeOrDatePipe extends AbstractTimezoneCompensatingPipe {
160
160
  }
161
161
  return this.format(date, format);
162
162
  }
163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TimeOrDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
164
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: TimeOrDatePipe, isStandalone: true, name: "timeOrDate" }); }
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimeOrDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
164
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: TimeOrDatePipe, isStandalone: true, name: "timeOrDate" }); }
165
165
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TimeOrDatePipe, decorators: [{
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimeOrDatePipe, decorators: [{
167
167
  type: Pipe,
168
168
  args: [{
169
169
  name: 'timeOrDate',
@@ -181,10 +181,10 @@ class FormatNumberService {
181
181
  }
182
182
  return formatNumber(value, this.localeId, digitsInfo);
183
183
  }
184
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
185
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberService, providedIn: 'root' }); }
184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
185
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberService, providedIn: 'root' }); }
186
186
  }
187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberService, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberService, decorators: [{
188
188
  type: Injectable,
189
189
  args: [{
190
190
  providedIn: 'root',
@@ -201,10 +201,10 @@ class FormatNumberPipe {
201
201
  transform(value, digitsInfo = '1.2-2') {
202
202
  return this.formatNumberService.formatNumber(value, digitsInfo);
203
203
  }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberPipe, deps: [{ token: FormatNumberService }], target: i0.ɵɵFactoryTarget.Pipe }); }
205
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberPipe, isStandalone: true, name: "formatNumber" }); }
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberPipe, deps: [{ token: FormatNumberService }], target: i0.ɵɵFactoryTarget.Pipe }); }
205
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberPipe, isStandalone: true, name: "formatNumber" }); }
206
206
  }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatNumberPipe, decorators: [{
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FormatNumberPipe, decorators: [{
208
208
  type: Pipe,
209
209
  args: [{
210
210
  name: 'formatNumber',
@@ -280,10 +280,10 @@ class AmountService {
280
280
  }
281
281
  return formatAmount(amount, this.locale, this.config, amountServiceConfiguration);
282
282
  }
283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
284
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmountService, providedIn: 'root' }); }
283
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AmountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
284
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AmountService, providedIn: 'root' }); }
285
285
  }
286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmountService, decorators: [{
286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AmountService, decorators: [{
287
287
  type: Injectable,
288
288
  args: [{
289
289
  providedIn: 'root',
@@ -316,10 +316,10 @@ class AmountPipe {
316
316
  transform(amount, amountServiceConfiguration) {
317
317
  return this.amountService.formatAmount(amount, amountServiceConfiguration);
318
318
  }
319
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmountPipe, deps: [{ token: AmountService }], target: i0.ɵɵFactoryTarget.Pipe }); }
320
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AmountPipe, isStandalone: true, name: "amount" }); }
319
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AmountPipe, deps: [{ token: AmountService }], target: i0.ɵɵFactoryTarget.Pipe }); }
320
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AmountPipe, isStandalone: true, name: "amount" }); }
321
321
  }
322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmountPipe, decorators: [{
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AmountPipe, decorators: [{
323
323
  type: Pipe,
324
324
  args: [{
325
325
  name: 'amount',
@@ -343,10 +343,10 @@ class AccountNumberPipe {
343
343
  transform(value) {
344
344
  return formatAccountNumber(value);
345
345
  }
346
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AccountNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
347
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AccountNumberPipe, isStandalone: true, name: "accountNumber" }); }
346
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AccountNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
347
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AccountNumberPipe, isStandalone: true, name: "accountNumber" }); }
348
348
  }
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AccountNumberPipe, decorators: [{
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AccountNumberPipe, decorators: [{
350
350
  type: Pipe,
351
351
  args: [{
352
352
  name: 'accountNumber',
@@ -379,10 +379,10 @@ class PhoneNumberService {
379
379
  return formattedNumber;
380
380
  }
381
381
  }
382
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
383
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberService, providedIn: 'root' }); }
382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
383
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberService, providedIn: 'root' }); }
384
384
  }
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberService, decorators: [{
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberService, decorators: [{
386
386
  type: Injectable,
387
387
  args: [{
388
388
  providedIn: 'root',
@@ -403,10 +403,10 @@ class PhoneNumberPipe {
403
403
  transform(phoneNumber, chunk = 2, showCountryCode) {
404
404
  return this.phoneNumberService.formatPhoneNumber(phoneNumber, chunk, showCountryCode);
405
405
  }
406
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, deps: [{ token: PhoneNumberService }], target: i0.ɵɵFactoryTarget.Pipe }); }
407
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, isStandalone: true, name: "phoneNumber" }); }
406
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberPipe, deps: [{ token: PhoneNumberService }], target: i0.ɵɵFactoryTarget.Pipe }); }
407
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberPipe, isStandalone: true, name: "phoneNumber" }); }
408
408
  }
409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, decorators: [{
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PhoneNumberPipe, decorators: [{
410
410
  type: Pipe,
411
411
  args: [{
412
412
  name: 'phoneNumber',
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-extensions-angular-localization.mjs","sources":["../../localization/src/date-time/date-formats.ts","../../localization/src/di-tokens.ts","../../localization/src/date-time/abstract-timezone-compensating.pipe.ts","../../localization/src/date-time/date-only/date-only.pipe.ts","../../localization/src/date-time/time-only/time-only.pipe.ts","../../localization/src/date-time/time-or-date/time-or-date.pipe.ts","../../localization/src/number/format-number.service.ts","../../localization/src/number/format-number.pipe.ts","../../localization/src/amount/amount-service-formatter.ts","../../localization/src/amount/amount.service.ts","../../localization/src/amount/amount.pipe.ts","../../localization/src/account-number/account-number-service-formatter.ts","../../localization/src/account-number/account-number.pipe.ts","../../localization/src/phone-number/phone-number.service.ts","../../localization/src/phone-number/phone-number.pipe.ts","../../localization/src/kirbydesign-extensions-angular-localization.ts"],"sourcesContent":["export class DateFormats {\n static readonly SHORT_DATE_FORMAT = 'dd.MM.yyyy';\n static readonly MEDIUM_DATE_FORMAT = 'd. MMMM y';\n static readonly MEDIUM_LETTER_DATE_FORMAT = 'dd. MMM yyyy';\n static readonly SHORT_TIME_FORMAT = 'HH:mm';\n static readonly MEDIUM_TIME_FORMAT = 'HH:mm:ss';\n static readonly SHORT_DATE_MEDIUM_TIME_FORMAT = `${DateFormats.SHORT_DATE_FORMAT} ${DateFormats.MEDIUM_TIME_FORMAT}`;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const KIRBY_EXTENSIONS_LOCALIZATION_TOKEN =\n new InjectionToken<KirbyExtensionsLocalizationToken>('KIRBY_EXTENSIONS_LOCALIZATION_TOKEN');\n\nexport function provideKirbyExtensionsLocalizationToken(\n factory: () => KirbyExtensionsLocalizationToken\n) {\n return {\n provide: KIRBY_EXTENSIONS_LOCALIZATION_TOKEN,\n useFactory: factory,\n };\n}\n\ntype DkkMapping = Record<'DKK', 'kr.'>;\n\ntype CurrencyMappings = DkkMapping & Record<string, string>;\n\nexport interface KirbyExtensionsLocalizationToken {\n /**\n * @example 'DKK | EUR'\n */\n nativeCurrency: string;\n /**\n * Default language for the application. Used to determine if the phone number country code should be shown, if not specified as input, based on the locale.\n * @example 'da'\n */\n defaultLang: string;\n /**\n * Default phone country code\n * @example '+45'\n */\n countryCode: string;\n /**\n * Default timezone for the application\n * @example 'Europe/Copenhagen'\n */\n timeZone: string;\n /**\n * @example { DKK: 'kr.', EUR: '€' }\n */\n currencyMappings?: CurrencyMappings;\n}\n","import { inject, LOCALE_ID, PipeTransform } from '@angular/core';\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { DateFormats } from './date-formats';\n\n/**\n * Abstract implementation of pipe that should format dates, and compensate for time-zone offset.\n *\n * This class provides tools for formatting dates (and timestamps) in a time zone\n */\nexport abstract class AbstractTimezoneCompensatingPipe implements PipeTransform {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n\n abstract transform(value: unknown, ...args: unknown[]): unknown;\n\n protected format(time: number | Date | string, formatPattern: string): string {\n if (!time) {\n return '';\n }\n\n const date = typeof time === 'number' || typeof time === 'string' ? new Date(time) : time;\n\n const timeZone = this.config.timeZone;\n const options = this.getIntlOptions(formatPattern);\n\n const formatter = new Intl.DateTimeFormat(this.locale, { ...options, timeZone });\n let formattedDate = formatter.format(date);\n\n // Capitalize month abbreviation and remove trailing period for `MEDIUM_LETTER_DATE_FORMAT`\n if (formatPattern === DateFormats.MEDIUM_LETTER_DATE_FORMAT) {\n formattedDate = formattedDate.replace(\n /(\\d{2}\\.\\s)(\\w+)\\.(\\s\\d{4})/,\n (_, day, month, year) => {\n return `${day}${month.charAt(0).toUpperCase()}${month.slice(1)}${year}`;\n }\n );\n }\n\n if (\n formatPattern === DateFormats.SHORT_TIME_FORMAT ||\n formatPattern === DateFormats.MEDIUM_TIME_FORMAT\n ) {\n formattedDate = formattedDate.replace(/\\./g, ':');\n }\n\n return formattedDate;\n }\n\n private getIntlOptions(formatPattern: string): Intl.DateTimeFormatOptions {\n switch (formatPattern) {\n case DateFormats.SHORT_DATE_FORMAT:\n return { year: 'numeric', month: '2-digit', day: '2-digit' };\n\n case DateFormats.MEDIUM_DATE_FORMAT:\n return { year: 'numeric', month: 'long', day: 'numeric' };\n\n case DateFormats.MEDIUM_LETTER_DATE_FORMAT:\n return {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n };\n\n case DateFormats.SHORT_TIME_FORMAT:\n return { hour: '2-digit', minute: '2-digit', hour12: false };\n\n case DateFormats.MEDIUM_TIME_FORMAT:\n return { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false };\n\n case DateFormats.SHORT_DATE_MEDIUM_TIME_FORMAT:\n return {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n };\n\n default:\n throw new Error(`Unsupported format pattern: ${formatPattern}`);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\n/**\n * Formats a given timestamp as a date.\n */\n@Pipe({\n name: 'dateOnly',\n standalone: true,\n})\nexport class DateOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(input: number | Date | string): string {\n return this.format(input, DateFormats.SHORT_DATE_FORMAT);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\nexport type TimeOnlyFormat = 'short' | 'medium';\n\n/**\n * Formats a given timestamp as a time.\n *\n * Timestamps can be formatted as 2 variants:\n * - 'short' being 'HH:mm' (hours and minutes)\n * - 'medium' being 'HH:mm:ss' (as above, but with seconds appended)\n *\n */\n@Pipe({\n name: 'timeOnly',\n standalone: true,\n})\nexport class TimeOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(input: number | Date | string, format: TimeOnlyFormat = 'short'): string {\n return this.format(input, this.getFormat(format));\n }\n\n private getFormat(format: TimeOnlyFormat): string {\n switch (format) {\n case 'short':\n return DateFormats.SHORT_TIME_FORMAT;\n case 'medium':\n return DateFormats.MEDIUM_TIME_FORMAT;\n default:\n throw new Error(`Unable to derive format from \"${format}\"`);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\n/**\n * Formats a given timestamp so that:\n * - If timestamp is of \"today\", it's formatted as time with hours and minutes (eg. 23:56)\n * - If timestamp is different from \"today\", it's formatted as date with \"day of month\", month and year (eg. 28.02.2020)\n *\n * All formatting and parsing is expect to be handled in \"Europe/Copenhagen\" time zone and with\n * the locale provided by `LOCALE_ID`.\n */\n\n@Pipe({\n name: 'timeOrDate',\n standalone: true,\n})\nexport class TimeOrDatePipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(\n time: number | Date | string,\n showSeconds = false,\n formatMonth: 'month-as-digits' | 'month-as-letters' = 'month-as-digits'\n ): string {\n if (!time) {\n return '';\n }\n\n const date = typeof time === 'number' || typeof time === 'string' ? new Date(time) : time;\n\n const today = new Date();\n const sameDay =\n date.getFullYear() === today.getFullYear() &&\n date.getMonth() === today.getMonth() &&\n date.getDate() === today.getDate();\n\n let format = DateFormats.SHORT_DATE_FORMAT;\n\n if (formatMonth === 'month-as-letters') {\n format = DateFormats.MEDIUM_LETTER_DATE_FORMAT;\n }\n\n if (sameDay) {\n format = showSeconds ? DateFormats.MEDIUM_TIME_FORMAT : DateFormats.SHORT_TIME_FORMAT;\n }\n\n return this.format(date, format);\n }\n}\n","import { formatNumber } from '@angular/common';\nimport { Inject, Injectable, LOCALE_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormatNumberService {\n constructor(@Inject(LOCALE_ID) private localeId: string) {}\n\n public formatNumber(value: number, digitsInfo: string) {\n if (value == null) {\n return '';\n }\n\n return formatNumber(value, this.localeId, digitsInfo);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { FormatNumberService } from './format-number.service';\n\n@Pipe({\n name: 'formatNumber',\n standalone: true,\n})\nexport class FormatNumberPipe implements PipeTransform {\n constructor(private formatNumberService: FormatNumberService) {}\n\n transform(value: number, digitsInfo = '1.2-2') {\n return this.formatNumberService.formatNumber(value, digitsInfo);\n }\n}\n","import { formatNumber } from '@angular/common';\nimport { KirbyExtensionsLocalizationToken } from '../di-tokens';\nimport { Amount } from './amount.model';\n\nexport function formatAmount(\n amount: Amount,\n locale: string,\n config: KirbyExtensionsLocalizationToken,\n amountServiceConfiguration?: AmountServiceConfiguration\n) {\n const amountConfig = deriveConfiguration(amountServiceConfiguration);\n\n let formattedAmount = formatNumber(amount && amount.amount, locale, amountConfig.digitsInfo);\n\n if (amountConfig.stripSign) {\n formattedAmount = formattedAmount.replace('-', '').trim();\n }\n\n const currencyCodeToAppend = deriveCurrencyCode(amountConfig, amount, config);\n\n if (!currencyCodeToAppend) {\n return formattedAmount;\n }\n if (amountConfig.currencyCodePosition === 'postfix') {\n return formattedAmount + ' ' + currencyCodeToAppend;\n } else {\n return currencyCodeToAppend + ' ' + formattedAmount;\n }\n}\n\nexport function deriveCurrencyCode(\n amountConfig: AmountServiceConfiguration,\n amount: Amount,\n config: KirbyExtensionsLocalizationToken\n) {\n let currencyCodeToAppend;\n\n if (amountConfig.showCurrencyCode) {\n if (amountConfig.showCurrencyCode === 'alwaysShowCurrency') {\n currencyCodeToAppend = amount.currencyCode;\n } else if (amountConfig.showCurrencyCode === 'showForeignCurrency') {\n currencyCodeToAppend =\n amount.currencyCode !== config.nativeCurrency ? amount.currencyCode : '';\n } else if (amountConfig.showCurrencyCode === 'useCurrencyMapping') {\n currencyCodeToAppend = config.currencyMappings?.[amount.currencyCode] || amount.currencyCode;\n }\n }\n\n return currencyCodeToAppend || '';\n}\n\nexport function deriveConfiguration(configuration: AmountServiceConfiguration = {}) {\n const config: AmountServiceConfiguration = {\n showCurrencyCode: '',\n digitsInfo: '1.2-2',\n stripSign: false,\n };\n\n return Object.assign({}, config, configuration);\n}\n\nexport type ShowCurrencyCode =\n | ''\n | 'alwaysShowCurrency'\n | 'showForeignCurrency'\n | 'useCurrencyMapping';\nexport type CurrencyCodePosition = '' | 'prefix' | 'postfix';\n\nexport interface AmountServiceConfiguration {\n /**\n * - '' - don't output CurrencyCode\n * - 'alwaysShowCurrency' - always shows CurrencyCode, regardless of presentation currency\n * - 'showForeignCurrency' - only show CurrencyCode if it differs from the presentation currency\n * - 'useCurrencyMapping' - Shows the currency symbol defined in KirbyExtensionsLocalizationToken.currencyMappings instead of the currency code. Fallback to currencyCode\n */\n showCurrencyCode?: ShowCurrencyCode;\n /**\n * The position of the currency code in the formatted amount\n * - 'postfix' - output CurrencyCode after the formatted amount, eg. 1.234,56 EUR\n * - 'prefix' - output CurrencyCode before the formatted amount, eg. DKK 1.234,56\n */\n currencyCodePosition?: CurrencyCodePosition;\n /**\n * A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters\n */\n digitsInfo?: string;\n /**\n * Remove the minus sign from the formatted amount and trim any leading or trailing whitespace.\n */\n stripSign?: boolean;\n /**\n * The string to return if the amount is empty\n */\n returnValueOnEmptyAmount?: string;\n}\n","import { inject, Injectable, LOCALE_ID } from '@angular/core';\n\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { Amount } from './amount.model';\nimport {\n AmountServiceConfiguration,\n deriveConfiguration,\n formatAmount,\n} from './amount-service-formatter';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AmountService {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n /**\n * Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration}\n *\n * The number is always formatted according to Angular LOCALE_ID\n *\n * @param amount the {@link Amount} to configure\n * @param amountServiceConfiguration\n */\n\n formatAmount(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration) {\n if (amount == undefined) {\n const config = deriveConfiguration(amountServiceConfiguration);\n if (config.returnValueOnEmptyAmount) {\n return config.returnValueOnEmptyAmount;\n }\n amount = {\n amount: 0.0,\n currencyCode: '',\n };\n }\n\n return formatAmount(amount, this.locale, this.config, amountServiceConfiguration);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Amount } from './amount.model';\nimport { AmountService } from './amount.service';\nimport { AmountServiceConfiguration } from './amount-service-formatter';\n\n/**\n * Configuration object for the amount-pipe. The configuration object can be used to control\n * the formatting of the amount, and can be passed as an argument to the amount-pipe when used on an {@link Amount}.\n * - `showCurrencyCode`: Controls whether the currency code should be displayed or not.\n * - `''`: Don't output currency code\n * - `alwaysShowCurrency`: Always show currency code, regardless of presentation currency\n * - `showForeignCurrency`: Only show currency code if it differs from the presentation currency\n * - `digitsInfo`: A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters\n * - `stripSign`: Controls whether the minus sign should be stripped from a negative amount.\n * - `currencyCodePosition`: Controls the position of the currency code in the formatted amount.\n * - `postfix`: Output currency code after the formatted amount, e.g. 1.234,56 EUR\n * - `prefix`: Output currency code before the formatted amount, e.g. DKK 1.234,56\n */\n@Pipe({\n name: 'amount',\n standalone: true,\n})\nexport class AmountPipe implements PipeTransform {\n constructor(private amountService: AmountService) {}\n\n /**\n * Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration} (or a number of arguments, for backwards compatibility).\n *\n * @param amount the {@link Amount} to configure\n * @param amountServiceConfiguration\n */\n transform(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration) {\n return this.amountService.formatAmount(amount, amountServiceConfiguration);\n }\n}\n","import { AccountNumber } from './account-number.model';\n\nexport function formatAccountNumber(value: AccountNumber): string {\n return `${value.regNo.padStart(4, '0')} ${value.accountNo.replace(/^0+/, '')}`;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AccountNumber } from './account-number.model';\nimport { formatAccountNumber } from './account-number-service-formatter';\n\n/**\n * Pipe that formats a {@link AccountNumber}-object to a common format.\n */\n@Pipe({\n name: 'accountNumber',\n standalone: true,\n})\nexport class AccountNumberPipe implements PipeTransform {\n /**\n * Formats the {@link AccountNumber} to a common format.\n *\n * @param value the {@link AccountNumber} to format\n */\n transform(value: AccountNumber): string | undefined {\n return formatAccountNumber(value);\n }\n}\n","import { inject, Injectable, LOCALE_ID } from '@angular/core';\n\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { PhoneNumber } from './phone-number';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PhoneNumberService {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n\n private static chunkUpPhoneNumber(str: string, chunk: number): string {\n return str.match(new RegExp(`.{1,${chunk}}`, 'g'))?.join(' ') ?? '';\n }\n\n formatPhoneNumber(\n phoneNumber: PhoneNumber | string,\n chunk = 2,\n showCountryCode?: boolean\n ): string | undefined {\n const countryCode =\n typeof phoneNumber === 'string' ? this.config.countryCode : phoneNumber.countryCode;\n const number = typeof phoneNumber === 'string' ? phoneNumber : phoneNumber.number;\n\n if (!/^\\d+$/.test(number)) {\n return;\n }\n\n if (showCountryCode === undefined) {\n showCountryCode = !this.locale.match(`${this.config.defaultLang}.*`);\n }\n\n const formattedNumber = PhoneNumberService.chunkUpPhoneNumber(number, chunk);\n\n if (showCountryCode) {\n return `${countryCode} ${formattedNumber}`;\n } else {\n return formattedNumber;\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { PhoneNumber } from './phone-number';\nimport { PhoneNumberService } from './phone-number.service';\n\n@Pipe({\n name: 'phoneNumber',\n standalone: true,\n})\nexport class PhoneNumberPipe implements PipeTransform {\n constructor(private phoneNumberService: PhoneNumberService) {}\n\n /**\n * Transforms a phone number, chunked up with spaces between the chunks and the country code in front, if desired.\n *\n * @param phoneNumber A PhoneNumber or a string representation of a phone number\n * @param chunk The chunk size used to split up the phone number with spaces\n * @param showCountryCode Show the country code in front of the phone number. If a string representation is supplied, the KIRBY_EXTENSIONS_LOCALIZATION_TOKEN.countryCode is used.\n */\n transform(\n phoneNumber: PhoneNumber | string,\n chunk = 2,\n showCountryCode?: boolean\n ): string | undefined {\n return this.phoneNumberService.formatPhoneNumber(phoneNumber, chunk, showCountryCode);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.FormatNumberService","i1.AmountService","i1.PhoneNumberService"],"mappings":";;;;MAAa,WAAW,CAAA;aACN,IAAA,CAAA,iBAAiB,GAAG,YAAY,CAAC;aACjC,IAAA,CAAA,kBAAkB,GAAG,WAAW,CAAC;aACjC,IAAA,CAAA,yBAAyB,GAAG,cAAc,CAAC;aAC3C,IAAA,CAAA,iBAAiB,GAAG,OAAO,CAAC;aAC5B,IAAA,CAAA,kBAAkB,GAAG,UAAU,CAAC;aAChC,IAAA,CAAA,6BAA6B,GAAG,CAAA,EAAG,WAAW,CAAC,iBAAiB,IAAI,WAAW,CAAC,kBAAkB,CAAA,CAAE,CAAC;;;MCJ1G,mCAAmC,GAC9C,IAAI,cAAc,CAAmC,qCAAqC;AAEtF,SAAU,uCAAuC,CACrD,OAA+C,EAAA;IAE/C,OAAO;AACL,QAAA,OAAO,EAAE,mCAAmC;AAC5C,QAAA,UAAU,EAAE,OAAO;KACpB;AACH;;ACRA;;;;AAIG;MACmB,gCAAgC,CAAA;AAAtD,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,mCAAmC,CAAC;AACpD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;IAyEpC;IArEY,MAAM,CAAC,IAA4B,EAAE,aAAqB,EAAA;QAClE,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,IAAI,GAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI;AAEzF,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC;AAElD,QAAA,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,c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"kirbydesign-extensions-angular-localization.mjs","sources":["../../localization/src/date-time/date-formats.ts","../../localization/src/di-tokens.ts","../../localization/src/date-time/abstract-timezone-compensating.pipe.ts","../../localization/src/date-time/date-only/date-only.pipe.ts","../../localization/src/date-time/time-only/time-only.pipe.ts","../../localization/src/date-time/time-or-date/time-or-date.pipe.ts","../../localization/src/number/format-number.service.ts","../../localization/src/number/format-number.pipe.ts","../../localization/src/amount/amount-service-formatter.ts","../../localization/src/amount/amount.service.ts","../../localization/src/amount/amount.pipe.ts","../../localization/src/account-number/account-number-service-formatter.ts","../../localization/src/account-number/account-number.pipe.ts","../../localization/src/phone-number/phone-number.service.ts","../../localization/src/phone-number/phone-number.pipe.ts","../../localization/src/kirbydesign-extensions-angular-localization.ts"],"sourcesContent":["export class DateFormats {\n static readonly SHORT_DATE_FORMAT = 'dd.MM.yyyy';\n static readonly MEDIUM_DATE_FORMAT = 'd. MMMM y';\n static readonly MEDIUM_LETTER_DATE_FORMAT = 'dd. MMM yyyy';\n static readonly SHORT_TIME_FORMAT = 'HH:mm';\n static readonly MEDIUM_TIME_FORMAT = 'HH:mm:ss';\n static readonly SHORT_DATE_MEDIUM_TIME_FORMAT = `${DateFormats.SHORT_DATE_FORMAT} ${DateFormats.MEDIUM_TIME_FORMAT}`;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const KIRBY_EXTENSIONS_LOCALIZATION_TOKEN =\n new InjectionToken<KirbyExtensionsLocalizationToken>('KIRBY_EXTENSIONS_LOCALIZATION_TOKEN');\n\nexport function provideKirbyExtensionsLocalizationToken(\n factory: () => KirbyExtensionsLocalizationToken\n) {\n return {\n provide: KIRBY_EXTENSIONS_LOCALIZATION_TOKEN,\n useFactory: factory,\n };\n}\n\ntype DkkMapping = Record<'DKK', 'kr.'>;\n\ntype CurrencyMappings = DkkMapping & Record<string, string>;\n\nexport interface KirbyExtensionsLocalizationToken {\n /**\n * @example 'DKK | EUR'\n */\n nativeCurrency: string;\n /**\n * Default language for the application. Used to determine if the phone number country code should be shown, if not specified as input, based on the locale.\n * @example 'da'\n */\n defaultLang: string;\n /**\n * Default phone country code\n * @example '+45'\n */\n countryCode: string;\n /**\n * Default timezone for the application\n * @example 'Europe/Copenhagen'\n */\n timeZone: string;\n /**\n * @example { DKK: 'kr.', EUR: '€' }\n */\n currencyMappings?: CurrencyMappings;\n}\n","import { inject, LOCALE_ID, PipeTransform } from '@angular/core';\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { DateFormats } from './date-formats';\n\n/**\n * Abstract implementation of pipe that should format dates, and compensate for time-zone offset.\n *\n * This class provides tools for formatting dates (and timestamps) in a time zone\n */\nexport abstract class AbstractTimezoneCompensatingPipe implements PipeTransform {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n\n abstract transform(value: unknown, ...args: unknown[]): unknown;\n\n protected format(time: number | Date | string, formatPattern: string): string {\n if (!time) {\n return '';\n }\n\n const date = typeof time === 'number' || typeof time === 'string' ? new Date(time) : time;\n\n const timeZone = this.config.timeZone;\n const options = this.getIntlOptions(formatPattern);\n\n const formatter = new Intl.DateTimeFormat(this.locale, { ...options, timeZone });\n let formattedDate = formatter.format(date);\n\n // Capitalize month abbreviation and remove trailing period for `MEDIUM_LETTER_DATE_FORMAT`\n if (formatPattern === DateFormats.MEDIUM_LETTER_DATE_FORMAT) {\n formattedDate = formattedDate.replace(\n /(\\d{2}\\.\\s)(\\w+)\\.(\\s\\d{4})/,\n (_, day, month, year) => {\n return `${day}${month.charAt(0).toUpperCase()}${month.slice(1)}${year}`;\n }\n );\n }\n\n if (\n formatPattern === DateFormats.SHORT_TIME_FORMAT ||\n formatPattern === DateFormats.MEDIUM_TIME_FORMAT\n ) {\n formattedDate = formattedDate.replace(/\\./g, ':');\n }\n\n return formattedDate;\n }\n\n private getIntlOptions(formatPattern: string): Intl.DateTimeFormatOptions {\n switch (formatPattern) {\n case DateFormats.SHORT_DATE_FORMAT:\n return { year: 'numeric', month: '2-digit', day: '2-digit' };\n\n case DateFormats.MEDIUM_DATE_FORMAT:\n return { year: 'numeric', month: 'long', day: 'numeric' };\n\n case DateFormats.MEDIUM_LETTER_DATE_FORMAT:\n return {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n };\n\n case DateFormats.SHORT_TIME_FORMAT:\n return { hour: '2-digit', minute: '2-digit', hour12: false };\n\n case DateFormats.MEDIUM_TIME_FORMAT:\n return { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false };\n\n case DateFormats.SHORT_DATE_MEDIUM_TIME_FORMAT:\n return {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n };\n\n default:\n throw new Error(`Unsupported format pattern: ${formatPattern}`);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\n/**\n * Formats a given timestamp as a date.\n */\n@Pipe({\n name: 'dateOnly',\n standalone: true,\n})\nexport class DateOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(input: number | Date | string): string {\n return this.format(input, DateFormats.SHORT_DATE_FORMAT);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\nexport type TimeOnlyFormat = 'short' | 'medium';\n\n/**\n * Formats a given timestamp as a time.\n *\n * Timestamps can be formatted as 2 variants:\n * - 'short' being 'HH:mm' (hours and minutes)\n * - 'medium' being 'HH:mm:ss' (as above, but with seconds appended)\n *\n */\n@Pipe({\n name: 'timeOnly',\n standalone: true,\n})\nexport class TimeOnlyPipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(input: number | Date | string, format: TimeOnlyFormat = 'short'): string {\n return this.format(input, this.getFormat(format));\n }\n\n private getFormat(format: TimeOnlyFormat): string {\n switch (format) {\n case 'short':\n return DateFormats.SHORT_TIME_FORMAT;\n case 'medium':\n return DateFormats.MEDIUM_TIME_FORMAT;\n default:\n throw new Error(`Unable to derive format from \"${format}\"`);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AbstractTimezoneCompensatingPipe } from '../abstract-timezone-compensating.pipe';\nimport { DateFormats } from '../date-formats';\n\n/**\n * Formats a given timestamp so that:\n * - If timestamp is of \"today\", it's formatted as time with hours and minutes (eg. 23:56)\n * - If timestamp is different from \"today\", it's formatted as date with \"day of month\", month and year (eg. 28.02.2020)\n *\n * All formatting and parsing is expect to be handled in \"Europe/Copenhagen\" time zone and with\n * the locale provided by `LOCALE_ID`.\n */\n\n@Pipe({\n name: 'timeOrDate',\n standalone: true,\n})\nexport class TimeOrDatePipe extends AbstractTimezoneCompensatingPipe implements PipeTransform {\n transform(\n time: number | Date | string,\n showSeconds = false,\n formatMonth: 'month-as-digits' | 'month-as-letters' = 'month-as-digits'\n ): string {\n if (!time) {\n return '';\n }\n\n const date = typeof time === 'number' || typeof time === 'string' ? new Date(time) : time;\n\n const today = new Date();\n const sameDay =\n date.getFullYear() === today.getFullYear() &&\n date.getMonth() === today.getMonth() &&\n date.getDate() === today.getDate();\n\n let format = DateFormats.SHORT_DATE_FORMAT;\n\n if (formatMonth === 'month-as-letters') {\n format = DateFormats.MEDIUM_LETTER_DATE_FORMAT;\n }\n\n if (sameDay) {\n format = showSeconds ? DateFormats.MEDIUM_TIME_FORMAT : DateFormats.SHORT_TIME_FORMAT;\n }\n\n return this.format(date, format);\n }\n}\n","import { formatNumber } from '@angular/common';\nimport { Inject, Injectable, LOCALE_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormatNumberService {\n constructor(@Inject(LOCALE_ID) private localeId: string) {}\n\n public formatNumber(value: number, digitsInfo: string) {\n if (value == null) {\n return '';\n }\n\n return formatNumber(value, this.localeId, digitsInfo);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { FormatNumberService } from './format-number.service';\n\n@Pipe({\n name: 'formatNumber',\n standalone: true,\n})\nexport class FormatNumberPipe implements PipeTransform {\n constructor(private formatNumberService: FormatNumberService) {}\n\n transform(value: number, digitsInfo = '1.2-2') {\n return this.formatNumberService.formatNumber(value, digitsInfo);\n }\n}\n","import { formatNumber } from '@angular/common';\nimport { KirbyExtensionsLocalizationToken } from '../di-tokens';\nimport { Amount } from './amount.model';\n\nexport function formatAmount(\n amount: Amount,\n locale: string,\n config: KirbyExtensionsLocalizationToken,\n amountServiceConfiguration?: AmountServiceConfiguration\n) {\n const amountConfig = deriveConfiguration(amountServiceConfiguration);\n\n let formattedAmount = formatNumber(amount && amount.amount, locale, amountConfig.digitsInfo);\n\n if (amountConfig.stripSign) {\n formattedAmount = formattedAmount.replace('-', '').trim();\n }\n\n const currencyCodeToAppend = deriveCurrencyCode(amountConfig, amount, config);\n\n if (!currencyCodeToAppend) {\n return formattedAmount;\n }\n if (amountConfig.currencyCodePosition === 'postfix') {\n return formattedAmount + ' ' + currencyCodeToAppend;\n } else {\n return currencyCodeToAppend + ' ' + formattedAmount;\n }\n}\n\nexport function deriveCurrencyCode(\n amountConfig: AmountServiceConfiguration,\n amount: Amount,\n config: KirbyExtensionsLocalizationToken\n) {\n let currencyCodeToAppend;\n\n if (amountConfig.showCurrencyCode) {\n if (amountConfig.showCurrencyCode === 'alwaysShowCurrency') {\n currencyCodeToAppend = amount.currencyCode;\n } else if (amountConfig.showCurrencyCode === 'showForeignCurrency') {\n currencyCodeToAppend =\n amount.currencyCode !== config.nativeCurrency ? amount.currencyCode : '';\n } else if (amountConfig.showCurrencyCode === 'useCurrencyMapping') {\n currencyCodeToAppend = config.currencyMappings?.[amount.currencyCode] || amount.currencyCode;\n }\n }\n\n return currencyCodeToAppend || '';\n}\n\nexport function deriveConfiguration(configuration: AmountServiceConfiguration = {}) {\n const config: AmountServiceConfiguration = {\n showCurrencyCode: '',\n digitsInfo: '1.2-2',\n stripSign: false,\n };\n\n return Object.assign({}, config, configuration);\n}\n\nexport type ShowCurrencyCode =\n | ''\n | 'alwaysShowCurrency'\n | 'showForeignCurrency'\n | 'useCurrencyMapping';\nexport type CurrencyCodePosition = '' | 'prefix' | 'postfix';\n\nexport interface AmountServiceConfiguration {\n /**\n * - '' - don't output CurrencyCode\n * - 'alwaysShowCurrency' - always shows CurrencyCode, regardless of presentation currency\n * - 'showForeignCurrency' - only show CurrencyCode if it differs from the presentation currency\n * - 'useCurrencyMapping' - Shows the currency symbol defined in KirbyExtensionsLocalizationToken.currencyMappings instead of the currency code. Fallback to currencyCode\n */\n showCurrencyCode?: ShowCurrencyCode;\n /**\n * The position of the currency code in the formatted amount\n * - 'postfix' - output CurrencyCode after the formatted amount, eg. 1.234,56 EUR\n * - 'prefix' - output CurrencyCode before the formatted amount, eg. DKK 1.234,56\n */\n currencyCodePosition?: CurrencyCodePosition;\n /**\n * A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters\n */\n digitsInfo?: string;\n /**\n * Remove the minus sign from the formatted amount and trim any leading or trailing whitespace.\n */\n stripSign?: boolean;\n /**\n * The string to return if the amount is empty\n */\n returnValueOnEmptyAmount?: string;\n}\n","import { inject, Injectable, LOCALE_ID } from '@angular/core';\n\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { Amount } from './amount.model';\nimport {\n AmountServiceConfiguration,\n deriveConfiguration,\n formatAmount,\n} from './amount-service-formatter';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AmountService {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n /**\n * Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration}\n *\n * The number is always formatted according to Angular LOCALE_ID\n *\n * @param amount the {@link Amount} to configure\n * @param amountServiceConfiguration\n */\n\n formatAmount(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration) {\n if (amount == undefined) {\n const config = deriveConfiguration(amountServiceConfiguration);\n if (config.returnValueOnEmptyAmount) {\n return config.returnValueOnEmptyAmount;\n }\n amount = {\n amount: 0.0,\n currencyCode: '',\n };\n }\n\n return formatAmount(amount, this.locale, this.config, amountServiceConfiguration);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Amount } from './amount.model';\nimport { AmountService } from './amount.service';\nimport { AmountServiceConfiguration } from './amount-service-formatter';\n\n/**\n * Configuration object for the amount-pipe. The configuration object can be used to control\n * the formatting of the amount, and can be passed as an argument to the amount-pipe when used on an {@link Amount}.\n * - `showCurrencyCode`: Controls whether the currency code should be displayed or not.\n * - `''`: Don't output currency code\n * - `alwaysShowCurrency`: Always show currency code, regardless of presentation currency\n * - `showForeignCurrency`: Only show currency code if it differs from the presentation currency\n * - `digitsInfo`: A string that represents the format of the number. Learn more about the format here: https://angular.io/api/common/DecimalPipe#parameters\n * - `stripSign`: Controls whether the minus sign should be stripped from a negative amount.\n * - `currencyCodePosition`: Controls the position of the currency code in the formatted amount.\n * - `postfix`: Output currency code after the formatted amount, e.g. 1.234,56 EUR\n * - `prefix`: Output currency code before the formatted amount, e.g. DKK 1.234,56\n */\n@Pipe({\n name: 'amount',\n standalone: true,\n})\nexport class AmountPipe implements PipeTransform {\n constructor(private amountService: AmountService) {}\n\n /**\n * Applies the transformation logic, by taking the `amount`-argument, and a configuration object - {@link AmountServiceConfiguration} (or a number of arguments, for backwards compatibility).\n *\n * @param amount the {@link Amount} to configure\n * @param amountServiceConfiguration\n */\n transform(amount: Amount, amountServiceConfiguration?: AmountServiceConfiguration) {\n return this.amountService.formatAmount(amount, amountServiceConfiguration);\n }\n}\n","import { AccountNumber } from './account-number.model';\n\nexport function formatAccountNumber(value: AccountNumber): string {\n return `${value.regNo.padStart(4, '0')} ${value.accountNo.replace(/^0+/, '')}`;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { AccountNumber } from './account-number.model';\nimport { formatAccountNumber } from './account-number-service-formatter';\n\n/**\n * Pipe that formats a {@link AccountNumber}-object to a common format.\n */\n@Pipe({\n name: 'accountNumber',\n standalone: true,\n})\nexport class AccountNumberPipe implements PipeTransform {\n /**\n * Formats the {@link AccountNumber} to a common format.\n *\n * @param value the {@link AccountNumber} to format\n */\n transform(value: AccountNumber): string | undefined {\n return formatAccountNumber(value);\n }\n}\n","import { inject, Injectable, LOCALE_ID } from '@angular/core';\n\nimport { KIRBY_EXTENSIONS_LOCALIZATION_TOKEN } from '../di-tokens';\nimport { PhoneNumber } from './phone-number';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PhoneNumberService {\n private config = inject(KIRBY_EXTENSIONS_LOCALIZATION_TOKEN);\n private locale = inject(LOCALE_ID);\n\n private static chunkUpPhoneNumber(str: string, chunk: number): string {\n return str.match(new RegExp(`.{1,${chunk}}`, 'g'))?.join(' ') ?? '';\n }\n\n formatPhoneNumber(\n phoneNumber: PhoneNumber | string,\n chunk = 2,\n showCountryCode?: boolean\n ): string | undefined {\n const countryCode =\n typeof phoneNumber === 'string' ? this.config.countryCode : phoneNumber.countryCode;\n const number = typeof phoneNumber === 'string' ? phoneNumber : phoneNumber.number;\n\n if (!/^\\d+$/.test(number)) {\n return;\n }\n\n if (showCountryCode === undefined) {\n showCountryCode = !this.locale.match(`${this.config.defaultLang}.*`);\n }\n\n const formattedNumber = PhoneNumberService.chunkUpPhoneNumber(number, chunk);\n\n if (showCountryCode) {\n return `${countryCode} ${formattedNumber}`;\n } else {\n return formattedNumber;\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { PhoneNumber } from './phone-number';\nimport { PhoneNumberService } from './phone-number.service';\n\n@Pipe({\n name: 'phoneNumber',\n standalone: true,\n})\nexport class PhoneNumberPipe implements PipeTransform {\n constructor(private phoneNumberService: PhoneNumberService) {}\n\n /**\n * Transforms a phone number, chunked up with spaces between the chunks and the country code in front, if desired.\n *\n * @param phoneNumber A PhoneNumber or a string representation of a phone number\n * @param chunk The chunk size used to split up the phone number with spaces\n * @param showCountryCode Show the country code in front of the phone number. If a string representation is supplied, the KIRBY_EXTENSIONS_LOCALIZATION_TOKEN.countryCode is used.\n */\n transform(\n phoneNumber: PhoneNumber | string,\n chunk = 2,\n showCountryCode?: boolean\n ): string | undefined {\n return this.phoneNumberService.formatPhoneNumber(phoneNumber, chunk, showCountryCode);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.FormatNumberService","i1.AmountService","i1.PhoneNumberService"],"mappings":";;;;MAAa,WAAW,CAAA;aACN,IAAA,CAAA,iBAAiB,GAAG,YAAY,CAAC;aACjC,IAAA,CAAA,kBAAkB,GAAG,WAAW,CAAC;aACjC,IAAA,CAAA,yBAAyB,GAAG,cAAc,CAAC;aAC3C,IAAA,CAAA,iBAAiB,GAAG,OAAO,CAAC;aAC5B,IAAA,CAAA,kBAAkB,GAAG,UAAU,CAAC;aAChC,IAAA,CAAA,6BAA6B,GAAG,CAAA,EAAG,WAAW,CAAC,iBAAiB,IAAI,WAAW,CAAC,kBAAkB,CAAA,CAAE,CAAC;;;MCJ1G,mCAAmC,GAC9C,IAAI,cAAc,CAAmC,qCAAqC;AAEtF,SAAU,uCAAuC,CACrD,OAA+C,EAAA;IAE/C,OAAO;AACL,QAAA,OAAO,EAAE,mCAAmC;AAC5C,QAAA,UAAU,EAAE,OAAO;KACpB;AACH;;ACRA;;;;AAIG;MACmB,gCAAgC,CAAA;AAAtD,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,mCAAmC,CAAC;AACpD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;IAyEpC;IArEY,MAAM,CAAC,IAA4B,EAAE,aAAqB,EAAA;QAClE,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,IAAI,GAAG,OAAO,IAAI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