platform.mjs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. export { P as Platform } from './platform-DmdVEw_C.mjs';
  2. import * as i0 from '@angular/core';
  3. import { NgModule } from '@angular/core';
  4. export { n as normalizePassiveListenerOptions, s as supportsPassiveEventListeners } from './passive-listeners-esHZRgIN.mjs';
  5. export { R as RtlScrollAxisType, g as getRtlScrollAxisType, s as supportsScrollBehavior } from './scrolling-BkvA05C8.mjs';
  6. export { _ as _getEventTarget, c as _getFocusedElementPierceShadowDom, a as _getShadowRoot, b as _supportsShadowDom } from './shadow-dom-B0oHn41l.mjs';
  7. export { _ as _isTestEnvironment } from './test-environment-CT0XxPyp.mjs';
  8. export { _ as _bindEventWithOptions } from './backwards-compatibility-DHR38MsD.mjs';
  9. import '@angular/common';
  10. class PlatformModule {
  11. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
  12. static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: PlatformModule });
  13. static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlatformModule });
  14. }
  15. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlatformModule, decorators: [{
  16. type: NgModule,
  17. args: [{}]
  18. }] });
  19. /** Cached result Set of input types support by the current browser. */
  20. let supportedInputTypes;
  21. /** Types of `<input>` that *might* be supported. */
  22. const candidateInputTypes = [
  23. // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after
  24. // first changing it to something else:
  25. // The specified value "" does not conform to the required format.
  26. // The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
  27. 'color',
  28. 'button',
  29. 'checkbox',
  30. 'date',
  31. 'datetime-local',
  32. 'email',
  33. 'file',
  34. 'hidden',
  35. 'image',
  36. 'month',
  37. 'number',
  38. 'password',
  39. 'radio',
  40. 'range',
  41. 'reset',
  42. 'search',
  43. 'submit',
  44. 'tel',
  45. 'text',
  46. 'time',
  47. 'url',
  48. 'week',
  49. ];
  50. /** @returns The input types supported by this browser. */
  51. function getSupportedInputTypes() {
  52. // Result is cached.
  53. if (supportedInputTypes) {
  54. return supportedInputTypes;
  55. }
  56. // We can't check if an input type is not supported until we're on the browser, so say that
  57. // everything is supported when not on the browser. We don't use `Platform` here since it's
  58. // just a helper function and can't inject it.
  59. if (typeof document !== 'object' || !document) {
  60. supportedInputTypes = new Set(candidateInputTypes);
  61. return supportedInputTypes;
  62. }
  63. let featureTestInput = document.createElement('input');
  64. supportedInputTypes = new Set(candidateInputTypes.filter(value => {
  65. featureTestInput.setAttribute('type', value);
  66. return featureTestInput.type === value;
  67. }));
  68. return supportedInputTypes;
  69. }
  70. export { PlatformModule, getSupportedInputTypes };
  71. //# sourceMappingURL=platform.mjs.map