matcha-components 20.15.0 → 20.17.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/fesm2022/matcha-components.mjs +8167 -0
- package/fesm2022/matcha-components.mjs.map +1 -0
- package/index.d.ts +2030 -0
- package/package.json +19 -6
- package/assets/open_in_new.png +0 -0
- package/index.ts +0 -1
- package/ng-package.json +0 -7
- package/src/documentation/components/matcha-drawer.mdx +0 -469
- package/src/documentation/foundation/borders/border-radius.mdx +0 -145
- package/src/documentation/foundation/borders/border-size.mdx +0 -111
- package/src/documentation/foundation/borders/border-style.mdx +0 -144
- package/src/documentation/foundation/colors/all-colors.mdx +0 -153
- package/src/documentation/foundation/colors/base/amber.mdx +0 -235
- package/src/documentation/foundation/colors/base/blue.mdx +0 -235
- package/src/documentation/foundation/colors/base/cyan.mdx +0 -235
- package/src/documentation/foundation/colors/base/deep-orange.mdx +0 -235
- package/src/documentation/foundation/colors/base/deep-purple.mdx +0 -235
- package/src/documentation/foundation/colors/base/green.mdx +0 -235
- package/src/documentation/foundation/colors/base/indigo.mdx +0 -235
- package/src/documentation/foundation/colors/base/light-blue.mdx +0 -235
- package/src/documentation/foundation/colors/base/light-green.mdx +0 -235
- package/src/documentation/foundation/colors/base/lime.mdx +0 -235
- package/src/documentation/foundation/colors/base/orange.mdx +0 -235
- package/src/documentation/foundation/colors/base/pink.mdx +0 -235
- package/src/documentation/foundation/colors/base/purple.mdx +0 -235
- package/src/documentation/foundation/colors/base/red.mdx +0 -235
- package/src/documentation/foundation/colors/base/teal.mdx +0 -235
- package/src/documentation/foundation/colors/base/yellow.mdx +0 -235
- package/src/documentation/foundation/colors/surface-colors.mdx +0 -93
- package/src/documentation/foundation/colors/theme/accent.mdx +0 -235
- package/src/documentation/foundation/colors/theme/primary.mdx +0 -235
- package/src/documentation/foundation/colors/theme/warn.mdx +0 -235
- package/src/documentation/foundation/displays/display-block.mdx +0 -134
- package/src/documentation/foundation/displays/display-flex.mdx +0 -134
- package/src/documentation/foundation/displays/display-grid.mdx +0 -134
- package/src/documentation/foundation/displays/display-inline-block.mdx +0 -134
- package/src/documentation/foundation/displays/display-inline-flex.mdx +0 -134
- package/src/documentation/foundation/displays/display-inline.mdx +0 -134
- package/src/documentation/foundation/displays/display-none.mdx +0 -134
- package/src/documentation/foundation/displays/display-table-cell.mdx +0 -134
- package/src/documentation/foundation/displays/display-table-row.mdx +0 -134
- package/src/documentation/foundation/displays/display-table.mdx +0 -134
- package/src/documentation/foundation/flexbox/flexbox.mdx +0 -420
- package/src/documentation/foundation/opacity/opacity.mdx +0 -104
- package/src/documentation/foundation/position/alignment.mdx +0 -148
- package/src/documentation/foundation/sizes/height/heights.mdx +0 -96
- package/src/documentation/foundation/sizes/height/max-heights.mdx +0 -96
- package/src/documentation/foundation/sizes/height/min-heights.mdx +0 -96
- package/src/documentation/foundation/sizes/width/max-width.mdx +0 -95
- package/src/documentation/foundation/sizes/width/min-width.mdx +0 -96
- package/src/documentation/foundation/sizes/width/widths.mdx +0 -96
- package/src/documentation/foundation/spacing/margins.mdx +0 -227
- package/src/documentation/foundation/spacing/paddings.mdx +0 -225
- package/src/documentation/foundation/typography/colors.mdx +0 -26
- package/src/documentation/foundation/typography/font-size.mdx +0 -57
- package/src/documentation/foundation/typography/font-weight.mdx +0 -85
- package/src/documentation/foundation/typography/letter-spacing.mdx +0 -35
- package/src/documentation/foundation/typography/line-clamp.mdx +0 -145
- package/src/documentation/foundation/typography/line-height.mdx +0 -52
- package/src/documentation/foundation/typography/message-box.mdx +0 -43
- package/src/documentation/foundation/typography/paragraph.mdx +0 -165
- package/src/documentation/foundation/typography/text-align.mdx +0 -22
- package/src/documentation/foundation/typography/text-styles.mdx +0 -88
- package/src/documentation/presentation.mdx +0 -591
- package/src/documentation/services/matcha-breakpoint-observer.mdx +0 -310
- package/src/documentation/tokens/animations.mdx +0 -116
- package/src/documentation/tokens/breakpoints.mdx +0 -57
- package/src/documentation/tokens/colors.mdx +0 -1884
- package/src/documentation/tokens/elevations.mdx +0 -50
- package/src/documentation/tokens/sizes.mdx +0 -150
- package/src/lib/matcha-accordion/accordion/accordion.component.html +0 -1
- package/src/lib/matcha-accordion/accordion/accordion.component.scss +0 -0
- package/src/lib/matcha-accordion/accordion/accordion.component.ts +0 -72
- package/src/lib/matcha-accordion/accordion-content/accordion-content.component.html +0 -1
- package/src/lib/matcha-accordion/accordion-content/accordion-content.component.scss +0 -0
- package/src/lib/matcha-accordion/accordion-content/accordion-content.component.ts +0 -11
- package/src/lib/matcha-accordion/accordion-header/accordion-header.component.html +0 -1
- package/src/lib/matcha-accordion/accordion-header/accordion-header.component.scss +0 -0
- package/src/lib/matcha-accordion/accordion-header/accordion-header.component.ts +0 -11
- package/src/lib/matcha-accordion/accordion-item/accordion-item.component.html +0 -13
- package/src/lib/matcha-accordion/accordion-item/accordion-item.component.scss +0 -0
- package/src/lib/matcha-accordion/accordion-item/accordion-item.component.ts +0 -63
- package/src/lib/matcha-accordion/accordion.module.ts +0 -37
- package/src/lib/matcha-accordion/accordion.stories.ts +0 -108
- package/src/lib/matcha-animations/animations.ts +0 -406
- package/src/lib/matcha-autocomplete/README.md +0 -185
- package/src/lib/matcha-autocomplete/matcha-autocomplete.component.html +0 -13
- package/src/lib/matcha-autocomplete/matcha-autocomplete.component.ts +0 -238
- package/src/lib/matcha-autocomplete/matcha-autocomplete.directive.ts +0 -153
- package/src/lib/matcha-autocomplete/matcha-autocomplete.module.ts +0 -30
- package/src/lib/matcha-autocomplete/matcha-autocomplete.stories.ts +0 -172
- package/src/lib/matcha-avatar/avatar/avatar.component.html +0 -29
- package/src/lib/matcha-avatar/avatar/avatar.component.scss +0 -0
- package/src/lib/matcha-avatar/avatar/avatar.component.ts +0 -78
- package/src/lib/matcha-avatar/avatar.module.ts +0 -17
- package/src/lib/matcha-badge/badge.argtypes.ts +0 -77
- package/src/lib/matcha-badge/badge.directive.ts +0 -12
- package/src/lib/matcha-badge/badge.mdx +0 -69
- package/src/lib/matcha-badge/badge.module.ts +0 -9
- package/src/lib/matcha-badge/badge.stories.ts +0 -79
- package/src/lib/matcha-breakpoint-observable/breakpoint-observable.module.ts +0 -23
- package/src/lib/matcha-breakpoint-observable/breakpoint-observer.service.ts +0 -215
- package/src/lib/matcha-breakpoint-observable/index.ts +0 -2
- package/src/lib/matcha-button/button/button.component.html +0 -1
- package/src/lib/matcha-button/button/button.component.scss +0 -0
- package/src/lib/matcha-button/button/button.component.ts +0 -182
- package/src/lib/matcha-button/button.argtypes.ts +0 -105
- package/src/lib/matcha-button/button.module.ts +0 -10
- package/src/lib/matcha-button/button.stories.ts +0 -552
- package/src/lib/matcha-button-toggle/button-toggle/button-toggle.component.html +0 -8
- package/src/lib/matcha-button-toggle/button-toggle/button-toggle.component.scss +0 -0
- package/src/lib/matcha-button-toggle/button-toggle/button-toggle.component.ts +0 -87
- package/src/lib/matcha-button-toggle/button-toggle.module.ts +0 -16
- package/src/lib/matcha-button-toggle/button-toggle.stories.ts +0 -106
- package/src/lib/matcha-card/card/card.component.html +0 -1
- package/src/lib/matcha-card/card/card.component.scss +0 -0
- package/src/lib/matcha-card/card/card.component.ts +0 -86
- package/src/lib/matcha-card/card-argtype.ts +0 -54
- package/src/lib/matcha-card/card.module.ts +0 -22
- package/src/lib/matcha-card/card.stories.ts +0 -339
- package/src/lib/matcha-checkbox/checkbox/checkbox.component.html +0 -19
- package/src/lib/matcha-checkbox/checkbox/checkbox.component.scss +0 -0
- package/src/lib/matcha-checkbox/checkbox/checkbox.component.ts +0 -79
- package/src/lib/matcha-checkbox/checkbox.module.ts +0 -15
- package/src/lib/matcha-checkbox/checkbox.stories.ts +0 -391
- package/src/lib/matcha-components.module.ts +0 -149
- package/src/lib/matcha-date-range/date-range/date-range.component.html +0 -3
- package/src/lib/matcha-date-range/date-range/date-range.component.scss +0 -0
- package/src/lib/matcha-date-range/date-range/date-range.component.ts +0 -100
- package/src/lib/matcha-date-range/date-range.module.ts +0 -14
- package/src/lib/matcha-divider/divider/divider.component.html +0 -1
- package/src/lib/matcha-divider/divider/divider.component.scss +0 -0
- package/src/lib/matcha-divider/divider/divider.component.ts +0 -50
- package/src/lib/matcha-divider/divider.argtypes.ts +0 -57
- package/src/lib/matcha-divider/divider.mdx +0 -107
- package/src/lib/matcha-divider/divider.module.ts +0 -14
- package/src/lib/matcha-divider/divider.stories.ts +0 -44
- package/src/lib/matcha-drawer/drawer/drawer.component.html +0 -43
- package/src/lib/matcha-drawer/drawer/drawer.component.ts +0 -358
- package/src/lib/matcha-drawer/drawer-container/drawer-container.component.html +0 -3
- package/src/lib/matcha-drawer/drawer-container/drawer-container.component.ts +0 -36
- package/src/lib/matcha-drawer/drawer-content/drawer-content.component.html +0 -3
- package/src/lib/matcha-drawer/drawer-content/drawer-content.component.ts +0 -24
- package/src/lib/matcha-drawer/drawer.module.ts +0 -28
- package/src/lib/matcha-drop-list/directives/drag-handle.directive.ts +0 -22
- package/src/lib/matcha-drop-list/directives/drag.directive.ts +0 -369
- package/src/lib/matcha-drop-list/drop-list/drop-list.component.html +0 -27
- package/src/lib/matcha-drop-list/drop-list/drop-list.component.ts +0 -380
- package/src/lib/matcha-drop-list/drop-list-argtype.ts +0 -56
- package/src/lib/matcha-drop-list/drop-list.module.ts +0 -27
- package/src/lib/matcha-drop-list/drop-list.stories.ts +0 -314
- package/src/lib/matcha-drop-list/services/drop-list.service.ts +0 -30
- package/src/lib/matcha-elevation/elevation.argtypes.ts +0 -16
- package/src/lib/matcha-elevation/elevation.directive.ts +0 -30
- package/src/lib/matcha-elevation/elevation.module.ts +0 -10
- package/src/lib/matcha-elevation/elevation.stories.ts +0 -60
- package/src/lib/matcha-form-field/form-field.argtype.ts +0 -21
- package/src/lib/matcha-form-field/form-field.stories.ts +0 -45
- package/src/lib/matcha-form-field/matcha-error/matcha-error.component.html +0 -4
- package/src/lib/matcha-form-field/matcha-error/matcha-error.component.scss +0 -0
- package/src/lib/matcha-form-field/matcha-error/matcha-error.component.ts +0 -9
- package/src/lib/matcha-form-field/matcha-form-field/matcha-form-field.component.html +0 -19
- package/src/lib/matcha-form-field/matcha-form-field/matcha-form-field.component.scss +0 -0
- package/src/lib/matcha-form-field/matcha-form-field/matcha-form-field.component.ts +0 -30
- package/src/lib/matcha-form-field/matcha-form-field.module.ts +0 -13
- package/src/lib/matcha-form-field/matcha-label/matcha-label.component.html +0 -7
- package/src/lib/matcha-form-field/matcha-label/matcha-label.component.scss +0 -0
- package/src/lib/matcha-form-field/matcha-label/matcha-label.component.ts +0 -11
- package/src/lib/matcha-grid/grid-argtype.ts +0 -67
- package/src/lib/matcha-grid/grid.component.html +0 -3
- package/src/lib/matcha-grid/grid.component.scss +0 -0
- package/src/lib/matcha-grid/grid.component.ts +0 -114
- package/src/lib/matcha-grid/grid.mdx +0 -60
- package/src/lib/matcha-grid/grid.module.ts +0 -10
- package/src/lib/matcha-grid/grid.stories.ts +0 -125
- package/src/lib/matcha-highlight/copy-button/copy-button.component.html +0 -12
- package/src/lib/matcha-highlight/copy-button/copy-button.component.scss +0 -28
- package/src/lib/matcha-highlight/copy-button/copy-button.component.ts +0 -127
- package/src/lib/matcha-highlight/highlight.component.ts +0 -237
- package/src/lib/matcha-highlight/highlight.module.ts +0 -24
- package/src/lib/matcha-highlight/prism-init.ts +0 -11
- package/src/lib/matcha-highlight/prism-languages.ts +0 -5
- package/src/lib/matcha-highlight/prismjs/components/index.js +0 -82
- package/src/lib/matcha-highlight/prismjs/components/prism-abap.js +0 -48
- package/src/lib/matcha-highlight/prismjs/components/prism-abap.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-abnf.js +0 -54
- package/src/lib/matcha-highlight/prismjs/components/prism-abnf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-actionscript.js +0 -17
- package/src/lib/matcha-highlight/prismjs/components/prism-actionscript.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ada.js +0 -19
- package/src/lib/matcha-highlight/prismjs/components/prism-ada.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-apacheconf.js +0 -47
- package/src/lib/matcha-highlight/prismjs/components/prism-apacheconf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-apl.js +0 -32
- package/src/lib/matcha-highlight/prismjs/components/prism-apl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-applescript.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-applescript.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-arduino.js +0 -5
- package/src/lib/matcha-highlight/prismjs/components/prism-arduino.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-arff.js +0 -10
- package/src/lib/matcha-highlight/prismjs/components/prism-arff.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-asciidoc.js +0 -234
- package/src/lib/matcha-highlight/prismjs/components/prism-asciidoc.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-asm6502.js +0 -28
- package/src/lib/matcha-highlight/prismjs/components/prism-asm6502.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-aspnet.js +0 -36
- package/src/lib/matcha-highlight/prismjs/components/prism-aspnet.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-autohotkey.js +0 -27
- package/src/lib/matcha-highlight/prismjs/components/prism-autohotkey.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-autoit.js +0 -34
- package/src/lib/matcha-highlight/prismjs/components/prism-autoit.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-basic.js +0 -17
- package/src/lib/matcha-highlight/prismjs/components/prism-basic.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-batch.js +0 -99
- package/src/lib/matcha-highlight/prismjs/components/prism-batch.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-bison.js +0 -39
- package/src/lib/matcha-highlight/prismjs/components/prism-bison.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-bnf.js +0 -21
- package/src/lib/matcha-highlight/prismjs/components/prism-bnf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-brainfuck.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-brainfuck.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-bro.js +0 -48
- package/src/lib/matcha-highlight/prismjs/components/prism-bro.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-cil.js +0 -27
- package/src/lib/matcha-highlight/prismjs/components/prism-cil.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-clike.js +0 -30
- package/src/lib/matcha-highlight/prismjs/components/prism-clike.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-clojure.js +0 -13
- package/src/lib/matcha-highlight/prismjs/components/prism-clojure.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-cmake.js +0 -29
- package/src/lib/matcha-highlight/prismjs/components/prism-cmake.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-coffeescript.js +0 -92
- package/src/lib/matcha-highlight/prismjs/components/prism-coffeescript.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-core.js +0 -553
- package/src/lib/matcha-highlight/prismjs/components/prism-core.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-crystal.js +0 -51
- package/src/lib/matcha-highlight/prismjs/components/prism-crystal.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-csp.js +0 -25
- package/src/lib/matcha-highlight/prismjs/components/prism-csp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-css-extras.js +0 -70
- package/src/lib/matcha-highlight/prismjs/components/prism-css-extras.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-css.js +0 -51
- package/src/lib/matcha-highlight/prismjs/components/prism-css.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-d.js +0 -64
- package/src/lib/matcha-highlight/prismjs/components/prism-d.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-dart.js +0 -24
- package/src/lib/matcha-highlight/prismjs/components/prism-dart.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-django.js +0 -60
- package/src/lib/matcha-highlight/prismjs/components/prism-django.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-docker.js +0 -11
- package/src/lib/matcha-highlight/prismjs/components/prism-docker.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ebnf.js +0 -22
- package/src/lib/matcha-highlight/prismjs/components/prism-ebnf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-eiffel.js +0 -37
- package/src/lib/matcha-highlight/prismjs/components/prism-eiffel.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ejs.js +0 -24
- package/src/lib/matcha-highlight/prismjs/components/prism-ejs.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-elixir.js +0 -93
- package/src/lib/matcha-highlight/prismjs/components/prism-elixir.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-elm.js +0 -44
- package/src/lib/matcha-highlight/prismjs/components/prism-elm.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-erb.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-erb.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-erlang.js +0 -44
- package/src/lib/matcha-highlight/prismjs/components/prism-erlang.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-flow.js +0 -35
- package/src/lib/matcha-highlight/prismjs/components/prism-flow.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-fortran.js +0 -40
- package/src/lib/matcha-highlight/prismjs/components/prism-fortran.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-fsharp.js +0 -67
- package/src/lib/matcha-highlight/prismjs/components/prism-fsharp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-gcode.js +0 -15
- package/src/lib/matcha-highlight/prismjs/components/prism-gcode.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-gedcom.js +0 -28
- package/src/lib/matcha-highlight/prismjs/components/prism-gedcom.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-gherkin.js +0 -79
- package/src/lib/matcha-highlight/prismjs/components/prism-gherkin.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-git.js +0 -68
- package/src/lib/matcha-highlight/prismjs/components/prism-git.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-glsl.js +0 -16
- package/src/lib/matcha-highlight/prismjs/components/prism-glsl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-gml.js +0 -7
- package/src/lib/matcha-highlight/prismjs/components/prism-gml.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-go.js +0 -12
- package/src/lib/matcha-highlight/prismjs/components/prism-go.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-graphql.js +0 -31
- package/src/lib/matcha-highlight/prismjs/components/prism-graphql.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-groovy.js +0 -65
- package/src/lib/matcha-highlight/prismjs/components/prism-groovy.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-haml.js +0 -154
- package/src/lib/matcha-highlight/prismjs/components/prism-haml.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-handlebars.js +0 -37
- package/src/lib/matcha-highlight/prismjs/components/prism-handlebars.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-haskell.js +0 -38
- package/src/lib/matcha-highlight/prismjs/components/prism-haskell.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-haxe.js +0 -45
- package/src/lib/matcha-highlight/prismjs/components/prism-haxe.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-hcl.js +0 -65
- package/src/lib/matcha-highlight/prismjs/components/prism-hcl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-hpkp.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-hpkp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-hsts.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-hsts.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-http.js +0 -79
- package/src/lib/matcha-highlight/prismjs/components/prism-http.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ichigojam.js +0 -15
- package/src/lib/matcha-highlight/prismjs/components/prism-ichigojam.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-icon.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-icon.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-inform7.js +0 -61
- package/src/lib/matcha-highlight/prismjs/components/prism-inform7.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ini.js +0 -11
- package/src/lib/matcha-highlight/prismjs/components/prism-ini.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-io.js +0 -31
- package/src/lib/matcha-highlight/prismjs/components/prism-io.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-j.js +0 -25
- package/src/lib/matcha-highlight/prismjs/components/prism-j.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-javadoc.js +0 -54
- package/src/lib/matcha-highlight/prismjs/components/prism-javadoc.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-javadoclike.js +0 -86
- package/src/lib/matcha-highlight/prismjs/components/prism-javadoclike.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-javascript.js +0 -86
- package/src/lib/matcha-highlight/prismjs/components/prism-javascript.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-javastacktrace.js +0 -93
- package/src/lib/matcha-highlight/prismjs/components/prism-javastacktrace.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-jolie.js +0 -55
- package/src/lib/matcha-highlight/prismjs/components/prism-jolie.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-js-extras.js +0 -104
- package/src/lib/matcha-highlight/prismjs/components/prism-js-extras.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-jsdoc.js +0 -73
- package/src/lib/matcha-highlight/prismjs/components/prism-jsdoc.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-json5.js +0 -23
- package/src/lib/matcha-highlight/prismjs/components/prism-json5.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-jsonp.js +0 -7
- package/src/lib/matcha-highlight/prismjs/components/prism-jsonp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-jsx.js +0 -126
- package/src/lib/matcha-highlight/prismjs/components/prism-jsx.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-julia.js +0 -12
- package/src/lib/matcha-highlight/prismjs/components/prism-julia.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-keyman.js +0 -14
- package/src/lib/matcha-highlight/prismjs/components/prism-keyman.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-kotlin.js +0 -62
- package/src/lib/matcha-highlight/prismjs/components/prism-kotlin.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-latex.js +0 -61
- package/src/lib/matcha-highlight/prismjs/components/prism-latex.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-less.js +0 -54
- package/src/lib/matcha-highlight/prismjs/components/prism-less.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-liquid.js +0 -12
- package/src/lib/matcha-highlight/prismjs/components/prism-liquid.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-lisp.js +0 -197
- package/src/lib/matcha-highlight/prismjs/components/prism-lisp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-livescript.js +0 -119
- package/src/lib/matcha-highlight/prismjs/components/prism-livescript.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-lolcode.js +0 -55
- package/src/lib/matcha-highlight/prismjs/components/prism-lolcode.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-lua.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-lua.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-makefile.js +0 -34
- package/src/lib/matcha-highlight/prismjs/components/prism-makefile.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-markdown.js +0 -227
- package/src/lib/matcha-highlight/prismjs/components/prism-markdown.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-markup-templating.js +0 -123
- package/src/lib/matcha-highlight/prismjs/components/prism-markup-templating.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-markup.js +0 -100
- package/src/lib/matcha-highlight/prismjs/components/prism-markup.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-matlab.js +0 -16
- package/src/lib/matcha-highlight/prismjs/components/prism-matlab.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-mel.js +0 -43
- package/src/lib/matcha-highlight/prismjs/components/prism-mel.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-mizar.js +0 -12
- package/src/lib/matcha-highlight/prismjs/components/prism-mizar.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-monkey.js +0 -31
- package/src/lib/matcha-highlight/prismjs/components/prism-monkey.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-n1ql.js +0 -18
- package/src/lib/matcha-highlight/prismjs/components/prism-n1ql.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-n4js.js +0 -14
- package/src/lib/matcha-highlight/prismjs/components/prism-n4js.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nand2tetris-hdl.js +0 -9
- package/src/lib/matcha-highlight/prismjs/components/prism-nand2tetris-hdl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nasm.js +0 -24
- package/src/lib/matcha-highlight/prismjs/components/prism-nasm.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nginx.js +0 -11
- package/src/lib/matcha-highlight/prismjs/components/prism-nginx.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nim.js +0 -33
- package/src/lib/matcha-highlight/prismjs/components/prism-nim.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nix.js +0 -40
- package/src/lib/matcha-highlight/prismjs/components/prism-nix.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-nsis.js +0 -29
- package/src/lib/matcha-highlight/prismjs/components/prism-nsis.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-objectivec.js +0 -7
- package/src/lib/matcha-highlight/prismjs/components/prism-objectivec.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ocaml.js +0 -27
- package/src/lib/matcha-highlight/prismjs/components/prism-ocaml.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-opencl.js +0 -49
- package/src/lib/matcha-highlight/prismjs/components/prism-opencl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-oz.js +0 -25
- package/src/lib/matcha-highlight/prismjs/components/prism-oz.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-parigp.js +0 -30
- package/src/lib/matcha-highlight/prismjs/components/prism-parigp.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-parser.js +0 -73
- package/src/lib/matcha-highlight/prismjs/components/prism-parser.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-pascal.js +0 -55
- package/src/lib/matcha-highlight/prismjs/components/prism-pascal.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-php-extras.js +0 -11
- package/src/lib/matcha-highlight/prismjs/components/prism-php-extras.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-phpdoc.js +0 -27
- package/src/lib/matcha-highlight/prismjs/components/prism-phpdoc.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-plsql.js +0 -26
- package/src/lib/matcha-highlight/prismjs/components/prism-plsql.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-powershell.js +0 -60
- package/src/lib/matcha-highlight/prismjs/components/prism-powershell.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-processing.js +0 -18
- package/src/lib/matcha-highlight/prismjs/components/prism-processing.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-prolog.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-prolog.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-properties.js +0 -9
- package/src/lib/matcha-highlight/prismjs/components/prism-properties.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-protobuf.js +0 -8
- package/src/lib/matcha-highlight/prismjs/components/prism-protobuf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-pug.js +0 -193
- package/src/lib/matcha-highlight/prismjs/components/prism-pug.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-puppet.js +0 -136
- package/src/lib/matcha-highlight/prismjs/components/prism-puppet.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-pure.js +0 -79
- package/src/lib/matcha-highlight/prismjs/components/prism-pure.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-q.js +0 -51
- package/src/lib/matcha-highlight/prismjs/components/prism-q.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-qore.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-qore.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-r.js +0 -22
- package/src/lib/matcha-highlight/prismjs/components/prism-r.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-reason.js +0 -32
- package/src/lib/matcha-highlight/prismjs/components/prism-reason.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-regex.js +0 -97
- package/src/lib/matcha-highlight/prismjs/components/prism-regex.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-renpy.js +0 -29
- package/src/lib/matcha-highlight/prismjs/components/prism-renpy.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-rest.js +0 -205
- package/src/lib/matcha-highlight/prismjs/components/prism-rest.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-rip.js +0 -32
- package/src/lib/matcha-highlight/prismjs/components/prism-rip.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-roboconf.js +0 -27
- package/src/lib/matcha-highlight/prismjs/components/prism-roboconf.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-ruby.js +0 -143
- package/src/lib/matcha-highlight/prismjs/components/prism-ruby.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-rust.js +0 -68
- package/src/lib/matcha-highlight/prismjs/components/prism-rust.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-sas.js +0 -34
- package/src/lib/matcha-highlight/prismjs/components/prism-sas.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-scala.js +0 -18
- package/src/lib/matcha-highlight/prismjs/components/prism-scala.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-scheme.js +0 -33
- package/src/lib/matcha-highlight/prismjs/components/prism-scheme.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-smalltalk.js +0 -31
- package/src/lib/matcha-highlight/prismjs/components/prism-smalltalk.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-smarty.js +0 -87
- package/src/lib/matcha-highlight/prismjs/components/prism-smarty.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-soy.js +0 -96
- package/src/lib/matcha-highlight/prismjs/components/prism-soy.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-sql.js +0 -24
- package/src/lib/matcha-highlight/prismjs/components/prism-sql.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-stylus.js +0 -111
- package/src/lib/matcha-highlight/prismjs/components/prism-stylus.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-swift.js +0 -25
- package/src/lib/matcha-highlight/prismjs/components/prism-swift.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-cs.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-cs.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-templating.js +0 -49
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-templating.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-vb.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-t4-vb.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-tap.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-tap.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-tcl.js +0 -46
- package/src/lib/matcha-highlight/prismjs/components/prism-tcl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-textile.js +0 -260
- package/src/lib/matcha-highlight/prismjs/components/prism-textile.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-toml.js +0 -43
- package/src/lib/matcha-highlight/prismjs/components/prism-toml.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-tsx.js +0 -2
- package/src/lib/matcha-highlight/prismjs/components/prism-tsx.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-tt2.js +0 -56
- package/src/lib/matcha-highlight/prismjs/components/prism-tt2.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-twig.js +0 -46
- package/src/lib/matcha-highlight/prismjs/components/prism-twig.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-vala.js +0 -74
- package/src/lib/matcha-highlight/prismjs/components/prism-vala.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-vbnet.js +0 -15
- package/src/lib/matcha-highlight/prismjs/components/prism-vbnet.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-velocity.js +0 -72
- package/src/lib/matcha-highlight/prismjs/components/prism-velocity.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-verilog.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-verilog.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-vhdl.js +0 -23
- package/src/lib/matcha-highlight/prismjs/components/prism-vhdl.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-vim.js +0 -10
- package/src/lib/matcha-highlight/prismjs/components/prism-vim.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-visual-basic.js +0 -34
- package/src/lib/matcha-highlight/prismjs/components/prism-visual-basic.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-wasm.js +0 -31
- package/src/lib/matcha-highlight/prismjs/components/prism-wasm.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-wiki.js +0 -81
- package/src/lib/matcha-highlight/prismjs/components/prism-wiki.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-xeora.js +0 -114
- package/src/lib/matcha-highlight/prismjs/components/prism-xeora.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-xojo.js +0 -20
- package/src/lib/matcha-highlight/prismjs/components/prism-xojo.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-xquery.js +0 -164
- package/src/lib/matcha-highlight/prismjs/components/prism-xquery.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components/prism-yaml.js +0 -47
- package/src/lib/matcha-highlight/prismjs/components/prism-yaml.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/components.js +0 -2
- package/src/lib/matcha-highlight/prismjs/components.json +0 -1031
- package/src/lib/matcha-highlight/prismjs/plugins/autolinker/prism-autolinker.css +0 -3
- package/src/lib/matcha-highlight/prismjs/plugins/autolinker/prism-autolinker.js +0 -81
- package/src/lib/matcha-highlight/prismjs/plugins/autolinker/prism-autolinker.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/autoloader/prism-autoloader.js +0 -214
- package/src/lib/matcha-highlight/prismjs/plugins/autoloader/prism-autoloader.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/command-line/prism-command-line.css +0 -33
- package/src/lib/matcha-highlight/prismjs/plugins/command-line/prism-command-line.js +0 -139
- package/src/lib/matcha-highlight/prismjs/plugins/command-line/prism-command-line.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +0 -75
- package/src/lib/matcha-highlight/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/custom-class/prism-custom-class.js +0 -31
- package/src/lib/matcha-highlight/prismjs/plugins/custom-class/prism-custom-class.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/data-uri-highlight/prism-data-uri-highlight.js +0 -98
- package/src/lib/matcha-highlight/prismjs/plugins/data-uri-highlight/prism-data-uri-highlight.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/file-highlight/prism-file-highlight.js +0 -105
- package/src/lib/matcha-highlight/prismjs/plugins/file-highlight/prism-file-highlight.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/highlight-keywords/prism-highlight-keywords.js +0 -17
- package/src/lib/matcha-highlight/prismjs/plugins/highlight-keywords/prism-highlight-keywords.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/jsonp-highlight/prism-jsonp-highlight.js +0 -206
- package/src/lib/matcha-highlight/prismjs/plugins/jsonp-highlight/prism-jsonp-highlight.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/keep-markup/prism-keep-markup.js +0 -99
- package/src/lib/matcha-highlight/prismjs/plugins/keep-markup/prism-keep-markup.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/line-highlight/prism-line-highlight.css +0 -49
- package/src/lib/matcha-highlight/prismjs/plugins/line-highlight/prism-line-highlight.js +0 -181
- package/src/lib/matcha-highlight/prismjs/plugins/line-highlight/prism-line-highlight.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/line-numbers/prism-line-numbers.css +0 -41
- package/src/lib/matcha-highlight/prismjs/plugins/line-numbers/prism-line-numbers.js +0 -168
- package/src/lib/matcha-highlight/prismjs/plugins/line-numbers/prism-line-numbers.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js +0 -190
- package/src/lib/matcha-highlight/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/previewers/prism-previewers.css +0 -242
- package/src/lib/matcha-highlight/prismjs/plugins/previewers/prism-previewers.js +0 -708
- package/src/lib/matcha-highlight/prismjs/plugins/previewers/prism-previewers.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js +0 -21
- package/src/lib/matcha-highlight/prismjs/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/show-invisibles/prism-show-invisibles.css +0 -34
- package/src/lib/matcha-highlight/prismjs/plugins/show-invisibles/prism-show-invisibles.js +0 -84
- package/src/lib/matcha-highlight/prismjs/plugins/show-invisibles/prism-show-invisibles.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/show-language/prism-show-language.js +0 -46
- package/src/lib/matcha-highlight/prismjs/plugins/show-language/prism-show-language.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/toolbar/prism-toolbar.css +0 -58
- package/src/lib/matcha-highlight/prismjs/plugins/toolbar/prism-toolbar.js +0 -149
- package/src/lib/matcha-highlight/prismjs/plugins/toolbar/prism-toolbar.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/unescaped-markup/prism-unescaped-markup.css +0 -10
- package/src/lib/matcha-highlight/prismjs/plugins/unescaped-markup/prism-unescaped-markup.js +0 -44
- package/src/lib/matcha-highlight/prismjs/plugins/unescaped-markup/prism-unescaped-markup.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/plugins/wpd/prism-wpd.css +0 -11
- package/src/lib/matcha-highlight/prismjs/plugins/wpd/prism-wpd.js +0 -169
- package/src/lib/matcha-highlight/prismjs/plugins/wpd/prism-wpd.min.js +0 -1
- package/src/lib/matcha-highlight/prismjs/prism.d.ts +0 -4
- package/src/lib/matcha-highlight/prismjs/prism.js +0 -960
- package/src/lib/matcha-highlight/prismjs/themes/prism-coy.css +0 -226
- package/src/lib/matcha-highlight/prismjs/themes/prism-dark.css +0 -129
- package/src/lib/matcha-highlight/prismjs/themes/prism-funky.css +0 -117
- package/src/lib/matcha-highlight/prismjs/themes/prism-okaidia.css +0 -123
- package/src/lib/matcha-highlight/prismjs/themes/prism-solarizedlight.css +0 -150
- package/src/lib/matcha-highlight/prismjs/themes/prism-tomorrow.css +0 -122
- package/src/lib/matcha-highlight/prismjs/themes/prism-twilight.css +0 -199
- package/src/lib/matcha-highlight/prismjs/themes/prism.css +0 -139
- package/src/lib/matcha-hint-text/hint/hint-text.component.html +0 -4
- package/src/lib/matcha-hint-text/hint/hint-text.component.scss +0 -0
- package/src/lib/matcha-hint-text/hint/hint-text.component.ts +0 -31
- package/src/lib/matcha-hint-text/hint.module.ts +0 -15
- package/src/lib/matcha-hint-text/hint.stories.ts +0 -52
- package/src/lib/matcha-icon/icon-argtype.ts +0 -36
- package/src/lib/matcha-icon/icon.component.html +0 -3
- package/src/lib/matcha-icon/icon.component.scss +0 -0
- package/src/lib/matcha-icon/icon.component.ts +0 -34
- package/src/lib/matcha-icon/icon.mdx +0 -58
- package/src/lib/matcha-icon/icon.module.ts +0 -11
- package/src/lib/matcha-icon/icon.stories.ts +0 -431
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll/matcha-infinite-scroll.component.html +0 -0
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll/matcha-infinite-scroll.component.scss +0 -0
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll/matcha-infinite-scroll.component.ts +0 -49
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll-data/matcha-infinite-scroll-data.component.html +0 -0
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll-data/matcha-infinite-scroll-data.component.scss +0 -0
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll-data/matcha-infinite-scroll-data.component.ts +0 -165
- package/src/lib/matcha-infinite-scroll/matcha-infinite-scroll.module.ts +0 -14
- package/src/lib/matcha-input/input.argtypes.ts +0 -39
- package/src/lib/matcha-input/input.directive.ts +0 -12
- package/src/lib/matcha-input/input.mdx +0 -73
- package/src/lib/matcha-input/input.module.ts +0 -9
- package/src/lib/matcha-input/input.stories.ts +0 -97
- package/src/lib/matcha-input-phone/all-countries.ts +0 -1366
- package/src/lib/matcha-input-phone/input-phone.argtypes.ts +0 -83
- package/src/lib/matcha-input-phone/input-phone.component.html +0 -33
- package/src/lib/matcha-input-phone/input-phone.component.spec.ts +0 -23
- package/src/lib/matcha-input-phone/input-phone.component.ts +0 -267
- package/src/lib/matcha-input-phone/input-phone.module.ts +0 -22
- package/src/lib/matcha-input-phone/input-phone.stories.ts +0 -85
- package/src/lib/matcha-input-phone/lib/custom-keyboard-event.ts +0 -21
- package/src/lib/matcha-input-phone/lib/ngx-mask-applier.service.ts +0 -1073
- package/src/lib/matcha-input-phone/lib/ngx-mask-expression.enum.ts +0 -43
- package/src/lib/matcha-input-phone/lib/ngx-mask.config.ts +0 -132
- package/src/lib/matcha-input-phone/lib/ngx-mask.directive.ts +0 -1187
- package/src/lib/matcha-input-phone/lib/ngx-mask.module.ts +0 -55
- package/src/lib/matcha-input-phone/lib/ngx-mask.pipe.ts +0 -131
- package/src/lib/matcha-input-phone/lib/ngx-mask.providers.ts +0 -42
- package/src/lib/matcha-input-phone/lib/ngx-mask.service.ts +0 -832
- package/src/lib/matcha-lazyload/lazyload/lazyload.component.html +0 -1
- package/src/lib/matcha-lazyload/lazyload/lazyload.component.scss +0 -0
- package/src/lib/matcha-lazyload/lazyload/lazyload.component.ts +0 -48
- package/src/lib/matcha-lazyload/lazyload-data/lazyload-data.component.html +0 -1
- package/src/lib/matcha-lazyload/lazyload-data/lazyload-data.component.scss +0 -0
- package/src/lib/matcha-lazyload/lazyload-data/lazyload-data.component.ts +0 -172
- package/src/lib/matcha-lazyload/lazyload.module.ts +0 -14
- package/src/lib/matcha-masonry/masonry/masonry.component.html +0 -3
- package/src/lib/matcha-masonry/masonry/masonry.component.scss +0 -0
- package/src/lib/matcha-masonry/masonry/masonry.component.ts +0 -45
- package/src/lib/matcha-masonry/masonry.argtype.ts +0 -97
- package/src/lib/matcha-masonry/masonry.mdx +0 -133
- package/src/lib/matcha-masonry/masonry.module.ts +0 -10
- package/src/lib/matcha-masonry/masonry.stories.ts +0 -64
- package/src/lib/matcha-menu/menu.argtypes.ts +0 -111
- package/src/lib/matcha-menu/menu.component.html +0 -3
- package/src/lib/matcha-menu/menu.component.scss +0 -0
- package/src/lib/matcha-menu/menu.component.spec.ts +0 -23
- package/src/lib/matcha-menu/menu.component.ts +0 -48
- package/src/lib/matcha-menu/menu.directive.ts +0 -39
- package/src/lib/matcha-menu/menu.mdx +0 -59
- package/src/lib/matcha-menu/menu.module.ts +0 -19
- package/src/lib/matcha-menu/menu.stories.ts +0 -122
- package/src/lib/matcha-modal/exemplo/exemple-modal-content.component.html +0 -34
- package/src/lib/matcha-modal/exemplo/exemple-modal-content.component.ts +0 -44
- package/src/lib/matcha-modal/exemplo/exemple-modal.component.html +0 -46
- package/src/lib/matcha-modal/exemplo/exemple-modal.component.ts +0 -34
- package/src/lib/matcha-modal/matcha-modal.module.ts +0 -45
- package/src/lib/matcha-modal/modal/modal.component.html +0 -3
- package/src/lib/matcha-modal/modal/modal.component.scss +0 -0
- package/src/lib/matcha-modal/modal/modal.component.ts +0 -67
- package/src/lib/matcha-modal/modal-content/modal-content.component.html +0 -9
- package/src/lib/matcha-modal/modal-content/modal-content.component.scss +0 -0
- package/src/lib/matcha-modal/modal-content/modal-content.component.ts +0 -11
- package/src/lib/matcha-modal/modal-footer/modal-footer.component.html +0 -8
- package/src/lib/matcha-modal/modal-footer/modal-footer.component.scss +0 -0
- package/src/lib/matcha-modal/modal-footer/modal-footer.component.ts +0 -32
- package/src/lib/matcha-modal/modal-header/modal-header.component.html +0 -13
- package/src/lib/matcha-modal/modal-header/modal-header.component.scss +0 -0
- package/src/lib/matcha-modal/modal-header/modal-header.component.ts +0 -11
- package/src/lib/matcha-modal/modal-options/modal-options.component.html +0 -3
- package/src/lib/matcha-modal/modal-options/modal-options.component.scss +0 -0
- package/src/lib/matcha-modal/modal-options/modal-options.component.ts +0 -11
- package/src/lib/matcha-modal/modal.service.ts +0 -47
- package/src/lib/matcha-modal/modal.stories.argtypes.ts +0 -56
- package/src/lib/matcha-modal/modal.stories.ts +0 -333
- package/src/lib/matcha-modal/model/IMatchaModalComponent.ts +0 -1
- package/src/lib/matcha-modal/overlay.service.ts +0 -138
- package/src/lib/matcha-option/README.md +0 -144
- package/src/lib/matcha-option/matcha-option-parent.interface.ts +0 -22
- package/src/lib/matcha-option/matcha-option.component.ts +0 -93
- package/src/lib/matcha-option/matcha-option.module.ts +0 -17
- package/src/lib/matcha-option/matcha-option.stories.ts +0 -127
- package/src/lib/matcha-overflow-draggable/matcha-overflow-draggable.component.html +0 -3
- package/src/lib/matcha-overflow-draggable/matcha-overflow-draggable.component.scss +0 -0
- package/src/lib/matcha-overflow-draggable/matcha-overflow-draggable.component.ts +0 -56
- package/src/lib/matcha-page-layout/page-layout.component.html +0 -18
- package/src/lib/matcha-page-layout/page-layout.component.scss +0 -5
- package/src/lib/matcha-page-layout/page-layout.component.ts +0 -11
- package/src/lib/matcha-page-layout/page-layout.module.ts +0 -19
- package/src/lib/matcha-paginator/paginator/page-event.interface.ts +0 -13
- package/src/lib/matcha-paginator/paginator/paginator.component.html +0 -59
- package/src/lib/matcha-paginator/paginator/paginator.component.scss +0 -0
- package/src/lib/matcha-paginator/paginator/paginator.component.ts +0 -154
- package/src/lib/matcha-paginator/paginator-intl.service.ts +0 -39
- package/src/lib/matcha-paginator/paginator.module.ts +0 -13
- package/src/lib/matcha-panel/matcha-panel.component.ts +0 -223
- package/src/lib/matcha-panel/matcha-panel.module.ts +0 -17
- package/src/lib/matcha-progress-bar/progress-bar.argtype.ts +0 -48
- package/src/lib/matcha-progress-bar/progress-bar.directive.ts +0 -17
- package/src/lib/matcha-progress-bar/progress-bar.mdx +0 -95
- package/src/lib/matcha-progress-bar/progress-bar.module.ts +0 -14
- package/src/lib/matcha-progress-bar/progress-bar.stories.ts +0 -89
- package/src/lib/matcha-radio/radio/radio.component.html +0 -20
- package/src/lib/matcha-radio/radio/radio.component.scss +0 -0
- package/src/lib/matcha-radio/radio/radio.component.ts +0 -84
- package/src/lib/matcha-radio/radio.module.ts +0 -16
- package/src/lib/matcha-radio/radio.stories.ts +0 -175
- package/src/lib/matcha-ripple/ripple.directive.ts +0 -71
- package/src/lib/matcha-ripple/ripple.module.ts +0 -16
- package/src/lib/matcha-select/matcha-select.component.html +0 -30
- package/src/lib/matcha-select/matcha-select.component.scss +0 -3
- package/src/lib/matcha-select/matcha-select.component.ts +0 -467
- package/src/lib/matcha-select/matcha-select.directive.ts +0 -147
- package/src/lib/matcha-select/matcha-select.module.ts +0 -23
- package/src/lib/matcha-sidenav/sidenav.argtypes.ts +0 -60
- package/src/lib/matcha-sidenav/sidenav.directive.ts +0 -12
- package/src/lib/matcha-sidenav/sidenav.mdx +0 -57
- package/src/lib/matcha-sidenav/sidenav.module.ts +0 -10
- package/src/lib/matcha-sidenav/sidenav.stories.ts +0 -79
- package/src/lib/matcha-skeleton/skeleton/skeleton.component.html +0 -70
- package/src/lib/matcha-skeleton/skeleton/skeleton.component.scss +0 -0
- package/src/lib/matcha-skeleton/skeleton/skeleton.component.ts +0 -36
- package/src/lib/matcha-skeleton/skeleton-argtype.ts +0 -67
- package/src/lib/matcha-skeleton/skeleton.module.ts +0 -11
- package/src/lib/matcha-skeleton/skeleton.stories.ts +0 -74
- package/src/lib/matcha-slide-toggle/slide-toggle/slide-toggle.component.html +0 -15
- package/src/lib/matcha-slide-toggle/slide-toggle/slide-toggle.component.scss +0 -0
- package/src/lib/matcha-slide-toggle/slide-toggle/slide-toggle.component.ts +0 -96
- package/src/lib/matcha-slide-toggle/slide-toggle.module.ts +0 -18
- package/src/lib/matcha-slide-toggle/slide-toggle.stories.ts +0 -78
- package/src/lib/matcha-slider/matcha-slider.directive.ts +0 -17
- package/src/lib/matcha-slider/slider.argtypes.ts +0 -76
- package/src/lib/matcha-slider/slider.mdx +0 -45
- package/src/lib/matcha-slider/slider.module.ts +0 -12
- package/src/lib/matcha-slider/slider.stories.ts +0 -149
- package/src/lib/matcha-snackbar/snack-bar-overview-example.component.ts +0 -22
- package/src/lib/matcha-snackbar/snack-bar-overview-example.css +0 -3
- package/src/lib/matcha-snackbar/snack-bar-overview-example.html +0 -11
- package/src/lib/matcha-snackbar/snack-bar.argtypes.ts +0 -11
- package/src/lib/matcha-snackbar/snack-bar.directive.ts +0 -12
- package/src/lib/matcha-snackbar/snack-bar.mdx +0 -53
- package/src/lib/matcha-snackbar/snack-bar.module.ts +0 -10
- package/src/lib/matcha-snackbar/snack-bar.stories.ts +0 -34
- package/src/lib/matcha-sort-header/example/sort-overview-example.component.ts +0 -66
- package/src/lib/matcha-sort-header/example/sort-overview-example.css +0 -3
- package/src/lib/matcha-sort-header/example/sort-overview-example.html +0 -21
- package/src/lib/matcha-sort-header/sort-header.argtypes.ts +0 -11
- package/src/lib/matcha-sort-header/sort-header.directive.ts +0 -17
- package/src/lib/matcha-sort-header/sort-header.mdx +0 -78
- package/src/lib/matcha-sort-header/sort-header.module.ts +0 -10
- package/src/lib/matcha-sort-header/sort-header.stories.ts +0 -34
- package/src/lib/matcha-spin/spin/spin.component.html +0 -27
- package/src/lib/matcha-spin/spin/spin.component.scss +0 -0
- package/src/lib/matcha-spin/spin/spin.component.ts +0 -70
- package/src/lib/matcha-spin/spin.module.ts +0 -16
- package/src/lib/matcha-spin/spin.stories.ts +0 -85
- package/src/lib/matcha-spinner/spinner/spinner.component.html +0 -29
- package/src/lib/matcha-spinner/spinner/spinner.component.scss +0 -1
- package/src/lib/matcha-spinner/spinner/spinner.component.ts +0 -74
- package/src/lib/matcha-spinner/spinner.module.ts +0 -15
- package/src/lib/matcha-spinner/spinner.stories.ts +0 -85
- package/src/lib/matcha-stepper/next-step.diretive.ts +0 -21
- package/src/lib/matcha-stepper/prev-step.diretive.ts +0 -21
- package/src/lib/matcha-stepper/step/step.component.ts +0 -11
- package/src/lib/matcha-stepper/step-content.diretive.ts +0 -9
- package/src/lib/matcha-stepper/stepper/stepper.component.ts +0 -20
- package/src/lib/matcha-stepper/stepper-content/stepper-content.component.ts +0 -38
- package/src/lib/matcha-stepper/stepper-controller/stepper-controller.component.html +0 -8
- package/src/lib/matcha-stepper/stepper-controller/stepper-controller.component.ts +0 -26
- package/src/lib/matcha-stepper/stepper.argtypes.ts +0 -74
- package/src/lib/matcha-stepper/stepper.module.ts +0 -32
- package/src/lib/matcha-stepper/stepper.service.ts +0 -50
- package/src/lib/matcha-stepper/stepper.stories.ts +0 -117
- package/src/lib/matcha-table/example/table-basic-example.component.ts +0 -36
- package/src/lib/matcha-table/example/table-basic-example.css +0 -0
- package/src/lib/matcha-table/example/table-basic-example.html +0 -35
- package/src/lib/matcha-table/table.argtypes.ts +0 -11
- package/src/lib/matcha-table/table.directive.ts +0 -17
- package/src/lib/matcha-table/table.mdx +0 -78
- package/src/lib/matcha-table/table.module.ts +0 -10
- package/src/lib/matcha-table/table.stories.ts +0 -34
- package/src/lib/matcha-tabs/tab-item/tab-item.component.html +0 -1
- package/src/lib/matcha-tabs/tab-item/tab-item.component.scss +0 -0
- package/src/lib/matcha-tabs/tab-item/tab-item.component.ts +0 -19
- package/src/lib/matcha-tabs/tabs/tabs.component.html +0 -22
- package/src/lib/matcha-tabs/tabs/tabs.component.scss +0 -0
- package/src/lib/matcha-tabs/tabs/tabs.component.ts +0 -58
- package/src/lib/matcha-tabs/tabs.module.ts +0 -19
- package/src/lib/matcha-tabs/tabs.stories.ts +0 -98
- package/src/lib/matcha-time/time/time.component.html +0 -3
- package/src/lib/matcha-time/time/time.component.scss +0 -0
- package/src/lib/matcha-time/time/time.component.ts +0 -141
- package/src/lib/matcha-time/time.module.ts +0 -14
- package/src/lib/matcha-time/time.stories.ts +0 -244
- package/src/lib/matcha-title/title/title.component.html +0 -8
- package/src/lib/matcha-title/title/title.component.scss +0 -5
- package/src/lib/matcha-title/title/title.component.ts +0 -73
- package/src/lib/matcha-title/title.argtypes.ts +0 -69
- package/src/lib/matcha-title/title.module.ts +0 -10
- package/src/lib/matcha-title/title.stories.ts +0 -132
- package/src/lib/matcha-toolbar/toolbar/toolbar.component.html +0 -54
- package/src/lib/matcha-toolbar/toolbar/toolbar.component.scss +0 -0
- package/src/lib/matcha-toolbar/toolbar/toolbar.component.ts +0 -43
- package/src/lib/matcha-toolbar/toolbar-button/toolbar-button.component.html +0 -8
- package/src/lib/matcha-toolbar/toolbar-button/toolbar-button.component.scss +0 -0
- package/src/lib/matcha-toolbar/toolbar-button/toolbar-button.component.ts +0 -21
- package/src/lib/matcha-toolbar/toolbar-content/toolbar-content.component.html +0 -8
- package/src/lib/matcha-toolbar/toolbar-content/toolbar-content.component.scss +0 -0
- package/src/lib/matcha-toolbar/toolbar-content/toolbar-content.component.ts +0 -9
- package/src/lib/matcha-toolbar/toolbar-custom-button/toolbar-custom-button.component.html +0 -6
- package/src/lib/matcha-toolbar/toolbar-custom-button/toolbar-custom-button.component.scss +0 -0
- package/src/lib/matcha-toolbar/toolbar-custom-button/toolbar-custom-button.component.ts +0 -10
- package/src/lib/matcha-toolbar/toolbar-main-button/toolbar-main-button.component.html +0 -11
- package/src/lib/matcha-toolbar/toolbar-main-button/toolbar-main-button.component.scss +0 -0
- package/src/lib/matcha-toolbar/toolbar-main-button/toolbar-main-button.component.ts +0 -15
- package/src/lib/matcha-toolbar/toolbar.argtypes.ts +0 -27
- package/src/lib/matcha-toolbar/toolbar.module.ts +0 -36
- package/src/lib/matcha-toolbar/toolbar.stories.ts +0 -131
- package/src/lib/matcha-tooltip/tooltip.argtypes.ts +0 -58
- package/src/lib/matcha-tooltip/tooltip.directive.ts +0 -158
- package/src/lib/matcha-tooltip/tooltip.module.ts +0 -11
- package/src/lib/matcha-tooltip/tooltip.stories.ts +0 -259
- package/src/lib/postcss.config.js +0 -6
- package/src/public-api.ts +0 -180
- package/tsconfig.lib.json +0 -18
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,832 +0,0 @@
|
|
|
1
|
-
import { ElementRef, inject, Injectable, Renderer2, DOCUMENT } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { NgxMaskConfig } from './ngx-mask.config';
|
|
5
|
-
import { NGX_MASK_CONFIG } from './ngx-mask.config';
|
|
6
|
-
import { NgxMaskApplierService } from './ngx-mask-applier.service';
|
|
7
|
-
import { MaskExpression } from './ngx-mask-expression.enum';
|
|
8
|
-
|
|
9
|
-
@Injectable()
|
|
10
|
-
export class NgxMaskService extends NgxMaskApplierService {
|
|
11
|
-
public isNumberValue = false;
|
|
12
|
-
public maskIsShown = '';
|
|
13
|
-
public selStart: number | null = null;
|
|
14
|
-
public selEnd: number | null = null;
|
|
15
|
-
public maskChanged = false;
|
|
16
|
-
public maskExpressionArray: string[] = [];
|
|
17
|
-
public previousValue = '';
|
|
18
|
-
public currentValue = '';
|
|
19
|
-
/**
|
|
20
|
-
* Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,
|
|
21
|
-
* since writeValue should be a one way only process of writing the DOM value based on the Angular model value.
|
|
22
|
-
*/
|
|
23
|
-
public writingValue = false;
|
|
24
|
-
|
|
25
|
-
private _emitValue = false;
|
|
26
|
-
private _start!: number;
|
|
27
|
-
private _end!: number;
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
30
|
-
public onChange = (_: any) => {};
|
|
31
|
-
|
|
32
|
-
public readonly _elementRef = inject(ElementRef, { optional: true });
|
|
33
|
-
|
|
34
|
-
private readonly document = inject(DOCUMENT);
|
|
35
|
-
|
|
36
|
-
protected override _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);
|
|
37
|
-
|
|
38
|
-
private readonly _renderer = inject(Renderer2, { optional: true });
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Applies the mask to the input value.
|
|
42
|
-
* @param inputValue The input value to be masked.
|
|
43
|
-
* @param maskExpression The mask expression to apply.
|
|
44
|
-
* @param position The position in the input value.
|
|
45
|
-
* @param justPasted Whether the value was just pasted.
|
|
46
|
-
* @param backspaced Whether the value was backspaced.
|
|
47
|
-
* @param cb Callback function.
|
|
48
|
-
* @returns The masked value.
|
|
49
|
-
*/
|
|
50
|
-
public override applyMask(
|
|
51
|
-
inputValue: string,
|
|
52
|
-
maskExpression: string,
|
|
53
|
-
position = 0,
|
|
54
|
-
justPasted = false,
|
|
55
|
-
backspaced = false,
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
57
|
-
cb: (...args: any[]) => any = () => {}
|
|
58
|
-
): string {
|
|
59
|
-
// If no mask expression, return the input value or the actual value
|
|
60
|
-
if (!maskExpression) {
|
|
61
|
-
return inputValue !== this.actualValue ? this.actualValue : inputValue;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Show mask in input if required
|
|
65
|
-
this.maskIsShown = this.showMaskTyped
|
|
66
|
-
? this.showMaskInInput()
|
|
67
|
-
: MaskExpression.EMPTY_STRING;
|
|
68
|
-
|
|
69
|
-
// Handle specific mask expressions
|
|
70
|
-
if (this.maskExpression === MaskExpression.IP && this.showMaskTyped) {
|
|
71
|
-
this.maskIsShown = this.showMaskInInput(inputValue || MaskExpression.HASH);
|
|
72
|
-
}
|
|
73
|
-
if (this.maskExpression === MaskExpression.CPF_CNPJ && this.showMaskTyped) {
|
|
74
|
-
this.maskIsShown = this.showMaskInInput(inputValue || MaskExpression.HASH);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Handle empty input value with mask typed
|
|
78
|
-
if (!inputValue && this.showMaskTyped) {
|
|
79
|
-
this.formControlResult(this.prefix);
|
|
80
|
-
return `${this.prefix}${this.maskIsShown}${this.suffix}`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const getSymbol: string =
|
|
84
|
-
!!inputValue && typeof this.selStart === 'number'
|
|
85
|
-
? (inputValue[this.selStart] ?? MaskExpression.EMPTY_STRING)
|
|
86
|
-
: MaskExpression.EMPTY_STRING;
|
|
87
|
-
let newInputValue = '';
|
|
88
|
-
let newPosition = position;
|
|
89
|
-
|
|
90
|
-
// Handle hidden input or input with asterisk symbol
|
|
91
|
-
if (
|
|
92
|
-
(this.hiddenInput ||
|
|
93
|
-
(inputValue && inputValue.indexOf(MaskExpression.SYMBOL_STAR) >= 0)) &&
|
|
94
|
-
!this.writingValue
|
|
95
|
-
) {
|
|
96
|
-
let actualResult: string[] =
|
|
97
|
-
inputValue && inputValue.length === 1
|
|
98
|
-
? inputValue.split(MaskExpression.EMPTY_STRING)
|
|
99
|
-
: this.actualValue.split(MaskExpression.EMPTY_STRING);
|
|
100
|
-
|
|
101
|
-
// Handle backspace
|
|
102
|
-
if (backspaced) {
|
|
103
|
-
actualResult = actualResult
|
|
104
|
-
.slice(0, position)
|
|
105
|
-
.concat(actualResult.slice(position + 1));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Remove mask if showMaskTyped is true
|
|
109
|
-
if (this.showMaskTyped) {
|
|
110
|
-
// eslint-disable-next-line no-param-reassign
|
|
111
|
-
inputValue = this.removeMask(inputValue);
|
|
112
|
-
actualResult = this.removeMask(actualResult.join('')).split(
|
|
113
|
-
MaskExpression.EMPTY_STRING
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Handle selection start and end
|
|
118
|
-
if (typeof this.selStart === 'object' && typeof this.selEnd === 'object') {
|
|
119
|
-
this.selStart = Number(this.selStart);
|
|
120
|
-
this.selEnd = Number(this.selEnd);
|
|
121
|
-
} else {
|
|
122
|
-
if (inputValue !== MaskExpression.EMPTY_STRING && actualResult.length) {
|
|
123
|
-
if (typeof this.selStart === 'number' && typeof this.selEnd === 'number') {
|
|
124
|
-
if (inputValue.length > actualResult.length) {
|
|
125
|
-
actualResult.splice(this.selStart, 0, getSymbol);
|
|
126
|
-
} else if (inputValue.length < actualResult.length) {
|
|
127
|
-
if (actualResult.length - inputValue.length === 1) {
|
|
128
|
-
if (backspaced) {
|
|
129
|
-
actualResult.splice(this.selStart - 1, 1);
|
|
130
|
-
} else {
|
|
131
|
-
actualResult.splice(inputValue.length - 1, 1);
|
|
132
|
-
}
|
|
133
|
-
} else {
|
|
134
|
-
actualResult.splice(this.selStart, this.selEnd - this.selStart);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
actualResult = [];
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Remove mask if showMaskTyped is true and hiddenInput is false
|
|
144
|
-
if (this.showMaskTyped && !this.hiddenInput) {
|
|
145
|
-
newInputValue = this.removeMask(inputValue);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Handle actual value length
|
|
149
|
-
if (this.actualValue.length) {
|
|
150
|
-
if (actualResult.length < inputValue.length) {
|
|
151
|
-
newInputValue = this.shiftTypedSymbols(
|
|
152
|
-
actualResult.join(MaskExpression.EMPTY_STRING)
|
|
153
|
-
);
|
|
154
|
-
} else if (actualResult.length === inputValue.length) {
|
|
155
|
-
newInputValue = actualResult.join(MaskExpression.EMPTY_STRING);
|
|
156
|
-
} else {
|
|
157
|
-
newInputValue = inputValue;
|
|
158
|
-
}
|
|
159
|
-
} else {
|
|
160
|
-
newInputValue = inputValue;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Handle just pasted input
|
|
165
|
-
if (justPasted && (this.hiddenInput || !this.hiddenInput)) {
|
|
166
|
-
newInputValue = inputValue;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Handle backspace with special characters
|
|
170
|
-
if (
|
|
171
|
-
backspaced &&
|
|
172
|
-
this.specialCharacters.indexOf(
|
|
173
|
-
this.maskExpression[newPosition] ?? MaskExpression.EMPTY_STRING
|
|
174
|
-
) !== -1 &&
|
|
175
|
-
this.showMaskTyped &&
|
|
176
|
-
!this.prefix
|
|
177
|
-
) {
|
|
178
|
-
newInputValue = this.currentValue;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Handle deleted special character
|
|
182
|
-
if (this.deletedSpecialCharacter && newPosition) {
|
|
183
|
-
if (
|
|
184
|
-
this.specialCharacters.includes(
|
|
185
|
-
this.actualValue.slice(newPosition, newPosition + 1)
|
|
186
|
-
)
|
|
187
|
-
) {
|
|
188
|
-
newPosition = newPosition + 1;
|
|
189
|
-
} else if (
|
|
190
|
-
maskExpression.slice(newPosition - 1, newPosition + 1) !== MaskExpression.MONTHS
|
|
191
|
-
) {
|
|
192
|
-
newPosition = newPosition - 2;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
this.deletedSpecialCharacter = false;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// Remove mask if showMaskTyped is true and placeHolderCharacter length is 1
|
|
199
|
-
if (
|
|
200
|
-
this.showMaskTyped &&
|
|
201
|
-
this.placeHolderCharacter.length === 1 &&
|
|
202
|
-
!this.leadZeroDateTime
|
|
203
|
-
) {
|
|
204
|
-
newInputValue = this.removeMask(newInputValue);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Handle mask changed
|
|
208
|
-
if (this.maskChanged) {
|
|
209
|
-
newInputValue = inputValue;
|
|
210
|
-
} else {
|
|
211
|
-
newInputValue =
|
|
212
|
-
Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Handle showMaskTyped and keepCharacterPositions
|
|
216
|
-
if (
|
|
217
|
-
this.showMaskTyped &&
|
|
218
|
-
this.keepCharacterPositions &&
|
|
219
|
-
this.actualValue &&
|
|
220
|
-
!justPasted &&
|
|
221
|
-
!this.writingValue
|
|
222
|
-
) {
|
|
223
|
-
const value = this.dropSpecialCharacters
|
|
224
|
-
? this.removeMask(this.actualValue)
|
|
225
|
-
: this.actualValue;
|
|
226
|
-
this.formControlResult(value);
|
|
227
|
-
return this.actualValue
|
|
228
|
-
? this.actualValue
|
|
229
|
-
: `${this.prefix}${this.maskIsShown}${this.suffix}`;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Apply the mask using the parent class method
|
|
233
|
-
const result: string = super.applyMask(
|
|
234
|
-
newInputValue,
|
|
235
|
-
maskExpression,
|
|
236
|
-
newPosition,
|
|
237
|
-
justPasted,
|
|
238
|
-
backspaced,
|
|
239
|
-
cb
|
|
240
|
-
);
|
|
241
|
-
|
|
242
|
-
this.actualValue = this.getActualValue(result);
|
|
243
|
-
|
|
244
|
-
// handle some separator implications:
|
|
245
|
-
// a.) adjust decimalMarker default (. -> ,) if thousandSeparator is a dot
|
|
246
|
-
if (
|
|
247
|
-
this.thousandSeparator === MaskExpression.DOT &&
|
|
248
|
-
this.decimalMarker === MaskExpression.DOT
|
|
249
|
-
) {
|
|
250
|
-
this.decimalMarker = MaskExpression.COMMA;
|
|
251
|
-
}
|
|
252
|
-
// b) remove decimal marker from list of special characters to mask
|
|
253
|
-
if (
|
|
254
|
-
this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&
|
|
255
|
-
this.dropSpecialCharacters === true
|
|
256
|
-
) {
|
|
257
|
-
this.specialCharacters = this.specialCharacters.filter(
|
|
258
|
-
(item: string) =>
|
|
259
|
-
!this._compareOrIncludes(item, this.decimalMarker, this.thousandSeparator) //item !== this.decimalMarker, // !
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Update previous and current values
|
|
264
|
-
if (result || result === '') {
|
|
265
|
-
this.previousValue = this.currentValue;
|
|
266
|
-
this.currentValue = result;
|
|
267
|
-
|
|
268
|
-
this._emitValue =
|
|
269
|
-
this.previousValue !== this.currentValue ||
|
|
270
|
-
(newInputValue !== this.currentValue && this.writingValue) ||
|
|
271
|
-
(this.previousValue === this.currentValue && justPasted);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Propagate the input value back to the Angular model
|
|
275
|
-
// eslint-disable-next-line no-unused-expressions,@typescript-eslint/no-unused-expressions
|
|
276
|
-
this._emitValue ? this.formControlResult(result) : '';
|
|
277
|
-
|
|
278
|
-
// Handle hidden input and showMaskTyped
|
|
279
|
-
if (!this.showMaskTyped || (this.showMaskTyped && this.hiddenInput)) {
|
|
280
|
-
if (this.hiddenInput) {
|
|
281
|
-
return `${this.hideInput(result, this.maskExpression)}${this.maskIsShown.slice(result.length)}`;
|
|
282
|
-
}
|
|
283
|
-
return result;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const resLen: number = result.length;
|
|
287
|
-
const prefNmask = `${this.prefix}${this.maskIsShown}${this.suffix}`;
|
|
288
|
-
|
|
289
|
-
// Handle specific mask expressions
|
|
290
|
-
if (this.maskExpression.includes(MaskExpression.HOURS)) {
|
|
291
|
-
const countSkipedSymbol = this._numberSkipedSymbols(result);
|
|
292
|
-
return `${result}${prefNmask.slice(resLen + countSkipedSymbol)}`;
|
|
293
|
-
} else if (
|
|
294
|
-
this.maskExpression === MaskExpression.IP ||
|
|
295
|
-
this.maskExpression === MaskExpression.CPF_CNPJ
|
|
296
|
-
) {
|
|
297
|
-
return `${result}${prefNmask}`;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return `${result}${prefNmask.slice(resLen)}`;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// get the number of characters that were shifted
|
|
304
|
-
private _numberSkipedSymbols(value: string): number {
|
|
305
|
-
const regex = /(^|\D)(\d\D)/g;
|
|
306
|
-
let match = regex.exec(value);
|
|
307
|
-
let countSkipedSymbol = 0;
|
|
308
|
-
while (match != null) {
|
|
309
|
-
countSkipedSymbol += 1;
|
|
310
|
-
match = regex.exec(value);
|
|
311
|
-
}
|
|
312
|
-
return countSkipedSymbol;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
public applyValueChanges(
|
|
316
|
-
position: number,
|
|
317
|
-
justPasted: boolean,
|
|
318
|
-
backspaced: boolean,
|
|
319
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
320
|
-
cb: (...args: any[]) => any = () => {}
|
|
321
|
-
): void {
|
|
322
|
-
const formElement = this._elementRef?.nativeElement;
|
|
323
|
-
if (!formElement) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
formElement.value = this.applyMask(
|
|
328
|
-
formElement.value,
|
|
329
|
-
this.maskExpression,
|
|
330
|
-
position,
|
|
331
|
-
justPasted,
|
|
332
|
-
backspaced,
|
|
333
|
-
cb
|
|
334
|
-
);
|
|
335
|
-
if (formElement === this._getActiveElement()) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
this.clearIfNotMatchFn();
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
public hideInput(inputValue: string, maskExpression: string): string {
|
|
342
|
-
return inputValue
|
|
343
|
-
.split(MaskExpression.EMPTY_STRING)
|
|
344
|
-
.map((curr: string, index: number) => {
|
|
345
|
-
if (
|
|
346
|
-
this.patterns &&
|
|
347
|
-
this.patterns[maskExpression[index] ?? MaskExpression.EMPTY_STRING] &&
|
|
348
|
-
this.patterns[maskExpression[index] ?? MaskExpression.EMPTY_STRING]?.symbol
|
|
349
|
-
) {
|
|
350
|
-
return this.patterns[maskExpression[index] ?? MaskExpression.EMPTY_STRING]
|
|
351
|
-
?.symbol;
|
|
352
|
-
}
|
|
353
|
-
return curr;
|
|
354
|
-
})
|
|
355
|
-
.join(MaskExpression.EMPTY_STRING);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// this function is not necessary, it checks result against maskExpression
|
|
359
|
-
public getActualValue(res: string): string {
|
|
360
|
-
const compare: string[] = res
|
|
361
|
-
.split(MaskExpression.EMPTY_STRING)
|
|
362
|
-
.filter((symbol: string, i: number) => {
|
|
363
|
-
const maskChar = this.maskExpression[i] ?? MaskExpression.EMPTY_STRING;
|
|
364
|
-
return (
|
|
365
|
-
this._checkSymbolMask(symbol, maskChar) ||
|
|
366
|
-
(this.specialCharacters.includes(maskChar) && symbol === maskChar)
|
|
367
|
-
);
|
|
368
|
-
});
|
|
369
|
-
if (compare.join(MaskExpression.EMPTY_STRING) === res) {
|
|
370
|
-
return compare.join(MaskExpression.EMPTY_STRING);
|
|
371
|
-
}
|
|
372
|
-
return res;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
public shiftTypedSymbols(inputValue: string): string {
|
|
376
|
-
let symbolToReplace = '';
|
|
377
|
-
const newInputValue: (string | undefined)[] =
|
|
378
|
-
(inputValue &&
|
|
379
|
-
inputValue
|
|
380
|
-
.split(MaskExpression.EMPTY_STRING)
|
|
381
|
-
.map((currSymbol: string, index: number) => {
|
|
382
|
-
if (
|
|
383
|
-
this.specialCharacters.includes(
|
|
384
|
-
inputValue[index + 1] ?? MaskExpression.EMPTY_STRING
|
|
385
|
-
) &&
|
|
386
|
-
inputValue[index + 1] !== this.maskExpression[index + 1]
|
|
387
|
-
) {
|
|
388
|
-
symbolToReplace = currSymbol;
|
|
389
|
-
return inputValue[index + 1];
|
|
390
|
-
}
|
|
391
|
-
if (symbolToReplace.length) {
|
|
392
|
-
const replaceSymbol: string = symbolToReplace;
|
|
393
|
-
symbolToReplace = MaskExpression.EMPTY_STRING;
|
|
394
|
-
return replaceSymbol;
|
|
395
|
-
}
|
|
396
|
-
return currSymbol;
|
|
397
|
-
})) ||
|
|
398
|
-
[];
|
|
399
|
-
return newInputValue.join(MaskExpression.EMPTY_STRING);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* Convert number value to string
|
|
404
|
-
* 3.1415 -> '3.1415'
|
|
405
|
-
* 1e-7 -> '0.0000001'
|
|
406
|
-
*/
|
|
407
|
-
public numberToString(value: number | string): string {
|
|
408
|
-
if (
|
|
409
|
-
(!value && value !== 0) ||
|
|
410
|
-
(this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&
|
|
411
|
-
(this.leadZero || !this.dropSpecialCharacters)) ||
|
|
412
|
-
(this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&
|
|
413
|
-
this.separatorLimit.length > 14 &&
|
|
414
|
-
String(value).length > 14)
|
|
415
|
-
) {
|
|
416
|
-
return String(value);
|
|
417
|
-
}
|
|
418
|
-
return Number(value)
|
|
419
|
-
.toLocaleString('fullwide', {
|
|
420
|
-
useGrouping: false,
|
|
421
|
-
maximumFractionDigits: 20,
|
|
422
|
-
})
|
|
423
|
-
.replace(`/${MaskExpression.MINUS}/`, MaskExpression.MINUS);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
public showMaskInInput(inputVal?: string): string {
|
|
427
|
-
if (this.showMaskTyped && !!this.shownMaskExpression) {
|
|
428
|
-
if (this.maskExpression.length !== this.shownMaskExpression.length) {
|
|
429
|
-
throw new Error('Mask expression must match mask placeholder length');
|
|
430
|
-
} else {
|
|
431
|
-
return this.shownMaskExpression;
|
|
432
|
-
}
|
|
433
|
-
} else if (this.showMaskTyped) {
|
|
434
|
-
if (inputVal) {
|
|
435
|
-
if (this.maskExpression === MaskExpression.IP) {
|
|
436
|
-
return this._checkForIp(inputVal);
|
|
437
|
-
}
|
|
438
|
-
if (this.maskExpression === MaskExpression.CPF_CNPJ) {
|
|
439
|
-
return this._checkForCpfCnpj(inputVal);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
if (this.placeHolderCharacter.length === this.maskExpression.length) {
|
|
443
|
-
return this.placeHolderCharacter;
|
|
444
|
-
}
|
|
445
|
-
return this.maskExpression.replace(/\w/g, this.placeHolderCharacter);
|
|
446
|
-
}
|
|
447
|
-
return '';
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
public clearIfNotMatchFn(): void {
|
|
451
|
-
const formElement = this._elementRef?.nativeElement;
|
|
452
|
-
if (!formElement) {
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
if (
|
|
456
|
-
this.clearIfNotMatch &&
|
|
457
|
-
this.prefix.length + this.maskExpression.length + this.suffix.length !==
|
|
458
|
-
formElement.value.replace(this.placeHolderCharacter, MaskExpression.EMPTY_STRING)
|
|
459
|
-
.length
|
|
460
|
-
) {
|
|
461
|
-
this.formElementProperty = ['value', MaskExpression.EMPTY_STRING];
|
|
462
|
-
this.applyMask('', this.maskExpression);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
public set formElementProperty([name, value]: [string, string | boolean]) {
|
|
467
|
-
if (!this._renderer || !this._elementRef) {
|
|
468
|
-
return;
|
|
469
|
-
}
|
|
470
|
-
//[TODO]: andriikamaldinov1 find better solution
|
|
471
|
-
Promise.resolve().then(() =>
|
|
472
|
-
this._renderer?.setProperty(this._elementRef?.nativeElement, name, value)
|
|
473
|
-
);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
public checkDropSpecialCharAmount(mask: string): number {
|
|
477
|
-
const chars: string[] = mask
|
|
478
|
-
.split(MaskExpression.EMPTY_STRING)
|
|
479
|
-
.filter((item: string) => this._findDropSpecialChar(item));
|
|
480
|
-
return chars.length;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
public removeMask(inputValue: string): string {
|
|
484
|
-
return this._removeMask(
|
|
485
|
-
this._removeSuffix(this._removePrefix(inputValue)),
|
|
486
|
-
this.specialCharacters.concat('_').concat(this.placeHolderCharacter)
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
private _checkForIp(inputVal: string): string {
|
|
491
|
-
if (inputVal === MaskExpression.HASH) {
|
|
492
|
-
return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;
|
|
493
|
-
}
|
|
494
|
-
const arr: string[] = [];
|
|
495
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
496
|
-
for (let i = 0; i < inputVal.length; i++) {
|
|
497
|
-
const value = inputVal[i] ?? MaskExpression.EMPTY_STRING;
|
|
498
|
-
if (!value) {
|
|
499
|
-
continue;
|
|
500
|
-
}
|
|
501
|
-
if (value.match('\\d')) {
|
|
502
|
-
arr.push(value);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
if (arr.length <= 3) {
|
|
506
|
-
return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;
|
|
507
|
-
}
|
|
508
|
-
if (arr.length > 3 && arr.length <= 6) {
|
|
509
|
-
return `${this.placeHolderCharacter}.${this.placeHolderCharacter}`;
|
|
510
|
-
}
|
|
511
|
-
if (arr.length > 6 && arr.length <= 9) {
|
|
512
|
-
return this.placeHolderCharacter;
|
|
513
|
-
}
|
|
514
|
-
if (arr.length > 9 && arr.length <= 12) {
|
|
515
|
-
return '';
|
|
516
|
-
}
|
|
517
|
-
return '';
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
private _checkForCpfCnpj(inputVal: string): string {
|
|
521
|
-
const cpf =
|
|
522
|
-
`${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
523
|
-
`.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
524
|
-
`.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
525
|
-
`-${this.placeHolderCharacter}${this.placeHolderCharacter}`;
|
|
526
|
-
const cnpj =
|
|
527
|
-
`${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
528
|
-
`.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
529
|
-
`.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
530
|
-
`/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +
|
|
531
|
-
`-${this.placeHolderCharacter}${this.placeHolderCharacter}`;
|
|
532
|
-
|
|
533
|
-
if (inputVal === MaskExpression.HASH) {
|
|
534
|
-
return cpf;
|
|
535
|
-
}
|
|
536
|
-
const arr: string[] = [];
|
|
537
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
538
|
-
for (let i = 0; i < inputVal.length; i++) {
|
|
539
|
-
const value = inputVal[i] ?? MaskExpression.EMPTY_STRING;
|
|
540
|
-
if (!value) {
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
if (value.match('\\d')) {
|
|
544
|
-
arr.push(value);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
if (arr.length <= 3) {
|
|
548
|
-
return cpf.slice(arr.length, cpf.length);
|
|
549
|
-
}
|
|
550
|
-
if (arr.length > 3 && arr.length <= 6) {
|
|
551
|
-
return cpf.slice(arr.length + 1, cpf.length);
|
|
552
|
-
}
|
|
553
|
-
if (arr.length > 6 && arr.length <= 9) {
|
|
554
|
-
return cpf.slice(arr.length + 2, cpf.length);
|
|
555
|
-
}
|
|
556
|
-
if (arr.length > 9 && arr.length < 11) {
|
|
557
|
-
return cpf.slice(arr.length + 3, cpf.length);
|
|
558
|
-
}
|
|
559
|
-
if (arr.length === 11) {
|
|
560
|
-
return '';
|
|
561
|
-
}
|
|
562
|
-
if (arr.length === 12) {
|
|
563
|
-
if (inputVal.length === 17) {
|
|
564
|
-
return cnpj.slice(16, cnpj.length);
|
|
565
|
-
}
|
|
566
|
-
return cnpj.slice(15, cnpj.length);
|
|
567
|
-
}
|
|
568
|
-
if (arr.length > 12 && arr.length <= 14) {
|
|
569
|
-
return cnpj.slice(arr.length + 4, cnpj.length);
|
|
570
|
-
}
|
|
571
|
-
return '';
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Recursively determine the current active element by navigating the Shadow DOM until the Active Element is found.
|
|
576
|
-
*/
|
|
577
|
-
private _getActiveElement(document: DocumentOrShadowRoot = this.document): Element | null {
|
|
578
|
-
const shadowRootEl = document?.activeElement?.shadowRoot;
|
|
579
|
-
if (!shadowRootEl?.activeElement) {
|
|
580
|
-
return document.activeElement;
|
|
581
|
-
} else {
|
|
582
|
-
return this._getActiveElement(shadowRootEl);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue
|
|
588
|
-
* is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual
|
|
589
|
-
* DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular
|
|
590
|
-
* model value too. Therefore, we don't trigger onChange in this scenario.
|
|
591
|
-
* @param inputValue the current form input value
|
|
592
|
-
*/
|
|
593
|
-
private formControlResult(inputValue: string): void {
|
|
594
|
-
const outputTransformFn = this.outputTransformFn
|
|
595
|
-
? this.outputTransformFn
|
|
596
|
-
: (v: unknown) => v;
|
|
597
|
-
this.writingValue = false;
|
|
598
|
-
this.maskChanged = false;
|
|
599
|
-
if (Array.isArray(this.dropSpecialCharacters)) {
|
|
600
|
-
this.onChange(
|
|
601
|
-
outputTransformFn(
|
|
602
|
-
this._toNumber(
|
|
603
|
-
this._checkSymbols(
|
|
604
|
-
this._removeMask(
|
|
605
|
-
this._removeSuffix(this._removePrefix(inputValue)),
|
|
606
|
-
this.dropSpecialCharacters
|
|
607
|
-
)
|
|
608
|
-
)
|
|
609
|
-
)
|
|
610
|
-
)
|
|
611
|
-
);
|
|
612
|
-
} else if (
|
|
613
|
-
this.dropSpecialCharacters ||
|
|
614
|
-
(!this.dropSpecialCharacters && this.prefix === inputValue)
|
|
615
|
-
) {
|
|
616
|
-
this.onChange(
|
|
617
|
-
outputTransformFn(
|
|
618
|
-
this._toNumber(
|
|
619
|
-
this._checkSymbols(this._removeSuffix(this._removePrefix(inputValue)))
|
|
620
|
-
)
|
|
621
|
-
)
|
|
622
|
-
);
|
|
623
|
-
} else {
|
|
624
|
-
this.onChange(outputTransformFn(this._toNumber(inputValue)));
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
private _toNumber(value: string | number | undefined | null) {
|
|
629
|
-
if (!this.isNumberValue || value === MaskExpression.EMPTY_STRING) {
|
|
630
|
-
return value;
|
|
631
|
-
}
|
|
632
|
-
if (
|
|
633
|
-
this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&
|
|
634
|
-
(this.leadZero || !this.dropSpecialCharacters)
|
|
635
|
-
) {
|
|
636
|
-
return value;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
if (String(value).length > 14 && this.maskExpression.startsWith(MaskExpression.SEPARATOR)) {
|
|
640
|
-
return String(value);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
const num = Number(value);
|
|
644
|
-
if (this.maskExpression.startsWith(MaskExpression.SEPARATOR) && Number.isNaN(num)) {
|
|
645
|
-
const val = String(value).replace(',', '.');
|
|
646
|
-
return Number(val);
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
return Number.isNaN(num) ? value : num;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
private _removeMask(value: string, specialCharactersForRemove: string[]): string {
|
|
653
|
-
if (
|
|
654
|
-
this.maskExpression.startsWith(MaskExpression.PERCENT) &&
|
|
655
|
-
value.includes(MaskExpression.DOT)
|
|
656
|
-
) {
|
|
657
|
-
return value;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
return value
|
|
661
|
-
? value.replace(
|
|
662
|
-
this._regExpForRemove(specialCharactersForRemove),
|
|
663
|
-
MaskExpression.EMPTY_STRING
|
|
664
|
-
)
|
|
665
|
-
: value;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
private _removePrefix(value: string): string {
|
|
669
|
-
if (!this.prefix) {
|
|
670
|
-
return value;
|
|
671
|
-
}
|
|
672
|
-
return value ? value.replace(this.prefix, MaskExpression.EMPTY_STRING) : value;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
private _removeSuffix(value: string): string {
|
|
676
|
-
if (!this.suffix) {
|
|
677
|
-
return value;
|
|
678
|
-
}
|
|
679
|
-
return value ? value.replace(this.suffix, MaskExpression.EMPTY_STRING) : value;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
private _retrieveSeparatorValue(result: string): string {
|
|
683
|
-
let specialCharacters = Array.isArray(this.dropSpecialCharacters)
|
|
684
|
-
? this.specialCharacters.filter((v) => {
|
|
685
|
-
return (this.dropSpecialCharacters as string[]).includes(v);
|
|
686
|
-
})
|
|
687
|
-
: this.specialCharacters;
|
|
688
|
-
if (
|
|
689
|
-
!this.deletedSpecialCharacter &&
|
|
690
|
-
this._checkPatternForSpace() &&
|
|
691
|
-
result.includes(MaskExpression.WHITE_SPACE) &&
|
|
692
|
-
this.maskExpression.includes(MaskExpression.SYMBOL_STAR)
|
|
693
|
-
) {
|
|
694
|
-
specialCharacters = specialCharacters.filter(
|
|
695
|
-
(char) => char !== MaskExpression.WHITE_SPACE
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
return this._removeMask(result, specialCharacters as string[]);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
private _regExpForRemove(specialCharactersForRemove: string[]): RegExp {
|
|
703
|
-
return new RegExp(
|
|
704
|
-
specialCharactersForRemove.map((item: string) => `\\${item}`).join('|'),
|
|
705
|
-
'gi'
|
|
706
|
-
);
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
private _replaceDecimalMarkerToDot(value: string): string {
|
|
710
|
-
const markers = Array.isArray(this.decimalMarker)
|
|
711
|
-
? this.decimalMarker
|
|
712
|
-
: [this.decimalMarker];
|
|
713
|
-
|
|
714
|
-
return value.replace(this._regExpForRemove(markers), MaskExpression.DOT);
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
public _checkSymbols(result: string): string | number | undefined | null {
|
|
718
|
-
let processedResult = result;
|
|
719
|
-
|
|
720
|
-
if (processedResult === MaskExpression.EMPTY_STRING) {
|
|
721
|
-
return processedResult;
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
if (
|
|
725
|
-
this.maskExpression.startsWith(MaskExpression.PERCENT) &&
|
|
726
|
-
this.decimalMarker === MaskExpression.COMMA
|
|
727
|
-
) {
|
|
728
|
-
processedResult = processedResult.replace(MaskExpression.COMMA, MaskExpression.DOT);
|
|
729
|
-
}
|
|
730
|
-
const separatorPrecision: number | null = this._retrieveSeparatorPrecision(
|
|
731
|
-
this.maskExpression
|
|
732
|
-
);
|
|
733
|
-
|
|
734
|
-
const separatorValue: string =
|
|
735
|
-
this.specialCharacters.length === 0
|
|
736
|
-
? this._retrieveSeparatorValue(processedResult)
|
|
737
|
-
: this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(processedResult));
|
|
738
|
-
|
|
739
|
-
if (!this.isNumberValue) {
|
|
740
|
-
return separatorValue;
|
|
741
|
-
}
|
|
742
|
-
if (separatorPrecision) {
|
|
743
|
-
if (processedResult === this.decimalMarker) {
|
|
744
|
-
return null;
|
|
745
|
-
}
|
|
746
|
-
if (separatorValue.length > 14) {
|
|
747
|
-
return String(separatorValue);
|
|
748
|
-
}
|
|
749
|
-
return this._checkPrecision(this.maskExpression, separatorValue);
|
|
750
|
-
} else {
|
|
751
|
-
return separatorValue;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
private _checkPatternForSpace(): boolean {
|
|
756
|
-
for (const key in this.patterns) {
|
|
757
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
758
|
-
if (this.patterns[key] && this.patterns[key]?.hasOwnProperty('pattern')) {
|
|
759
|
-
const patternString = this.patterns[key]?.pattern.toString();
|
|
760
|
-
const pattern = this.patterns[key]?.pattern;
|
|
761
|
-
if (
|
|
762
|
-
(patternString?.includes(MaskExpression.WHITE_SPACE) as boolean) &&
|
|
763
|
-
pattern?.test(this.maskExpression)
|
|
764
|
-
) {
|
|
765
|
-
return true;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
return false;
|
|
770
|
-
}
|
|
771
|
-
// TODO should think about helpers or separting decimal precision to own property
|
|
772
|
-
private _retrieveSeparatorPrecision(maskExpretion: string): number | null {
|
|
773
|
-
const matcher: RegExpMatchArray | null = maskExpretion.match(
|
|
774
|
-
new RegExp(`^separator\\.([^d]*)`)
|
|
775
|
-
);
|
|
776
|
-
return matcher ? Number(matcher[1]) : null;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
public _checkPrecision(separatorExpression: string, separatorValue: string): number | string {
|
|
780
|
-
const separatorPrecision = this.getPrecision(separatorExpression);
|
|
781
|
-
let value = separatorValue;
|
|
782
|
-
|
|
783
|
-
if (
|
|
784
|
-
separatorExpression.indexOf('2') > 0 ||
|
|
785
|
-
(this.leadZero && Number(separatorPrecision) > 0)
|
|
786
|
-
) {
|
|
787
|
-
if (this.decimalMarker === MaskExpression.COMMA && this.leadZero) {
|
|
788
|
-
value = value.replace(',', '.');
|
|
789
|
-
}
|
|
790
|
-
return this.leadZero
|
|
791
|
-
? Number(value).toFixed(Number(separatorPrecision))
|
|
792
|
-
: Number(value).toFixed(2);
|
|
793
|
-
}
|
|
794
|
-
return this.numberToString(value);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
public _repeatPatternSymbols(maskExp: string): string {
|
|
798
|
-
return (
|
|
799
|
-
(maskExp.match(/{[0-9]+}/) &&
|
|
800
|
-
maskExp
|
|
801
|
-
.split(MaskExpression.EMPTY_STRING)
|
|
802
|
-
.reduce((accum: string, currVal: string, index: number): string => {
|
|
803
|
-
this._start =
|
|
804
|
-
currVal === MaskExpression.CURLY_BRACKETS_LEFT ? index : this._start;
|
|
805
|
-
if (currVal !== MaskExpression.CURLY_BRACKETS_RIGHT) {
|
|
806
|
-
return this._findSpecialChar(currVal) ? accum + currVal : accum;
|
|
807
|
-
}
|
|
808
|
-
this._end = index;
|
|
809
|
-
const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));
|
|
810
|
-
const replaceWith: string = new Array(repeatNumber + 1).join(
|
|
811
|
-
maskExp[this._start - 1]
|
|
812
|
-
);
|
|
813
|
-
if (
|
|
814
|
-
maskExp.slice(0, this._start).length > 1 &&
|
|
815
|
-
maskExp.includes(MaskExpression.LETTER_S)
|
|
816
|
-
) {
|
|
817
|
-
const symbols = maskExp.slice(0, this._start - 1);
|
|
818
|
-
return symbols.includes(MaskExpression.CURLY_BRACKETS_LEFT)
|
|
819
|
-
? accum + replaceWith
|
|
820
|
-
: symbols + accum + replaceWith;
|
|
821
|
-
} else {
|
|
822
|
-
return accum + replaceWith;
|
|
823
|
-
}
|
|
824
|
-
}, '')) ||
|
|
825
|
-
maskExp
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
public currentLocaleDecimalMarker(): string {
|
|
830
|
-
return (1.1).toLocaleString().substring(1, 2);
|
|
831
|
-
}
|
|
832
|
-
}
|