@siemens/element-ng 47.2.0 → 47.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -6
- package/autocomplete/index.d.ts +8 -0
- package/autocomplete/package.json +3 -0
- package/autocomplete/si-autocomplete-listbox.directive.d.ts +31 -0
- package/autocomplete/si-autocomplete-option.directive.d.ts +31 -0
- package/autocomplete/si-autocomplete.directive.d.ts +14 -0
- package/autocomplete/si-autocomplete.model.d.ts +7 -0
- package/autocomplete/si-autocomplete.module.d.ts +9 -0
- package/badge/index.d.ts +5 -0
- package/badge/package.json +3 -0
- package/badge/si-badge.component.d.ts +17 -0
- package/breadcrumb/breadcrumb-item.model.d.ts +36 -0
- package/breadcrumb/index.d.ts +7 -0
- package/breadcrumb/package.json +3 -0
- package/breadcrumb/si-breadcrumb-item-template.directive.d.ts +10 -0
- package/breadcrumb/si-breadcrumb.component.d.ts +46 -0
- package/breadcrumb/si-breadcrumb.module.d.ts +7 -0
- package/card/index.d.ts +6 -0
- package/card/package.json +3 -0
- package/card/si-card.component.d.ts +79 -0
- package/card/si-card.module.d.ts +7 -0
- package/circle-status/index.d.ts +6 -0
- package/circle-status/package.json +3 -0
- package/circle-status/si-circle-status.component.d.ts +66 -0
- package/circle-status/si-circle-status.module.d.ts +7 -0
- package/column-selection-dialog/column-selection-editor/si-column-selection-editor.component.d.ts +23 -0
- package/column-selection-dialog/index.d.ts +6 -0
- package/column-selection-dialog/package.json +3 -0
- package/column-selection-dialog/si-column-selection-dialog.component.d.ts +114 -0
- package/column-selection-dialog/si-column-selection-dialog.service.d.ts +20 -0
- package/column-selection-dialog/si-column-selection-dialog.types.d.ts +68 -0
- package/common/models/status-type.model.d.ts +2 -2
- package/content-action-bar/index.d.ts +7 -0
- package/content-action-bar/package.json +3 -0
- package/content-action-bar/si-content-action-bar-toggle.component.d.ts +6 -0
- package/content-action-bar/si-content-action-bar.component.d.ts +72 -0
- package/content-action-bar/si-content-action-bar.model.d.ts +9 -0
- package/content-action-bar/si-content-action-bar.module.d.ts +7 -0
- package/date-range-filter/index.d.ts +8 -0
- package/date-range-filter/package.json +3 -0
- package/date-range-filter/si-date-range-calculation.service.d.ts +33 -0
- package/date-range-filter/si-date-range-filter.component.d.ts +248 -0
- package/date-range-filter/si-date-range-filter.module.d.ts +7 -0
- package/date-range-filter/si-date-range-filter.types.d.ts +40 -0
- package/date-range-filter/si-relative-date.component.d.ts +31 -0
- package/datepicker/components/si-calendar-body.component.d.ts +137 -0
- package/datepicker/components/si-calendar-date-cell.directive.d.ts +16 -0
- package/datepicker/components/si-calendar-direction-button.component.d.ts +18 -0
- package/datepicker/components/si-compare-adapter.d.ts +37 -0
- package/datepicker/components/si-day-selection.component.d.ts +76 -0
- package/datepicker/components/si-initial-focus.component.d.ts +74 -0
- package/datepicker/components/si-month-selection.component.d.ts +62 -0
- package/datepicker/components/si-year-selection.component.d.ts +65 -0
- package/datepicker/date-time-helper.d.ts +302 -0
- package/datepicker/index.d.ts +15 -0
- package/datepicker/package.json +3 -0
- package/datepicker/si-calendar-button.component.d.ts +49 -0
- package/datepicker/si-date-input.directive.d.ts +114 -0
- package/datepicker/si-date-range.component.d.ts +150 -0
- package/datepicker/si-datepicker-overlay.component.d.ts +82 -0
- package/datepicker/si-datepicker-overlay.directive.d.ts +104 -0
- package/datepicker/si-datepicker.component.d.ts +228 -0
- package/datepicker/si-datepicker.directive.d.ts +62 -0
- package/datepicker/si-datepicker.model.d.ts +129 -0
- package/datepicker/si-datepicker.module.d.ts +12 -0
- package/datepicker/si-timepicker.component.d.ts +214 -0
- package/electron-titlebar/electron.helpers.d.ts +5 -0
- package/electron-titlebar/index.d.ts +7 -0
- package/electron-titlebar/package.json +3 -0
- package/electron-titlebar/si-electron-titlebar.component.d.ts +72 -0
- package/electron-titlebar/si-electron-titlebar.module.d.ts +7 -0
- package/fesm2022/siemens-element-ng-application-header.mjs +2 -2
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +235 -0
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-badge.mjs +59 -0
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +302 -0
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-card.mjs +122 -0
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-circle-status.mjs +146 -0
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +369 -0
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-common.mjs +1 -1
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +200 -0
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +649 -0
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-datepicker.mjs +4231 -0
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +142 -0
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-file-uploader.mjs +751 -0
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-filter-bar.mjs +153 -0
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-form.mjs +827 -0
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon-status.mjs +65 -0
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon.mjs +22 -2
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +63 -0
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-inline-notification.mjs +4 -6
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +451 -0
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-language-switcher.mjs +90 -0
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-localization.mjs +306 -0
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-number-input.mjs +267 -0
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-password-strength.mjs +177 -0
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-photo-upload.mjs +480 -0
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-pills-input.mjs +397 -0
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-popover-next.mjs +259 -0
- package/fesm2022/siemens-element-ng-popover-next.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-popover.mjs +256 -0
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-progressbar.mjs +83 -0
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-search-bar.mjs +193 -0
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-select.mjs +1166 -0
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-skip-links.mjs +117 -0
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-slider.mjs +313 -0
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-sort-bar.mjs +89 -0
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-split.mjs +575 -0
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-status-toggle.mjs +196 -0
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-summary-widget.mjs +77 -0
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-system-banner.mjs +47 -0
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-tabs.mjs +395 -0
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-toast-notification.mjs +227 -0
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +746 -0
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-unauthorized-page.mjs +76 -0
- package/fesm2022/siemens-element-ng-unauthorized-page.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-wizard.mjs +465 -0
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -0
- package/file-uploader/index.d.ts +8 -0
- package/file-uploader/package.json +3 -0
- package/file-uploader/si-file-dropzone.component.d.ts +106 -0
- package/file-uploader/si-file-uploader.component.d.ts +296 -0
- package/file-uploader/si-file-uploader.model.d.ts +12 -0
- package/file-uploader/si-file-uploader.module.d.ts +8 -0
- package/filter-bar/filter.d.ts +26 -0
- package/filter-bar/index.d.ts +8 -0
- package/filter-bar/package.json +3 -0
- package/filter-bar/si-filter-bar.component.d.ts +65 -0
- package/filter-bar/si-filter-bar.module.d.ts +7 -0
- package/filter-bar/si-filter-pill.component.d.ts +20 -0
- package/form/form-fieldset/si-form-fieldset.component.d.ts +40 -0
- package/form/index.d.ts +14 -0
- package/form/package.json +3 -0
- package/form/si-form-container/si-form-container.component.d.ts +155 -0
- package/form/si-form-item/si-form-field-native.control.d.ts +22 -0
- package/form/si-form-item/si-form-item.component.d.ts +90 -0
- package/form/si-form-item-control-input.directive.d.ts +18 -0
- package/form/si-form-item.control.d.ts +35 -0
- package/form/si-form-validation-error.model.d.ts +55 -0
- package/form/si-form-validation-error.provider.d.ts +11 -0
- package/form/si-form-validation-error.service.d.ts +42 -0
- package/form/si-form-validation-tooltip/si-form-validation-tooltip.component.d.ts +13 -0
- package/form/si-form-validation-tooltip/si-form-validation-tooltip.directive.d.ts +42 -0
- package/form/si-form.module.d.ts +25 -0
- package/icon/element-icons.d.ts +20 -0
- package/icon-status/index.d.ts +6 -0
- package/icon-status/package.json +3 -0
- package/icon-status/si-icon-status.component.d.ts +24 -0
- package/icon-status/si-icon-status.module.d.ts +7 -0
- package/info-page/index.d.ts +5 -0
- package/info-page/package.json +3 -0
- package/info-page/si-info-page.component.d.ts +38 -0
- package/inline-notification/si-inline-notification.component.d.ts +0 -2
- package/ip-input/address-utils.d.ts +28 -0
- package/ip-input/address-validators.d.ts +21 -0
- package/ip-input/index.d.ts +7 -0
- package/ip-input/package.json +3 -0
- package/ip-input/si-ip-input.directive.d.ts +53 -0
- package/ip-input/si-ip4-input.directive.d.ts +9 -0
- package/ip-input/si-ip6-input.directive.d.ts +10 -0
- package/language-switcher/index.d.ts +7 -0
- package/language-switcher/iso-language-value.d.ts +14 -0
- package/language-switcher/package.json +3 -0
- package/language-switcher/si-language-switcher.component.d.ts +32 -0
- package/language-switcher/si-language-switcher.module.d.ts +7 -0
- package/localization/index.d.ts +8 -0
- package/localization/package.json +3 -0
- package/localization/si-directionality.d.ts +41 -0
- package/localization/si-locale-id.d.ts +22 -0
- package/localization/si-locale-store.d.ts +16 -0
- package/localization/si-locale.service.d.ts +73 -0
- package/number-input/index.d.ts +6 -0
- package/number-input/package.json +3 -0
- package/number-input/si-number-input.component.d.ts +106 -0
- package/number-input/si-number-input.module.d.ts +7 -0
- package/package.json +163 -3
- package/password-strength/index.d.ts +7 -0
- package/password-strength/package.json +3 -0
- package/password-strength/si-password-strength.component.d.ts +25 -0
- package/password-strength/si-password-strength.directive.d.ts +54 -0
- package/password-strength/si-password-strength.module.d.ts +8 -0
- package/photo-upload/index.d.ts +6 -0
- package/photo-upload/package.json +3 -0
- package/photo-upload/si-image-cropper-style.component.d.ts +5 -0
- package/photo-upload/si-photo-upload.component.d.ts +298 -0
- package/pills-input/index.d.ts +9 -0
- package/pills-input/package.json +3 -0
- package/pills-input/si-input-pill.component.d.ts +9 -0
- package/pills-input/si-pills-input-csv.directive.d.ts +8 -0
- package/pills-input/si-pills-input-email.directive.d.ts +10 -0
- package/pills-input/si-pills-input-pattern-base.d.ts +19 -0
- package/pills-input/si-pills-input-value-handler.d.ts +12 -0
- package/pills-input/si-pills-input.component.d.ts +87 -0
- package/pills-input/si-pills-input.module.d.ts +9 -0
- package/popover/index.d.ts +6 -0
- package/popover/package.json +3 -0
- package/popover/si-popover.component.d.ts +26 -0
- package/popover/si-popover.directive.d.ts +89 -0
- package/popover/si-popover.module.d.ts +7 -0
- package/popover-next/index.d.ts +7 -0
- package/popover-next/package.json +3 -0
- package/popover-next/si-popover-description.directive.d.ts +7 -0
- package/popover-next/si-popover-next.directive.d.ts +61 -0
- package/popover-next/si-popover-title.directive.d.ts +7 -0
- package/popover-next/si-popover.component.d.ts +27 -0
- package/progressbar/index.d.ts +6 -0
- package/progressbar/package.json +3 -0
- package/progressbar/si-progressbar.component.d.ts +43 -0
- package/progressbar/si-progressbar.module.d.ts +7 -0
- package/search-bar/index.d.ts +6 -0
- package/search-bar/package.json +3 -0
- package/search-bar/si-search-bar.component.d.ts +87 -0
- package/search-bar/si-search-bar.module.d.ts +7 -0
- package/select/index.d.ts +18 -0
- package/select/options/si-select-complex-options.directive.d.ts +69 -0
- package/select/options/si-select-lazy-options.directive.d.ts +38 -0
- package/select/options/si-select-option.source.d.ts +49 -0
- package/select/options/si-select-options-strategy.base.d.ts +35 -0
- package/select/options/si-select-options-strategy.d.ts +37 -0
- package/select/options/si-select-simple-options.directive.d.ts +34 -0
- package/select/package.json +3 -0
- package/select/select-input/si-select-input.component.d.ts +43 -0
- package/select/select-list/si-select-list-has-filter.component.d.ts +20 -0
- package/select/select-list/si-select-list.base.d.ts +37 -0
- package/select/select-list/si-select-list.component.d.ts +15 -0
- package/select/select-option/si-select-option-row.component.d.ts +16 -0
- package/select/select-option/si-select-option.component.d.ts +9 -0
- package/select/selection/si-select-multi-value.directive.d.ts +26 -0
- package/select/selection/si-select-selection-strategy.d.ts +58 -0
- package/select/selection/si-select-single-value.directive.d.ts +26 -0
- package/select/si-select-action.directive.d.ts +12 -0
- package/select/si-select-actions.directive.d.ts +5 -0
- package/select/si-select-group-template.directive.d.ts +20 -0
- package/select/si-select-option-row-template.directive.d.ts +9 -0
- package/select/si-select-option-template.directive.d.ts +21 -0
- package/select/si-select.component.d.ts +96 -0
- package/select/si-select.module.d.ts +15 -0
- package/select/si-select.types.d.ts +65 -0
- package/skip-links/index.d.ts +5 -0
- package/skip-links/package.json +3 -0
- package/skip-links/si-skip-link-target.directive.d.ts +27 -0
- package/skip-links/si-skip-links.component.d.ts +9 -0
- package/skip-links/skip-link.service.d.ts +14 -0
- package/slider/index.d.ts +6 -0
- package/slider/package.json +3 -0
- package/slider/si-slider.component.d.ts +129 -0
- package/slider/si-slider.module.d.ts +7 -0
- package/sort-bar/index.d.ts +6 -0
- package/sort-bar/package.json +3 -0
- package/sort-bar/si-sort-bar.component.d.ts +42 -0
- package/sort-bar/si-sort-bar.module.d.ts +7 -0
- package/split/index.d.ts +8 -0
- package/split/package.json +3 -0
- package/split/si-split-part.component.d.ts +154 -0
- package/split/si-split.component.d.ts +48 -0
- package/split/si-split.interfaces.d.ts +17 -0
- package/split/si-split.module.d.ts +8 -0
- package/status-toggle/index.d.ts +6 -0
- package/status-toggle/package.json +3 -0
- package/status-toggle/si-status-toggle.component.d.ts +54 -0
- package/status-toggle/status-toggle.model.d.ts +26 -0
- package/summary-widget/index.d.ts +5 -0
- package/summary-widget/package.json +3 -0
- package/summary-widget/si-summary-widget.component.d.ts +44 -0
- package/system-banner/index.d.ts +5 -0
- package/system-banner/package.json +3 -0
- package/system-banner/system-banner.component.d.ts +23 -0
- package/tabs/index.d.ts +7 -0
- package/tabs/package.json +3 -0
- package/tabs/si-tab/index.d.ts +5 -0
- package/tabs/si-tab/si-tab.component.d.ts +58 -0
- package/tabs/si-tabs.module.d.ts +8 -0
- package/tabs/si-tabset/index.d.ts +5 -0
- package/tabs/si-tabset/si-tabset.component.d.ts +100 -0
- package/template-i18n.json +111 -1
- package/toast-notification/index.d.ts +6 -0
- package/toast-notification/package.json +3 -0
- package/toast-notification/si-toast-notification/si-toast-notification.component.d.ts +17 -0
- package/toast-notification/si-toast-notification-drawer/si-toast-notification-drawer.component.d.ts +9 -0
- package/toast-notification/si-toast-notification.service.d.ts +41 -0
- package/toast-notification/si-toast.model.d.ts +25 -0
- package/translate/si-translatable-keys.interface.d.ts +110 -0
- package/typeahead/index.d.ts +8 -0
- package/typeahead/package.json +3 -0
- package/typeahead/si-typeahead-item-template.directive.d.ts +7 -0
- package/typeahead/si-typeahead.component.d.ts +22 -0
- package/typeahead/si-typeahead.directive.d.ts +196 -0
- package/typeahead/si-typeahead.model.d.ts +60 -0
- package/typeahead/si-typeahead.module.d.ts +8 -0
- package/typeahead/si-typeahead.sorting.d.ts +10 -0
- package/unauthorized-page/index.d.ts +6 -0
- package/unauthorized-page/package.json +3 -0
- package/unauthorized-page/si-unauthorized-page.component.d.ts +35 -0
- package/unauthorized-page/si-unauthorized-page.module.d.ts +7 -0
- package/wizard/index.d.ts +7 -0
- package/wizard/package.json +3 -0
- package/wizard/si-wizard-step.component.d.ts +21 -0
- package/wizard/si-wizard.component.d.ts +196 -0
- package/wizard/si-wizard.module.d.ts +8 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { SiIconNextComponent } from '@siemens/element-ng/icon';
|
|
5
|
+
import { SiLinkDirective } from '@siemens/element-ng/link';
|
|
6
|
+
import * as i1 from '@siemens/element-translate-ng/translate';
|
|
7
|
+
import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Copyright Siemens 2016 - 2025.
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The component displays application info messages. A message uses an icon and a title, optionally a copy text,
|
|
15
|
+
* instructions and a link. Replace the integrated icon by content projection of another icon or image with the
|
|
16
|
+
* CSS class `.si-info-image`. Use content projection with the CSS class `si-info-actions` to inject more buttons
|
|
17
|
+
* and options to interact with the page.
|
|
18
|
+
*/
|
|
19
|
+
class SiInfoPageComponent {
|
|
20
|
+
/**
|
|
21
|
+
* The element warning icon.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue 'element-warning-filled'
|
|
24
|
+
*/
|
|
25
|
+
icon = input('element-warning-filled');
|
|
26
|
+
/**
|
|
27
|
+
* Icon color class, see {@link https://element.siemens.io/fundamentals/typography/#color-variants-classes}
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue 'status-warning'
|
|
30
|
+
*/
|
|
31
|
+
iconColor = input('status-warning');
|
|
32
|
+
/** A short and concise title to explain the error. */
|
|
33
|
+
titleText = input.required();
|
|
34
|
+
/** A more detailed explanation of the error, outlining the reasoning for it and how a user can resolve it. */
|
|
35
|
+
copyText = input();
|
|
36
|
+
/** A detailed instruction on how a user can resolve the error. */
|
|
37
|
+
instructions = input();
|
|
38
|
+
/**
|
|
39
|
+
* Use the link object if you have one option to follow. A link object
|
|
40
|
+
* has a title to be displayed and can be configured with an external link,
|
|
41
|
+
* a router link, or a custom action. If you want to provide multiple options,
|
|
42
|
+
* add your own content into the component.
|
|
43
|
+
*/
|
|
44
|
+
link = input();
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiInfoPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiInfoPageComponent, isStandalone: true, selector: "si-info-page", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, titleText: { classPropertyName: "titleText", publicName: "titleText", isSignal: true, isRequired: true, transformFunction: null }, copyText: { classPropertyName: "copyText", publicName: "copyText", isSignal: true, isRequired: false, transformFunction: null }, instructions: { classPropertyName: "instructions", publicName: "instructions", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"h-100 d-flex flex-column justify-content-center align-items-center p-6\">\n <ng-content select=\".si-info-image\">\n <si-icon-next class=\"icon-size\" [ngClass]=\"iconColor()\" [icon]=\"icon()\" />\n </ng-content>\n <h1 class=\"my-9\">{{ titleText() | translate }}</h1>\n @if (copyText()) {\n <h2 class=\"mb-9\">{{ copyText() | translate }}</h2>\n }\n @if (instructions()) {\n <p class=\"text-pre-wrap text-center si-body-1 mb-9\">{{ instructions() | translate }}</p>\n }\n @if (link()?.title) {\n <a class=\"btn btn-primary\" [siLink]=\"link()\">{{ link()?.title | translate }}</a>\n }\n <ng-content select=\".si-info-actions\" />\n</div>\n", styles: [":host ::ng-deep .icon-size{font-size:96px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiInfoPageComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'si-info-page', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, SiLinkDirective, SiIconNextComponent, SiTranslateModule], template: "<div class=\"h-100 d-flex flex-column justify-content-center align-items-center p-6\">\n <ng-content select=\".si-info-image\">\n <si-icon-next class=\"icon-size\" [ngClass]=\"iconColor()\" [icon]=\"icon()\" />\n </ng-content>\n <h1 class=\"my-9\">{{ titleText() | translate }}</h1>\n @if (copyText()) {\n <h2 class=\"mb-9\">{{ copyText() | translate }}</h2>\n }\n @if (instructions()) {\n <p class=\"text-pre-wrap text-center si-body-1 mb-9\">{{ instructions() | translate }}</p>\n }\n @if (link()?.title) {\n <a class=\"btn btn-primary\" [siLink]=\"link()\">{{ link()?.title | translate }}</a>\n }\n <ng-content select=\".si-info-actions\" />\n</div>\n", styles: [":host ::ng-deep .icon-size{font-size:96px}\n"] }]
|
|
51
|
+
}] });
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Copyright Siemens 2016 - 2025.
|
|
55
|
+
* SPDX-License-Identifier: MIT
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Generated bundle index. Do not edit.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
export { SiInfoPageComponent };
|
|
63
|
+
//# sourceMappingURL=siemens-element-ng-info-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-info-page.mjs","sources":["../../../../projects/element-ng/info-page/si-info-page.component.ts","../../../../projects/element-ng/info-page/si-info-page.component.html","../../../../projects/element-ng/info-page/index.ts","../../../../projects/element-ng/info-page/siemens-element-ng-info-page.ts"],"sourcesContent":["/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { SiIconNextComponent } from '@siemens/element-ng/icon';\nimport { Link, SiLinkDirective } from '@siemens/element-ng/link';\nimport { SiTranslateModule, TranslatableString } from '@siemens/element-translate-ng/translate';\n\n/**\n * The component displays application info messages. A message uses an icon and a title, optionally a copy text,\n * instructions and a link. Replace the integrated icon by content projection of another icon or image with the\n * CSS class `.si-info-image`. Use content projection with the CSS class `si-info-actions` to inject more buttons\n * and options to interact with the page.\n */\n@Component({\n selector: 'si-info-page',\n templateUrl: './si-info-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './si-info-page.component.scss',\n imports: [NgClass, SiLinkDirective, SiIconNextComponent, SiTranslateModule]\n})\nexport class SiInfoPageComponent {\n /**\n * The element warning icon.\n *\n * @defaultValue 'element-warning-filled'\n */\n readonly icon = input<string>('element-warning-filled');\n /**\n * Icon color class, see {@link https://element.siemens.io/fundamentals/typography/#color-variants-classes}\n *\n * @defaultValue 'status-warning'\n */\n readonly iconColor = input<string | undefined>('status-warning');\n /** A short and concise title to explain the error. */\n readonly titleText = input.required<TranslatableString>();\n /** A more detailed explanation of the error, outlining the reasoning for it and how a user can resolve it. */\n readonly copyText = input<TranslatableString>();\n /** A detailed instruction on how a user can resolve the error. */\n readonly instructions = input<TranslatableString>();\n /**\n * Use the link object if you have one option to follow. A link object\n * has a title to be displayed and can be configured with an external link,\n * a router link, or a custom action. If you want to provide multiple options,\n * add your own content into the component.\n */\n readonly link = input<Link>();\n}\n","<div class=\"h-100 d-flex flex-column justify-content-center align-items-center p-6\">\n <ng-content select=\".si-info-image\">\n <si-icon-next class=\"icon-size\" [ngClass]=\"iconColor()\" [icon]=\"icon()\" />\n </ng-content>\n <h1 class=\"my-9\">{{ titleText() | translate }}</h1>\n @if (copyText()) {\n <h2 class=\"mb-9\">{{ copyText() | translate }}</h2>\n }\n @if (instructions()) {\n <p class=\"text-pre-wrap text-center si-body-1 mb-9\">{{ instructions() | translate }}</p>\n }\n @if (link()?.title) {\n <a class=\"btn btn-primary\" [siLink]=\"link()\">{{ link()?.title | translate }}</a>\n }\n <ng-content select=\".si-info-actions\" />\n</div>\n","/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-info-page.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NgClass } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { input, booleanAttribute, Component, NgModule } from '@angular/core';
|
|
4
|
+
import { SiStatusIconComponent } from '@siemens/element-ng/icon';
|
|
5
5
|
import { SiLinkDirective } from '@siemens/element-ng/link';
|
|
6
6
|
import * as i1 from '@siemens/element-translate-ng/translate';
|
|
7
7
|
import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
|
|
@@ -11,7 +11,6 @@ import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
|
|
|
11
11
|
* SPDX-License-Identifier: MIT
|
|
12
12
|
*/
|
|
13
13
|
class SiInlineNotificationComponent {
|
|
14
|
-
statusIcons = inject(STATUS_ICON_CONFIG);
|
|
15
14
|
/**
|
|
16
15
|
* Status of inline notification.
|
|
17
16
|
*/
|
|
@@ -43,13 +42,12 @@ class SiInlineNotificationComponent {
|
|
|
43
42
|
* @defaultValue false
|
|
44
43
|
*/
|
|
45
44
|
embedded = input(false, { transform: booleanAttribute });
|
|
46
|
-
icon = computed(() => this.statusIcons[this.severity()] ?? this.statusIcons.info);
|
|
47
45
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiInlineNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiInlineNotificationComponent, isStandalone: true, selector: "si-inline-notification", inputs: { severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, translationParams: { classPropertyName: "translationParams", publicName: "translationParams", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"alert d-flex align-items-start\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n [ngClass]=\"'alert-' + severity()\"\n [hidden]=\"!severity()\"\n>\n
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiInlineNotificationComponent, isStandalone: true, selector: "si-inline-notification", inputs: { severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, translationParams: { classPropertyName: "translationParams", publicName: "translationParams", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"alert d-flex align-items-start\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n [ngClass]=\"'alert-' + severity()\"\n [hidden]=\"!severity()\"\n>\n <si-status-icon class=\"icon me-4 flex-shrink-0\" [status]=\"severity()\" />\n\n <div class=\"d-flex flex-grow-1 flex-wrap mt-1\">\n @if (heading()) {\n <strong class=\"pe-2\">{{ heading() | translate: translationParams() }}: </strong>\n }\n <span>{{ message() | translate: translationParams() }}</span>\n </div>\n @if (action() && action()?.title) {\n <a class=\"alert-link ms-4 flex-shrink-0 mt-1\" [siLink]=\"action()\">\n {{ action()?.title | translate: translationParams() }}\n </a>\n }\n</div>\n", styles: [":host{display:block;overflow:hidden;flex-shrink:0;border-radius:var(--element-button-radius)}.alert :is(div,a){padding-block-start:1px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }, { kind: "component", type: SiStatusIconComponent, selector: "si-status-icon", inputs: ["status"] }] });
|
|
49
47
|
}
|
|
50
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiInlineNotificationComponent, decorators: [{
|
|
51
49
|
type: Component,
|
|
52
|
-
args: [{ selector: 'si-inline-notification', imports: [NgClass, SiLinkDirective,
|
|
50
|
+
args: [{ selector: 'si-inline-notification', imports: [NgClass, SiLinkDirective, SiTranslateModule, SiStatusIconComponent], template: "<div\n class=\"alert d-flex align-items-start\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n [ngClass]=\"'alert-' + severity()\"\n [hidden]=\"!severity()\"\n>\n <si-status-icon class=\"icon me-4 flex-shrink-0\" [status]=\"severity()\" />\n\n <div class=\"d-flex flex-grow-1 flex-wrap mt-1\">\n @if (heading()) {\n <strong class=\"pe-2\">{{ heading() | translate: translationParams() }}: </strong>\n }\n <span>{{ message() | translate: translationParams() }}</span>\n </div>\n @if (action() && action()?.title) {\n <a class=\"alert-link ms-4 flex-shrink-0 mt-1\" [siLink]=\"action()\">\n {{ action()?.title | translate: translationParams() }}\n </a>\n }\n</div>\n", styles: [":host{display:block;overflow:hidden;flex-shrink:0;border-radius:var(--element-button-radius)}.alert :is(div,a){padding-block-start:1px}\n"] }]
|
|
53
51
|
}] });
|
|
54
52
|
|
|
55
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-inline-notification.mjs","sources":["../../../../projects/element-ng/inline-notification/si-inline-notification.component.ts","../../../../projects/element-ng/inline-notification/si-inline-notification.component.html","../../../../projects/element-ng/inline-notification/si-inline-notification.module.ts","../../../../projects/element-ng/inline-notification/index.ts","../../../../projects/element-ng/inline-notification/siemens-element-ng-inline-notification.ts"],"sourcesContent":["/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport { booleanAttribute, Component,
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-inline-notification.mjs","sources":["../../../../projects/element-ng/inline-notification/si-inline-notification.component.ts","../../../../projects/element-ng/inline-notification/si-inline-notification.component.html","../../../../projects/element-ng/inline-notification/si-inline-notification.module.ts","../../../../projects/element-ng/inline-notification/index.ts","../../../../projects/element-ng/inline-notification/siemens-element-ng-inline-notification.ts"],"sourcesContent":["/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport { booleanAttribute, Component, input } from '@angular/core';\nimport { StatusType } from '@siemens/element-ng/common';\nimport { SiStatusIconComponent } from '@siemens/element-ng/icon';\nimport { Link, SiLinkDirective } from '@siemens/element-ng/link';\nimport { SiTranslateModule } from '@siemens/element-translate-ng/translate';\n\n@Component({\n selector: 'si-inline-notification',\n templateUrl: './si-inline-notification.component.html',\n styleUrl: './si-inline-notification.component.scss',\n imports: [NgClass, SiLinkDirective, SiTranslateModule, SiStatusIconComponent]\n})\nexport class SiInlineNotificationComponent {\n /**\n * Status of inline notification.\n */\n readonly severity = input.required<StatusType>();\n\n /**\n * Heading of the message.\n */\n readonly heading = input<string>();\n\n /**\n * Main message of this inline notification.\n */\n readonly message = input.required<string>();\n\n /**\n * Optional link action for inline notification events.\n */\n readonly action = input<Link>();\n\n /**\n * Params passed to the translation pipe\n *\n * @defaultValue\n * ```\n * {}\n * ```\n */\n readonly translationParams = input<{ [key: string]: any } | undefined>({});\n\n /**\n * Displays in embedded style, w/o radius and indicator bar\n *\n * @defaultValue false\n */\n readonly embedded = input(false, { transform: booleanAttribute });\n}\n","<div\n class=\"alert d-flex align-items-start\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n [ngClass]=\"'alert-' + severity()\"\n [hidden]=\"!severity()\"\n>\n <si-status-icon class=\"icon me-4 flex-shrink-0\" [status]=\"severity()\" />\n\n <div class=\"d-flex flex-grow-1 flex-wrap mt-1\">\n @if (heading()) {\n <strong class=\"pe-2\">{{ heading() | translate: translationParams() }}: </strong>\n }\n <span>{{ message() | translate: translationParams() }}</span>\n </div>\n @if (action() && action()?.title) {\n <a class=\"alert-link ms-4 flex-shrink-0 mt-1\" [siLink]=\"action()\">\n {{ action()?.title | translate: translationParams() }}\n </a>\n }\n</div>\n","/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiInlineNotificationComponent } from './si-inline-notification.component';\n\n@NgModule({\n imports: [SiInlineNotificationComponent],\n exports: [SiInlineNotificationComponent]\n})\nexport class SiInlineNotificationModule {}\n","/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-inline-notification.component';\nexport * from './si-inline-notification.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, booleanAttribute, signal, computed, HostListener, Directive } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
4
|
+
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
5
|
+
|
|
6
|
+
const isDigit = (c) => c >= '0' && c <= '9';
|
|
7
|
+
const isHex = (c) => (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F');
|
|
8
|
+
/**
|
|
9
|
+
* Parse IPv4 input string into IPv4 address section array.
|
|
10
|
+
*/
|
|
11
|
+
const splitIpV4Sections = (options) => {
|
|
12
|
+
const { input, pos, cidr } = options;
|
|
13
|
+
const sections = [{ value: '' }];
|
|
14
|
+
if (!input) {
|
|
15
|
+
return sections;
|
|
16
|
+
}
|
|
17
|
+
let maxDots = 3;
|
|
18
|
+
for (let i = 0; i < input.length; i++) {
|
|
19
|
+
const c = input.charAt(i);
|
|
20
|
+
if (isDigit(c)) {
|
|
21
|
+
sections.at(-1).value += c;
|
|
22
|
+
}
|
|
23
|
+
else if (c === '.' && maxDots > 0) {
|
|
24
|
+
maxDots--;
|
|
25
|
+
sections.push({ value: c }, { value: '' });
|
|
26
|
+
}
|
|
27
|
+
else if (cidr && c === '/') {
|
|
28
|
+
sections.push({ value: c }, { value: '', mask: true });
|
|
29
|
+
}
|
|
30
|
+
if (pos === i) {
|
|
31
|
+
sections.at(-1).current = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Trim empty sections for example the user entered ..
|
|
35
|
+
let previousDivider = false;
|
|
36
|
+
for (let i = 0; i < sections.length; i += 2) {
|
|
37
|
+
const isDivider = sections.at(i)?.value === '' && sections.at(i + 1)?.value === '.';
|
|
38
|
+
if (previousDivider && isDivider) {
|
|
39
|
+
sections.splice(i, 2);
|
|
40
|
+
}
|
|
41
|
+
previousDivider = isDivider;
|
|
42
|
+
}
|
|
43
|
+
// Split values > 255 in multiple sections:
|
|
44
|
+
// - 256 will be split into 25 and 6
|
|
45
|
+
// - 255255255 will be split into 255, 255 and 255
|
|
46
|
+
for (let i = 0; i < sections.length; i++) {
|
|
47
|
+
const { value, current } = sections[i];
|
|
48
|
+
if (value.length >= 3 && parseInt(value, 10) > 255) {
|
|
49
|
+
const append = [];
|
|
50
|
+
let n = '';
|
|
51
|
+
for (const c of value) {
|
|
52
|
+
if (parseInt(n + c, 10) > 255) {
|
|
53
|
+
append.push({ value: n }, { value: '.' });
|
|
54
|
+
n = c;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
n += c;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (n.length > 0) {
|
|
61
|
+
append.push({ value: n });
|
|
62
|
+
}
|
|
63
|
+
sections.splice(i, 1, ...append);
|
|
64
|
+
if (current) {
|
|
65
|
+
sections[i + append.length - 1].current = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Split leading zero sections:
|
|
70
|
+
// Assume a string starting by 0 e.g. 012 will be split into 0 and 12
|
|
71
|
+
for (let i = 0; i < sections.length; i++) {
|
|
72
|
+
const sec = sections[i];
|
|
73
|
+
if (sec.value.length > 1 && sec.value.startsWith('0')) {
|
|
74
|
+
sections.splice(i, 1, { value: '0' }, { value: sec.value.substring(1) });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Ensure the that the CIDR divider is a slash
|
|
78
|
+
if (cidr) {
|
|
79
|
+
const startCidr = 7;
|
|
80
|
+
if (startCidr < sections.length && sections[startCidr].value === '.') {
|
|
81
|
+
sections[startCidr].value = '/';
|
|
82
|
+
}
|
|
83
|
+
const prefixPos = startCidr + 1;
|
|
84
|
+
if (prefixPos < sections.length) {
|
|
85
|
+
const prefixLength = sections[prefixPos].value;
|
|
86
|
+
if (parseInt(prefixLength, 10) > 32) {
|
|
87
|
+
sections[prefixPos].value = prefixLength.substring(0, 2);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return sections;
|
|
92
|
+
};
|
|
93
|
+
const splitIpV6Sections = (options) => {
|
|
94
|
+
const { type, input, pos, zeroCompression, cidr } = options;
|
|
95
|
+
const sections = [{ value: '' }];
|
|
96
|
+
if (!input) {
|
|
97
|
+
return sections;
|
|
98
|
+
}
|
|
99
|
+
for (let i = 0; i < input.length; i++) {
|
|
100
|
+
const c = input.charAt(i).toUpperCase();
|
|
101
|
+
if (isHex(c)) {
|
|
102
|
+
sections.at(-1).value += c;
|
|
103
|
+
}
|
|
104
|
+
else if (c === ':') {
|
|
105
|
+
if (input.charAt(i - 1) === c) {
|
|
106
|
+
// Merge :: characters
|
|
107
|
+
sections.at(-2).value += c;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
sections.push({ value: c }, { value: '' });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (cidr && c === '/') {
|
|
114
|
+
sections.push({ value: c }, { value: '', mask: true });
|
|
115
|
+
}
|
|
116
|
+
if (pos === i) {
|
|
117
|
+
sections.at(-1).current = true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Split values > FFFF in multiple sections:
|
|
121
|
+
// - 1FFFF will be split into 1FFF and F
|
|
122
|
+
for (let i = 0; i < sections.length; i++) {
|
|
123
|
+
const { value, current } = sections[i];
|
|
124
|
+
if (value.length > 4) {
|
|
125
|
+
const append = [];
|
|
126
|
+
for (let p = 0; p < value.length; p += 4) {
|
|
127
|
+
const part = value.substring(p, p + 4);
|
|
128
|
+
append.push({ value: part });
|
|
129
|
+
if (part.length === 4) {
|
|
130
|
+
append.push({ value: ':' });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
sections.splice(i, 1, ...append);
|
|
134
|
+
if (current) {
|
|
135
|
+
sections[i + append.length - 1].current = true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Drop invalid zero compression indicators '::'
|
|
140
|
+
const removeEnd = pos === input.length - 1 || type === 'paste';
|
|
141
|
+
let matches = sections.filter(s => s.value.startsWith('::'));
|
|
142
|
+
if (matches) {
|
|
143
|
+
matches = removeEnd ? matches : matches.reverse();
|
|
144
|
+
if (zeroCompression) {
|
|
145
|
+
matches.shift();
|
|
146
|
+
}
|
|
147
|
+
// Only allow one occurrence of ::
|
|
148
|
+
for (const drop of matches) {
|
|
149
|
+
drop.value = drop.value.substring(1);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// Ensure the that the CIDR divider is a slash
|
|
153
|
+
if (cidr) {
|
|
154
|
+
const startCidr = matches.length > 0 ? 13 : 15;
|
|
155
|
+
if (startCidr < sections.length && sections[startCidr].value === ':') {
|
|
156
|
+
sections[startCidr].value = '/';
|
|
157
|
+
}
|
|
158
|
+
const prefixPos = startCidr + 1;
|
|
159
|
+
if (prefixPos < sections.length) {
|
|
160
|
+
const prefixLength = sections[prefixPos].value;
|
|
161
|
+
if (parseInt(prefixLength, 10) > 128) {
|
|
162
|
+
sections[prefixPos].value = prefixLength.substring(0, 2);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return sections;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const ipv4Regex = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
|
170
|
+
const ipv4CIDRRegex = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([1-9]|1[0-9]|2[0-9]|3[0-2]))$/;
|
|
171
|
+
// Matches 1:2:3:4:5:6:7:8
|
|
172
|
+
const ipV6Regex = /^(([0-9A-Fa-f]{1,4}:){7})([0-9A-Fa-f]{1,4})$/;
|
|
173
|
+
// Matches range from 1:2:3:4:5:6:7:8/1 to 1:2:3:4:5:6:7:8/128
|
|
174
|
+
const ipV6CIDRRegex = /^(([0-9A-Fa-f]{1,4}:){7})([0-9A-Fa-f]{1,4})\/([1-9]|[1-9][0-9]|10[0-9]|11[0-9]|12[0-8])$/;
|
|
175
|
+
// Matches
|
|
176
|
+
// 1:2:3:4:5:6:7:8
|
|
177
|
+
// 1:: (1:0:0:0:0:0:0:0)
|
|
178
|
+
// 1:2:3:4:5:6:7:: (1:2:3:4:5:6:7:0)
|
|
179
|
+
// 1::8 (1:0:0:0:0:0:0:8)
|
|
180
|
+
// 1:2:3:4:5:6::8 (1:2:3:4:5:6:0:8)
|
|
181
|
+
// 1::7:8 (1:0:0:0:0:0:7:8)
|
|
182
|
+
// 1:2:3:4:5::7:8 (1:2:3:4:5:0:7:8)
|
|
183
|
+
// ...
|
|
184
|
+
const ipV6ZeroCompressionRegex = /^(([0-9A-Fa-f]{1,4}:){7})([0-9A-Fa-f]{1,4})|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)$/;
|
|
185
|
+
const ipV6ZeroCompressionCIDRRegex = /^((([0-9A-Fa-f]{1,4}:){7})([0-9A-Fa-f]{1,4})|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/([1-9]|[1-9][0-9]|10[0-9]|11[0-9]|12[0-8])$/;
|
|
186
|
+
/**
|
|
187
|
+
* Validator factory for a IPV6 address.
|
|
188
|
+
|
|
189
|
+
*/
|
|
190
|
+
const ipV6Validator = (options) => {
|
|
191
|
+
return (control) => {
|
|
192
|
+
const value = control.value;
|
|
193
|
+
let valid;
|
|
194
|
+
if (options.cidr && options.zeroCompression) {
|
|
195
|
+
valid = value === '' || value?.match(ipV6ZeroCompressionCIDRRegex);
|
|
196
|
+
}
|
|
197
|
+
else if (options.cidr) {
|
|
198
|
+
valid = value === '' || value?.match(ipV6CIDRRegex);
|
|
199
|
+
}
|
|
200
|
+
else if (options.zeroCompression) {
|
|
201
|
+
valid =
|
|
202
|
+
(value === '' || value?.toString().match(ipV6ZeroCompressionRegex)) &&
|
|
203
|
+
value?.split('::').length <= 2;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
valid = value === '' || value?.toString().match(ipV6Regex);
|
|
207
|
+
}
|
|
208
|
+
return valid ? null : { ipv6Address: true };
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Validates a IPV4 address.
|
|
213
|
+
*/
|
|
214
|
+
const ipV4Validator = (control) => {
|
|
215
|
+
const v = control.value;
|
|
216
|
+
const valid = v === '' || v?.toString().match(ipv4Regex);
|
|
217
|
+
return valid ? null : { ipv4Address: true };
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Validates a IPV4 address including CIDR.
|
|
221
|
+
*/
|
|
222
|
+
const ipV4CIDRValidator = (control) => {
|
|
223
|
+
const v = control.value;
|
|
224
|
+
const valid = v === '' || v?.toString().match(ipv4CIDRRegex);
|
|
225
|
+
return valid ? null : { ipv4Address: true };
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Copyright Siemens 2016 - 2025.
|
|
230
|
+
* SPDX-License-Identifier: MIT
|
|
231
|
+
*/
|
|
232
|
+
const eventMap = new Map([
|
|
233
|
+
['insertText', 'insert'],
|
|
234
|
+
['insertFromPaste', 'paste'],
|
|
235
|
+
['deleteContentBackward', 'delete']
|
|
236
|
+
]);
|
|
237
|
+
/**
|
|
238
|
+
* Base directive for ip address input fields.
|
|
239
|
+
*/
|
|
240
|
+
class SiIpInputDirective {
|
|
241
|
+
static idCounter = 0;
|
|
242
|
+
elementRef = inject((ElementRef));
|
|
243
|
+
renderer = inject(Renderer2);
|
|
244
|
+
inputEl = this.elementRef.nativeElement;
|
|
245
|
+
/**
|
|
246
|
+
* @defaultValue
|
|
247
|
+
* ```
|
|
248
|
+
* `si-ip-input-${SiIpInputDirective.idCounter++}`
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
id = input(`si-ip-input-${SiIpInputDirective.idCounter++}`);
|
|
252
|
+
/**
|
|
253
|
+
* Enable CIDR (Classless Inter-Domain Routing) notation.
|
|
254
|
+
* @defaultValue false
|
|
255
|
+
*/
|
|
256
|
+
cidr = input(false, { transform: booleanAttribute });
|
|
257
|
+
/**
|
|
258
|
+
* Whether the ip address input is disabled.
|
|
259
|
+
* @defaultValue false
|
|
260
|
+
*/
|
|
261
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
262
|
+
disabledInput = input(false, { alias: 'disabled' });
|
|
263
|
+
disabledNgControl = signal(false);
|
|
264
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl());
|
|
265
|
+
onTouched = () => { };
|
|
266
|
+
onChange = () => { };
|
|
267
|
+
value = '';
|
|
268
|
+
registerOnChange(fn) {
|
|
269
|
+
this.onChange = fn;
|
|
270
|
+
}
|
|
271
|
+
registerOnTouched(fn) {
|
|
272
|
+
this.onTouched = fn;
|
|
273
|
+
}
|
|
274
|
+
setDisabledState(isDisabled) {
|
|
275
|
+
this.disabledNgControl.set(isDisabled);
|
|
276
|
+
}
|
|
277
|
+
writeValue(value) {
|
|
278
|
+
this.value = value;
|
|
279
|
+
this.renderer.setProperty(this.inputEl, 'value', value ?? '');
|
|
280
|
+
}
|
|
281
|
+
onInput(e) {
|
|
282
|
+
const el = e.target;
|
|
283
|
+
const selStart = el.selectionStart ?? 0;
|
|
284
|
+
const { inputType, data } = e;
|
|
285
|
+
const len = data?.length ?? 0;
|
|
286
|
+
this.maskInput({
|
|
287
|
+
value: el.value,
|
|
288
|
+
type: eventMap.get(inputType),
|
|
289
|
+
change: data,
|
|
290
|
+
pos: selStart - len,
|
|
291
|
+
previous: this.value
|
|
292
|
+
});
|
|
293
|
+
this.value = el.value;
|
|
294
|
+
this.onChange(this.value);
|
|
295
|
+
}
|
|
296
|
+
blur() {
|
|
297
|
+
this.onTouched();
|
|
298
|
+
}
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIpInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
300
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: SiIpInputDirective, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, cidr: { classPropertyName: "cidr", publicName: "cidr", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput($event)", "blur": "blur()" }, properties: { "id": "id()", "disabled": "disabled() || null" } }, providers: [
|
|
301
|
+
{
|
|
302
|
+
provide: SI_FORM_ITEM_CONTROL,
|
|
303
|
+
useExisting: SiIpInputDirective
|
|
304
|
+
}
|
|
305
|
+
], ngImport: i0 });
|
|
306
|
+
}
|
|
307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIpInputDirective, decorators: [{
|
|
308
|
+
type: Directive,
|
|
309
|
+
args: [{
|
|
310
|
+
providers: [
|
|
311
|
+
{
|
|
312
|
+
provide: SI_FORM_ITEM_CONTROL,
|
|
313
|
+
useExisting: SiIpInputDirective
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
host: {
|
|
317
|
+
'[id]': 'id()',
|
|
318
|
+
'[disabled]': 'disabled() || null'
|
|
319
|
+
}
|
|
320
|
+
}]
|
|
321
|
+
}], propDecorators: { onInput: [{
|
|
322
|
+
type: HostListener,
|
|
323
|
+
args: ['input', ['$event']]
|
|
324
|
+
}], blur: [{
|
|
325
|
+
type: HostListener,
|
|
326
|
+
args: ['blur']
|
|
327
|
+
}] } });
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Copyright Siemens 2016 - 2025.
|
|
331
|
+
* SPDX-License-Identifier: MIT
|
|
332
|
+
*/
|
|
333
|
+
class SiIp4InputDirective extends SiIpInputDirective {
|
|
334
|
+
validate(control) {
|
|
335
|
+
return this.cidr() ? ipV4CIDRValidator(control) : ipV4Validator(control);
|
|
336
|
+
}
|
|
337
|
+
maskInput(e) {
|
|
338
|
+
const { value, pos, type } = e;
|
|
339
|
+
const sections = splitIpV4Sections({ type, input: value, pos, cidr: this.cidr() });
|
|
340
|
+
this.renderer.setProperty(this.inputEl, 'value', sections
|
|
341
|
+
.splice(0, this.cidr() ? 9 : 7)
|
|
342
|
+
.map(s => s.value)
|
|
343
|
+
.join(''));
|
|
344
|
+
}
|
|
345
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIp4InputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
346
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiIp4InputDirective, isStandalone: true, selector: "input[siIpV4]", providers: [
|
|
347
|
+
{
|
|
348
|
+
provide: NG_VALUE_ACCESSOR,
|
|
349
|
+
useExisting: SiIp4InputDirective,
|
|
350
|
+
multi: true
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
provide: NG_VALIDATORS,
|
|
354
|
+
useExisting: SiIp4InputDirective,
|
|
355
|
+
multi: true
|
|
356
|
+
}
|
|
357
|
+
], exportAs: ["siIpV4"], usesInheritance: true, ngImport: i0 });
|
|
358
|
+
}
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIp4InputDirective, decorators: [{
|
|
360
|
+
type: Directive,
|
|
361
|
+
args: [{
|
|
362
|
+
selector: 'input[siIpV4]',
|
|
363
|
+
exportAs: 'siIpV4',
|
|
364
|
+
providers: [
|
|
365
|
+
{
|
|
366
|
+
provide: NG_VALUE_ACCESSOR,
|
|
367
|
+
useExisting: SiIp4InputDirective,
|
|
368
|
+
multi: true
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
provide: NG_VALIDATORS,
|
|
372
|
+
useExisting: SiIp4InputDirective,
|
|
373
|
+
multi: true
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}]
|
|
377
|
+
}] });
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Copyright Siemens 2016 - 2025.
|
|
381
|
+
* SPDX-License-Identifier: MIT
|
|
382
|
+
*/
|
|
383
|
+
class SiIp6InputDirective extends SiIpInputDirective {
|
|
384
|
+
validatorFn = computed(() => ipV6Validator({ zeroCompression: true, cidr: this.cidr() }));
|
|
385
|
+
validate(control) {
|
|
386
|
+
return this.validatorFn()(control);
|
|
387
|
+
}
|
|
388
|
+
maskInput(e) {
|
|
389
|
+
const { value, pos, type } = e;
|
|
390
|
+
if (!value) {
|
|
391
|
+
this.renderer.setProperty(this.inputEl, 'value', '');
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
// TODO: Restore cursor position
|
|
395
|
+
const sections = splitIpV6Sections({
|
|
396
|
+
type,
|
|
397
|
+
input: value,
|
|
398
|
+
pos,
|
|
399
|
+
zeroCompression: true,
|
|
400
|
+
cidr: this.cidr()
|
|
401
|
+
});
|
|
402
|
+
this.renderer.setProperty(this.inputEl, 'value', sections
|
|
403
|
+
.splice(0, this.cidr() ? 17 : 15)
|
|
404
|
+
.map(s => s.value)
|
|
405
|
+
.join(''));
|
|
406
|
+
}
|
|
407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIp6InputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
408
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: SiIp6InputDirective, isStandalone: true, selector: "input[siIpV6]", providers: [
|
|
409
|
+
{
|
|
410
|
+
provide: NG_VALUE_ACCESSOR,
|
|
411
|
+
useExisting: SiIp6InputDirective,
|
|
412
|
+
multi: true
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
provide: NG_VALIDATORS,
|
|
416
|
+
useExisting: SiIp6InputDirective,
|
|
417
|
+
multi: true
|
|
418
|
+
}
|
|
419
|
+
], exportAs: ["siIpV6"], usesInheritance: true, ngImport: i0 });
|
|
420
|
+
}
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiIp6InputDirective, decorators: [{
|
|
422
|
+
type: Directive,
|
|
423
|
+
args: [{
|
|
424
|
+
selector: 'input[siIpV6]',
|
|
425
|
+
exportAs: 'siIpV6',
|
|
426
|
+
providers: [
|
|
427
|
+
{
|
|
428
|
+
provide: NG_VALUE_ACCESSOR,
|
|
429
|
+
useExisting: SiIp6InputDirective,
|
|
430
|
+
multi: true
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
provide: NG_VALIDATORS,
|
|
434
|
+
useExisting: SiIp6InputDirective,
|
|
435
|
+
multi: true
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}]
|
|
439
|
+
}] });
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Copyright Siemens 2016 - 2025.
|
|
443
|
+
* SPDX-License-Identifier: MIT
|
|
444
|
+
*/
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Generated bundle index. Do not edit.
|
|
448
|
+
*/
|
|
449
|
+
|
|
450
|
+
export { SiIp4InputDirective, SiIp6InputDirective, ipV4CIDRValidator, ipV4Validator, ipV6Validator };
|
|
451
|
+
//# sourceMappingURL=siemens-element-ng-ip-input.mjs.map
|