@ptsecurity/mosaic 13.1.1 → 13.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +464 -165
- package/_visual.scss +419 -239
- package/button/button.component.d.ts +1 -1
- package/core/option/option.d.ts +1 -0
- package/core/validation/validation.d.ts +3 -3
- package/design-tokens/legacy-2017/tokens/components/alert.json5 +30 -30
- package/design-tokens/legacy-2017/tokens/components/badge.json5 +91 -101
- package/design-tokens/legacy-2017/tokens/components/button.json5 +53 -54
- package/design-tokens/legacy-2017/tokens/components/card.json5 +24 -24
- package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +10 -10
- package/design-tokens/legacy-2017/tokens/components/datepicker.json5 +4 -4
- package/design-tokens/legacy-2017/tokens/components/dl.json5 +38 -0
- package/design-tokens/legacy-2017/tokens/components/dropdown.json5 +2 -1
- package/design-tokens/legacy-2017/tokens/components/form-field.json5 +48 -8
- package/design-tokens/legacy-2017/tokens/components/forms.json5 +4 -4
- package/design-tokens/legacy-2017/tokens/components/input.json5 +2 -3
- package/design-tokens/legacy-2017/tokens/components/link.json5 +13 -19
- package/design-tokens/legacy-2017/tokens/components/list.json5 +3 -5
- package/design-tokens/legacy-2017/tokens/components/modal.json5 +10 -8
- package/design-tokens/legacy-2017/tokens/components/navbar.json5 +12 -11
- package/design-tokens/legacy-2017/tokens/components/popover.json5 +18 -18
- package/design-tokens/legacy-2017/tokens/components/popup.json5 +8 -8
- package/design-tokens/legacy-2017/tokens/components/progress-bar.json5 +2 -2
- package/design-tokens/legacy-2017/tokens/components/radio.json5 +12 -12
- package/design-tokens/legacy-2017/tokens/components/select.json5 +0 -1
- package/design-tokens/legacy-2017/tokens/components/sidepanel.json5 +6 -4
- package/design-tokens/legacy-2017/tokens/components/table.json5 +1 -1
- package/design-tokens/legacy-2017/tokens/components/tabs.json5 +82 -6
- package/design-tokens/legacy-2017/tokens/components/tags.json5 +49 -50
- package/design-tokens/legacy-2017/tokens/components/toggle.json5 +17 -17
- package/design-tokens/legacy-2017/tokens/components/tooltip.json5 +21 -21
- package/design-tokens/legacy-2017/tokens/components/tree.json5 +5 -2
- package/design-tokens/legacy-2017/tokens/properties/colors.json5 +35 -31
- package/design-tokens/legacy-2017/tokens/properties/globals.json5 +20 -1
- package/design-tokens/legacy-2017/tokens/properties/typography.json5 +70 -35
- package/design-tokens/legacy-2017/tokens.d.ts +155 -56
- package/design-tokens/pt-2022/tokens/components/alert.json5 +30 -30
- package/design-tokens/pt-2022/tokens/components/badge.json5 +92 -102
- package/design-tokens/pt-2022/tokens/components/button.json5 +54 -55
- package/design-tokens/pt-2022/tokens/components/card.json5 +24 -24
- package/design-tokens/pt-2022/tokens/components/checkbox.json5 +10 -10
- package/design-tokens/pt-2022/tokens/components/datepicker.json5 +4 -4
- package/design-tokens/pt-2022/tokens/components/dl.json5 +38 -0
- package/design-tokens/pt-2022/tokens/components/dropdown.json5 +2 -1
- package/design-tokens/pt-2022/tokens/components/form-field.json5 +48 -8
- package/design-tokens/pt-2022/tokens/components/forms.json5 +4 -4
- package/design-tokens/pt-2022/tokens/components/input.json5 +2 -3
- package/design-tokens/pt-2022/tokens/components/link.json5 +17 -23
- package/design-tokens/pt-2022/tokens/components/list.json5 +2 -4
- package/design-tokens/pt-2022/tokens/components/modal.json5 +10 -8
- package/design-tokens/pt-2022/tokens/components/navbar.json5 +14 -13
- package/design-tokens/pt-2022/tokens/components/popover.json5 +21 -21
- package/design-tokens/pt-2022/tokens/components/popup.json5 +8 -8
- package/design-tokens/pt-2022/tokens/components/progress-bar.json5 +1 -1
- package/design-tokens/pt-2022/tokens/components/radio.json5 +12 -12
- package/design-tokens/pt-2022/tokens/components/select.json5 +0 -1
- package/design-tokens/pt-2022/tokens/components/sidepanel.json5 +7 -5
- package/design-tokens/pt-2022/tokens/components/table.json5 +1 -1
- package/design-tokens/pt-2022/tokens/components/tabs.json5 +82 -6
- package/design-tokens/pt-2022/tokens/components/tags.json5 +49 -50
- package/design-tokens/pt-2022/tokens/components/toggle.json5 +18 -18
- package/design-tokens/pt-2022/tokens/components/tooltip.json5 +23 -23
- package/design-tokens/pt-2022/tokens/components/tree.json5 +5 -2
- package/design-tokens/pt-2022/tokens/properties/colors.json5 +37 -33
- package/design-tokens/pt-2022/tokens/properties/globals.json5 +20 -1
- package/design-tokens/pt-2022/tokens/properties/typography.json5 +69 -34
- package/design-tokens/pt-2022/tokens.d.ts +151 -52
- package/dl/README.md +0 -0
- package/dl/dl.component.d.ts +26 -0
- package/dl/dl.module.d.ts +10 -0
- package/dl/index.d.ts +1 -0
- package/dl/package.json +10 -0
- package/dl/ptsecurity-mosaic-dl.d.ts +5 -0
- package/dl/public-api.d.ts +2 -0
- package/esm2020/autocomplete/autocomplete-origin.directive.mjs +3 -3
- package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +3 -3
- package/esm2020/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2020/autocomplete/autocomplete.module.mjs +4 -4
- package/esm2020/button/button.component.mjs +29 -21
- package/esm2020/button/button.module.mjs +4 -4
- package/esm2020/button-toggle/button-toggle.component.mjs +6 -6
- package/esm2020/button-toggle/button-toggle.module.mjs +4 -4
- package/esm2020/card/card.component.mjs +3 -3
- package/esm2020/card/card.module.mjs +4 -4
- package/esm2020/checkbox/checkbox-module.mjs +4 -4
- package/esm2020/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2020/checkbox/checkbox.mjs +3 -3
- package/esm2020/core/common-behaviors/common-module.mjs +4 -4
- package/esm2020/core/error/error-options.mjs +6 -6
- package/esm2020/core/formatters/date/formatter.mjs +3 -3
- package/esm2020/core/formatters/index.mjs +4 -4
- package/esm2020/core/formatters/number/formatter.mjs +4 -4
- package/esm2020/core/forms/forms-module.mjs +4 -4
- package/esm2020/core/forms/forms.directive.mjs +6 -6
- package/esm2020/core/highlight/highlight.pipe.mjs +3 -3
- package/esm2020/core/highlight/index.mjs +4 -4
- package/esm2020/core/line/line.mjs +7 -7
- package/esm2020/core/option/action.mjs +3 -3
- package/esm2020/core/option/optgroup.mjs +3 -3
- package/esm2020/core/option/option-module.mjs +4 -4
- package/esm2020/core/option/option.mjs +10 -7
- package/esm2020/core/pop-up/pop-up-trigger.mjs +3 -3
- package/esm2020/core/pop-up/pop-up.mjs +3 -3
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +4 -4
- package/esm2020/core/services/measure-scrollbar.service.mjs +3 -3
- package/esm2020/core/validation/validation.mjs +10 -5
- package/esm2020/datepicker/calendar-body.component.mjs +3 -3
- package/esm2020/datepicker/calendar.component.mjs +6 -6
- package/esm2020/datepicker/datepicker-input.directive.mjs +3 -3
- package/esm2020/datepicker/datepicker-intl.mjs +3 -3
- package/esm2020/datepicker/datepicker-module.mjs +4 -4
- package/esm2020/datepicker/datepicker-toggle.component.mjs +6 -6
- package/esm2020/datepicker/datepicker.component.mjs +6 -6
- package/esm2020/datepicker/month-view.component.mjs +3 -3
- package/esm2020/datepicker/multi-year-view.component.mjs +3 -3
- package/esm2020/datepicker/year-view.component.mjs +3 -3
- package/esm2020/design-tokens/legacy-2017/tokens.mjs +156 -57
- package/esm2020/design-tokens/pt-2022/tokens.mjs +152 -53
- package/esm2020/divider/divider.component.mjs +3 -3
- package/esm2020/divider/divider.module.mjs +4 -4
- package/esm2020/dl/dl.component.mjs +78 -0
- package/esm2020/dl/dl.module.mjs +42 -0
- package/esm2020/dl/index.mjs +2 -0
- package/esm2020/dl/ptsecurity-mosaic-dl.mjs +5 -0
- package/esm2020/dl/public-api.mjs +3 -0
- package/esm2020/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2020/dropdown/dropdown-item.component.mjs +5 -5
- package/esm2020/dropdown/dropdown-trigger.directive.mjs +3 -3
- package/esm2020/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/dropdown/dropdown.module.mjs +4 -4
- package/esm2020/form-field/cleaner.mjs +3 -3
- package/esm2020/form-field/form-field.mjs +48 -28
- package/esm2020/form-field/form-field.module.mjs +10 -5
- package/esm2020/form-field/hint.mjs +6 -6
- package/esm2020/form-field/password-hint.mjs +134 -0
- package/esm2020/form-field/prefix.mjs +3 -3
- package/esm2020/form-field/public-api.mjs +2 -1
- package/esm2020/form-field/stepper.mjs +3 -3
- package/esm2020/form-field/suffix.mjs +3 -3
- package/esm2020/icon/icon.component.mjs +6 -6
- package/esm2020/icon/icon.module.mjs +4 -4
- package/esm2020/input/input-number-validators.mjs +6 -6
- package/esm2020/input/input-number.mjs +3 -3
- package/esm2020/input/input-password.mjs +368 -0
- package/esm2020/input/input.mjs +12 -11
- package/esm2020/input/input.module.mjs +50 -8
- package/esm2020/input/public-api.mjs +2 -1
- package/esm2020/link/link.component.mjs +3 -3
- package/esm2020/link/link.module.mjs +4 -4
- package/esm2020/list/list-selection.component.mjs +11 -11
- package/esm2020/list/list.component.mjs +7 -7
- package/esm2020/list/list.module.mjs +4 -4
- package/esm2020/modal/css-unit.pipe.mjs +3 -3
- package/esm2020/modal/modal-control.service.mjs +3 -3
- package/esm2020/modal/modal.component.mjs +4 -4
- package/esm2020/modal/modal.directive.mjs +12 -12
- package/esm2020/modal/modal.module.mjs +4 -4
- package/esm2020/modal/modal.service.mjs +3 -3
- package/esm2020/navbar/navbar-item.component.mjs +80 -79
- package/esm2020/navbar/navbar.component.mjs +10 -10
- package/esm2020/navbar/navbar.module.mjs +4 -4
- package/esm2020/navbar/vertical-navbar.component.mjs +6 -6
- package/esm2020/popover/popover-confirm.component.mjs +8 -8
- package/esm2020/popover/popover.component.mjs +8 -8
- package/esm2020/popover/popover.module.mjs +4 -4
- package/esm2020/progress-bar/progress-bar.component.mjs +3 -3
- package/esm2020/progress-bar/progress-bar.module.mjs +4 -4
- package/esm2020/progress-spinner/progress-spinner.component.mjs +3 -3
- package/esm2020/progress-spinner/progress-spinner.module.mjs +4 -4
- package/esm2020/radio/radio.component.mjs +6 -6
- package/esm2020/radio/radio.module.mjs +4 -4
- package/esm2020/select/public-api.mjs +2 -1
- package/esm2020/select/select-option.directive.mjs +65 -0
- package/esm2020/select/select.component.mjs +16 -16
- package/esm2020/select/select.module.mjs +19 -10
- package/esm2020/sidebar/sidebar.component.mjs +9 -9
- package/esm2020/sidebar/sidebar.module.mjs +4 -4
- package/esm2020/sidepanel/sidepanel-container.component.mjs +5 -5
- package/esm2020/sidepanel/sidepanel-directives.mjs +18 -18
- package/esm2020/sidepanel/sidepanel.module.mjs +4 -4
- package/esm2020/sidepanel/sidepanel.service.mjs +3 -3
- package/esm2020/splitter/splitter.component.mjs +12 -12
- package/esm2020/splitter/splitter.module.mjs +4 -4
- package/esm2020/table/table.component.mjs +3 -3
- package/esm2020/table/table.module.mjs +4 -4
- package/esm2020/tabs/paginated-tab-header.mjs +3 -3
- package/esm2020/tabs/tab-body.component.mjs +6 -6
- package/esm2020/tabs/tab-content.directive.mjs +3 -3
- package/esm2020/tabs/tab-group.component.mjs +20 -20
- package/esm2020/tabs/tab-header.component.mjs +4 -4
- package/esm2020/tabs/tab-label-wrapper.directive.mjs +3 -3
- package/esm2020/tabs/tab-label.directive.mjs +3 -3
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +9 -9
- package/esm2020/tabs/tab.component.mjs +3 -3
- package/esm2020/tabs/tabs.module.mjs +4 -4
- package/esm2020/tags/tag-input.mjs +3 -3
- package/esm2020/tags/tag-list.component.mjs +6 -6
- package/esm2020/tags/tag.component.mjs +60 -60
- package/esm2020/tags/tag.module.mjs +4 -4
- package/esm2020/textarea/textarea.component.mjs +9 -8
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/timepicker/timepicker.directive.mjs +3 -3
- package/esm2020/timepicker/timepicker.module.mjs +4 -4
- package/esm2020/toggle/toggle.component.mjs +3 -3
- package/esm2020/toggle/toggle.module.mjs +4 -4
- package/esm2020/tooltip/tooltip.component.mjs +14 -13
- package/esm2020/tooltip/tooltip.module.mjs +4 -4
- package/esm2020/tree/node.mjs +3 -3
- package/esm2020/tree/outlet.mjs +3 -3
- package/esm2020/tree/padding.directive.mjs +12 -9
- package/esm2020/tree/toggle.mjs +10 -10
- package/esm2020/tree/tree-base.mjs +6 -6
- package/esm2020/tree/tree-option.component.mjs +9 -9
- package/esm2020/tree/tree-selection.component.mjs +8 -6
- package/esm2020/tree/tree.mjs +3 -3
- package/esm2020/tree/tree.module.mjs +4 -4
- package/esm2020/tree-select/tree-select.component.mjs +14 -14
- package/esm2020/tree-select/tree-select.module.mjs +4 -4
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +13 -13
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +10 -10
- package/fesm2015/ptsecurity-mosaic-button.mjs +32 -24
- package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-card.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs +10 -10
- package/fesm2015/ptsecurity-mosaic-core.mjs +89 -81
- package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs +40 -40
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +443 -146
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-divider.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-dl.mjs +124 -0
- package/fesm2015/ptsecurity-mosaic-dl.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs +19 -19
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +214 -50
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-icon.mjs +10 -10
- package/fesm2015/ptsecurity-mosaic-input.mjs +434 -31
- package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-link.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-list.mjs +21 -21
- package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-modal.mjs +29 -29
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +97 -96
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-popover.mjs +18 -18
- package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-radio.mjs +10 -10
- package/fesm2015/ptsecurity-mosaic-select.mjs +99 -33
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-sidebar.mjs +13 -13
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +28 -28
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-splitter.mjs +16 -16
- package/fesm2015/ptsecurity-mosaic-table.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +56 -56
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tags.mjs +74 -74
- package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-textarea.mjs +11 -10
- package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-toggle.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs +17 -16
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +17 -17
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree.mjs +158 -155
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +13 -13
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +10 -10
- package/fesm2020/ptsecurity-mosaic-button.mjs +32 -24
- package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-card.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs +10 -10
- package/fesm2020/ptsecurity-mosaic-core.mjs +89 -81
- package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs +40 -40
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +443 -146
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-divider.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-dl.mjs +124 -0
- package/fesm2020/ptsecurity-mosaic-dl.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs +19 -19
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +200 -50
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-icon.mjs +10 -10
- package/fesm2020/ptsecurity-mosaic-input.mjs +427 -31
- package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-link.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-list.mjs +21 -21
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-modal.mjs +29 -29
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +97 -96
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-popover.mjs +18 -18
- package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-radio.mjs +10 -10
- package/fesm2020/ptsecurity-mosaic-select.mjs +96 -32
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs +13 -13
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +28 -28
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-splitter.mjs +16 -16
- package/fesm2020/ptsecurity-mosaic-table.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-tabs.mjs +56 -56
- package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tags.mjs +72 -72
- package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-textarea.mjs +11 -10
- package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-timepicker.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-toggle.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs +17 -16
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs +17 -17
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree.mjs +155 -152
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/form-field/form-field.d.ts +9 -2
- package/form-field/form-field.module.d.ts +8 -7
- package/form-field/password-hint.d.ts +40 -0
- package/form-field/public-api.d.ts +1 -0
- package/input/input-password.d.ts +121 -0
- package/input/input.d.ts +4 -3
- package/input/input.module.d.ts +7 -6
- package/input/public-api.d.ts +1 -0
- package/list/list-selection.component.d.ts +1 -1
- package/navbar/navbar-item.component.d.ts +18 -18
- package/package.json +12 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-visual/default-visual.css +1 -1
- package/select/public-api.d.ts +1 -0
- package/select/select-option.directive.d.ts +20 -0
- package/select/select.module.d.ts +9 -7
- package/tags/tag.component.d.ts +20 -20
- package/textarea/textarea.component.d.ts +4 -3
- package/toggle/README.md +0 -0
- package/tree/padding.directive.d.ts +7 -5
- package/tree/tree-option.component.d.ts +2 -2
@@ -1,16 +1,21 @@
|
|
1
|
+
import * as i3$1 from '@angular/cdk/a11y';
|
1
2
|
import { A11yModule } from '@angular/cdk/a11y';
|
2
3
|
import { CommonModule } from '@angular/common';
|
3
4
|
import * as i0 from '@angular/core';
|
4
|
-
import { InjectionToken, Directive, Optional, Self, Attribute, Input, Inject, forwardRef, NgModule } from '@angular/core';
|
5
|
+
import { InjectionToken, Directive, Optional, Self, Attribute, Input, Inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
5
6
|
import * as i1 from '@angular/forms';
|
6
7
|
import { NG_VALIDATORS, Validators, FormsModule } from '@angular/forms';
|
7
8
|
import * as i3 from '@ptsecurity/mosaic/core';
|
8
|
-
import { mixinErrorState, setMosaicValidation, MC_VALIDATION, McCommonModule } from '@ptsecurity/mosaic/core';
|
9
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
9
|
+
import { mixinErrorState, setMosaicValidation, MC_VALIDATION, PopUpTriggers, McCommonModule } from '@ptsecurity/mosaic/core';
|
10
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
10
11
|
import { getSupportedInputTypes } from '@angular/cdk/platform';
|
12
|
+
import * as i4 from '@ptsecurity/mosaic/form-field';
|
11
13
|
import { McFormFieldControl } from '@ptsecurity/mosaic/form-field';
|
12
14
|
import { Subject } from 'rxjs';
|
13
15
|
import { A, C, V, X, Z, F1, F12, ZERO, NINE, NUMPAD_ZERO, NUMPAD_NINE, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, UP_ARROW, DOWN_ARROW } from '@ptsecurity/cdk/keycodes';
|
16
|
+
import { McTooltipTrigger, MC_TOOLTIP_SCROLL_STRATEGY } from '@ptsecurity/mosaic/tooltip';
|
17
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
18
|
+
import * as i2 from '@angular/cdk/bidi';
|
14
19
|
|
15
20
|
function getMcInputUnsupportedTypeError(inputType) {
|
16
21
|
return Error(`Input type "${inputType}" isn't supported by mcInput.`);
|
@@ -135,9 +140,9 @@ class McNumberInput {
|
|
135
140
|
}
|
136
141
|
}
|
137
142
|
}
|
138
|
-
/** @nocollapse */ /** @nocollapse */ McNumberInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
139
|
-
/** @nocollapse */ /** @nocollapse */ McNumberInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
143
|
+
/** @nocollapse */ /** @nocollapse */ McNumberInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McNumberInput, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: 'step', attribute: true }, { token: 'big-step', attribute: true }, { token: 'min', attribute: true }, { token: 'max', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
|
144
|
+
/** @nocollapse */ /** @nocollapse */ McNumberInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: McNumberInput, selector: "input[mcInput][type=\"number\"]", inputs: { bigStep: "bigStep", step: "step", min: "min", max: "max" }, host: { listeners: { "blur": "focusChanged(false)", "focus": "focusChanged(true)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)" } }, exportAs: ["mcNumericalInput"], ngImport: i0 });
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McNumberInput, decorators: [{
|
141
146
|
type: Directive,
|
142
147
|
args: [{
|
143
148
|
selector: `input[mcInput][type="number"]`,
|
@@ -188,7 +193,7 @@ const MC_INPUT_INVALID_TYPES = [
|
|
188
193
|
'reset',
|
189
194
|
'submit'
|
190
195
|
];
|
191
|
-
let nextUniqueId = 0;
|
196
|
+
let nextUniqueId$1 = 0;
|
192
197
|
class McInputBase {
|
193
198
|
constructor(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl) {
|
194
199
|
this.defaultErrorStateMatcher = defaultErrorStateMatcher;
|
@@ -201,7 +206,7 @@ class McInputBase {
|
|
201
206
|
const McInputMixinBase = mixinErrorState(McInputBase);
|
202
207
|
class McInput extends McInputMixinBase {
|
203
208
|
// tslint:disable-next-line: naming-convention
|
204
|
-
constructor(elementRef, rawValidators, mcValidation, ngControl, numberInput, ngModel, formControlName, parentForm, parentFormGroup, defaultErrorStateMatcher, inputValueAccessor) {
|
209
|
+
constructor(elementRef, rawValidators, mcValidation, ngControl, numberInput, ngModel, formControlName, parentForm, parentFormGroup, defaultErrorStateMatcher, inputValueAccessor, changeDetectorRef) {
|
205
210
|
super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
206
211
|
this.elementRef = elementRef;
|
207
212
|
this.rawValidators = rawValidators;
|
@@ -209,6 +214,7 @@ class McInput extends McInputMixinBase {
|
|
209
214
|
this.numberInput = numberInput;
|
210
215
|
this.ngModel = ngModel;
|
211
216
|
this.formControlName = formControlName;
|
217
|
+
this.changeDetectorRef = changeDetectorRef;
|
212
218
|
/**
|
213
219
|
* Implemented as part of McFormFieldControl.
|
214
220
|
* @docs-private
|
@@ -224,7 +230,7 @@ class McInput extends McInputMixinBase {
|
|
224
230
|
* @docs-private
|
225
231
|
*/
|
226
232
|
this.controlType = 'input';
|
227
|
-
this.uid = `mc-input-${nextUniqueId++}`;
|
233
|
+
this.uid = `mc-input-${nextUniqueId$1++}`;
|
228
234
|
this.neverEmptyInputTypes = [
|
229
235
|
'date',
|
230
236
|
'datetime',
|
@@ -316,7 +322,7 @@ class McInput extends McInputMixinBase {
|
|
316
322
|
return;
|
317
323
|
}
|
318
324
|
if (this.mcValidation.useValidation) {
|
319
|
-
setMosaicValidation(this);
|
325
|
+
setMosaicValidation(this, this.changeDetectorRef);
|
320
326
|
}
|
321
327
|
}
|
322
328
|
ngOnChanges() {
|
@@ -404,11 +410,11 @@ class McInput extends McInputMixinBase {
|
|
404
410
|
return validity && validity.badInput;
|
405
411
|
}
|
406
412
|
}
|
407
|
-
/** @nocollapse */ /** @nocollapse */ McInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
408
|
-
/** @nocollapse */ /** @nocollapse */ McInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.
|
413
|
+
/** @nocollapse */ /** @nocollapse */ McInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInput, deps: [{ token: i0.ElementRef }, { token: NG_VALIDATORS, optional: true, self: true }, { token: MC_VALIDATION, optional: true }, { token: i1.NgControl, optional: true, self: true }, { token: McNumberInput, optional: true, self: true }, { token: i1.NgModel, optional: true, self: true }, { token: i1.FormControlName, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MC_INPUT_VALUE_ACCESSOR, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
414
|
+
/** @nocollapse */ /** @nocollapse */ McInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: McInput, selector: "input[mcInput]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", type: "type", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "onInput()" }, properties: { "attr.id": "id", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "mc-input" }, providers: [{
|
409
415
|
provide: McFormFieldControl, useExisting: McInput
|
410
416
|
}], exportAs: ["mcInput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInput, decorators: [{
|
412
418
|
type: Directive,
|
413
419
|
args: [{
|
414
420
|
selector: `input[mcInput]`,
|
@@ -469,7 +475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
469
475
|
}, {
|
470
476
|
type: Inject,
|
471
477
|
args: [MC_INPUT_VALUE_ACCESSOR]
|
472
|
-
}] }];
|
478
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
473
479
|
}, propDecorators: { errorStateMatcher: [{
|
474
480
|
type: Input
|
475
481
|
}], placeholder: [{
|
@@ -487,9 +493,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
487
493
|
}] } });
|
488
494
|
class McInputMono {
|
489
495
|
}
|
490
|
-
/** @nocollapse */ /** @nocollapse */ McInputMono.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
491
|
-
/** @nocollapse */ /** @nocollapse */ McInputMono.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.
|
492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
496
|
+
/** @nocollapse */ /** @nocollapse */ McInputMono.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputMono, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
497
|
+
/** @nocollapse */ /** @nocollapse */ McInputMono.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: McInputMono, selector: "input[mcInputMonospace]", host: { classAttribute: "mc-input_monospace" }, exportAs: ["McInputMonospace"], ngImport: i0 });
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputMono, decorators: [{
|
493
499
|
type: Directive,
|
494
500
|
args: [{
|
495
501
|
selector: 'input[mcInputMonospace]',
|
@@ -528,9 +534,9 @@ class MinValidator {
|
|
528
534
|
this.validator = Validators.min(parseInt(this.min, 10));
|
529
535
|
}
|
530
536
|
}
|
531
|
-
/** @nocollapse */ /** @nocollapse */ MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
532
|
-
/** @nocollapse */ /** @nocollapse */ MinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
537
|
+
/** @nocollapse */ /** @nocollapse */ MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: MinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
538
|
+
/** @nocollapse */ /** @nocollapse */ MinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: MinValidator, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: "min" }, host: { properties: { "attr.min": "min ? min : null" } }, providers: [MIN_VALIDATOR], usesOnChanges: true, ngImport: i0 });
|
539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: MinValidator, decorators: [{
|
534
540
|
type: Directive,
|
535
541
|
args: [{
|
536
542
|
selector: '[min][formControlName],[min][formControl],[min][ngModel]',
|
@@ -572,9 +578,9 @@ class MaxValidator {
|
|
572
578
|
this.validator = Validators.max(parseInt(this.max, 10));
|
573
579
|
}
|
574
580
|
}
|
575
|
-
/** @nocollapse */ /** @nocollapse */ MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
576
|
-
/** @nocollapse */ /** @nocollapse */ MaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.
|
577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
581
|
+
/** @nocollapse */ /** @nocollapse */ MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: MaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
582
|
+
/** @nocollapse */ /** @nocollapse */ MaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: "max" }, host: { properties: { "attr.max": "max ? max : null" } }, providers: [MAX_VALIDATOR], usesOnChanges: true, ngImport: i0 });
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: MaxValidator, decorators: [{
|
578
584
|
type: Directive,
|
579
585
|
args: [{
|
580
586
|
selector: '[max][formControlName],[max][formControl],[max][ngModel]',
|
@@ -587,17 +593,414 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
587
593
|
type: Input
|
588
594
|
}] } });
|
589
595
|
|
596
|
+
let nextUniqueId = 0;
|
597
|
+
class McPasswordToggle extends McTooltipTrigger {
|
598
|
+
constructor(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor, formField) {
|
599
|
+
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction);
|
600
|
+
this.focusMonitor = focusMonitor;
|
601
|
+
this.formField = formField;
|
602
|
+
this._tabIndex = 0;
|
603
|
+
this.trigger = `${PopUpTriggers.Hover}`;
|
604
|
+
this.runFocusMonitor();
|
605
|
+
}
|
606
|
+
get content() {
|
607
|
+
return this.formField.control.elementType === 'password' ?
|
608
|
+
this.mcTooltipHidden :
|
609
|
+
this._content;
|
610
|
+
}
|
611
|
+
set content(content) {
|
612
|
+
this._content = content;
|
613
|
+
this.updateData();
|
614
|
+
}
|
615
|
+
get disabled() {
|
616
|
+
return this._disabled === undefined ? this.formField.disabled : this._disabled;
|
617
|
+
}
|
618
|
+
set disabled(value) {
|
619
|
+
this._disabled = coerceBooleanProperty(value);
|
620
|
+
this._disabled ? this.stopFocusMonitor() : this.runFocusMonitor();
|
621
|
+
}
|
622
|
+
get tabIndex() {
|
623
|
+
return this.disabled ? -1 : this._tabIndex;
|
624
|
+
}
|
625
|
+
set tabIndex(value) {
|
626
|
+
// If the specified tabIndex value is null or undefined, fall back to the default value.
|
627
|
+
this._tabIndex = value != null ? coerceNumberProperty(value) : 0;
|
628
|
+
}
|
629
|
+
get hidden() {
|
630
|
+
return this.formField.control.elementType === 'password';
|
631
|
+
}
|
632
|
+
ngOnDestroy() {
|
633
|
+
this.stopFocusMonitor();
|
634
|
+
}
|
635
|
+
toggle() {
|
636
|
+
if (this.disabled) {
|
637
|
+
return;
|
638
|
+
}
|
639
|
+
this.hide();
|
640
|
+
const input = this.formField.control;
|
641
|
+
input.toggleType();
|
642
|
+
this.updateData();
|
643
|
+
}
|
644
|
+
runFocusMonitor() {
|
645
|
+
this.focusMonitor.monitor(this.elementRef)
|
646
|
+
.subscribe((origin) => {
|
647
|
+
if (origin === 'keyboard') {
|
648
|
+
this.show();
|
649
|
+
}
|
650
|
+
else if (origin === null) {
|
651
|
+
this.hide();
|
652
|
+
}
|
653
|
+
});
|
654
|
+
}
|
655
|
+
stopFocusMonitor() {
|
656
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
657
|
+
}
|
658
|
+
}
|
659
|
+
/** @nocollapse */ /** @nocollapse */ McPasswordToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McPasswordToggle, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i1$1.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: MC_TOOLTIP_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: i3$1.FocusMonitor }, { token: i4.McFormField }], target: i0.ɵɵFactoryTarget.Component });
|
660
|
+
/** @nocollapse */ /** @nocollapse */ McPasswordToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: McPasswordToggle, selector: "mc-password-toggle", inputs: { content: ["mcTooltipNotHidden", "content"], mcTooltipHidden: "mcTooltipHidden", disabled: "disabled", tabIndex: "tabIndex" }, host: { listeners: { "click": "toggle()", "keydown.ENTER": "toggle()", "keydown.SPACE": "toggle()" }, properties: { "class.mc-eye_16": "hidden", "class.mc-eye-crossed_16": "!hidden", "attr.tabindex": "disabled ? null : tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-password-toggle mc" }, exportAs: ["mcPasswordToggle"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McPasswordToggle, decorators: [{
|
662
|
+
type: Component,
|
663
|
+
args: [{
|
664
|
+
selector: `mc-password-toggle`,
|
665
|
+
exportAs: 'mcPasswordToggle',
|
666
|
+
template: '<ng-content></ng-content>',
|
667
|
+
host: {
|
668
|
+
class: 'mc-password-toggle mc',
|
669
|
+
'[class.mc-eye_16]': 'hidden',
|
670
|
+
'[class.mc-eye-crossed_16]': '!hidden',
|
671
|
+
'[attr.tabindex]': 'disabled ? null : tabIndex',
|
672
|
+
'[attr.disabled]': 'disabled || null',
|
673
|
+
'(click)': 'toggle()',
|
674
|
+
'(keydown.ENTER)': 'toggle()',
|
675
|
+
'(keydown.SPACE)': 'toggle()'
|
676
|
+
},
|
677
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
678
|
+
encapsulation: ViewEncapsulation.None
|
679
|
+
}]
|
680
|
+
}], ctorParameters: function () {
|
681
|
+
return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
682
|
+
type: Inject,
|
683
|
+
args: [MC_TOOLTIP_SCROLL_STRATEGY]
|
684
|
+
}] }, { type: i2.Directionality, decorators: [{
|
685
|
+
type: Optional
|
686
|
+
}] }, { type: i3$1.FocusMonitor }, { type: i4.McFormField }];
|
687
|
+
}, propDecorators: { content: [{
|
688
|
+
type: Input,
|
689
|
+
args: ['mcTooltipNotHidden']
|
690
|
+
}], mcTooltipHidden: [{
|
691
|
+
type: Input
|
692
|
+
}], disabled: [{
|
693
|
+
type: Input
|
694
|
+
}], tabIndex: [{
|
695
|
+
type: Input
|
696
|
+
}] } });
|
697
|
+
class McInputPassword extends McInputMixinBase {
|
698
|
+
// tslint:disable-next-line: naming-convention
|
699
|
+
constructor(elementRef, rawValidators, mcValidation, ngControl, ngModel, formControlName, parentForm, parentFormGroup, defaultErrorStateMatcher, inputValueAccessor, changeDetectorRef) {
|
700
|
+
super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
701
|
+
this.elementRef = elementRef;
|
702
|
+
this.rawValidators = rawValidators;
|
703
|
+
this.mcValidation = mcValidation;
|
704
|
+
this.ngModel = ngModel;
|
705
|
+
this.formControlName = formControlName;
|
706
|
+
this.changeDetectorRef = changeDetectorRef;
|
707
|
+
/**
|
708
|
+
* Implemented as part of McFormFieldControl.
|
709
|
+
* @docs-private
|
710
|
+
*/
|
711
|
+
this.focused = false;
|
712
|
+
/**
|
713
|
+
* Implemented as part of McFormFieldControl.
|
714
|
+
* @docs-private
|
715
|
+
*/
|
716
|
+
this.stateChanges = new Subject();
|
717
|
+
/**
|
718
|
+
* Implemented as part of McFormFieldControl.
|
719
|
+
* @docs-private
|
720
|
+
*/
|
721
|
+
this.controlType = 'input-password';
|
722
|
+
this.elementType = 'password';
|
723
|
+
this.uid = `mc-input-${nextUniqueId++}`;
|
724
|
+
this._disabled = false;
|
725
|
+
this._required = false;
|
726
|
+
// If no input value accessor was explicitly specified, use the element as the input value
|
727
|
+
// accessor.
|
728
|
+
this._inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement;
|
729
|
+
this.previousNativeValue = this.value;
|
730
|
+
// Force setter to be called in case id was not specified.
|
731
|
+
this.id = this.id;
|
732
|
+
}
|
733
|
+
/**
|
734
|
+
* Implemented as part of McFormFieldControl.
|
735
|
+
* @docs-private
|
736
|
+
*/
|
737
|
+
get disabled() {
|
738
|
+
var _a;
|
739
|
+
if (((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.disabled) !== null) {
|
740
|
+
return this.ngControl.disabled;
|
741
|
+
}
|
742
|
+
return this._disabled;
|
743
|
+
}
|
744
|
+
set disabled(value) {
|
745
|
+
this._disabled = coerceBooleanProperty(value);
|
746
|
+
// Browsers may not fire the blur event if the input is disabled too quickly.
|
747
|
+
// Reset from here to ensure that the element doesn't become stuck.
|
748
|
+
if (this.focused) {
|
749
|
+
this.focused = false;
|
750
|
+
this.stateChanges.next();
|
751
|
+
}
|
752
|
+
}
|
753
|
+
/**
|
754
|
+
* Implemented as part of McFormFieldControl.
|
755
|
+
* @docs-private
|
756
|
+
*/
|
757
|
+
get id() {
|
758
|
+
return this._id;
|
759
|
+
}
|
760
|
+
set id(value) {
|
761
|
+
this._id = value || this.uid;
|
762
|
+
}
|
763
|
+
/**
|
764
|
+
* Implemented as part of McFormFieldControl.
|
765
|
+
* @docs-private
|
766
|
+
*/
|
767
|
+
get required() {
|
768
|
+
return this._required;
|
769
|
+
}
|
770
|
+
set required(value) {
|
771
|
+
this._required = coerceBooleanProperty(value);
|
772
|
+
}
|
773
|
+
// this.elementRef.nativeElement.type = this._type;
|
774
|
+
/**
|
775
|
+
* Implemented as part of McFormFieldControl.
|
776
|
+
* @docs-private
|
777
|
+
*/
|
778
|
+
get value() {
|
779
|
+
return this._inputValueAccessor.value;
|
780
|
+
}
|
781
|
+
set value(value) {
|
782
|
+
if (value === this.value) {
|
783
|
+
return;
|
784
|
+
}
|
785
|
+
this._inputValueAccessor.value = value;
|
786
|
+
this.stateChanges.next();
|
787
|
+
}
|
788
|
+
ngAfterContentInit() {
|
789
|
+
if (!this.ngControl) {
|
790
|
+
return;
|
791
|
+
}
|
792
|
+
if (this.mcValidation.useValidation) {
|
793
|
+
setMosaicValidation(this, this.changeDetectorRef);
|
794
|
+
}
|
795
|
+
}
|
796
|
+
ngOnChanges() {
|
797
|
+
this.stateChanges.next();
|
798
|
+
}
|
799
|
+
ngOnDestroy() {
|
800
|
+
this.stateChanges.complete();
|
801
|
+
}
|
802
|
+
ngDoCheck() {
|
803
|
+
if (this.ngControl) {
|
804
|
+
// We need to re-evaluate this on every change detection cycle, because there are some
|
805
|
+
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
806
|
+
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
807
|
+
this.updateErrorState();
|
808
|
+
}
|
809
|
+
// We need to dirty-check the native element's value, because there are some cases where
|
810
|
+
// we won't be notified when it changes (e.g. the consumer isn't using forms or they're
|
811
|
+
// updating the value using `emitEvent: false`).
|
812
|
+
this.dirtyCheckNativeValue();
|
813
|
+
}
|
814
|
+
toggleType() {
|
815
|
+
this.elementType = this.elementType === 'password' ? 'text' : 'password';
|
816
|
+
}
|
817
|
+
/** Focuses the input. */
|
818
|
+
focus() {
|
819
|
+
this.elementRef.nativeElement.focus();
|
820
|
+
}
|
821
|
+
onBlur() {
|
822
|
+
var _a;
|
823
|
+
if ((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) {
|
824
|
+
const control = this.ngControl.control;
|
825
|
+
control.updateValueAndValidity({ emitEvent: false });
|
826
|
+
control.statusChanges.emit(control.status);
|
827
|
+
}
|
828
|
+
this.focusChanged(false);
|
829
|
+
}
|
830
|
+
/** Callback for the cases where the focused state of the input changes. */
|
831
|
+
focusChanged(isFocused) {
|
832
|
+
if (isFocused === this.focused) {
|
833
|
+
return;
|
834
|
+
}
|
835
|
+
this.focused = isFocused;
|
836
|
+
this.stateChanges.next({ focused: this.focused });
|
837
|
+
}
|
838
|
+
onInput() {
|
839
|
+
// This is a noop function and is used to let Angular know whenever the value changes.
|
840
|
+
// Angular will run a new change detection each time the `input` event has been dispatched.
|
841
|
+
// It's necessary that Angular recognizes the value change, because when floatingLabel
|
842
|
+
// is set to false and Angular forms aren't used, the placeholder won't recognize the
|
843
|
+
// value changes and will not disappear.
|
844
|
+
// Listening to the input event wouldn't be necessary when the input is using the
|
845
|
+
// FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
|
846
|
+
}
|
847
|
+
/**
|
848
|
+
* Implemented as part of McFormFieldControl.
|
849
|
+
* @docs-private
|
850
|
+
*/
|
851
|
+
get empty() {
|
852
|
+
return !this.elementRef.nativeElement.value && !this.isBadInput();
|
853
|
+
}
|
854
|
+
/**
|
855
|
+
* Implemented as part of McFormFieldControl.
|
856
|
+
* @docs-private
|
857
|
+
*/
|
858
|
+
onContainerClick() {
|
859
|
+
this.focus();
|
860
|
+
}
|
861
|
+
/** Does some manual dirty checking on the native input `value` property. */
|
862
|
+
dirtyCheckNativeValue() {
|
863
|
+
if (this.previousNativeValue !== this.value) {
|
864
|
+
this.previousNativeValue = this.value;
|
865
|
+
this.stateChanges.next();
|
866
|
+
}
|
867
|
+
}
|
868
|
+
/** Checks whether the input is invalid based on the native validation. */
|
869
|
+
isBadInput() {
|
870
|
+
var _a;
|
871
|
+
// The `validity` property won't be present on platform-server.
|
872
|
+
return (_a = this.elementRef.nativeElement.validity) === null || _a === void 0 ? void 0 : _a.badInput;
|
873
|
+
}
|
874
|
+
}
|
875
|
+
/** @nocollapse */ /** @nocollapse */ McInputPassword.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputPassword, deps: [{ token: i0.ElementRef }, { token: NG_VALIDATORS, optional: true, self: true }, { token: MC_VALIDATION, optional: true }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgModel, optional: true, self: true }, { token: i1.FormControlName, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MC_INPUT_VALUE_ACCESSOR, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
876
|
+
/** @nocollapse */ /** @nocollapse */ McInputPassword.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.4", type: McInputPassword, selector: "input[mcInputPassword]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "onInput()" }, properties: { "attr.id": "id", "attr.type": "elementType", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "mc-input mc-input-password" }, providers: [{
|
877
|
+
provide: McFormFieldControl, useExisting: McInputPassword
|
878
|
+
}], exportAs: ["mcInputPassword"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputPassword, decorators: [{
|
880
|
+
type: Directive,
|
881
|
+
args: [{
|
882
|
+
selector: `input[mcInputPassword]`,
|
883
|
+
exportAs: 'mcInputPassword',
|
884
|
+
host: {
|
885
|
+
class: 'mc-input mc-input-password',
|
886
|
+
// Native input properties that are overwritten by Angular inputs need to be synced with
|
887
|
+
// the native input element. Otherwise property bindings for those don't work.
|
888
|
+
'[attr.id]': 'id',
|
889
|
+
'[attr.type]': 'elementType',
|
890
|
+
'[attr.placeholder]': 'placeholder',
|
891
|
+
'[attr.disabled]': 'disabled || null',
|
892
|
+
'[required]': 'required',
|
893
|
+
'(blur)': 'onBlur()',
|
894
|
+
'(focus)': 'focusChanged(true)',
|
895
|
+
'(input)': 'onInput()'
|
896
|
+
},
|
897
|
+
providers: [{
|
898
|
+
provide: McFormFieldControl, useExisting: McInputPassword
|
899
|
+
}]
|
900
|
+
}]
|
901
|
+
}], ctorParameters: function () {
|
902
|
+
return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
903
|
+
type: Optional
|
904
|
+
}, {
|
905
|
+
type: Self
|
906
|
+
}, {
|
907
|
+
type: Inject,
|
908
|
+
args: [NG_VALIDATORS]
|
909
|
+
}] }, { type: undefined, decorators: [{
|
910
|
+
type: Optional
|
911
|
+
}, {
|
912
|
+
type: Inject,
|
913
|
+
args: [MC_VALIDATION]
|
914
|
+
}] }, { type: i1.NgControl, decorators: [{
|
915
|
+
type: Optional
|
916
|
+
}, {
|
917
|
+
type: Self
|
918
|
+
}] }, { type: i1.NgModel, decorators: [{
|
919
|
+
type: Optional
|
920
|
+
}, {
|
921
|
+
type: Self
|
922
|
+
}] }, { type: i1.FormControlName, decorators: [{
|
923
|
+
type: Optional
|
924
|
+
}, {
|
925
|
+
type: Self
|
926
|
+
}] }, { type: i1.NgForm, decorators: [{
|
927
|
+
type: Optional
|
928
|
+
}] }, { type: i1.FormGroupDirective, decorators: [{
|
929
|
+
type: Optional
|
930
|
+
}] }, { type: i3.ErrorStateMatcher }, { type: undefined, decorators: [{
|
931
|
+
type: Optional
|
932
|
+
}, {
|
933
|
+
type: Self
|
934
|
+
}, {
|
935
|
+
type: Inject,
|
936
|
+
args: [MC_INPUT_VALUE_ACCESSOR]
|
937
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
938
|
+
}, propDecorators: { errorStateMatcher: [{
|
939
|
+
type: Input
|
940
|
+
}], placeholder: [{
|
941
|
+
type: Input
|
942
|
+
}], disabled: [{
|
943
|
+
type: Input
|
944
|
+
}], id: [{
|
945
|
+
type: Input
|
946
|
+
}], required: [{
|
947
|
+
type: Input
|
948
|
+
}], value: [{
|
949
|
+
type: Input
|
950
|
+
}] } });
|
951
|
+
|
590
952
|
class McInputModule {
|
591
953
|
}
|
592
|
-
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
593
|
-
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
594
|
-
|
595
|
-
|
954
|
+
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
955
|
+
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputModule, declarations: [McInput,
|
956
|
+
McNumberInput,
|
957
|
+
McInputPassword,
|
958
|
+
McPasswordToggle,
|
959
|
+
McInputMono,
|
960
|
+
MinValidator,
|
961
|
+
MaxValidator], imports: [CommonModule,
|
962
|
+
A11yModule,
|
963
|
+
McCommonModule,
|
964
|
+
FormsModule], exports: [McInput,
|
965
|
+
McNumberInput,
|
966
|
+
McInputPassword,
|
967
|
+
McPasswordToggle,
|
968
|
+
McInputMono,
|
969
|
+
MinValidator,
|
970
|
+
MaxValidator] });
|
971
|
+
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputModule, imports: [[
|
972
|
+
CommonModule,
|
973
|
+
A11yModule,
|
974
|
+
McCommonModule,
|
975
|
+
FormsModule
|
976
|
+
]] });
|
977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: McInputModule, decorators: [{
|
596
978
|
type: NgModule,
|
597
979
|
args: [{
|
598
|
-
imports: [
|
599
|
-
|
600
|
-
|
980
|
+
imports: [
|
981
|
+
CommonModule,
|
982
|
+
A11yModule,
|
983
|
+
McCommonModule,
|
984
|
+
FormsModule
|
985
|
+
],
|
986
|
+
declarations: [
|
987
|
+
McInput,
|
988
|
+
McNumberInput,
|
989
|
+
McInputPassword,
|
990
|
+
McPasswordToggle,
|
991
|
+
McInputMono,
|
992
|
+
MinValidator,
|
993
|
+
MaxValidator
|
994
|
+
],
|
995
|
+
exports: [
|
996
|
+
McInput,
|
997
|
+
McNumberInput,
|
998
|
+
McInputPassword,
|
999
|
+
McPasswordToggle,
|
1000
|
+
McInputMono,
|
1001
|
+
MinValidator,
|
1002
|
+
MaxValidator
|
1003
|
+
]
|
601
1004
|
}]
|
602
1005
|
}] });
|
603
1006
|
|
@@ -605,5 +1008,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
605
1008
|
* Generated bundle index. Do not edit.
|
606
1009
|
*/
|
607
1010
|
|
608
|
-
export { BIG_STEP, MAX_VALIDATOR, MC_INPUT_VALUE_ACCESSOR, MIN_VALIDATOR, MaxValidator, McInput, McInputBase, McInputMixinBase, McInputModule, McInputMono, McNumberInput, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
|
1011
|
+
export { BIG_STEP, MAX_VALIDATOR, MC_INPUT_VALUE_ACCESSOR, MIN_VALIDATOR, MaxValidator, McInput, McInputBase, McInputMixinBase, McInputModule, McInputMono, McInputPassword, McNumberInput, McPasswordToggle, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
|
609
1012
|
//# sourceMappingURL=ptsecurity-mosaic-input.mjs.map
|