@angular/material 21.1.0-next.0 → 21.1.0-next.2
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/core/focus-indicators/_private.scss +1 -1
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs +6 -6
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs +30 -30
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs +6 -6
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs +3 -3
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs +3 -3
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs +7 -7
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs +6 -6
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs +4 -4
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs +3 -3
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +4 -4
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs +6 -6
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs +3 -3
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs +4 -4
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs +3 -3
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs +6 -6
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +19 -15
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +13 -13
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +7 -7
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +46 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +12 -12
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +91 -89
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +4 -4
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs +7 -7
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +7 -7
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +22 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs +10 -10
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +7 -7
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs +61 -75
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +112 -121
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +4 -4
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/datepicker.d.ts +6 -2
- package/types/table.d.ts +3 -0
- package/types/timepicker.d.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timepicker-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/timepicker/testing/timepicker-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/timepicker/testing/timepicker-input-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/timepicker/testing/timepicker-toggle-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {MatOptionHarness, OptionHarnessFilters} from '../../core/testing';\nimport {TimepickerHarnessFilters} from './timepicker-harness-filters';\n\nexport class MatTimepickerHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n static hostSelector = 'mat-timepicker';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a timepicker with specific\n * attributes.\n * @param options Options for filtering which timepicker instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatTimepickerHarness>(\n this: ComponentHarnessConstructor<T>,\n options: TimepickerHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Whether the timepicker is open. */\n async isOpen(): Promise<boolean> {\n const selector = await this._getPanelSelector();\n const panel = await this._documentRootLocator.locatorForOptional(selector)();\n return panel !== null;\n }\n\n /** Gets the options inside the timepicker panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for timepicker. Timepicker panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Gets the selector that can be used to find the timepicker's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('mat-timepicker-panel-id')}`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport {MatTimepickerHarness} from './timepicker-harness';\nimport {\n TimepickerHarnessFilters,\n TimepickerInputHarnessFilters,\n} from './timepicker-harness-filters';\n\n/** Harness for interacting with a standard Material timepicker inputs in tests. */\nexport class MatTimepickerInputHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n static hostSelector = '.mat-timepicker-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTimepickerInputHarness`\n * that meets certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatTimepickerInputHarness>(\n this: ComponentHarnessConstructor<T>,\n options: TimepickerInputHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) => {\n return HarnessPredicate.stringMatches(harness.getValue(), value);\n })\n .addOption('placeholder', options.placeholder, (harness, placeholder) => {\n return HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder);\n });\n }\n\n /** Gets whether the timepicker associated with the input is open. */\n async isTimepickerOpen(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Opens the timepicker associated with the input and returns the timepicker instance. */\n async openTimepicker(): Promise<MatTimepickerHarness> {\n if (!(await this.isDisabled())) {\n const host = await this.host();\n await host.sendKeys(TestKey.DOWN_ARROW);\n }\n\n return this.getTimepicker();\n }\n\n /** Closes the timepicker associated with the input. */\n async closeTimepicker(): Promise<void> {\n await this._documentRootLocator.rootElement.click();\n\n // This is necessary so that we wait for the closing animation.\n await this.forceStabilize();\n }\n\n /**\n * Gets the `MatTimepickerHarness` that is associated with the input.\n * @param filter Optionally filters which timepicker is included.\n */\n async getTimepicker(filter: TimepickerHarnessFilters = {}): Promise<MatTimepickerHarness> {\n const host = await this.host();\n const timepickerId = await host.getAttribute('mat-timepicker-id');\n\n if (!timepickerId) {\n throw Error('Element is not associated with a timepicker');\n }\n\n return this._documentRootLocator.locatorFor(\n MatTimepickerHarness.with({\n ...filter,\n selector: `[mat-timepicker-panel-id=\"${timepickerId}\"]`,\n }),\n )();\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('required');\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is always defined.\n return await (await this.host()).getProperty<string>('value');\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return await (await this.host()).getProperty<string>('placeholder');\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {TimepickerToggleHarnessFilters} from './timepicker-harness-filters';\n\n/** Harness for interacting with a standard Material timepicker toggle in tests. */\nexport class MatTimepickerToggleHarness extends ComponentHarness {\n static hostSelector = '.mat-timepicker-toggle';\n\n /** The clickable button inside the toggle. */\n private _button = this.locatorFor('button');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTimepickerToggleHarness` that\n * meets certain criteria.\n * @param options Options for filtering which timepicker toggle instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: TimepickerToggleHarnessFilters = {},\n ): HarnessPredicate<MatTimepickerToggleHarness> {\n return new HarnessPredicate(MatTimepickerToggleHarness, options);\n }\n\n /** Opens the timepicker associated with the toggle. */\n async openTimepicker(): Promise<void> {\n const isOpen = await this.isTimepickerOpen();\n\n if (!isOpen) {\n const button = await this._button();\n await button.click();\n }\n }\n\n /** Gets whether the timepicker associated with the toggle is open. */\n async isTimepickerOpen(): Promise<boolean> {\n const button = await this._button();\n const ariaExpanded = await button.getAttribute('aria-expanded');\n return ariaExpanded === 'true';\n }\n\n /** Whether the toggle is disabled. */\n async isDisabled(): Promise<boolean> {\n const button = await this._button();\n return coerceBooleanProperty(await button.getAttribute('disabled'));\n }\n}\n"],"names":["MatTimepickerHarness","ComponentHarness","_documentRootLocator","documentRootLocatorFactory","hostSelector","with","options","HarnessPredicate","isOpen","selector","_getPanelSelector","panel","locatorForOptional","getOptions","filters","Error","locatorForAll","MatOptionHarness","ancestor","selectOption","length","JSON","stringify","click","host","getAttribute","MatTimepickerInputHarness","addOption","value","harness","stringMatches","getValue","placeholder","getPlaceholder","isTimepickerOpen","openTimepicker","isDisabled","sendKeys","TestKey","DOWN_ARROW","getTimepicker","closeTimepicker","rootElement","forceStabilize","filter","timepickerId","locatorFor","getProperty","isRequired","setValue","newValue","inputEl","clear","focus","blur","isFocused","MatTimepickerToggleHarness","_button","button","ariaExpanded","coerceBooleanProperty"],"mappings":";;;;AAgBM,MAAOA,oBAAqB,SAAQC,gBAAgB,CAAA;AAChDC,EAAAA,oBAAoB,GAAG,IAAI,CAACC,0BAA0B,EAAE;EAChE,OAAOC,YAAY,GAAG,gBAAgB;AAQtC,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAoC,EAAE,EAAA;AAEtC,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;AAC5C;EAGA,MAAME,MAAMA,GAAA;AACV,IAAA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACC,iBAAiB,EAAE;AAC/C,IAAA,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACT,oBAAoB,CAACU,kBAAkB,CAACH,QAAQ,CAAC,EAAE;IAC5E,OAAOE,KAAK,KAAK,IAAI;AACvB;EAGA,MAAME,UAAUA,CAACC,OAAgD,EAAA;IAC/D,IAAI,EAAE,MAAM,IAAI,CAACN,MAAM,EAAE,CAAC,EAAE;AAC1B,MAAA,MAAM,IAAIO,KAAK,CAAC,wEAAwE,CAAC;AAC3F;IAEA,OAAO,IAAI,CAACb,oBAAoB,CAACc,aAAa,CAC5CC,gBAAgB,CAACZ,IAAI,CAAC;AACpB,MAAA,IAAIS,OAAO,IAAI,EAAE,CAAC;AAClBI,MAAAA,QAAQ,EAAE,MAAM,IAAI,CAACR,iBAAiB;KACf,CAAC,CAC3B,EAAE;AACL;EAGA,MAAMS,YAAYA,CAACL,OAA6B,EAAA;IAC9C,MAAMR,OAAO,GAAG,MAAM,IAAI,CAACO,UAAU,CAACC,OAAO,CAAC;AAC9C,IAAA,IAAI,CAACR,OAAO,CAACc,MAAM,EAAE;MACnB,MAAML,KAAK,CAAC,CAAA,qCAAA,EAAwCM,IAAI,CAACC,SAAS,CAACR,OAAO,CAA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kC,YAAY,KAAK,MAAM;AAChC;EAGA,MAAMvB,UAAUA,GAAA;AACd,IAAA,MAAMsB,MAAM,GAAG,MAAM,IAAI,CAACD,OAAO,EAAE;IACnC,OAAOG,qBAAqB,CAAC,MAAMF,MAAM,CAACjC,YAAY,CAAC,UAAU,CAAC,CAAC;AACrE;;;;;"}
|
|
1
|
+
{"version":3,"file":"timepicker-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/timepicker/testing/timepicker-harness.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/timepicker/testing/timepicker-input-harness.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/timepicker/testing/timepicker-toggle-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {MatOptionHarness, OptionHarnessFilters} from '../../core/testing';\nimport {TimepickerHarnessFilters} from './timepicker-harness-filters';\n\nexport class MatTimepickerHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n static hostSelector = 'mat-timepicker';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a timepicker with specific\n * attributes.\n * @param options Options for filtering which timepicker instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatTimepickerHarness>(\n this: ComponentHarnessConstructor<T>,\n options: TimepickerHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Whether the timepicker is open. */\n async isOpen(): Promise<boolean> {\n const selector = await this._getPanelSelector();\n const panel = await this._documentRootLocator.locatorForOptional(selector)();\n return panel !== null;\n }\n\n /** Gets the options inside the timepicker panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for timepicker. Timepicker panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Gets the selector that can be used to find the timepicker's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('mat-timepicker-panel-id')}`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport {MatTimepickerHarness} from './timepicker-harness';\nimport {\n TimepickerHarnessFilters,\n TimepickerInputHarnessFilters,\n} from './timepicker-harness-filters';\n\n/** Harness for interacting with a standard Material timepicker inputs in tests. */\nexport class MatTimepickerInputHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n static hostSelector = '.mat-timepicker-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTimepickerInputHarness`\n * that meets certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatTimepickerInputHarness>(\n this: ComponentHarnessConstructor<T>,\n options: TimepickerInputHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) => {\n return HarnessPredicate.stringMatches(harness.getValue(), value);\n })\n .addOption('placeholder', options.placeholder, (harness, placeholder) => {\n return HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder);\n });\n }\n\n /** Gets whether the timepicker associated with the input is open. */\n async isTimepickerOpen(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Opens the timepicker associated with the input and returns the timepicker instance. */\n async openTimepicker(): Promise<MatTimepickerHarness> {\n if (!(await this.isDisabled())) {\n const host = await this.host();\n await host.sendKeys(TestKey.DOWN_ARROW);\n }\n\n return this.getTimepicker();\n }\n\n /** Closes the timepicker associated with the input. */\n async closeTimepicker(): Promise<void> {\n await this._documentRootLocator.rootElement.click();\n\n // This is necessary so that we wait for the closing animation.\n await this.forceStabilize();\n }\n\n /**\n * Gets the `MatTimepickerHarness` that is associated with the input.\n * @param filter Optionally filters which timepicker is included.\n */\n async getTimepicker(filter: TimepickerHarnessFilters = {}): Promise<MatTimepickerHarness> {\n const host = await this.host();\n const timepickerId = await host.getAttribute('mat-timepicker-id');\n\n if (!timepickerId) {\n throw Error('Element is not associated with a timepicker');\n }\n\n return this._documentRootLocator.locatorFor(\n MatTimepickerHarness.with({\n ...filter,\n selector: `[mat-timepicker-panel-id=\"${timepickerId}\"]`,\n }),\n )();\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('required');\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is always defined.\n return await (await this.host()).getProperty<string>('value');\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return await (await this.host()).getProperty<string>('placeholder');\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {TimepickerToggleHarnessFilters} from './timepicker-harness-filters';\n\n/** Harness for interacting with a standard Material timepicker toggle in tests. */\nexport class MatTimepickerToggleHarness extends ComponentHarness {\n static hostSelector = '.mat-timepicker-toggle';\n\n /** The clickable button inside the toggle. */\n private _button = this.locatorFor('button');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatTimepickerToggleHarness` that\n * meets certain criteria.\n * @param options Options for filtering which timepicker toggle instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: TimepickerToggleHarnessFilters = {},\n ): HarnessPredicate<MatTimepickerToggleHarness> {\n return new HarnessPredicate(MatTimepickerToggleHarness, options);\n }\n\n /** Opens the timepicker associated with the toggle. */\n async openTimepicker(): Promise<void> {\n const isOpen = await this.isTimepickerOpen();\n\n if (!isOpen) {\n const button = await this._button();\n await button.click();\n }\n }\n\n /** Gets whether the timepicker associated with the toggle is open. */\n async isTimepickerOpen(): Promise<boolean> {\n const button = await this._button();\n const ariaExpanded = await button.getAttribute('aria-expanded');\n return ariaExpanded === 'true';\n }\n\n /** Whether the toggle is disabled. */\n async isDisabled(): Promise<boolean> {\n const button = await this._button();\n return coerceBooleanProperty(await button.getAttribute('disabled'));\n }\n}\n"],"names":["MatTimepickerHarness","ComponentHarness","_documentRootLocator","documentRootLocatorFactory","hostSelector","with","options","HarnessPredicate","isOpen","selector","_getPanelSelector","panel","locatorForOptional","getOptions","filters","Error","locatorForAll","MatOptionHarness","ancestor","selectOption","length","JSON","stringify","click","host","getAttribute","MatTimepickerInputHarness","addOption","value","harness","stringMatches","getValue","placeholder","getPlaceholder","isTimepickerOpen","openTimepicker","isDisabled","sendKeys","TestKey","DOWN_ARROW","getTimepicker","closeTimepicker","rootElement","forceStabilize","filter","timepickerId","locatorFor","getProperty","isRequired","setValue","newValue","inputEl","clear","focus","blur","isFocused","MatTimepickerToggleHarness","_button","button","ariaExpanded","coerceBooleanProperty"],"mappings":";;;;AAgBM,MAAOA,oBAAqB,SAAQC,gBAAgB,CAAA;AAChDC,EAAAA,oBAAoB,GAAG,IAAI,CAACC,0BAA0B,EAAE;EAChE,OAAOC,YAAY,GAAG,gBAAgB;AAQtC,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAoC,EAAE,EAAA;AAEtC,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;AAC5C;EAGA,MAAME,MAAMA,GAAA;AACV,IAAA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACC,iBAAiB,EAAE;AAC/C,IAAA,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACT,oBAAoB,CAACU,kBAAkB,CAACH,QAAQ,CAAC,EAAE;IAC5E,OAAOE,KAAK,KAAK,IAAI;AACvB;EAGA,MAAME,UAAUA,CAACC,OAAgD,EAAA;IAC/D,IAAI,EAAE,MAAM,IAAI,CAACN,MAAM,EAAE,CAAC,EAAE;AAC1B,MAAA,MAAM,IAAIO,KAAK,CAAC,wEAAwE,CAAC;AAC3F;IAEA,OAAO,IAAI,CAACb,oBAAoB,CAACc,aAAa,CAC5CC,gBAAgB,CAACZ,IAAI,CAAC;AACpB,MAAA,IAAIS,OAAO,IAAI,EAAE,CAAC;AAClBI,MAAAA,QAAQ,EAAE,MAAM,IAAI,CAACR,iBAAiB;KACf,CAAC,CAC3B,EA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CAACD,OAAO,EAAE;AACnC,MAAA,MAAMC,MAAM,CAACnC,KAAK,EAAE;AACtB;AACF;EAGA,MAAMW,gBAAgBA,GAAA;AACpB,IAAA,MAAMwB,MAAM,GAAG,MAAM,IAAI,CAACD,OAAO,EAAE;IACnC,MAAME,YAAY,GAAG,MAAMD,MAAM,CAACjC,YAAY,CAAC,eAAe,CAAC;IAC/D,OAAOkC,YAAY,KAAK,MAAM;AAChC;EAGA,MAAMvB,UAAUA,GAAA;AACd,IAAA,MAAMsB,MAAM,GAAG,MAAM,IAAI,CAACD,OAAO,EAAE;IACnC,OAAOG,qBAAqB,CAAC,MAAMF,MAAM,CAACjC,YAAY,CAAC,UAAU,CAAC,CAAC;AACrE;;;;;"}
|
package/fesm2022/timepicker.mjs
CHANGED
|
@@ -125,12 +125,12 @@ class MatTimepicker {
|
|
|
125
125
|
debugName: "_options"
|
|
126
126
|
}] : []));
|
|
127
127
|
_keyManager = new ActiveDescendantKeyManager(this._options, this._injector).withHomeAndEnd(true).withPageUpDown(true).withVerticalOrientation(true);
|
|
128
|
-
interval = input(parseInterval(this._defaultConfig?.interval || null),
|
|
129
|
-
|
|
128
|
+
interval = input(parseInterval(this._defaultConfig?.interval || null), {
|
|
129
|
+
...(ngDevMode ? {
|
|
130
|
+
debugName: "interval"
|
|
131
|
+
} : {}),
|
|
130
132
|
transform: parseInterval
|
|
131
|
-
}
|
|
132
|
-
transform: parseInterval
|
|
133
|
-
}]));
|
|
133
|
+
});
|
|
134
134
|
options = input(null, ...(ngDevMode ? [{
|
|
135
135
|
debugName: "options"
|
|
136
136
|
}] : []));
|
|
@@ -140,24 +140,24 @@ class MatTimepicker {
|
|
|
140
140
|
closed = output();
|
|
141
141
|
activeDescendant = this._activeDescendant.asReadonly();
|
|
142
142
|
panelId = inject(_IdGenerator).getId('mat-timepicker-panel-');
|
|
143
|
-
disableRipple = input(this._defaultConfig?.disableRipple ?? false,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
disableRipple = input(this._defaultConfig?.disableRipple ?? false, {
|
|
144
|
+
...(ngDevMode ? {
|
|
145
|
+
debugName: "disableRipple"
|
|
146
|
+
} : {}),
|
|
147
147
|
transform: booleanAttribute
|
|
148
|
-
}
|
|
149
|
-
ariaLabel = input(null,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
});
|
|
149
|
+
ariaLabel = input(null, {
|
|
150
|
+
...(ngDevMode ? {
|
|
151
|
+
debugName: "ariaLabel"
|
|
152
|
+
} : {}),
|
|
153
153
|
alias: 'aria-label'
|
|
154
|
-
}
|
|
155
|
-
ariaLabelledby = input(null,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
});
|
|
155
|
+
ariaLabelledby = input(null, {
|
|
156
|
+
...(ngDevMode ? {
|
|
157
|
+
debugName: "ariaLabelledby"
|
|
158
|
+
} : {}),
|
|
159
159
|
alias: 'aria-labelledby'
|
|
160
|
-
}
|
|
160
|
+
});
|
|
161
161
|
disabled = computed(() => !!this._input()?.disabled(), ...(ngDevMode ? [{
|
|
162
162
|
debugName: "disabled"
|
|
163
163
|
}] : []));
|
|
@@ -375,7 +375,7 @@ class MatTimepicker {
|
|
|
375
375
|
}
|
|
376
376
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
377
377
|
minVersion: "12.0.0",
|
|
378
|
-
version: "21.0.
|
|
378
|
+
version: "21.0.3",
|
|
379
379
|
ngImport: i0,
|
|
380
380
|
type: MatTimepicker,
|
|
381
381
|
deps: [],
|
|
@@ -383,7 +383,7 @@ class MatTimepicker {
|
|
|
383
383
|
});
|
|
384
384
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
385
385
|
minVersion: "17.0.0",
|
|
386
|
-
version: "21.0.
|
|
386
|
+
version: "21.0.3",
|
|
387
387
|
type: MatTimepicker,
|
|
388
388
|
isStandalone: true,
|
|
389
389
|
selector: "mat-timepicker",
|
|
@@ -463,7 +463,7 @@ class MatTimepicker {
|
|
|
463
463
|
}
|
|
464
464
|
i0.ɵɵngDeclareClassMetadata({
|
|
465
465
|
minVersion: "12.0.0",
|
|
466
|
-
version: "21.0.
|
|
466
|
+
version: "21.0.3",
|
|
467
467
|
ngImport: i0,
|
|
468
468
|
type: MatTimepicker,
|
|
469
469
|
decorators: [{
|
|
@@ -579,6 +579,8 @@ class MatTimepickerInput {
|
|
|
579
579
|
_timepickerSubscription;
|
|
580
580
|
_validator;
|
|
581
581
|
_lastValueValid = true;
|
|
582
|
+
_minValid = true;
|
|
583
|
+
_maxValid = true;
|
|
582
584
|
_lastValidDate = null;
|
|
583
585
|
_ariaActiveDescendant = computed(() => {
|
|
584
586
|
const timepicker = this.timepicker();
|
|
@@ -600,55 +602,50 @@ class MatTimepickerInput {
|
|
|
600
602
|
value = model(null, ...(ngDevMode ? [{
|
|
601
603
|
debugName: "value"
|
|
602
604
|
}] : []));
|
|
603
|
-
timepicker = input.required(
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
605
|
+
timepicker = input.required({
|
|
606
|
+
...(ngDevMode ? {
|
|
607
|
+
debugName: "timepicker"
|
|
608
|
+
} : {}),
|
|
607
609
|
alias: 'matTimepicker'
|
|
608
|
-
}
|
|
609
|
-
min = input(null,
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}] : [{
|
|
610
|
+
});
|
|
611
|
+
min = input(null, {
|
|
612
|
+
...(ngDevMode ? {
|
|
613
|
+
debugName: "min"
|
|
614
|
+
} : {}),
|
|
614
615
|
alias: 'matTimepickerMin',
|
|
615
616
|
transform: value => this._transformDateInput(value)
|
|
616
|
-
}
|
|
617
|
-
max = input(null,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}] : [{
|
|
617
|
+
});
|
|
618
|
+
max = input(null, {
|
|
619
|
+
...(ngDevMode ? {
|
|
620
|
+
debugName: "max"
|
|
621
|
+
} : {}),
|
|
622
622
|
alias: 'matTimepickerMax',
|
|
623
623
|
transform: value => this._transformDateInput(value)
|
|
624
|
-
}
|
|
625
|
-
openOnClick = input(true,
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}] : [{
|
|
624
|
+
});
|
|
625
|
+
openOnClick = input(true, {
|
|
626
|
+
...(ngDevMode ? {
|
|
627
|
+
debugName: "openOnClick"
|
|
628
|
+
} : {}),
|
|
630
629
|
alias: 'matTimepickerOpenOnClick',
|
|
631
630
|
transform: booleanAttribute
|
|
632
|
-
}
|
|
631
|
+
});
|
|
633
632
|
disabled = computed(() => this.disabledInput() || this._accessorDisabled(), ...(ngDevMode ? [{
|
|
634
633
|
debugName: "disabled"
|
|
635
634
|
}] : []));
|
|
636
|
-
disabledInput = input(false,
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}] : [{
|
|
635
|
+
disabledInput = input(false, {
|
|
636
|
+
...(ngDevMode ? {
|
|
637
|
+
debugName: "disabledInput"
|
|
638
|
+
} : {}),
|
|
641
639
|
transform: booleanAttribute,
|
|
642
640
|
alias: 'disabled'
|
|
643
|
-
}
|
|
641
|
+
});
|
|
644
642
|
constructor() {
|
|
645
643
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
646
644
|
validateAdapter(this._dateAdapter, this._dateFormats);
|
|
647
645
|
}
|
|
648
646
|
const renderer = inject(Renderer2);
|
|
649
647
|
this._validator = this._getValidator();
|
|
650
|
-
this.
|
|
651
|
-
this._respondToMinMaxChanges();
|
|
648
|
+
this._updateFormsState();
|
|
652
649
|
this._registerTimepicker();
|
|
653
650
|
this._localeSubscription = this._dateAdapter.localeChanges.subscribe(() => {
|
|
654
651
|
if (!this._hasFocus()) {
|
|
@@ -739,18 +736,28 @@ class MatTimepickerInput {
|
|
|
739
736
|
this._formatValue(value);
|
|
740
737
|
}
|
|
741
738
|
}
|
|
742
|
-
|
|
739
|
+
_updateFormsState() {
|
|
743
740
|
effect(() => {
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
|
|
741
|
+
const {
|
|
742
|
+
_dateAdapter: adapter,
|
|
743
|
+
_lastValueValid: prevValueValid,
|
|
744
|
+
_minValid: prevMinValid,
|
|
745
|
+
_maxValid: prevMaxValid
|
|
746
|
+
} = this;
|
|
747
|
+
const value = adapter.deserialize(this.value());
|
|
748
|
+
const min = this.min();
|
|
749
|
+
const max = this.max();
|
|
750
|
+
const valueValid = this._lastValueValid = this._isValid(value);
|
|
751
|
+
this._minValid = !min || !value || !valueValid || adapter.compareTime(min, value) <= 0;
|
|
752
|
+
this._maxValid = !max || !value || !valueValid || adapter.compareTime(max, value) >= 0;
|
|
753
|
+
const stateChanged = prevValueValid !== valueValid || prevMinValid !== this._minValid || prevMaxValid !== this._maxValid;
|
|
747
754
|
if (!this._hasFocus()) {
|
|
748
755
|
this._formatValue(value);
|
|
749
756
|
}
|
|
750
|
-
if (value &&
|
|
757
|
+
if (value && valueValid) {
|
|
751
758
|
this._lastValidDate = value;
|
|
752
759
|
}
|
|
753
|
-
if (
|
|
760
|
+
if (stateChanged) {
|
|
754
761
|
this._validatorOnChange?.();
|
|
755
762
|
}
|
|
756
763
|
});
|
|
@@ -762,13 +769,6 @@ class MatTimepickerInput {
|
|
|
762
769
|
timepicker.closed.subscribe(() => this._onTouched?.());
|
|
763
770
|
});
|
|
764
771
|
}
|
|
765
|
-
_respondToMinMaxChanges() {
|
|
766
|
-
effect(() => {
|
|
767
|
-
this.min();
|
|
768
|
-
this.max();
|
|
769
|
-
this._validatorOnChange?.();
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
772
|
_assignUserSelection(selection, propagateToAccessor) {
|
|
773
773
|
let toAssign;
|
|
774
774
|
if (selection == null || !this._isValid(selection)) {
|
|
@@ -805,29 +805,21 @@ class MatTimepickerInput {
|
|
|
805
805
|
'matTimepickerParse': {
|
|
806
806
|
'text': this._elementRef.nativeElement.value
|
|
807
807
|
}
|
|
808
|
-
}, control => {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
|
819
|
-
const max = this.max();
|
|
820
|
-
return !max || !controlValue || this._dateAdapter.compareTime(max, controlValue) >= 0 ? null : {
|
|
821
|
-
'matTimepickerMax': {
|
|
822
|
-
'max': max,
|
|
823
|
-
'actual': controlValue
|
|
824
|
-
}
|
|
825
|
-
};
|
|
808
|
+
}, control => this._minValid ? null : {
|
|
809
|
+
'matTimepickerMin': {
|
|
810
|
+
'min': this.min(),
|
|
811
|
+
'actual': this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value))
|
|
812
|
+
}
|
|
813
|
+
}, control => this._maxValid ? null : {
|
|
814
|
+
'matTimepickerMax': {
|
|
815
|
+
'max': this.max(),
|
|
816
|
+
'actual': this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value))
|
|
817
|
+
}
|
|
826
818
|
}]);
|
|
827
819
|
}
|
|
828
820
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
829
821
|
minVersion: "12.0.0",
|
|
830
|
-
version: "21.0.
|
|
822
|
+
version: "21.0.3",
|
|
831
823
|
ngImport: i0,
|
|
832
824
|
type: MatTimepickerInput,
|
|
833
825
|
deps: [],
|
|
@@ -835,7 +827,7 @@ class MatTimepickerInput {
|
|
|
835
827
|
});
|
|
836
828
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
837
829
|
minVersion: "17.1.0",
|
|
838
|
-
version: "21.0.
|
|
830
|
+
version: "21.0.3",
|
|
839
831
|
type: MatTimepickerInput,
|
|
840
832
|
isStandalone: true,
|
|
841
833
|
selector: "input[matTimepicker]",
|
|
@@ -924,7 +916,7 @@ class MatTimepickerInput {
|
|
|
924
916
|
}
|
|
925
917
|
i0.ɵɵngDeclareClassMetadata({
|
|
926
918
|
minVersion: "12.0.0",
|
|
927
|
-
version: "21.0.
|
|
919
|
+
version: "21.0.3",
|
|
928
920
|
ngImport: i0,
|
|
929
921
|
type: MatTimepickerInput,
|
|
930
922
|
decorators: [{
|
|
@@ -1033,42 +1025,41 @@ class MatTimepickerToggle {
|
|
|
1033
1025
|
}, ...(ngDevMode ? [{
|
|
1034
1026
|
debugName: "_isDisabled"
|
|
1035
1027
|
}] : []));
|
|
1036
|
-
timepicker = input.required(
|
|
1037
|
-
|
|
1028
|
+
timepicker = input.required({
|
|
1029
|
+
...(ngDevMode ? {
|
|
1030
|
+
debugName: "timepicker"
|
|
1031
|
+
} : {}),
|
|
1038
1032
|
alias: 'for'
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
alias: 'aria-label'
|
|
1045
|
-
}] : [{
|
|
1033
|
+
});
|
|
1034
|
+
ariaLabel = input(undefined, {
|
|
1035
|
+
...(ngDevMode ? {
|
|
1036
|
+
debugName: "ariaLabel"
|
|
1037
|
+
} : {}),
|
|
1046
1038
|
alias: 'aria-label'
|
|
1047
|
-
}
|
|
1048
|
-
ariaLabelledby = input(undefined,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1039
|
+
});
|
|
1040
|
+
ariaLabelledby = input(undefined, {
|
|
1041
|
+
...(ngDevMode ? {
|
|
1042
|
+
debugName: "ariaLabelledby"
|
|
1043
|
+
} : {}),
|
|
1052
1044
|
alias: 'aria-labelledby'
|
|
1053
|
-
}
|
|
1045
|
+
});
|
|
1054
1046
|
_defaultAriaLabel = 'Open timepicker options';
|
|
1055
|
-
disabled = input(false,
|
|
1056
|
-
|
|
1047
|
+
disabled = input(false, {
|
|
1048
|
+
...(ngDevMode ? {
|
|
1049
|
+
debugName: "disabled"
|
|
1050
|
+
} : {}),
|
|
1057
1051
|
transform: booleanAttribute,
|
|
1058
1052
|
alias: 'disabled'
|
|
1059
|
-
}
|
|
1060
|
-
transform: booleanAttribute,
|
|
1061
|
-
alias: 'disabled'
|
|
1062
|
-
}]));
|
|
1053
|
+
});
|
|
1063
1054
|
tabIndex = input(this._defaultTabIndex, ...(ngDevMode ? [{
|
|
1064
1055
|
debugName: "tabIndex"
|
|
1065
1056
|
}] : []));
|
|
1066
|
-
disableRipple = input(this._defaultConfig?.disableRipple ?? false,
|
|
1067
|
-
|
|
1057
|
+
disableRipple = input(this._defaultConfig?.disableRipple ?? false, {
|
|
1058
|
+
...(ngDevMode ? {
|
|
1059
|
+
debugName: "disableRipple"
|
|
1060
|
+
} : {}),
|
|
1068
1061
|
transform: booleanAttribute
|
|
1069
|
-
}
|
|
1070
|
-
transform: booleanAttribute
|
|
1071
|
-
}]));
|
|
1062
|
+
});
|
|
1072
1063
|
_open(event) {
|
|
1073
1064
|
if (this.timepicker() && !this._isDisabled()) {
|
|
1074
1065
|
this.timepicker().open();
|
|
@@ -1080,7 +1071,7 @@ class MatTimepickerToggle {
|
|
|
1080
1071
|
}
|
|
1081
1072
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1082
1073
|
minVersion: "12.0.0",
|
|
1083
|
-
version: "21.0.
|
|
1074
|
+
version: "21.0.3",
|
|
1084
1075
|
ngImport: i0,
|
|
1085
1076
|
type: MatTimepickerToggle,
|
|
1086
1077
|
deps: [],
|
|
@@ -1088,7 +1079,7 @@ class MatTimepickerToggle {
|
|
|
1088
1079
|
});
|
|
1089
1080
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1090
1081
|
minVersion: "17.1.0",
|
|
1091
|
-
version: "21.0.
|
|
1082
|
+
version: "21.0.3",
|
|
1092
1083
|
type: MatTimepickerToggle,
|
|
1093
1084
|
isStandalone: true,
|
|
1094
1085
|
selector: "mat-timepicker-toggle",
|
|
@@ -1160,7 +1151,7 @@ class MatTimepickerToggle {
|
|
|
1160
1151
|
}
|
|
1161
1152
|
i0.ɵɵngDeclareClassMetadata({
|
|
1162
1153
|
minVersion: "12.0.0",
|
|
1163
|
-
version: "21.0.
|
|
1154
|
+
version: "21.0.3",
|
|
1164
1155
|
ngImport: i0,
|
|
1165
1156
|
type: MatTimepickerToggle,
|
|
1166
1157
|
decorators: [{
|
|
@@ -1234,7 +1225,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1234
1225
|
class MatTimepickerModule {
|
|
1235
1226
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1236
1227
|
minVersion: "12.0.0",
|
|
1237
|
-
version: "21.0.
|
|
1228
|
+
version: "21.0.3",
|
|
1238
1229
|
ngImport: i0,
|
|
1239
1230
|
type: MatTimepickerModule,
|
|
1240
1231
|
deps: [],
|
|
@@ -1242,7 +1233,7 @@ class MatTimepickerModule {
|
|
|
1242
1233
|
});
|
|
1243
1234
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1244
1235
|
minVersion: "14.0.0",
|
|
1245
|
-
version: "21.0.
|
|
1236
|
+
version: "21.0.3",
|
|
1246
1237
|
ngImport: i0,
|
|
1247
1238
|
type: MatTimepickerModule,
|
|
1248
1239
|
imports: [MatTimepicker, MatTimepickerInput, MatTimepickerToggle],
|
|
@@ -1250,7 +1241,7 @@ class MatTimepickerModule {
|
|
|
1250
1241
|
});
|
|
1251
1242
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
1252
1243
|
minVersion: "12.0.0",
|
|
1253
|
-
version: "21.0.
|
|
1244
|
+
version: "21.0.3",
|
|
1254
1245
|
ngImport: i0,
|
|
1255
1246
|
type: MatTimepickerModule,
|
|
1256
1247
|
imports: [MatTimepicker, MatTimepickerToggle, CdkScrollableModule]
|
|
@@ -1258,7 +1249,7 @@ class MatTimepickerModule {
|
|
|
1258
1249
|
}
|
|
1259
1250
|
i0.ɵɵngDeclareClassMetadata({
|
|
1260
1251
|
minVersion: "12.0.0",
|
|
1261
|
-
version: "21.0.
|
|
1252
|
+
version: "21.0.3",
|
|
1262
1253
|
ngImport: i0,
|
|
1263
1254
|
type: MatTimepickerModule,
|
|
1264
1255
|
decorators: [{
|