@angular/material 16.1.0-rc.0 → 16.1.1
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/autocomplete/_autocomplete-theme.scss +8 -19
- package/autocomplete/index.d.ts +6 -6
- package/badge/index.d.ts +1 -1
- package/bottom-sheet/index.d.ts +1 -1
- package/button/index.d.ts +10 -10
- package/button-toggle/index.d.ts +2 -2
- package/card/index.d.ts +14 -14
- package/checkbox/index.d.ts +3 -3
- package/chips/index.d.ts +12 -12
- package/core/index.d.ts +7 -7
- package/core/tokens/m2/mat/_autocomplete.scss +43 -0
- package/datepicker/index.d.ts +21 -21
- package/dialog/index.d.ts +6 -6
- package/divider/index.d.ts +1 -1
- package/esm2022/autocomplete/autocomplete-origin.mjs +7 -7
- package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -7
- package/esm2022/autocomplete/autocomplete.mjs +8 -8
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +7 -7
- package/esm2022/button/button-lazy-loader.mjs +4 -4
- package/esm2022/button/button.mjs +7 -7
- package/esm2022/button/fab.mjs +13 -13
- package/esm2022/button/icon-button.mjs +7 -7
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +7 -7
- package/esm2022/card/card.mjs +43 -43
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +7 -7
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +4 -4
- package/esm2022/chips/chip-row.mjs +4 -4
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +4 -4
- package/esm2022/chips/module.mjs +5 -5
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +5 -5
- package/esm2022/core/option/optgroup.mjs +7 -7
- package/esm2022/core/option/option.mjs +7 -7
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +4 -4
- package/esm2022/datepicker/calendar.mjs +7 -7
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +4 -4
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +7 -7
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +4 -4
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +7 -7
- package/esm2022/dialog/dialog-content-directives.mjs +13 -13
- package/esm2022/dialog/dialog.mjs +7 -7
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +4 -4
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +5 -5
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +10 -10
- package/esm2022/expansion/expansion-panel.mjs +7 -7
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +4 -4
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +4 -4
- package/esm2022/grid-list/grid-tile.mjs +16 -16
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +5 -5
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +4 -4
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/legacy-autocomplete/autocomplete-module.mjs +5 -5
- package/esm2022/legacy-autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/legacy-autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/legacy-autocomplete/autocomplete.mjs +4 -4
- package/esm2022/legacy-button/button-module.mjs +5 -5
- package/esm2022/legacy-button/button.mjs +7 -7
- package/esm2022/legacy-card/card-module.mjs +5 -5
- package/esm2022/legacy-card/card.mjs +43 -43
- package/esm2022/legacy-checkbox/checkbox-module.mjs +5 -5
- package/esm2022/legacy-checkbox/checkbox.mjs +4 -4
- package/esm2022/legacy-chips/chip-input.mjs +4 -4
- package/esm2022/legacy-chips/chip-list.mjs +4 -4
- package/esm2022/legacy-chips/chip.mjs +13 -13
- package/esm2022/legacy-chips/chips-module.mjs +5 -5
- package/esm2022/legacy-core/option/index.mjs +5 -5
- package/esm2022/legacy-core/option/optgroup.mjs +4 -4
- package/esm2022/legacy-core/option/option.mjs +4 -4
- package/esm2022/legacy-dialog/dialog-container.mjs +4 -4
- package/esm2022/legacy-dialog/dialog-content-directives.mjs +13 -13
- package/esm2022/legacy-dialog/dialog-module.mjs +5 -5
- package/esm2022/legacy-dialog/dialog.mjs +4 -4
- package/esm2022/legacy-form-field/error.mjs +4 -4
- package/esm2022/legacy-form-field/form-field-module.mjs +5 -5
- package/esm2022/legacy-form-field/form-field.mjs +4 -4
- package/esm2022/legacy-form-field/hint.mjs +4 -4
- package/esm2022/legacy-form-field/label.mjs +4 -4
- package/esm2022/legacy-form-field/placeholder.mjs +4 -4
- package/esm2022/legacy-form-field/prefix.mjs +4 -4
- package/esm2022/legacy-form-field/suffix.mjs +4 -4
- package/esm2022/legacy-input/input-module.mjs +5 -5
- package/esm2022/legacy-input/input.mjs +4 -4
- package/esm2022/legacy-list/list-module.mjs +5 -5
- package/esm2022/legacy-list/list.mjs +19 -19
- package/esm2022/legacy-list/selection-list.mjs +7 -7
- package/esm2022/legacy-menu/menu-content.mjs +4 -4
- package/esm2022/legacy-menu/menu-item.mjs +4 -4
- package/esm2022/legacy-menu/menu-module.mjs +5 -5
- package/esm2022/legacy-menu/menu-trigger.mjs +4 -4
- package/esm2022/legacy-menu/menu.mjs +4 -4
- package/esm2022/legacy-paginator/paginator-module.mjs +5 -5
- package/esm2022/legacy-paginator/paginator.mjs +4 -4
- package/esm2022/legacy-progress-bar/progress-bar-module.mjs +5 -5
- package/esm2022/legacy-progress-bar/progress-bar.mjs +4 -4
- package/esm2022/legacy-progress-spinner/progress-spinner-module.mjs +5 -5
- package/esm2022/legacy-progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/legacy-radio/radio-module.mjs +5 -5
- package/esm2022/legacy-radio/radio.mjs +7 -7
- package/esm2022/legacy-select/select-module.mjs +5 -5
- package/esm2022/legacy-select/select.mjs +7 -7
- package/esm2022/legacy-slide-toggle/slide-toggle-module.mjs +5 -5
- package/esm2022/legacy-slide-toggle/slide-toggle.mjs +4 -4
- package/esm2022/legacy-slider/slider-module.mjs +5 -5
- package/esm2022/legacy-slider/slider.mjs +4 -4
- package/esm2022/legacy-snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/legacy-snack-bar/snack-bar-container.mjs +4 -4
- package/esm2022/legacy-snack-bar/snack-bar-module.mjs +5 -5
- package/esm2022/legacy-snack-bar/snack-bar.mjs +4 -4
- package/esm2022/legacy-table/cell.mjs +22 -22
- package/esm2022/legacy-table/row.mjs +22 -22
- package/esm2022/legacy-table/table-module.mjs +5 -5
- package/esm2022/legacy-table/table.mjs +7 -7
- package/esm2022/legacy-table/text-column.mjs +4 -4
- package/esm2022/legacy-tabs/ink-bar.mjs +4 -4
- package/esm2022/legacy-tabs/tab-body.mjs +7 -7
- package/esm2022/legacy-tabs/tab-content.mjs +4 -4
- package/esm2022/legacy-tabs/tab-group.mjs +4 -4
- package/esm2022/legacy-tabs/tab-header.mjs +4 -4
- package/esm2022/legacy-tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/legacy-tabs/tab-label.mjs +4 -4
- package/esm2022/legacy-tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
- package/esm2022/legacy-tabs/tab.mjs +4 -4
- package/esm2022/legacy-tabs/tabs-module.mjs +5 -5
- package/esm2022/legacy-tooltip/tooltip-module.mjs +5 -5
- package/esm2022/legacy-tooltip/tooltip.mjs +7 -7
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +4 -4
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +4 -4
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/menu/menu-content.mjs +7 -7
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +7 -7
- package/esm2022/menu/menu.mjs +7 -7
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +5 -5
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +7 -7
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +13 -13
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +23 -10
- package/esm2022/sidenav/drawer.mjs +10 -10
- package/esm2022/sidenav/sidenav-module.mjs +5 -5
- package/esm2022/sidenav/sidenav.mjs +10 -10
- package/esm2022/slide-toggle/module.mjs +9 -9
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +7 -7
- package/esm2022/slider/module.mjs +5 -5
- package/esm2022/slider/slider-input.mjs +8 -7
- package/esm2022/slider/slider-interface.mjs +1 -1
- package/esm2022/slider/slider-thumb.mjs +4 -4
- package/esm2022/slider/slider.mjs +4 -4
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-container.mjs +7 -7
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +7 -7
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +4 -4
- package/esm2022/sort/sort-module.mjs +5 -5
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +4 -4
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +7 -7
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +7 -7
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.mjs +10 -10
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +7 -7
- package/esm2022/tabs/tab-header.mjs +7 -7
- package/esm2022/tabs/tab-label-wrapper.mjs +7 -7
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +21 -18
- package/esm2022/tabs/tab.mjs +7 -7
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +7 -7
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +13 -13
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +4 -4
- package/expansion/index.d.ts +7 -7
- package/fesm2022/autocomplete.mjs +23 -23
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +7 -7
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +37 -37
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +17 -17
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +40 -40
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +59 -59
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +82 -82
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +28 -28
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +34 -34
- package/fesm2022/form-field.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 +11 -11
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/legacy-autocomplete.mjs +13 -13
- package/fesm2022/legacy-autocomplete.mjs.map +1 -1
- package/fesm2022/legacy-button.mjs +10 -10
- package/fesm2022/legacy-button.mjs.map +1 -1
- package/fesm2022/legacy-card.mjs +46 -46
- package/fesm2022/legacy-card.mjs.map +1 -1
- package/fesm2022/legacy-checkbox.mjs +7 -7
- package/fesm2022/legacy-checkbox.mjs.map +1 -1
- package/fesm2022/legacy-chips.mjs +22 -22
- package/fesm2022/legacy-chips.mjs.map +1 -1
- package/fesm2022/legacy-core.mjs +10 -10
- package/fesm2022/legacy-core.mjs.map +1 -1
- package/fesm2022/legacy-dialog.mjs +22 -22
- package/fesm2022/legacy-dialog.mjs.map +1 -1
- package/fesm2022/legacy-form-field.mjs +25 -25
- package/fesm2022/legacy-form-field.mjs.map +1 -1
- package/fesm2022/legacy-input.mjs +7 -7
- package/fesm2022/legacy-input.mjs.map +1 -1
- package/fesm2022/legacy-list.mjs +28 -28
- package/fesm2022/legacy-list.mjs.map +1 -1
- package/fesm2022/legacy-menu.mjs +16 -16
- package/fesm2022/legacy-menu.mjs.map +1 -1
- package/fesm2022/legacy-paginator.mjs +7 -7
- package/fesm2022/legacy-paginator.mjs.map +1 -1
- package/fesm2022/legacy-progress-bar.mjs +7 -7
- package/fesm2022/legacy-progress-bar.mjs.map +1 -1
- package/fesm2022/legacy-progress-spinner.mjs +7 -7
- package/fesm2022/legacy-progress-spinner.mjs.map +1 -1
- package/fesm2022/legacy-radio.mjs +10 -10
- package/fesm2022/legacy-radio.mjs.map +1 -1
- package/fesm2022/legacy-select.mjs +10 -10
- package/fesm2022/legacy-select.mjs.map +1 -1
- package/fesm2022/legacy-slide-toggle.mjs +7 -7
- package/fesm2022/legacy-slide-toggle.mjs.map +1 -1
- package/fesm2022/legacy-slider.mjs +7 -7
- package/fesm2022/legacy-slider.mjs.map +1 -1
- package/fesm2022/legacy-snack-bar.mjs +13 -13
- package/fesm2022/legacy-snack-bar.mjs.map +1 -1
- package/fesm2022/legacy-table.mjs +55 -55
- package/fesm2022/legacy-table.mjs.map +1 -1
- package/fesm2022/legacy-tabs.mjs +40 -40
- package/fesm2022/legacy-tabs.mjs.map +1 -1
- package/fesm2022/legacy-tooltip.mjs +10 -10
- package/fesm2022/legacy-tooltip.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +25 -25
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +13 -13
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +16 -16
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +26 -13
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +17 -17
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +17 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +28 -28
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +65 -62
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +16 -16
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.import.scss +1 -1
- package/form-field/index.d.ts +10 -10
- package/grid-list/index.d.ts +6 -6
- package/icon/index.d.ts +2 -2
- package/input/index.d.ts +1 -1
- package/legacy-autocomplete/index.d.ts +3 -3
- package/legacy-button/index.d.ts +2 -2
- package/legacy-card/index.d.ts +14 -14
- package/legacy-checkbox/index.d.ts +1 -1
- package/legacy-chips/index.d.ts +6 -6
- package/legacy-core/index.d.ts +2 -2
- package/legacy-dialog/index.d.ts +5 -5
- package/legacy-form-field/index.d.ts +7 -7
- package/legacy-input/index.d.ts +1 -1
- package/legacy-list/index.d.ts +8 -8
- package/legacy-menu/index.d.ts +4 -4
- package/legacy-paginator/index.d.ts +1 -1
- package/legacy-progress-bar/index.d.ts +1 -1
- package/legacy-progress-spinner/index.d.ts +1 -1
- package/legacy-radio/index.d.ts +2 -2
- package/legacy-select/index.d.ts +2 -2
- package/legacy-slide-toggle/index.d.ts +1 -1
- package/legacy-slider/index.d.ts +1 -1
- package/legacy-snack-bar/index.d.ts +2 -2
- package/legacy-table/index.d.ts +17 -17
- package/legacy-tabs/index.d.ts +12 -12
- package/legacy-tooltip/index.d.ts +2 -2
- package/list/index.d.ts +15 -15
- package/menu/index.d.ts +7 -7
- package/package.json +7 -7
- package/paginator/index.d.ts +2 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/index.d.ts +1 -1
- package/progress-spinner/index.d.ts +1 -1
- package/radio/index.d.ts +4 -4
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/mdc-migration/index_bundled.js +691 -148
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/select/index.d.ts +3 -3
- package/sidenav/index.d.ts +6 -6
- package/slide-toggle/index.d.ts +3 -3
- package/slider/index.d.ts +5 -4
- package/snack-bar/index.d.ts +6 -6
- package/sort/index.d.ts +2 -2
- package/stepper/index.d.ts +8 -8
- package/table/index.d.ts +17 -17
- package/tabs/index.d.ts +19 -19
- package/toolbar/index.d.ts +2 -2
- package/tooltip/index.d.ts +4 -4
- package/tree/index.d.ts +7 -7
|
@@ -5727,7 +5727,7 @@ var require_fromJSON = __commonJS({
|
|
|
5727
5727
|
defaults.nodes = json.nodes.map((n) => fromJSON2(n, inputs));
|
|
5728
5728
|
}
|
|
5729
5729
|
if (defaults.source) {
|
|
5730
|
-
let
|
|
5730
|
+
let _b2 = defaults.source, { inputId } = _b2, source = __objRest(_b2, ["inputId"]);
|
|
5731
5731
|
defaults.source = source;
|
|
5732
5732
|
if (inputId != null) {
|
|
5733
5733
|
defaults.source.input = inputs[inputId];
|
|
@@ -6421,7 +6421,7 @@ var StyleMigrator = class {
|
|
|
6421
6421
|
return this.mixinChanges.some((change) => atRule2.params.includes(`${namespace}.${change.old}`));
|
|
6422
6422
|
}
|
|
6423
6423
|
getMixinChange(namespace, atRule2) {
|
|
6424
|
-
var _a2,
|
|
6424
|
+
var _a2, _b2;
|
|
6425
6425
|
const processedKey = `mixinChange-${namespace}`;
|
|
6426
6426
|
if (this._nodeIsProcessed(atRule2, processedKey)) {
|
|
6427
6427
|
return null;
|
|
@@ -6434,7 +6434,7 @@ var StyleMigrator = class {
|
|
|
6434
6434
|
}
|
|
6435
6435
|
const replacements = [...(_a2 = change.new) != null ? _a2 : []];
|
|
6436
6436
|
if (change.checkForDuplicates) {
|
|
6437
|
-
const mixinArgumentMatches = (
|
|
6437
|
+
const mixinArgumentMatches = (_b2 = atRule2.params) == null ? void 0 : _b2.match(MIXIN_ARGUMENTS_REGEX);
|
|
6438
6438
|
atRule2.root().walkAtRules((rule2) => {
|
|
6439
6439
|
for (const index2 in replacements) {
|
|
6440
6440
|
const mixinName = replacements[index2] + (mixinArgumentMatches ? mixinArgumentMatches[0] : "");
|
|
@@ -7518,12 +7518,12 @@ var LocalizedString = class extends Expression {
|
|
|
7518
7518
|
return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));
|
|
7519
7519
|
}
|
|
7520
7520
|
getMessagePartSourceSpan(i) {
|
|
7521
|
-
var _a2,
|
|
7522
|
-
return (
|
|
7521
|
+
var _a2, _b2;
|
|
7522
|
+
return (_b2 = (_a2 = this.messageParts[i]) == null ? void 0 : _a2.sourceSpan) != null ? _b2 : this.sourceSpan;
|
|
7523
7523
|
}
|
|
7524
7524
|
getPlaceholderSourceSpan(i) {
|
|
7525
|
-
var _a2,
|
|
7526
|
-
return (
|
|
7525
|
+
var _a2, _b2, _c2, _d2;
|
|
7526
|
+
return (_d2 = (_c2 = (_a2 = this.placeHolderNames[i]) == null ? void 0 : _a2.sourceSpan) != null ? _c2 : (_b2 = this.expressions[i]) == null ? void 0 : _b2.sourceSpan) != null ? _d2 : this.sourceSpan;
|
|
7527
7527
|
}
|
|
7528
7528
|
serializeI18nTemplatePart(partIndex) {
|
|
7529
7529
|
var _a2;
|
|
@@ -8126,13 +8126,14 @@ var ConstantPool = class {
|
|
|
8126
8126
|
this.statements = [];
|
|
8127
8127
|
this.literals = /* @__PURE__ */ new Map();
|
|
8128
8128
|
this.literalFactories = /* @__PURE__ */ new Map();
|
|
8129
|
+
this.sharedConstants = /* @__PURE__ */ new Map();
|
|
8129
8130
|
this.nextNameIndex = 0;
|
|
8130
8131
|
}
|
|
8131
8132
|
getConstLiteral(literal2, forceShared) {
|
|
8132
8133
|
if (literal2 instanceof LiteralExpr && !isLongStringLiteral(literal2) || literal2 instanceof FixupExpression) {
|
|
8133
8134
|
return literal2;
|
|
8134
8135
|
}
|
|
8135
|
-
const key =
|
|
8136
|
+
const key = GenericKeyFn.INSTANCE.keyOf(literal2);
|
|
8136
8137
|
let fixup = this.literals.get(key);
|
|
8137
8138
|
let newValue = false;
|
|
8138
8139
|
if (!fixup) {
|
|
@@ -8161,10 +8162,19 @@ var ConstantPool = class {
|
|
|
8161
8162
|
}
|
|
8162
8163
|
return fixup;
|
|
8163
8164
|
}
|
|
8165
|
+
getSharedConstant(def, expr) {
|
|
8166
|
+
const key = def.keyOf(expr);
|
|
8167
|
+
if (!this.sharedConstants.has(key)) {
|
|
8168
|
+
const id = this.freshName();
|
|
8169
|
+
this.sharedConstants.set(key, variable(id));
|
|
8170
|
+
this.statements.push(def.toSharedConstantDeclaration(id, expr));
|
|
8171
|
+
}
|
|
8172
|
+
return this.sharedConstants.get(key);
|
|
8173
|
+
}
|
|
8164
8174
|
getLiteralFactory(literal2) {
|
|
8165
8175
|
if (literal2 instanceof LiteralArrayExpr) {
|
|
8166
8176
|
const argumentsForKey = literal2.entries.map((e) => e.isConstant() ? e : UNKNOWN_VALUE_KEY);
|
|
8167
|
-
const key =
|
|
8177
|
+
const key = GenericKeyFn.INSTANCE.keyOf(literalArr(argumentsForKey));
|
|
8168
8178
|
return this._getLiteralFactory(key, literal2.entries, (entries) => literalArr(entries));
|
|
8169
8179
|
} else {
|
|
8170
8180
|
const expressionForKey = literalMap(literal2.entries.map((e) => ({
|
|
@@ -8172,7 +8182,7 @@ var ConstantPool = class {
|
|
|
8172
8182
|
value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,
|
|
8173
8183
|
quoted: e.quoted
|
|
8174
8184
|
})));
|
|
8175
|
-
const key =
|
|
8185
|
+
const key = GenericKeyFn.INSTANCE.keyOf(expressionForKey);
|
|
8176
8186
|
return this._getLiteralFactory(key, literal2.entries.map((e) => e.value), (entries) => literalMap(entries.map((value, index2) => ({
|
|
8177
8187
|
key: literal2.entries[index2].key,
|
|
8178
8188
|
value,
|
|
@@ -8200,58 +8210,44 @@ var ConstantPool = class {
|
|
|
8200
8210
|
freshName() {
|
|
8201
8211
|
return this.uniqueName(CONSTANT_PREFIX);
|
|
8202
8212
|
}
|
|
8203
|
-
keyOf(expression) {
|
|
8204
|
-
return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);
|
|
8205
|
-
}
|
|
8206
8213
|
};
|
|
8207
|
-
var
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
};
|
|
8239
|
-
const mapEntry = (entry) => `${mapKey(entry)}:${entry.value.visitExpression(this, context)}`;
|
|
8240
|
-
return `{${ast.entries.map(mapEntry).join(",")}`;
|
|
8241
|
-
}
|
|
8242
|
-
visitExternalExpr(ast) {
|
|
8243
|
-
return ast.value.moduleName ? `EX:${ast.value.moduleName}:${ast.value.name}` : `EX:${ast.value.runtime.name}`;
|
|
8244
|
-
}
|
|
8245
|
-
visitReadVarExpr(node) {
|
|
8246
|
-
return `VAR:${node.name}`;
|
|
8247
|
-
}
|
|
8248
|
-
visitTypeofExpr(node, context) {
|
|
8249
|
-
return `TYPEOF:${node.expr.visitExpression(this, context)}`;
|
|
8214
|
+
var _GenericKeyFn = class {
|
|
8215
|
+
keyOf(expr) {
|
|
8216
|
+
if (expr instanceof LiteralExpr && typeof expr.value === "string") {
|
|
8217
|
+
return `"${expr.value}"`;
|
|
8218
|
+
} else if (expr instanceof LiteralExpr) {
|
|
8219
|
+
return String(expr.value);
|
|
8220
|
+
} else if (expr instanceof LiteralArrayExpr) {
|
|
8221
|
+
const entries = [];
|
|
8222
|
+
for (const entry of expr.entries) {
|
|
8223
|
+
entries.push(this.keyOf(entry));
|
|
8224
|
+
}
|
|
8225
|
+
return `[${entries.join(",")}]`;
|
|
8226
|
+
} else if (expr instanceof LiteralMapExpr) {
|
|
8227
|
+
const entries = [];
|
|
8228
|
+
for (const entry of expr.entries) {
|
|
8229
|
+
let key = entry.key;
|
|
8230
|
+
if (entry.quoted) {
|
|
8231
|
+
key = `"${key}"`;
|
|
8232
|
+
}
|
|
8233
|
+
entries.push(key + ":" + this.keyOf(entry.value));
|
|
8234
|
+
}
|
|
8235
|
+
return `{${entries.join(",")}}`;
|
|
8236
|
+
} else if (expr instanceof ExternalExpr) {
|
|
8237
|
+
return `import("${expr.value.moduleName}", ${expr.value.name})`;
|
|
8238
|
+
} else if (expr instanceof ReadVarExpr) {
|
|
8239
|
+
return `read(${expr.name})`;
|
|
8240
|
+
} else if (expr instanceof TypeofExpr) {
|
|
8241
|
+
return `typeof(${this.keyOf(expr.expr)})`;
|
|
8242
|
+
} else {
|
|
8243
|
+
throw new Error(`${this.constructor.name} does not handle expressions of type ${expr.constructor.name}`);
|
|
8244
|
+
}
|
|
8250
8245
|
}
|
|
8251
8246
|
};
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8247
|
+
var GenericKeyFn = _GenericKeyFn;
|
|
8248
|
+
(() => {
|
|
8249
|
+
_GenericKeyFn.INSTANCE = new _GenericKeyFn();
|
|
8250
|
+
})();
|
|
8255
8251
|
function isVariable(e) {
|
|
8256
8252
|
return e instanceof ReadVarExpr;
|
|
8257
8253
|
}
|
|
@@ -12405,11 +12401,21 @@ var ShadowCss = class {
|
|
|
12405
12401
|
this._animationDeclarationKeyframesRe = /(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
12406
12402
|
}
|
|
12407
12403
|
shimCssText(cssText, selector, hostSelector = "") {
|
|
12408
|
-
const
|
|
12409
|
-
cssText =
|
|
12404
|
+
const comments = [];
|
|
12405
|
+
cssText = cssText.replace(_commentRe, (m) => {
|
|
12406
|
+
var _a2;
|
|
12407
|
+
if (m.match(_commentWithHashRe)) {
|
|
12408
|
+
comments.push(m);
|
|
12409
|
+
} else {
|
|
12410
|
+
const newLinesMatches = m.match(_newLinesRe);
|
|
12411
|
+
comments.push(((_a2 = newLinesMatches == null ? void 0 : newLinesMatches.join("")) != null ? _a2 : "") + "\n");
|
|
12412
|
+
}
|
|
12413
|
+
return COMMENT_PLACEHOLDER;
|
|
12414
|
+
});
|
|
12410
12415
|
cssText = this._insertDirectives(cssText);
|
|
12411
12416
|
const scopedCssText = this._scopeCssText(cssText, selector, hostSelector);
|
|
12412
|
-
|
|
12417
|
+
let commentIdx = 0;
|
|
12418
|
+
return scopedCssText.replace(_commentWithHashPlaceHolderRe, () => comments[commentIdx++]);
|
|
12413
12419
|
}
|
|
12414
12420
|
_insertDirectives(cssText) {
|
|
12415
12421
|
cssText = this._insertPolyfillDirectivesInCssText(cssText);
|
|
@@ -12674,17 +12680,14 @@ var _selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$";
|
|
|
12674
12680
|
var _polyfillHostRe = /-shadowcsshost/gim;
|
|
12675
12681
|
var _colonHostRe = /:host/gim;
|
|
12676
12682
|
var _colonHostContextRe = /:host-context/gim;
|
|
12683
|
+
var _newLinesRe = /\r?\n/g;
|
|
12677
12684
|
var _commentRe = /\/\*[\s\S]*?\*\//g;
|
|
12685
|
+
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=/g;
|
|
12686
|
+
var COMMENT_PLACEHOLDER = "%COMMENT%";
|
|
12687
|
+
var _commentWithHashPlaceHolderRe = new RegExp(COMMENT_PLACEHOLDER, "g");
|
|
12678
12688
|
var _placeholderRe = /__ph-(\d+)__/g;
|
|
12679
|
-
function stripComments(input) {
|
|
12680
|
-
return input.replace(_commentRe, "");
|
|
12681
|
-
}
|
|
12682
|
-
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
|
12683
|
-
function extractCommentsWithHash(input) {
|
|
12684
|
-
return input.match(_commentWithHashRe) || [];
|
|
12685
|
-
}
|
|
12686
12689
|
var BLOCK_PLACEHOLDER = "%BLOCK%";
|
|
12687
|
-
var _ruleRe =
|
|
12690
|
+
var _ruleRe = new RegExp(`(\\s*(?:${COMMENT_PLACEHOLDER}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g");
|
|
12688
12691
|
var CONTENT_PAIRS = /* @__PURE__ */ new Map([["{", "}"]]);
|
|
12689
12692
|
var COMMA_IN_PLACEHOLDER = "%COMMA_IN_PLACEHOLDER%";
|
|
12690
12693
|
var SEMI_IN_PLACEHOLDER = "%SEMI_IN_PLACEHOLDER%";
|
|
@@ -12951,7 +12954,9 @@ var OpKind;
|
|
|
12951
12954
|
OpKind2[OpKind2["Listener"] = 11] = "Listener";
|
|
12952
12955
|
OpKind2[OpKind2["InterpolateText"] = 12] = "InterpolateText";
|
|
12953
12956
|
OpKind2[OpKind2["Property"] = 13] = "Property";
|
|
12954
|
-
OpKind2[OpKind2["
|
|
12957
|
+
OpKind2[OpKind2["InterpolateProperty"] = 14] = "InterpolateProperty";
|
|
12958
|
+
OpKind2[OpKind2["Advance"] = 15] = "Advance";
|
|
12959
|
+
OpKind2[OpKind2["Pipe"] = 16] = "Pipe";
|
|
12955
12960
|
})(OpKind || (OpKind = {}));
|
|
12956
12961
|
var ExpressionKind;
|
|
12957
12962
|
(function(ExpressionKind2) {
|
|
@@ -12963,6 +12968,10 @@ var ExpressionKind;
|
|
|
12963
12968
|
ExpressionKind2[ExpressionKind2["GetCurrentView"] = 5] = "GetCurrentView";
|
|
12964
12969
|
ExpressionKind2[ExpressionKind2["RestoreView"] = 6] = "RestoreView";
|
|
12965
12970
|
ExpressionKind2[ExpressionKind2["ResetView"] = 7] = "ResetView";
|
|
12971
|
+
ExpressionKind2[ExpressionKind2["PureFunctionExpr"] = 8] = "PureFunctionExpr";
|
|
12972
|
+
ExpressionKind2[ExpressionKind2["PureFunctionParameterExpr"] = 9] = "PureFunctionParameterExpr";
|
|
12973
|
+
ExpressionKind2[ExpressionKind2["PipeBinding"] = 10] = "PipeBinding";
|
|
12974
|
+
ExpressionKind2[ExpressionKind2["PipeBindingVariadic"] = 11] = "PipeBindingVariadic";
|
|
12966
12975
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
12967
12976
|
var SemanticVariableKind;
|
|
12968
12977
|
(function(SemanticVariableKind2) {
|
|
@@ -12973,7 +12982,8 @@ var SemanticVariableKind;
|
|
|
12973
12982
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
12974
12983
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
12975
12984
|
var UsesSlotIndex = Symbol("UsesSlotIndex");
|
|
12976
|
-
var ConsumesVarsTrait = Symbol("
|
|
12985
|
+
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
12986
|
+
var UsesVarOffset = Symbol("UsesVarOffset");
|
|
12977
12987
|
var TRAIT_CONSUMES_SLOT = {
|
|
12978
12988
|
[ConsumesSlot]: true,
|
|
12979
12989
|
slot: null,
|
|
@@ -12989,6 +12999,10 @@ var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
|
|
|
12989
12999
|
var TRAIT_CONSUMES_VARS = {
|
|
12990
13000
|
[ConsumesVarsTrait]: true
|
|
12991
13001
|
};
|
|
13002
|
+
var TRAIT_USES_VAR_OFFSET = {
|
|
13003
|
+
[UsesVarOffset]: true,
|
|
13004
|
+
varOffset: null
|
|
13005
|
+
};
|
|
12992
13006
|
function hasConsumesSlotTrait(op) {
|
|
12993
13007
|
return op[ConsumesSlot] === true;
|
|
12994
13008
|
}
|
|
@@ -12998,10 +13012,24 @@ function hasDependsOnSlotContextTrait(op) {
|
|
|
12998
13012
|
function hasConsumesVarsTrait(value) {
|
|
12999
13013
|
return value[ConsumesVarsTrait] === true;
|
|
13000
13014
|
}
|
|
13015
|
+
function hasUsesVarOffsetTrait(expr) {
|
|
13016
|
+
return expr[UsesVarOffset] === true;
|
|
13017
|
+
}
|
|
13001
13018
|
function hasUsesSlotIndexTrait(value) {
|
|
13002
13019
|
return value[UsesSlotIndex] === true;
|
|
13003
13020
|
}
|
|
13004
13021
|
var _a;
|
|
13022
|
+
var _b;
|
|
13023
|
+
var _c;
|
|
13024
|
+
var _d;
|
|
13025
|
+
var _e;
|
|
13026
|
+
var _f;
|
|
13027
|
+
var _g;
|
|
13028
|
+
var _h;
|
|
13029
|
+
var _j;
|
|
13030
|
+
function isIrExpression(expr) {
|
|
13031
|
+
return expr instanceof ExpressionBase;
|
|
13032
|
+
}
|
|
13005
13033
|
var ExpressionBase = class extends Expression {
|
|
13006
13034
|
constructor(sourceSpan = null) {
|
|
13007
13035
|
super(null, sourceSpan);
|
|
@@ -13165,6 +13193,128 @@ var ReadVariableExpr = class extends ExpressionBase {
|
|
|
13165
13193
|
transformInternalExpressions() {
|
|
13166
13194
|
}
|
|
13167
13195
|
};
|
|
13196
|
+
var _PureFunctionExpr = class extends ExpressionBase {
|
|
13197
|
+
constructor(expression, args) {
|
|
13198
|
+
super();
|
|
13199
|
+
this.kind = ExpressionKind.PureFunctionExpr;
|
|
13200
|
+
this[_b] = true;
|
|
13201
|
+
this[_c] = true;
|
|
13202
|
+
this.varOffset = null;
|
|
13203
|
+
this.fn = null;
|
|
13204
|
+
this.body = expression;
|
|
13205
|
+
this.args = args;
|
|
13206
|
+
}
|
|
13207
|
+
visitExpression(visitor, context) {
|
|
13208
|
+
var _a2;
|
|
13209
|
+
(_a2 = this.body) == null ? void 0 : _a2.visitExpression(visitor, context);
|
|
13210
|
+
for (const arg of this.args) {
|
|
13211
|
+
arg.visitExpression(visitor, context);
|
|
13212
|
+
}
|
|
13213
|
+
}
|
|
13214
|
+
isEquivalent(other) {
|
|
13215
|
+
if (!(other instanceof _PureFunctionExpr) || other.args.length !== this.args.length) {
|
|
13216
|
+
return false;
|
|
13217
|
+
}
|
|
13218
|
+
return other.body !== null && this.body !== null && other.body.isEquivalent(this.body) && other.args.every((arg, idx) => arg.isEquivalent(this.args[idx]));
|
|
13219
|
+
}
|
|
13220
|
+
isConstant() {
|
|
13221
|
+
return false;
|
|
13222
|
+
}
|
|
13223
|
+
transformInternalExpressions(transform, flags) {
|
|
13224
|
+
if (this.body !== null) {
|
|
13225
|
+
this.body = transformExpressionsInExpression(this.body, transform, flags | VisitorContextFlag.InChildOperation);
|
|
13226
|
+
} else if (this.fn !== null) {
|
|
13227
|
+
this.fn = transformExpressionsInExpression(this.fn, transform, flags);
|
|
13228
|
+
}
|
|
13229
|
+
for (let i = 0; i < this.args.length; i++) {
|
|
13230
|
+
this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags);
|
|
13231
|
+
}
|
|
13232
|
+
}
|
|
13233
|
+
};
|
|
13234
|
+
var PureFunctionExpr = _PureFunctionExpr;
|
|
13235
|
+
(() => {
|
|
13236
|
+
_b = ConsumesVarsTrait, _c = UsesVarOffset;
|
|
13237
|
+
})();
|
|
13238
|
+
var PureFunctionParameterExpr = class extends ExpressionBase {
|
|
13239
|
+
constructor(index2) {
|
|
13240
|
+
super();
|
|
13241
|
+
this.index = index2;
|
|
13242
|
+
this.kind = ExpressionKind.PureFunctionParameterExpr;
|
|
13243
|
+
}
|
|
13244
|
+
visitExpression() {
|
|
13245
|
+
}
|
|
13246
|
+
isEquivalent(other) {
|
|
13247
|
+
return other instanceof PureFunctionParameterExpr && other.index === this.index;
|
|
13248
|
+
}
|
|
13249
|
+
isConstant() {
|
|
13250
|
+
return true;
|
|
13251
|
+
}
|
|
13252
|
+
transformInternalExpressions() {
|
|
13253
|
+
}
|
|
13254
|
+
};
|
|
13255
|
+
var PipeBindingExpr = class extends ExpressionBase {
|
|
13256
|
+
constructor(target, name, args) {
|
|
13257
|
+
super();
|
|
13258
|
+
this.target = target;
|
|
13259
|
+
this.name = name;
|
|
13260
|
+
this.args = args;
|
|
13261
|
+
this.kind = ExpressionKind.PipeBinding;
|
|
13262
|
+
this[_d] = true;
|
|
13263
|
+
this[_e] = true;
|
|
13264
|
+
this[_f] = true;
|
|
13265
|
+
this.slot = null;
|
|
13266
|
+
this.varOffset = null;
|
|
13267
|
+
}
|
|
13268
|
+
visitExpression(visitor, context) {
|
|
13269
|
+
for (const arg of this.args) {
|
|
13270
|
+
arg.visitExpression(visitor, context);
|
|
13271
|
+
}
|
|
13272
|
+
}
|
|
13273
|
+
isEquivalent() {
|
|
13274
|
+
return false;
|
|
13275
|
+
}
|
|
13276
|
+
isConstant() {
|
|
13277
|
+
return false;
|
|
13278
|
+
}
|
|
13279
|
+
transformInternalExpressions(transform, flags) {
|
|
13280
|
+
for (let idx = 0; idx < this.args.length; idx++) {
|
|
13281
|
+
this.args[idx] = transformExpressionsInExpression(this.args[idx], transform, flags);
|
|
13282
|
+
}
|
|
13283
|
+
}
|
|
13284
|
+
};
|
|
13285
|
+
(() => {
|
|
13286
|
+
_d = UsesSlotIndex, _e = ConsumesVarsTrait, _f = UsesVarOffset;
|
|
13287
|
+
})();
|
|
13288
|
+
var PipeBindingVariadicExpr = class extends ExpressionBase {
|
|
13289
|
+
constructor(target, name, args, numArgs) {
|
|
13290
|
+
super();
|
|
13291
|
+
this.target = target;
|
|
13292
|
+
this.name = name;
|
|
13293
|
+
this.args = args;
|
|
13294
|
+
this.numArgs = numArgs;
|
|
13295
|
+
this.kind = ExpressionKind.PipeBindingVariadic;
|
|
13296
|
+
this[_g] = true;
|
|
13297
|
+
this[_h] = true;
|
|
13298
|
+
this[_j] = true;
|
|
13299
|
+
this.slot = null;
|
|
13300
|
+
this.varOffset = null;
|
|
13301
|
+
}
|
|
13302
|
+
visitExpression(visitor, context) {
|
|
13303
|
+
this.args.visitExpression(visitor, context);
|
|
13304
|
+
}
|
|
13305
|
+
isEquivalent() {
|
|
13306
|
+
return false;
|
|
13307
|
+
}
|
|
13308
|
+
isConstant() {
|
|
13309
|
+
return false;
|
|
13310
|
+
}
|
|
13311
|
+
transformInternalExpressions(transform, flags) {
|
|
13312
|
+
this.args = transformExpressionsInExpression(this.args, transform, flags);
|
|
13313
|
+
}
|
|
13314
|
+
};
|
|
13315
|
+
(() => {
|
|
13316
|
+
_g = UsesSlotIndex, _h = ConsumesVarsTrait, _j = UsesVarOffset;
|
|
13317
|
+
})();
|
|
13168
13318
|
function visitExpressionsInOp(op, visitor) {
|
|
13169
13319
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
13170
13320
|
visitor(expr, flags);
|
|
@@ -13181,6 +13331,11 @@ function transformExpressionsInOp(op, transform, flags) {
|
|
|
13181
13331
|
case OpKind.Property:
|
|
13182
13332
|
op.expression = transformExpressionsInExpression(op.expression, transform, flags);
|
|
13183
13333
|
break;
|
|
13334
|
+
case OpKind.InterpolateProperty:
|
|
13335
|
+
for (let i = 0; i < op.expressions.length; i++) {
|
|
13336
|
+
op.expressions[i] = transformExpressionsInExpression(op.expressions[i], transform, flags);
|
|
13337
|
+
}
|
|
13338
|
+
break;
|
|
13184
13339
|
case OpKind.Statement:
|
|
13185
13340
|
transformExpressionsInStatement(op.statement, transform, flags);
|
|
13186
13341
|
break;
|
|
@@ -13205,6 +13360,7 @@ function transformExpressionsInOp(op, transform, flags) {
|
|
|
13205
13360
|
case OpKind.ContainerEnd:
|
|
13206
13361
|
case OpKind.Template:
|
|
13207
13362
|
case OpKind.Text:
|
|
13363
|
+
case OpKind.Pipe:
|
|
13208
13364
|
case OpKind.Advance:
|
|
13209
13365
|
break;
|
|
13210
13366
|
default:
|
|
@@ -13214,7 +13370,6 @@ function transformExpressionsInOp(op, transform, flags) {
|
|
|
13214
13370
|
function transformExpressionsInExpression(expr, transform, flags) {
|
|
13215
13371
|
if (expr instanceof ExpressionBase) {
|
|
13216
13372
|
expr.transformInternalExpressions(transform, flags);
|
|
13217
|
-
return transform(expr, flags);
|
|
13218
13373
|
} else if (expr instanceof BinaryOperatorExpr) {
|
|
13219
13374
|
expr.lhs = transformExpressionsInExpression(expr.lhs, transform, flags);
|
|
13220
13375
|
expr.rhs = transformExpressionsInExpression(expr.rhs, transform, flags);
|
|
@@ -13223,16 +13378,37 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
13223
13378
|
} else if (expr instanceof ReadKeyExpr) {
|
|
13224
13379
|
expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);
|
|
13225
13380
|
expr.index = transformExpressionsInExpression(expr.index, transform, flags);
|
|
13381
|
+
} else if (expr instanceof WritePropExpr) {
|
|
13382
|
+
expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);
|
|
13383
|
+
expr.value = transformExpressionsInExpression(expr.value, transform, flags);
|
|
13384
|
+
} else if (expr instanceof WriteKeyExpr) {
|
|
13385
|
+
expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);
|
|
13386
|
+
expr.index = transformExpressionsInExpression(expr.index, transform, flags);
|
|
13387
|
+
expr.value = transformExpressionsInExpression(expr.value, transform, flags);
|
|
13226
13388
|
} else if (expr instanceof InvokeFunctionExpr) {
|
|
13227
13389
|
expr.fn = transformExpressionsInExpression(expr.fn, transform, flags);
|
|
13228
13390
|
for (let i = 0; i < expr.args.length; i++) {
|
|
13229
13391
|
expr.args[i] = transformExpressionsInExpression(expr.args[i], transform, flags);
|
|
13230
13392
|
}
|
|
13393
|
+
} else if (expr instanceof LiteralArrayExpr) {
|
|
13394
|
+
for (let i = 0; i < expr.entries.length; i++) {
|
|
13395
|
+
expr.entries[i] = transformExpressionsInExpression(expr.entries[i], transform, flags);
|
|
13396
|
+
}
|
|
13397
|
+
} else if (expr instanceof LiteralMapExpr) {
|
|
13398
|
+
for (let i = 0; i < expr.entries.length; i++) {
|
|
13399
|
+
expr.entries[i].value = transformExpressionsInExpression(expr.entries[i].value, transform, flags);
|
|
13400
|
+
}
|
|
13401
|
+
} else if (expr instanceof ConditionalExpr) {
|
|
13402
|
+
expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);
|
|
13403
|
+
expr.trueCase = transformExpressionsInExpression(expr.trueCase, transform, flags);
|
|
13404
|
+
if (expr.falseCase !== null) {
|
|
13405
|
+
expr.falseCase = transformExpressionsInExpression(expr.falseCase, transform, flags);
|
|
13406
|
+
}
|
|
13231
13407
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
13232
13408
|
} else {
|
|
13233
13409
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
13234
13410
|
}
|
|
13235
|
-
return expr;
|
|
13411
|
+
return transform(expr, flags);
|
|
13236
13412
|
}
|
|
13237
13413
|
function transformExpressionsInStatement(stmt, transform, flags) {
|
|
13238
13414
|
if (stmt instanceof ExpressionStatement) {
|
|
@@ -13372,10 +13548,12 @@ var _OpList = class {
|
|
|
13372
13548
|
op.next = null;
|
|
13373
13549
|
}
|
|
13374
13550
|
static insertBefore(op, before) {
|
|
13375
|
-
_OpList.
|
|
13551
|
+
_OpList.assertIsOwned(before);
|
|
13552
|
+
if (before.prev === null) {
|
|
13553
|
+
throw new Error(`AssertionError: illegal operation on list start`);
|
|
13554
|
+
}
|
|
13376
13555
|
_OpList.assertIsNotEnd(op);
|
|
13377
13556
|
_OpList.assertIsUnowned(op);
|
|
13378
|
-
_OpList.assertIsOwned(before);
|
|
13379
13557
|
op.debugListId = before.debugListId;
|
|
13380
13558
|
op.prev = null;
|
|
13381
13559
|
before.prev.next = op;
|
|
@@ -13467,6 +13645,13 @@ function createListenerOp(target, name, tag) {
|
|
|
13467
13645
|
handlerFnName: null
|
|
13468
13646
|
}, NEW_OP), TRAIT_USES_SLOT_INDEX);
|
|
13469
13647
|
}
|
|
13648
|
+
function createPipeOp(xref, name) {
|
|
13649
|
+
return __spreadValues(__spreadValues({
|
|
13650
|
+
kind: OpKind.Pipe,
|
|
13651
|
+
xref,
|
|
13652
|
+
name
|
|
13653
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
13654
|
+
}
|
|
13470
13655
|
function createInterpolateTextOp(xref, strings, expressions) {
|
|
13471
13656
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
13472
13657
|
kind: OpKind.InterpolateText,
|
|
@@ -13483,6 +13668,15 @@ function createPropertyOp(xref, name, expression) {
|
|
|
13483
13668
|
expression
|
|
13484
13669
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
13485
13670
|
}
|
|
13671
|
+
function createInterpolatePropertyOp(xref, name, strings, expressions) {
|
|
13672
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
13673
|
+
kind: OpKind.InterpolateProperty,
|
|
13674
|
+
target: xref,
|
|
13675
|
+
name,
|
|
13676
|
+
strings,
|
|
13677
|
+
expressions
|
|
13678
|
+
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
13679
|
+
}
|
|
13486
13680
|
function createAdvanceOp(delta) {
|
|
13487
13681
|
return __spreadValues({
|
|
13488
13682
|
kind: OpKind.Advance,
|
|
@@ -13626,6 +13820,12 @@ function listener(name, handlerFn) {
|
|
|
13626
13820
|
handlerFn
|
|
13627
13821
|
]);
|
|
13628
13822
|
}
|
|
13823
|
+
function pipe(slot, name) {
|
|
13824
|
+
return call(Identifiers.pipe, [
|
|
13825
|
+
literal(slot),
|
|
13826
|
+
literal(name)
|
|
13827
|
+
]);
|
|
13828
|
+
}
|
|
13629
13829
|
function advance(delta) {
|
|
13630
13830
|
return call(Identifiers.advance, [
|
|
13631
13831
|
literal(delta)
|
|
@@ -13665,6 +13865,30 @@ function property(name, expression) {
|
|
|
13665
13865
|
expression
|
|
13666
13866
|
]);
|
|
13667
13867
|
}
|
|
13868
|
+
var PIPE_BINDINGS = [
|
|
13869
|
+
Identifiers.pipeBind1,
|
|
13870
|
+
Identifiers.pipeBind2,
|
|
13871
|
+
Identifiers.pipeBind3,
|
|
13872
|
+
Identifiers.pipeBind4
|
|
13873
|
+
];
|
|
13874
|
+
function pipeBind(slot, varOffset, args) {
|
|
13875
|
+
if (args.length < 1 || args.length > PIPE_BINDINGS.length) {
|
|
13876
|
+
throw new Error(`pipeBind() argument count out of bounds`);
|
|
13877
|
+
}
|
|
13878
|
+
const instruction = PIPE_BINDINGS[args.length - 1];
|
|
13879
|
+
return importExpr(instruction).callFn([
|
|
13880
|
+
literal(slot),
|
|
13881
|
+
literal(varOffset),
|
|
13882
|
+
...args
|
|
13883
|
+
]);
|
|
13884
|
+
}
|
|
13885
|
+
function pipeBindV(slot, varOffset, args) {
|
|
13886
|
+
return importExpr(Identifiers.pipeBindV).callFn([
|
|
13887
|
+
literal(slot),
|
|
13888
|
+
literal(varOffset),
|
|
13889
|
+
args
|
|
13890
|
+
]);
|
|
13891
|
+
}
|
|
13668
13892
|
function textInterpolate(strings, expressions) {
|
|
13669
13893
|
if (strings.length < 1 || expressions.length !== strings.length - 1) {
|
|
13670
13894
|
throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);
|
|
@@ -13679,7 +13903,29 @@ function textInterpolate(strings, expressions) {
|
|
|
13679
13903
|
}
|
|
13680
13904
|
interpolationArgs.push(literal(strings[idx]));
|
|
13681
13905
|
}
|
|
13682
|
-
return
|
|
13906
|
+
return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs);
|
|
13907
|
+
}
|
|
13908
|
+
function propertyInterpolate(name, strings, expressions) {
|
|
13909
|
+
if (strings.length < 1 || expressions.length !== strings.length - 1) {
|
|
13910
|
+
throw new Error(`AssertionError: expected specific shape of args for strings/expressions in interpolation`);
|
|
13911
|
+
}
|
|
13912
|
+
const interpolationArgs = [];
|
|
13913
|
+
if (expressions.length === 1 && strings[0] === "" && strings[1] === "") {
|
|
13914
|
+
interpolationArgs.push(expressions[0]);
|
|
13915
|
+
} else {
|
|
13916
|
+
let idx;
|
|
13917
|
+
for (idx = 0; idx < expressions.length; idx++) {
|
|
13918
|
+
interpolationArgs.push(literal(strings[idx]), expressions[idx]);
|
|
13919
|
+
}
|
|
13920
|
+
interpolationArgs.push(literal(strings[idx]));
|
|
13921
|
+
}
|
|
13922
|
+
return callVariadicInstruction(PROPERTY_INTERPOLATE_CONFIG, [literal(name)], interpolationArgs);
|
|
13923
|
+
}
|
|
13924
|
+
function pureFunction(varOffset, fn2, args) {
|
|
13925
|
+
return callVariadicInstructionExpr(PURE_FUNCTION_CONFIG, [
|
|
13926
|
+
literal(varOffset),
|
|
13927
|
+
fn2
|
|
13928
|
+
], args);
|
|
13683
13929
|
}
|
|
13684
13930
|
function call(instruction, args) {
|
|
13685
13931
|
return createStatementOp(importExpr(instruction).callFn(args).toStmt());
|
|
@@ -13696,19 +13942,62 @@ var TEXT_INTERPOLATE_CONFIG = {
|
|
|
13696
13942
|
Identifiers.textInterpolate7,
|
|
13697
13943
|
Identifiers.textInterpolate8
|
|
13698
13944
|
],
|
|
13699
|
-
variable: Identifiers.textInterpolateV
|
|
13945
|
+
variable: Identifiers.textInterpolateV,
|
|
13946
|
+
mapping: (n) => {
|
|
13947
|
+
if (n % 2 === 0) {
|
|
13948
|
+
throw new Error(`Expected odd number of arguments`);
|
|
13949
|
+
}
|
|
13950
|
+
return (n - 1) / 2;
|
|
13951
|
+
}
|
|
13700
13952
|
};
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13953
|
+
var PROPERTY_INTERPOLATE_CONFIG = {
|
|
13954
|
+
constant: [
|
|
13955
|
+
Identifiers.propertyInterpolate,
|
|
13956
|
+
Identifiers.propertyInterpolate1,
|
|
13957
|
+
Identifiers.propertyInterpolate2,
|
|
13958
|
+
Identifiers.propertyInterpolate3,
|
|
13959
|
+
Identifiers.propertyInterpolate4,
|
|
13960
|
+
Identifiers.propertyInterpolate5,
|
|
13961
|
+
Identifiers.propertyInterpolate6,
|
|
13962
|
+
Identifiers.propertyInterpolate7,
|
|
13963
|
+
Identifiers.propertyInterpolate8
|
|
13964
|
+
],
|
|
13965
|
+
variable: Identifiers.propertyInterpolateV,
|
|
13966
|
+
mapping: (n) => {
|
|
13967
|
+
if (n % 2 === 0) {
|
|
13968
|
+
throw new Error(`Expected odd number of arguments`);
|
|
13969
|
+
}
|
|
13970
|
+
return (n - 1) / 2;
|
|
13704
13971
|
}
|
|
13705
|
-
|
|
13972
|
+
};
|
|
13973
|
+
var PURE_FUNCTION_CONFIG = {
|
|
13974
|
+
constant: [
|
|
13975
|
+
Identifiers.pureFunction0,
|
|
13976
|
+
Identifiers.pureFunction1,
|
|
13977
|
+
Identifiers.pureFunction2,
|
|
13978
|
+
Identifiers.pureFunction3,
|
|
13979
|
+
Identifiers.pureFunction4,
|
|
13980
|
+
Identifiers.pureFunction5,
|
|
13981
|
+
Identifiers.pureFunction6,
|
|
13982
|
+
Identifiers.pureFunction7,
|
|
13983
|
+
Identifiers.pureFunction8
|
|
13984
|
+
],
|
|
13985
|
+
variable: Identifiers.pureFunctionV,
|
|
13986
|
+
mapping: (n) => n
|
|
13987
|
+
};
|
|
13988
|
+
function callVariadicInstructionExpr(config, baseArgs, interpolationArgs) {
|
|
13989
|
+
const n = config.mapping(interpolationArgs.length);
|
|
13706
13990
|
if (n < config.constant.length) {
|
|
13707
|
-
return
|
|
13991
|
+
return importExpr(config.constant[n]).callFn([...baseArgs, ...interpolationArgs]);
|
|
13992
|
+
} else if (config.variable !== null) {
|
|
13993
|
+
return importExpr(config.variable).callFn([...baseArgs, literalArr(interpolationArgs)]);
|
|
13708
13994
|
} else {
|
|
13709
|
-
|
|
13995
|
+
throw new Error(`AssertionError: unable to call variadic function`);
|
|
13710
13996
|
}
|
|
13711
13997
|
}
|
|
13998
|
+
function callVariadicInstruction(config, baseArgs, interpolationArgs) {
|
|
13999
|
+
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs).toStmt());
|
|
14000
|
+
}
|
|
13712
14001
|
function phaseReify(cpl) {
|
|
13713
14002
|
for (const [_, view] of cpl.views) {
|
|
13714
14003
|
reifyCreateOperations(view, view.create);
|
|
@@ -13744,6 +14033,9 @@ function reifyCreateOperations(view, ops) {
|
|
|
13744
14033
|
const childView = view.tpl.views.get(op.xref);
|
|
13745
14034
|
OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes));
|
|
13746
14035
|
break;
|
|
14036
|
+
case OpKind.Pipe:
|
|
14037
|
+
OpList.replace(op, pipe(op.slot, op.name));
|
|
14038
|
+
break;
|
|
13747
14039
|
case OpKind.Listener:
|
|
13748
14040
|
const listenerFn = reifyListenerHandler(view, op.handlerFnName, op.handlerOps);
|
|
13749
14041
|
OpList.replace(op, listener(op.name, listenerFn));
|
|
@@ -13771,6 +14063,9 @@ function reifyUpdateOperations(_view, ops) {
|
|
|
13771
14063
|
case OpKind.Property:
|
|
13772
14064
|
OpList.replace(op, property(op.name, op.expression));
|
|
13773
14065
|
break;
|
|
14066
|
+
case OpKind.InterpolateProperty:
|
|
14067
|
+
OpList.replace(op, propertyInterpolate(op.name, op.strings, op.expressions));
|
|
14068
|
+
break;
|
|
13774
14069
|
case OpKind.InterpolateText:
|
|
13775
14070
|
OpList.replace(op, textInterpolate(op.strings, op.expressions));
|
|
13776
14071
|
break;
|
|
@@ -13788,6 +14083,9 @@ function reifyUpdateOperations(_view, ops) {
|
|
|
13788
14083
|
}
|
|
13789
14084
|
}
|
|
13790
14085
|
function reifyIrExpression(expr) {
|
|
14086
|
+
if (!isIrExpression(expr)) {
|
|
14087
|
+
return expr;
|
|
14088
|
+
}
|
|
13791
14089
|
switch (expr.kind) {
|
|
13792
14090
|
case ExpressionKind.NextContext:
|
|
13793
14091
|
return nextContext(expr.steps);
|
|
@@ -13809,6 +14107,17 @@ function reifyIrExpression(expr) {
|
|
|
13809
14107
|
throw new Error(`Read of unnamed variable ${expr.xref}`);
|
|
13810
14108
|
}
|
|
13811
14109
|
return variable(expr.name);
|
|
14110
|
+
case ExpressionKind.PureFunctionExpr:
|
|
14111
|
+
if (expr.fn === null) {
|
|
14112
|
+
throw new Error(`AssertionError: expected PureFunctions to have been extracted`);
|
|
14113
|
+
}
|
|
14114
|
+
return pureFunction(expr.varOffset, expr.fn, expr.args);
|
|
14115
|
+
case ExpressionKind.PureFunctionParameterExpr:
|
|
14116
|
+
throw new Error(`AssertionError: expected PureFunctionParameterExpr to have been extracted`);
|
|
14117
|
+
case ExpressionKind.PipeBinding:
|
|
14118
|
+
return pipeBind(expr.slot, expr.varOffset, expr.args);
|
|
14119
|
+
case ExpressionKind.PipeBindingVariadic:
|
|
14120
|
+
return pipeBindV(expr.slot, expr.varOffset, expr.args);
|
|
13812
14121
|
default:
|
|
13813
14122
|
throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);
|
|
13814
14123
|
}
|
|
@@ -13868,6 +14177,9 @@ function phaseSlotAllocation(cpl) {
|
|
|
13868
14177
|
op.slot = slotMap.get(op.target);
|
|
13869
14178
|
}
|
|
13870
14179
|
visitExpressionsInOp(op, (expr) => {
|
|
14180
|
+
if (!isIrExpression(expr)) {
|
|
14181
|
+
return;
|
|
14182
|
+
}
|
|
13871
14183
|
if (!hasUsesSlotIndexTrait(expr) || expr.slot !== null) {
|
|
13872
14184
|
return;
|
|
13873
14185
|
}
|
|
@@ -13887,6 +14199,12 @@ function phaseVarCounting(cpl) {
|
|
|
13887
14199
|
varCount += varsUsedByOp(op);
|
|
13888
14200
|
}
|
|
13889
14201
|
visitExpressionsInOp(op, (expr) => {
|
|
14202
|
+
if (!isIrExpression(expr)) {
|
|
14203
|
+
return;
|
|
14204
|
+
}
|
|
14205
|
+
if (hasUsesVarOffsetTrait(expr)) {
|
|
14206
|
+
expr.varOffset = varCount;
|
|
14207
|
+
}
|
|
13890
14208
|
if (hasConsumesVarsTrait(expr)) {
|
|
13891
14209
|
varCount += varsUsedByIrExpression(expr);
|
|
13892
14210
|
}
|
|
@@ -13910,12 +14228,23 @@ function varsUsedByOp(op) {
|
|
|
13910
14228
|
return 1;
|
|
13911
14229
|
case OpKind.InterpolateText:
|
|
13912
14230
|
return op.expressions.length;
|
|
14231
|
+
case OpKind.InterpolateProperty:
|
|
14232
|
+
return 1 + op.expressions.length;
|
|
13913
14233
|
default:
|
|
13914
14234
|
throw new Error(`Unhandled op: ${OpKind[op.kind]}`);
|
|
13915
14235
|
}
|
|
13916
14236
|
}
|
|
13917
14237
|
function varsUsedByIrExpression(expr) {
|
|
13918
|
-
|
|
14238
|
+
switch (expr.kind) {
|
|
14239
|
+
case ExpressionKind.PureFunctionExpr:
|
|
14240
|
+
return 1 + expr.args.length;
|
|
14241
|
+
case ExpressionKind.PipeBinding:
|
|
14242
|
+
return 1 + expr.args.length;
|
|
14243
|
+
case ExpressionKind.PipeBindingVariadic:
|
|
14244
|
+
return 1 + expr.numArgs;
|
|
14245
|
+
default:
|
|
14246
|
+
throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${expr.constructor.name}`);
|
|
14247
|
+
}
|
|
13919
14248
|
}
|
|
13920
14249
|
function phaseNaming(cpl) {
|
|
13921
14250
|
addNamesToView(cpl.root, cpl.componentName, { index: 0 });
|
|
@@ -14279,6 +14608,9 @@ function collectOpInfo(op) {
|
|
|
14279
14608
|
let fences = Fence.None;
|
|
14280
14609
|
const variablesUsed = /* @__PURE__ */ new Set();
|
|
14281
14610
|
visitExpressionsInOp(op, (expr) => {
|
|
14611
|
+
if (!isIrExpression(expr)) {
|
|
14612
|
+
return;
|
|
14613
|
+
}
|
|
14282
14614
|
switch (expr.kind) {
|
|
14283
14615
|
case ExpressionKind.ReadVariable:
|
|
14284
14616
|
variablesUsed.add(expr.xref);
|
|
@@ -14291,6 +14623,9 @@ function collectOpInfo(op) {
|
|
|
14291
14623
|
}
|
|
14292
14624
|
function countVariableUsages(op, varUsages, varRemoteUsage) {
|
|
14293
14625
|
visitExpressionsInOp(op, (expr, flags) => {
|
|
14626
|
+
if (!isIrExpression(expr)) {
|
|
14627
|
+
return;
|
|
14628
|
+
}
|
|
14294
14629
|
if (expr.kind !== ExpressionKind.ReadVariable) {
|
|
14295
14630
|
return;
|
|
14296
14631
|
}
|
|
@@ -14306,6 +14641,9 @@ function countVariableUsages(op, varUsages, varRemoteUsage) {
|
|
|
14306
14641
|
}
|
|
14307
14642
|
function uncountVariableUsages(op, varUsages) {
|
|
14308
14643
|
visitExpressionsInOp(op, (expr) => {
|
|
14644
|
+
if (!isIrExpression(expr)) {
|
|
14645
|
+
return;
|
|
14646
|
+
}
|
|
14309
14647
|
if (expr.kind !== ExpressionKind.ReadVariable) {
|
|
14310
14648
|
return;
|
|
14311
14649
|
}
|
|
@@ -14334,6 +14672,9 @@ function tryInlineVariableInitializer(id, initializer, target, declFences) {
|
|
|
14334
14672
|
let inlined = false;
|
|
14335
14673
|
let inliningAllowed = true;
|
|
14336
14674
|
transformExpressionsInOp(target, (expr, flags) => {
|
|
14675
|
+
if (!isIrExpression(expr)) {
|
|
14676
|
+
return expr;
|
|
14677
|
+
}
|
|
14337
14678
|
if (inlined || !inliningAllowed) {
|
|
14338
14679
|
return expr;
|
|
14339
14680
|
} else if (flags & VisitorContextFlag.InChildOperation && declFences & Fence.ViewContextRead) {
|
|
@@ -14428,6 +14769,9 @@ function mergeNextContextsInOps(ops) {
|
|
|
14428
14769
|
let tryToMerge = true;
|
|
14429
14770
|
for (let candidate = op.next; candidate.kind !== OpKind.ListEnd && tryToMerge; candidate = candidate.next) {
|
|
14430
14771
|
visitExpressionsInOp(candidate, (expr, flags) => {
|
|
14772
|
+
if (!isIrExpression(expr)) {
|
|
14773
|
+
return expr;
|
|
14774
|
+
}
|
|
14431
14775
|
if (!tryToMerge) {
|
|
14432
14776
|
return;
|
|
14433
14777
|
}
|
|
@@ -14495,7 +14839,170 @@ function phaseSaveRestoreView(cpl) {
|
|
|
14495
14839
|
}
|
|
14496
14840
|
}
|
|
14497
14841
|
}
|
|
14842
|
+
function phasePureFunctionExtraction(cpl) {
|
|
14843
|
+
for (const view of cpl.views.values()) {
|
|
14844
|
+
for (const op of view.ops()) {
|
|
14845
|
+
visitExpressionsInOp(op, (expr) => {
|
|
14846
|
+
if (!(expr instanceof PureFunctionExpr) || expr.body === null) {
|
|
14847
|
+
return;
|
|
14848
|
+
}
|
|
14849
|
+
const constantDef = new PureFunctionConstant(expr.args.length);
|
|
14850
|
+
expr.fn = cpl.pool.getSharedConstant(constantDef, expr.body);
|
|
14851
|
+
expr.body = null;
|
|
14852
|
+
});
|
|
14853
|
+
}
|
|
14854
|
+
}
|
|
14855
|
+
}
|
|
14856
|
+
var PureFunctionConstant = class extends GenericKeyFn {
|
|
14857
|
+
constructor(numArgs) {
|
|
14858
|
+
super();
|
|
14859
|
+
this.numArgs = numArgs;
|
|
14860
|
+
}
|
|
14861
|
+
keyOf(expr) {
|
|
14862
|
+
if (expr instanceof PureFunctionParameterExpr) {
|
|
14863
|
+
return `param(${expr.index})`;
|
|
14864
|
+
} else {
|
|
14865
|
+
return super.keyOf(expr);
|
|
14866
|
+
}
|
|
14867
|
+
}
|
|
14868
|
+
toSharedConstantDeclaration(declName, keyExpr) {
|
|
14869
|
+
const fnParams = [];
|
|
14870
|
+
for (let idx = 0; idx < this.numArgs; idx++) {
|
|
14871
|
+
fnParams.push(new FnParam("_p" + idx));
|
|
14872
|
+
}
|
|
14873
|
+
const returnExpr = transformExpressionsInExpression(keyExpr, (expr) => {
|
|
14874
|
+
if (!(expr instanceof PureFunctionParameterExpr)) {
|
|
14875
|
+
return expr;
|
|
14876
|
+
}
|
|
14877
|
+
return variable("_p" + expr.index);
|
|
14878
|
+
}, VisitorContextFlag.None);
|
|
14879
|
+
return new DeclareFunctionStmt(declName, fnParams, [new ReturnStatement(returnExpr)]);
|
|
14880
|
+
}
|
|
14881
|
+
};
|
|
14882
|
+
function phasePipeCreation(cpl) {
|
|
14883
|
+
for (const view of cpl.views.values()) {
|
|
14884
|
+
processPipeBindingsInView(view);
|
|
14885
|
+
}
|
|
14886
|
+
}
|
|
14887
|
+
function processPipeBindingsInView(view) {
|
|
14888
|
+
for (const updateOp of view.update) {
|
|
14889
|
+
visitExpressionsInOp(updateOp, (expr, flags) => {
|
|
14890
|
+
if (!isIrExpression(expr)) {
|
|
14891
|
+
return;
|
|
14892
|
+
}
|
|
14893
|
+
if (expr.kind !== ExpressionKind.PipeBinding) {
|
|
14894
|
+
return;
|
|
14895
|
+
}
|
|
14896
|
+
if (flags & VisitorContextFlag.InChildOperation) {
|
|
14897
|
+
throw new Error(`AssertionError: pipe bindings should not appear in child expressions`);
|
|
14898
|
+
}
|
|
14899
|
+
if (!hasDependsOnSlotContextTrait(updateOp)) {
|
|
14900
|
+
throw new Error(`AssertionError: pipe binding associated with non-slot operation ${OpKind[updateOp.kind]}`);
|
|
14901
|
+
}
|
|
14902
|
+
addPipeToCreationBlock(view, updateOp.target, expr);
|
|
14903
|
+
});
|
|
14904
|
+
}
|
|
14905
|
+
}
|
|
14906
|
+
function addPipeToCreationBlock(view, afterTargetXref, binding) {
|
|
14907
|
+
for (let op = view.create.head.next; op.kind !== OpKind.ListEnd; op = op.next) {
|
|
14908
|
+
if (!hasConsumesSlotTrait(op)) {
|
|
14909
|
+
continue;
|
|
14910
|
+
}
|
|
14911
|
+
if (op.xref !== afterTargetXref) {
|
|
14912
|
+
continue;
|
|
14913
|
+
}
|
|
14914
|
+
while (op.next.kind === OpKind.Pipe) {
|
|
14915
|
+
op = op.next;
|
|
14916
|
+
}
|
|
14917
|
+
const pipe2 = createPipeOp(binding.target, binding.name);
|
|
14918
|
+
OpList.insertBefore(pipe2, op.next);
|
|
14919
|
+
return;
|
|
14920
|
+
}
|
|
14921
|
+
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
14922
|
+
}
|
|
14923
|
+
function phasePipeVariadic(cpl) {
|
|
14924
|
+
for (const view of cpl.views.values()) {
|
|
14925
|
+
for (const op of view.update) {
|
|
14926
|
+
transformExpressionsInOp(op, (expr) => {
|
|
14927
|
+
if (!(expr instanceof PipeBindingExpr)) {
|
|
14928
|
+
return expr;
|
|
14929
|
+
}
|
|
14930
|
+
if (expr.args.length <= 4) {
|
|
14931
|
+
return expr;
|
|
14932
|
+
}
|
|
14933
|
+
return new PipeBindingVariadicExpr(expr.target, expr.name, literalArr(expr.args), expr.args.length);
|
|
14934
|
+
}, VisitorContextFlag.None);
|
|
14935
|
+
}
|
|
14936
|
+
}
|
|
14937
|
+
}
|
|
14938
|
+
function phasePureLiteralStructures(cpl) {
|
|
14939
|
+
for (const view of cpl.views.values()) {
|
|
14940
|
+
for (const op of view.update) {
|
|
14941
|
+
transformExpressionsInOp(op, (expr, flags) => {
|
|
14942
|
+
if (flags & VisitorContextFlag.InChildOperation) {
|
|
14943
|
+
return expr;
|
|
14944
|
+
}
|
|
14945
|
+
if (expr instanceof LiteralArrayExpr) {
|
|
14946
|
+
return transformLiteralArray(expr);
|
|
14947
|
+
} else if (expr instanceof LiteralMapExpr) {
|
|
14948
|
+
return transformLiteralMap(expr);
|
|
14949
|
+
}
|
|
14950
|
+
return expr;
|
|
14951
|
+
}, VisitorContextFlag.None);
|
|
14952
|
+
}
|
|
14953
|
+
}
|
|
14954
|
+
}
|
|
14955
|
+
function transformLiteralArray(expr) {
|
|
14956
|
+
const derivedEntries = [];
|
|
14957
|
+
const nonConstantArgs = [];
|
|
14958
|
+
for (const entry of expr.entries) {
|
|
14959
|
+
if (entry.isConstant()) {
|
|
14960
|
+
derivedEntries.push(entry);
|
|
14961
|
+
} else {
|
|
14962
|
+
const idx = nonConstantArgs.length;
|
|
14963
|
+
nonConstantArgs.push(entry);
|
|
14964
|
+
derivedEntries.push(new PureFunctionParameterExpr(idx));
|
|
14965
|
+
}
|
|
14966
|
+
}
|
|
14967
|
+
return new PureFunctionExpr(literalArr(derivedEntries), nonConstantArgs);
|
|
14968
|
+
}
|
|
14969
|
+
function transformLiteralMap(expr) {
|
|
14970
|
+
let derivedEntries = [];
|
|
14971
|
+
const nonConstantArgs = [];
|
|
14972
|
+
for (const entry of expr.entries) {
|
|
14973
|
+
if (entry.value.isConstant()) {
|
|
14974
|
+
derivedEntries.push(entry);
|
|
14975
|
+
} else {
|
|
14976
|
+
const idx = nonConstantArgs.length;
|
|
14977
|
+
nonConstantArgs.push(entry.value);
|
|
14978
|
+
derivedEntries.push(new LiteralMapEntry(entry.key, new PureFunctionParameterExpr(idx), entry.quoted));
|
|
14979
|
+
}
|
|
14980
|
+
}
|
|
14981
|
+
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
14982
|
+
}
|
|
14983
|
+
function phaseAlignPipeVariadicVarOffset(cpl) {
|
|
14984
|
+
for (const view of cpl.views.values()) {
|
|
14985
|
+
for (const op of view.update) {
|
|
14986
|
+
visitExpressionsInOp(op, (expr) => {
|
|
14987
|
+
if (!(expr instanceof PipeBindingVariadicExpr)) {
|
|
14988
|
+
return expr;
|
|
14989
|
+
}
|
|
14990
|
+
if (!(expr.args instanceof PureFunctionExpr)) {
|
|
14991
|
+
return expr;
|
|
14992
|
+
}
|
|
14993
|
+
if (expr.varOffset === null || expr.args.varOffset === null) {
|
|
14994
|
+
throw new Error(`Must run after variable counting`);
|
|
14995
|
+
}
|
|
14996
|
+
expr.varOffset = expr.args.varOffset;
|
|
14997
|
+
expr.args.varOffset = expr.varOffset + varsUsedByIrExpression(expr);
|
|
14998
|
+
});
|
|
14999
|
+
}
|
|
15000
|
+
}
|
|
15001
|
+
}
|
|
14498
15002
|
function transformTemplate(cpl) {
|
|
15003
|
+
phasePipeCreation(cpl);
|
|
15004
|
+
phasePipeVariadic(cpl);
|
|
15005
|
+
phasePureLiteralStructures(cpl);
|
|
14499
15006
|
phaseGenerateVariables(cpl);
|
|
14500
15007
|
phaseSaveRestoreView(cpl);
|
|
14501
15008
|
phaseResolveNames(cpl);
|
|
@@ -14510,6 +15017,8 @@ function transformTemplate(cpl) {
|
|
|
14510
15017
|
phaseMergeNextContext(cpl);
|
|
14511
15018
|
phaseNgContainer(cpl);
|
|
14512
15019
|
phaseEmptyElements(cpl);
|
|
15020
|
+
phasePureFunctionExtraction(cpl);
|
|
15021
|
+
phaseAlignPipeVariadicVarOffset(cpl);
|
|
14513
15022
|
phaseReify(cpl);
|
|
14514
15023
|
phaseChaining(cpl);
|
|
14515
15024
|
}
|
|
@@ -14571,8 +15080,9 @@ function maybeGenerateRfBlock(flag, statements) {
|
|
|
14571
15080
|
];
|
|
14572
15081
|
}
|
|
14573
15082
|
var ComponentCompilation = class {
|
|
14574
|
-
constructor(componentName) {
|
|
15083
|
+
constructor(componentName, pool) {
|
|
14575
15084
|
this.componentName = componentName;
|
|
15085
|
+
this.pool = pool;
|
|
14576
15086
|
this.nextXrefId = 0;
|
|
14577
15087
|
this.views = /* @__PURE__ */ new Map();
|
|
14578
15088
|
this.consts = [];
|
|
@@ -14644,8 +15154,8 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
14644
15154
|
["||", BinaryOperator.Or],
|
|
14645
15155
|
["+", BinaryOperator.Plus]
|
|
14646
15156
|
]);
|
|
14647
|
-
function ingest(componentName, template2) {
|
|
14648
|
-
const cpl = new ComponentCompilation(componentName);
|
|
15157
|
+
function ingest(componentName, template2, constantPool) {
|
|
15158
|
+
const cpl = new ComponentCompilation(componentName, constantPool);
|
|
14649
15159
|
ingestNodes(cpl.root, template2);
|
|
14650
15160
|
return cpl;
|
|
14651
15161
|
}
|
|
@@ -14715,6 +15225,10 @@ function convertAst(ast, cpl) {
|
|
|
14715
15225
|
} else {
|
|
14716
15226
|
return new ReadPropExpr(convertAst(ast.receiver, cpl), ast.name);
|
|
14717
15227
|
}
|
|
15228
|
+
} else if (ast instanceof PropertyWrite) {
|
|
15229
|
+
return new WritePropExpr(convertAst(ast.receiver, cpl), ast.name, convertAst(ast.value, cpl));
|
|
15230
|
+
} else if (ast instanceof KeyedWrite) {
|
|
15231
|
+
return new WriteKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl), convertAst(ast.value, cpl));
|
|
14718
15232
|
} else if (ast instanceof Call) {
|
|
14719
15233
|
if (ast.receiver instanceof ImplicitReceiver) {
|
|
14720
15234
|
throw new Error(`Unexpected ImplicitReceiver`);
|
|
@@ -14735,6 +15249,21 @@ function convertAst(ast, cpl) {
|
|
|
14735
15249
|
return new ReadKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));
|
|
14736
15250
|
} else if (ast instanceof Chain) {
|
|
14737
15251
|
throw new Error(`AssertionError: Chain in unknown context`);
|
|
15252
|
+
} else if (ast instanceof LiteralMap) {
|
|
15253
|
+
const entries = ast.keys.map((key, idx) => {
|
|
15254
|
+
const value = ast.values[idx];
|
|
15255
|
+
return new LiteralMapEntry(key.key, convertAst(value, cpl), key.quoted);
|
|
15256
|
+
});
|
|
15257
|
+
return new LiteralMapExpr(entries);
|
|
15258
|
+
} else if (ast instanceof LiteralArray) {
|
|
15259
|
+
return new LiteralArrayExpr(ast.expressions.map((expr) => convertAst(expr, cpl)));
|
|
15260
|
+
} else if (ast instanceof Conditional) {
|
|
15261
|
+
return new ConditionalExpr(convertAst(ast.condition, cpl), convertAst(ast.trueExp, cpl), convertAst(ast.falseExp, cpl));
|
|
15262
|
+
} else if (ast instanceof BindingPipe) {
|
|
15263
|
+
return new PipeBindingExpr(cpl.allocateXrefId(), ast.name, [
|
|
15264
|
+
convertAst(ast.exp, cpl),
|
|
15265
|
+
...ast.args.map((arg) => convertAst(arg, cpl))
|
|
15266
|
+
]);
|
|
14738
15267
|
} else {
|
|
14739
15268
|
throw new Error(`Unhandled expression type: ${ast.constructor.name}`);
|
|
14740
15269
|
}
|
|
@@ -14758,15 +15287,15 @@ function ingestAttributes(op, element2) {
|
|
|
14758
15287
|
}
|
|
14759
15288
|
function ingestBindings(view, op, element2) {
|
|
14760
15289
|
if (element2 instanceof Template) {
|
|
14761
|
-
for (const
|
|
14762
|
-
if (!(
|
|
15290
|
+
for (const attr of [...element2.templateAttrs, ...element2.inputs]) {
|
|
15291
|
+
if (!(attr instanceof BoundAttribute)) {
|
|
14763
15292
|
continue;
|
|
14764
15293
|
}
|
|
14765
|
-
view
|
|
15294
|
+
ingestPropertyBinding(view, op.xref, attr.name, attr.value);
|
|
14766
15295
|
}
|
|
14767
15296
|
} else {
|
|
14768
15297
|
for (const input of element2.inputs) {
|
|
14769
|
-
view
|
|
15298
|
+
ingestPropertyBinding(view, op.xref, input.name, input.value);
|
|
14770
15299
|
}
|
|
14771
15300
|
for (const output of element2.outputs) {
|
|
14772
15301
|
const listenerOp = createListenerOp(op.xref, output.name, op.tag);
|
|
@@ -14794,6 +15323,16 @@ function ingestBindings(view, op, element2) {
|
|
|
14794
15323
|
}
|
|
14795
15324
|
}
|
|
14796
15325
|
}
|
|
15326
|
+
function ingestPropertyBinding(view, xref, name, value) {
|
|
15327
|
+
if (value instanceof ASTWithSource) {
|
|
15328
|
+
value = value.ast;
|
|
15329
|
+
}
|
|
15330
|
+
if (value instanceof Interpolation) {
|
|
15331
|
+
view.update.push(createInterpolatePropertyOp(xref, name, value.strings, value.expressions.map((expr) => convertAst(expr, view.tpl))));
|
|
15332
|
+
} else {
|
|
15333
|
+
view.update.push(createPropertyOp(xref, name, convertAst(value, view.tpl)));
|
|
15334
|
+
}
|
|
15335
|
+
}
|
|
14797
15336
|
function ingestReferences(op, element2) {
|
|
14798
15337
|
assertIsArray(op.localRefs);
|
|
14799
15338
|
for (const { name, value } of element2.references) {
|
|
@@ -16918,7 +17457,7 @@ var HtmlTagDefinition = class {
|
|
|
16918
17457
|
var DEFAULT_TAG_DEFINITION;
|
|
16919
17458
|
var TAG_DEFINITIONS;
|
|
16920
17459
|
function getHtmlTagDefinition(tagName) {
|
|
16921
|
-
var _a2,
|
|
17460
|
+
var _a2, _b2;
|
|
16922
17461
|
if (!TAG_DEFINITIONS) {
|
|
16923
17462
|
DEFAULT_TAG_DEFINITION = new HtmlTagDefinition({ canSelfClose: true });
|
|
16924
17463
|
TAG_DEFINITIONS = {
|
|
@@ -17003,7 +17542,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
17003
17542
|
}
|
|
17004
17543
|
});
|
|
17005
17544
|
}
|
|
17006
|
-
return (
|
|
17545
|
+
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
17007
17546
|
}
|
|
17008
17547
|
var NAMED_ENTITIES = {
|
|
17009
17548
|
"AElig": "\xC6",
|
|
@@ -21750,11 +22289,11 @@ var LocalizeSerializerVisitor = class {
|
|
|
21750
22289
|
this.pieces.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));
|
|
21751
22290
|
}
|
|
21752
22291
|
visitTagPlaceholder(ph) {
|
|
21753
|
-
var _a2,
|
|
22292
|
+
var _a2, _b2;
|
|
21754
22293
|
this.pieces.push(this.createPlaceholderPiece(ph.startName, (_a2 = ph.startSourceSpan) != null ? _a2 : ph.sourceSpan));
|
|
21755
22294
|
if (!ph.isVoid) {
|
|
21756
22295
|
ph.children.forEach((child) => child.visit(this));
|
|
21757
|
-
this.pieces.push(this.createPlaceholderPiece(ph.closeName, (
|
|
22296
|
+
this.pieces.push(this.createPlaceholderPiece(ph.closeName, (_b2 = ph.endSourceSpan) != null ? _b2 : ph.sourceSpan));
|
|
21758
22297
|
}
|
|
21759
22298
|
}
|
|
21760
22299
|
visitPlaceholder(ph) {
|
|
@@ -22143,7 +22682,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22143
22682
|
}
|
|
22144
22683
|
}
|
|
22145
22684
|
visitElement(element2) {
|
|
22146
|
-
var _a2,
|
|
22685
|
+
var _a2, _b2;
|
|
22147
22686
|
const elementIndex = this.allocateDataSlot();
|
|
22148
22687
|
const stylingBuilder = new StylingBuilder(null);
|
|
22149
22688
|
let isNonBindableMode = false;
|
|
@@ -22301,7 +22840,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22301
22840
|
this.i18n.appendElement(element2.i18n, elementIndex, true);
|
|
22302
22841
|
}
|
|
22303
22842
|
if (!createSelfClosingInstruction) {
|
|
22304
|
-
const span = (
|
|
22843
|
+
const span = (_b2 = element2.endSourceSpan) != null ? _b2 : element2.sourceSpan;
|
|
22305
22844
|
if (isI18nRootElement) {
|
|
22306
22845
|
this.i18nEnd(span, createSelfClosingI18nInstruction);
|
|
22307
22846
|
}
|
|
@@ -22630,26 +23169,26 @@ var ValueConverter = class extends AstMemoryEfficientTransformer {
|
|
|
22630
23169
|
this.definePipe = definePipe;
|
|
22631
23170
|
this._pipeBindExprs = [];
|
|
22632
23171
|
}
|
|
22633
|
-
visitPipe(
|
|
23172
|
+
visitPipe(pipe2, context) {
|
|
22634
23173
|
const slot = this.allocateSlot();
|
|
22635
23174
|
const slotPseudoLocal = `PIPE:${slot}`;
|
|
22636
|
-
const pureFunctionSlot = this.allocatePureFunctionSlots(2 +
|
|
22637
|
-
const target = new PropertyRead(
|
|
22638
|
-
const { identifier, isVarLength } = pipeBindingCallInfo(
|
|
22639
|
-
this.definePipe(
|
|
22640
|
-
const args = [
|
|
22641
|
-
const convertedArgs = isVarLength ? this.visitAll([new LiteralArray(
|
|
22642
|
-
const pipeBindExpr = new Call(
|
|
22643
|
-
new LiteralPrimitive(
|
|
22644
|
-
new LiteralPrimitive(
|
|
23175
|
+
const pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe2.args.length);
|
|
23176
|
+
const target = new PropertyRead(pipe2.span, pipe2.sourceSpan, pipe2.nameSpan, new ImplicitReceiver(pipe2.span, pipe2.sourceSpan), slotPseudoLocal);
|
|
23177
|
+
const { identifier, isVarLength } = pipeBindingCallInfo(pipe2.args);
|
|
23178
|
+
this.definePipe(pipe2.name, slotPseudoLocal, slot, importExpr(identifier));
|
|
23179
|
+
const args = [pipe2.exp, ...pipe2.args];
|
|
23180
|
+
const convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe2.span, pipe2.sourceSpan, args)]) : this.visitAll(args);
|
|
23181
|
+
const pipeBindExpr = new Call(pipe2.span, pipe2.sourceSpan, target, [
|
|
23182
|
+
new LiteralPrimitive(pipe2.span, pipe2.sourceSpan, slot),
|
|
23183
|
+
new LiteralPrimitive(pipe2.span, pipe2.sourceSpan, pureFunctionSlot),
|
|
22645
23184
|
...convertedArgs
|
|
22646
23185
|
], null);
|
|
22647
23186
|
this._pipeBindExprs.push(pipeBindExpr);
|
|
22648
23187
|
return pipeBindExpr;
|
|
22649
23188
|
}
|
|
22650
23189
|
updatePipeSlotOffsets(bindingSlots) {
|
|
22651
|
-
this._pipeBindExprs.forEach((
|
|
22652
|
-
const slotOffset =
|
|
23190
|
+
this._pipeBindExprs.forEach((pipe2) => {
|
|
23191
|
+
const slotOffset = pipe2.args[1];
|
|
22653
23192
|
slotOffset.value += bindingSlots;
|
|
22654
23193
|
});
|
|
22655
23194
|
}
|
|
@@ -23201,7 +23740,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
23201
23740
|
}
|
|
23202
23741
|
definitionMap.set("template", templateFunctionExpression);
|
|
23203
23742
|
} else {
|
|
23204
|
-
const tpl = ingest(meta.name, meta.template.nodes);
|
|
23743
|
+
const tpl = ingest(meta.name, meta.template.nodes, constantPool);
|
|
23205
23744
|
transformTemplate(tpl);
|
|
23206
23745
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
23207
23746
|
definitionMap.set("decls", literal(tpl.root.decls));
|
|
@@ -23249,7 +23788,9 @@ function createComponentType(meta) {
|
|
|
23249
23788
|
typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
|
|
23250
23789
|
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
23251
23790
|
typeParams.push(createHostDirectivesType(meta));
|
|
23252
|
-
|
|
23791
|
+
if (meta.isSignal) {
|
|
23792
|
+
typeParams.push(expressionType(literal(meta.isSignal)));
|
|
23793
|
+
}
|
|
23253
23794
|
return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
|
|
23254
23795
|
}
|
|
23255
23796
|
function compileDeclarationList(list2, mode) {
|
|
@@ -23349,7 +23890,9 @@ function createDirectiveType(meta) {
|
|
|
23349
23890
|
typeParams.push(NONE_TYPE);
|
|
23350
23891
|
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
23351
23892
|
typeParams.push(createHostDirectivesType(meta));
|
|
23352
|
-
|
|
23893
|
+
if (meta.isSignal) {
|
|
23894
|
+
typeParams.push(expressionType(literal(meta.isSignal)));
|
|
23895
|
+
}
|
|
23353
23896
|
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
23354
23897
|
}
|
|
23355
23898
|
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
@@ -23827,15 +24370,15 @@ function convertToR3QueryMetadata(facade) {
|
|
|
23827
24370
|
});
|
|
23828
24371
|
}
|
|
23829
24372
|
function convertQueryDeclarationToMetadata(declaration) {
|
|
23830
|
-
var _a2,
|
|
24373
|
+
var _a2, _b2, _c2, _d2;
|
|
23831
24374
|
return {
|
|
23832
24375
|
propertyName: declaration.propertyName,
|
|
23833
24376
|
first: (_a2 = declaration.first) != null ? _a2 : false,
|
|
23834
24377
|
predicate: convertQueryPredicate(declaration.predicate),
|
|
23835
|
-
descendants: (
|
|
24378
|
+
descendants: (_b2 = declaration.descendants) != null ? _b2 : false,
|
|
23836
24379
|
read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,
|
|
23837
|
-
static: (
|
|
23838
|
-
emitDistinctChangesOnly: (
|
|
24380
|
+
static: (_c2 = declaration.static) != null ? _c2 : false,
|
|
24381
|
+
emitDistinctChangesOnly: (_d2 = declaration.emitDistinctChangesOnly) != null ? _d2 : true
|
|
23839
24382
|
};
|
|
23840
24383
|
}
|
|
23841
24384
|
function convertQueryPredicate(predicate) {
|
|
@@ -23879,35 +24422,35 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
23879
24422
|
});
|
|
23880
24423
|
}
|
|
23881
24424
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
23882
|
-
var _a2,
|
|
24425
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i;
|
|
23883
24426
|
return {
|
|
23884
24427
|
name: declaration.type.name,
|
|
23885
24428
|
type: wrapReference(declaration.type),
|
|
23886
24429
|
typeSourceSpan,
|
|
23887
24430
|
selector: (_a2 = declaration.selector) != null ? _a2 : null,
|
|
23888
24431
|
inputs: declaration.inputs ? inputsMappingToInputMetadata(declaration.inputs) : {},
|
|
23889
|
-
outputs: (
|
|
24432
|
+
outputs: (_b2 = declaration.outputs) != null ? _b2 : {},
|
|
23890
24433
|
host: convertHostDeclarationToMetadata(declaration.host),
|
|
23891
|
-
queries: ((
|
|
23892
|
-
viewQueries: ((
|
|
24434
|
+
queries: ((_c2 = declaration.queries) != null ? _c2 : []).map(convertQueryDeclarationToMetadata),
|
|
24435
|
+
viewQueries: ((_d2 = declaration.viewQueries) != null ? _d2 : []).map(convertQueryDeclarationToMetadata),
|
|
23893
24436
|
providers: declaration.providers !== void 0 ? new WrappedNodeExpr(declaration.providers) : null,
|
|
23894
|
-
exportAs: (
|
|
23895
|
-
usesInheritance: (
|
|
23896
|
-
lifecycle: { usesOnChanges: (
|
|
24437
|
+
exportAs: (_e2 = declaration.exportAs) != null ? _e2 : null,
|
|
24438
|
+
usesInheritance: (_f2 = declaration.usesInheritance) != null ? _f2 : false,
|
|
24439
|
+
lifecycle: { usesOnChanges: (_g2 = declaration.usesOnChanges) != null ? _g2 : false },
|
|
23897
24440
|
deps: null,
|
|
23898
24441
|
typeArgumentCount: 0,
|
|
23899
24442
|
fullInheritance: false,
|
|
23900
|
-
isStandalone: (
|
|
24443
|
+
isStandalone: (_h2 = declaration.isStandalone) != null ? _h2 : false,
|
|
23901
24444
|
isSignal: (_i = declaration.isSignal) != null ? _i : false,
|
|
23902
24445
|
hostDirectives: convertHostDirectivesToMetadata(declaration)
|
|
23903
24446
|
};
|
|
23904
24447
|
}
|
|
23905
24448
|
function convertHostDeclarationToMetadata(host = {}) {
|
|
23906
|
-
var _a2,
|
|
24449
|
+
var _a2, _b2, _c2;
|
|
23907
24450
|
return {
|
|
23908
24451
|
attributes: convertOpaqueValuesToExpressions((_a2 = host.attributes) != null ? _a2 : {}),
|
|
23909
|
-
listeners: (
|
|
23910
|
-
properties: (
|
|
24452
|
+
listeners: (_b2 = host.listeners) != null ? _b2 : {},
|
|
24453
|
+
properties: (_c2 = host.properties) != null ? _c2 : {},
|
|
23911
24454
|
specialAttributes: {
|
|
23912
24455
|
classAttr: host.classAttribute,
|
|
23913
24456
|
styleAttr: host.styleAttribute
|
|
@@ -23941,7 +24484,7 @@ function convertOpaqueValuesToExpressions(obj) {
|
|
|
23941
24484
|
return result;
|
|
23942
24485
|
}
|
|
23943
24486
|
function convertDeclareComponentFacadeToMetadata(decl2, typeSourceSpan, sourceMapUrl) {
|
|
23944
|
-
var _a2,
|
|
24487
|
+
var _a2, _b2, _c2, _d2;
|
|
23945
24488
|
const { template: template2, interpolation } = parseJitTemplate(decl2.template, decl2.type.name, sourceMapUrl, (_a2 = decl2.preserveWhitespaces) != null ? _a2 : false, decl2.interpolation);
|
|
23946
24489
|
const declarations = [];
|
|
23947
24490
|
if (decl2.dependencies) {
|
|
@@ -23963,12 +24506,12 @@ function convertDeclareComponentFacadeToMetadata(decl2, typeSourceSpan, sourceMa
|
|
|
23963
24506
|
}
|
|
23964
24507
|
return __spreadProps(__spreadValues({}, convertDeclareDirectiveFacadeToMetadata(decl2, typeSourceSpan)), {
|
|
23965
24508
|
template: template2,
|
|
23966
|
-
styles: (
|
|
24509
|
+
styles: (_b2 = decl2.styles) != null ? _b2 : [],
|
|
23967
24510
|
declarations,
|
|
23968
24511
|
viewProviders: decl2.viewProviders !== void 0 ? new WrappedNodeExpr(decl2.viewProviders) : null,
|
|
23969
24512
|
animations: decl2.animations !== void 0 ? new WrappedNodeExpr(decl2.animations) : null,
|
|
23970
|
-
changeDetection: (
|
|
23971
|
-
encapsulation: (
|
|
24513
|
+
changeDetection: (_c2 = decl2.changeDetection) != null ? _c2 : ChangeDetectionStrategy.Default,
|
|
24514
|
+
encapsulation: (_d2 = decl2.encapsulation) != null ? _d2 : ViewEncapsulation.Emulated,
|
|
23972
24515
|
interpolation,
|
|
23973
24516
|
declarationListEmitMode: 2,
|
|
23974
24517
|
relativeContextFilePath: "",
|
|
@@ -23981,15 +24524,15 @@ function convertDeclarationFacadeToMetadata(declaration) {
|
|
|
23981
24524
|
});
|
|
23982
24525
|
}
|
|
23983
24526
|
function convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {
|
|
23984
|
-
var _a2,
|
|
24527
|
+
var _a2, _b2, _c2;
|
|
23985
24528
|
return {
|
|
23986
24529
|
kind: R3TemplateDependencyKind.Directive,
|
|
23987
24530
|
isComponent: isComponent || declaration.kind === "component",
|
|
23988
24531
|
selector: declaration.selector,
|
|
23989
24532
|
type: new WrappedNodeExpr(declaration.type),
|
|
23990
24533
|
inputs: (_a2 = declaration.inputs) != null ? _a2 : [],
|
|
23991
|
-
outputs: (
|
|
23992
|
-
exportAs: (
|
|
24534
|
+
outputs: (_b2 = declaration.outputs) != null ? _b2 : [],
|
|
24535
|
+
exportAs: (_c2 = declaration.exportAs) != null ? _c2 : null
|
|
23993
24536
|
};
|
|
23994
24537
|
}
|
|
23995
24538
|
function convertPipeMapToMetadata(pipes) {
|
|
@@ -24004,11 +24547,11 @@ function convertPipeMapToMetadata(pipes) {
|
|
|
24004
24547
|
};
|
|
24005
24548
|
});
|
|
24006
24549
|
}
|
|
24007
|
-
function convertPipeDeclarationToMetadata(
|
|
24550
|
+
function convertPipeDeclarationToMetadata(pipe2) {
|
|
24008
24551
|
return {
|
|
24009
24552
|
kind: R3TemplateDependencyKind.Pipe,
|
|
24010
|
-
name:
|
|
24011
|
-
type: new WrappedNodeExpr(
|
|
24553
|
+
name: pipe2.name,
|
|
24554
|
+
type: new WrappedNodeExpr(pipe2.type)
|
|
24012
24555
|
};
|
|
24013
24556
|
}
|
|
24014
24557
|
function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
|
|
@@ -24048,10 +24591,10 @@ function convertR3DependencyMetadata(facade) {
|
|
|
24048
24591
|
return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);
|
|
24049
24592
|
}
|
|
24050
24593
|
function convertR3DeclareDependencyMetadata(facade) {
|
|
24051
|
-
var _a2,
|
|
24594
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
24052
24595
|
const isAttributeDep = (_a2 = facade.attribute) != null ? _a2 : false;
|
|
24053
24596
|
const token = facade.token === null ? null : new WrappedNodeExpr(facade.token);
|
|
24054
|
-
return createR3DependencyMetadata(token, isAttributeDep, (
|
|
24597
|
+
return createR3DependencyMetadata(token, isAttributeDep, (_b2 = facade.host) != null ? _b2 : false, (_c2 = facade.optional) != null ? _c2 : false, (_d2 = facade.self) != null ? _d2 : false, (_e2 = facade.skipSelf) != null ? _e2 : false);
|
|
24055
24598
|
}
|
|
24056
24599
|
function createR3DependencyMetadata(token, isAttributeDep, host, optional, self2, skipSelf) {
|
|
24057
24600
|
const attributeNameType = isAttributeDep ? literal("unknown") : null;
|
|
@@ -24102,7 +24645,7 @@ function inputsMappingToInputMetadata(inputs) {
|
|
|
24102
24645
|
result[key] = {
|
|
24103
24646
|
bindingPropertyName: value[0],
|
|
24104
24647
|
classPropertyName: value[1],
|
|
24105
|
-
transformFunction: value[2]
|
|
24648
|
+
transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,
|
|
24106
24649
|
required: false
|
|
24107
24650
|
};
|
|
24108
24651
|
}
|
|
@@ -24142,7 +24685,7 @@ function parseMappingString(value) {
|
|
|
24142
24685
|
return [bindingPropertyName != null ? bindingPropertyName : fieldName, fieldName];
|
|
24143
24686
|
}
|
|
24144
24687
|
function convertDeclarePipeFacadeToMetadata(declaration) {
|
|
24145
|
-
var _a2,
|
|
24688
|
+
var _a2, _b2;
|
|
24146
24689
|
return {
|
|
24147
24690
|
name: declaration.type.name,
|
|
24148
24691
|
type: wrapReference(declaration.type),
|
|
@@ -24150,7 +24693,7 @@ function convertDeclarePipeFacadeToMetadata(declaration) {
|
|
|
24150
24693
|
pipeName: declaration.name,
|
|
24151
24694
|
deps: null,
|
|
24152
24695
|
pure: (_a2 = declaration.pure) != null ? _a2 : true,
|
|
24153
|
-
isStandalone: (
|
|
24696
|
+
isStandalone: (_b2 = declaration.isStandalone) != null ? _b2 : false
|
|
24154
24697
|
};
|
|
24155
24698
|
}
|
|
24156
24699
|
function convertDeclareInjectorFacadeToMetadata(declaration) {
|
|
@@ -24165,7 +24708,7 @@ function publishFacade(global2) {
|
|
|
24165
24708
|
const ng = global2.ng || (global2.ng = {});
|
|
24166
24709
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24167
24710
|
}
|
|
24168
|
-
var VERSION = new Version("16.1.
|
|
24711
|
+
var VERSION = new Version("16.1.1");
|
|
24169
24712
|
var _VisitorMode;
|
|
24170
24713
|
(function(_VisitorMode2) {
|
|
24171
24714
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
@@ -25991,16 +26534,16 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
|
|
|
25991
26534
|
(_a2 = this._updates) == null ? void 0 : _a2.sort((a, b) => b.offset - a.offset).forEach(({ update }) => update());
|
|
25992
26535
|
}
|
|
25993
26536
|
_isReferenceToImport(node, importSpecifier) {
|
|
25994
|
-
var _a2,
|
|
26537
|
+
var _a2, _b2, _c2, _d2;
|
|
25995
26538
|
if ((importSpecifier.propertyName || importSpecifier.name).text !== node.text) {
|
|
25996
26539
|
return false;
|
|
25997
26540
|
}
|
|
25998
26541
|
const nodeSymbol = this.typeChecker.getTypeAtLocation(node).getSymbol();
|
|
25999
26542
|
const importSymbol = this.typeChecker.getTypeAtLocation(importSpecifier).getSymbol();
|
|
26000
26543
|
if (!nodeSymbol && !importSymbol) {
|
|
26001
|
-
return ((
|
|
26544
|
+
return ((_b2 = (_a2 = this.typeChecker.getSymbolAtLocation(node)) == null ? void 0 : _a2.declarations) == null ? void 0 : _b2[0]) === importSpecifier;
|
|
26002
26545
|
}
|
|
26003
|
-
return !!(((
|
|
26546
|
+
return !!(((_c2 = nodeSymbol == null ? void 0 : nodeSymbol.declarations) == null ? void 0 : _c2[0]) && ((_d2 = importSymbol == null ? void 0 : importSymbol.declarations) == null ? void 0 : _d2[0])) && nodeSymbol.declarations[0] === importSymbol.declarations[0];
|
|
26004
26547
|
}
|
|
26005
26548
|
_removeLegacy(name) {
|
|
26006
26549
|
const legacyRegex = /legacy[_-]?/i;
|
|
@@ -26104,7 +26647,7 @@ ${[...componentsToMigrate].join("\n")}`);
|
|
|
26104
26647
|
* found in the LICENSE file at https://angular.io/license
|
|
26105
26648
|
*/
|
|
26106
26649
|
/**
|
|
26107
|
-
* @license Angular v16.1.
|
|
26650
|
+
* @license Angular v16.1.1
|
|
26108
26651
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
26109
26652
|
* License: MIT
|
|
26110
26653
|
*/
|