@siemens/element-ng 49.14.0 → 51.0.0-rc.5
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 +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +58 -40
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +83 -53
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +176 -166
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +21 -17
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +57 -33
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +181 -117
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +39 -25
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +26 -17
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +56 -35
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +36 -27
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +335 -221
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +376 -244
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +22 -17
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +105 -91
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +251 -153
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +345 -113
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +222 -316
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +40 -30
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +25 -25
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +120 -74
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +76 -56
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +46 -63
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +47 -30
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-maplibre.mjs +42 -0
- package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +14 -11
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +249 -204
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +120 -83
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +72 -45
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +40 -28
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +32 -23
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +123 -139
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +84 -51
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +35 -27
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +38 -31
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +218 -163
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +128 -86
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +21 -24
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +44 -29
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +273 -293
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +65 -51
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +26 -16
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +20 -17
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +73 -70
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +29 -6
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +60 -41
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +105 -82
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +24 -18
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +96 -75
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +76 -70
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/maplibre/package.json +4 -0
- package/maplibre/styles/_index.scss +1 -0
- package/maplibre/styles/maplibre-gl.scss +715 -0
- package/package.json +37 -23
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/migrate-split-sizes.js +105 -0
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +5 -3
- package/template-i18n.json +45 -47
- package/types/siemens-element-ng-application-header.d.ts +8 -28
- package/types/siemens-element-ng-breadcrumb.d.ts +1 -1
- package/types/siemens-element-ng-chat-messages.d.ts +11 -9
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-content-action-bar.d.ts +1 -1
- package/types/siemens-element-ng-dashboard.d.ts +2 -2
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +3 -14
- package/types/siemens-element-ng-electron-titlebar.d.ts +1 -1
- package/types/siemens-element-ng-file-uploader.d.ts +13 -31
- package/types/siemens-element-ng-filter-bar.d.ts +1 -1
- package/types/siemens-element-ng-filtered-search.d.ts +4 -4
- package/types/siemens-element-ng-form.d.ts +180 -44
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-ip-input.d.ts +1 -1
- package/types/siemens-element-ng-landing-page.d.ts +2 -2
- package/types/siemens-element-ng-loading-spinner.d.ts +7 -17
- package/types/siemens-element-ng-maplibre.d.ts +26 -0
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +86 -38
- package/types/siemens-element-ng-navbar-vertical.d.ts +1 -1
- package/types/siemens-element-ng-navbar.d.ts +3 -3
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-photo-upload.d.ts +4 -4
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-search-bar.d.ts +1 -1
- package/types/siemens-element-ng-select.d.ts +1 -1
- package/types/siemens-element-ng-side-panel.d.ts +3 -3
- package/types/siemens-element-ng-split.d.ts +99 -70
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-tabs.d.ts +1 -2
- package/types/siemens-element-ng-theme.d.ts +12 -2
- package/types/siemens-element-ng-threshold.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-tooltip.d.ts +7 -7
- package/types/siemens-element-ng-translate.d.ts +2 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-phone-number.mjs","sources":["../../../../projects/element-ng/phone-number/si-phone-number-input-select.directive.ts","../../../../projects/element-ng/phone-number/si-phone-number-input.component.ts","../../../../projects/element-ng/phone-number/si-phone-number-input.component.html","../../../../projects/element-ng/phone-number/si-phone-number-input.module.ts","../../../../projects/element-ng/phone-number/index.ts","../../../../projects/element-ng/phone-number/siemens-element-ng-phone-number.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\nimport {\n SiSelectSimpleOptionsDirective,\n SiSelectSingleValueDirective\n} from '@siemens/element-ng/select';\n\n/**\n * This directive provides the si-select options and value strategy for the phone number input.\n * As we don't use si-select directly, we need to provide these strategies manually.\n */\n@Directive({\n selector: '[siPhoneNumberInputSelect]',\n hostDirectives: [\n {\n directive: SiSelectSimpleOptionsDirective,\n inputs: ['options']\n },\n { directive: SiSelectSingleValueDirective, inputs: ['value'], outputs: ['valueChange'] }\n ]\n})\nexport class SiPhoneNumberInputSelectDirective {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { LowerCasePipe } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n LOCALE_ID,\n model,\n OnChanges,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { elementDown2 } from '@siemens/element-icons';\nimport { SI_FORM_ITEM_CONTROL, SiFormItemControl } from '@siemens/element-ng/form';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SelectOption, SiSelectListHasFilterComponent } from '@siemens/element-ng/select';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@siemens/element-translate-ng/translate';\nimport { PhoneNumber, PhoneNumberFormat, PhoneNumberUtil } from 'google-libphonenumber';\n\nimport { SiPhoneNumberInputSelectDirective } from './si-phone-number-input-select.directive';\nimport { CountryInfo, PhoneDetails } from './si-phone-number-input.models';\n\n@Component({\n selector: 'si-phone-number-input',\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n SiIconComponent,\n SiPhoneNumberInputSelectDirective,\n SiSelectListHasFilterComponent,\n SiTranslatePipe,\n LowerCasePipe\n ],\n templateUrl: './si-phone-number-input.component.html',\n styleUrl: './si-phone-number-input.component.scss',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: SiPhoneNumberInputComponent,\n multi: true\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiPhoneNumberInputComponent,\n multi: true\n },\n {\n provide: SI_FORM_ITEM_CONTROL,\n useExisting: SiPhoneNumberInputComponent\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'group',\n '[attr.aria-labelledby]': 'labelledby()',\n '[attr.id]': 'id()',\n '[class.disabled]': 'disabled()',\n '[class.readonly]': 'readonly()',\n '[class.country-focus]': 'countryFocused()'\n }\n})\nexport class SiPhoneNumberInputComponent\n implements ControlValueAccessor, Validator, OnChanges, SiFormItemControl\n{\n private static idCounter = 0;\n\n private phoneUtil = PhoneNumberUtil.getInstance();\n private translate = injectSiTranslateService();\n private locale = inject(LOCALE_ID).toString();\n private changeDetectorRef = inject(ChangeDetectorRef);\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Unique identifier.\n *\n * @defaultValue\n * ```\n * `__si-phone-number-input-${SiPhoneNumberInputComponent.idCounter++}`\n * ```\n */\n readonly id = input(`__si-phone-number-input-${SiPhoneNumberInputComponent.idCounter++}`);\n\n /**\n * ISO_3166-2 Code of the selected country.\n */\n readonly country = model<string>();\n\n /**\n * ISO_3166-2 Code of the country which shall be used on form-control reset.\n */\n readonly defaultCountry = input<string>();\n\n /**\n * Placeholder text for country search input.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_PLACEHOLDER:Search`)\n * ```\n */\n readonly placeholderForSearch = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_PLACEHOLDER:Search`)\n );\n /**\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_NO-RESULTS_FOUND:No results found`)\n * ```\n */\n readonly searchNoResultsFoundLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_NO-RESULTS_FOUND:No results found`)\n );\n /**\n * Text for the country dropdown aria-label attribute.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SELECT_COUNTRY:Select country`)\n * ```\n */\n readonly selectCountryAriaLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SELECT_COUNTRY:Select country`)\n );\n /**\n * Text for the phone number input aria-label attribute.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.PHONE_NUMBER_INPUT_LABEL:Enter phone number`)\n * ```\n */\n readonly phoneNumberAriaLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.PHONE_NUMBER_INPUT_LABEL:Enter phone number`)\n );\n /**\n * List of countries in ISO2 format, from which the user is allowed to select one.\n * If no values are provided, the dropdown will show all known countries.\n */\n readonly supportedCountries = input<readonly string[] | null>();\n\n /**\n * @defaultValue\n * ```\n * `${this.id()}-label`\n * ```\n */\n readonly labelledby = input(`${this.id()}-label`);\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n\n readonly valueChange = output<PhoneDetails>();\n\n /**\n * This ID will be bound to the `aria-describedby` attribute of the phone-number-input.\n * Use this to reference the element containing the error message(s) for the phone-number-input.\n * It will be picked by the {@link SiFormItemComponent} if the phone-number-input is used inside a form item.\n *\n * @defaultValue\n * ```\n * `${this.id()}-errormessage`\n * ```\n */\n readonly errormessageId = input(`${this.id()}-errormessage`);\n\n protected readonly phoneInput = viewChild.required<ElementRef<HTMLInputElement>>('phoneInput');\n protected readonly selectedCountry = signal<CountryInfo | undefined>(undefined);\n protected placeholder = '';\n protected readonly countryFocused = signal(false);\n protected open = false;\n protected overlayWidth = 0;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n protected readonly countryList = computed(() => {\n const countries = this.allowedCountries() ?? this.phoneUtil.getSupportedRegions();\n return countries\n .map((country: string) => {\n const countryInfo: CountryInfo = {\n name: this.getCountryName(country),\n countryCode: this.phoneUtil.getCountryCodeForRegion(country),\n isoCode: country\n };\n return {\n type: 'option',\n value: countryInfo,\n label: `${countryInfo.name} +${countryInfo.countryCode}`,\n typeaheadLabel: `${countryInfo.name} +${countryInfo.countryCode}`\n } as SelectOption<CountryInfo>;\n })\n .sort((a, b) => a.value.name.localeCompare(b.value.name));\n });\n protected readonly icons = addIcons({ elementDown2 });\n private readonly allowedCountries = computed(\n () => this.supportedCountries() ?? this.phoneUtil.getSupportedRegions()\n );\n private readonly disabledNgControl = signal(false);\n private isValidNumber = true;\n private readonly phoneNumber = signal<PhoneNumber | undefined>(undefined, {\n equal: (a, b) => {\n if (!a || !b) {\n return !a && !b;\n }\n return this.phoneUtil.isNumberMatch(a, b) === PhoneNumberUtil.MatchType.EXACT_MATCH;\n }\n });\n private onChange: (val: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.country) {\n this.writeCountry();\n }\n }\n\n /** @internal */\n writeValue(value: string | undefined): void {\n const phoneNumber = this.parseNumber(value);\n this.phoneNumber.set(phoneNumber);\n if (phoneNumber) {\n this.writeValueToInput();\n this.country.set(this.getRegionCode());\n } else {\n // Number could not be parsed, write raw value instead to handle cases like undefined\n this.writeTextToInput(value);\n this.country.set(this.defaultCountry() ?? this.country());\n }\n this.writeCountry();\n this.changeDetectorRef.markForCheck();\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n\n /** @internal */\n validate(control: AbstractControl): ValidationErrors | null {\n if (!this.phoneInput().nativeElement.value) {\n return null;\n }\n\n this.isValidNumber = false;\n const phoneNumber = this.phoneNumber();\n if (!phoneNumber || !this.phoneUtil.isValidNumber(phoneNumber)) {\n return {\n invalidPhoneNumberFormat: true\n };\n }\n\n if (!this.countryList().some(c => c.value.isoCode === this.selectedCountry()!.isoCode)) {\n return {\n notSupportedPhoneNumberCountry: true\n };\n }\n\n this.isValidNumber = true;\n return null;\n }\n\n protected input(): void {\n const rawNumber = this.phoneInput().nativeElement.value;\n const phoneNumber = this.parseNumber(rawNumber);\n this.phoneNumber.set(phoneNumber);\n\n if (phoneNumber) {\n const regionCode = this.getRegionCode();\n let countryInfo = this.countryList().find(\n country => regionCode === country.value.isoCode\n )?.value;\n if (!countryInfo && regionCode) {\n countryInfo = {\n name: this.getCountryName(regionCode),\n countryCode: phoneNumber.getCountryCode()!,\n isoCode: regionCode\n };\n }\n if (countryInfo && this.selectedCountry()?.isoCode !== countryInfo.isoCode) {\n this.selectedCountry.set(countryInfo);\n }\n } else if (rawNumber.trim().startsWith('+')) {\n this.selectedCountry.set(undefined);\n }\n\n this.handleChange();\n }\n\n protected blur(): void {\n this.countryFocused.set(false);\n this.onTouched();\n this.writeValueToInput();\n }\n\n protected countryInput(num: CountryInfo): void {\n this.selectedCountry.set(num);\n this.updatePlaceholder();\n this.refreshValueAfterCountryChange();\n this.handleChange();\n }\n\n protected openOverlay(): void {\n if (!this.readonly()) {\n this.open = true;\n this.overlayWidth = this.elementRef.nativeElement.getBoundingClientRect().width + 2; // 2px border\n }\n }\n\n protected overlayDetach(): void {\n this.open = false;\n this.phoneInput().nativeElement.focus();\n }\n\n private writeCountry(): void {\n const currentCountry = this.country()!;\n this.selectedCountry.set(\n this.countryList().find(country => country.value.isoCode === currentCountry)?.value\n );\n if (!this.selectedCountry()) {\n const countryCode = this.phoneUtil.getCountryCodeForRegion(\n currentCountry ?? this.defaultCountry() ?? 'XX'\n );\n if (countryCode) {\n this.selectedCountry.set({\n isoCode: currentCountry,\n countryCode,\n name: this.getCountryName(currentCountry)\n });\n }\n }\n this.updatePlaceholder();\n this.refreshValueAfterCountryChange();\n }\n\n private getCountryName(countryCode: string): string {\n // This auto translates the given country name to the selected locale language\n return (\n new Intl.DisplayNames([this.translate.currentLanguage ?? this.locale], { type: 'region' }).of(\n countryCode.toUpperCase()\n ) ?? ''\n );\n }\n\n private updatePlaceholder(): void {\n const selectedCountry = this.selectedCountry();\n if (selectedCountry) {\n this.placeholder = this.phoneUtil\n .format(\n this.phoneUtil.getExampleNumber(selectedCountry.isoCode),\n PhoneNumberFormat.NATIONAL\n )\n .replace(/^0/, '');\n }\n }\n\n private parseNumber(rawNumber: string | undefined): PhoneNumber | undefined {\n try {\n let regionCodeForParsing: string | undefined;\n if (!rawNumber?.trim().startsWith('+')) {\n regionCodeForParsing = this.selectedCountry()?.isoCode;\n }\n return this.phoneUtil.parse(rawNumber, regionCodeForParsing);\n } catch (e) {\n // The Number is too short, we cannot parse it yet. Error can be ignored. Hopefully, the user enters more digits.\n return;\n }\n }\n\n /**\n * PhoneUtil does not resolve country code early enough when the national prefix is shared among other countries (+1 and +44).\n * This Method fakes a complete number to force PhoneUtil returning a proper region code.\n */\n private getRegionCode(): string | undefined {\n const phoneNumber = this.phoneNumber();\n if (phoneNumber) {\n const regionCode = this.phoneUtil.getRegionCodeForNumber(phoneNumber);\n if (regionCode) {\n return regionCode;\n }\n\n const nationalNumber = phoneNumber.getNationalNumber() + '';\n if (\n // USA, CANADA, ...\n (phoneNumber.getCountryCode() === 1 && nationalNumber.length >= 3) ||\n // UK, ...\n (phoneNumber.getCountryCode() === 44 && nationalNumber.length >= 4)\n ) {\n return this.phoneUtil.getRegionCodeForNumber(\n this.phoneUtil.parse(\n '+' +\n phoneNumber.getCountryCode() +\n nationalNumber +\n new Array(10 - nationalNumber.length).fill(5).join('')\n )\n );\n }\n\n return this.phoneUtil.getRegionCodeForCountryCode(phoneNumber.getCountryCode()!);\n }\n\n return undefined;\n }\n\n private formatPhoneNumber(format: PhoneNumberFormat): string | undefined {\n const phoneNumber = this.phoneNumber();\n if (phoneNumber) {\n return this.phoneUtil.format(phoneNumber, format);\n }\n\n return undefined;\n }\n\n private handleChange(): void {\n const selectedCountry = this.selectedCountry();\n if (selectedCountry && this.country() !== selectedCountry.isoCode) {\n this.country.set(selectedCountry.isoCode);\n }\n\n if (this.phoneNumber()) {\n this.onChange(this.formatPhoneNumber(PhoneNumberFormat.INTERNATIONAL)!);\n } else {\n this.onChange('');\n }\n\n this.valueChange.emit({\n country: this.selectedCountry(),\n phoneNumber: this.formatPhoneNumber(PhoneNumberFormat.INTERNATIONAL),\n isValid: this.isValidNumber\n });\n }\n\n private writeTextToInput(value?: string): void {\n this.phoneInput().nativeElement.value = value ?? '';\n }\n /**\n * Format and update input text or clear input text if the input value is undefined.\n */\n private writeValueToInput(): void {\n if (this.phoneNumber()) {\n this.writeTextToInput(this.formatPhoneNumber(PhoneNumberFormat.NATIONAL)!.replace(/^0/, ''));\n }\n }\n\n private refreshValueAfterCountryChange(): void {\n const selectedCountry = this.selectedCountry();\n if (selectedCountry) {\n this.phoneNumber.update(current => {\n if (!current) {\n return undefined;\n }\n // TODO: Remove any once https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75189 is merged/released\n const phoneNumber = (current as any)?.clone();\n phoneNumber.setCountryCode(selectedCountry.countryCode);\n return phoneNumber;\n });\n this.writeValueToInput();\n }\n }\n}\n","<div\n class=\"btn-group w-100 d-flex shadow-none border-0\"\n [class.disabled]=\"disabled()\"\n [class.readonly]=\"readonly()\"\n [attr.aria-disabled]=\"disabled()\"\n>\n <button\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n siPhoneNumberInputSelect\n class=\"dropdown-toggle d-flex align-items-center ms-n4 my-n4 py-2 px-4 border-0\"\n type=\"button\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [disabled]=\"disabled()\"\n [class.readonly]=\"readonly()\"\n [attr.aria-labelledby]=\"id() + '-aria-label ' + id() + '-value'\"\n [attr.aria-expanded]=\"open\"\n [options]=\"countryList()\"\n [value]=\"selectedCountry()\"\n [tabindex]=\"disabled() ? '-1' : '0'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n (valueChange)=\"countryInput($event)\"\n (click)=\"openOverlay()\"\n (focus)=\"countryFocused.set(true)\"\n (blur)=\"countryFocused.set(false)\"\n >\n <span class=\"visually-hidden\" [id]=\"id() + '-aria-label'\">{{\n selectCountryAriaLabel() | translate\n }}</span>\n <span\n aria-hidden=\"true\"\n [class]=\"`fi fi-${(selectedCountry()?.isoCode | lowercase) ?? 'xx'}`\"\n ></span>\n @if (selectedCountry(); as selectedCountry) {\n <span class=\"si-body ms-4\" [id]=\"id() + '-value'\">\n <span class=\"visually-hidden\">{{ selectedCountry.name }}</span>\n +{{ selectedCountry.countryCode }}\n </span>\n }\n <si-icon class=\"icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayOffsetX]=\"-1\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n >\n <si-select-list-has-filter\n [baseId]=\"id()\"\n [filterPlaceholder]=\"placeholderForSearch()\"\n [noResultsFoundLabel]=\"searchNoResultsFoundLabel()\"\n [optionTemplate]=\"optionTemplate\"\n (closeOverlay)=\"overlayDetach()\"\n />\n </ng-template>\n <ng-template #optionTemplate let-option>\n <span aria-hidden=\"true\" [class]=\"`fi me-5 fi-${(option.value.isoCode | lowercase)}`\"></span>\n {{ option.value.name }} +{{ option.value.countryCode }}\n </ng-template>\n </button>\n <input\n #phoneInput\n type=\"tel\"\n class=\"ms-4 border-0 p-0 focus-none shadow-none flex-grow-1 phone-number\"\n [attr.aria-label]=\"phoneNumberAriaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"input()\"\n (blur)=\"blur()\"\n />\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiPhoneNumberInputComponent } from './si-phone-number-input.component';\n\n@NgModule({\n imports: [SiPhoneNumberInputComponent],\n exports: [SiPhoneNumberInputComponent]\n})\nexport class SiPhoneNumberInputModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-phone-number-input.module';\nexport * from './si-phone-number-input.component';\nexport * from './si-phone-number-input.models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAOH;;;AAGG;MAWU,iCAAiC,CAAA;uGAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjC,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EA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,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhM/F;;;AAGG;MASU,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAxB,wBAAwB,EAAA,OAAA,EAAA,CAHzB,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAC3B,2BAA2B,CAAA,EAAA,CAAA;AAE1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAHzB,2BAA2B,CAAA,EAAA,CAAA;;2FAG1B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,2BAA2B,CAAC;oBACtC,OAAO,EAAE,CAAC,2BAA2B;AACtC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-phone-number.mjs","sources":["../../../../projects/element-ng/phone-number/si-phone-number-input-select.directive.ts","../../../../projects/element-ng/phone-number/si-phone-number-input.component.ts","../../../../projects/element-ng/phone-number/si-phone-number-input.component.html","../../../../projects/element-ng/phone-number/si-phone-number-input.module.ts","../../../../projects/element-ng/phone-number/index.ts","../../../../projects/element-ng/phone-number/siemens-element-ng-phone-number.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\nimport {\n SiSelectSimpleOptionsDirective,\n SiSelectSingleValueDirective\n} from '@siemens/element-ng/select';\n\n/**\n * This directive provides the si-select options and value strategy for the phone number input.\n * As we don't use si-select directly, we need to provide these strategies manually.\n */\n@Directive({\n selector: '[siPhoneNumberInputSelect]',\n hostDirectives: [\n {\n directive: SiSelectSimpleOptionsDirective,\n inputs: ['options']\n },\n { directive: SiSelectSingleValueDirective, inputs: ['value'], outputs: ['valueChange'] }\n ]\n})\nexport class SiPhoneNumberInputSelectDirective {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { LowerCasePipe } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n LOCALE_ID,\n model,\n OnChanges,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { elementDown2 } from '@siemens/element-icons';\nimport { SI_FORM_ITEM_CONTROL, SiFormItemControl } from '@siemens/element-ng/form';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SelectOption, SiSelectListHasFilterComponent } from '@siemens/element-ng/select';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@siemens/element-translate-ng/translate';\nimport { PhoneNumber, PhoneNumberFormat, PhoneNumberUtil } from 'google-libphonenumber';\n\nimport { SiPhoneNumberInputSelectDirective } from './si-phone-number-input-select.directive';\nimport { CountryInfo, PhoneDetails } from './si-phone-number-input.models';\n\n@Component({\n selector: 'si-phone-number-input',\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n SiIconComponent,\n SiPhoneNumberInputSelectDirective,\n SiSelectListHasFilterComponent,\n SiTranslatePipe,\n LowerCasePipe\n ],\n templateUrl: './si-phone-number-input.component.html',\n styleUrl: './si-phone-number-input.component.scss',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: SiPhoneNumberInputComponent,\n multi: true\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiPhoneNumberInputComponent,\n multi: true\n },\n {\n provide: SI_FORM_ITEM_CONTROL,\n useExisting: SiPhoneNumberInputComponent\n }\n ],\n host: {\n 'role': 'group',\n '[attr.aria-labelledby]': 'labelledby()',\n '[attr.id]': 'id()',\n '[class.disabled]': 'disabled()',\n '[class.readonly]': 'readonly()',\n '[class.country-focus]': 'countryFocused()'\n }\n})\nexport class SiPhoneNumberInputComponent\n implements ControlValueAccessor, Validator, OnChanges, SiFormItemControl\n{\n private static idCounter = 0;\n\n private phoneUtil = PhoneNumberUtil.getInstance();\n private translate = injectSiTranslateService();\n private locale = inject(LOCALE_ID).toString();\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Unique identifier.\n *\n * @defaultValue\n * ```\n * `__si-phone-number-input-${SiPhoneNumberInputComponent.idCounter++}`\n * ```\n */\n readonly id = input(`__si-phone-number-input-${SiPhoneNumberInputComponent.idCounter++}`);\n\n /**\n * ISO_3166-2 Code of the selected country.\n */\n readonly country = model<string>();\n\n /**\n * ISO_3166-2 Code of the country which shall be used on form-control reset.\n */\n readonly defaultCountry = input<string>();\n\n /**\n * Placeholder text for country search input.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_PLACEHOLDER:Search`)\n * ```\n */\n readonly placeholderForSearch = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_PLACEHOLDER:Search`)\n );\n /**\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_NO-RESULTS_FOUND:No results found`)\n * ```\n */\n readonly searchNoResultsFoundLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_NO-RESULTS_FOUND:No results found`)\n );\n /**\n * Text for the country dropdown aria-label attribute.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SELECT_COUNTRY:Select country`)\n * ```\n */\n readonly selectCountryAriaLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.SELECT_COUNTRY:Select country`)\n );\n /**\n * Text for the phone number input aria-label attribute.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.PHONE_NUMBER_INPUT_LABEL:Enter phone number`)\n * ```\n */\n readonly phoneNumberAriaLabel = input(\n t(() => $localize`:@@SI_PHONE_NUMBER_INPUT.PHONE_NUMBER_INPUT_LABEL:Enter phone number`)\n );\n /**\n * List of countries in ISO2 format, from which the user is allowed to select one.\n * If no values are provided, the dropdown will show all known countries.\n */\n readonly supportedCountries = input<readonly string[] | null>();\n\n /**\n * @defaultValue\n * ```\n * `${this.id()}-label`\n * ```\n */\n readonly labelledby = input(`${this.id()}-label`);\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n\n readonly valueChange = output<PhoneDetails>();\n\n /**\n * This ID will be bound to the `aria-describedby` attribute of the phone-number-input.\n * Use this to reference the element containing the error message(s) for the phone-number-input.\n * It will be picked by the {@link SiFormItemComponent} if the phone-number-input is used inside a form item.\n *\n * @defaultValue\n * ```\n * `${this.id()}-errormessage`\n * ```\n */\n readonly errormessageId = input(`${this.id()}-errormessage`);\n\n protected readonly phoneInput = viewChild.required<ElementRef<HTMLInputElement>>('phoneInput');\n protected readonly countryFocused = signal(false);\n protected readonly open = signal(false);\n protected overlayWidth = 0;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n protected readonly phoneInputValue = signal('');\n protected readonly countryList = computed(() => {\n const countries = this.allowedCountries() ?? this.phoneUtil.getSupportedRegions();\n return countries\n .map((country: string) => {\n const countryInfo: CountryInfo = {\n name: this.getCountryName(country),\n countryCode: this.phoneUtil.getCountryCodeForRegion(country),\n isoCode: country\n };\n return {\n type: 'option',\n value: countryInfo,\n label: `${countryInfo.name} +${countryInfo.countryCode}`,\n typeaheadLabel: `${countryInfo.name} +${countryInfo.countryCode}`\n } as SelectOption<CountryInfo>;\n })\n .sort((a, b) => a.value.name.localeCompare(b.value.name));\n });\n protected readonly selectedCountry = computed(() => {\n const currentCountry = this.country();\n if (!currentCountry) {\n return undefined;\n }\n\n const selectedCountry = this.countryList().find(\n country => country.value.isoCode === currentCountry\n )?.value;\n if (selectedCountry) {\n return selectedCountry;\n }\n\n const countryCode = this.phoneUtil.getCountryCodeForRegion(currentCountry);\n if (!countryCode) {\n return undefined;\n }\n\n return {\n isoCode: currentCountry,\n countryCode,\n name: this.getCountryName(currentCountry)\n };\n });\n protected readonly placeholder = computed(() => {\n const selectedCountry = this.selectedCountry();\n if (!selectedCountry) {\n return '';\n }\n\n return this.phoneUtil\n .format(this.phoneUtil.getExampleNumber(selectedCountry.isoCode), PhoneNumberFormat.NATIONAL)\n .replace(/^0/, '');\n });\n protected readonly icons = addIcons({ elementDown2 });\n private readonly allowedCountries = computed(\n () => this.supportedCountries() ?? this.phoneUtil.getSupportedRegions()\n );\n private readonly disabledNgControl = signal(false);\n private isValidNumber = true;\n private readonly phoneNumber = computed(() => this.parseNumber(this.phoneInputValue()));\n private onChange: (val: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.country) {\n this.refreshValueAfterCountryChange();\n }\n }\n\n /** @internal */\n writeValue(value: string | undefined): void {\n const phoneNumber = this.parseNumber(value);\n if (phoneNumber) {\n this.country.set(this.getRegionCode(phoneNumber));\n this.phoneInputValue.set(\n this.phoneUtil.format(phoneNumber, PhoneNumberFormat.NATIONAL).replace(/^0/, '')\n );\n } else {\n // Number could not be parsed, write raw value instead to handle cases like undefined\n this.phoneInputValue.set(value ?? '');\n this.country.set(this.defaultCountry() ?? this.country());\n }\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n\n /** @internal */\n validate(control: AbstractControl): ValidationErrors | null {\n if (!this.phoneInputValue()) {\n return null;\n }\n\n this.isValidNumber = false;\n const phoneNumber = this.phoneNumber();\n if (!phoneNumber || !this.phoneUtil.isValidNumber(phoneNumber)) {\n return {\n invalidPhoneNumberFormat: true\n };\n }\n\n if (!this.countryList().some(c => c.value.isoCode === this.selectedCountry()!.isoCode)) {\n return {\n notSupportedPhoneNumberCountry: true\n };\n }\n\n this.isValidNumber = true;\n return null;\n }\n\n protected input(event: Event): void {\n const rawNumber = (event.target as HTMLInputElement).value;\n this.phoneInputValue.set(rawNumber);\n const phoneNumber = this.phoneNumber();\n\n if (phoneNumber) {\n const regionCode = this.getRegionCode(phoneNumber);\n if (regionCode && this.country() !== regionCode) {\n this.country.set(regionCode);\n }\n } else if (rawNumber.trim().startsWith('+')) {\n this.country.set(undefined);\n }\n\n this.handleChange();\n }\n\n protected blur(): void {\n this.countryFocused.set(false);\n this.onTouched();\n this.writeValueToInput();\n }\n\n protected countryInput(num: CountryInfo): void {\n this.country.set(num.isoCode);\n this.refreshValueAfterCountryChange();\n this.handleChange();\n }\n\n protected openOverlay(): void {\n if (!this.readonly()) {\n this.open.set(true);\n this.overlayWidth = this.elementRef.nativeElement.getBoundingClientRect().width + 2; // 2px border\n }\n }\n\n protected overlayDetach(): void {\n this.open.set(false);\n this.phoneInput().nativeElement.focus();\n }\n\n private getCountryName(countryCode: string): string {\n // This auto translates the given country name to the selected locale language\n return (\n new Intl.DisplayNames([this.translate.currentLanguage ?? this.locale], {\n type: 'region'\n }).of(countryCode.toUpperCase()) ?? ''\n );\n }\n\n private parseNumber(rawNumber: string | undefined): PhoneNumber | undefined {\n try {\n let regionCodeForParsing: string | undefined;\n if (!rawNumber?.trim().startsWith('+')) {\n regionCodeForParsing = this.selectedCountry()?.isoCode;\n }\n return this.phoneUtil.parse(rawNumber, regionCodeForParsing);\n } catch (e) {\n // The Number is too short, we cannot parse it yet. Error can be ignored. Hopefully, the user enters more digits.\n return;\n }\n }\n\n /**\n * PhoneUtil does not resolve country code early enough when the national prefix is shared among other countries (+1 and +44).\n * This Method fakes a complete number to force PhoneUtil returning a proper region code.\n */\n private getRegionCode(phoneNumber: PhoneNumber): string | undefined {\n const regionCode = this.phoneUtil.getRegionCodeForNumber(phoneNumber);\n if (regionCode) {\n return regionCode;\n }\n\n const nationalNumber = phoneNumber.getNationalNumber() + '';\n if (\n // USA, CANADA, ...\n (phoneNumber.getCountryCode() === 1 && nationalNumber.length >= 3) ||\n // UK, ...\n (phoneNumber.getCountryCode() === 44 && nationalNumber.length >= 4)\n ) {\n return this.phoneUtil.getRegionCodeForNumber(\n this.phoneUtil.parse(\n '+' +\n phoneNumber.getCountryCode() +\n nationalNumber +\n new Array(10 - nationalNumber.length).fill(5).join('')\n )\n );\n }\n\n return this.phoneUtil.getRegionCodeForCountryCode(phoneNumber.getCountryCode()!);\n }\n\n private formatPhoneNumber(format: PhoneNumberFormat): string | undefined {\n const phoneNumber = this.phoneNumber();\n if (phoneNumber) {\n return this.phoneUtil.format(phoneNumber, format);\n }\n\n return undefined;\n }\n\n private handleChange(): void {\n const phoneNumber = this.formatPhoneNumber(PhoneNumberFormat.INTERNATIONAL);\n this.onChange(phoneNumber ?? '');\n\n this.valueChange.emit({\n country: this.selectedCountry(),\n phoneNumber,\n isValid: this.isValidNumber\n });\n }\n\n /**\n * Format and update input text or clear input text if the input value is undefined.\n */\n private writeValueToInput(): void {\n if (this.phoneNumber()) {\n this.phoneInputValue.set(\n this.formatPhoneNumber(PhoneNumberFormat.NATIONAL)!.replace(/^0/, '')\n );\n }\n }\n\n private refreshValueAfterCountryChange(): void {\n const selectedCountry = this.selectedCountry();\n if (selectedCountry) {\n this.writeValueToInput();\n }\n }\n}\n","<div\n class=\"btn-group w-100 d-flex shadow-none border-0\"\n [class.disabled]=\"disabled()\"\n [class.readonly]=\"readonly()\"\n [attr.aria-disabled]=\"disabled()\"\n>\n <button\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n siPhoneNumberInputSelect\n class=\"dropdown-toggle d-flex align-items-center ms-n4 my-n4 py-2 px-4 border-0\"\n type=\"button\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [disabled]=\"disabled()\"\n [class.readonly]=\"readonly()\"\n [attr.aria-labelledby]=\"id() + '-aria-label ' + id() + '-value'\"\n [attr.aria-expanded]=\"open()\"\n [options]=\"countryList()\"\n [value]=\"selectedCountry()\"\n [tabindex]=\"disabled() ? '-1' : '0'\"\n [attr.aria-controls]=\"id() + '-listbox'\"\n (valueChange)=\"countryInput($event)\"\n (click)=\"openOverlay()\"\n (focus)=\"countryFocused.set(true)\"\n (blur)=\"countryFocused.set(false)\"\n >\n <span class=\"visually-hidden\" [id]=\"id() + '-aria-label'\">{{\n selectCountryAriaLabel() | translate\n }}</span>\n <span\n aria-hidden=\"true\"\n [class]=\"`fi fi-${(selectedCountry()?.isoCode | lowercase) ?? 'xx'}`\"\n ></span>\n @if (selectedCountry(); as selectedCountry) {\n <span class=\"si-body ms-4\" [id]=\"id() + '-value'\">\n <span class=\"visually-hidden\">{{ selectedCountry.name }}</span>\n +{{ selectedCountry.countryCode }}\n </span>\n }\n <si-icon class=\"icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n\n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayOffsetX]=\"-1\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n >\n <si-select-list-has-filter\n [baseId]=\"id()\"\n [filterPlaceholder]=\"placeholderForSearch()\"\n [noResultsFoundLabel]=\"searchNoResultsFoundLabel()\"\n [optionTemplate]=\"optionTemplate\"\n (closeOverlay)=\"overlayDetach()\"\n />\n </ng-template>\n <ng-template #optionTemplate let-option>\n <span aria-hidden=\"true\" [class]=\"`fi me-5 fi-${(option.value.isoCode | lowercase)}`\"></span>\n {{ option.value.name }} +{{ option.value.countryCode }}\n </ng-template>\n </button>\n <input\n #phoneInput\n type=\"tel\"\n class=\"ms-4 border-0 p-0 focus-none shadow-none flex-grow-1 phone-number\"\n [value]=\"phoneInputValue()\"\n [attr.aria-label]=\"phoneNumberAriaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"input($event)\"\n (blur)=\"blur()\"\n />\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiPhoneNumberInputComponent } from './si-phone-number-input.component';\n\n@NgModule({\n imports: [SiPhoneNumberInputComponent],\n exports: [SiPhoneNumberInputComponent]\n})\nexport class SiPhoneNumberInputModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-phone-number-input.module';\nexport * from './si-phone-number-input.component';\nexport * from './si-phone-number-input.models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAOH;;;AAGG;MAWU,iCAAiC,CAAA;uGAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjC,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,MAAA,EAAA,CAAA,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AAA,MAAM,EAAE,OAAO;AACf,wBAAA,wBAAwB,EAAE,cAAc;AACxC,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,uBAAuB,EAAE;AAC1B,qBAAA,EAAA,QAAA,EAAA,48FAAA,EAAA,MAAA,EAAA,CAAA,0iCAAA,CAAA,EAAA;s8CA6GgF,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5L/F;;;AAGG;MASU,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAxB,wBAAwB,EAAA,OAAA,EAAA,CAHzB,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAC3B,2BAA2B,CAAA,EAAA,CAAA;AAE1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAHzB,2BAA2B,CAAA,EAAA,CAAA;;2FAG1B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,2BAA2B,CAAC;oBACtC,OAAO,EAAE,CAAC,2BAA2B;AACtC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Component, input, booleanAttribute, model, viewChild, signal, computed, inject } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
5
|
import { elementStateExclamationMark, elementCircleFilled, elementCancel } from '@siemens/element-icons';
|
|
@@ -15,12 +15,12 @@ import { ImageCropperComponent } from 'ngx-image-cropper';
|
|
|
15
15
|
* SPDX-License-Identifier: MIT
|
|
16
16
|
*/
|
|
17
17
|
class SiImageCropperStyleComponent {
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiImageCropperStyleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: SiImageCropperStyleComponent, isStandalone: true, selector: "si-image-cropper-style", ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host ::ng-deep image-cropper{max-block-size:70vb;--image-cropper-outline-color: var(--element-base-translucent-1);--cropper-outline-color: var(--image-cropper-outline-color);--cropper-overlay-color: var(--element-ui-5)}:host ::ng-deep image-cropper .ngx-ic-square{background:var(--element-ui-0)!important}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper{outline:2px solid var(--element-ui-0)!important}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper:after{z-index:0;border:unset;box-shadow:0 0 0 9999px var(--cropper-outline-color)}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper .ngx-ic-move.ngx-ic-move{position:relative;overflow:hidden;border:0}\n"] });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiImageCropperStyleComponent, decorators: [{
|
|
22
22
|
type: Component,
|
|
23
|
-
args: [{ selector: 'si-image-cropper-style', template: '<ng-content />',
|
|
23
|
+
args: [{ selector: 'si-image-cropper-style', template: '<ng-content />', styles: [":host ::ng-deep image-cropper{max-block-size:70vb;--image-cropper-outline-color: var(--element-base-translucent-1);--cropper-outline-color: var(--image-cropper-outline-color);--cropper-overlay-color: var(--element-ui-5)}:host ::ng-deep image-cropper .ngx-ic-square{background:var(--element-ui-0)!important}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper{outline:2px solid var(--element-ui-0)!important}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper:after{z-index:0;border:unset;box-shadow:0 0 0 9999px var(--cropper-outline-color)}:host ::ng-deep image-cropper .ngx-ic-cropper.ngx-ic-cropper .ngx-ic-move.ngx-ic-move{position:relative;overflow:hidden;border:0}\n"] }]
|
|
24
24
|
}] });
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -41,13 +41,13 @@ class SiPhotoUploadComponent {
|
|
|
41
41
|
*
|
|
42
42
|
* @defaultValue false
|
|
43
43
|
*/
|
|
44
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
44
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
45
45
|
/**
|
|
46
46
|
* Optionally disable image cropping.
|
|
47
47
|
*
|
|
48
48
|
* @defaultValue false
|
|
49
49
|
*/
|
|
50
|
-
disabledCropping = input(false, { ...(ngDevMode ? { debugName: "disabledCropping" } : {}), transform: booleanAttribute });
|
|
50
|
+
disabledCropping = input(false, { ...(ngDevMode ? { debugName: "disabledCropping" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
51
51
|
/**
|
|
52
52
|
* Accepted image formats for the file selection dialog.
|
|
53
53
|
*
|
|
@@ -57,13 +57,15 @@ class SiPhotoUploadComponent {
|
|
|
57
57
|
*
|
|
58
58
|
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept
|
|
59
59
|
*/
|
|
60
|
-
acceptedUploadFormats = input('.png, .jpg, .jpeg',
|
|
60
|
+
acceptedUploadFormats = input('.png, .jpg, .jpeg', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "acceptedUploadFormats" }] : /* istanbul ignore next */ []));
|
|
61
62
|
/**
|
|
62
63
|
* Maximum allowed file size of the uploaded file in kilobytes.
|
|
63
64
|
*
|
|
64
65
|
* @defaultValue 2048
|
|
65
66
|
*/
|
|
66
|
-
maxFileSize = input(2048,
|
|
67
|
+
maxFileSize = input(2048, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
|
|
67
69
|
/**
|
|
68
70
|
* If the uploaded file is of an unsupported type, this
|
|
69
71
|
* error message will be displayed to the user.
|
|
@@ -73,30 +75,34 @@ class SiPhotoUploadComponent {
|
|
|
73
75
|
* t(() => $localize`:@@SI_PHOTO_UPLOAD.ERROR_FILE_TYPE:The image file is not valid. Please upload a PNG or JP(E)G.`)
|
|
74
76
|
* ```
|
|
75
77
|
*/
|
|
76
|
-
uploadErrorWrongType = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.ERROR_FILE_TYPE:The image file is not valid. Please upload a PNG or JP(E)G.`),
|
|
78
|
+
uploadErrorWrongType = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.ERROR_FILE_TYPE:The image file is not valid. Please upload a PNG or JP(E)G.`), /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "uploadErrorWrongType" }] : /* istanbul ignore next */ []));
|
|
77
80
|
/**
|
|
78
81
|
* If the uploaded file exceeds the allowed upload size, this
|
|
79
82
|
* error message will be displayed to the user.
|
|
80
83
|
*
|
|
81
84
|
* @defaultValue
|
|
82
85
|
* ```
|
|
83
|
-
* t(() => $localize`:@@SI_PHOTO_UPLOAD.ERROR_FILE_SIZE_EXCEEDED:
|
|
86
|
+
* t(() => $localize`:@@SI_PHOTO_UPLOAD.ERROR_FILE_SIZE_EXCEEDED:Current file size of {{mb}} MB exceeds file size of max. {{maxSizeMb}} MB`)
|
|
84
87
|
* ```
|
|
85
88
|
*/
|
|
86
|
-
uploadErrorTooBig = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.ERROR_FILE_SIZE_EXCEEDED:
|
|
89
|
+
uploadErrorTooBig = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.ERROR_FILE_SIZE_EXCEEDED:Current file size of {{mb}} MB exceeds file size of max. {{maxSizeMb}} MB`), /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "uploadErrorTooBig" }] : /* istanbul ignore next */ []));
|
|
87
91
|
/**
|
|
88
92
|
* Alternative text for the photo.
|
|
89
93
|
*
|
|
90
94
|
* @defaultValue ''
|
|
91
95
|
*/
|
|
92
|
-
photoAltText = input('',
|
|
96
|
+
photoAltText = input('', /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "photoAltText" }] : /* istanbul ignore next */ []));
|
|
93
98
|
/**
|
|
94
99
|
* Alternative text for the photo´s placeholder.
|
|
95
100
|
* The value will be used to calculate the background color when `autoColor` is true.
|
|
96
101
|
*
|
|
97
102
|
* @defaultValue ''
|
|
98
103
|
*/
|
|
99
|
-
placeholderAltText = input('',
|
|
104
|
+
placeholderAltText = input('', /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "placeholderAltText" }] : /* istanbul ignore next */ []));
|
|
100
106
|
/**
|
|
101
107
|
* Text for the button changing the photo.
|
|
102
108
|
*
|
|
@@ -105,25 +111,28 @@ class SiPhotoUploadComponent {
|
|
|
105
111
|
* t(() => $localize`:@@SI_PHOTO_UPLOAD.CHANGE_PHOTO:Change`)
|
|
106
112
|
* ```
|
|
107
113
|
*/
|
|
108
|
-
changePhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CHANGE_PHOTO:Change`),
|
|
114
|
+
changePhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CHANGE_PHOTO:Change`), /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "changePhotoText" }] : /* istanbul ignore next */ []));
|
|
109
116
|
/**
|
|
110
117
|
* Cropper frame aria label.
|
|
111
118
|
*
|
|
112
119
|
* @defaultValue
|
|
113
120
|
* ```
|
|
114
|
-
* t(() => $localize`:@@SI_PHOTO_UPLOAD.CROPPER_FRAME_LABEL:Crop
|
|
121
|
+
* t(() => $localize`:@@SI_PHOTO_UPLOAD.CROPPER_FRAME_LABEL:Crop picture`)
|
|
115
122
|
* ```
|
|
116
123
|
*/
|
|
117
|
-
cropperFrameAriaLabel = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CROPPER_FRAME_LABEL:Crop
|
|
124
|
+
cropperFrameAriaLabel = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CROPPER_FRAME_LABEL:Crop picture`), /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "cropperFrameAriaLabel" }] : /* istanbul ignore next */ []));
|
|
118
126
|
/**
|
|
119
127
|
* Text for the button uploading a photo.
|
|
120
128
|
*
|
|
121
129
|
* @defaultValue
|
|
122
130
|
* ```
|
|
123
|
-
* t(() => $localize`:@@SI_PHOTO_UPLOAD.UPLOAD_PHOTO:Upload
|
|
131
|
+
* t(() => $localize`:@@SI_PHOTO_UPLOAD.UPLOAD_PHOTO:Upload picture`)
|
|
124
132
|
* ```
|
|
125
133
|
*/
|
|
126
|
-
uploadPhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.UPLOAD_PHOTO:Upload
|
|
134
|
+
uploadPhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.UPLOAD_PHOTO:Upload picture`), /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "uploadPhotoText" }] : /* istanbul ignore next */ []));
|
|
127
136
|
/**
|
|
128
137
|
* Text for the button removing the photo.
|
|
129
138
|
*
|
|
@@ -132,7 +141,8 @@ class SiPhotoUploadComponent {
|
|
|
132
141
|
* t(() => $localize`:@@SI_PHOTO_UPLOAD.REMOVE:Remove`)
|
|
133
142
|
* ```
|
|
134
143
|
*/
|
|
135
|
-
removePhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.REMOVE:Remove`),
|
|
144
|
+
removePhotoText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.REMOVE:Remove`), /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "removePhotoText" }] : /* istanbul ignore next */ []));
|
|
136
146
|
/**
|
|
137
147
|
* Text for the button cancelling the editing process.
|
|
138
148
|
*
|
|
@@ -141,7 +151,8 @@ class SiPhotoUploadComponent {
|
|
|
141
151
|
* t(() => $localize`:@@SI_PHOTO_UPLOAD.CANCEL:Cancel`)
|
|
142
152
|
* ```
|
|
143
153
|
*/
|
|
144
|
-
cancelEditText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CANCEL:Cancel`),
|
|
154
|
+
cancelEditText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.CANCEL:Cancel`), /* @ts-ignore */
|
|
155
|
+
...(ngDevMode ? [{ debugName: "cancelEditText" }] : /* istanbul ignore next */ []));
|
|
145
156
|
/**
|
|
146
157
|
* Text for the button applying the edited photo.
|
|
147
158
|
*
|
|
@@ -150,39 +161,44 @@ class SiPhotoUploadComponent {
|
|
|
150
161
|
* t(() => $localize`:@@SI_PHOTO_UPLOAD.APPLY_PHOTO:Apply`)
|
|
151
162
|
* ```
|
|
152
163
|
*/
|
|
153
|
-
applyEditText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.APPLY_PHOTO:Apply`),
|
|
164
|
+
applyEditText = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.APPLY_PHOTO:Apply`), /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "applyEditText" }] : /* istanbul ignore next */ []));
|
|
154
166
|
/**
|
|
155
167
|
* Text displayed as header of the editing modal.
|
|
156
168
|
*
|
|
157
169
|
* @defaultValue
|
|
158
170
|
* ```
|
|
159
|
-
* t(() => $localize`:@@SI_PHOTO_UPLOAD.MODAL_TITLE:
|
|
171
|
+
* t(() => $localize`:@@SI_PHOTO_UPLOAD.MODAL_TITLE:Profile picture`)
|
|
160
172
|
* ```
|
|
161
173
|
*/
|
|
162
|
-
modalHeader = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.MODAL_TITLE:
|
|
174
|
+
modalHeader = input(t(() => $localize `:@@SI_PHOTO_UPLOAD.MODAL_TITLE:Profile picture`), /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "modalHeader" }] : /* istanbul ignore next */ []));
|
|
163
176
|
/**
|
|
164
177
|
* Text displayed as description of the editing modal.
|
|
165
178
|
*/
|
|
166
|
-
modalDescription = input(
|
|
179
|
+
modalDescription = input(/* @ts-ignore */
|
|
180
|
+
...(ngDevMode ? [undefined, { debugName: "modalDescription" }] : /* istanbul ignore next */ []));
|
|
167
181
|
/**
|
|
168
182
|
* Output format of the edited image.
|
|
169
183
|
*
|
|
170
184
|
* @defaultValue 'jpeg'
|
|
171
185
|
*/
|
|
172
|
-
cropperImageFormat = input('jpeg',
|
|
186
|
+
cropperImageFormat = input('jpeg', /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "cropperImageFormat" }] : /* istanbul ignore next */ []));
|
|
173
188
|
/**
|
|
174
189
|
* The width / height ratio (e.g. 1 / 1 for a square, 4 / 3, 16 / 9 ...).
|
|
175
190
|
*
|
|
176
191
|
* @defaultValue 1
|
|
177
192
|
*/
|
|
178
|
-
cropperAspectRatio = input(1,
|
|
193
|
+
cropperAspectRatio = input(1, /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "cropperAspectRatio" }] : /* istanbul ignore next */ []));
|
|
179
195
|
/**
|
|
180
196
|
* Whether to keep the width and height of the cropped image equal according
|
|
181
197
|
* to the aspectRatio.
|
|
182
198
|
*
|
|
183
199
|
* @defaultValue true
|
|
184
200
|
*/
|
|
185
|
-
cropperMaintainAspectRatio = input(true, { ...(ngDevMode ? { debugName: "cropperMaintainAspectRatio" } : {}), transform: booleanAttribute });
|
|
201
|
+
cropperMaintainAspectRatio = input(true, { ...(ngDevMode ? { debugName: "cropperMaintainAspectRatio" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
186
202
|
/**
|
|
187
203
|
* When set to true, padding will be added around the image to make it fit to
|
|
188
204
|
* the aspect ratio. Be aware that this transformation will cause the loaded
|
|
@@ -190,14 +206,15 @@ class SiPhotoUploadComponent {
|
|
|
190
206
|
*
|
|
191
207
|
* @defaultValue false
|
|
192
208
|
*/
|
|
193
|
-
cropperContainWithinAspectRatio = input(false, { ...(ngDevMode ? { debugName: "cropperContainWithinAspectRatio" } : {}), transform: booleanAttribute });
|
|
209
|
+
cropperContainWithinAspectRatio = input(false, { ...(ngDevMode ? { debugName: "cropperContainWithinAspectRatio" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
194
210
|
/**
|
|
195
211
|
* The cropper´s width cannot be made smaller than this number of pixels
|
|
196
212
|
* (relative to original image´s size). (0 = disabled).
|
|
197
213
|
*
|
|
198
214
|
* @defaultValue 50
|
|
199
215
|
*/
|
|
200
|
-
cropperMinWidth = input(50,
|
|
216
|
+
cropperMinWidth = input(50, /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "cropperMinWidth" }] : /* istanbul ignore next */ []));
|
|
201
218
|
/**
|
|
202
219
|
* The cropper´s height cannot be made smaller than this number of pixels
|
|
203
220
|
* (relative to original image´s size). Will be ignored if
|
|
@@ -205,21 +222,24 @@ class SiPhotoUploadComponent {
|
|
|
205
222
|
*
|
|
206
223
|
* @defaultValue 50
|
|
207
224
|
*/
|
|
208
|
-
cropperMinHeight = input(50,
|
|
225
|
+
cropperMinHeight = input(50, /* @ts-ignore */
|
|
226
|
+
...(ngDevMode ? [{ debugName: "cropperMinHeight" }] : /* istanbul ignore next */ []));
|
|
209
227
|
/**
|
|
210
228
|
* The cropper´s width cannot be made bigger than this number of pixels.
|
|
211
229
|
* Default is 0 (disabled).
|
|
212
230
|
*
|
|
213
231
|
* @defaultValue 0
|
|
214
232
|
*/
|
|
215
|
-
cropperMaxWidth = input(0,
|
|
233
|
+
cropperMaxWidth = input(0, /* @ts-ignore */
|
|
234
|
+
...(ngDevMode ? [{ debugName: "cropperMaxWidth" }] : /* istanbul ignore next */ []));
|
|
216
235
|
/**
|
|
217
236
|
* The cropper´s height cannot be made bigger than this number of pixels.
|
|
218
237
|
* Default is 0 (disabled).
|
|
219
238
|
*
|
|
220
239
|
* @defaultValue 0
|
|
221
240
|
*/
|
|
222
|
-
cropperMaxHeight = input(0,
|
|
241
|
+
cropperMaxHeight = input(0, /* @ts-ignore */
|
|
242
|
+
...(ngDevMode ? [{ debugName: "cropperMaxHeight" }] : /* istanbul ignore next */ []));
|
|
223
243
|
/**
|
|
224
244
|
* Set this to true for a round cropper. Resulting image will still
|
|
225
245
|
* be square, but visually clipped with a border-radius: 50% on the
|
|
@@ -227,45 +247,58 @@ class SiPhotoUploadComponent {
|
|
|
227
247
|
*
|
|
228
248
|
* @defaultValue true
|
|
229
249
|
*/
|
|
230
|
-
roundImage = input(true, { ...(ngDevMode ? { debugName: "roundImage" } : {}), transform: booleanAttribute });
|
|
250
|
+
roundImage = input(true, { ...(ngDevMode ? { debugName: "roundImage" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
231
251
|
/**
|
|
232
252
|
* The input photo to be used for cropping. A string in [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) format
|
|
233
253
|
* with base64 encoding.
|
|
234
254
|
*/
|
|
235
|
-
sourcePhoto = model(
|
|
255
|
+
sourcePhoto = model(/* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [undefined, { debugName: "sourcePhoto" }] : /* istanbul ignore next */ []));
|
|
236
257
|
/**
|
|
237
258
|
* URL to a photo to be used for cropping.
|
|
238
259
|
*/
|
|
239
|
-
sourcePhotoUrl = input(
|
|
260
|
+
sourcePhotoUrl = input(/* @ts-ignore */
|
|
261
|
+
...(ngDevMode ? [undefined, { debugName: "sourcePhotoUrl" }] : /* istanbul ignore next */ []));
|
|
240
262
|
/**
|
|
241
263
|
* The photo to be displayed and edited (when not readonly).
|
|
242
264
|
*/
|
|
243
|
-
croppedPhoto = model(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
265
|
+
croppedPhoto = model(/* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [undefined, { debugName: "croppedPhoto" }] : /* istanbul ignore next */ []));
|
|
267
|
+
editPhotoTemplate = viewChild.required('editPhotoTemplate', /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "editPhotoTemplate" }] : /* istanbul ignore next */ []));
|
|
269
|
+
fileInput = viewChild.required('fileInput', /* @ts-ignore */
|
|
270
|
+
...(ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []));
|
|
271
|
+
imageCropper = viewChild('imageCropper', /* @ts-ignore */
|
|
272
|
+
...(ngDevMode ? [{ debugName: "imageCropper" }] : /* istanbul ignore next */ []));
|
|
247
273
|
// used to label the dialog
|
|
248
274
|
titleId = `__si-photo-upload-${SiPhotoUploadComponent.idCounter++}`;
|
|
249
275
|
/**
|
|
250
276
|
* The trusted photo url string which is used to display the photo.
|
|
251
277
|
*/
|
|
252
|
-
sanitizedPhotoUrl = signal(undefined,
|
|
278
|
+
sanitizedPhotoUrl = signal(undefined, /* @ts-ignore */
|
|
279
|
+
...(ngDevMode ? [{ debugName: "sanitizedPhotoUrl" }] : /* istanbul ignore next */ []));
|
|
253
280
|
/**
|
|
254
281
|
* The appropriate error message displayed to the user. Might be
|
|
255
282
|
* `uploadErrorWrongType` or `uploadErrorTooBig`.
|
|
256
283
|
*/
|
|
257
|
-
uploadErrorMessage = signal(undefined,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
284
|
+
uploadErrorMessage = signal(undefined, /* @ts-ignore */
|
|
285
|
+
...(ngDevMode ? [{ debugName: "uploadErrorMessage" }] : /* istanbul ignore next */ []));
|
|
286
|
+
editButtonText = computed(() => this.sanitizedPhotoUrl() ? this.changePhotoText() : this.uploadPhotoText(), /* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [{ debugName: "editButtonText" }] : /* istanbul ignore next */ []));
|
|
288
|
+
currentFileSizeKilobytes = signal(-1, /* @ts-ignore */
|
|
289
|
+
...(ngDevMode ? [{ debugName: "currentFileSizeKilobytes" }] : /* istanbul ignore next */ []));
|
|
290
|
+
currentFileSizeMegabytes = signal(-1, /* @ts-ignore */
|
|
291
|
+
...(ngDevMode ? [{ debugName: "currentFileSizeMegabytes" }] : /* istanbul ignore next */ []));
|
|
292
|
+
maxSizeMb = computed(() => this.maxFileSize() / 1024, /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []));
|
|
262
294
|
/**
|
|
263
295
|
* The photo instance to be used in the image cropper. We need a different
|
|
264
296
|
* reference than `sourcePhoto` to support the cancel after uploading
|
|
265
297
|
* a new photo. While `sourcePhoto` is A and image cropper uploads B,
|
|
266
298
|
* we should not replace `sourcePhoto` A until user presses apply.
|
|
267
299
|
*/
|
|
268
|
-
imageCropperPhoto = signal(undefined,
|
|
300
|
+
imageCropperPhoto = signal(undefined, /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "imageCropperPhoto" }] : /* istanbul ignore next */ []));
|
|
269
302
|
icons = addIcons({
|
|
270
303
|
elementCancel,
|
|
271
304
|
elementCircleFilled,
|
|
@@ -447,10 +480,10 @@ class SiPhotoUploadComponent {
|
|
|
447
480
|
this.resetErrorMessage();
|
|
448
481
|
this.sanitizedPhotoUrl.set(photo ? this.sanitizer.bypassSecurityTrustResourceUrl(photo) : undefined);
|
|
449
482
|
}
|
|
450
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
451
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiPhotoUploadComponent, isStandalone: true, selector: "si-photo-upload", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabledCropping: { classPropertyName: "disabledCropping", publicName: "disabledCropping", isSignal: true, isRequired: false, transformFunction: null }, acceptedUploadFormats: { classPropertyName: "acceptedUploadFormats", publicName: "acceptedUploadFormats", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, uploadErrorWrongType: { classPropertyName: "uploadErrorWrongType", publicName: "uploadErrorWrongType", isSignal: true, isRequired: false, transformFunction: null }, uploadErrorTooBig: { classPropertyName: "uploadErrorTooBig", publicName: "uploadErrorTooBig", isSignal: true, isRequired: false, transformFunction: null }, photoAltText: { classPropertyName: "photoAltText", publicName: "photoAltText", isSignal: true, isRequired: false, transformFunction: null }, placeholderAltText: { classPropertyName: "placeholderAltText", publicName: "placeholderAltText", isSignal: true, isRequired: false, transformFunction: null }, changePhotoText: { classPropertyName: "changePhotoText", publicName: "changePhotoText", isSignal: true, isRequired: false, transformFunction: null }, cropperFrameAriaLabel: { classPropertyName: "cropperFrameAriaLabel", publicName: "cropperFrameAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, uploadPhotoText: { classPropertyName: "uploadPhotoText", publicName: "uploadPhotoText", isSignal: true, isRequired: false, transformFunction: null }, removePhotoText: { classPropertyName: "removePhotoText", publicName: "removePhotoText", isSignal: true, isRequired: false, transformFunction: null }, cancelEditText: { classPropertyName: "cancelEditText", publicName: "cancelEditText", isSignal: true, isRequired: false, transformFunction: null }, applyEditText: { classPropertyName: "applyEditText", publicName: "applyEditText", isSignal: true, isRequired: false, transformFunction: null }, modalHeader: { classPropertyName: "modalHeader", publicName: "modalHeader", isSignal: true, isRequired: false, transformFunction: null }, modalDescription: { classPropertyName: "modalDescription", publicName: "modalDescription", isSignal: true, isRequired: false, transformFunction: null }, cropperImageFormat: { classPropertyName: "cropperImageFormat", publicName: "cropperImageFormat", isSignal: true, isRequired: false, transformFunction: null }, cropperAspectRatio: { classPropertyName: "cropperAspectRatio", publicName: "cropperAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperMaintainAspectRatio: { classPropertyName: "cropperMaintainAspectRatio", publicName: "cropperMaintainAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperContainWithinAspectRatio: { classPropertyName: "cropperContainWithinAspectRatio", publicName: "cropperContainWithinAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperMinWidth: { classPropertyName: "cropperMinWidth", publicName: "cropperMinWidth", isSignal: true, isRequired: false, transformFunction: null }, cropperMinHeight: { classPropertyName: "cropperMinHeight", publicName: "cropperMinHeight", isSignal: true, isRequired: false, transformFunction: null }, cropperMaxWidth: { classPropertyName: "cropperMaxWidth", publicName: "cropperMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, cropperMaxHeight: { classPropertyName: "cropperMaxHeight", publicName: "cropperMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, roundImage: { classPropertyName: "roundImage", publicName: "roundImage", isSignal: true, isRequired: false, transformFunction: null }, sourcePhoto: { classPropertyName: "sourcePhoto", publicName: "sourcePhoto", isSignal: true, isRequired: false, transformFunction: null }, sourcePhotoUrl: { classPropertyName: "sourcePhotoUrl", publicName: "sourcePhotoUrl", isSignal: true, isRequired: false, transformFunction: null }, croppedPhoto: { classPropertyName: "croppedPhoto", publicName: "croppedPhoto", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourcePhoto: "sourcePhotoChange", croppedPhoto: "croppedPhotoChange" }, viewQueries: [{ propertyName: "editPhotoTemplate", first: true, predicate: ["editPhotoTemplate"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "imageCropper", first: true, predicate: ["imageCropper"], descendants: true, isSignal: true }], usesOnChanges: true, hostDirectives: [{ directive: i1.SiAvatarBackgroundColorDirective, inputs: ["color", "color", "autoColor", "autoColor"] }], ngImport: i0, template: "<div class=\"photo-upload d-flex flex-column p-6\">\n <!-- File upload -->\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n [accept]=\"acceptedUploadFormats()\"\n (change)=\"fileUpload($event)\"\n />\n\n <!-- Image -->\n @if (sanitizedPhotoUrl()) {\n <img\n class=\"photo-upload-photo\"\n [class.round]=\"roundImage()\"\n [src]=\"sanitizedPhotoUrl()\"\n [alt]=\"photoAltText() | translate\"\n />\n } @else {\n <span\n class=\"photo-upload-placeholder d-flex align-items-center justify-content-center flex-none\"\n [class.round]=\"roundImage()\"\n >\n {{ placeholderAltText() | translate }}\n </span>\n }\n <!-- Buttons -->\n @if (!readonly()) {\n <div class=\"d-flex justify-content-center gap-6 mt-8\">\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n (click)=\"\n (sourcePhoto() || sourcePhotoUrl()) && !disabledCropping()\n ? showCroppingDialog()\n : fileInput.click()\n \"\n >\n {{ editButtonText() | translate }}\n </button>\n @if (sanitizedPhotoUrl()) {\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"removePhoto()\">\n {{ removePhotoText() | translate }}\n </button>\n }\n </div>\n }\n\n <!-- Error message -->\n @if (uploadErrorMessage() && !modalRef) {\n <div class=\"mt-6\">\n <ng-container [ngTemplateOutlet]=\"errorMessageTemplate\" />\n </div>\n }\n</div>\n\n<!-- Template: modal -->\n<ng-template #editPhotoTemplate>\n <!-- Header -->\n <div class=\"modal-header\">\n <h4 class=\"modal-title\" [id]=\"titleId\">{{ modalHeader() | translate }}</h4>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [attr.aria-label]=\"cancelEditText() | translate\"\n (click)=\"imageCropperCanceled()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n <!-- Content -->\n <div class=\"modal-body\">\n @if (modalDescription()) {\n <div class=\"mb-4\">\n <span class=\"text-secondary\">{{ modalDescription() | translate }}</span>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"imageCropperTemplate\" />\n @if (uploadErrorMessage()) {\n <div class=\"d-flex mt-4\">\n <ng-container [ngTemplateOutlet]=\"errorMessageTemplate\" />\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary me-auto\" (click)=\"fileInput.click()\">\n {{ changePhotoText() | translate }}\n </button>\n <div class=\"d-flex gap-6\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"imageCropperCanceled()\">\n {{ cancelEditText() | translate }}\n </button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"imageCropperApplied()\">\n {{ applyEditText() | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<!-- Template: error message -->\n<ng-template #errorMessageTemplate>\n <div class=\"d-flex align-items-center\">\n <span class=\"icon-sm icon-stack d-inline-block my-n2 me-2\">\n <si-icon class=\"status-danger\" [icon]=\"icons.elementCircleFilled\" />\n <si-icon class=\"status-danger-contrast\" [icon]=\"icons.elementStateExclamationMark\" />\n </span>\n <span class=\"text-danger\">{{\n uploadErrorMessage()\n | translate\n : {\n mb: currentFileSizeMegabytes(),\n kb: currentFileSizeKilobytes(),\n maxSizeMb: maxSizeMb()\n }\n }}</span>\n </div>\n</ng-template>\n\n<!-- Template: image cropper -->\n<ng-template #imageCropperTemplate>\n <si-image-cropper-style>\n <image-cropper\n #imageCropper\n output=\"base64\"\n [aspectRatio]=\"cropperAspectRatio()\"\n [containWithinAspectRatio]=\"cropperContainWithinAspectRatio()\"\n [cropperMinWidth]=\"cropperMinWidth()\"\n [cropperMinHeight]=\"cropperMinHeight()\"\n [cropperMaxWidth]=\"cropperMaxWidth()\"\n [cropperMaxHeight]=\"cropperMaxHeight()\"\n [cropperFrameAriaLabel]=\"cropperFrameAriaLabel() | translate\"\n [format]=\"cropperImageFormat()\"\n [imageBase64]=\"imageCropperPhoto()\"\n [imageURL]=\"sourcePhotoUrl()\"\n [maintainAspectRatio]=\"cropperMaintainAspectRatio()\"\n [onlyScaleDown]=\"true\"\n [roundCropper]=\"roundImage()\"\n (cropperReady)=\"cropperReady()\"\n (imageCropped)=\"cropperImageCropped($event)\"\n />\n </si-image-cropper-style>\n</ng-template>\n", styles: [":host{--si-photo-upload-photo-width: 200px;--si-photo-upload-photo-height: 200px}.photo-upload{box-sizing:content-box;max-inline-size:var(--si-photo-upload-photo-width)}.photo-upload-photo,.photo-upload-placeholder{display:block;margin:auto;inline-size:var(--si-photo-upload-photo-width);max-inline-size:100%;block-size:var(--si-photo-upload-photo-height);object-fit:cover}.photo-upload-photo.round,.photo-upload-placeholder.round{border-radius:50%}.photo-upload-placeholder{background-color:var(--background);color:var(--element-ui-5);font-size:3rem;text-align:center;overflow:hidden;word-break:break-all;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiImageCropperStyleComponent, selector: "si-image-cropper-style" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiPhotoUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
484
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: SiPhotoUploadComponent, isStandalone: true, selector: "si-photo-upload", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabledCropping: { classPropertyName: "disabledCropping", publicName: "disabledCropping", isSignal: true, isRequired: false, transformFunction: null }, acceptedUploadFormats: { classPropertyName: "acceptedUploadFormats", publicName: "acceptedUploadFormats", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, uploadErrorWrongType: { classPropertyName: "uploadErrorWrongType", publicName: "uploadErrorWrongType", isSignal: true, isRequired: false, transformFunction: null }, uploadErrorTooBig: { classPropertyName: "uploadErrorTooBig", publicName: "uploadErrorTooBig", isSignal: true, isRequired: false, transformFunction: null }, photoAltText: { classPropertyName: "photoAltText", publicName: "photoAltText", isSignal: true, isRequired: false, transformFunction: null }, placeholderAltText: { classPropertyName: "placeholderAltText", publicName: "placeholderAltText", isSignal: true, isRequired: false, transformFunction: null }, changePhotoText: { classPropertyName: "changePhotoText", publicName: "changePhotoText", isSignal: true, isRequired: false, transformFunction: null }, cropperFrameAriaLabel: { classPropertyName: "cropperFrameAriaLabel", publicName: "cropperFrameAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, uploadPhotoText: { classPropertyName: "uploadPhotoText", publicName: "uploadPhotoText", isSignal: true, isRequired: false, transformFunction: null }, removePhotoText: { classPropertyName: "removePhotoText", publicName: "removePhotoText", isSignal: true, isRequired: false, transformFunction: null }, cancelEditText: { classPropertyName: "cancelEditText", publicName: "cancelEditText", isSignal: true, isRequired: false, transformFunction: null }, applyEditText: { classPropertyName: "applyEditText", publicName: "applyEditText", isSignal: true, isRequired: false, transformFunction: null }, modalHeader: { classPropertyName: "modalHeader", publicName: "modalHeader", isSignal: true, isRequired: false, transformFunction: null }, modalDescription: { classPropertyName: "modalDescription", publicName: "modalDescription", isSignal: true, isRequired: false, transformFunction: null }, cropperImageFormat: { classPropertyName: "cropperImageFormat", publicName: "cropperImageFormat", isSignal: true, isRequired: false, transformFunction: null }, cropperAspectRatio: { classPropertyName: "cropperAspectRatio", publicName: "cropperAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperMaintainAspectRatio: { classPropertyName: "cropperMaintainAspectRatio", publicName: "cropperMaintainAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperContainWithinAspectRatio: { classPropertyName: "cropperContainWithinAspectRatio", publicName: "cropperContainWithinAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, cropperMinWidth: { classPropertyName: "cropperMinWidth", publicName: "cropperMinWidth", isSignal: true, isRequired: false, transformFunction: null }, cropperMinHeight: { classPropertyName: "cropperMinHeight", publicName: "cropperMinHeight", isSignal: true, isRequired: false, transformFunction: null }, cropperMaxWidth: { classPropertyName: "cropperMaxWidth", publicName: "cropperMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, cropperMaxHeight: { classPropertyName: "cropperMaxHeight", publicName: "cropperMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, roundImage: { classPropertyName: "roundImage", publicName: "roundImage", isSignal: true, isRequired: false, transformFunction: null }, sourcePhoto: { classPropertyName: "sourcePhoto", publicName: "sourcePhoto", isSignal: true, isRequired: false, transformFunction: null }, sourcePhotoUrl: { classPropertyName: "sourcePhotoUrl", publicName: "sourcePhotoUrl", isSignal: true, isRequired: false, transformFunction: null }, croppedPhoto: { classPropertyName: "croppedPhoto", publicName: "croppedPhoto", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourcePhoto: "sourcePhotoChange", croppedPhoto: "croppedPhotoChange" }, viewQueries: [{ propertyName: "editPhotoTemplate", first: true, predicate: ["editPhotoTemplate"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "imageCropper", first: true, predicate: ["imageCropper"], descendants: true, isSignal: true }], usesOnChanges: true, hostDirectives: [{ directive: i1.SiAvatarBackgroundColorDirective, inputs: ["color", "color", "autoColor", "autoColor"] }], ngImport: i0, template: "<div class=\"photo-upload d-flex flex-column p-6\">\n <!-- File upload -->\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n [accept]=\"acceptedUploadFormats()\"\n (change)=\"fileUpload($event)\"\n />\n\n <!-- Image -->\n @if (sanitizedPhotoUrl()) {\n <img\n class=\"photo-upload-photo\"\n [class.round]=\"roundImage()\"\n [src]=\"sanitizedPhotoUrl()\"\n [alt]=\"photoAltText() | translate\"\n />\n } @else {\n <span\n class=\"photo-upload-placeholder d-flex align-items-center justify-content-center flex-none\"\n [class.round]=\"roundImage()\"\n >\n {{ placeholderAltText() | translate }}\n </span>\n }\n <!-- Buttons -->\n @if (!readonly()) {\n <div class=\"d-flex justify-content-center gap-6 mt-8\">\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n (click)=\"\n (sourcePhoto() || sourcePhotoUrl()) && !disabledCropping()\n ? showCroppingDialog()\n : fileInput.click()\n \"\n >\n {{ editButtonText() | translate }}\n </button>\n @if (sanitizedPhotoUrl()) {\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"removePhoto()\">\n {{ removePhotoText() | translate }}\n </button>\n }\n </div>\n }\n\n <!-- Error message -->\n @if (uploadErrorMessage() && !modalRef) {\n <div class=\"mt-6\">\n <ng-container [ngTemplateOutlet]=\"errorMessageTemplate\" />\n </div>\n }\n</div>\n\n<!-- Template: modal -->\n<ng-template #editPhotoTemplate>\n <!-- Header -->\n <div class=\"modal-header\">\n <h4 class=\"modal-title\" [id]=\"titleId\">{{ modalHeader() | translate }}</h4>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [attr.aria-label]=\"cancelEditText() | translate\"\n (click)=\"imageCropperCanceled()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n <!-- Content -->\n <div class=\"modal-body\">\n @if (modalDescription()) {\n <div class=\"mb-4\">\n <span class=\"text-secondary\">{{ modalDescription() | translate }}</span>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"imageCropperTemplate\" />\n @if (uploadErrorMessage()) {\n <div class=\"d-flex mt-4\">\n <ng-container [ngTemplateOutlet]=\"errorMessageTemplate\" />\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary me-auto\" (click)=\"fileInput.click()\">\n {{ changePhotoText() | translate }}\n </button>\n <div class=\"d-flex gap-6\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"imageCropperCanceled()\">\n {{ cancelEditText() | translate }}\n </button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"imageCropperApplied()\">\n {{ applyEditText() | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<!-- Template: error message -->\n<ng-template #errorMessageTemplate>\n <div class=\"d-flex align-items-center\">\n <span class=\"icon-sm icon-stack d-inline-block my-n2 me-2\">\n <si-icon class=\"status-danger\" [icon]=\"icons.elementCircleFilled\" />\n <si-icon class=\"status-danger-contrast\" [icon]=\"icons.elementStateExclamationMark\" />\n </span>\n <span class=\"text-danger\">{{\n uploadErrorMessage()\n | translate\n : {\n mb: currentFileSizeMegabytes(),\n kb: currentFileSizeKilobytes(),\n maxSizeMb: maxSizeMb()\n }\n }}</span>\n </div>\n</ng-template>\n\n<!-- Template: image cropper -->\n<ng-template #imageCropperTemplate>\n <si-image-cropper-style>\n <image-cropper\n #imageCropper\n output=\"base64\"\n [aspectRatio]=\"cropperAspectRatio()\"\n [containWithinAspectRatio]=\"cropperContainWithinAspectRatio()\"\n [cropperMinWidth]=\"cropperMinWidth()\"\n [cropperMinHeight]=\"cropperMinHeight()\"\n [cropperMaxWidth]=\"cropperMaxWidth()\"\n [cropperMaxHeight]=\"cropperMaxHeight()\"\n [cropperFrameAriaLabel]=\"cropperFrameAriaLabel() | translate\"\n [format]=\"cropperImageFormat()\"\n [imageBase64]=\"imageCropperPhoto()\"\n [imageURL]=\"sourcePhotoUrl()\"\n [maintainAspectRatio]=\"cropperMaintainAspectRatio()\"\n [onlyScaleDown]=\"true\"\n [roundCropper]=\"roundImage()\"\n (cropperReady)=\"cropperReady()\"\n (imageCropped)=\"cropperImageCropped($event)\"\n />\n </si-image-cropper-style>\n</ng-template>\n", styles: [":host{--si-photo-upload-photo-width: 200px;--si-photo-upload-photo-height: 200px}.photo-upload{box-sizing:content-box;max-inline-size:var(--si-photo-upload-photo-width)}.photo-upload-photo,.photo-upload-placeholder{display:block;margin:auto;inline-size:var(--si-photo-upload-photo-width);max-inline-size:100%;block-size:var(--si-photo-upload-photo-height);object-fit:cover}.photo-upload-photo.round,.photo-upload-placeholder.round{border-radius:50%}.photo-upload-placeholder{background-color:var(--background);color:var(--element-ui-5);font-size:3rem;text-align:center;overflow:hidden;word-break:break-all;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiImageCropperStyleComponent, selector: "si-image-cropper-style" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
452
485
|
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SiPhotoUploadComponent, decorators: [{
|
|
454
487
|
type: Component,
|
|
455
488
|
args: [{ selector: 'si-photo-upload', imports: [
|
|
456
489
|
NgTemplateOutlet,
|
|
@@ -458,7 +491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
458
491
|
SiIconComponent,
|
|
459
492
|
SiImageCropperStyleComponent,
|
|
460
493
|
SiTranslatePipe
|
|
461
|
-
],
|
|
494
|
+
], hostDirectives: [
|
|
462
495
|
{
|
|
463
496
|
directive: SiAvatarBackgroundColorDirective,
|
|
464
497
|
inputs: ['color', 'autoColor']
|