@ptsecurity/mosaic 13.1.1 → 13.2.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/_theming.scss +321 -121
- package/_visual.scss +79 -26
- package/design-tokens/legacy-2017/tokens/components/badge.json5 +28 -38
- package/design-tokens/legacy-2017/tokens/components/dl.json5 +38 -0
- package/design-tokens/legacy-2017/tokens/components/form-field.json5 +39 -0
- package/design-tokens/legacy-2017/tokens/components/tabs.json5 +80 -4
- package/design-tokens/legacy-2017/tokens/properties/colors.json5 +4 -0
- package/design-tokens/legacy-2017/tokens/properties/globals.json5 +20 -1
- package/design-tokens/legacy-2017/tokens.d.ts +79 -26
- package/design-tokens/pt-2022/tokens/components/badge.json5 +30 -40
- package/design-tokens/pt-2022/tokens/components/dl.json5 +38 -0
- package/design-tokens/pt-2022/tokens/components/form-field.json5 +40 -1
- package/design-tokens/pt-2022/tokens/components/tabs.json5 +82 -6
- package/design-tokens/pt-2022/tokens/properties/colors.json5 +4 -0
- package/design-tokens/pt-2022/tokens/properties/globals.json5 +20 -1
- package/design-tokens/pt-2022/tokens.d.ts +79 -26
- 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/design-tokens/legacy-2017/tokens.mjs +80 -27
- package/esm2020/design-tokens/pt-2022/tokens.mjs +80 -27
- 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/form-field/form-field.mjs +44 -24
- package/esm2020/form-field/form-field.module.mjs +6 -1
- package/esm2020/form-field/hint.mjs +3 -3
- package/esm2020/form-field/password-hint.mjs +115 -0
- package/esm2020/form-field/public-api.mjs +2 -1
- package/esm2020/input/input-password.mjs +367 -0
- package/esm2020/input/input.module.mjs +48 -6
- package/esm2020/input/public-api.mjs +2 -1
- package/esm2020/sidepanel/sidepanel-directives.mjs +3 -3
- package/esm2020/tabs/tab-group.component.mjs +3 -3
- package/esm2020/tabs/tab-header.component.mjs +2 -2
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +5 -5
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +238 -79
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-dl.mjs +124 -0
- package/fesm2015/ptsecurity-mosaic-dl.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +169 -27
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-input.mjs +412 -11
- package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +8 -8
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +238 -79
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-dl.mjs +124 -0
- package/fesm2020/ptsecurity-mosaic-dl.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +158 -27
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-input.mjs +405 -11
- package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tabs.mjs +8 -8
- package/fesm2020/ptsecurity-mosaic-tabs.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 +38 -0
- package/form-field/public-api.d.ts +1 -0
- package/input/input-password.d.ts +120 -0
- package/input/input.module.d.ts +7 -6
- package/input/public-api.d.ts +1 -0
- package/package.json +12 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ptsecurity-mosaic-form-field.mjs","sources":["../../../packages/mosaic/form-field/cleaner.ts","../../../packages/mosaic/form-field/form-field-control.ts","../../../packages/mosaic/form-field/form-field-errors.ts","../../../packages/mosaic/form-field/hint.ts","../../../packages/mosaic/form-field/prefix.ts","../../../packages/mosaic/form-field/stepper.ts","../../../packages/mosaic/form-field/suffix.ts","../../../packages/mosaic/form-field/form-field.ts","../../../packages/mosaic/form-field/form-field.html","../../../packages/mosaic/form-field/form-field.module.ts","../../../packages/mosaic/form-field/ptsecurity-mosaic-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { ThemePalette } from '@ptsecurity/mosaic/core';\n\n\n@Component({\n selector: 'mc-cleaner',\n exportAs: 'mcCleaner',\n template: `<i class=\"mc-icon_light\" mc-icon=\"mc-close-circle_16\" [color]=\"themePalette.Second\"></i>`,\n host: {\n class: 'mc-cleaner'\n }\n})\nexport class McCleaner {\n themePalette = ThemePalette;\n}\n","import { NgControl } from '@angular/forms';\nimport { Observable } from 'rxjs';\n\n\n/** An interface which allows a control to work inside of a `MсFormField`. */\n// tslint:disable-next-line:naming-convention\nexport abstract class McFormFieldControl<T> {\n /** The value of the control. */\n value: T | null;\n\n /**\n * Stream that emits whenever the state of the control changes such that the parent `MсFormField`\n * needs to run change detection.\n */\n readonly stateChanges: Observable<void>;\n\n /** The element ID for this control. */\n readonly id: string;\n\n /** The placeholder for this control. */\n readonly placeholder: string;\n\n /** Gets the NgControl for this control. */\n readonly ngControl: NgControl | null;\n\n /** Whether the control is focused. */\n readonly focused: boolean;\n\n /** Whether the control is empty. */\n readonly empty: boolean;\n\n /** Whether the control is required. */\n readonly required: boolean;\n\n /** Whether the control is disabled. */\n readonly disabled: boolean;\n\n /** Whether the control is in an error state. */\n readonly errorState: boolean;\n\n /**\n * An optional name for the control type that can be used to distinguish `mc-form-field` elements\n * based on their control type. The form field will add a class,\n * `mc-form-field-type-{{controlType}}` to its root element.\n */\n readonly controlType?: string;\n\n /** Handles a click on the control's container. */\n abstract onContainerClick(event: MouseEvent): void;\n\n abstract focus(): void;\n}\n","export function getMcFormFieldMissingControlError(): Error {\n return Error('mc-form-field must contain a McFormFieldControl.');\n}\n\nexport function getMcFormFieldYouCanNotUseCleanerInNumberInputError(): Error {\n return Error(`You can't use mc-cleaner with input that have type=\"number\"`);\n}\n","import { Directive, Input } from '@angular/core';\n\n\nlet nextUniqueId = 0;\n\n@Directive({\n selector: 'mc-hint',\n host: {\n class: 'mc-hint',\n '[attr.id]': 'id'\n }\n})\nexport class McHint {\n @Input() id: string = `mc-hint-${nextUniqueId++}`;\n}\n","import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: '[mcPrefix]'\n})\nexport class McPrefix {}\n","import { Component, EventEmitter, Output } from '@angular/core';\n\n\n@Component({\n selector: 'mc-stepper',\n template: `\n <i class=\"mc mc-icon mc-icon_light mc-second mc-stepper-step-up mc-angle-down-L_16\"\n (mousedown)=\"onStepUp($event)\">\n </i>\n <i class=\"mc mc-icon mc-icon_light mc-second mc-stepper-step-down mc-angle-down-L_16\"\n (mousedown)=\"onStepDown($event)\">\n </i>\n `\n})\nexport class McStepper {\n @Output()\n readonly stepUp: EventEmitter<void> = new EventEmitter<void>();\n @Output()\n readonly stepDown: EventEmitter<void> = new EventEmitter<void>();\n\n connectTo(numberInput: any) {\n if (!numberInput) { return; }\n\n this.stepUp.subscribe(() => {\n numberInput.stepUp(numberInput.step);\n });\n\n this.stepDown.subscribe(() => {\n numberInput.stepDown(numberInput.step);\n });\n }\n\n onStepUp($event: MouseEvent) {\n this.stepUp.emit();\n $event.preventDefault();\n }\n\n onStepDown($event: MouseEvent) {\n this.stepDown.emit();\n $event.preventDefault();\n }\n}\n","import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: '[mcSuffix]'\n})\nexport class McSuffix {}\n","import {\n AfterContentChecked,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n OnDestroy,\n QueryList,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { ESCAPE } from '@ptsecurity/cdk/keycodes';\nimport { CanColor, CanColorCtor, mixinColor } from '@ptsecurity/mosaic/core';\nimport { EMPTY, merge, Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { McCleaner } from './cleaner';\nimport { McFormFieldControl } from './form-field-control';\nimport {\n getMcFormFieldMissingControlError,\n getMcFormFieldYouCanNotUseCleanerInNumberInputError\n} from './form-field-errors';\nimport { McHint } from './hint';\nimport { McPrefix } from './prefix';\nimport { McStepper } from './stepper';\nimport { McSuffix } from './suffix';\n\n\nlet nextUniqueId = 0;\n\nexport class McFormFieldBase {\n // tslint:disable-next-line:naming-convention\n constructor(public _elementRef: ElementRef) {}\n}\n\n// tslint:disable-next-line:naming-convention\nexport const McFormFieldMixinBase: CanColorCtor & typeof McFormFieldBase = mixinColor(McFormFieldBase);\n\n@Component({\n selector: 'mc-form-field',\n exportAs: 'mcFormField',\n templateUrl: 'form-field.html',\n // McInput is a directive and can't have styles, so we need to include its styles here.\n // The McInput styles are fairly minimal so it shouldn't be a big deal for people who\n // aren't using McInput.\n styleUrls: [\n 'form-field.scss',\n '../input/input.scss',\n '../timepicker/timepicker.scss',\n '../datepicker/datepicker-input.scss',\n '../textarea/textarea.scss'\n ],\n host: {\n class: 'mc-form-field',\n '[class.mc-form-field_invalid]': 'control.errorState',\n '[class.mc-form-field_has-prefix]': 'hasPrefix',\n '[class.mc-form-field_has-suffix]': 'hasSuffix',\n '[class.mc-form-field_has-cleaner]': 'canShowCleaner',\n '[class.mc-form-field_has-stepper]': 'canShowStepper',\n '[class.mc-disabled]': 'control.disabled',\n '[class.mc-focused]': 'control.focused',\n '[class.ng-untouched]': 'shouldForward(\"untouched\")',\n '[class.ng-touched]': 'shouldForward(\"touched\")',\n '[class.ng-pristine]': 'shouldForward(\"pristine\")',\n '[class.ng-dirty]': 'shouldForward(\"dirty\")',\n '[class.ng-valid]': 'shouldForward(\"valid\")',\n '[class.ng-invalid]': 'shouldForward(\"invalid\")',\n '[class.ng-pending]': 'shouldForward(\"pending\")',\n '(keydown)': 'onKeyDown($event)',\n '(mouseenter)': 'onHoverChanged(true)',\n '(mouseleave)': 'onHoverChanged(false)'\n },\n inputs: ['color'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class McFormField extends McFormFieldMixinBase implements\n AfterContentInit, AfterContentChecked, AfterViewInit, CanColor, OnDestroy {\n\n @ContentChild(McFormFieldControl, { static: false }) control: McFormFieldControl<any>;\n @ContentChild(McStepper, { static: false }) stepper: McStepper;\n @ContentChild(McCleaner, { static: false }) cleaner: McCleaner | null;\n\n @ContentChildren(McHint) hint: QueryList<McHint>;\n @ContentChildren(McSuffix) suffix: QueryList<McSuffix>;\n @ContentChildren(McPrefix) prefix: QueryList<McPrefix>;\n\n @ViewChild('connectionContainer', { static: true }) connectionContainerRef: ElementRef;\n\n // Unique id for the internal form field label.\n labelId = `mc-form-field-label-${nextUniqueId++}`;\n\n hovered: boolean = false;\n\n canCleanerClearByEsc: boolean = true;\n\n private $unsubscribe = new Subject<void>();\n\n get hasHint(): boolean {\n return this.hint && this.hint.length > 0;\n }\n\n get hasSuffix(): boolean {\n return this.suffix && this.suffix.length > 0;\n }\n\n get hasPrefix(): boolean {\n return this.prefix && this.prefix.length > 0;\n }\n\n get hasCleaner(): boolean {\n return !!this.cleaner;\n }\n\n get hasStepper(): boolean {\n return !!this.stepper;\n }\n\n get canShowCleaner(): boolean {\n return this.hasCleaner &&\n this.control &&\n this.control.ngControl\n ? this.control.ngControl.value && !this.control.disabled\n : false;\n }\n\n get disabled(): boolean {\n return this.control && this.control.disabled;\n }\n\n get canShowStepper(): boolean {\n return this.hasStepper &&\n !this.disabled &&\n (this.control?.focused || this.hovered);\n }\n\n // tslint:disable-next-line:naming-convention\n constructor(public _elementRef: ElementRef, private _changeDetectorRef: ChangeDetectorRef) {\n super(_elementRef);\n }\n\n ngAfterContentInit() {\n if ((this.control as any).numberInput && this.hasCleaner) {\n this.cleaner = null;\n throw getMcFormFieldYouCanNotUseCleanerInNumberInputError();\n }\n\n this.validateControlChild();\n\n if (this.control.controlType) {\n this._elementRef.nativeElement.classList.add(`mc-form-field-type-${this.control.controlType}`);\n }\n\n // Subscribe to changes in the child control state in order to update the form field UI.\n this.control.stateChanges\n .pipe(startWith())\n .subscribe(() => {\n this._changeDetectorRef.markForCheck();\n });\n\n if (this.hasStepper) {\n this.stepper.connectTo((this.control as any).numberInput);\n }\n\n // Run change detection if the value changes.\n const valueChanges = this.control.ngControl && this.control.ngControl.valueChanges || EMPTY;\n\n merge(valueChanges)\n .pipe(takeUntil(this.$unsubscribe))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngAfterContentChecked() {\n this.validateControlChild();\n }\n\n ngAfterViewInit() {\n // Avoid animations on load.\n this._changeDetectorRef.detectChanges();\n }\n\n clearValue($event) {\n $event.stopPropagation();\n\n if (this.control && this.control.ngControl) {\n this.control.ngControl.reset();\n this.control.focus();\n }\n }\n\n onContainerClick($event) {\n if (this.control.onContainerClick) {\n this.control.onContainerClick($event);\n }\n }\n\n onKeyDown(event: KeyboardEvent): void {\n // tslint:disable-next-line:deprecation\n if (this.canCleanerClearByEsc && event.keyCode === ESCAPE && this.control.focused && this.hasCleaner) {\n if (this.control && this.control.ngControl) {\n this.control.ngControl.reset();\n }\n\n event.preventDefault();\n }\n }\n\n onHoverChanged(isHovered: boolean) {\n if (isHovered !== this.hovered) {\n this.hovered = isHovered;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /**\n * Gets an ElementRef for the element that a overlay attached to the form-field should be\n * positioned relative to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this.connectionContainerRef || this._elementRef;\n }\n\n /** Determines whether a class from the NgControl should be forwarded to the host element. */\n shouldForward(prop: keyof NgControl): boolean {\n const ngControl = this.control ? this.control.ngControl : null;\n\n return ngControl && ngControl[prop];\n }\n\n ngOnDestroy(): void {\n this.$unsubscribe.next();\n this.$unsubscribe.complete();\n }\n\n /** Throws an error if the form field's control is missing. */\n protected validateControlChild() {\n if (!this.control) {\n throw getMcFormFieldMissingControlError();\n }\n }\n}\n\n@Directive({\n selector: 'mc-form-field[mcFormFieldWithoutBorders]',\n exportAs: 'mcFormFieldWithoutBorders',\n host: { class: 'mc-form-field_without-borders' }\n})\nexport class McFormFieldWithoutBorders {}\n","<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint\"></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport { McCleaner } from './cleaner';\nimport { McFormField, McFormFieldWithoutBorders } from './form-field';\nimport { McHint } from './hint';\nimport { McPrefix } from './prefix';\nimport { McStepper } from './stepper';\nimport { McSuffix } from './suffix';\n\n\n@NgModule({\n declarations: [\n McFormField,\n McFormFieldWithoutBorders,\n McHint,\n McPrefix,\n McSuffix,\n McCleaner,\n McStepper\n ],\n imports: [CommonModule, McIconModule],\n exports: [\n McFormField,\n McFormFieldWithoutBorders,\n McHint,\n McPrefix,\n McSuffix,\n McCleaner,\n McStepper\n ]\n})\nexport class McFormFieldModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextUniqueId","i1"],"mappings":";;;;;;;;;;;MAYa,SAAS,CAAA;AARtB,IAAA,WAAA,GAAA;QASI,IAAY,CAAA,YAAA,GAAG,YAAY,CAAC;AAC/B,KAAA;;4IAFY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,sCAAA,SAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,mHALR,CAA0F,wFAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;2FAK3F,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,W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AM;QACN,QAAQ;QACR,QAAQ;QACR,SAAS;AACT,QAAA,SAAS,CAEH,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,aAEhC,WAAW;QACX,yBAAyB;QACzB,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,SAAS,CAAA,EAAA,CAAA,CAAA;AAGJ,sCAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAXjB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA,EAAA,CAAA,CAAA;2FAW5B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBArB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,WAAW;wBACX,yBAAyB;wBACzB,MAAM;wBACN,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,SAAS;AACZ,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,yBAAyB;wBACzB,MAAM;wBACN,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,SAAS;AACZ,qBAAA;AACJ,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ptsecurity-mosaic-form-field.mjs","sources":["../../../packages/mosaic/form-field/cleaner.ts","../../../packages/mosaic/form-field/form-field-control.ts","../../../packages/mosaic/form-field/form-field-errors.ts","../../../packages/mosaic/form-field/hint.ts","../../../packages/mosaic/form-field/password-hint.ts","../../../packages/mosaic/form-field/prefix.ts","../../../packages/mosaic/form-field/stepper.ts","../../../packages/mosaic/form-field/suffix.ts","../../../packages/mosaic/form-field/form-field.ts","../../../packages/mosaic/form-field/form-field.html","../../../packages/mosaic/form-field/form-field.module.ts","../../../packages/mosaic/form-field/ptsecurity-mosaic-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { ThemePalette } from '@ptsecurity/mosaic/core';\n\n\n@Component({\n selector: 'mc-cleaner',\n exportAs: 'mcCleaner',\n template: `<i class=\"mc-icon_light\" mc-icon=\"mc-close-circle_16\" [color]=\"themePalette.Second\"></i>`,\n host: {\n class: 'mc-cleaner'\n }\n})\nexport class McCleaner {\n themePalette = ThemePalette;\n}\n","import { NgControl } from '@angular/forms';\nimport { Observable } from 'rxjs';\n\n\n/** An interface which allows a control to work inside of a `MсFormField`. */\n// tslint:disable-next-line:naming-convention\nexport abstract class McFormFieldControl<T> {\n /** The value of the control. */\n value: T | null;\n\n /**\n * Stream that emits whenever the state of the control changes such that the parent `MсFormField`\n * needs to run change detection.\n */\n readonly stateChanges: Observable<void>;\n\n /** The element ID for this control. */\n readonly id: string;\n\n /** The placeholder for this control. */\n readonly placeholder: string;\n\n /** Gets the NgControl for this control. */\n readonly ngControl: NgControl | null;\n\n /** Whether the control is focused. */\n readonly focused: boolean;\n\n /** Whether the control is empty. */\n readonly empty: boolean;\n\n /** Whether the control is required. */\n readonly required: boolean;\n\n /** Whether the control is disabled. */\n readonly disabled: boolean;\n\n /** Whether the control is in an error state. */\n readonly errorState: boolean;\n\n /**\n * An optional name for the control type that can be used to distinguish `mc-form-field` elements\n * based on their control type. The form field will add a class,\n * `mc-form-field-type-{{controlType}}` to its root element.\n */\n readonly controlType?: string;\n\n /** Handles a click on the control's container. */\n abstract onContainerClick(event: MouseEvent): void;\n\n abstract focus(): void;\n}\n","export function getMcFormFieldMissingControlError(): Error {\n return Error('mc-form-field must contain a McFormFieldControl.');\n}\n\nexport function getMcFormFieldYouCanNotUseCleanerInNumberInputError(): Error {\n return Error(`You can't use mc-cleaner with input that have type=\"number\"`);\n}\n","import { Directive, Input } from '@angular/core';\n\n\nlet nextHintUniqueId = 0;\n\n@Directive({\n selector: 'mc-hint',\n host: {\n class: 'mc-hint',\n '[attr.id]': 'id'\n }\n})\nexport class McHint {\n @Input() id: string = `mc-hint-${nextHintUniqueId++}`;\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input\n} from '@angular/core';\n\nimport { McFormField } from './form-field';\n\n\nlet nextPasswordHintUniqueId = 0;\n\nexport enum PasswordRules {\n Length,\n UpperLatin,\n LowerLatin,\n Digit,\n SpecialSymbols\n}\n\nexport const regExpPasswordValidator = {\n [PasswordRules.LowerLatin]: RegExp(/^(?=.*?[a-z])/),\n [PasswordRules.UpperLatin]: RegExp(/^(?=.*?[A-Z])/),\n [PasswordRules.Digit]: RegExp(/^(?=.*?[0-9])/),\n [PasswordRules.SpecialSymbols]: RegExp(/^(?=.*?[\" !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\"])/)\n};\n\n\n@Component({\n selector: 'mc-password-hint',\n template: `\n <i *ngIf=\"!checked\" class=\"mc-password-hint__icon\" mc-icon=\"mc-close-M_16\"></i>\n <i *ngIf=\"checked\" class=\"mc-password-hint__icon\" mc-icon=\"mc-check_16\"></i>\n\n <span class=\"mc-password-hint__text\">\n <ng-content></ng-content>\n </span>\n `,\n host: {\n class: 'mc-password-hint',\n '[class.mc-password-hint_valid]': 'checked',\n '[class.mc-password-hint_invalid]': 'hasError',\n '[attr.id]': 'id'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class McPasswordHint implements AfterContentInit {\n @Input() id: string = `mc-hint-${nextPasswordHintUniqueId++}`;\n\n @Input() rule: PasswordRules | any;\n\n @Input() min: number;\n @Input() max: number;\n @Input() regex: RegExp | null;\n\n hasError: boolean = false;\n checked: boolean = false;\n\n private checkRule: (value: string) => boolean;\n\n private get control() {\n return this.formField.control;\n }\n\n private lastControlValue: string;\n\n constructor(private changeDetectorRef: ChangeDetectorRef, private formField: McFormField) {}\n\n ngAfterContentInit(): void {\n if (this.rule === null) {\n throw Error('You should set [rule] name');\n }\n\n if (this.rule === PasswordRules.Length && (this.min || this.max) === null) {\n throw Error('For [rule] \"Length\" need set [min] and [max]');\n }\n\n if (this.rule === PasswordRules.Length) {\n this.checkRule = this.checkLengthRule;\n } else if (\n [PasswordRules.UpperLatin, PasswordRules.LowerLatin, PasswordRules.Digit, PasswordRules.SpecialSymbols]\n .includes(this.rule)\n ) {\n this.regex = this.regex || regExpPasswordValidator[this.rule];\n this.checkRule = this.checkRegexRule;\n } else {\n throw Error(`Unknown [rule]=${this.rule}`);\n }\n\n this.formField.control.stateChanges\n .subscribe(this.checkValue);\n }\n\n private checkValue = () => {\n if (this.control.focused && this.isValueChanged()) {\n this.hasError = false;\n\n this.checked = this.checkRule(this.control.value);\n } else if (!this.control.focused && !this.isValueChanged()) {\n this.hasError = !this.checkRule(this.control.value);\n }\n\n this.lastControlValue = this.control.value;\n this.changeDetectorRef.markForCheck();\n }\n\n private checkLengthRule(value: string): boolean {\n return value.length >= this.min && value.length <= this.max;\n }\n\n private checkRegexRule(value: string): boolean {\n return !!this.regex?.test(value);\n }\n\n private isValueChanged(): boolean {\n return this.lastControlValue !== this.formField.control.value;\n }\n}\n","import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: '[mcPrefix]'\n})\nexport class McPrefix {}\n","import { Component, EventEmitter, Output } from '@angular/core';\n\n\n@Component({\n selector: 'mc-stepper',\n template: `\n <i class=\"mc mc-icon mc-icon_light mc-second mc-stepper-step-up mc-angle-down-L_16\"\n (mousedown)=\"onStepUp($event)\">\n </i>\n <i class=\"mc mc-icon mc-icon_light mc-second mc-stepper-step-down mc-angle-down-L_16\"\n (mousedown)=\"onStepDown($event)\">\n </i>\n `\n})\nexport class McStepper {\n @Output()\n readonly stepUp: EventEmitter<void> = new EventEmitter<void>();\n @Output()\n readonly stepDown: EventEmitter<void> = new EventEmitter<void>();\n\n connectTo(numberInput: any) {\n if (!numberInput) { return; }\n\n this.stepUp.subscribe(() => {\n numberInput.stepUp(numberInput.step);\n });\n\n this.stepDown.subscribe(() => {\n numberInput.stepDown(numberInput.step);\n });\n }\n\n onStepUp($event: MouseEvent) {\n this.stepUp.emit();\n $event.preventDefault();\n }\n\n onStepDown($event: MouseEvent) {\n this.stepDown.emit();\n $event.preventDefault();\n }\n}\n","import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: '[mcSuffix]'\n})\nexport class McSuffix {}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n AfterContentChecked,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n OnDestroy,\n QueryList,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { ESCAPE, F8 } from '@ptsecurity/cdk/keycodes';\nimport { CanColor, CanColorCtor, mixinColor } from '@ptsecurity/mosaic/core';\nimport { EMPTY, merge, Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { McCleaner } from './cleaner';\nimport { McFormFieldControl } from './form-field-control';\nimport {\n getMcFormFieldMissingControlError,\n getMcFormFieldYouCanNotUseCleanerInNumberInputError\n} from './form-field-errors';\nimport { McHint } from './hint';\nimport { McPasswordHint } from './password-hint';\nimport { McPrefix } from './prefix';\nimport { McStepper } from './stepper';\nimport { McSuffix } from './suffix';\n\n\nlet nextUniqueId = 0;\n\nexport class McFormFieldBase {\n // tslint:disable-next-line:naming-convention\n constructor(public _elementRef: ElementRef) {}\n}\n\n// tslint:disable-next-line:naming-convention\nexport const McFormFieldMixinBase: CanColorCtor & typeof McFormFieldBase = mixinColor(McFormFieldBase);\n\n@Component({\n selector: 'mc-form-field',\n exportAs: 'mcFormField',\n templateUrl: 'form-field.html',\n // McInput is a directive and can't have styles, so we need to include its styles here.\n // The McInput styles are fairly minimal so it shouldn't be a big deal for people who\n // aren't using McInput.\n styleUrls: [\n 'form-field.scss',\n '../input/input.scss',\n '../timepicker/timepicker.scss',\n '../datepicker/datepicker-input.scss',\n '../textarea/textarea.scss'\n ],\n host: {\n class: 'mc-form-field',\n '[class.mc-form-field_invalid]': 'control.errorState',\n '[class.mc-form-field_has-prefix]': 'hasPrefix',\n '[class.mc-form-field_has-suffix]': 'hasSuffix',\n '[class.mc-form-field_has-cleaner]': 'canShowCleaner',\n '[class.mc-form-field_has-stepper]': 'canShowStepper',\n\n '[class.mc-disabled]': 'control.disabled',\n\n '[class.ng-untouched]': 'shouldForward(\"untouched\")',\n '[class.ng-touched]': 'shouldForward(\"touched\")',\n '[class.ng-pristine]': 'shouldForward(\"pristine\")',\n '[class.ng-dirty]': 'shouldForward(\"dirty\")',\n '[class.ng-valid]': 'shouldForward(\"valid\")',\n '[class.ng-invalid]': 'shouldForward(\"invalid\")',\n '[class.ng-pending]': 'shouldForward(\"pending\")',\n\n '(keydown)': 'onKeyDown($event)',\n '(mouseenter)': 'onHoverChanged(true)',\n '(mouseleave)': 'onHoverChanged(false)'\n },\n inputs: ['color'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class McFormField extends McFormFieldMixinBase implements\n AfterContentInit, AfterContentChecked, AfterViewInit, CanColor, OnDestroy {\n\n @ContentChild(McFormFieldControl, { static: false }) control: McFormFieldControl<any>;\n @ContentChild(McStepper, { static: false }) stepper: McStepper;\n @ContentChild(McCleaner, { static: false }) cleaner: McCleaner | null;\n\n @ContentChildren(McHint) hint: QueryList<McHint>;\n @ContentChildren(McPasswordHint) passwordHints: QueryList<McPasswordHint>;\n @ContentChildren(McSuffix) suffix: QueryList<McSuffix>;\n @ContentChildren(McPrefix) prefix: QueryList<McPrefix>;\n\n @ViewChild('connectionContainer', { static: true }) connectionContainerRef: ElementRef;\n\n // Unique id for the internal form field label.\n labelId = `mc-form-field-label-${nextUniqueId++}`;\n\n hovered: boolean = false;\n\n canCleanerClearByEsc: boolean = true;\n\n private $unsubscribe = new Subject<void>();\n\n get hasHint(): boolean {\n return this.hint?.length > 0;\n }\n\n get hasPasswordStrengthError(): boolean {\n return this.passwordHints?.some((hint) => hint.hasError);\n }\n\n get hasSuffix(): boolean {\n return this.suffix?.length > 0;\n }\n\n get hasPrefix(): boolean {\n return this.prefix?.length > 0;\n }\n\n get hasCleaner(): boolean {\n return !!this.cleaner;\n }\n\n get hasStepper(): boolean {\n return !!this.stepper;\n }\n\n get canShowCleaner(): boolean {\n return this.hasCleaner &&\n this.control?.ngControl\n ? this.control.ngControl.value && !this.control.disabled\n : false;\n }\n\n get disabled(): boolean {\n return this.control?.disabled;\n }\n\n get canShowStepper(): boolean {\n return this.hasStepper &&\n !this.disabled &&\n (this.control?.focused || this.hovered);\n }\n\n constructor(\n // tslint:disable-next-line:naming-convention\n public _elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef,\n private focusMonitor: FocusMonitor\n ) {\n super(_elementRef);\n\n this.runFocusMonitor();\n }\n\n ngAfterContentInit() {\n if ((this.control as any).numberInput && this.hasCleaner) {\n this.cleaner = null;\n throw getMcFormFieldYouCanNotUseCleanerInNumberInputError();\n }\n\n this.validateControlChild();\n\n if (this.control.controlType) {\n this._elementRef.nativeElement.classList.add(`mc-form-field-type-${this.control.controlType}`);\n }\n\n // Subscribe to changes in the child control state in order to update the form field UI.\n this.control.stateChanges\n .pipe(startWith())\n .subscribe((state: any) => {\n if (!state?.focused && this.hasPasswordStrengthError) {\n this.control.ngControl?.control?.setErrors({ passwordStrength: true });\n }\n\n this._changeDetectorRef.markForCheck();\n });\n\n if (this.hasStepper) {\n this.stepper.connectTo((this.control as any).numberInput);\n }\n\n // Run change detection if the value changes.\n const valueChanges = this.control.ngControl?.valueChanges || EMPTY;\n\n merge(valueChanges)\n .pipe(takeUntil(this.$unsubscribe))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngAfterContentChecked() {\n this.validateControlChild();\n }\n\n ngAfterViewInit() {\n // Avoid animations on load.\n this._changeDetectorRef.detectChanges();\n }\n\n clearValue($event) {\n $event.stopPropagation();\n\n this.control?.ngControl?.reset();\n this.control?.focus();\n }\n\n onContainerClick($event) {\n if (this.control.onContainerClick) {\n this.control.onContainerClick($event);\n }\n }\n\n onKeyDown(event: KeyboardEvent): void {\n // tslint:disable-next-line:deprecation\n if (this.control.controlType === 'input-password' && event.altKey && event.keyCode === F8) {\n (this.control as unknown as { toggleType(): void }).toggleType();\n }\n // tslint:disable-next-line:deprecation\n if (this.canCleanerClearByEsc && event.keyCode === ESCAPE && this.control.focused && this.hasCleaner) {\n this.control?.ngControl?.reset();\n\n event.preventDefault();\n }\n }\n\n onHoverChanged(isHovered: boolean) {\n if (isHovered !== this.hovered) {\n this.hovered = isHovered;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /**\n * Gets an ElementRef for the element that a overlay attached to the form-field should be\n * positioned relative to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this.connectionContainerRef || this._elementRef;\n }\n\n /** Determines whether a class from the NgControl should be forwarded to the host element. */\n shouldForward(prop: keyof NgControl): boolean {\n const ngControl = this.control ? this.control.ngControl : null;\n\n return ngControl && ngControl[prop];\n }\n\n ngOnDestroy(): void {\n this.$unsubscribe.next();\n this.$unsubscribe.complete();\n\n this.stopFocusMonitor();\n }\n\n /** Throws an error if the form field's control is missing. */\n protected validateControlChild() {\n if (!this.control) {\n throw getMcFormFieldMissingControlError();\n }\n }\n\n private runFocusMonitor() {\n this.focusMonitor.monitor(this._elementRef.nativeElement, true);\n }\n\n private stopFocusMonitor() {\n this.focusMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n}\n\n@Directive({\n selector: 'mc-form-field[mcFormFieldWithoutBorders]',\n exportAs: 'mcFormFieldWithoutBorders',\n host: { class: 'mc-form-field_without-borders' }\n})\nexport class McFormFieldWithoutBorders {}\n","<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\">\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport { McCleaner } from './cleaner';\nimport { McFormField, McFormFieldWithoutBorders } from './form-field';\nimport { McHint } from './hint';\nimport { McPasswordHint } from './password-hint';\nimport { McPrefix } from './prefix';\nimport { McStepper } from './stepper';\nimport { McSuffix } from './suffix';\n\n\n@NgModule({\n declarations: [\n McFormField,\n McFormFieldWithoutBorders,\n McHint,\n McPasswordHint,\n McPrefix,\n McSuffix,\n McCleaner,\n McStepper\n ],\n imports: [CommonModule, McIconModule],\n exports: [\n McFormField,\n McFormFieldWithoutBorders,\n McHint,\n McPasswordHint,\n McPrefix,\n McSuffix,\n McCleaner,\n McStepper\n ]\n})\nexport class McFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.McFormField","i2","i1"],"mappings":";;;;;;;;;;;;MAYa,SAAS,CAAA;AARtB,IAAA,WAAA,GAAA;QASI,IAAY,CAAA,YAAA,GAAG,YAAY,CAAC;AAC/B,KAAA;;4IAFY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,sCAAA,SAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA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AA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBArBtB,WAAW;QACX,yBAAyB;QACzB,MAAM;QACN,cAAc;QACd,QAAQ;QACR,QAAQ;QACR,SAAS;AACT,QAAA,SAAS,CAEH,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,aAEhC,WAAW;QACX,yBAAyB;QACzB,MAAM;QACN,cAAc;QACd,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,SAAS,CAAA,EAAA,CAAA,CAAA;AAGJ,sCAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAZjB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA,EAAA,CAAA,CAAA;2FAY5B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAvB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,WAAW;wBACX,yBAAyB;wBACzB,MAAM;wBACN,cAAc;wBACd,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,SAAS;AACZ,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,yBAAyB;wBACzB,MAAM;wBACN,cAAc;wBACd,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,SAAS;AACZ,qBAAA;AACJ,iBAAA,CAAA;;;ACnCD;;AAEG;;;;"}
|
@@ -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 { Directive, Optional, Self, Attribute, Input, InjectionToken, Inject, forwardRef, NgModule } from '@angular/core';
|
5
|
+
import { Directive, Optional, Self, Attribute, Input, InjectionToken, 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 * as i2 from '@angular/cdk/bidi';
|
17
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
18
|
+
import { McTooltipTrigger, MC_TOOLTIP_SCROLL_STRATEGY } from '@ptsecurity/mosaic/tooltip';
|
14
19
|
|
15
20
|
function getMcInputUnsupportedTypeError(inputType) {
|
16
21
|
return Error(`Input type "${inputType}" isn't supported by mcInput.`);
|
@@ -186,7 +191,7 @@ const MC_INPUT_INVALID_TYPES = [
|
|
186
191
|
'reset',
|
187
192
|
'submit'
|
188
193
|
];
|
189
|
-
let nextUniqueId = 0;
|
194
|
+
let nextUniqueId$1 = 0;
|
190
195
|
class McInputBase {
|
191
196
|
constructor(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl) {
|
192
197
|
this.defaultErrorStateMatcher = defaultErrorStateMatcher;
|
@@ -222,7 +227,7 @@ class McInput extends McInputMixinBase {
|
|
222
227
|
* @docs-private
|
223
228
|
*/
|
224
229
|
this.controlType = 'input';
|
225
|
-
this.uid = `mc-input-${nextUniqueId++}`;
|
230
|
+
this.uid = `mc-input-${nextUniqueId$1++}`;
|
226
231
|
this.neverEmptyInputTypes = [
|
227
232
|
'date',
|
228
233
|
'datetime',
|
@@ -583,17 +588,406 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
583
588
|
type: Input
|
584
589
|
}] } });
|
585
590
|
|
591
|
+
let nextUniqueId = 0;
|
592
|
+
class McPasswordToggle extends McTooltipTrigger {
|
593
|
+
constructor(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor, formField) {
|
594
|
+
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction);
|
595
|
+
this.focusMonitor = focusMonitor;
|
596
|
+
this.formField = formField;
|
597
|
+
this._tabIndex = 0;
|
598
|
+
this.trigger = `${PopUpTriggers.Hover}`;
|
599
|
+
this.runFocusMonitor();
|
600
|
+
}
|
601
|
+
get content() {
|
602
|
+
return this.formField.control.elementType === 'password' ?
|
603
|
+
this.mcTooltipHidden :
|
604
|
+
this._content;
|
605
|
+
}
|
606
|
+
set content(content) {
|
607
|
+
this._content = content;
|
608
|
+
this.updateData();
|
609
|
+
}
|
610
|
+
get disabled() {
|
611
|
+
return this._disabled === undefined ? this.formField.disabled : this._disabled;
|
612
|
+
}
|
613
|
+
set disabled(value) {
|
614
|
+
this._disabled = coerceBooleanProperty(value);
|
615
|
+
this._disabled ? this.stopFocusMonitor() : this.runFocusMonitor();
|
616
|
+
}
|
617
|
+
get tabIndex() {
|
618
|
+
return this.disabled ? -1 : this._tabIndex;
|
619
|
+
}
|
620
|
+
set tabIndex(value) {
|
621
|
+
// If the specified tabIndex value is null or undefined, fall back to the default value.
|
622
|
+
this._tabIndex = value != null ? coerceNumberProperty(value) : 0;
|
623
|
+
}
|
624
|
+
get hidden() {
|
625
|
+
return this.formField.control.elementType === 'password';
|
626
|
+
}
|
627
|
+
ngOnDestroy() {
|
628
|
+
this.stopFocusMonitor();
|
629
|
+
}
|
630
|
+
toggle() {
|
631
|
+
if (this.disabled) {
|
632
|
+
return;
|
633
|
+
}
|
634
|
+
this.hide();
|
635
|
+
const input = this.formField.control;
|
636
|
+
input.toggleType();
|
637
|
+
this.updateData();
|
638
|
+
}
|
639
|
+
runFocusMonitor() {
|
640
|
+
this.focusMonitor.monitor(this.elementRef)
|
641
|
+
.subscribe((origin) => {
|
642
|
+
if (origin === 'keyboard') {
|
643
|
+
this.show();
|
644
|
+
}
|
645
|
+
else if (origin === null) {
|
646
|
+
this.hide();
|
647
|
+
}
|
648
|
+
});
|
649
|
+
}
|
650
|
+
stopFocusMonitor() {
|
651
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
652
|
+
}
|
653
|
+
}
|
654
|
+
/** @nocollapse */ /** @nocollapse */ McPasswordToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", 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 });
|
655
|
+
/** @nocollapse */ /** @nocollapse */ McPasswordToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", 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 });
|
656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McPasswordToggle, decorators: [{
|
657
|
+
type: Component,
|
658
|
+
args: [{
|
659
|
+
selector: `mc-password-toggle`,
|
660
|
+
exportAs: 'mcPasswordToggle',
|
661
|
+
template: '<ng-content></ng-content>',
|
662
|
+
host: {
|
663
|
+
class: 'mc-password-toggle mc',
|
664
|
+
'[class.mc-eye_16]': 'hidden',
|
665
|
+
'[class.mc-eye-crossed_16]': '!hidden',
|
666
|
+
'[attr.tabindex]': 'disabled ? null : tabIndex',
|
667
|
+
'[attr.disabled]': 'disabled || null',
|
668
|
+
'(click)': 'toggle()',
|
669
|
+
'(keydown.ENTER)': 'toggle()',
|
670
|
+
'(keydown.SPACE)': 'toggle()'
|
671
|
+
},
|
672
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
673
|
+
encapsulation: ViewEncapsulation.None
|
674
|
+
}]
|
675
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
676
|
+
type: Inject,
|
677
|
+
args: [MC_TOOLTIP_SCROLL_STRATEGY]
|
678
|
+
}] }, { type: i2.Directionality, decorators: [{
|
679
|
+
type: Optional
|
680
|
+
}] }, { type: i3$1.FocusMonitor }, { type: i4.McFormField }]; }, propDecorators: { content: [{
|
681
|
+
type: Input,
|
682
|
+
args: ['mcTooltipNotHidden']
|
683
|
+
}], mcTooltipHidden: [{
|
684
|
+
type: Input
|
685
|
+
}], disabled: [{
|
686
|
+
type: Input
|
687
|
+
}], tabIndex: [{
|
688
|
+
type: Input
|
689
|
+
}] } });
|
690
|
+
class McInputPassword extends McInputMixinBase {
|
691
|
+
// tslint:disable-next-line: naming-convention
|
692
|
+
constructor(elementRef, rawValidators, mcValidation, ngControl, ngModel, formControlName, parentForm, parentFormGroup, defaultErrorStateMatcher, inputValueAccessor) {
|
693
|
+
super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
694
|
+
this.elementRef = elementRef;
|
695
|
+
this.rawValidators = rawValidators;
|
696
|
+
this.mcValidation = mcValidation;
|
697
|
+
this.ngModel = ngModel;
|
698
|
+
this.formControlName = formControlName;
|
699
|
+
/**
|
700
|
+
* Implemented as part of McFormFieldControl.
|
701
|
+
* @docs-private
|
702
|
+
*/
|
703
|
+
this.focused = false;
|
704
|
+
/**
|
705
|
+
* Implemented as part of McFormFieldControl.
|
706
|
+
* @docs-private
|
707
|
+
*/
|
708
|
+
this.stateChanges = new Subject();
|
709
|
+
/**
|
710
|
+
* Implemented as part of McFormFieldControl.
|
711
|
+
* @docs-private
|
712
|
+
*/
|
713
|
+
this.controlType = 'input-password';
|
714
|
+
this.elementType = 'password';
|
715
|
+
this.uid = `mc-input-${nextUniqueId++}`;
|
716
|
+
this._disabled = false;
|
717
|
+
this._required = false;
|
718
|
+
// If no input value accessor was explicitly specified, use the element as the input value
|
719
|
+
// accessor.
|
720
|
+
this._inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement;
|
721
|
+
this.previousNativeValue = this.value;
|
722
|
+
// Force setter to be called in case id was not specified.
|
723
|
+
this.id = this.id;
|
724
|
+
}
|
725
|
+
/**
|
726
|
+
* Implemented as part of McFormFieldControl.
|
727
|
+
* @docs-private
|
728
|
+
*/
|
729
|
+
get disabled() {
|
730
|
+
if (this.ngControl?.disabled !== null) {
|
731
|
+
return this.ngControl.disabled;
|
732
|
+
}
|
733
|
+
return this._disabled;
|
734
|
+
}
|
735
|
+
set disabled(value) {
|
736
|
+
this._disabled = coerceBooleanProperty(value);
|
737
|
+
// Browsers may not fire the blur event if the input is disabled too quickly.
|
738
|
+
// Reset from here to ensure that the element doesn't become stuck.
|
739
|
+
if (this.focused) {
|
740
|
+
this.focused = false;
|
741
|
+
this.stateChanges.next();
|
742
|
+
}
|
743
|
+
}
|
744
|
+
/**
|
745
|
+
* Implemented as part of McFormFieldControl.
|
746
|
+
* @docs-private
|
747
|
+
*/
|
748
|
+
get id() {
|
749
|
+
return this._id;
|
750
|
+
}
|
751
|
+
set id(value) {
|
752
|
+
this._id = value || this.uid;
|
753
|
+
}
|
754
|
+
/**
|
755
|
+
* Implemented as part of McFormFieldControl.
|
756
|
+
* @docs-private
|
757
|
+
*/
|
758
|
+
get required() {
|
759
|
+
return this._required;
|
760
|
+
}
|
761
|
+
set required(value) {
|
762
|
+
this._required = coerceBooleanProperty(value);
|
763
|
+
}
|
764
|
+
// this.elementRef.nativeElement.type = this._type;
|
765
|
+
/**
|
766
|
+
* Implemented as part of McFormFieldControl.
|
767
|
+
* @docs-private
|
768
|
+
*/
|
769
|
+
get value() {
|
770
|
+
return this._inputValueAccessor.value;
|
771
|
+
}
|
772
|
+
set value(value) {
|
773
|
+
if (value === this.value) {
|
774
|
+
return;
|
775
|
+
}
|
776
|
+
this._inputValueAccessor.value = value;
|
777
|
+
this.stateChanges.next();
|
778
|
+
}
|
779
|
+
ngAfterContentInit() {
|
780
|
+
if (!this.ngControl) {
|
781
|
+
return;
|
782
|
+
}
|
783
|
+
if (this.mcValidation.useValidation) {
|
784
|
+
setMosaicValidation(this);
|
785
|
+
}
|
786
|
+
}
|
787
|
+
ngOnChanges() {
|
788
|
+
this.stateChanges.next();
|
789
|
+
}
|
790
|
+
ngOnDestroy() {
|
791
|
+
this.stateChanges.complete();
|
792
|
+
}
|
793
|
+
ngDoCheck() {
|
794
|
+
if (this.ngControl) {
|
795
|
+
// We need to re-evaluate this on every change detection cycle, because there are some
|
796
|
+
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
797
|
+
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
798
|
+
this.updateErrorState();
|
799
|
+
}
|
800
|
+
// We need to dirty-check the native element's value, because there are some cases where
|
801
|
+
// we won't be notified when it changes (e.g. the consumer isn't using forms or they're
|
802
|
+
// updating the value using `emitEvent: false`).
|
803
|
+
this.dirtyCheckNativeValue();
|
804
|
+
}
|
805
|
+
toggleType() {
|
806
|
+
this.elementType = this.elementType === 'password' ? 'text' : 'password';
|
807
|
+
}
|
808
|
+
/** Focuses the input. */
|
809
|
+
focus() {
|
810
|
+
this.elementRef.nativeElement.focus();
|
811
|
+
}
|
812
|
+
onBlur() {
|
813
|
+
if (this.ngControl?.control) {
|
814
|
+
const control = this.ngControl.control;
|
815
|
+
control.updateValueAndValidity({ emitEvent: false });
|
816
|
+
control.statusChanges.emit(control.status);
|
817
|
+
}
|
818
|
+
this.focusChanged(false);
|
819
|
+
}
|
820
|
+
/** Callback for the cases where the focused state of the input changes. */
|
821
|
+
focusChanged(isFocused) {
|
822
|
+
if (isFocused === this.focused) {
|
823
|
+
return;
|
824
|
+
}
|
825
|
+
this.focused = isFocused;
|
826
|
+
this.stateChanges.next({ focused: this.focused });
|
827
|
+
}
|
828
|
+
onInput() {
|
829
|
+
// This is a noop function and is used to let Angular know whenever the value changes.
|
830
|
+
// Angular will run a new change detection each time the `input` event has been dispatched.
|
831
|
+
// It's necessary that Angular recognizes the value change, because when floatingLabel
|
832
|
+
// is set to false and Angular forms aren't used, the placeholder won't recognize the
|
833
|
+
// value changes and will not disappear.
|
834
|
+
// Listening to the input event wouldn't be necessary when the input is using the
|
835
|
+
// FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
|
836
|
+
}
|
837
|
+
/**
|
838
|
+
* Implemented as part of McFormFieldControl.
|
839
|
+
* @docs-private
|
840
|
+
*/
|
841
|
+
get empty() {
|
842
|
+
return !this.elementRef.nativeElement.value && !this.isBadInput();
|
843
|
+
}
|
844
|
+
/**
|
845
|
+
* Implemented as part of McFormFieldControl.
|
846
|
+
* @docs-private
|
847
|
+
*/
|
848
|
+
onContainerClick() {
|
849
|
+
this.focus();
|
850
|
+
}
|
851
|
+
/** Does some manual dirty checking on the native input `value` property. */
|
852
|
+
dirtyCheckNativeValue() {
|
853
|
+
if (this.previousNativeValue !== this.value) {
|
854
|
+
this.previousNativeValue = this.value;
|
855
|
+
this.stateChanges.next();
|
856
|
+
}
|
857
|
+
}
|
858
|
+
/** Checks whether the input is invalid based on the native validation. */
|
859
|
+
isBadInput() {
|
860
|
+
// The `validity` property won't be present on platform-server.
|
861
|
+
return this.elementRef.nativeElement.validity?.badInput;
|
862
|
+
}
|
863
|
+
}
|
864
|
+
/** @nocollapse */ /** @nocollapse */ McInputPassword.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", 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 }], target: i0.ɵɵFactoryTarget.Directive });
|
865
|
+
/** @nocollapse */ /** @nocollapse */ McInputPassword.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", 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: [{
|
866
|
+
provide: McFormFieldControl, useExisting: McInputPassword
|
867
|
+
}], exportAs: ["mcInputPassword"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputPassword, decorators: [{
|
869
|
+
type: Directive,
|
870
|
+
args: [{
|
871
|
+
selector: `input[mcInputPassword]`,
|
872
|
+
exportAs: 'mcInputPassword',
|
873
|
+
host: {
|
874
|
+
class: 'mc-input mc-input-password',
|
875
|
+
// Native input properties that are overwritten by Angular inputs need to be synced with
|
876
|
+
// the native input element. Otherwise property bindings for those don't work.
|
877
|
+
'[attr.id]': 'id',
|
878
|
+
'[attr.type]': 'elementType',
|
879
|
+
'[attr.placeholder]': 'placeholder',
|
880
|
+
'[attr.disabled]': 'disabled || null',
|
881
|
+
'[required]': 'required',
|
882
|
+
'(blur)': 'onBlur()',
|
883
|
+
'(focus)': 'focusChanged(true)',
|
884
|
+
'(input)': 'onInput()'
|
885
|
+
},
|
886
|
+
providers: [{
|
887
|
+
provide: McFormFieldControl, useExisting: McInputPassword
|
888
|
+
}]
|
889
|
+
}]
|
890
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
891
|
+
type: Optional
|
892
|
+
}, {
|
893
|
+
type: Self
|
894
|
+
}, {
|
895
|
+
type: Inject,
|
896
|
+
args: [NG_VALIDATORS]
|
897
|
+
}] }, { type: undefined, decorators: [{
|
898
|
+
type: Optional
|
899
|
+
}, {
|
900
|
+
type: Inject,
|
901
|
+
args: [MC_VALIDATION]
|
902
|
+
}] }, { type: i1.NgControl, decorators: [{
|
903
|
+
type: Optional
|
904
|
+
}, {
|
905
|
+
type: Self
|
906
|
+
}] }, { type: i1.NgModel, decorators: [{
|
907
|
+
type: Optional
|
908
|
+
}, {
|
909
|
+
type: Self
|
910
|
+
}] }, { type: i1.FormControlName, decorators: [{
|
911
|
+
type: Optional
|
912
|
+
}, {
|
913
|
+
type: Self
|
914
|
+
}] }, { type: i1.NgForm, decorators: [{
|
915
|
+
type: Optional
|
916
|
+
}] }, { type: i1.FormGroupDirective, decorators: [{
|
917
|
+
type: Optional
|
918
|
+
}] }, { type: i3.ErrorStateMatcher }, { type: undefined, decorators: [{
|
919
|
+
type: Optional
|
920
|
+
}, {
|
921
|
+
type: Self
|
922
|
+
}, {
|
923
|
+
type: Inject,
|
924
|
+
args: [MC_INPUT_VALUE_ACCESSOR]
|
925
|
+
}] }]; }, propDecorators: { errorStateMatcher: [{
|
926
|
+
type: Input
|
927
|
+
}], placeholder: [{
|
928
|
+
type: Input
|
929
|
+
}], disabled: [{
|
930
|
+
type: Input
|
931
|
+
}], id: [{
|
932
|
+
type: Input
|
933
|
+
}], required: [{
|
934
|
+
type: Input
|
935
|
+
}], value: [{
|
936
|
+
type: Input
|
937
|
+
}] } });
|
938
|
+
|
586
939
|
class McInputModule {
|
587
940
|
}
|
588
941
|
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
589
|
-
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputModule, declarations: [McInput,
|
590
|
-
|
942
|
+
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputModule, declarations: [McInput,
|
943
|
+
McNumberInput,
|
944
|
+
McInputPassword,
|
945
|
+
McPasswordToggle,
|
946
|
+
McInputMono,
|
947
|
+
MinValidator,
|
948
|
+
MaxValidator], imports: [CommonModule,
|
949
|
+
A11yModule,
|
950
|
+
McCommonModule,
|
951
|
+
FormsModule], exports: [McInput,
|
952
|
+
McNumberInput,
|
953
|
+
McInputPassword,
|
954
|
+
McPasswordToggle,
|
955
|
+
McInputMono,
|
956
|
+
MinValidator,
|
957
|
+
MaxValidator] });
|
958
|
+
/** @nocollapse */ /** @nocollapse */ McInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputModule, imports: [[
|
959
|
+
CommonModule,
|
960
|
+
A11yModule,
|
961
|
+
McCommonModule,
|
962
|
+
FormsModule
|
963
|
+
]] });
|
591
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: McInputModule, decorators: [{
|
592
965
|
type: NgModule,
|
593
966
|
args: [{
|
594
|
-
imports: [
|
595
|
-
|
596
|
-
|
967
|
+
imports: [
|
968
|
+
CommonModule,
|
969
|
+
A11yModule,
|
970
|
+
McCommonModule,
|
971
|
+
FormsModule
|
972
|
+
],
|
973
|
+
declarations: [
|
974
|
+
McInput,
|
975
|
+
McNumberInput,
|
976
|
+
McInputPassword,
|
977
|
+
McPasswordToggle,
|
978
|
+
McInputMono,
|
979
|
+
MinValidator,
|
980
|
+
MaxValidator
|
981
|
+
],
|
982
|
+
exports: [
|
983
|
+
McInput,
|
984
|
+
McNumberInput,
|
985
|
+
McInputPassword,
|
986
|
+
McPasswordToggle,
|
987
|
+
McInputMono,
|
988
|
+
MinValidator,
|
989
|
+
MaxValidator
|
990
|
+
]
|
597
991
|
}]
|
598
992
|
}] });
|
599
993
|
|
@@ -601,5 +995,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
601
995
|
* Generated bundle index. Do not edit.
|
602
996
|
*/
|
603
997
|
|
604
|
-
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 };
|
998
|
+
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 };
|
605
999
|
//# sourceMappingURL=ptsecurity-mosaic-input.mjs.map
|