@onemrvapublic/design-system 22.0.0-develop.2 → 22.0.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/fesm2022/onemrvapublic-design-system-layout.mjs +14 -13
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +3 -3
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +2 -3
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +5 -4
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +1 -3
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-page-error.mjs +3 -4
- package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +7 -7
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system.mjs +1 -1
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -1
- package/package.json +1 -1
- package/types/onemrvapublic-design-system-layout.d.ts +1 -1
- package/types/onemrvapublic-design-system-mat-file-upload.d.ts +1 -1
- package/types/onemrvapublic-design-system-shared.d.ts +1 -1
- package/types/onemrvapublic-design-system.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, OnInit, input, output, viewChild } from '@angular/core';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslateModule,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n readonly defaultCountry = input('be');\n\n readonly childComponent = viewChild<OnemrvaMatInputAddressComponent>(\n OnemrvaMatInputAddressComponent,\n );\n\n readonly form = input(\n new FormGroup({\n country: new FormControl(''),\n street: new FormControl(''),\n postal_code: new FormControl(''),\n city: new FormControl(''),\n street_number: new FormControl(''),\n box: new FormControl(''),\n }),\n );\n\n readonly update = output<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n box?: string;\n }>();\n\n // Keep existing property names as getters to avoid template changes\n get countryForm(): FormControl<string | null> {\n return this.form().get('country') as FormControl<string | null>;\n }\n get streetControl(): FormControl<string | null> {\n return this.form().get('street') as FormControl<string | null>;\n }\n get postalCodeControl(): FormControl<string | null> {\n return this.form().get('postal_code') as FormControl<string | null>;\n }\n get cityControl(): FormControl<string | null> {\n return this.form().get('city') as FormControl<string | null>;\n }\n get boxControl(): FormControl<string | null> {\n return this.form().get('box') as FormControl<string | null>;\n }\n get numeroControl(): FormControl<string | null> {\n return this.form().get('street_number') as FormControl<string | null>;\n }\n\n ngOnInit() {\n // Emit on any form change\n merge(this.form().valueChanges).subscribe(() => {\n const v = this.form().value;\n const change = {\n country: v.country || undefined,\n street: v.street || undefined,\n postal_code: v.postal_code || undefined,\n city: v.city || undefined,\n street_number: v.street_number || undefined,\n };\n this.update.emit(change);\n });\n }\n\n onCountrySelected() {\n setTimeout(() => {\n this.childComponent()?.focus();\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n const patch: any = {};\n\n if (city) {\n patch.city = city;\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n patch.street_number = houseNumber;\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n patch.postal_code = postalCode;\n }\n\n if (Object.keys(patch).length > 0) {\n this.form().patchValue(patch);\n }\n }\n}\n","<onemrva-mat-input-country\n (getCountry)=\"onCountrySelected()\"\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n/>\n\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12-small col-8-medium\">\n <onemrva-mat-input-address\n class=\"mr-m\"\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n />\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium\">\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium ml-s-small\">\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12-small col-4-medium\">\n <mat-form-field class=\"mr-m-medium\">\n <mat-label\n >{{ 'input.address.postal-code.label' | translate}}</mat-label\n >\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-12-small col-8-medium\">\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAyBa,cAAc,CAAA;AAd3B,IAAA,WAAA,GAAA;QAeW,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,IAAI;2FAAC;QAE5B,IAAA,CAAA,cAAc,GAAG,SAAS,CACjC,+BAA+B;2FAChC;AAEQ,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CACnB,IAAI,SAAS,CAAC;AACZ,YAAA,OAAO,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC5B,YAAA,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC3B,YAAA,WAAW,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAChC,YAAA,IAAI,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACzB,YAAA,aAAa,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,YAAA,GAAG,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;SACzB,CAAC;iFACH;QAEQ,IAAA,CAAA,MAAM,GAAG,MAAM,EAOpB;AAkEL,IAAA;;AA/DC,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAA+B;IACjE;AACA,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,QAAQ,CAA+B;IAChE;AACA,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,aAAa,CAA+B;IACrE;AACA,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,IAAI,EAAE,CAA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AA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7BnC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, OnInit, input, output, viewChild } from '@angular/core';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslatePipe,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n readonly defaultCountry = input('be');\n\n readonly childComponent = viewChild<OnemrvaMatInputAddressComponent>(\n OnemrvaMatInputAddressComponent,\n );\n\n readonly form = input(\n new FormGroup({\n country: new FormControl(''),\n street: new FormControl(''),\n postal_code: new FormControl(''),\n city: new FormControl(''),\n street_number: new FormControl(''),\n box: new FormControl(''),\n }),\n );\n\n readonly update = output<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n box?: string;\n }>();\n\n // Keep existing property names as getters to avoid template changes\n get countryForm(): FormControl<string | null> {\n return this.form().get('country') as FormControl<string | null>;\n }\n get streetControl(): FormControl<string | null> {\n return this.form().get('street') as FormControl<string | null>;\n }\n get postalCodeControl(): FormControl<string | null> {\n return this.form().get('postal_code') as FormControl<string | null>;\n }\n get cityControl(): FormControl<string | null> {\n return this.form().get('city') as FormControl<string | null>;\n }\n get boxControl(): FormControl<string | null> {\n return this.form().get('box') as FormControl<string | null>;\n }\n get numeroControl(): FormControl<string | null> {\n return this.form().get('street_number') as FormControl<string | null>;\n }\n\n ngOnInit() {\n // Emit on any form change\n merge(this.form().valueChanges).subscribe(() => {\n const v = this.form().value;\n const change = {\n country: v.country || undefined,\n street: v.street || undefined,\n postal_code: v.postal_code || undefined,\n city: v.city || undefined,\n street_number: v.street_number || undefined,\n };\n this.update.emit(change);\n });\n }\n\n onCountrySelected() {\n setTimeout(() => {\n this.childComponent()?.focus();\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n const patch: any = {};\n\n if (city) {\n patch.city = city;\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n patch.street_number = houseNumber;\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n patch.postal_code = postalCode;\n }\n\n if (Object.keys(patch).length > 0) {\n this.form().patchValue(patch);\n }\n }\n}\n","<onemrva-mat-input-country\n (getCountry)=\"onCountrySelected()\"\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n/>\n\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12-small col-8-medium\">\n <onemrva-mat-input-address\n class=\"mr-m\"\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n />\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium\">\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium ml-s-small\">\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12-small col-4-medium\">\n <mat-form-field class=\"mr-m-medium\">\n <mat-label\n >{{ 'input.address.postal-code.label' | translate}}</mat-label\n >\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-12-small col-8-medium\">\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAyBa,cAAc,CAAA;AAd3B,IAAA,WAAA,GAAA;QAeW,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,IAAI;2FAAC;QAE5B,IAAA,CAAA,cAAc,GAAG,SAAS,CACjC,+BAA+B;2FAChC;AAEQ,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CACnB,IAAI,SAAS,CAAC;AACZ,YAAA,OAAO,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC5B,YAAA,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC3B,YAAA,WAAW,EAAE,IAAI,WA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+B;AAChC,qBAAA,EAAA,UAAA,EAEW,IAAI,EAAA,QAAA,EAAA,4tEAAA,EAAA,MAAA,EAAA,CAAA,kJAAA,CAAA,EAAA;4MAOd,+BAA+B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7BnC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -6,8 +6,7 @@ import * as i1 from '@angular/material/button';
|
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import * as i2 from '@angular/material/icon';
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import
|
|
10
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
9
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
11
10
|
import { Subject, interval, takeUntil } from 'rxjs';
|
|
12
11
|
import { MatTooltip } from '@angular/material/tooltip';
|
|
13
12
|
|
|
@@ -150,7 +149,7 @@ class OnemrvaMatCarouselComponent {
|
|
|
150
149
|
});
|
|
151
150
|
}
|
|
152
151
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatCarouselComponent, isStandalone: true, selector: "onemrva-mat-carousel", inputs: { timing: { classPropertyName: "timing", publicName: "timing", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showDots: { classPropertyName: "showDots", publicName: "showDots", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize($event)" } }, queries: [{ propertyName: "items", predicate: OnemrvaMatCarouselItemComponent, isSignal: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carouselWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "
|
|
152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatCarouselComponent, isStandalone: true, selector: "onemrva-mat-carousel", inputs: { timing: { classPropertyName: "timing", publicName: "timing", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showDots: { classPropertyName: "showDots", publicName: "showDots", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize($event)" } }, queries: [{ propertyName: "items", predicate: OnemrvaMatCarouselItemComponent, isSignal: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carouselWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
|
|
154
153
|
trigger('inOutAnimation', [
|
|
155
154
|
transition(':enter', [
|
|
156
155
|
style({ opacity: 0 }),
|
|
@@ -168,7 +167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
168
167
|
args: [{ selector: 'onemrva-mat-carousel', standalone: true, imports: [
|
|
169
168
|
MatButtonModule,
|
|
170
169
|
MatIconModule,
|
|
171
|
-
|
|
170
|
+
TranslatePipe,
|
|
172
171
|
MatTooltip,
|
|
173
172
|
NgStyle,
|
|
174
173
|
], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-carousel.mjs","sources":["../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.html","../../../../projects/onemrva/design-system/mat-carousel/onemrvapublic-design-system-mat-carousel.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n TemplateRef,\n inject,\n viewChild,\n signal,\n} from '@angular/core';\n\n@Component({\n selector: 'onemrva-mat-carousel-item',\n standalone: true,\n imports: [],\n templateUrl: './onemrva-mat-carousel-item.component.html',\n styleUrl: './onemrva-mat-carousel-item.component.scss',\n host: {\n '[class.show]': 'show()',\n },\n})\nexport class OnemrvaMatCarouselItemComponent {\n readonly tpl = viewChild.required(TemplateRef);\n\n public nativeElement: HTMLElement;\n\n readonly show = signal(false);\n\n element: ElementRef = inject(ElementRef);\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n}\n","<!--<ng-template>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n\n<ng-content />\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n input,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { OnemrvaMatCarouselItemComponent } from './mat-carousel-item/onemrva-mat-carousel-item.component';\nimport {\n animate,\n AnimationBuilder,\n AnimationFactory,\n AnimationPlayer,\n style,\n transition,\n trigger,\n} from '@angular/animations';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { interval, Subject, takeUntil } from 'rxjs';\nimport { MatTooltip } from '@angular/material/tooltip';\n\n@Component({\n selector: 'onemrva-mat-carousel',\n standalone: true,\n imports: [\n MatButtonModule,\n MatIconModule,\n TranslateModule,\n MatTooltip,\n NgStyle,\n ],\n templateUrl: './onemrva-mat-carousel.component.html',\n styleUrl: './onemrva-mat-carousel.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '(window:resize)': 'onResize($event)',\n },\n animations: [\n trigger('inOutAnimation', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('1000ms ease-out', style({ opacity: 1 })),\n ]),\n transition(':leave', [\n style({ opacity: 1 }),\n animate('1000ms ease-in', style({ opacity: 0 })),\n ]),\n ]),\n ],\n})\nexport class OnemrvaMatCarouselComponent\n implements AfterViewInit, OnInit, OnDestroy\n{\n readonly items = contentChildren(OnemrvaMatCarouselItemComponent);\n\n nativeElement: HTMLElement;\n\n readonly carousel = viewChild.required<ElementRef>('carouselWrapper');\n\n private player?: AnimationPlayer;\n\n readonly timing = input('250ms ease-in');\n readonly gap = input(32);\n readonly padding = input(64);\n readonly showControls = input(true);\n readonly autoplay = input(0);\n readonly showDots = input(true);\n\n public currentSlide = 0;\n carouselWrapperStyle = {};\n\n width = 0;\n destroyed: Subject<any> = new Subject<any>();\n\n builder: AnimationBuilder = inject(AnimationBuilder);\n element: ElementRef = inject(ElementRef);\n renderer: Renderer2 = inject(Renderer2);\n\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n\n ngOnInit() {\n if (this.autoplay() > 0) {\n interval(this.autoplay())\n .pipe(takeUntil(this.destroyed))\n .subscribe(_i => {\n this.next();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroyed.next(null);\n this.destroyed.complete();\n }\n\n onResize(_event: any) {\n this.width = this.nativeElement.offsetWidth - 2 * this.padding();\n this.items().forEach(item => {\n this.renderer.setStyle(item.nativeElement, 'width', `${this.width}px`);\n this.renderer.setStyle(\n item.nativeElement,\n 'margin-right',\n `${this.gap()}px`,\n );\n this.animate();\n });\n this.resize();\n }\n\n buildAnimation(offset: number) {\n return this.builder.build([\n animate(this.timing(), style({ transform: `translateX(-${offset}px)` })),\n ]);\n }\n\n goto(index: number) {\n if (index >= 0 && index < this.items().length) {\n this.currentSlide = index;\n this.animate();\n this.opacify();\n }\n }\n\n next() {\n //if( this.currentSlide + 1 === this.items.length ) return;\n this.currentSlide = (this.currentSlide + 1) % this.items().length;\n this.currentSlide = isNaN(this.currentSlide) ? 1 : this.currentSlide;\n\n this.animate();\n this.opacify();\n }\n\n prev() {\n if (this.currentSlide === 0) return;\n this.currentSlide =\n (this.currentSlide - 1 + this.items().length) % this.items().length;\n this.animate();\n this.opacify();\n }\n\n animate() {\n const offset = this.currentSlide * (this.width + this.gap());\n const myAnimation: AnimationFactory = this.buildAnimation(offset);\n this.player = myAnimation.create(this.carousel().nativeElement);\n this.player.play();\n }\n\n ngAfterViewInit() {\n this.width = this.nativeElement.offsetWidth;\n setTimeout(() => {\n this.onResize(null);\n }, 10);\n this.opacify();\n }\n\n hasPrev() {\n return (\n this.items().length > 0 && this.showControls() && this.currentSlide > 0\n );\n }\n\n hasNext() {\n return (\n this.items().length > 0 &&\n this.showControls() &&\n this.currentSlide < this.items().length - 1\n );\n }\n\n opacify() {\n this.items().forEach((item, index) => {\n if (index !== this.currentSlide) {\n item.nativeElement.className = 'semiTransparent';\n } else {\n item.nativeElement.className = '';\n }\n });\n }\n resize() {\n let biggest = 80;\n\n this.items().forEach(item => {\n item.nativeElement.style.height = 'auto';\n });\n this.items().forEach(item => {\n if (item.nativeElement.offsetHeight > biggest) {\n biggest = item.nativeElement.offsetHeight;\n }\n });\n this.items().forEach(item => {\n item.nativeElement.style.height = biggest + 'px';\n });\n }\n}\n","@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAmBa,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,GAAA;AAPS,QAAA,IAAA,CAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;QAIrC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK;iFAAC;AAE7B,QAAA,IAAA,CAAA,OAAO,GAAe,MAAM,CAAC,UAAU,CAAC;QAEtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa;IACjD;8GAVW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,KAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACR,WAAW,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpB/C,uGAKA,EAAA,MAAA,EAAA,CAAA,kJAAA,CAAA,EAAA,CAAA,CAAA;;2FDca,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAV3C,SAAS;AACE,YAAA,IAAA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AA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElEtE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-carousel.mjs","sources":["../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.html","../../../../projects/onemrva/design-system/mat-carousel/onemrvapublic-design-system-mat-carousel.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n TemplateRef,\n inject,\n viewChild,\n signal,\n} from '@angular/core';\n\n@Component({\n selector: 'onemrva-mat-carousel-item',\n standalone: true,\n imports: [],\n templateUrl: './onemrva-mat-carousel-item.component.html',\n styleUrl: './onemrva-mat-carousel-item.component.scss',\n host: {\n '[class.show]': 'show()',\n },\n})\nexport class OnemrvaMatCarouselItemComponent {\n readonly tpl = viewChild.required(TemplateRef);\n\n public nativeElement: HTMLElement;\n\n readonly show = signal(false);\n\n element: ElementRef = inject(ElementRef);\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n}\n","<!--<ng-template>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n\n<ng-content />\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n input,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { OnemrvaMatCarouselItemComponent } from './mat-carousel-item/onemrva-mat-carousel-item.component';\nimport {\n animate,\n AnimationBuilder,\n AnimationFactory,\n AnimationPlayer,\n style,\n transition,\n trigger,\n} from '@angular/animations';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { interval, Subject, takeUntil } from 'rxjs';\nimport { MatTooltip } from '@angular/material/tooltip';\n\n@Component({\n selector: 'onemrva-mat-carousel',\n standalone: true,\n imports: [\n MatButtonModule,\n MatIconModule,\n TranslatePipe,\n MatTooltip,\n NgStyle,\n ],\n templateUrl: './onemrva-mat-carousel.component.html',\n styleUrl: './onemrva-mat-carousel.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '(window:resize)': 'onResize($event)',\n },\n animations: [\n trigger('inOutAnimation', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('1000ms ease-out', style({ opacity: 1 })),\n ]),\n transition(':leave', [\n style({ opacity: 1 }),\n animate('1000ms ease-in', style({ opacity: 0 })),\n ]),\n ]),\n ],\n})\nexport class OnemrvaMatCarouselComponent\n implements AfterViewInit, OnInit, OnDestroy\n{\n readonly items = contentChildren(OnemrvaMatCarouselItemComponent);\n\n nativeElement: HTMLElement;\n\n readonly carousel = viewChild.required<ElementRef>('carouselWrapper');\n\n private player?: AnimationPlayer;\n\n readonly timing = input('250ms ease-in');\n readonly gap = input(32);\n readonly padding = input(64);\n readonly showControls = input(true);\n readonly autoplay = input(0);\n readonly showDots = input(true);\n\n public currentSlide = 0;\n carouselWrapperStyle = {};\n\n width = 0;\n destroyed: Subject<any> = new Subject<any>();\n\n builder: AnimationBuilder = inject(AnimationBuilder);\n element: ElementRef = inject(ElementRef);\n renderer: Renderer2 = inject(Renderer2);\n\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n\n ngOnInit() {\n if (this.autoplay() > 0) {\n interval(this.autoplay())\n .pipe(takeUntil(this.destroyed))\n .subscribe(_i => {\n this.next();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroyed.next(null);\n this.destroyed.complete();\n }\n\n onResize(_event: any) {\n this.width = this.nativeElement.offsetWidth - 2 * this.padding();\n this.items().forEach(item => {\n this.renderer.setStyle(item.nativeElement, 'width', `${this.width}px`);\n this.renderer.setStyle(\n item.nativeElement,\n 'margin-right',\n `${this.gap()}px`,\n );\n this.animate();\n });\n this.resize();\n }\n\n buildAnimation(offset: number) {\n return this.builder.build([\n animate(this.timing(), style({ transform: `translateX(-${offset}px)` })),\n ]);\n }\n\n goto(index: number) {\n if (index >= 0 && index < this.items().length) {\n this.currentSlide = index;\n this.animate();\n this.opacify();\n }\n }\n\n next() {\n //if( this.currentSlide + 1 === this.items.length ) return;\n this.currentSlide = (this.currentSlide + 1) % this.items().length;\n this.currentSlide = isNaN(this.currentSlide) ? 1 : this.currentSlide;\n\n this.animate();\n this.opacify();\n }\n\n prev() {\n if (this.currentSlide === 0) return;\n this.currentSlide =\n (this.currentSlide - 1 + this.items().length) % this.items().length;\n this.animate();\n this.opacify();\n }\n\n animate() {\n const offset = this.currentSlide * (this.width + this.gap());\n const myAnimation: AnimationFactory = this.buildAnimation(offset);\n this.player = myAnimation.create(this.carousel().nativeElement);\n this.player.play();\n }\n\n ngAfterViewInit() {\n this.width = this.nativeElement.offsetWidth;\n setTimeout(() => {\n this.onResize(null);\n }, 10);\n this.opacify();\n }\n\n hasPrev() {\n return (\n this.items().length > 0 && this.showControls() && this.currentSlide > 0\n );\n }\n\n hasNext() {\n return (\n this.items().length > 0 &&\n this.showControls() &&\n this.currentSlide < this.items().length - 1\n );\n }\n\n opacify() {\n this.items().forEach((item, index) => {\n if (index !== this.currentSlide) {\n item.nativeElement.className = 'semiTransparent';\n } else {\n item.nativeElement.className = '';\n }\n });\n }\n resize() {\n let biggest = 80;\n\n this.items().forEach(item => {\n item.nativeElement.style.height = 'auto';\n });\n this.items().forEach(item => {\n if (item.nativeElement.offsetHeight > biggest) {\n biggest = item.nativeElement.offsetHeight;\n }\n });\n this.items().forEach(item => {\n item.nativeElement.style.height = biggest + 'px';\n });\n }\n}\n","@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAmBa,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,GA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AA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElEtE;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { inject, viewChild, input, output, Component } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@angular/material/icon';
|
|
4
4
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
5
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
6
|
-
import { TranslateService
|
|
6
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import * as i2 from '@angular/material/tooltip';
|
|
8
8
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
9
9
|
|
|
@@ -52,11 +52,11 @@ class OnemrvaCopyToClipboardComponent {
|
|
|
52
52
|
}, 2000);
|
|
53
53
|
}
|
|
54
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaCopyToClipboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaCopyToClipboardComponent, isStandalone: true, selector: "copy-to-clipboard", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCopy: "onCopy", onClick: "onClick", onHover: "onHover", onLeave: "onLeave" }, host: { listeners: { "click": "clicked($event)", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["clipboardCopyContent"], descendants: true, isSignal: true }, { propertyName: "matTooltip", first: true, predicate: ["cccTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<span class=\"onemrva-copy-to-clipboard-container\">\n <span #clipboardCopyContent>\n <ng-content />\n </span>\n @if (!checked) {\n <mat-icon class=\"small\" (click)=\"copy($event)\"> content_copy </mat-icon>\n }\n @if (checked) {\n <mat-icon class=\"small\" color=\"success\">check</mat-icon>\n }\n <span\n [matTooltip]=\"getTooltipText\"\n matTooltipPosition=\"above\"\n #cccTooltip=\"matTooltip\"\n ></span>\n</span>\n", styles: [".onemrva-copy-to-clipboard-container mat-icon{line-height:18px;cursor:pointer;margin-left:4px;margin-right:4px}.onemrva-copy-to-clipboard-container .hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type:
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaCopyToClipboardComponent, isStandalone: true, selector: "copy-to-clipboard", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCopy: "onCopy", onClick: "onClick", onHover: "onHover", onLeave: "onLeave" }, host: { listeners: { "click": "clicked($event)", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["clipboardCopyContent"], descendants: true, isSignal: true }, { propertyName: "matTooltip", first: true, predicate: ["cccTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<span class=\"onemrva-copy-to-clipboard-container\">\n <span #clipboardCopyContent>\n <ng-content />\n </span>\n @if (!checked) {\n <mat-icon class=\"small\" (click)=\"copy($event)\"> content_copy </mat-icon>\n }\n @if (checked) {\n <mat-icon class=\"small\" color=\"success\">check</mat-icon>\n }\n <span\n [matTooltip]=\"getTooltipText\"\n matTooltipPosition=\"above\"\n #cccTooltip=\"matTooltip\"\n ></span>\n</span>\n", styles: [".onemrva-copy-to-clipboard-container mat-icon{line-height:18px;cursor:pointer;margin-left:4px;margin-right:4px}.onemrva-copy-to-clipboard-container .hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
56
56
|
}
|
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaCopyToClipboardComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
59
|
-
args: [{ selector: 'copy-to-clipboard', standalone: true, imports: [MatIconModule,
|
|
59
|
+
args: [{ selector: 'copy-to-clipboard', standalone: true, imports: [MatIconModule, MatTooltipModule], host: {
|
|
60
60
|
'(click)': 'clicked($event)',
|
|
61
61
|
'(mouseenter)': 'onMouseEnter($event)',
|
|
62
62
|
'(mouseleave)': 'onMouseLeave($event)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-copy-to-clipboard.mjs","sources":["../../../../projects/onemrva/design-system/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.ts","../../../../projects/onemrva/design-system/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.html","../../../../projects/onemrva/design-system/mat-copy-to-clipboard/onemrvapublic-design-system-mat-copy-to-clipboard.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport {
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-copy-to-clipboard.mjs","sources":["../../../../projects/onemrva/design-system/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.ts","../../../../projects/onemrva/design-system/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.html","../../../../projects/onemrva/design-system/mat-copy-to-clipboard/onemrvapublic-design-system-mat-copy-to-clipboard.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport { TranslateService } from '@ngx-translate/core';\nimport { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';\n\n@Component({\n selector: 'copy-to-clipboard',\n templateUrl: 'copy-to-clipboard.component.html',\n styleUrls: ['copy-to-clipboard.component.scss'],\n standalone: true,\n imports: [MatIconModule, MatTooltipModule],\n host: {\n '(click)': 'clicked($event)',\n '(mouseenter)': 'onMouseEnter($event)',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class OnemrvaCopyToClipboardComponent {\n private translate = inject(TranslateService);\n private clipboard = inject(Clipboard);\n\n checked = false;\n\n readonly content = viewChild.required<ElementRef>('clipboardCopyContent');\n readonly matTooltip = viewChild.required<MatTooltip>('cccTooltip');\n\n readonly tooltip = input('');\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n readonly onCopy = output<void>();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n readonly onClick = output<Event>();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n readonly onHover = output<Event>();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n readonly onLeave = output<Event>();\n\n clicked(e: MouseEvent) {\n this.onClick.emit(e);\n }\n\n onMouseEnter(e: MouseEvent) {\n this.onHover.emit(e);\n }\n\n onMouseLeave(e: Event) {\n this.onLeave.emit(e);\n }\n\n get getTooltipText() {\n const tooltip = this.tooltip();\n return tooltip\n ? this.translate.instant(tooltip)\n : this.translate.instant('copied.to.clipboard');\n }\n\n copy($event: any) {\n $event.stopPropagation();\n\n this.matTooltip().show();\n\n this.clipboard.copy(this.content().nativeElement.innerHTML);\n\n this.onCopy.emit(undefined);\n this.checked = true;\n\n setTimeout(() => {\n this.checked = false;\n this.matTooltip().hide();\n }, 2000);\n }\n}\n","<span class=\"onemrva-copy-to-clipboard-container\">\n <span #clipboardCopyContent>\n <ng-content />\n </span>\n @if (!checked) {\n <mat-icon class=\"small\" (click)=\"copy($event)\"> content_copy </mat-icon>\n }\n @if (checked) {\n <mat-icon class=\"small\" color=\"success\">check</mat-icon>\n }\n <span\n [matTooltip]=\"getTooltipText\"\n matTooltipPosition=\"above\"\n #cccTooltip=\"matTooltip\"\n ></span>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAyBa,+BAA+B,CAAA;AAZ5C,IAAA,WAAA,GAAA;AAaU,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAErC,IAAA,CAAA,OAAO,GAAG,KAAK;AAEN,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAa,sBAAsB,CAAC;AAChE,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAa,YAAY,CAAC;QAEzD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,EAAE;oFAAC;;QAGnB,IAAA,CAAA,MAAM,GAAG,MAAM,EAAQ;;QAEvB,IAAA,CAAA,OAAO,GAAG,MAAM,EAAS;;QAEzB,IAAA,CAAA,OAAO,GAAG,MAAM,EAAS;;QAEzB,IAAA,CAAA,OAAO,GAAG,MAAM,EAAS;AAoCnC,IAAA;AAlCC,IAAA,OAAO,CAAC,CAAa,EAAA;AACnB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB;AAEA,IAAA,YAAY,CAAC,CAAa,EAAA;AACxB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB;AAEA,IAAA,YAAY,CAAC,CAAQ,EAAA;AACnB,QAAA,IA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AAE,sBAAsB;AACtC,wBAAA,cAAc,EAAE,sBAAsB;AACvC,qBAAA,EAAA,QAAA,EAAA,icAAA,EAAA,MAAA,EAAA,CAAA,6KAAA,CAAA,EAAA;AAQiD,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,sBAAsB,oEACnB,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhCnE;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
3
|
|
|
5
4
|
class OnemrvaCountryItemComponent {
|
|
6
5
|
constructor() {
|
|
@@ -10,11 +9,11 @@ class OnemrvaCountryItemComponent {
|
|
|
10
9
|
...(ngDevMode ? [{ debugName: "countryName" }] : /* istanbul ignore next */ []));
|
|
11
10
|
}
|
|
12
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaCountryItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: OnemrvaCountryItemComponent, isStandalone: true, selector: "mat-country-item", inputs: { countryCode: { classPropertyName: "countryCode", publicName: "countryCode", isSignal: true, isRequired: false, transformFunction: null }, countryName: { classPropertyName: "countryName", publicName: "countryName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"onemrva-country-item\">\n <span class=\"description\">{{ countryName() }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em}.mat-form-field-disabled .onemrva-country-item flag-icon{opacity:.4}\n"],
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: OnemrvaCountryItemComponent, isStandalone: true, selector: "mat-country-item", inputs: { countryCode: { classPropertyName: "countryCode", publicName: "countryCode", isSignal: true, isRequired: false, transformFunction: null }, countryName: { classPropertyName: "countryName", publicName: "countryName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"onemrva-country-item\">\n <span class=\"description\">{{ countryName() }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em}.mat-form-field-disabled .onemrva-country-item flag-icon{opacity:.4}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
14
13
|
}
|
|
15
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaCountryItemComponent, decorators: [{
|
|
16
15
|
type: Component,
|
|
17
|
-
args: [{ selector: 'mat-country-item', standalone: true,
|
|
16
|
+
args: [{ selector: 'mat-country-item', standalone: true, encapsulation: ViewEncapsulation.None, template: "<div class=\"onemrva-country-item\">\n <span class=\"description\">{{ countryName() }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em}.mat-form-field-disabled .onemrva-country-item flag-icon{opacity:.4}\n"] }]
|
|
18
17
|
}], propDecorators: { countryCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "countryCode", required: false }] }], countryName: [{ type: i0.Input, args: [{ isSignal: true, alias: "countryName", required: false }] }] } });
|
|
19
18
|
|
|
20
19
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-country-item.mjs","sources":["../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.ts","../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.html","../../../../projects/onemrva/design-system/mat-country-item/index.ts","../../../../projects/onemrva/design-system/mat-country-item/onemrvapublic-design-system-mat-country-item.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-country-item.mjs","sources":["../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.ts","../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.html","../../../../projects/onemrva/design-system/mat-country-item/index.ts","../../../../projects/onemrva/design-system/mat-country-item/onemrvapublic-design-system-mat-country-item.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\n\n@Component({\n selector: 'mat-country-item',\n styleUrls: ['./onemrva-mat-country-item.component.scss'],\n templateUrl: './onemrva-mat-country-item.component.html',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaCountryItemComponent {\n readonly countryCode = input<string | null>('xx');\n readonly countryName = input<string | null | undefined>('');\n}\n","<div class=\"onemrva-country-item\">\n <span class=\"description\">{{ countryName() }}</span>\n</div>\n","/*\n * Public API Surface of mat-country-item\n */\n\nexport * from './src/onemrva-mat-country-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,2BAA2B,CAAA;AAPxC,IAAA,WAAA,GAAA;QAQW,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,IAAI;wFAAC;QACxC,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,EAAE;wFAAC;AAC5D,IAAA;8GAHY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,4WCTxC,0GAGA,EAAA,MAAA,EAAA,CAAA,+LAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDMa,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,UAAA,EAGhB,IAAI,EAAA,aAAA,EACD,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,0GAAA,EAAA,MAAA,EAAA,CAAA,+LAAA,CAAA,EAAA;;;AEPvC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -6,8 +6,7 @@ import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
|
6
6
|
import { MatDatepickerIntl, MatCalendar } from '@angular/material/datepicker';
|
|
7
7
|
import * as i2 from '@angular/material/icon';
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import
|
|
10
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
9
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
11
10
|
import { MatTooltip } from '@angular/material/tooltip';
|
|
12
11
|
import { DateTime } from 'luxon';
|
|
13
12
|
|
|
@@ -150,11 +149,11 @@ class OnemrvaMatDatepickerHeaderComponent {
|
|
|
150
149
|
return [minYearLabel, maxYearLabel];
|
|
151
150
|
}
|
|
152
151
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatDatepickerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: OnemrvaMatDatepickerHeaderComponent, isStandalone: true, selector: "onemrva-mat-datepicker-header", providers: [], ngImport: i0, template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button\n mat-button\n type=\"button\"\n class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\"\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n aria-live=\"polite\"\n >\n <span aria-hidden=\"true\">{{ periodButtonText }}</span>\n <svg\n class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n <polygon points=\"0,0 5,5 10,0\" />\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content />\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\"\n [matTooltip]=\"'Previous Month' | translate\"\n >\n <mat-icon>keyboard_arrow_left</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"setToday()\"\n [attr.aria-label]=\"'Today' | translate\"\n [matTooltip]=\"'Today' | translate\"\n >\n <mat-icon>today</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\"\n [matTooltip]=\"'Next Month' | translate\"\n >\n <mat-icon>keyboard_arrow_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: ["a.onemrva-calendar-header-today{font-size:12px;color:var(--mat-sys-primary);text-decoration:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "
|
|
152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: OnemrvaMatDatepickerHeaderComponent, isStandalone: true, selector: "onemrva-mat-datepicker-header", providers: [], ngImport: i0, template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button\n mat-button\n type=\"button\"\n class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\"\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n aria-live=\"polite\"\n >\n <span aria-hidden=\"true\">{{ periodButtonText }}</span>\n <svg\n class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n <polygon points=\"0,0 5,5 10,0\" />\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content />\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\"\n [matTooltip]=\"'Previous Month' | translate\"\n >\n <mat-icon>keyboard_arrow_left</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"setToday()\"\n [attr.aria-label]=\"'Today' | translate\"\n [matTooltip]=\"'Today' | translate\"\n >\n <mat-icon>today</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\"\n [matTooltip]=\"'Next Month' | translate\"\n >\n <mat-icon>keyboard_arrow_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: ["a.onemrva-calendar-header-today{font-size:12px;color:var(--mat-sys-primary);text-decoration:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
154
153
|
}
|
|
155
154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatDatepickerHeaderComponent, decorators: [{
|
|
156
155
|
type: Component,
|
|
157
|
-
args: [{ selector: 'onemrva-mat-datepicker-header', standalone: true, imports: [MatButtonModule, MatIconModule,
|
|
156
|
+
args: [{ selector: 'onemrva-mat-datepicker-header', standalone: true, imports: [MatButtonModule, MatIconModule, TranslatePipe, MatTooltip], providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button\n mat-button\n type=\"button\"\n class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\"\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n aria-live=\"polite\"\n >\n <span aria-hidden=\"true\">{{ periodButtonText }}</span>\n <svg\n class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n <polygon points=\"0,0 5,5 10,0\" />\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content />\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\"\n [matTooltip]=\"'Previous Month' | translate\"\n >\n <mat-icon>keyboard_arrow_left</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"setToday()\"\n [attr.aria-label]=\"'Today' | translate\"\n [matTooltip]=\"'Today' | translate\"\n >\n <mat-icon>today</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\"\n [matTooltip]=\"'Next Month' | translate\"\n >\n <mat-icon>keyboard_arrow_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: ["a.onemrva-calendar-header-today{font-size:12px;color:var(--mat-sys-primary);text-decoration:none}\n"] }]
|
|
158
157
|
}] });
|
|
159
158
|
function isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {
|
|
160
159
|
const year1 = dateAdapter.getYear(date1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-datepicker-header.mjs","sources":["../../../../projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts","../../../../projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html","../../../../projects/onemrva/design-system/mat-datepicker-header/index.ts","../../../../projects/onemrva/design-system/mat-datepicker-header/onemrvapublic-design-system-mat-datepicker-header.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, inject } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MatDateFormats,\n} from '@angular/material/core';\nimport { MatCalendar, MatDatepickerIntl } from '@angular/material/datepicker';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { DateTime } from 'luxon';\n\nconst YEARS_PER_PAGE = 24;\nlet calendarHeaderId = 1;\n\n@Component({\n selector: 'onemrva-mat-datepicker-header',\n standalone: true,\n imports: [MatButtonModule, MatIconModule, TranslateModule, MatTooltip],\n templateUrl: 'onemrva-mat-datepicker-header.component.html',\n styleUrl: 'onemrva-mat-datepicker-header.component.scss',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OnemrvaMatDatepickerHeaderComponent<D> {\n private _intl = inject(MatDatepickerIntl);\n calendar = inject<MatCalendar<D>>(MatCalendar);\n private _dateAdapter = inject<DateAdapter<D>>(DateAdapter, {\n optional: true,\n });\n private _dateFormats = inject<MatDateFormats>(MAT_DATE_FORMATS, {\n optional: true,\n });\n\n setToday() {\n if (this._dateAdapter?.constructor.name.includes('Luxon')) {\n (this.calendar as unknown as MatCalendar<DateTime>)._goToDateInView(\n DateTime.now(),\n 'month',\n );\n } else {\n (this.calendar as unknown as MatCalendar<Date>)._goToDateInView(\n new Date(),\n 'month',\n );\n }\n }\n\n /** The display text for the current calendar view. */\n get periodButtonText(): string {\n if (\n this.calendar.activeDate !== null &&\n this.calendar.currentView == 'month' &&\n this._dateAdapter &&\n this._dateFormats\n ) {\n return this._dateAdapter\n .format(\n this.calendar.activeDate,\n this._dateFormats.display.monthYearLabel,\n )\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year' && this._dateAdapter) {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n return this._intl.formatYearRange(...this._formatMinAndMaxYearLabels());\n }\n\n /** The aria description for the current calendar view. */\n get periodButtonDescription(): string {\n if (\n this.calendar.currentView == 'month' &&\n this._dateFormats &&\n this._dateAdapter\n ) {\n return this._dateAdapter\n .format(\n this.calendar.activeDate,\n this._dateFormats.display.monthYearLabel,\n )\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year' && this._dateAdapter) {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n // Format a label for the window of years displayed in the multi-year calendar view. Use\n // `formatYearRangeLabel` because it is TTS friendly.\n return this._intl.formatYearRangeLabel(\n ...this._formatMinAndMaxYearLabels(),\n );\n }\n\n /** The `aria-label` for changing the calendar view. */\n get periodButtonLabel(): string {\n return this.calendar.currentView == 'month'\n ? this._intl.switchToMultiYearViewLabel\n : this._intl.switchToMonthViewLabel;\n }\n\n /** The label for the previous button. */\n get prevButtonLabel(): string {\n return {\n month: this._intl.prevMonthLabel,\n year: this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** The label for the next button. */\n get nextButtonLabel(): string {\n return {\n month: this._intl.nextMonthLabel,\n year: this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** Handles user clicks on the period label. */\n currentPeriodClicked(): void {\n this.calendar.currentView =\n this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n\n /** Handles user clicks on the previous button. */\n previousClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter!.addCalendarMonths(this.calendar.activeDate, -1)\n : this._dateAdapter!.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? -1 : -YEARS_PER_PAGE,\n );\n }\n\n /** Handles user clicks on the next button. */\n nextClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter!.addCalendarMonths(this.calendar.activeDate, 1)\n : this._dateAdapter!.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? 1 : YEARS_PER_PAGE,\n );\n }\n\n /** Whether the previous period button is enabled. */\n previousEnabled(): boolean {\n if (!this.calendar.minDate) {\n return true;\n }\n return (\n !this.calendar.minDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.minDate)\n );\n }\n\n /** Whether the next period button is enabled. */\n nextEnabled(): boolean {\n return (\n !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate)\n );\n }\n\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n private _isSameView(date1: D, date2: D): boolean {\n if (this.calendar.currentView == 'month') {\n return (\n this._dateAdapter!.getYear(date1) ==\n this._dateAdapter!.getYear(date2) &&\n this._dateAdapter!.getMonth(date1) == this._dateAdapter!.getMonth(date2)\n );\n }\n if (this.calendar.currentView == 'year') {\n return (\n this._dateAdapter!.getYear(date1) == this._dateAdapter!.getYear(date2)\n );\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(\n this._dateAdapter!,\n date1,\n date2,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n }\n\n /**\n * Format two individual labels for the minimum year and maximum year available in the multi-year\n * calendar view. Returns an array of two strings where the first string is the formatted label\n * for the minimum year, and the second string is the formatted label for the maximum year.\n */\n private _formatMinAndMaxYearLabels(): [\n minYearLabel: string,\n maxYearLabel: string,\n ] {\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter!.getYear(this.calendar.activeDate);\n const minYearOfPage =\n activeYear -\n getActiveOffset(\n this._dateAdapter!,\n this.calendar.activeDate,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n const maxYearOfPage = minYearOfPage + YEARS_PER_PAGE - 1;\n const minYearLabel = this._dateAdapter!.getYearName(\n this._dateAdapter!.createDate(minYearOfPage, 0, 1),\n );\n const maxYearLabel = this._dateAdapter!.getYearName(\n this._dateAdapter!.createDate(maxYearOfPage, 0, 1),\n );\n\n return [minYearLabel, maxYearLabel];\n }\n\n private _id = `mat-calendar-header-${calendarHeaderId++}`;\n\n _periodButtonLabelId = `${this._id}-period-label`;\n}\n\nfunction isSameMultiYearView<D>(\n dateAdapter: DateAdapter<D>,\n date1: D,\n date2: D,\n minDate: D | null,\n maxDate: D | null,\n): boolean {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return (\n Math.floor((year1 - startingYear) / YEARS_PER_PAGE) ===\n Math.floor((year2 - startingYear) / YEARS_PER_PAGE)\n );\n}\n\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear<D>(\n dateAdapter: DateAdapter<D>,\n minDate: D | null,\n maxDate: D | null,\n): number {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - YEARS_PER_PAGE + 1;\n } else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nfunction getActiveOffset<D>(\n dateAdapter: DateAdapter<D>,\n activeDate: D,\n minDate: D | null,\n maxDate: D | null,\n): number {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo(\n activeYear - getStartingYear(dateAdapter, minDate, maxDate),\n YEARS_PER_PAGE,\n );\n}\n\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo(a: number, b: number): number {\n return ((a % b) + b) % b;\n}\n","<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button\n mat-button\n type=\"button\"\n class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\"\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n aria-live=\"polite\"\n >\n <span aria-hidden=\"true\">{{ periodButtonText }}</span>\n <svg\n class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n <polygon points=\"0,0 5,5 10,0\" />\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content />\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\"\n [matTooltip]=\"'Previous Month' | translate\"\n >\n <mat-icon>keyboard_arrow_left</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"setToday()\"\n [attr.aria-label]=\"'Today' | translate\"\n [matTooltip]=\"'Today' | translate\"\n >\n <mat-icon>today</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\"\n [matTooltip]=\"'Next Month' | translate\"\n >\n <mat-icon>keyboard_arrow_right</mat-icon>\n </button>\n </div>\n</div>\n","/*\n * Public API Surface of mat-file upload\n */\n\nexport * from './src/onemrva-mat-datepicker-header.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAaA,MAAM,cAAc,GAAG,EAAE;AACzB,IAAI,gBAAgB,GAAG,CAAC;MAWX,mCAAmC,CAAA;AAThD,IAAA,WAAA,GAAA;AAUU,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAiB,WAAW,CAAC;AACtC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAiB,WAAW,EAAE;AACzD,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA,CAAC;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAiB,gBAAgB,EAAE;AAC9D,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA,CAAC;AA+LM,QAAA,IAAA,CAAA,GAAG,GAAG,CAAA,oBAAA,EAAuB,gBAAgB,EAAE,EAAE;AAEzD,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,eAAe;AAClD,IAAA;IAhMC,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AACxD,YAAA,IAAI,CAAC,QAA6C,CAAC,eAAe,CACjE,QAAQ,CAAC,GAAG,EAAE,EACd,OAAO,CACR;QACH;aAAO;YACJ,IAAI,CAAC,QAAyC,CAAC,eAAe,CAC7D,IAAI,IAAI,EAAE,EACV,OAAO,CACR;QACH;IACF;;AAGA,IAAA,IAAI,gBAAgB,GAAA;AAClB,QAAA,IACE,IAAI,CAAC,QAAQ,CAAC,UAAU,KAAK,IAAI;AACjC,YAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,OAAO;AACpC,YAAA,I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CACpB,UAAU,GAAG,eAAe,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,EAC3D,cAAc,CACf;AACH;AAEA;AACA,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS,EAAA;IAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1B;;AE7RA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-datepicker-header.mjs","sources":["../../../../projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts","../../../../projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html","../../../../projects/onemrva/design-system/mat-datepicker-header/index.ts","../../../../projects/onemrva/design-system/mat-datepicker-header/onemrvapublic-design-system-mat-datepicker-header.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, inject } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MatDateFormats,\n} from '@angular/material/core';\nimport { MatCalendar, MatDatepickerIntl } from '@angular/material/datepicker';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { DateTime } from 'luxon';\n\nconst YEARS_PER_PAGE = 24;\nlet calendarHeaderId = 1;\n\n@Component({\n selector: 'onemrva-mat-datepicker-header',\n standalone: true,\n imports: [MatButtonModule, MatIconModule, TranslatePipe, MatTooltip],\n templateUrl: 'onemrva-mat-datepicker-header.component.html',\n styleUrl: 'onemrva-mat-datepicker-header.component.scss',\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OnemrvaMatDatepickerHeaderComponent<D> {\n private _intl = inject(MatDatepickerIntl);\n calendar = inject<MatCalendar<D>>(MatCalendar);\n private _dateAdapter = inject<DateAdapter<D>>(DateAdapter, {\n optional: true,\n });\n private _dateFormats = inject<MatDateFormats>(MAT_DATE_FORMATS, {\n optional: true,\n });\n\n setToday() {\n if (this._dateAdapter?.constructor.name.includes('Luxon')) {\n (this.calendar as unknown as MatCalendar<DateTime>)._goToDateInView(\n DateTime.now(),\n 'month',\n );\n } else {\n (this.calendar as unknown as MatCalendar<Date>)._goToDateInView(\n new Date(),\n 'month',\n );\n }\n }\n\n /** The display text for the current calendar view. */\n get periodButtonText(): string {\n if (\n this.calendar.activeDate !== null &&\n this.calendar.currentView == 'month' &&\n this._dateAdapter &&\n this._dateFormats\n ) {\n return this._dateAdapter\n .format(\n this.calendar.activeDate,\n this._dateFormats.display.monthYearLabel,\n )\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year' && this._dateAdapter) {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n return this._intl.formatYearRange(...this._formatMinAndMaxYearLabels());\n }\n\n /** The aria description for the current calendar view. */\n get periodButtonDescription(): string {\n if (\n this.calendar.currentView == 'month' &&\n this._dateFormats &&\n this._dateAdapter\n ) {\n return this._dateAdapter\n .format(\n this.calendar.activeDate,\n this._dateFormats.display.monthYearLabel,\n )\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year' && this._dateAdapter) {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n // Format a label for the window of years displayed in the multi-year calendar view. Use\n // `formatYearRangeLabel` because it is TTS friendly.\n return this._intl.formatYearRangeLabel(\n ...this._formatMinAndMaxYearLabels(),\n );\n }\n\n /** The `aria-label` for changing the calendar view. */\n get periodButtonLabel(): string {\n return this.calendar.currentView == 'month'\n ? this._intl.switchToMultiYearViewLabel\n : this._intl.switchToMonthViewLabel;\n }\n\n /** The label for the previous button. */\n get prevButtonLabel(): string {\n return {\n month: this._intl.prevMonthLabel,\n year: this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** The label for the next button. */\n get nextButtonLabel(): string {\n return {\n month: this._intl.nextMonthLabel,\n year: this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** Handles user clicks on the period label. */\n currentPeriodClicked(): void {\n this.calendar.currentView =\n this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n\n /** Handles user clicks on the previous button. */\n previousClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter!.addCalendarMonths(this.calendar.activeDate, -1)\n : this._dateAdapter!.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? -1 : -YEARS_PER_PAGE,\n );\n }\n\n /** Handles user clicks on the next button. */\n nextClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter!.addCalendarMonths(this.calendar.activeDate, 1)\n : this._dateAdapter!.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? 1 : YEARS_PER_PAGE,\n );\n }\n\n /** Whether the previous period button is enabled. */\n previousEnabled(): boolean {\n if (!this.calendar.minDate) {\n return true;\n }\n return (\n !this.calendar.minDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.minDate)\n );\n }\n\n /** Whether the next period button is enabled. */\n nextEnabled(): boolean {\n return (\n !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate)\n );\n }\n\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n private _isSameView(date1: D, date2: D): boolean {\n if (this.calendar.currentView == 'month') {\n return (\n this._dateAdapter!.getYear(date1) ==\n this._dateAdapter!.getYear(date2) &&\n this._dateAdapter!.getMonth(date1) == this._dateAdapter!.getMonth(date2)\n );\n }\n if (this.calendar.currentView == 'year') {\n return (\n this._dateAdapter!.getYear(date1) == this._dateAdapter!.getYear(date2)\n );\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(\n this._dateAdapter!,\n date1,\n date2,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n }\n\n /**\n * Format two individual labels for the minimum year and maximum year available in the multi-year\n * calendar view. Returns an array of two strings where the first string is the formatted label\n * for the minimum year, and the second string is the formatted label for the maximum year.\n */\n private _formatMinAndMaxYearLabels(): [\n minYearLabel: string,\n maxYearLabel: string,\n ] {\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter!.getYear(this.calendar.activeDate);\n const minYearOfPage =\n activeYear -\n getActiveOffset(\n this._dateAdapter!,\n this.calendar.activeDate,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n const maxYearOfPage = minYearOfPage + YEARS_PER_PAGE - 1;\n const minYearLabel = this._dateAdapter!.getYearName(\n this._dateAdapter!.createDate(minYearOfPage, 0, 1),\n );\n const maxYearLabel = this._dateAdapter!.getYearName(\n this._dateAdapter!.createDate(maxYearOfPage, 0, 1),\n );\n\n return [minYearLabel, maxYearLabel];\n }\n\n private _id = `mat-calendar-header-${calendarHeaderId++}`;\n\n _periodButtonLabelId = `${this._id}-period-label`;\n}\n\nfunction isSameMultiYearView<D>(\n dateAdapter: DateAdapter<D>,\n date1: D,\n date2: D,\n minDate: D | null,\n maxDate: D | null,\n): boolean {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return (\n Math.floor((year1 - startingYear) / YEARS_PER_PAGE) ===\n Math.floor((year2 - startingYear) / YEARS_PER_PAGE)\n );\n}\n\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear<D>(\n dateAdapter: DateAdapter<D>,\n minDate: D | null,\n maxDate: D | null,\n): number {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - YEARS_PER_PAGE + 1;\n } else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nfunction getActiveOffset<D>(\n dateAdapter: DateAdapter<D>,\n activeDate: D,\n minDate: D | null,\n maxDate: D | null,\n): number {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo(\n activeYear - getStartingYear(dateAdapter, minDate, maxDate),\n YEARS_PER_PAGE,\n );\n}\n\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo(a: number, b: number): number {\n return ((a % b) + b) % b;\n}\n","<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button\n mat-button\n type=\"button\"\n class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\"\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n aria-live=\"polite\"\n >\n <span aria-hidden=\"true\">{{ periodButtonText }}</span>\n <svg\n class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n <polygon points=\"0,0 5,5 10,0\" />\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content />\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\"\n [matTooltip]=\"'Previous Month' | translate\"\n >\n <mat-icon>keyboard_arrow_left</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"setToday()\"\n [attr.aria-label]=\"'Today' | translate\"\n [matTooltip]=\"'Today' | translate\"\n >\n <mat-icon>today</mat-icon>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\"\n [matTooltip]=\"'Next Month' | translate\"\n >\n <mat-icon>keyboard_arrow_right</mat-icon>\n </button>\n </div>\n</div>\n","/*\n * Public API Surface of mat-file upload\n */\n\nexport * from './src/onemrva-mat-datepicker-header.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA,MAAM,cAAc,GAAG,EAAE;AACzB,IAAI,gBAAgB,GAAG,CAAC;MAWX,mCAAmC,CAAA;AAThD,IAAA,WAAA,GAAA;AAUU,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAiB,WAAW,CAAC;AACtC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAiB,WAAW,EAAE;AACzD,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA,CAAC;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAiB,gBAAgB,EAAE;AAC9D,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA,CAAC;AA+LM,QAAA,IAAA,CAAA,GAAG,GAAG,CAAA,oBAAA,EAAuB,gBAAgB,EAAE,EAAE;AAEzD,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,eAAe;AAClD,IAAA;IAhMC,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AACxD,YAAA,IAAI,CAAC,QAA6C,CAAC,eAAe,CACjE,QAAQ,CAAC,GAAG,EAAE,EACd,OAAO,CACR;QACH;aAAO;YACJ,IAAI,CAAC,QAAyC,CAAC,eAAe,CAC7D,IAAI,IAAI,EAAE,EACV,OAAO,CACR;QACH;IACF;;AAGA,IAAA,IAAI,gBAAgB,GAAA;AAClB,QAAA,IACE,IAAI,CAAC,QAAQ,CAAC,UAAU,KAAK,IAAI;AACjC,YAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,OAAO;AACpC,YAA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EAC3D,cAAc,CACf;AACH;AAEA;AACA,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS,EAAA;IAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1B;;AE7RA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import * as i1 from '@angular/material/button';
|
|
|
5
5
|
import { MatButtonModule } from '@angular/material/button';
|
|
6
6
|
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
7
7
|
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
-
import { TranslatePipe, TranslateService,
|
|
8
|
+
import { TranslatePipe, TranslateService, TranslateDirective } from '@ngx-translate/core';
|
|
9
9
|
import { MatProgressBar } from '@angular/material/progress-bar';
|
|
10
10
|
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
11
11
|
import { BehaviorSubject, of, interval, take, map, catchError, tap, mergeMap, withLatestFrom, filter, throttle, takeWhile, switchMap, forkJoin, merge, Subject } from 'rxjs';
|
|
@@ -753,7 +753,8 @@ class OnemrvaMatFileUploadModule {
|
|
|
753
753
|
MatButtonModule,
|
|
754
754
|
MatTooltipModule,
|
|
755
755
|
MatDialogModule,
|
|
756
|
-
|
|
756
|
+
TranslatePipe,
|
|
757
|
+
TranslateDirective,
|
|
757
758
|
MatIconModule,
|
|
758
759
|
MatInputModule], exports: [OnemrvaFilePanelComponent, OnemrvaMatFileUploadComponent, DndDirective] }); }
|
|
759
760
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatFileUploadModule, providers: [OnemrvaMatFileUploadStore, OnemrvaMatFileUploadService], imports: [components,
|
|
@@ -762,7 +763,6 @@ class OnemrvaMatFileUploadModule {
|
|
|
762
763
|
MatButtonModule,
|
|
763
764
|
MatTooltipModule,
|
|
764
765
|
MatDialogModule,
|
|
765
|
-
TranslateModule,
|
|
766
766
|
MatIconModule,
|
|
767
767
|
MatInputModule] }); }
|
|
768
768
|
}
|
|
@@ -778,7 +778,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
778
778
|
MatButtonModule,
|
|
779
779
|
MatTooltipModule,
|
|
780
780
|
MatDialogModule,
|
|
781
|
-
|
|
781
|
+
TranslatePipe,
|
|
782
|
+
TranslateDirective,
|
|
782
783
|
MatIconModule,
|
|
783
784
|
MatInputModule,
|
|
784
785
|
],
|