@ng-matero/extensions 12.5.0 → 12.6.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.
Files changed (167) hide show
  1. package/_all-theme.scss +2 -0
  2. package/_index.scss +2 -0
  3. package/_theming.scss +2 -0
  4. package/bundles/extensions.umd.js +24 -58
  5. package/bundles/extensions.umd.js.map +1 -1
  6. package/bundles/mtxAlert.umd.js +3 -3
  7. package/bundles/mtxButton.umd.js +3 -3
  8. package/bundles/mtxCheckboxGroup.umd.js +4 -5
  9. package/bundles/mtxCheckboxGroup.umd.js.map +1 -1
  10. package/bundles/mtxColorpicker.umd.js +1106 -0
  11. package/bundles/mtxColorpicker.umd.js.map +1 -0
  12. package/bundles/mtxColumnResize.umd.js +3 -3
  13. package/bundles/mtxColumnResize.umd.js.map +1 -1
  14. package/bundles/mtxCore.umd.js +3 -3
  15. package/bundles/mtxDatetimepicker.umd.js +611 -156
  16. package/bundles/mtxDatetimepicker.umd.js.map +1 -1
  17. package/bundles/mtxDialog.umd.js +4 -6
  18. package/bundles/mtxDialog.umd.js.map +1 -1
  19. package/bundles/mtxFormGroup.umd.js +5 -12
  20. package/bundles/mtxFormGroup.umd.js.map +1 -1
  21. package/bundles/mtxGrid.umd.js +5 -7
  22. package/bundles/mtxGrid.umd.js.map +1 -1
  23. package/bundles/mtxLoader.umd.js +3 -3
  24. package/bundles/mtxPipes.umd.js +3 -3
  25. package/bundles/mtxPopover.umd.js +3 -3
  26. package/bundles/mtxPopover.umd.js.map +1 -1
  27. package/bundles/mtxProgress.umd.js +4 -4
  28. package/bundles/mtxSelect.umd.js +4 -4
  29. package/bundles/mtxSelect.umd.js.map +1 -1
  30. package/bundles/mtxSlider.umd.js +4 -4
  31. package/bundles/mtxSlider.umd.js.map +1 -1
  32. package/bundles/mtxSplit.umd.js +5 -16
  33. package/bundles/mtxSplit.umd.js.map +1 -1
  34. package/bundles/mtxText3d.umd.js +4 -12
  35. package/bundles/mtxText3d.umd.js.map +1 -1
  36. package/bundles/mtxTooltip.umd.js +10 -5
  37. package/bundles/mtxTooltip.umd.js.map +1 -1
  38. package/checkbox-group/checkbox-group.component.d.ts +2 -4
  39. package/checkbox-group/mtxCheckboxGroup.metadata.json +1 -1
  40. package/colorpicker/_colorpicker-theme.import.scss +2 -0
  41. package/colorpicker/_colorpicker-theme.scss +43 -0
  42. package/colorpicker/colorpicker-animations.d.ts +8 -0
  43. package/colorpicker/colorpicker-content.scss +4 -0
  44. package/colorpicker/colorpicker-input.d.ts +86 -0
  45. package/colorpicker/colorpicker-module.d.ts +2 -0
  46. package/colorpicker/colorpicker-toggle.d.ts +34 -0
  47. package/colorpicker/colorpicker-toggle.scss +23 -0
  48. package/colorpicker/colorpicker.d.ts +122 -0
  49. package/{color-picker/mtxColorPicker.d.ts → colorpicker/mtxColorpicker.d.ts} +0 -0
  50. package/colorpicker/mtxColorpicker.metadata.json +1 -0
  51. package/colorpicker/package.json +11 -0
  52. package/colorpicker/public-api.d.ts +5 -0
  53. package/datetimepicker/_datetimepicker-theme.scss +12 -0
  54. package/datetimepicker/calendar.d.ts +2 -10
  55. package/datetimepicker/clock.d.ts +10 -9
  56. package/datetimepicker/datetimepicker-animations.d.ts +7 -5
  57. package/datetimepicker/datetimepicker-input.d.ts +4 -2
  58. package/datetimepicker/{datetimepicker.module.d.ts → datetimepicker-module.d.ts} +0 -0
  59. package/datetimepicker/datetimepicker-toggle.d.ts +15 -2
  60. package/datetimepicker/datetimepicker-toggle.scss +23 -0
  61. package/datetimepicker/datetimepicker.d.ts +67 -24
  62. package/datetimepicker/month-view.d.ts +3 -3
  63. package/datetimepicker/mtxDatetimepicker.d.ts +0 -2
  64. package/datetimepicker/mtxDatetimepicker.metadata.json +1 -1
  65. package/datetimepicker/multi-year-view.d.ts +3 -3
  66. package/datetimepicker/public-api.d.ts +3 -1
  67. package/datetimepicker/year-view.d.ts +3 -3
  68. package/dialog/{dialog.config.d.ts → dialog-config.d.ts} +0 -0
  69. package/dialog/dialog.component.d.ts +1 -1
  70. package/dialog/dialog.d.ts +1 -1
  71. package/dialog/mtxDialog.metadata.json +1 -1
  72. package/dialog/public-api.d.ts +2 -2
  73. package/esm2015/checkbox-group/checkbox-group.component.js +2 -3
  74. package/esm2015/colorpicker/colorpicker-animations.js +16 -0
  75. package/esm2015/colorpicker/colorpicker-input.js +225 -0
  76. package/esm2015/colorpicker/colorpicker-module.js +41 -0
  77. package/esm2015/colorpicker/colorpicker-toggle.js +98 -0
  78. package/esm2015/colorpicker/colorpicker.js +361 -0
  79. package/esm2015/colorpicker/mtxColorpicker.js +5 -0
  80. package/esm2015/colorpicker/public-api.js +6 -0
  81. package/esm2015/column-resize/event-dispatcher.js +1 -1
  82. package/esm2015/datetimepicker/calendar-body.js +2 -1
  83. package/esm2015/datetimepicker/calendar.js +17 -32
  84. package/esm2015/datetimepicker/clock.js +10 -10
  85. package/esm2015/datetimepicker/datetimepicker-animations.js +38 -24
  86. package/esm2015/datetimepicker/datetimepicker-input.js +7 -4
  87. package/esm2015/datetimepicker/datetimepicker-module.js +52 -0
  88. package/esm2015/datetimepicker/datetimepicker-toggle.js +30 -8
  89. package/esm2015/datetimepicker/datetimepicker.js +150 -71
  90. package/esm2015/datetimepicker/month-view.js +8 -7
  91. package/esm2015/datetimepicker/mtxDatetimepicker.js +1 -3
  92. package/esm2015/datetimepicker/multi-year-view.js +8 -7
  93. package/esm2015/datetimepicker/public-api.js +4 -2
  94. package/esm2015/datetimepicker/year-view.js +8 -7
  95. package/esm2015/dialog/{dialog.config.js → dialog-config.js} +1 -1
  96. package/esm2015/dialog/dialog.component.js +2 -2
  97. package/esm2015/dialog/dialog.js +1 -1
  98. package/esm2015/dialog/public-api.js +3 -3
  99. package/esm2015/extensions.module.js +3 -3
  100. package/esm2015/form-group/form-group.component.js +4 -11
  101. package/esm2015/popover/popover.js +1 -1
  102. package/esm2015/progress/progress.component.js +1 -1
  103. package/esm2015/public-api.js +2 -2
  104. package/esm2015/select/select.component.js +2 -2
  105. package/esm2015/slider/slider.js +2 -2
  106. package/esm2015/split/interface.js +1 -1
  107. package/esm2015/split/split.component.js +3 -9
  108. package/esm2015/split/utils.js +1 -6
  109. package/esm2015/text3d/text3d.component.js +2 -10
  110. package/esm2015/tooltip/tooltip.js +8 -3
  111. package/extensions.metadata.json +1 -1
  112. package/fesm2015/extensions.js +3 -3
  113. package/fesm2015/extensions.js.map +1 -1
  114. package/fesm2015/mtxCheckboxGroup.js +1 -2
  115. package/fesm2015/mtxCheckboxGroup.js.map +1 -1
  116. package/fesm2015/mtxColorpicker.js +730 -0
  117. package/fesm2015/mtxColorpicker.js.map +1 -0
  118. package/fesm2015/mtxColumnResize.js.map +1 -1
  119. package/fesm2015/mtxDatetimepicker.js +266 -153
  120. package/fesm2015/mtxDatetimepicker.js.map +1 -1
  121. package/fesm2015/mtxDialog.js +2 -2
  122. package/fesm2015/mtxDialog.js.map +1 -1
  123. package/fesm2015/mtxFormGroup.js +3 -10
  124. package/fesm2015/mtxFormGroup.js.map +1 -1
  125. package/fesm2015/mtxPopover.js.map +1 -1
  126. package/fesm2015/mtxProgress.js +1 -1
  127. package/fesm2015/mtxSelect.js +1 -1
  128. package/fesm2015/mtxSelect.js.map +1 -1
  129. package/fesm2015/mtxSlider.js +1 -1
  130. package/fesm2015/mtxSlider.js.map +1 -1
  131. package/fesm2015/mtxSplit.js +2 -13
  132. package/fesm2015/mtxSplit.js.map +1 -1
  133. package/fesm2015/mtxText3d.js +1 -9
  134. package/fesm2015/mtxText3d.js.map +1 -1
  135. package/fesm2015/mtxTooltip.js +7 -2
  136. package/fesm2015/mtxTooltip.js.map +1 -1
  137. package/form-group/form-group.component.d.ts +2 -4
  138. package/form-group/mtxFormGroup.metadata.json +1 -1
  139. package/package.json +2 -2
  140. package/popover/popover.d.ts +3 -3
  141. package/progress/mtxProgress.metadata.json +1 -1
  142. package/public-api.d.ts +1 -1
  143. package/select/mtxSelect.metadata.json +1 -1
  144. package/select/select.component.d.ts +1 -1
  145. package/slider/_slider-theme.scss +1 -1
  146. package/slider/mtxSlider.metadata.json +1 -1
  147. package/slider/slider.d.ts +1 -1
  148. package/slider/slider.scss +1 -0
  149. package/split/interface.d.ts +1 -2
  150. package/split/mtxSplit.metadata.json +1 -1
  151. package/text3d/mtxText3d.metadata.json +1 -1
  152. package/text3d/text3d.component.d.ts +0 -1
  153. package/tooltip/mtxTooltip.metadata.json +1 -1
  154. package/bundles/mtxColorPicker.umd.js +0 -337
  155. package/bundles/mtxColorPicker.umd.js.map +0 -1
  156. package/color-picker/color-picker.component.d.ts +0 -120
  157. package/color-picker/color-picker.module.d.ts +0 -2
  158. package/color-picker/mtxColorPicker.metadata.json +0 -1
  159. package/color-picker/package.json +0 -11
  160. package/color-picker/public-api.d.ts +0 -2
  161. package/esm2015/color-picker/color-picker.component.js +0 -268
  162. package/esm2015/color-picker/color-picker.module.js +0 -26
  163. package/esm2015/color-picker/mtxColorPicker.js +0 -5
  164. package/esm2015/color-picker/public-api.js +0 -3
  165. package/esm2015/datetimepicker/datetimepicker.module.js +0 -49
  166. package/fesm2015/mtxColorPicker.js +0 -295
  167. package/fesm2015/mtxColorPicker.js.map +0 -1
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MtxTooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"A11yModule","line":13,"character":12},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":24},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":13,"character":38},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":13,"character":53}],"exports":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":14,"character":42},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"CdkScrollableModule","line":14,"character":59}],"declarations":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"TooltipComponent"}],"providers":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER"}]}]}],"members":{}},"TooltipPosition":{"__symbolic":"interface"},"TooltipTouchGestures":{"__symbolic":"interface"},"TooltipVisibility":{"__symbolic":"interface"},"SCROLL_THROTTLE_MS":20,"TOOLTIP_PANEL_CLASS":"mtx-tooltip-panel","getMtxTooltipInvalidPositionError":{"__symbolic":"function","parameters":["position"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Error"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"Tooltip position \"","right":{"__symbolic":"reference","name":"position"}},"right":"\" is invalid."}]}},"MTX_TOOLTIP_SCROLL_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":77,"character":47},"arguments":["mtx-tooltip-scroll-strategy"]},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":{"__symbolic":"function","parameters":["overlay"],"value":{"__symbolic":"error","message":"Lambda not supported","line":83,"character":9,"module":"./tooltip"}},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":{"provide":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"},"deps":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":89,"character":9}],"useFactory":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY"}},"MtxTooltipDefaultOptions":{"__symbolic":"interface"},"MTX_TOOLTIP_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":103,"character":47},"arguments":["mtx-tooltip-default-options",{"providedIn":"root","factory":{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY"}}]},"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":{"__symbolic":"function","parameters":[],"value":{"showDelay":0,"hideDelay":0,"touchendHideDelay":1500}},"MtxTooltip":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":126,"character":1},"arguments":[{"selector":"[mtxTooltip]","exportAs":"mtxTooltip","host":{"class":"mtx-tooltip-trigger"}}]}],"members":{"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["mtxTooltipPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":167,"character":3},"arguments":["mtxTooltipDisabled"]}]}],"showDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":183,"character":3},"arguments":["mtxTooltipShowDelay"]}]}],"hideDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":186,"character":3},"arguments":["mtxTooltipHideDelay"]}]}],"touchGestures":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3},"arguments":["mtxTooltipTouchGestures"]}]}],"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":205,"character":3},"arguments":["mtxTooltip"]}]}],"tooltipClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":235,"character":3},"arguments":["mtxTooltipClass"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":267,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":268,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":269,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":270,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":259,"character":22},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":260,"character":36,"context":{"typeName":"HTMLElement"},"module":"./tooltip"}]},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollDispatcher","line":261,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":262,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":263,"character":21},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":264,"character":23},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"AriaDescriber","line":265,"character":28},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":266,"character":27},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":268,"character":30},{"__symbolic":"reference","name":"any"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"_isTooltipVisible":[{"__symbolic":"method"}],"_createOverlay":[{"__symbolic":"method"}],"_detach":[{"__symbolic":"method"}],"_updatePosition":[{"__symbolic":"method"}],"_getOrigin":[{"__symbolic":"method"}],"_getOverlayPosition":[{"__symbolic":"method"}],"_updateTooltipMessage":[{"__symbolic":"method"}],"_setTooltipClass":[{"__symbolic":"method"}],"_invertPosition":[{"__symbolic":"method"}],"_setupPointerEnterEventsIfNeeded":[{"__symbolic":"method"}],"_setupPointerExitEventsIfNeeded":[{"__symbolic":"method"}],"_addListeners":[{"__symbolic":"method"}],"_platformSupportsMouseEvents":[{"__symbolic":"method"}],"_disableNativeGesturesIfNecessary":[{"__symbolic":"method"}]}},"TooltipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":682,"character":1},"arguments":[{"selector":"mtx-tooltip-component","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":686,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":687,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"mtxTooltipAnimations"},"member":"tooltipState"}],"host":{"[style.zoom]":"_visibility === \"visible\" ? 1 : null","(body:click)":"this._handleBodyInteraction()","aria-hidden":"true","$quoted$":["[style.zoom]","(body:click)","aria-hidden"]},"template":"<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n","styles":[".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"]}]}],"members":{"_isTemplateRef":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":727,"character":32},{"__symbolic":"reference","module":"@angular/cdk/layout","name":"BreakpointObserver","line":728,"character":33}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"afterHidden":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_animationStart":[{"__symbolic":"method"}],"_animationDone":[{"__symbolic":"method"}],"_handleBodyInteraction":[{"__symbolic":"method"}],"_markForCheck":[{"__symbolic":"method"}]}},"mtxTooltipAnimations":{"tooltipState":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":18,"character":16},"arguments":["state",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":19,"character":4},"arguments":["initial, void, hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":19,"character":35},"arguments":[{"opacity":0,"transform":"scale(0)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":4},"arguments":["visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":21},"arguments":[{"transform":"scale(1)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":21,"character":4},"arguments":["* => visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":23,"character":6},"arguments":["200ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"keyframes","line":25,"character":8},"arguments":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":26,"character":10},"arguments":[{"opacity":0,"transform":"scale(0)","offset":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":27,"character":10},"arguments":[{"opacity":0.5,"transform":"scale(0.99)","offset":0.5}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":28,"character":10},"arguments":[{"opacity":1,"transform":"scale(1)","offset":1}]}]]}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":32,"character":4},"arguments":["* => hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":32,"character":30},"arguments":["100ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":32,"character":74},"arguments":[{"opacity":0}]}]}]}]]}}},"origins":{"MtxTooltipModule":"./tooltip-module","TooltipPosition":"./tooltip","TooltipTouchGestures":"./tooltip","TooltipVisibility":"./tooltip","SCROLL_THROTTLE_MS":"./tooltip","TOOLTIP_PANEL_CLASS":"./tooltip","getMtxTooltipInvalidPositionError":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":"./tooltip","MtxTooltipDefaultOptions":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":"./tooltip","MtxTooltip":"./tooltip","TooltipComponent":"./tooltip","mtxTooltipAnimations":"./tooltip-animations"},"importAs":"@ng-matero/extensions/tooltip"}
1
+ {"__symbolic":"module","version":4,"metadata":{"MtxTooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"A11yModule","line":13,"character":12},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":24},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":13,"character":38},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":13,"character":53}],"exports":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":14,"character":42},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"CdkScrollableModule","line":14,"character":59}],"declarations":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"TooltipComponent"}],"providers":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER"}]}]}],"members":{}},"TooltipPosition":{"__symbolic":"interface"},"TooltipTouchGestures":{"__symbolic":"interface"},"TooltipVisibility":{"__symbolic":"interface"},"SCROLL_THROTTLE_MS":20,"TOOLTIP_PANEL_CLASS":"mtx-tooltip-panel","getMtxTooltipInvalidPositionError":{"__symbolic":"function","parameters":["position"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Error"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"Tooltip position \"","right":{"__symbolic":"reference","name":"position"}},"right":"\" is invalid."}]}},"MTX_TOOLTIP_SCROLL_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":77,"character":47},"arguments":["mtx-tooltip-scroll-strategy"]},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":{"__symbolic":"function","parameters":["overlay"],"value":{"__symbolic":"error","message":"Lambda not supported","line":83,"character":9,"module":"./tooltip"}},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":{"provide":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"},"deps":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":89,"character":9}],"useFactory":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY"}},"MtxTooltipDefaultOptions":{"__symbolic":"interface"},"MTX_TOOLTIP_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":103,"character":47},"arguments":["mtx-tooltip-default-options",{"providedIn":"root","factory":{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY"}}]},"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":{"__symbolic":"function","parameters":[],"value":{"showDelay":0,"hideDelay":0,"touchendHideDelay":1500}},"MtxTooltip":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":126,"character":1},"arguments":[{"selector":"[mtxTooltip]","exportAs":"mtxTooltip","host":{"class":"mtx-tooltip-trigger"}}]}],"members":{"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["mtxTooltipPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":167,"character":3},"arguments":["mtxTooltipDisabled"]}]}],"showDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":183,"character":3},"arguments":["mtxTooltipShowDelay"]}]}],"hideDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":186,"character":3},"arguments":["mtxTooltipHideDelay"]}]}],"touchGestures":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3},"arguments":["mtxTooltipTouchGestures"]}]}],"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":205,"character":3},"arguments":["mtxTooltip"]}]}],"tooltipClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":235,"character":3},"arguments":["mtxTooltipClass"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":265,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":266,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":267,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":268,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":257,"character":22},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":258,"character":36,"context":{"typeName":"HTMLElement"},"module":"./tooltip"}]},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollDispatcher","line":259,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":260,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":261,"character":21},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":262,"character":23},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"AriaDescriber","line":263,"character":28},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":264,"character":27},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":266,"character":30},{"__symbolic":"reference","name":"any"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"_isTooltipVisible":[{"__symbolic":"method"}],"_createOverlay":[{"__symbolic":"method"}],"_detach":[{"__symbolic":"method"}],"_updatePosition":[{"__symbolic":"method"}],"_getOrigin":[{"__symbolic":"method"}],"_getOverlayPosition":[{"__symbolic":"method"}],"_updateTooltipMessage":[{"__symbolic":"method"}],"_setTooltipClass":[{"__symbolic":"method"}],"_invertPosition":[{"__symbolic":"method"}],"_setupPointerEnterEventsIfNeeded":[{"__symbolic":"method"}],"_setupPointerExitEventsIfNeeded":[{"__symbolic":"method"}],"_addListeners":[{"__symbolic":"method"}],"_platformSupportsMouseEvents":[{"__symbolic":"method"}],"_disableNativeGesturesIfNecessary":[{"__symbolic":"method"}]}},"TooltipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":685,"character":1},"arguments":[{"selector":"mtx-tooltip-component","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":689,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":690,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"mtxTooltipAnimations"},"member":"tooltipState"}],"host":{"[style.zoom]":"_visibility === \"visible\" ? 1 : null","(body:click)":"this._handleBodyInteraction()","aria-hidden":"true","$quoted$":["[style.zoom]","(body:click)","aria-hidden"]},"template":"<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n","styles":[".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"]}]}],"members":{"_isTemplateRef":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":730,"character":32},{"__symbolic":"reference","module":"@angular/cdk/layout","name":"BreakpointObserver","line":731,"character":33}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"afterHidden":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_animationStart":[{"__symbolic":"method"}],"_animationDone":[{"__symbolic":"method"}],"_handleBodyInteraction":[{"__symbolic":"method"}],"_markForCheck":[{"__symbolic":"method"}]}},"mtxTooltipAnimations":{"tooltipState":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":18,"character":16},"arguments":["state",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":19,"character":4},"arguments":["initial, void, hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":19,"character":35},"arguments":[{"opacity":0,"transform":"scale(0)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":4},"arguments":["visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":21},"arguments":[{"transform":"scale(1)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":21,"character":4},"arguments":["* => visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":23,"character":6},"arguments":["200ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"keyframes","line":25,"character":8},"arguments":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":26,"character":10},"arguments":[{"opacity":0,"transform":"scale(0)","offset":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":27,"character":10},"arguments":[{"opacity":0.5,"transform":"scale(0.99)","offset":0.5}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":28,"character":10},"arguments":[{"opacity":1,"transform":"scale(1)","offset":1}]}]]}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":32,"character":4},"arguments":["* => hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":32,"character":30},"arguments":["100ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":32,"character":74},"arguments":[{"opacity":0}]}]}]}]]}}},"origins":{"MtxTooltipModule":"./tooltip-module","TooltipPosition":"./tooltip","TooltipTouchGestures":"./tooltip","TooltipVisibility":"./tooltip","SCROLL_THROTTLE_MS":"./tooltip","TOOLTIP_PANEL_CLASS":"./tooltip","getMtxTooltipInvalidPositionError":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":"./tooltip","MtxTooltipDefaultOptions":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":"./tooltip","MtxTooltip":"./tooltip","TooltipComponent":"./tooltip","mtxTooltipAnimations":"./tooltip-animations"},"importAs":"@ng-matero/extensions/tooltip"}
@@ -1,337 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/menu'), require('@angular/material/form-field'), require('@angular/material/input'), require('ngx-color/chrome'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/cdk/platform'), require('rxjs'), require('rxjs/operators')) :
3
- typeof define === 'function' && define.amd ? define('@ng-matero/extensions/color-picker', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/menu', '@angular/material/form-field', '@angular/material/input', 'ngx-color/chrome', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/cdk/platform', 'rxjs', 'rxjs/operators'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['ng-matero'] = global['ng-matero'] || {}, global['ng-matero'].extensions = global['ng-matero'].extensions || {}, global['ng-matero'].extensions['color-picker'] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.menu, global.ng.material.formField, global.ng.material.input, global['ngx-color-chrome'], global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.platform, global.rxjs, global.rxjs.operators));
5
- }(this, (function (exports, core, common, forms, menu, formField, input, chrome, a11y, coercion, platform, rxjs, operators) { 'use strict';
6
-
7
- var nextUniqueId = 0;
8
- var MtxColorPickerComponent = /** @class */ (function () {
9
- function MtxColorPickerComponent(_focusMonitor, _elementRef, _changeDetectorRef, _zone, ngControl, _formField, _document) {
10
- var _this = this;
11
- this._focusMonitor = _focusMonitor;
12
- this._elementRef = _elementRef;
13
- this._changeDetectorRef = _changeDetectorRef;
14
- this._zone = _zone;
15
- this.ngControl = ngControl;
16
- this._formField = _formField;
17
- this._document = _document;
18
- this._value = '';
19
- /** Implemented as part of MatFormFieldControl. */
20
- this.stateChanges = new rxjs.Subject();
21
- /** Unique id for this input. */
22
- this._uid = "mtx-color-picker-" + nextUniqueId++;
23
- this._focused = false;
24
- this._required = false;
25
- this._disabled = false;
26
- this._readonly = false;
27
- this.errorState = false;
28
- /** A name for this control that can be used by `mat-form-field`. */
29
- this.controlType = 'mtx-color-picker';
30
- /** `View -> model callback called when value changes` */
31
- this._onChange = function () { };
32
- /** `View -> model callback called when color picker has been touched` */
33
- this._onTouched = function () { };
34
- /** Event emitted when the color changed */
35
- this.colorChange = new core.EventEmitter();
36
- /** Whether or not the overlay panel is open. */
37
- this._panelOpen = false;
38
- /**
39
- * Whether the color picker can open the next time it is focused. Used to prevent a focused,
40
- * closed color picker from being reopened if the user switches to another browser tab and then
41
- * comes back.
42
- */
43
- this._canOpenOnNextFocus = true;
44
- /**
45
- * Event handler for when the window is blurred. Needs to be an
46
- * arrow function in order to preserve the context.
47
- */
48
- this._windowBlurHandler = function () {
49
- // If the user blurred the window while the color picker is focused, it means that it'll be
50
- // refocused when they come back. In this case we want to skip the first focus event, if the
51
- // pane was closed, in order to avoid reopening it unintentionally.
52
- _this._canOpenOnNextFocus =
53
- _this._document.activeElement !== _this._elementRef.nativeElement || _this._panelOpen;
54
- };
55
- _focusMonitor.monitor(_elementRef, true).subscribe(function (origin) {
56
- if (_this._focused && !origin) {
57
- _this._onTouched();
58
- }
59
- _this._focused = !!origin;
60
- _this.stateChanges.next();
61
- });
62
- if (this.ngControl != null) {
63
- this.ngControl.valueAccessor = this;
64
- }
65
- }
66
- Object.defineProperty(MtxColorPickerComponent.prototype, "value", {
67
- /** Value of the color picker control. */
68
- get: function () {
69
- return this._value;
70
- },
71
- set: function (newValue) {
72
- this._value = newValue;
73
- this._onChange(newValue);
74
- this.stateChanges.next();
75
- },
76
- enumerable: false,
77
- configurable: true
78
- });
79
- Object.defineProperty(MtxColorPickerComponent.prototype, "id", {
80
- /** Unique id of the element. */
81
- get: function () {
82
- return this._id;
83
- },
84
- set: function (value) {
85
- this._id = value || this._uid;
86
- this.stateChanges.next();
87
- },
88
- enumerable: false,
89
- configurable: true
90
- });
91
- Object.defineProperty(MtxColorPickerComponent.prototype, "placeholder", {
92
- /** Placeholder to be shown if value is empty. */
93
- get: function () {
94
- return this._placeholder;
95
- },
96
- set: function (value) {
97
- this._placeholder = value;
98
- this.stateChanges.next();
99
- },
100
- enumerable: false,
101
- configurable: true
102
- });
103
- Object.defineProperty(MtxColorPickerComponent.prototype, "focused", {
104
- /** Whether the input is focused. */
105
- get: function () {
106
- return this._focused || this._panelOpen;
107
- },
108
- enumerable: false,
109
- configurable: true
110
- });
111
- Object.defineProperty(MtxColorPickerComponent.prototype, "empty", {
112
- get: function () {
113
- return !this.value;
114
- },
115
- enumerable: false,
116
- configurable: true
117
- });
118
- Object.defineProperty(MtxColorPickerComponent.prototype, "shouldLabelFloat", {
119
- get: function () {
120
- return this.focused || !this.empty;
121
- },
122
- enumerable: false,
123
- configurable: true
124
- });
125
- Object.defineProperty(MtxColorPickerComponent.prototype, "required", {
126
- get: function () {
127
- return this._required;
128
- },
129
- set: function (value) {
130
- this._required = coercion.coerceBooleanProperty(value);
131
- this.stateChanges.next();
132
- },
133
- enumerable: false,
134
- configurable: true
135
- });
136
- Object.defineProperty(MtxColorPickerComponent.prototype, "disabled", {
137
- get: function () {
138
- return this._disabled;
139
- },
140
- set: function (value) {
141
- this._disabled = coercion.coerceBooleanProperty(value);
142
- this.stateChanges.next();
143
- },
144
- enumerable: false,
145
- configurable: true
146
- });
147
- Object.defineProperty(MtxColorPickerComponent.prototype, "readonly", {
148
- /** Whether the element is readonly. */
149
- get: function () {
150
- return this._readonly;
151
- },
152
- set: function (value) {
153
- this._readonly = coercion.coerceBooleanProperty(value);
154
- },
155
- enumerable: false,
156
- configurable: true
157
- });
158
- MtxColorPickerComponent.prototype.ngDoCheck = function () {
159
- if (this.ngControl) {
160
- this.errorState = (this.ngControl.invalid && this.ngControl.touched);
161
- this.stateChanges.next();
162
- }
163
- };
164
- MtxColorPickerComponent.prototype.ngAfterViewInit = function () {
165
- var _this = this;
166
- if (typeof window !== 'undefined') {
167
- this._zone.runOutsideAngular(function () {
168
- window.addEventListener('blur', _this._windowBlurHandler);
169
- });
170
- if (platform._supportsShadowDom()) {
171
- var element = this._elementRef.nativeElement;
172
- var rootNode = element.getRootNode ? element.getRootNode() : null;
173
- // We need to take the `ShadowRoot` off of `window`, because the built-in types are
174
- // incorrect. See https://github.com/Microsoft/TypeScript/issues/27929.
175
- this._isInsideShadowRoot = rootNode instanceof window.ShadowRoot;
176
- }
177
- }
178
- };
179
- MtxColorPickerComponent.prototype.ngOnDestroy = function () {
180
- this.stateChanges.complete();
181
- this._focusMonitor.stopMonitoring(this._elementRef);
182
- };
183
- /** Implemented as part of MatFormFieldControl. */
184
- MtxColorPickerComponent.prototype.setDescribedByIds = function (ids) {
185
- this._ariaDescribedby = ids.join(' ');
186
- };
187
- /** Implemented as part of MatFormFieldControl. */
188
- MtxColorPickerComponent.prototype.onContainerClick = function () {
189
- this._handleFocus();
190
- };
191
- /**
192
- * Sets the model value. Implemented as part of ControlValueAccessor.
193
- * @param value New value to be written to the model.
194
- */
195
- MtxColorPickerComponent.prototype.writeValue = function (value) {
196
- this.value = value || '';
197
- this._changeDetectorRef.markForCheck();
198
- };
199
- /**
200
- * Registers a callback to be triggered when the model value changes.
201
- * Implemented as part of ControlValueAccessor.
202
- * @param fn Callback to be registered.
203
- */
204
- MtxColorPickerComponent.prototype.registerOnChange = function (fn) {
205
- this._onChange = fn;
206
- };
207
- /**
208
- * Registers a callback to be triggered when the control is touched.
209
- * Implemented as part of ControlValueAccessor.
210
- * @param fn Callback to be registered.
211
- */
212
- MtxColorPickerComponent.prototype.registerOnTouched = function (fn) {
213
- this._onTouched = fn;
214
- };
215
- /**
216
- * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
217
- * @param isDisabled Whether the control should be disabled.
218
- */
219
- MtxColorPickerComponent.prototype.setDisabledState = function (isDisabled) {
220
- this.disabled = isDisabled;
221
- };
222
- /** Open panel with input focus event. */
223
- MtxColorPickerComponent.prototype._handleFocus = function () {
224
- var _this = this;
225
- this.trigger.openMenu();
226
- this._closingActionsSubscription = rxjs.merge(this._getOutsideClickStream())
227
- .pipe()
228
- .subscribe(function (event) {
229
- _this.trigger.closeMenu();
230
- _this._closingActionsSubscription.unsubscribe();
231
- });
232
- };
233
- /** Opens the overlay panel. */
234
- MtxColorPickerComponent.prototype._openPanel = function () {
235
- if (this._focused) {
236
- this._panelOpen = true;
237
- }
238
- };
239
- /** Closes the overlay panel and focuses the host element. */
240
- MtxColorPickerComponent.prototype._closePanel = function () {
241
- if (this._panelOpen) {
242
- this._panelOpen = false;
243
- this._changeDetectorRef.markForCheck();
244
- this._onTouched();
245
- }
246
- };
247
- /** The callback of color changed. */
248
- MtxColorPickerComponent.prototype._onColorChanged = function (model) {
249
- this.value = model.color.hex;
250
- this.colorChange.emit(model);
251
- };
252
- /** Stream of clicks outside of the color picker panel. */
253
- MtxColorPickerComponent.prototype._getOutsideClickStream = function () {
254
- var _this = this;
255
- return rxjs.merge(rxjs.fromEvent(this._document, 'click'), rxjs.fromEvent(this._document, 'touchend')).pipe(operators.filter(function (event) {
256
- // If we're in the Shadow DOM, the event target will be the shadow root, so we have to
257
- // fall back to check the first element in the path of the click event.
258
- var clickTarget = (_this._isInsideShadowRoot && event.composedPath ? event.composedPath()[0] : event.target);
259
- var formField = _this._formField ? _this._formField._elementRef.nativeElement : null;
260
- return (clickTarget !== _this._elementRef.nativeElement &&
261
- (!formField || !formField.contains(clickTarget)));
262
- }));
263
- };
264
- return MtxColorPickerComponent;
265
- }());
266
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
267
- MtxColorPickerComponent.decorators = [
268
- { type: core.Component, args: [{
269
- selector: 'mtx-color-picker',
270
- exportAs: 'mtxColorPicker',
271
- template: "<input matInput\n [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus()\"\n autocomplete=\"off\">\n\n<div #colorPickerTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"colorPickerPopover\"\n (menuOpened)=\"_openPanel()\"\n (menuClosed)=\"_closePanel()\">\n</div>\n\n<mat-menu #colorPickerPopover=\"matMenu\" class=\"mtx-color-picker-panel\" [hasBackdrop]=\"false\">\n <div class=\"mtx-color-picker\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n <color-chrome [color]=\"value!\" (onChangeComplete)=\"_onColorChanged($event)\"></color-chrome>\n </div>\n</mat-menu>\n",
272
- encapsulation: core.ViewEncapsulation.None,
273
- changeDetection: core.ChangeDetectionStrategy.OnPush,
274
- providers: [{ provide: formField.MatFormFieldControl, useExisting: MtxColorPickerComponent }],
275
- styles: [".mtx-color-picker-panel .mat-menu-content:not(:empty){padding:0}.mtx-color-picker-panel .mtx-color-picker{padding:8px}.mtx-color-picker-panel .mtx-color-picker .chrome-picker{box-shadow:none;border-radius:0}.mtx-color-picker-panel .mtx-color-picker .chrome-picker .saturation{border-radius:0}\n"]
276
- },] }
277
- ];
278
- /**
279
- * @type {function(): !Array<(null|{
280
- * type: ?,
281
- * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
282
- * })>}
283
- * @nocollapse
284
- */
285
- MtxColorPickerComponent.ctorParameters = function () { return [
286
- { type: a11y.FocusMonitor },
287
- { type: core.ElementRef },
288
- { type: core.ChangeDetectorRef },
289
- { type: core.NgZone },
290
- { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
291
- { type: formField.MatFormField, decorators: [{ type: core.Optional }, { type: core.Host }] },
292
- { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [common.DOCUMENT,] }] }
293
- ]; };
294
- /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
295
- MtxColorPickerComponent.propDecorators = {
296
- value: [{ type: core.Input }],
297
- id: [{ type: core.Input }],
298
- placeholder: [{ type: core.Input }],
299
- required: [{ type: core.Input }],
300
- disabled: [{ type: core.Input }],
301
- readonly: [{ type: core.Input }],
302
- colorChange: [{ type: core.Output }],
303
- trigger: [{ type: core.ViewChild, args: [menu.MatMenuTrigger, { static: true },] }]
304
- };
305
-
306
- var MtxColorPickerModule = /** @class */ (function () {
307
- function MtxColorPickerModule() {
308
- }
309
- return MtxColorPickerModule;
310
- }());
311
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
312
- MtxColorPickerModule.decorators = [
313
- { type: core.NgModule, args: [{
314
- imports: [
315
- common.CommonModule,
316
- forms.FormsModule,
317
- menu.MatMenuModule,
318
- formField.MatFormFieldModule,
319
- input.MatInputModule,
320
- chrome.ColorChromeModule,
321
- ],
322
- exports: [MtxColorPickerComponent],
323
- declarations: [MtxColorPickerComponent],
324
- },] }
325
- ];
326
-
327
- /**
328
- * Generated bundle index. Do not edit.
329
- */
330
-
331
- exports.MtxColorPickerComponent = MtxColorPickerComponent;
332
- exports.MtxColorPickerModule = MtxColorPickerModule;
333
-
334
- Object.defineProperty(exports, '__esModule', { value: true });
335
-
336
- })));
337
- //# sourceMappingURL=mtxColorPicker.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mtxColorPicker.umd.js","sources":["../../../projects/extensions/color-picker/color-picker.component.ts","../../../projects/extensions/color-picker/color-picker.module.ts","../../../projects/extensions/color-picker/mtxColorPicker.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnDestroy,\n Optional,\n Self,\n ElementRef,\n Input,\n Output,\n EventEmitter,\n Inject,\n DoCheck,\n ViewChild,\n Host,\n AfterViewInit,\n NgZone,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { _supportsShadowDom } from '@angular/cdk/platform';\nimport { MatFormFieldControl, MatFormField } from '@angular/material/form-field';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { Subject, Observable, merge, fromEvent, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { ColorEvent } from 'ngx-color';\n\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'mtx-color-picker',\n exportAs: 'mtxColorPicker',\n templateUrl: './color-picker.component.html',\n styleUrls: ['./color-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: MatFormFieldControl, useExisting: MtxColorPickerComponent }],\n})\nexport class MtxColorPickerComponent\n implements OnDestroy, DoCheck, AfterViewInit, ControlValueAccessor, MatFormFieldControl<any>\n{\n /** Value of the color picker control. */\n @Input()\n get value(): string | null {\n return this._value;\n }\n set value(newValue: string | null) {\n this._value = newValue;\n this._onChange(newValue);\n this.stateChanges.next();\n }\n private _value: string | null = '';\n\n /** Implemented as part of MatFormFieldControl. */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /** Unique id for this input. */\n private _uid = `mtx-color-picker-${nextUniqueId++}`;\n\n /** Unique id of the element. */\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n private _id!: string;\n\n /** Placeholder to be shown if value is empty. */\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder!: string;\n\n /** Whether the input is focused. */\n get focused(): boolean {\n return this._focused || this._panelOpen;\n }\n private _focused = false;\n\n get empty(): boolean {\n return !this.value;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _disabled = false;\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: boolean) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = false;\n\n errorState = false;\n\n /** A name for this control that can be used by `mat-form-field`. */\n controlType = 'mtx-color-picker';\n\n /** The aria-describedby attribute on the color picker for improved a11y. */\n _ariaDescribedby!: string;\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when color picker has been touched` */\n _onTouched = () => {};\n\n /** Event emitted when the color changed */\n @Output() readonly colorChange = new EventEmitter<ColorEvent>();\n\n @ViewChild(MatMenuTrigger, { static: true }) trigger!: MatMenuTrigger;\n\n /** Whether or not the overlay panel is open. */\n _panelOpen = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription!: Subscription;\n\n /** Whether the element is inside of a ShadowRoot component. */\n private _isInsideShadowRoot!: boolean;\n\n /**\n * Whether the color picker can open the next time it is focused. Used to prevent a focused,\n * closed color picker from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the color picker is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._elementRef.nativeElement || this._panelOpen;\n };\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _zone: NgZone,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() @Host() private _formField: MatFormField,\n @Optional() @Inject(DOCUMENT) private _document: any\n ) {\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this._focused && !origin) {\n this._onTouched();\n }\n this._focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n this.errorState = (this.ngControl.invalid && this.ngControl.touched) as boolean;\n this.stateChanges.next();\n }\n }\n\n ngAfterViewInit() {\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => {\n window.addEventListener('blur', this._windowBlurHandler);\n });\n\n if (_supportsShadowDom()) {\n const element = this._elementRef.nativeElement;\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // We need to take the `ShadowRoot` off of `window`, because the built-in types are\n // incorrect. See https://github.com/Microsoft/TypeScript/issues/27929.\n this._isInsideShadowRoot = rootNode instanceof (window as any).ShadowRoot;\n }\n }\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Implemented as part of MatFormFieldControl. */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /** Implemented as part of MatFormFieldControl. */\n onContainerClick() {\n this._handleFocus();\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value New value to be written to the model.\n */\n writeValue(value: string | null): void {\n this.value = value || '';\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n /** Open panel with input focus event. */\n _handleFocus() {\n this.trigger.openMenu();\n\n this._closingActionsSubscription = merge(this._getOutsideClickStream())\n .pipe()\n .subscribe(event => {\n this.trigger.closeMenu();\n this._closingActionsSubscription.unsubscribe();\n });\n }\n\n /** Opens the overlay panel. */\n _openPanel() {\n if (this._focused) {\n this._panelOpen = true;\n }\n }\n\n /** Closes the overlay panel and focuses the host element. */\n _closePanel() {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n\n /** The callback of color changed. */\n _onColorChanged(model: ColorEvent) {\n this.value = model.color.hex;\n this.colorChange.emit(model);\n }\n\n /** Stream of clicks outside of the color picker panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>\n ).pipe(\n filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = (\n this._isInsideShadowRoot && event.composedPath ? event.composedPath()[0] : event.target\n ) as HTMLElement;\n const formField = this._formField ? this._formField._elementRef.nativeElement : null;\n\n return (\n clickTarget !== this._elementRef.nativeElement &&\n (!formField || !formField.contains(clickTarget))\n );\n })\n );\n }\n\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { ColorChromeModule } from 'ngx-color/chrome';\n\nimport { MtxColorPickerComponent } from './color-picker.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n MatMenuModule,\n MatFormFieldModule,\n MatInputModule,\n ColorChromeModule,\n ],\n exports: [MtxColorPickerComponent],\n declarations: [MtxColorPickerComponent],\n})\nexport class MtxColorPickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Subject","EventEmitter","coerceBooleanProperty","_supportsShadowDom","merge","fromEvent","filter","Component","ViewEncapsulation","ChangeDetectionStrategy","MatFormFieldControl","FocusMonitor","ElementRef","ChangeDetectorRef","NgZone","NgControl","Optional","Self","MatFormField","Host","Inject","DOCUMENT","Input","Output","ViewChild","MatMenuTrigger","NgModule","CommonModule","FormsModule","MatMenuModule","MatFormFieldModule","MatInputModule","ColorChromeModule"],"mappings":";;;;;;IA+BA,IAAI,YAAY,GAAG,CAAC,CAAC;;QAiJnB,iCACU,aAA2B,EAC3B,WAAoC,EACpC,kBAAqC,EACrC,KAAa,EACM,SAAoB,EACnB,UAAwB,EACd,SAAc;YAPtD,iBAoBC;YAnBS,kBAAa,GAAb,aAAa,CAAc;YAC3B,gBAAW,GAAX,WAAW,CAAyB;YACpC,uBAAkB,GAAlB,kBAAkB,CAAmB;YACrC,UAAK,GAAL,KAAK,CAAQ;YACM,cAAS,GAAT,SAAS,CAAW;YACnB,eAAU,GAAV,UAAU,CAAc;YACd,cAAS,GAAT,SAAS,CAAK;YAhI9C,WAAM,GAAkB,EAAE,CAAC;;YAG1B,iBAAY,GAAkB,IAAIA,YAAO,EAAQ,CAAC;;YAGnD,SAAI,GAAG,sBAAoB,YAAY,EAAI,CAAC;YA4B5C,aAAQ,GAAG,KAAK,CAAC;YAkBjB,cAAS,GAAG,KAAK,CAAC;YAUlB,cAAS,GAAG,KAAK,CAAC;YAUlB,cAAS,GAAG,KAAK,CAAC;YAE1B,eAAU,GAAG,KAAK,CAAC;;YAGnB,gBAAW,GAAG,kBAAkB,CAAC;;YAMjC,cAAS,GAAyB,eAAQ,CAAC;;YAG3C,eAAU,GAAG,eAAQ,CAAC;;YAGH,gBAAW,GAAG,IAAIC,iBAAY,EAAc,CAAC;;YAKhE,eAAU,GAAG,KAAK,CAAC;;;;;;YAaX,wBAAmB,GAAG,IAAI,CAAC;;;;;YAM3B,uBAAkB,GAAG;;;;gBAI3B,KAAI,CAAC,mBAAmB;oBACtB,KAAI,CAAC,SAAS,CAAC,aAAa,KAAK,KAAI,CAAC,WAAW,CAAC,aAAa,IAAI,KAAI,CAAC,UAAU,CAAC;aACtF,CAAC;YAWA,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE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,QAAQ,EAAE,kBAAkB;oBAC5B,QAAQ,EAAE,gBAAgB;oBAC1B,uvBAA4C;oBAE5C,aAAa,EAAEC,sBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAEC,4BAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,EAAE,OAAO,EAAEC,6BAAmB,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;iBACpF;;;;;;;;;;gBApBQC,iBAAY;gBAbnBC,eAAU;gBAJVC,sBAAiB;gBAajBC,WAAM;gBAGuBC,eAAS,uBAiKnCC,aAAQ,YAAIC,SAAI;gBA7JSC,sBAAY,uBA8JrCF,aAAQ,YAAIG,SAAI;gDAChBH,aAAQ,YAAII,WAAM,SAACC,eAAQ;;;;wBAzI7BC,UAAK;qBAkBLA,UAAK;8BAWLA,UAAK;2BAwBLA,UAAK;2BAULA,UAAK;2BAWLA,UAAK;8BAwBLC,WAAM;0BAENC,cAAS,SAACC,mBAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;;QC3H7C;;;;;;gBAZCC,aAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,mBAAY;wBACZC,iBAAW;wBACXC,kBAAa;wBACbC,4BAAkB;wBAClBC,oBAAc;wBACdC,wBAAiB;qBAClB;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,YAAY,EAAE,CAAC,uBAAuB,CAAC;iBACxC;;;ICtBD;;;;;;;;;;;;;"}
@@ -1,120 +0,0 @@
1
- import { ChangeDetectorRef, OnDestroy, ElementRef, EventEmitter, DoCheck, AfterViewInit, NgZone } from '@angular/core';
2
- import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { FocusMonitor } from '@angular/cdk/a11y';
4
- import { BooleanInput } from '@angular/cdk/coercion';
5
- import { MatFormFieldControl, MatFormField } from '@angular/material/form-field';
6
- import { MatMenuTrigger } from '@angular/material/menu';
7
- import { Subject } from 'rxjs';
8
- import { ColorEvent } from 'ngx-color';
9
- export declare class MtxColorPickerComponent implements OnDestroy, DoCheck, AfterViewInit, ControlValueAccessor, MatFormFieldControl<any> {
10
- private _focusMonitor;
11
- private _elementRef;
12
- private _changeDetectorRef;
13
- private _zone;
14
- ngControl: NgControl;
15
- private _formField;
16
- private _document;
17
- /** Value of the color picker control. */
18
- get value(): string | null;
19
- set value(newValue: string | null);
20
- private _value;
21
- /** Implemented as part of MatFormFieldControl. */
22
- readonly stateChanges: Subject<void>;
23
- /** Unique id for this input. */
24
- private _uid;
25
- /** Unique id of the element. */
26
- get id(): string;
27
- set id(value: string);
28
- private _id;
29
- /** Placeholder to be shown if value is empty. */
30
- get placeholder(): string;
31
- set placeholder(value: string);
32
- private _placeholder;
33
- /** Whether the input is focused. */
34
- get focused(): boolean;
35
- private _focused;
36
- get empty(): boolean;
37
- get shouldLabelFloat(): boolean;
38
- get required(): boolean;
39
- set required(value: boolean);
40
- private _required;
41
- get disabled(): boolean;
42
- set disabled(value: boolean);
43
- private _disabled;
44
- /** Whether the element is readonly. */
45
- get readonly(): boolean;
46
- set readonly(value: boolean);
47
- private _readonly;
48
- errorState: boolean;
49
- /** A name for this control that can be used by `mat-form-field`. */
50
- controlType: string;
51
- /** The aria-describedby attribute on the color picker for improved a11y. */
52
- _ariaDescribedby: string;
53
- /** `View -> model callback called when value changes` */
54
- _onChange: (value: any) => void;
55
- /** `View -> model callback called when color picker has been touched` */
56
- _onTouched: () => void;
57
- /** Event emitted when the color changed */
58
- readonly colorChange: EventEmitter<ColorEvent>;
59
- trigger: MatMenuTrigger;
60
- /** Whether or not the overlay panel is open. */
61
- _panelOpen: boolean;
62
- /** The subscription for closing actions (some are bound to document). */
63
- private _closingActionsSubscription;
64
- /** Whether the element is inside of a ShadowRoot component. */
65
- private _isInsideShadowRoot;
66
- /**
67
- * Whether the color picker can open the next time it is focused. Used to prevent a focused,
68
- * closed color picker from being reopened if the user switches to another browser tab and then
69
- * comes back.
70
- */
71
- private _canOpenOnNextFocus;
72
- /**
73
- * Event handler for when the window is blurred. Needs to be an
74
- * arrow function in order to preserve the context.
75
- */
76
- private _windowBlurHandler;
77
- constructor(_focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _zone: NgZone, ngControl: NgControl, _formField: MatFormField, _document: any);
78
- ngDoCheck(): void;
79
- ngAfterViewInit(): void;
80
- ngOnDestroy(): void;
81
- /** Implemented as part of MatFormFieldControl. */
82
- setDescribedByIds(ids: string[]): void;
83
- /** Implemented as part of MatFormFieldControl. */
84
- onContainerClick(): void;
85
- /**
86
- * Sets the model value. Implemented as part of ControlValueAccessor.
87
- * @param value New value to be written to the model.
88
- */
89
- writeValue(value: string | null): void;
90
- /**
91
- * Registers a callback to be triggered when the model value changes.
92
- * Implemented as part of ControlValueAccessor.
93
- * @param fn Callback to be registered.
94
- */
95
- registerOnChange(fn: any): void;
96
- /**
97
- * Registers a callback to be triggered when the control is touched.
98
- * Implemented as part of ControlValueAccessor.
99
- * @param fn Callback to be registered.
100
- */
101
- registerOnTouched(fn: any): void;
102
- /**
103
- * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
104
- * @param isDisabled Whether the control should be disabled.
105
- */
106
- setDisabledState(isDisabled: boolean): void;
107
- /** Open panel with input focus event. */
108
- _handleFocus(): void;
109
- /** Opens the overlay panel. */
110
- _openPanel(): void;
111
- /** Closes the overlay panel and focuses the host element. */
112
- _closePanel(): void;
113
- /** The callback of color changed. */
114
- _onColorChanged(model: ColorEvent): void;
115
- /** Stream of clicks outside of the color picker panel. */
116
- private _getOutsideClickStream;
117
- static ngAcceptInputType_required: BooleanInput;
118
- static ngAcceptInputType_readonly: BooleanInput;
119
- static ngAcceptInputType_disabled: BooleanInput;
120
- }
@@ -1,2 +0,0 @@
1
- export declare class MtxColorPickerModule {
2
- }
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MtxColorPickerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":17,"character":4},{"__symbolic":"reference","module":"ngx-color/chrome","name":"ColorChromeModule","line":18,"character":4}],"exports":[{"__symbolic":"reference","name":"MtxColorPickerComponent"}],"declarations":[{"__symbolic":"reference","name":"MtxColorPickerComponent"}]}]}],"members":{}},"MtxColorPickerComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":33,"character":1},"arguments":[{"selector":"mtx-color-picker","exportAs":"mtxColorPicker","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":38,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":39,"character":19},"member":"OnPush"},"providers":[{"provide":{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldControl","line":40,"character":25},"useExisting":{"__symbolic":"reference","name":"MtxColorPickerComponent"}}],"template":"<input matInput\n [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus()\"\n autocomplete=\"off\">\n\n<div #colorPickerTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"colorPickerPopover\"\n (menuOpened)=\"_openPanel()\"\n (menuClosed)=\"_closePanel()\">\n</div>\n\n<mat-menu #colorPickerPopover=\"matMenu\" class=\"mtx-color-picker-panel\" [hasBackdrop]=\"false\">\n <div class=\"mtx-color-picker\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n <color-chrome [color]=\"value!\" (onChangeComplete)=\"_onColorChanged($event)\"></color-chrome>\n </div>\n</mat-menu>\n","styles":[".mtx-color-picker-panel .mat-menu-content:not(:empty){padding:0}.mtx-color-picker-panel .mtx-color-picker{padding:8px}.mtx-color-picker-panel .mtx-color-picker .chrome-picker{box-shadow:none;border-radius:0}.mtx-color-picker-panel .mtx-color-picker .chrome-picker .saturation{border-radius:0}\n"]}]}],"members":{"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":120,"character":3}}]}],"colorChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":144,"character":3}}]}],"trigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":146,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":146,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":181,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":181,"character":17}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":182,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host","line":182,"character":17}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":183,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":183,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":183,"character":24}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":177,"character":27},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":178,"character":36,"context":{"typeName":"HTMLElement"},"module":"./color-picker.component"}]},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":179,"character":32},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":180,"character":19},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":181,"character":42},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormField","line":182,"character":44},{"__symbolic":"reference","name":"any"}]}],"ngDoCheck":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setDescribedByIds":[{"__symbolic":"method"}],"onContainerClick":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_handleFocus":[{"__symbolic":"method"}],"_openPanel":[{"__symbolic":"method"}],"_closePanel":[{"__symbolic":"method"}],"_onColorChanged":[{"__symbolic":"method"}],"_getOutsideClickStream":[{"__symbolic":"method"}]}}},"origins":{"MtxColorPickerModule":"./color-picker.module","MtxColorPickerComponent":"./color-picker.component"},"importAs":"@ng-matero/extensions/color-picker"}