@angular/material 17.1.0-next.0 → 17.1.0-next.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 +47 -14
- package/autocomplete/index.d.ts +14 -10
- package/badge/_badge-theme.scss +67 -35
- package/badge/index.d.ts +5 -5
- package/bottom-sheet/_bottom-sheet-theme.scss +51 -18
- package/bottom-sheet/index.d.ts +6 -6
- package/button/_button-theme.scss +4 -1
- package/button/_fab-theme.scss +65 -32
- package/button/_icon-button-theme.scss +89 -56
- package/button/index.d.ts +13 -13
- package/button-toggle/_button-toggle-theme.scss +66 -32
- package/button-toggle/index.d.ts +5 -5
- package/card/index.d.ts +18 -18
- package/checkbox/index.d.ts +6 -6
- package/chips/_chips-theme.scss +64 -32
- package/chips/index.d.ts +46 -73
- package/core/_core-theme.scss +1 -3
- package/core/index.d.ts +50 -31
- package/core/option/_optgroup-theme.scss +47 -16
- package/core/option/_option-theme.scss +54 -23
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +18 -58
- package/core/tokens/m2/_index.scss +38 -0
- package/core/tokens/m2/mat/_full-pseudo-checkbox.scss +49 -0
- package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +43 -0
- package/datepicker/_datepicker-theme.scss +70 -38
- package/datepicker/index.d.ts +88 -86
- package/dialog/_dialog-theme.scss +48 -17
- package/divider/_divider-theme.scss +49 -16
- package/divider/index.d.ts +4 -4
- package/esm2022/autocomplete/autocomplete-origin.mjs +5 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +27 -11
- package/esm2022/autocomplete/autocomplete.mjs +6 -6
- package/esm2022/autocomplete/module.mjs +23 -7
- package/esm2022/autocomplete/public-api.mjs +3 -1
- package/esm2022/badge/badge-module.mjs +6 -7
- package/esm2022/badge/badge.mjs +5 -4
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -6
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +8 -7
- package/esm2022/bottom-sheet/bottom-sheet.mjs +5 -6
- package/esm2022/button/button-base.mjs +6 -6
- package/esm2022/button/button.mjs +9 -9
- package/esm2022/button/fab.mjs +17 -17
- package/esm2022/button/icon-button.mjs +9 -9
- package/esm2022/button/module.mjs +16 -12
- package/esm2022/button-toggle/button-toggle-module.mjs +6 -7
- package/esm2022/button-toggle/button-toggle.mjs +10 -9
- package/esm2022/card/card.mjs +57 -46
- package/esm2022/card/module.mjs +7 -8
- package/esm2022/checkbox/checkbox-required-validator.mjs +6 -4
- package/esm2022/checkbox/checkbox.mjs +5 -6
- package/esm2022/checkbox/module.mjs +11 -12
- package/esm2022/chips/chip-action.mjs +5 -4
- package/esm2022/chips/chip-edit-input.mjs +5 -4
- package/esm2022/chips/chip-grid.mjs +39 -51
- package/esm2022/chips/chip-icons.mjs +13 -10
- package/esm2022/chips/chip-input.mjs +5 -4
- package/esm2022/chips/chip-listbox.mjs +5 -5
- package/esm2022/chips/chip-option.mjs +7 -7
- package/esm2022/chips/chip-row.mjs +7 -8
- package/esm2022/chips/chip-set.mjs +5 -5
- package/esm2022/chips/chip.mjs +5 -6
- package/esm2022/chips/module.mjs +7 -8
- package/esm2022/chips/tokens.mjs +8 -2
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/common-behaviors/error-state.mjs +50 -11
- package/esm2022/core/common-behaviors/index.mjs +2 -2
- package/esm2022/core/datetime/index.mjs +8 -8
- package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
- package/esm2022/core/error/error-options.mjs +6 -6
- package/esm2022/core/line/line.mjs +10 -10
- package/esm2022/core/option/index.mjs +6 -7
- package/esm2022/core/option/optgroup.mjs +5 -5
- package/esm2022/core/option/option.mjs +9 -9
- package/esm2022/core/private/ripple-loader.mjs +3 -3
- package/esm2022/core/ripple/index.mjs +6 -7
- package/esm2022/core/ripple/ripple.mjs +5 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +6 -7
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +6 -6
- package/esm2022/datepicker/calendar.mjs +12 -16
- package/esm2022/datepicker/date-range-input-parts.mjs +41 -20
- package/esm2022/datepicker/date-range-input.mjs +7 -7
- package/esm2022/datepicker/date-range-picker.mjs +5 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
- package/esm2022/datepicker/date-selection-model.mjs +9 -9
- package/esm2022/datepicker/datepicker-actions.mjs +13 -11
- package/esm2022/datepicker/datepicker-base.mjs +23 -20
- package/esm2022/datepicker/datepicker-input-base.mjs +6 -5
- package/esm2022/datepicker/datepicker-input.mjs +5 -4
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +18 -16
- package/esm2022/datepicker/datepicker-toggle.mjs +10 -10
- package/esm2022/datepicker/datepicker.mjs +5 -4
- package/esm2022/datepicker/month-view.mjs +5 -6
- package/esm2022/datepicker/multi-year-view.mjs +5 -6
- package/esm2022/datepicker/year-view.mjs +5 -6
- package/esm2022/dialog/dialog-container.mjs +7 -8
- package/esm2022/dialog/dialog-content-directives.mjs +12 -12
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/dialog/testing/dialog-opener.mjs +3 -3
- package/esm2022/divider/divider-module.mjs +6 -7
- package/esm2022/divider/divider.mjs +5 -5
- package/esm2022/expansion/accordion.mjs +5 -4
- package/esm2022/expansion/expansion-module.mjs +16 -9
- package/esm2022/expansion/expansion-panel-content.mjs +5 -4
- package/esm2022/expansion/expansion-panel-header.mjs +13 -11
- package/esm2022/expansion/expansion-panel.mjs +11 -11
- package/esm2022/form-field/directives/error.mjs +5 -4
- package/esm2022/form-field/directives/floating-label.mjs +5 -4
- package/esm2022/form-field/directives/hint.mjs +5 -4
- package/esm2022/form-field/directives/label.mjs +5 -4
- package/esm2022/form-field/directives/line-ripple.mjs +5 -4
- package/esm2022/form-field/directives/notched-outline.mjs +5 -5
- package/esm2022/form-field/directives/prefix.mjs +5 -4
- package/esm2022/form-field/directives/suffix.mjs +5 -4
- package/esm2022/form-field/form-field-control.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +14 -13
- package/esm2022/form-field/module.mjs +16 -18
- package/esm2022/grid-list/grid-list-module.mjs +15 -11
- package/esm2022/grid-list/grid-list.mjs +5 -5
- package/esm2022/grid-list/grid-tile.mjs +21 -18
- package/esm2022/grid-list/tile-coordinator.mjs +1 -1
- package/esm2022/icon/icon-module.mjs +6 -7
- package/esm2022/icon/icon-registry.mjs +3 -3
- package/esm2022/icon/icon.mjs +5 -5
- package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
- package/esm2022/input/input.mjs +28 -30
- package/esm2022/input/module.mjs +6 -7
- package/esm2022/input/public-api.mjs +3 -1
- package/esm2022/list/action-list.mjs +5 -5
- package/esm2022/list/list-base.mjs +9 -7
- package/esm2022/list/list-item-sections.mjs +25 -19
- package/esm2022/list/list-module.mjs +15 -16
- package/esm2022/list/list-option.mjs +8 -8
- package/esm2022/list/list.mjs +10 -10
- package/esm2022/list/nav-list.mjs +5 -5
- package/esm2022/list/selection-list.mjs +5 -5
- package/esm2022/list/subheader.mjs +5 -4
- package/esm2022/menu/menu-content.mjs +5 -4
- package/esm2022/menu/menu-item.mjs +6 -6
- package/esm2022/menu/menu-trigger.mjs +12 -5
- package/esm2022/menu/menu.mjs +6 -6
- package/esm2022/menu/module.mjs +25 -7
- package/esm2022/paginator/module.mjs +6 -7
- package/esm2022/paginator/paginator-intl.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +10 -11
- package/esm2022/progress-bar/module.mjs +6 -6
- package/esm2022/progress-bar/progress-bar.mjs +5 -5
- package/esm2022/progress-spinner/module.mjs +6 -7
- package/esm2022/progress-spinner/progress-spinner.mjs +6 -6
- package/esm2022/radio/module.mjs +6 -7
- package/esm2022/radio/radio.mjs +10 -9
- package/esm2022/select/module.mjs +21 -7
- package/esm2022/select/public-api.mjs +5 -1
- package/esm2022/select/select.mjs +51 -42
- package/esm2022/sidenav/drawer.mjs +13 -12
- package/esm2022/sidenav/sidenav-module.mjs +14 -10
- package/esm2022/sidenav/sidenav.mjs +13 -12
- package/esm2022/slide-toggle/module.mjs +20 -12
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +5 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
- package/esm2022/slider/module.mjs +19 -7
- package/esm2022/slider/slider-input.mjs +9 -7
- package/esm2022/slider/slider-thumb.mjs +5 -6
- package/esm2022/slider/slider.mjs +6 -6
- package/esm2022/snack-bar/module.mjs +6 -6
- package/esm2022/snack-bar/simple-snack-bar.mjs +6 -8
- package/esm2022/snack-bar/snack-bar-container.mjs +7 -8
- package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
- package/esm2022/snack-bar/snack-bar-ref.mjs +1 -1
- package/esm2022/snack-bar/snack-bar.mjs +3 -3
- package/esm2022/sort/sort-header-intl.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +5 -5
- package/esm2022/sort/sort-module.mjs +6 -7
- package/esm2022/sort/sort.mjs +5 -4
- package/esm2022/stepper/step-content.mjs +5 -4
- package/esm2022/stepper/step-header.mjs +8 -8
- package/esm2022/stepper/step-label.mjs +5 -4
- package/esm2022/stepper/stepper-button.mjs +9 -7
- package/esm2022/stepper/stepper-icon.mjs +5 -4
- package/esm2022/stepper/stepper-intl.mjs +3 -3
- package/esm2022/stepper/stepper-module.mjs +17 -16
- package/esm2022/stepper/stepper.mjs +14 -16
- package/esm2022/table/cell.mjs +29 -22
- package/esm2022/table/module.mjs +7 -8
- package/esm2022/table/row.mjs +33 -24
- package/esm2022/table/table.mjs +11 -11
- package/esm2022/table/text-column.mjs +8 -6
- package/esm2022/tabs/module.mjs +10 -43
- package/esm2022/tabs/paginated-tab-header.mjs +3 -3
- package/esm2022/tabs/tab-body.mjs +10 -8
- package/esm2022/tabs/tab-content.mjs +5 -4
- package/esm2022/tabs/tab-group.mjs +20 -13
- package/esm2022/tabs/tab-header.mjs +7 -7
- package/esm2022/tabs/tab-label-wrapper.mjs +5 -4
- package/esm2022/tabs/tab-label.mjs +5 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -17
- package/esm2022/tabs/tab.mjs +5 -5
- package/esm2022/toolbar/toolbar-module.mjs +6 -7
- package/esm2022/toolbar/toolbar.mjs +9 -8
- package/esm2022/tooltip/module.mjs +6 -7
- package/esm2022/tooltip/tooltip.mjs +18 -12
- package/esm2022/tree/node.mjs +13 -10
- package/esm2022/tree/outlet.mjs +5 -4
- package/esm2022/tree/padding.mjs +5 -4
- package/esm2022/tree/toggle.mjs +5 -4
- package/esm2022/tree/tree-module.mjs +7 -8
- package/esm2022/tree/tree.mjs +5 -6
- package/expansion/_expansion-theme.scss +56 -22
- package/expansion/index.d.ts +15 -15
- package/fesm2022/autocomplete.mjs +60 -27
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +9 -9
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +25 -26
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +14 -15
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +53 -49
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +62 -52
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +19 -19
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +94 -96
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +115 -78
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +178 -146
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +2 -2
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -26
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +9 -10
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +47 -36
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +61 -48
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +38 -31
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon.mjs +12 -13
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +33 -35
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +77 -71
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +51 -27
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +17 -22
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +9 -9
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +10 -12
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +14 -15
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +72 -48
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +37 -31
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +28 -20
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +36 -23
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +32 -34
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +16 -16
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +58 -55
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +81 -63
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +408 -424
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +13 -13
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +22 -17
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +34 -29
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/index.d.ts +33 -45
- package/grid-list/index.d.ts +10 -10
- package/icon/_icon-theme.scss +55 -23
- package/icon/index.d.ts +4 -4
- package/input/index.d.ts +33 -32
- package/list/index.d.ts +36 -36
- package/menu/_menu-theme.scss +50 -18
- package/menu/index.d.ts +12 -12
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +62 -29
- package/paginator/index.d.ts +6 -6
- 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 +2 -2
- package/progress-spinner/index.d.ts +4 -4
- package/radio/index.d.ts +6 -6
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +427 -201
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-update/index_bundled.js +41 -37
- package/schematics/ng-update/index_bundled.js.map +2 -2
- package/select/_select-theme.scss +71 -38
- package/select/index.d.ts +47 -35
- package/sidenav/_sidenav-theme.scss +49 -16
- package/sidenav/index.d.ts +11 -11
- package/slide-toggle/index.d.ts +6 -6
- package/slider/index.d.ts +9 -9
- package/sort/index.d.ts +6 -6
- package/stepper/index.d.ts +29 -29
- package/table/index.d.ts +24 -24
- package/tabs/index.d.ts +18 -43
- package/toolbar/index.d.ts +5 -5
- package/tooltip/index.d.ts +8 -8
- package/tree/index.d.ts +15 -15
|
@@ -6396,14 +6396,14 @@ var require_scss_syntax = __commonJS({
|
|
|
6396
6396
|
}
|
|
6397
6397
|
});
|
|
6398
6398
|
|
|
6399
|
-
// bazel-out/
|
|
6399
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
|
|
6400
6400
|
var mdc_migration_exports = {};
|
|
6401
6401
|
__export(mdc_migration_exports, {
|
|
6402
6402
|
default: () => mdc_migration_default
|
|
6403
6403
|
});
|
|
6404
6404
|
module.exports = __toCommonJS(mdc_migration_exports);
|
|
6405
6405
|
|
|
6406
|
-
// bazel-out/
|
|
6406
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/style-migrator.js
|
|
6407
6407
|
var END_OF_SELECTOR_REGEX = "(?!-)";
|
|
6408
6408
|
var MIXIN_ARGUMENTS_REGEX = "\\(((\\s|.)*)\\)";
|
|
6409
6409
|
var StyleMigrator = class {
|
|
@@ -6479,7 +6479,7 @@ var StyleMigrator = class {
|
|
|
6479
6479
|
}
|
|
6480
6480
|
};
|
|
6481
6481
|
|
|
6482
|
-
// bazel-out/
|
|
6482
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/autocomplete/autocomplete-styles.js
|
|
6483
6483
|
var AutocompleteStylesMigrator = class extends StyleMigrator {
|
|
6484
6484
|
constructor() {
|
|
6485
6485
|
super(...arguments);
|
|
@@ -6503,7 +6503,7 @@ var AutocompleteStylesMigrator = class extends StyleMigrator {
|
|
|
6503
6503
|
}
|
|
6504
6504
|
};
|
|
6505
6505
|
|
|
6506
|
-
// bazel-out/
|
|
6506
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/button/button-styles.js
|
|
6507
6507
|
var ButtonStylesMigrator = class extends StyleMigrator {
|
|
6508
6508
|
constructor() {
|
|
6509
6509
|
super(...arguments);
|
|
@@ -6539,7 +6539,7 @@ var ButtonStylesMigrator = class extends StyleMigrator {
|
|
|
6539
6539
|
}
|
|
6540
6540
|
};
|
|
6541
6541
|
|
|
6542
|
-
// bazel-out/
|
|
6542
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-styles.js
|
|
6543
6543
|
var CardStylesMigrator = class extends StyleMigrator {
|
|
6544
6544
|
constructor() {
|
|
6545
6545
|
super(...arguments);
|
|
@@ -6578,7 +6578,7 @@ var CardStylesMigrator = class extends StyleMigrator {
|
|
|
6578
6578
|
}
|
|
6579
6579
|
};
|
|
6580
6580
|
|
|
6581
|
-
// bazel-out/
|
|
6581
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migrator.js
|
|
6582
6582
|
var TemplateMigrator = class {
|
|
6583
6583
|
};
|
|
6584
6584
|
|
|
@@ -6981,6 +6981,9 @@ var _SerializerVisitor = class {
|
|
|
6981
6981
|
visitIcuPlaceholder(ph, context) {
|
|
6982
6982
|
return `<ph icu name="${ph.name}">${ph.value.visit(this)}</ph>`;
|
|
6983
6983
|
}
|
|
6984
|
+
visitBlockPlaceholder(ph, context) {
|
|
6985
|
+
return `<ph block name="${ph.startName}">${ph.children.map((child) => child.visit(this)).join(", ")}</ph name="${ph.closeName}">`;
|
|
6986
|
+
}
|
|
6984
6987
|
};
|
|
6985
6988
|
var serializerVisitor$1 = new _SerializerVisitor();
|
|
6986
6989
|
function serializeNodes(nodes) {
|
|
@@ -10008,43 +10011,47 @@ var BlockNode = class {
|
|
|
10008
10011
|
}
|
|
10009
10012
|
};
|
|
10010
10013
|
var DeferredBlockPlaceholder = class extends BlockNode {
|
|
10011
|
-
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
10014
|
+
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
10012
10015
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10013
10016
|
this.children = children;
|
|
10014
10017
|
this.minimumTime = minimumTime;
|
|
10018
|
+
this.i18n = i18n2;
|
|
10015
10019
|
}
|
|
10016
10020
|
visit(visitor) {
|
|
10017
10021
|
return visitor.visitDeferredBlockPlaceholder(this);
|
|
10018
10022
|
}
|
|
10019
10023
|
};
|
|
10020
10024
|
var DeferredBlockLoading = class extends BlockNode {
|
|
10021
|
-
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
10025
|
+
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
10022
10026
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10023
10027
|
this.children = children;
|
|
10024
10028
|
this.afterTime = afterTime;
|
|
10025
10029
|
this.minimumTime = minimumTime;
|
|
10030
|
+
this.i18n = i18n2;
|
|
10026
10031
|
}
|
|
10027
10032
|
visit(visitor) {
|
|
10028
10033
|
return visitor.visitDeferredBlockLoading(this);
|
|
10029
10034
|
}
|
|
10030
10035
|
};
|
|
10031
10036
|
var DeferredBlockError = class extends BlockNode {
|
|
10032
|
-
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
10037
|
+
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
10033
10038
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10034
10039
|
this.children = children;
|
|
10040
|
+
this.i18n = i18n2;
|
|
10035
10041
|
}
|
|
10036
10042
|
visit(visitor) {
|
|
10037
10043
|
return visitor.visitDeferredBlockError(this);
|
|
10038
10044
|
}
|
|
10039
10045
|
};
|
|
10040
10046
|
var DeferredBlock = class extends BlockNode {
|
|
10041
|
-
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
10047
|
+
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
10042
10048
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10043
10049
|
this.children = children;
|
|
10044
10050
|
this.placeholder = placeholder;
|
|
10045
10051
|
this.loading = loading;
|
|
10046
10052
|
this.error = error2;
|
|
10047
10053
|
this.mainBlockSpan = mainBlockSpan;
|
|
10054
|
+
this.i18n = i18n2;
|
|
10048
10055
|
this.triggers = triggers;
|
|
10049
10056
|
this.prefetchTriggers = prefetchTriggers;
|
|
10050
10057
|
this.definedTriggers = Object.keys(triggers);
|
|
@@ -10076,17 +10083,18 @@ var SwitchBlock = class extends BlockNode {
|
|
|
10076
10083
|
}
|
|
10077
10084
|
};
|
|
10078
10085
|
var SwitchBlockCase = class extends BlockNode {
|
|
10079
|
-
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
10086
|
+
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
10080
10087
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10081
10088
|
this.expression = expression;
|
|
10082
10089
|
this.children = children;
|
|
10090
|
+
this.i18n = i18n2;
|
|
10083
10091
|
}
|
|
10084
10092
|
visit(visitor) {
|
|
10085
10093
|
return visitor.visitSwitchBlockCase(this);
|
|
10086
10094
|
}
|
|
10087
10095
|
};
|
|
10088
10096
|
var ForLoopBlock = class extends BlockNode {
|
|
10089
|
-
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
10097
|
+
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
10090
10098
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10091
10099
|
this.item = item;
|
|
10092
10100
|
this.expression = expression;
|
|
@@ -10096,15 +10104,17 @@ var ForLoopBlock = class extends BlockNode {
|
|
|
10096
10104
|
this.children = children;
|
|
10097
10105
|
this.empty = empty;
|
|
10098
10106
|
this.mainBlockSpan = mainBlockSpan;
|
|
10107
|
+
this.i18n = i18n2;
|
|
10099
10108
|
}
|
|
10100
10109
|
visit(visitor) {
|
|
10101
10110
|
return visitor.visitForLoopBlock(this);
|
|
10102
10111
|
}
|
|
10103
10112
|
};
|
|
10104
10113
|
var ForLoopBlockEmpty = class extends BlockNode {
|
|
10105
|
-
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
10114
|
+
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
10106
10115
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10107
10116
|
this.children = children;
|
|
10117
|
+
this.i18n = i18n2;
|
|
10108
10118
|
}
|
|
10109
10119
|
visit(visitor) {
|
|
10110
10120
|
return visitor.visitForLoopBlockEmpty(this);
|
|
@@ -10120,11 +10130,12 @@ var IfBlock = class extends BlockNode {
|
|
|
10120
10130
|
}
|
|
10121
10131
|
};
|
|
10122
10132
|
var IfBlockBranch = class extends BlockNode {
|
|
10123
|
-
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
10133
|
+
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
10124
10134
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
10125
10135
|
this.expression = expression;
|
|
10126
10136
|
this.children = children;
|
|
10127
10137
|
this.expressionAlias = expressionAlias;
|
|
10138
|
+
this.i18n = i18n2;
|
|
10128
10139
|
}
|
|
10129
10140
|
visit(visitor) {
|
|
10130
10141
|
return visitor.visitIfBlockBranch(this);
|
|
@@ -10312,6 +10323,43 @@ var IcuPlaceholder = class {
|
|
|
10312
10323
|
return visitor.visitIcuPlaceholder(this, context);
|
|
10313
10324
|
}
|
|
10314
10325
|
};
|
|
10326
|
+
var BlockPlaceholder = class {
|
|
10327
|
+
constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
10328
|
+
this.name = name;
|
|
10329
|
+
this.parameters = parameters;
|
|
10330
|
+
this.startName = startName;
|
|
10331
|
+
this.closeName = closeName;
|
|
10332
|
+
this.children = children;
|
|
10333
|
+
this.sourceSpan = sourceSpan;
|
|
10334
|
+
this.startSourceSpan = startSourceSpan;
|
|
10335
|
+
this.endSourceSpan = endSourceSpan;
|
|
10336
|
+
}
|
|
10337
|
+
visit(visitor, context) {
|
|
10338
|
+
return visitor.visitBlockPlaceholder(this, context);
|
|
10339
|
+
}
|
|
10340
|
+
};
|
|
10341
|
+
var RecurseVisitor = class {
|
|
10342
|
+
visitText(text2, context) {
|
|
10343
|
+
}
|
|
10344
|
+
visitContainer(container, context) {
|
|
10345
|
+
container.children.forEach((child) => child.visit(this));
|
|
10346
|
+
}
|
|
10347
|
+
visitIcu(icu, context) {
|
|
10348
|
+
Object.keys(icu.cases).forEach((k) => {
|
|
10349
|
+
icu.cases[k].visit(this);
|
|
10350
|
+
});
|
|
10351
|
+
}
|
|
10352
|
+
visitTagPlaceholder(ph, context) {
|
|
10353
|
+
ph.children.forEach((child) => child.visit(this));
|
|
10354
|
+
}
|
|
10355
|
+
visitPlaceholder(ph, context) {
|
|
10356
|
+
}
|
|
10357
|
+
visitIcuPlaceholder(ph, context) {
|
|
10358
|
+
}
|
|
10359
|
+
visitBlockPlaceholder(ph, context) {
|
|
10360
|
+
ph.children.forEach((child) => child.visit(this));
|
|
10361
|
+
}
|
|
10362
|
+
};
|
|
10315
10363
|
function serializeMessage(messageNodes) {
|
|
10316
10364
|
const visitor = new LocalizeMessageStringVisitor();
|
|
10317
10365
|
const str = messageNodes.map((n) => n.visit(visitor)).join("");
|
|
@@ -10338,6 +10386,10 @@ var LocalizeMessageStringVisitor = class {
|
|
|
10338
10386
|
visitIcuPlaceholder(ph) {
|
|
10339
10387
|
return `{$${ph.name}}`;
|
|
10340
10388
|
}
|
|
10389
|
+
visitBlockPlaceholder(ph) {
|
|
10390
|
+
const children = ph.children.map((child) => child.visit(this)).join("");
|
|
10391
|
+
return `{$${ph.startName}}${children}{$${ph.closeName}}`;
|
|
10392
|
+
}
|
|
10341
10393
|
};
|
|
10342
10394
|
var _Visitor$2 = class {
|
|
10343
10395
|
visitTag(tag) {
|
|
@@ -10806,6 +10858,7 @@ var InterpolationConfig = class {
|
|
|
10806
10858
|
}
|
|
10807
10859
|
};
|
|
10808
10860
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
10861
|
+
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
10809
10862
|
var $EOF = 0;
|
|
10810
10863
|
var $BSPACE = 8;
|
|
10811
10864
|
var $TAB = 9;
|
|
@@ -13311,8 +13364,8 @@ var OpKind;
|
|
|
13311
13364
|
OpKind2[OpKind2["I18nEnd"] = 38] = "I18nEnd";
|
|
13312
13365
|
OpKind2[OpKind2["I18nExpression"] = 39] = "I18nExpression";
|
|
13313
13366
|
OpKind2[OpKind2["I18nApply"] = 40] = "I18nApply";
|
|
13314
|
-
OpKind2[OpKind2["
|
|
13315
|
-
OpKind2[OpKind2["
|
|
13367
|
+
OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
|
|
13368
|
+
OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
|
|
13316
13369
|
OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
|
|
13317
13370
|
})(OpKind || (OpKind = {}));
|
|
13318
13371
|
var ExpressionKind;
|
|
@@ -13397,6 +13450,7 @@ var I18nParamValueFlags;
|
|
|
13397
13450
|
I18nParamValueFlags2[I18nParamValueFlags2["TemplateTag"] = 2] = "TemplateTag";
|
|
13398
13451
|
I18nParamValueFlags2[I18nParamValueFlags2["OpenTag"] = 4] = "OpenTag";
|
|
13399
13452
|
I18nParamValueFlags2[I18nParamValueFlags2["CloseTag"] = 8] = "CloseTag";
|
|
13453
|
+
I18nParamValueFlags2[I18nParamValueFlags2["ExpressionIndex"] = 16] = "ExpressionIndex";
|
|
13400
13454
|
})(I18nParamValueFlags || (I18nParamValueFlags = {}));
|
|
13401
13455
|
var Namespace;
|
|
13402
13456
|
(function(Namespace2) {
|
|
@@ -13580,13 +13634,13 @@ function createConditionalOp(target, targetSlot, test, conditions, sourceSpan) {
|
|
|
13580
13634
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
13581
13635
|
}
|
|
13582
13636
|
function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
13583
|
-
return __spreadValues({
|
|
13637
|
+
return __spreadValues(__spreadValues({
|
|
13584
13638
|
kind: OpKind.Repeater,
|
|
13585
13639
|
target: repeaterCreate2,
|
|
13586
13640
|
targetSlot,
|
|
13587
13641
|
collection,
|
|
13588
13642
|
sourceSpan
|
|
13589
|
-
}, NEW_OP);
|
|
13643
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
13590
13644
|
}
|
|
13591
13645
|
function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
13592
13646
|
return __spreadValues(__spreadValues({
|
|
@@ -13617,13 +13671,6 @@ function createI18nApplyOp(target, handle, sourceSpan) {
|
|
|
13617
13671
|
sourceSpan
|
|
13618
13672
|
}, NEW_OP);
|
|
13619
13673
|
}
|
|
13620
|
-
function createIcuUpdateOp(xref, sourceSpan) {
|
|
13621
|
-
return __spreadValues({
|
|
13622
|
-
kind: OpKind.IcuUpdate,
|
|
13623
|
-
xref,
|
|
13624
|
-
sourceSpan
|
|
13625
|
-
}, NEW_OP);
|
|
13626
|
-
}
|
|
13627
13674
|
var _a;
|
|
13628
13675
|
var _b;
|
|
13629
13676
|
var _c;
|
|
@@ -14385,8 +14432,8 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
14385
14432
|
case OpKind.I18nContext:
|
|
14386
14433
|
case OpKind.I18nEnd:
|
|
14387
14434
|
case OpKind.I18nStart:
|
|
14388
|
-
case OpKind.
|
|
14389
|
-
case OpKind.
|
|
14435
|
+
case OpKind.IcuEnd:
|
|
14436
|
+
case OpKind.IcuStart:
|
|
14390
14437
|
case OpKind.Namespace:
|
|
14391
14438
|
case OpKind.Pipe:
|
|
14392
14439
|
case OpKind.Projection:
|
|
@@ -14882,17 +14929,22 @@ function createI18nEndOp(xref) {
|
|
|
14882
14929
|
xref
|
|
14883
14930
|
}, NEW_OP);
|
|
14884
14931
|
}
|
|
14885
|
-
function
|
|
14932
|
+
function createIcuStartOp(xref, message, messagePlaceholder, sourceSpan) {
|
|
14886
14933
|
return __spreadValues({
|
|
14887
|
-
kind: OpKind.
|
|
14934
|
+
kind: OpKind.IcuStart,
|
|
14888
14935
|
xref,
|
|
14889
14936
|
message,
|
|
14890
|
-
icu,
|
|
14891
14937
|
messagePlaceholder,
|
|
14892
14938
|
context: null,
|
|
14893
14939
|
sourceSpan
|
|
14894
14940
|
}, NEW_OP);
|
|
14895
14941
|
}
|
|
14942
|
+
function createIcuEndOp(xref) {
|
|
14943
|
+
return __spreadValues({
|
|
14944
|
+
kind: OpKind.IcuEnd,
|
|
14945
|
+
xref
|
|
14946
|
+
}, NEW_OP);
|
|
14947
|
+
}
|
|
14896
14948
|
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
14897
14949
|
return __spreadValues({
|
|
14898
14950
|
kind: OpKind.I18nContext,
|
|
@@ -15036,20 +15088,30 @@ function removeAnys(e) {
|
|
|
15036
15088
|
return e;
|
|
15037
15089
|
}
|
|
15038
15090
|
function applyI18nExpressions(job) {
|
|
15091
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
15092
|
+
for (const unit of job.units) {
|
|
15093
|
+
for (const op of unit.create) {
|
|
15094
|
+
if (op.kind === OpKind.I18nContext) {
|
|
15095
|
+
i18nContexts.set(op.xref, op);
|
|
15096
|
+
}
|
|
15097
|
+
}
|
|
15098
|
+
}
|
|
15039
15099
|
for (const unit of job.units) {
|
|
15040
15100
|
for (const op of unit.update) {
|
|
15041
|
-
if (op.kind === OpKind.I18nExpression && needsApplication(op)) {
|
|
15101
|
+
if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {
|
|
15042
15102
|
OpList.insertAfter(createI18nApplyOp(op.target, op.handle, null), op);
|
|
15043
15103
|
}
|
|
15044
15104
|
}
|
|
15045
15105
|
}
|
|
15046
15106
|
}
|
|
15047
|
-
function needsApplication(op) {
|
|
15107
|
+
function needsApplication(i18nContexts, op) {
|
|
15048
15108
|
var _a2;
|
|
15049
15109
|
if (((_a2 = op.next) == null ? void 0 : _a2.kind) !== OpKind.I18nExpression) {
|
|
15050
15110
|
return true;
|
|
15051
15111
|
}
|
|
15052
|
-
|
|
15112
|
+
const context = i18nContexts.get(op.context);
|
|
15113
|
+
const nextContext2 = i18nContexts.get(op.next.context);
|
|
15114
|
+
if (context.i18nBlock !== nextContext2.i18nBlock) {
|
|
15053
15115
|
return true;
|
|
15054
15116
|
}
|
|
15055
15117
|
return false;
|
|
@@ -15569,7 +15631,7 @@ function createI18nContexts(job) {
|
|
|
15569
15631
|
case OpKind.I18nEnd:
|
|
15570
15632
|
currentI18nOp = null;
|
|
15571
15633
|
break;
|
|
15572
|
-
case OpKind.
|
|
15634
|
+
case OpKind.IcuStart:
|
|
15573
15635
|
if (currentI18nOp === null) {
|
|
15574
15636
|
throw Error("Unexpected ICU outside of an i18n block.");
|
|
15575
15637
|
}
|
|
@@ -15585,50 +15647,6 @@ function createI18nContexts(job) {
|
|
|
15585
15647
|
}
|
|
15586
15648
|
}
|
|
15587
15649
|
}
|
|
15588
|
-
function createI18nIcuExpressions(job) {
|
|
15589
|
-
const icus = /* @__PURE__ */ new Map();
|
|
15590
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
15591
|
-
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
15592
|
-
for (const unit of job.units) {
|
|
15593
|
-
for (const op of unit.create) {
|
|
15594
|
-
switch (op.kind) {
|
|
15595
|
-
case OpKind.Icu:
|
|
15596
|
-
icus.set(op.xref, op);
|
|
15597
|
-
break;
|
|
15598
|
-
case OpKind.I18nContext:
|
|
15599
|
-
i18nContexts.set(op.xref, op);
|
|
15600
|
-
break;
|
|
15601
|
-
case OpKind.I18nStart:
|
|
15602
|
-
i18nBlocks.set(op.xref, op);
|
|
15603
|
-
break;
|
|
15604
|
-
}
|
|
15605
|
-
}
|
|
15606
|
-
for (const op of unit.update) {
|
|
15607
|
-
switch (op.kind) {
|
|
15608
|
-
case OpKind.IcuUpdate:
|
|
15609
|
-
const icuOp = icus.get(op.xref);
|
|
15610
|
-
if ((icuOp == null ? void 0 : icuOp.icu.expressionPlaceholder) === void 0) {
|
|
15611
|
-
throw Error("ICU should have an i18n placeholder");
|
|
15612
|
-
}
|
|
15613
|
-
if (icuOp.context === null) {
|
|
15614
|
-
throw Error("ICU should have its i18n context set");
|
|
15615
|
-
}
|
|
15616
|
-
const i18nContext = i18nContexts.get(icuOp.context);
|
|
15617
|
-
const i18nBlock = i18nBlocks.get(i18nContext.i18nBlock);
|
|
15618
|
-
OpList.replace(op, createI18nExpressionOp(
|
|
15619
|
-
i18nContext.xref,
|
|
15620
|
-
i18nBlock.xref,
|
|
15621
|
-
i18nBlock.handle,
|
|
15622
|
-
new LexicalReadExpr(icuOp.icu.expression),
|
|
15623
|
-
icuOp.icu.expressionPlaceholder,
|
|
15624
|
-
I18nParamResolutionTime.Postproccessing,
|
|
15625
|
-
null
|
|
15626
|
-
));
|
|
15627
|
-
break;
|
|
15628
|
-
}
|
|
15629
|
-
}
|
|
15630
|
-
}
|
|
15631
|
-
}
|
|
15632
15650
|
function configureDeferInstructions(job) {
|
|
15633
15651
|
for (const unit of job.units) {
|
|
15634
15652
|
for (const op of unit.create) {
|
|
@@ -15933,18 +15951,23 @@ function extractI18nMessages(job) {
|
|
|
15933
15951
|
}
|
|
15934
15952
|
for (const unit of job.units) {
|
|
15935
15953
|
for (const op of unit.create) {
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15954
|
+
switch (op.kind) {
|
|
15955
|
+
case OpKind.IcuStart:
|
|
15956
|
+
if (!op.context) {
|
|
15957
|
+
throw Error("ICU op should have its context set.");
|
|
15958
|
+
}
|
|
15959
|
+
if (!i18nBlockContexts.has(op.context)) {
|
|
15960
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
15961
|
+
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
15962
|
+
unit.create.push(subMessage);
|
|
15963
|
+
const parentMessage = i18nBlockMessages.get(i18nContext.i18nBlock);
|
|
15964
|
+
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
15965
|
+
}
|
|
15966
|
+
OpList.remove(op);
|
|
15967
|
+
break;
|
|
15968
|
+
case OpKind.IcuEnd:
|
|
15969
|
+
OpList.remove(op);
|
|
15970
|
+
break;
|
|
15948
15971
|
}
|
|
15949
15972
|
}
|
|
15950
15973
|
}
|
|
@@ -15960,7 +15983,7 @@ function createI18nMessage(job, context, messagePlaceholder) {
|
|
|
15960
15983
|
}
|
|
15961
15984
|
function formatParams(params) {
|
|
15962
15985
|
const result = /* @__PURE__ */ new Map();
|
|
15963
|
-
for (const [placeholder, placeholderValues] of
|
|
15986
|
+
for (const [placeholder, placeholderValues] of params) {
|
|
15964
15987
|
const serializedValues = formatParamValues(placeholderValues);
|
|
15965
15988
|
if (serializedValues !== null) {
|
|
15966
15989
|
result.set(placeholder, literal(formatParamValues(placeholderValues)));
|
|
@@ -15976,6 +15999,9 @@ function formatParamValues(values) {
|
|
|
15976
15999
|
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
15977
16000
|
}
|
|
15978
16001
|
function formatValue(value) {
|
|
16002
|
+
if (value.flags === I18nParamValueFlags.None) {
|
|
16003
|
+
return `${value.value}`;
|
|
16004
|
+
}
|
|
15979
16005
|
let tagMarker = "";
|
|
15980
16006
|
let closeMarker = "";
|
|
15981
16007
|
if (value.flags & I18nParamValueFlags.ElementTag) {
|
|
@@ -16223,6 +16249,9 @@ var IcuSerializerVisitor = class {
|
|
|
16223
16249
|
visitPlaceholder(ph) {
|
|
16224
16250
|
return this.formatPh(ph.name);
|
|
16225
16251
|
}
|
|
16252
|
+
visitBlockPlaceholder(ph) {
|
|
16253
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
16254
|
+
}
|
|
16226
16255
|
visitIcuPlaceholder(ph, context) {
|
|
16227
16256
|
return this.formatPh(ph.name);
|
|
16228
16257
|
}
|
|
@@ -17560,12 +17589,12 @@ var Comment = class {
|
|
|
17560
17589
|
return visitor.visitComment(this, context);
|
|
17561
17590
|
}
|
|
17562
17591
|
};
|
|
17563
|
-
var Block = class {
|
|
17564
|
-
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null) {
|
|
17592
|
+
var Block = class extends NodeWithI18n {
|
|
17593
|
+
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n2) {
|
|
17594
|
+
super(sourceSpan, i18n2);
|
|
17565
17595
|
this.name = name;
|
|
17566
17596
|
this.parameters = parameters;
|
|
17567
17597
|
this.children = children;
|
|
17568
|
-
this.sourceSpan = sourceSpan;
|
|
17569
17598
|
this.nameSpan = nameSpan;
|
|
17570
17599
|
this.startSourceSpan = startSourceSpan;
|
|
17571
17600
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -18135,6 +18164,24 @@ var PlaceholderRegistry = class {
|
|
|
18135
18164
|
getUniquePlaceholder(name) {
|
|
18136
18165
|
return this._generateUniqueName(name.toUpperCase());
|
|
18137
18166
|
}
|
|
18167
|
+
getStartBlockPlaceholderName(name, parameters) {
|
|
18168
|
+
const signature = this._hashBlock(name, parameters);
|
|
18169
|
+
if (this._signatureToName[signature]) {
|
|
18170
|
+
return this._signatureToName[signature];
|
|
18171
|
+
}
|
|
18172
|
+
const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);
|
|
18173
|
+
this._signatureToName[signature] = placeholder;
|
|
18174
|
+
return placeholder;
|
|
18175
|
+
}
|
|
18176
|
+
getCloseBlockPlaceholderName(name) {
|
|
18177
|
+
const signature = this._hashClosingBlock(name);
|
|
18178
|
+
if (this._signatureToName[signature]) {
|
|
18179
|
+
return this._signatureToName[signature];
|
|
18180
|
+
}
|
|
18181
|
+
const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);
|
|
18182
|
+
this._signatureToName[signature] = placeholder;
|
|
18183
|
+
return placeholder;
|
|
18184
|
+
}
|
|
18138
18185
|
_hashTag(tag, attrs, isVoid) {
|
|
18139
18186
|
const start = `<${tag}`;
|
|
18140
18187
|
const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join("");
|
|
@@ -18144,6 +18191,16 @@ var PlaceholderRegistry = class {
|
|
|
18144
18191
|
_hashClosingTag(tag) {
|
|
18145
18192
|
return this._hashTag(`/${tag}`, {}, false);
|
|
18146
18193
|
}
|
|
18194
|
+
_hashBlock(name, parameters) {
|
|
18195
|
+
const params = parameters.length === 0 ? "" : ` (${parameters.sort().join("; ")})`;
|
|
18196
|
+
return `@${name}${params} {}`;
|
|
18197
|
+
}
|
|
18198
|
+
_hashClosingBlock(name) {
|
|
18199
|
+
return this._hashBlock(`close_${name}`, []);
|
|
18200
|
+
}
|
|
18201
|
+
_toSnakeCase(name) {
|
|
18202
|
+
return name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
18203
|
+
}
|
|
18147
18204
|
_generateUniqueName(base) {
|
|
18148
18205
|
const seen = this._placeHolderNameCounts.hasOwnProperty(base);
|
|
18149
18206
|
if (!seen) {
|
|
@@ -18156,17 +18213,18 @@ var PlaceholderRegistry = class {
|
|
|
18156
18213
|
}
|
|
18157
18214
|
};
|
|
18158
18215
|
var _expParser = new Parser$1(new Lexer());
|
|
18159
|
-
function createI18nMessageFactory(interpolationConfig) {
|
|
18160
|
-
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
18216
|
+
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
18217
|
+
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
18161
18218
|
return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
18162
18219
|
}
|
|
18163
18220
|
function noopVisitNodeFn(_html, i18n2) {
|
|
18164
18221
|
return i18n2;
|
|
18165
18222
|
}
|
|
18166
18223
|
var _I18nVisitor = class {
|
|
18167
|
-
constructor(_expressionParser, _interpolationConfig) {
|
|
18224
|
+
constructor(_expressionParser, _interpolationConfig, _containerBlocks) {
|
|
18168
18225
|
this._expressionParser = _expressionParser;
|
|
18169
18226
|
this._interpolationConfig = _interpolationConfig;
|
|
18227
|
+
this._containerBlocks = _containerBlocks;
|
|
18170
18228
|
}
|
|
18171
18229
|
toI18nMessage(nodes, meaning = "", description = "", customId = "", visitNodeFn) {
|
|
18172
18230
|
const context = {
|
|
@@ -18241,11 +18299,27 @@ var _I18nVisitor = class {
|
|
|
18241
18299
|
throw new Error("Unreachable code");
|
|
18242
18300
|
}
|
|
18243
18301
|
visitBlock(block, context) {
|
|
18302
|
+
var _a2;
|
|
18244
18303
|
const children = visitAll(this, block.children, context);
|
|
18245
|
-
|
|
18304
|
+
if (this._containerBlocks.has(block.name)) {
|
|
18305
|
+
return new Container(children, block.sourceSpan);
|
|
18306
|
+
}
|
|
18307
|
+
const parameters = block.parameters.map((param) => param.expression);
|
|
18308
|
+
const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);
|
|
18309
|
+
const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);
|
|
18310
|
+
context.placeholderToContent[startPhName] = {
|
|
18311
|
+
text: block.startSourceSpan.toString(),
|
|
18312
|
+
sourceSpan: block.startSourceSpan
|
|
18313
|
+
};
|
|
18314
|
+
context.placeholderToContent[closePhName] = {
|
|
18315
|
+
text: block.endSourceSpan ? block.endSourceSpan.toString() : "}",
|
|
18316
|
+
sourceSpan: (_a2 = block.endSourceSpan) != null ? _a2 : block.sourceSpan
|
|
18317
|
+
};
|
|
18318
|
+
const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);
|
|
18246
18319
|
return context.visitNodeFn(block, node);
|
|
18247
18320
|
}
|
|
18248
18321
|
visitBlockParameter(_parameter, _context) {
|
|
18322
|
+
throw new Error("Unreachable code");
|
|
18249
18323
|
}
|
|
18250
18324
|
_visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {
|
|
18251
18325
|
const nodes = [];
|
|
@@ -21773,16 +21847,17 @@ var setI18nRefs = (htmlNode, i18nNode) => {
|
|
|
21773
21847
|
return i18nNode;
|
|
21774
21848
|
};
|
|
21775
21849
|
var I18nMetaVisitor = class {
|
|
21776
|
-
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {
|
|
21850
|
+
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS) {
|
|
21777
21851
|
this.interpolationConfig = interpolationConfig;
|
|
21778
21852
|
this.keepI18nAttrs = keepI18nAttrs;
|
|
21779
21853
|
this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
|
|
21854
|
+
this.containerBlocks = containerBlocks;
|
|
21780
21855
|
this.hasI18nMeta = false;
|
|
21781
21856
|
this._errors = [];
|
|
21782
21857
|
}
|
|
21783
21858
|
_generateI18nMessage(nodes, meta = "", visitNodeFn) {
|
|
21784
21859
|
const { meaning, description, customId } = this._parseMetadata(meta);
|
|
21785
|
-
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig);
|
|
21860
|
+
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks);
|
|
21786
21861
|
const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
|
|
21787
21862
|
this._setMessageId(message, meta);
|
|
21788
21863
|
this._setLegacyIds(message, meta);
|
|
@@ -21955,6 +22030,9 @@ var GetMsgSerializerVisitor = class {
|
|
|
21955
22030
|
visitPlaceholder(ph) {
|
|
21956
22031
|
return this.formatPh(ph.name);
|
|
21957
22032
|
}
|
|
22033
|
+
visitBlockPlaceholder(ph) {
|
|
22034
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
22035
|
+
}
|
|
21958
22036
|
visitIcuPlaceholder(ph, context) {
|
|
21959
22037
|
return this.formatPh(ph.name);
|
|
21960
22038
|
}
|
|
@@ -22001,6 +22079,12 @@ var LocalizeSerializerVisitor = class {
|
|
|
22001
22079
|
visitPlaceholder(ph) {
|
|
22002
22080
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
|
|
22003
22081
|
}
|
|
22082
|
+
visitBlockPlaceholder(ph) {
|
|
22083
|
+
var _a2, _b2;
|
|
22084
|
+
this.pieces.push(this.createPlaceholderPiece(ph.startName, (_a2 = ph.startSourceSpan) != null ? _a2 : ph.sourceSpan));
|
|
22085
|
+
ph.children.forEach((child) => child.visit(this));
|
|
22086
|
+
this.pieces.push(this.createPlaceholderPiece(ph.closeName, (_b2 = ph.endSourceSpan) != null ? _b2 : ph.sourceSpan));
|
|
22087
|
+
}
|
|
22004
22088
|
visitIcuPlaceholder(ph) {
|
|
22005
22089
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));
|
|
22006
22090
|
}
|
|
@@ -22080,11 +22164,13 @@ function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
|
|
|
22080
22164
|
statements.push(...subMessageStatements);
|
|
22081
22165
|
messageOp.params.set(subMessage.messagePlaceholder, subMessageVar);
|
|
22082
22166
|
}
|
|
22167
|
+
messageOp.params = new Map([...messageOp.params.entries()].sort());
|
|
22083
22168
|
assertAllParamsResolved(messageOp);
|
|
22084
22169
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX));
|
|
22085
22170
|
const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
22086
22171
|
let transformFn = void 0;
|
|
22087
22172
|
if (messageOp.needsPostprocessing) {
|
|
22173
|
+
messageOp.postprocessingParams = new Map([...messageOp.postprocessingParams.entries()].sort());
|
|
22088
22174
|
const extraTransformFnParams = [];
|
|
22089
22175
|
if (messageOp.postprocessingParams.size > 0) {
|
|
22090
22176
|
extraTransformFnParams.push(literalMap([...messageOp.postprocessingParams].map(([key, value]) => ({ key, value, quoted: true }))));
|
|
@@ -22122,12 +22208,14 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
22122
22208
|
return variable(name);
|
|
22123
22209
|
}
|
|
22124
22210
|
function assertAllParamsResolved(op) {
|
|
22125
|
-
for (
|
|
22211
|
+
for (let placeholder in op.message.placeholders) {
|
|
22212
|
+
placeholder = placeholder.trimEnd();
|
|
22126
22213
|
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
22127
22214
|
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
22128
22215
|
}
|
|
22129
22216
|
}
|
|
22130
|
-
for (
|
|
22217
|
+
for (let placeholder in op.message.placeholderToMessage) {
|
|
22218
|
+
placeholder = placeholder.trimEnd();
|
|
22131
22219
|
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
22132
22220
|
throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
|
|
22133
22221
|
}
|
|
@@ -22137,7 +22225,9 @@ function extractI18nText(job) {
|
|
|
22137
22225
|
var _a2;
|
|
22138
22226
|
for (const unit of job.units) {
|
|
22139
22227
|
let currentI18n = null;
|
|
22228
|
+
let currentIcu = null;
|
|
22140
22229
|
const textNodeI18nBlocks = /* @__PURE__ */ new Map();
|
|
22230
|
+
const textNodeIcus = /* @__PURE__ */ new Map();
|
|
22141
22231
|
for (const op of unit.create) {
|
|
22142
22232
|
switch (op.kind) {
|
|
22143
22233
|
case OpKind.I18nStart:
|
|
@@ -22149,9 +22239,19 @@ function extractI18nText(job) {
|
|
|
22149
22239
|
case OpKind.I18nEnd:
|
|
22150
22240
|
currentI18n = null;
|
|
22151
22241
|
break;
|
|
22242
|
+
case OpKind.IcuStart:
|
|
22243
|
+
if (op.context === null) {
|
|
22244
|
+
throw Error("Icu op should have its context set.");
|
|
22245
|
+
}
|
|
22246
|
+
currentIcu = op;
|
|
22247
|
+
break;
|
|
22248
|
+
case OpKind.IcuEnd:
|
|
22249
|
+
currentIcu = null;
|
|
22250
|
+
break;
|
|
22152
22251
|
case OpKind.Text:
|
|
22153
22252
|
if (currentI18n !== null) {
|
|
22154
22253
|
textNodeI18nBlocks.set(op.xref, currentI18n);
|
|
22254
|
+
textNodeIcus.set(op.xref, currentIcu);
|
|
22155
22255
|
OpList.remove(op);
|
|
22156
22256
|
}
|
|
22157
22257
|
break;
|
|
@@ -22164,11 +22264,13 @@ function extractI18nText(job) {
|
|
|
22164
22264
|
continue;
|
|
22165
22265
|
}
|
|
22166
22266
|
const i18nOp = textNodeI18nBlocks.get(op.target);
|
|
22267
|
+
const icuOp = textNodeIcus.get(op.target);
|
|
22268
|
+
const contextId = icuOp ? icuOp.context : i18nOp.context;
|
|
22269
|
+
const resolutionTime = icuOp ? I18nParamResolutionTime.Postproccessing : I18nParamResolutionTime.Creation;
|
|
22167
22270
|
const ops = [];
|
|
22168
22271
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
22169
22272
|
const expr = op.interpolation.expressions[i];
|
|
22170
|
-
|
|
22171
|
-
ops.push(createI18nExpressionOp(i18nOp.context, i18nOp.xref, i18nOp.handle, expr, placeholder.name, I18nParamResolutionTime.Creation, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
22273
|
+
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.handle, expr, op.i18nPlaceholders[i], resolutionTime, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
22172
22274
|
}
|
|
22173
22275
|
OpList.replaceWithMany(op, ops);
|
|
22174
22276
|
break;
|
|
@@ -23024,8 +23126,8 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
|
|
|
23024
23126
|
}
|
|
23025
23127
|
return call(Identifiers.repeaterCreate, args, sourceSpan);
|
|
23026
23128
|
}
|
|
23027
|
-
function repeater(
|
|
23028
|
-
return call(Identifiers.repeater, [
|
|
23129
|
+
function repeater(collection, sourceSpan) {
|
|
23130
|
+
return call(Identifiers.repeater, [collection], sourceSpan);
|
|
23029
23131
|
}
|
|
23030
23132
|
function deferWhen(prefetch, expr, sourceSpan) {
|
|
23031
23133
|
return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
|
|
@@ -23581,7 +23683,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
23581
23683
|
OpList.replace(op, conditional(op.targetSlot.slot, op.processed, op.contextValue, op.sourceSpan));
|
|
23582
23684
|
break;
|
|
23583
23685
|
case OpKind.Repeater:
|
|
23584
|
-
OpList.replace(op, repeater(op.
|
|
23686
|
+
OpList.replace(op, repeater(op.collection, op.sourceSpan));
|
|
23585
23687
|
break;
|
|
23586
23688
|
case OpKind.DeferWhen:
|
|
23587
23689
|
OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
|
|
@@ -23858,7 +23960,7 @@ function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
|
23858
23960
|
}
|
|
23859
23961
|
return i18nOp.subTemplateIndex;
|
|
23860
23962
|
}
|
|
23861
|
-
function addParam(params, placeholder, value, subTemplateIndex, flags
|
|
23963
|
+
function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
23862
23964
|
var _a2;
|
|
23863
23965
|
const values = (_a2 = params.get(placeholder)) != null ? _a2 : [];
|
|
23864
23966
|
values.push({ value, subTemplateIndex, flags });
|
|
@@ -23883,18 +23985,80 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
23883
23985
|
for (const unit of job.units) {
|
|
23884
23986
|
for (const op of unit.update) {
|
|
23885
23987
|
if (op.kind === OpKind.I18nExpression) {
|
|
23886
|
-
const index2 = expressionIndices.get(op.context) || 0;
|
|
23887
23988
|
const i18nContext = i18nContexts.get(op.context);
|
|
23989
|
+
const index2 = expressionIndices.get(i18nContext.i18nBlock) || 0;
|
|
23888
23990
|
const subTemplateIndex = subTemplateIndicies.get(i18nContext.i18nBlock);
|
|
23889
23991
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
23890
23992
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
23891
|
-
values.push({
|
|
23993
|
+
values.push({
|
|
23994
|
+
value: index2,
|
|
23995
|
+
subTemplateIndex,
|
|
23996
|
+
flags: I18nParamValueFlags.ExpressionIndex
|
|
23997
|
+
});
|
|
23892
23998
|
params.set(op.i18nPlaceholder, values);
|
|
23893
|
-
expressionIndices.set(
|
|
23999
|
+
expressionIndices.set(i18nContext.i18nBlock, index2 + 1);
|
|
23894
24000
|
}
|
|
23895
24001
|
}
|
|
23896
24002
|
}
|
|
23897
24003
|
}
|
|
24004
|
+
function resolveI18nIcuPlaceholders(job) {
|
|
24005
|
+
const contextOps = /* @__PURE__ */ new Map();
|
|
24006
|
+
for (const unit of job.units) {
|
|
24007
|
+
for (const op of unit.create) {
|
|
24008
|
+
switch (op.kind) {
|
|
24009
|
+
case OpKind.I18nContext:
|
|
24010
|
+
contextOps.set(op.xref, op);
|
|
24011
|
+
break;
|
|
24012
|
+
}
|
|
24013
|
+
}
|
|
24014
|
+
}
|
|
24015
|
+
for (const unit of job.units) {
|
|
24016
|
+
for (const op of unit.create) {
|
|
24017
|
+
switch (op.kind) {
|
|
24018
|
+
case OpKind.IcuStart:
|
|
24019
|
+
if (op.context === null) {
|
|
24020
|
+
throw Error("Icu should have its i18n context set.");
|
|
24021
|
+
}
|
|
24022
|
+
const i18nContext = contextOps.get(op.context);
|
|
24023
|
+
for (const node of op.message.nodes) {
|
|
24024
|
+
node.visit(new ResolveIcuPlaceholdersVisitor(i18nContext.postprocessingParams));
|
|
24025
|
+
}
|
|
24026
|
+
break;
|
|
24027
|
+
}
|
|
24028
|
+
}
|
|
24029
|
+
}
|
|
24030
|
+
}
|
|
24031
|
+
var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
24032
|
+
constructor(params) {
|
|
24033
|
+
super();
|
|
24034
|
+
this.params = params;
|
|
24035
|
+
}
|
|
24036
|
+
visitContainerPlaceholder(placeholder) {
|
|
24037
|
+
var _a2, _b2;
|
|
24038
|
+
if (placeholder.startName && placeholder.startSourceSpan && !this.params.has(placeholder.startName)) {
|
|
24039
|
+
this.params.set(placeholder.startName, [{
|
|
24040
|
+
value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
|
|
24041
|
+
subTemplateIndex: null,
|
|
24042
|
+
flags: I18nParamValueFlags.None
|
|
24043
|
+
}]);
|
|
24044
|
+
}
|
|
24045
|
+
if (placeholder.closeName && placeholder.endSourceSpan && !this.params.has(placeholder.closeName)) {
|
|
24046
|
+
this.params.set(placeholder.closeName, [{
|
|
24047
|
+
value: (_b2 = placeholder.endSourceSpan) == null ? void 0 : _b2.toString(),
|
|
24048
|
+
subTemplateIndex: null,
|
|
24049
|
+
flags: I18nParamValueFlags.None
|
|
24050
|
+
}]);
|
|
24051
|
+
}
|
|
24052
|
+
}
|
|
24053
|
+
visitTagPlaceholder(placeholder) {
|
|
24054
|
+
super.visitTagPlaceholder(placeholder);
|
|
24055
|
+
this.visitContainerPlaceholder(placeholder);
|
|
24056
|
+
}
|
|
24057
|
+
visitBlockPlaceholder(placeholder) {
|
|
24058
|
+
super.visitBlockPlaceholder(placeholder);
|
|
24059
|
+
this.visitContainerPlaceholder(placeholder);
|
|
24060
|
+
}
|
|
24061
|
+
};
|
|
23898
24062
|
function resolveNames(job) {
|
|
23899
24063
|
for (const unit of job.units) {
|
|
23900
24064
|
processLexicalScope(unit, unit.create, null);
|
|
@@ -24588,6 +24752,7 @@ function allowConservativeInlining(decl2, target) {
|
|
|
24588
24752
|
function wrapI18nIcus(job) {
|
|
24589
24753
|
for (const unit of job.units) {
|
|
24590
24754
|
let currentI18nOp = null;
|
|
24755
|
+
let addedI18nId = null;
|
|
24591
24756
|
for (const op of unit.create) {
|
|
24592
24757
|
switch (op.kind) {
|
|
24593
24758
|
case OpKind.I18nStart:
|
|
@@ -24596,11 +24761,16 @@ function wrapI18nIcus(job) {
|
|
|
24596
24761
|
case OpKind.I18nEnd:
|
|
24597
24762
|
currentI18nOp = null;
|
|
24598
24763
|
break;
|
|
24599
|
-
case OpKind.
|
|
24764
|
+
case OpKind.IcuStart:
|
|
24600
24765
|
if (currentI18nOp === null) {
|
|
24601
|
-
|
|
24602
|
-
OpList.insertBefore(createI18nStartOp(
|
|
24603
|
-
|
|
24766
|
+
addedI18nId = job.allocateXrefId();
|
|
24767
|
+
OpList.insertBefore(createI18nStartOp(addedI18nId, op.message), op);
|
|
24768
|
+
}
|
|
24769
|
+
break;
|
|
24770
|
+
case OpKind.IcuEnd:
|
|
24771
|
+
if (addedI18nId !== null) {
|
|
24772
|
+
OpList.insertAfter(createI18nEndOp(addedI18nId), op);
|
|
24773
|
+
addedI18nId = null;
|
|
24604
24774
|
}
|
|
24605
24775
|
break;
|
|
24606
24776
|
}
|
|
@@ -24625,7 +24795,6 @@ var phases = [
|
|
|
24625
24795
|
{ kind: CompilationJobKind.Tmpl, fn: createPipes },
|
|
24626
24796
|
{ kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
|
|
24627
24797
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nText },
|
|
24628
|
-
{ kind: CompilationJobKind.Tmpl, fn: createI18nIcuExpressions },
|
|
24629
24798
|
{ kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
|
|
24630
24799
|
{ kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
|
|
24631
24800
|
{ kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
|
|
@@ -24649,6 +24818,7 @@ var phases = [
|
|
|
24649
24818
|
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
24650
24819
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
24651
24820
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
24821
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
24652
24822
|
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
24653
24823
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
24654
24824
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
@@ -24911,7 +25081,7 @@ function ingestContent(unit, content) {
|
|
|
24911
25081
|
function ingestText(unit, text2) {
|
|
24912
25082
|
unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, text2.sourceSpan));
|
|
24913
25083
|
}
|
|
24914
|
-
function ingestBoundText(unit, text2) {
|
|
25084
|
+
function ingestBoundText(unit, text2, i18nPlaceholders) {
|
|
24915
25085
|
var _a2;
|
|
24916
25086
|
let value = text2.value;
|
|
24917
25087
|
if (value instanceof ASTWithSource) {
|
|
@@ -24923,7 +25093,12 @@ function ingestBoundText(unit, text2) {
|
|
|
24923
25093
|
if (text2.i18n !== void 0 && !(text2.i18n instanceof Container)) {
|
|
24924
25094
|
throw Error(`Unhandled i18n metadata type for text interpolation: ${(_a2 = text2.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
24925
25095
|
}
|
|
24926
|
-
|
|
25096
|
+
if (i18nPlaceholders === void 0) {
|
|
25097
|
+
i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
|
|
25098
|
+
}
|
|
25099
|
+
if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {
|
|
25100
|
+
throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);
|
|
25101
|
+
}
|
|
24927
25102
|
const textXref = unit.job.allocateXrefId();
|
|
24928
25103
|
unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
|
|
24929
25104
|
const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
|
|
@@ -25069,13 +25244,26 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
25069
25244
|
unit.update.push(deferWhenOps);
|
|
25070
25245
|
}
|
|
25071
25246
|
function ingestIcu(unit, icu) {
|
|
25072
|
-
var _a2;
|
|
25247
|
+
var _a2, _b2;
|
|
25073
25248
|
if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
|
|
25074
25249
|
const xref = unit.job.allocateXrefId();
|
|
25075
|
-
|
|
25076
|
-
unit.
|
|
25250
|
+
const icuNode = icu.i18n.nodes[0];
|
|
25251
|
+
unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
|
|
25252
|
+
const expressionPlaceholder = (_a2 = icuNode.expressionPlaceholder) == null ? void 0 : _a2.trimEnd();
|
|
25253
|
+
if (expressionPlaceholder === void 0 || icu.vars[expressionPlaceholder] === void 0) {
|
|
25254
|
+
throw Error("ICU should have a text binding");
|
|
25255
|
+
}
|
|
25256
|
+
ingestBoundText(unit, icu.vars[expressionPlaceholder], [expressionPlaceholder]);
|
|
25257
|
+
for (const [placeholder, text2] of Object.entries(icu.placeholders)) {
|
|
25258
|
+
if (text2 instanceof BoundText) {
|
|
25259
|
+
ingestBoundText(unit, text2, [placeholder]);
|
|
25260
|
+
} else {
|
|
25261
|
+
ingestText(unit, text2);
|
|
25262
|
+
}
|
|
25263
|
+
}
|
|
25264
|
+
unit.create.push(createIcuEndOp(xref));
|
|
25077
25265
|
} else {
|
|
25078
|
-
throw Error(`Unhandled i18n metadata type for ICU: ${(
|
|
25266
|
+
throw Error(`Unhandled i18n metadata type for ICU: ${(_b2 = icu.i18n) == null ? void 0 : _b2.constructor.name}`);
|
|
25079
25267
|
}
|
|
25080
25268
|
}
|
|
25081
25269
|
function ingestForBlock(unit, forBlock) {
|
|
@@ -26145,18 +26333,18 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
26145
26333
|
const branches = [];
|
|
26146
26334
|
const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);
|
|
26147
26335
|
if (mainBlockParams !== null) {
|
|
26148
|
-
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan));
|
|
26336
|
+
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));
|
|
26149
26337
|
}
|
|
26150
26338
|
for (const block of connectedBlocks) {
|
|
26151
26339
|
if (ELSE_IF_PATTERN.test(block.name)) {
|
|
26152
26340
|
const params = parseConditionalBlockParameters(block, errors, bindingParser);
|
|
26153
26341
|
if (params !== null) {
|
|
26154
26342
|
const children = visitAll(visitor, block.children, block.children);
|
|
26155
|
-
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
26343
|
+
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
26156
26344
|
}
|
|
26157
26345
|
} else if (block.name === "else") {
|
|
26158
26346
|
const children = visitAll(visitor, block.children, block.children);
|
|
26159
|
-
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
26347
|
+
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
26160
26348
|
}
|
|
26161
26349
|
}
|
|
26162
26350
|
const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;
|
|
@@ -26184,7 +26372,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
26184
26372
|
} else if (block.parameters.length > 0) {
|
|
26185
26373
|
errors.push(new ParseError(block.sourceSpan, "@empty block cannot have parameters"));
|
|
26186
26374
|
} else {
|
|
26187
|
-
empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan);
|
|
26375
|
+
empty = new ForLoopBlockEmpty(visitAll(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);
|
|
26188
26376
|
}
|
|
26189
26377
|
} else {
|
|
26190
26378
|
errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block "${block.name}"`));
|
|
@@ -26196,7 +26384,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
26196
26384
|
} else {
|
|
26197
26385
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
26198
26386
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
26199
|
-
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan);
|
|
26387
|
+
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);
|
|
26200
26388
|
}
|
|
26201
26389
|
}
|
|
26202
26390
|
return { node, errors };
|
|
@@ -26216,7 +26404,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
26216
26404
|
continue;
|
|
26217
26405
|
}
|
|
26218
26406
|
const expression = node.name === "case" ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
|
|
26219
|
-
const ast2 = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
|
|
26407
|
+
const ast2 = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
|
|
26220
26408
|
if (expression === null) {
|
|
26221
26409
|
defaultCase = ast2;
|
|
26222
26410
|
} else {
|
|
@@ -26700,7 +26888,7 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
26700
26888
|
endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
|
|
26701
26889
|
}
|
|
26702
26890
|
const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
|
|
26703
|
-
const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan);
|
|
26891
|
+
const node = new DeferredBlock(visitAll(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);
|
|
26704
26892
|
return { node, errors };
|
|
26705
26893
|
}
|
|
26706
26894
|
function parseConnectedBlocks(connectedBlocks, errors, visitor) {
|
|
@@ -26758,7 +26946,7 @@ function parsePlaceholderBlock(ast, visitor) {
|
|
|
26758
26946
|
throw new Error(`Unrecognized parameter in @placeholder block: "${param.expression}"`);
|
|
26759
26947
|
}
|
|
26760
26948
|
}
|
|
26761
|
-
return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
26949
|
+
return new DeferredBlockPlaceholder(visitAll(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
26762
26950
|
}
|
|
26763
26951
|
function parseLoadingBlock(ast, visitor) {
|
|
26764
26952
|
let afterTime = null;
|
|
@@ -26786,13 +26974,13 @@ function parseLoadingBlock(ast, visitor) {
|
|
|
26786
26974
|
throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
|
|
26787
26975
|
}
|
|
26788
26976
|
}
|
|
26789
|
-
return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
26977
|
+
return new DeferredBlockLoading(visitAll(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
26790
26978
|
}
|
|
26791
26979
|
function parseErrorBlock(ast, visitor) {
|
|
26792
26980
|
if (ast.parameters.length > 0) {
|
|
26793
26981
|
throw new Error(`@error block cannot have parameters`);
|
|
26794
26982
|
}
|
|
26795
|
-
return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
26983
|
+
return new DeferredBlockError(visitAll(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
26796
26984
|
}
|
|
26797
26985
|
function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
26798
26986
|
const triggers = {};
|
|
@@ -27272,6 +27460,11 @@ var I18nContext = class {
|
|
|
27272
27460
|
const content = { type, index: index2, ctx: this.id, isVoid: node.isVoid, closed };
|
|
27273
27461
|
updatePlaceholderMap(this.placeholders, ph, content);
|
|
27274
27462
|
}
|
|
27463
|
+
appendBlockPart(node, index2, closed) {
|
|
27464
|
+
const ph = closed ? node.closeName : node.startName;
|
|
27465
|
+
const content = { type: TagType.TEMPLATE, index: index2, ctx: this.id, closed };
|
|
27466
|
+
updatePlaceholderMap(this.placeholders, ph, content);
|
|
27467
|
+
}
|
|
27275
27468
|
get icus() {
|
|
27276
27469
|
return this._registry.icus;
|
|
27277
27470
|
}
|
|
@@ -27301,6 +27494,11 @@ var I18nContext = class {
|
|
|
27301
27494
|
this.appendTag(TagType.TEMPLATE, node, index2, true);
|
|
27302
27495
|
this._unresolvedCtxCount++;
|
|
27303
27496
|
}
|
|
27497
|
+
appendBlock(node, index2) {
|
|
27498
|
+
this.appendBlockPart(node, index2, false);
|
|
27499
|
+
this.appendBlockPart(node, index2, true);
|
|
27500
|
+
this._unresolvedCtxCount++;
|
|
27501
|
+
}
|
|
27304
27502
|
appendElement(node, index2, closed) {
|
|
27305
27503
|
this.appendTag(TagType.ELEMENT, node, index2, closed);
|
|
27306
27504
|
}
|
|
@@ -27494,12 +27692,18 @@ var TemplateDefinitionBuilder = class {
|
|
|
27494
27692
|
this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
|
|
27495
27693
|
});
|
|
27496
27694
|
}
|
|
27497
|
-
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2) {
|
|
27695
|
+
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2, variableAliases) {
|
|
27498
27696
|
this._ngContentSelectorsOffset = ngContentSelectorsOffset;
|
|
27499
27697
|
if (this._namespace !== Identifiers.namespaceHTML) {
|
|
27500
27698
|
this.creationInstruction(null, this._namespace);
|
|
27501
27699
|
}
|
|
27502
|
-
variables.forEach((v) =>
|
|
27700
|
+
variables.forEach((v) => {
|
|
27701
|
+
const alias = variableAliases == null ? void 0 : variableAliases[v.name];
|
|
27702
|
+
this.registerContextVariables(v.name, v.value);
|
|
27703
|
+
if (alias) {
|
|
27704
|
+
this.registerContextVariables(alias, v.value);
|
|
27705
|
+
}
|
|
27706
|
+
});
|
|
27503
27707
|
const initI18nContext = this.i18nContext || isI18nRootNode(i18n2) && !isSingleI18nIcu(i18n2) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n2);
|
|
27504
27708
|
const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);
|
|
27505
27709
|
if (initI18nContext) {
|
|
@@ -27554,12 +27758,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
27554
27758
|
this._constants.prepareStatements.push(...statements);
|
|
27555
27759
|
return _ref;
|
|
27556
27760
|
}
|
|
27557
|
-
registerContextVariables(
|
|
27761
|
+
registerContextVariables(name, value) {
|
|
27558
27762
|
const scopedName = this._bindingScope.freshReferenceName();
|
|
27559
27763
|
const retrievalLevel = this.level;
|
|
27560
|
-
const isDirect =
|
|
27561
|
-
const lhs = variable(
|
|
27562
|
-
this._bindingScope.set(retrievalLevel,
|
|
27764
|
+
const isDirect = value === DIRECT_CONTEXT_REFERENCE;
|
|
27765
|
+
const lhs = variable(name + scopedName);
|
|
27766
|
+
this._bindingScope.set(retrievalLevel, name, (scope) => {
|
|
27563
27767
|
return isDirect && scope.bindingLevel === retrievalLevel && !scope.isListenerScope() ? variable(CONTEXT_NAME) : lhs;
|
|
27564
27768
|
}, 1, (scope, relativeLevel) => {
|
|
27565
27769
|
let rhs;
|
|
@@ -27577,7 +27781,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
27577
27781
|
rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);
|
|
27578
27782
|
}
|
|
27579
27783
|
return [
|
|
27580
|
-
lhs.set(isDirect ? rhs : rhs.prop(
|
|
27784
|
+
lhs.set(isDirect ? rhs : rhs.prop(value || IMPLICIT_REFERENCE)).toConstDecl()
|
|
27581
27785
|
];
|
|
27582
27786
|
});
|
|
27583
27787
|
}
|
|
@@ -27916,16 +28120,20 @@ var TemplateDefinitionBuilder = class {
|
|
|
27916
28120
|
this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
|
|
27917
28121
|
}
|
|
27918
28122
|
}
|
|
27919
|
-
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [],
|
|
28123
|
+
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [], i18nMeta, variableAliases) {
|
|
27920
28124
|
const index2 = this.allocateDataSlot();
|
|
27921
|
-
if (this.i18n &&
|
|
27922
|
-
|
|
28125
|
+
if (this.i18n && i18nMeta) {
|
|
28126
|
+
if (i18nMeta instanceof BlockPlaceholder) {
|
|
28127
|
+
this.i18n.appendBlock(i18nMeta, index2);
|
|
28128
|
+
} else {
|
|
28129
|
+
this.i18n.appendTemplate(i18nMeta, index2);
|
|
28130
|
+
}
|
|
27923
28131
|
}
|
|
27924
28132
|
const contextName = `${this.contextName}${contextNameSuffix}_${index2}`;
|
|
27925
28133
|
const name = `${contextName}_Template`;
|
|
27926
28134
|
const visitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, index2, name, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this.elementLocations, this._constants);
|
|
27927
28135
|
this._nestedTemplateFns.push(() => {
|
|
27928
|
-
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset,
|
|
28136
|
+
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
27929
28137
|
this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(name));
|
|
27930
28138
|
if (visitor._ngContentReservedSlots.length) {
|
|
27931
28139
|
this._ngContentReservedSlots.push(...visitor._ngContentReservedSlots);
|
|
@@ -28008,7 +28216,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
28008
28216
|
const placeholders = this.i18nBindProps(icu.placeholders);
|
|
28009
28217
|
const message = icu.i18n;
|
|
28010
28218
|
const transformFn = (raw) => {
|
|
28011
|
-
const params = __spreadValues(__spreadValues({}, vars), placeholders);
|
|
28219
|
+
const params = Object.fromEntries(Object.entries(__spreadValues(__spreadValues({}, vars), placeholders)).sort());
|
|
28012
28220
|
const formatted = formatI18nPlaceholderNamesInMap(params, false);
|
|
28013
28221
|
return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
|
|
28014
28222
|
};
|
|
@@ -28035,7 +28243,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
28035
28243
|
tagName = inferredData.tagName;
|
|
28036
28244
|
attrsExprs = inferredData.attrsExprs;
|
|
28037
28245
|
}
|
|
28038
|
-
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs);
|
|
28246
|
+
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs, void 0, branch.i18n);
|
|
28039
28247
|
const processedExpression = expression === null ? null : expression.visit(this._valueConverter);
|
|
28040
28248
|
return { index: templateIndex, expression: processedExpression, alias: expressionAlias };
|
|
28041
28249
|
});
|
|
@@ -28069,7 +28277,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
28069
28277
|
}
|
|
28070
28278
|
visitSwitchBlock(block) {
|
|
28071
28279
|
const caseData = block.cases.map((currentCase) => {
|
|
28072
|
-
const index2 = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan);
|
|
28280
|
+
const index2 = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
|
|
28073
28281
|
const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
|
|
28074
28282
|
return { index: index2, expression };
|
|
28075
28283
|
});
|
|
@@ -28097,12 +28305,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
28097
28305
|
if (!metadata) {
|
|
28098
28306
|
throw new Error("Could not resolve `defer` block metadata. Block may need to be analyzed.");
|
|
28099
28307
|
}
|
|
28100
|
-
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan);
|
|
28101
|
-
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan) : null;
|
|
28308
|
+
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan, void 0, void 0, void 0, deferred.i18n);
|
|
28309
|
+
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan, void 0, void 0, void 0, loading.i18n) : null;
|
|
28102
28310
|
const loadingConsts = loading ? trimTrailingNulls([literal(loading.minimumTime), literal(loading.afterTime)]) : null;
|
|
28103
|
-
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan) : null;
|
|
28311
|
+
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan, void 0, void 0, void 0, placeholder.i18n) : null;
|
|
28104
28312
|
const placeholderConsts = placeholder && placeholder.minimumTime !== null ? literalArr([literal(placeholder.minimumTime)]) : null;
|
|
28105
|
-
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan) : null;
|
|
28313
|
+
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan, void 0, void 0, void 0, error2.i18n) : null;
|
|
28106
28314
|
const deferredIndex = this.allocateDataSlot();
|
|
28107
28315
|
const depsFnName = `${this.contextName}_Defer_${deferredIndex}_DepsFn`;
|
|
28108
28316
|
this.creationInstruction(deferred.sourceSpan, Identifiers.defer, trimTrailingNulls([
|
|
@@ -28211,11 +28419,14 @@ var TemplateDefinitionBuilder = class {
|
|
|
28211
28419
|
visitForLoopBlock(block) {
|
|
28212
28420
|
const blockIndex = this.allocateDataSlot();
|
|
28213
28421
|
const { tagName, attrsExprs } = this.inferProjectionDataFromInsertionPoint(block);
|
|
28214
|
-
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count]
|
|
28422
|
+
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count], block.i18n, {
|
|
28423
|
+
[block.contextVariables.$index.name]: this.getLevelSpecificVariableName("$index", this.level + 1),
|
|
28424
|
+
[block.contextVariables.$count.name]: this.getLevelSpecificVariableName("$count", this.level + 1)
|
|
28425
|
+
});
|
|
28215
28426
|
const { expression: trackByExpression, usesComponentInstance: trackByUsesComponentInstance } = this.createTrackByFunction(block);
|
|
28216
28427
|
let emptyData = null;
|
|
28217
28428
|
if (block.empty !== null) {
|
|
28218
|
-
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty");
|
|
28429
|
+
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty", void 0, block.empty.i18n);
|
|
28219
28430
|
this.allocateBindingSlots(null);
|
|
28220
28431
|
}
|
|
28221
28432
|
this.registerComputedLoopVariables(block, primaryData.scope);
|
|
@@ -28237,16 +28448,31 @@ var TemplateDefinitionBuilder = class {
|
|
|
28237
28448
|
return params;
|
|
28238
28449
|
});
|
|
28239
28450
|
const value = block.expression.visit(this._valueConverter);
|
|
28240
|
-
this.
|
|
28451
|
+
this.updateInstructionWithAdvance(blockIndex, block.sourceSpan, Identifiers.repeater, () => [this.convertPropertyBinding(value)]);
|
|
28241
28452
|
}
|
|
28242
28453
|
registerComputedLoopVariables(block, bindingScope) {
|
|
28243
|
-
const indexLocalName = block.contextVariables.$index.name;
|
|
28244
|
-
const countLocalName = block.contextVariables.$count.name;
|
|
28245
28454
|
const level = bindingScope.bindingLevel;
|
|
28246
|
-
bindingScope.set(level, block.contextVariables.$odd.name, (scope) =>
|
|
28247
|
-
|
|
28248
|
-
|
|
28249
|
-
bindingScope.set(level, block.contextVariables.$
|
|
28455
|
+
bindingScope.set(level, block.contextVariables.$odd.name, (scope, retrievalLevel) => {
|
|
28456
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).notIdentical(literal(0));
|
|
28457
|
+
});
|
|
28458
|
+
bindingScope.set(level, block.contextVariables.$even.name, (scope, retrievalLevel) => {
|
|
28459
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).identical(literal(0));
|
|
28460
|
+
});
|
|
28461
|
+
bindingScope.set(level, block.contextVariables.$first.name, (scope, retrievalLevel) => {
|
|
28462
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").identical(literal(0));
|
|
28463
|
+
});
|
|
28464
|
+
bindingScope.set(level, block.contextVariables.$last.name, (scope, retrievalLevel) => {
|
|
28465
|
+
const index2 = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index");
|
|
28466
|
+
const count = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$count");
|
|
28467
|
+
return index2.identical(count.minus(literal(1)));
|
|
28468
|
+
});
|
|
28469
|
+
}
|
|
28470
|
+
getLevelSpecificVariableName(name, level) {
|
|
28471
|
+
return `\u0275${name}_${level}`;
|
|
28472
|
+
}
|
|
28473
|
+
getLevelSpecificForLoopVariable(block, scope, retrievalLevel, name) {
|
|
28474
|
+
const scopeName = scope.bindingLevel === retrievalLevel ? block.contextVariables[name].name : this.getLevelSpecificVariableName(name, retrievalLevel);
|
|
28475
|
+
return scope.get(scopeName);
|
|
28250
28476
|
}
|
|
28251
28477
|
optimizeTrackByFunction(block) {
|
|
28252
28478
|
const indexLocalName = block.contextVariables.$index.name;
|
|
@@ -28656,7 +28882,7 @@ var BindingScope = class {
|
|
|
28656
28882
|
if (value.declareLocalCallback && !value.declare) {
|
|
28657
28883
|
value.declare = true;
|
|
28658
28884
|
}
|
|
28659
|
-
return typeof value.lhs === "function" ? value.lhs(this) : value.lhs;
|
|
28885
|
+
return typeof value.lhs === "function" ? value.lhs(this, value.retrievalLevel) : value.lhs;
|
|
28660
28886
|
}
|
|
28661
28887
|
current = current.parent;
|
|
28662
28888
|
}
|
|
@@ -28732,7 +28958,7 @@ var BindingScope = class {
|
|
|
28732
28958
|
const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
|
|
28733
28959
|
componentValue.declare = true;
|
|
28734
28960
|
this.maybeRestoreView();
|
|
28735
|
-
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this) : componentValue.lhs;
|
|
28961
|
+
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this, componentValue.retrievalLevel) : componentValue.lhs;
|
|
28736
28962
|
return name === DIRECT_CONTEXT_REFERENCE ? lhs : lhs.prop(name);
|
|
28737
28963
|
}
|
|
28738
28964
|
maybeRestoreView() {
|
|
@@ -30791,7 +31017,7 @@ function publishFacade(global) {
|
|
|
30791
31017
|
const ng = global.ng || (global.ng = {});
|
|
30792
31018
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
30793
31019
|
}
|
|
30794
|
-
var VERSION = new Version("17.0.
|
|
31020
|
+
var VERSION = new Version("17.0.4");
|
|
30795
31021
|
var _VisitorMode;
|
|
30796
31022
|
(function(_VisitorMode2) {
|
|
30797
31023
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
@@ -30827,7 +31053,7 @@ var FactoryTarget;
|
|
|
30827
31053
|
})(FactoryTarget || (FactoryTarget = {}));
|
|
30828
31054
|
publishFacade(_global);
|
|
30829
31055
|
|
|
30830
|
-
// bazel-out/
|
|
31056
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/tree-traversal.js
|
|
30831
31057
|
function visitElements(nodes, preorderCallback = () => {
|
|
30832
31058
|
}, postorderCallback = () => {
|
|
30833
31059
|
}) {
|
|
@@ -30907,7 +31133,7 @@ function replaceAt(str, offset, oldSubstr, newSubstr) {
|
|
|
30907
31133
|
return prefix + newSubstr + suffix;
|
|
30908
31134
|
}
|
|
30909
31135
|
|
|
30910
|
-
// bazel-out/
|
|
31136
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-template.js
|
|
30911
31137
|
var CardTemplateMigrator = class extends TemplateMigrator {
|
|
30912
31138
|
getUpdates(ast) {
|
|
30913
31139
|
const updates = [];
|
|
@@ -30924,7 +31150,7 @@ var CardTemplateMigrator = class extends TemplateMigrator {
|
|
|
30924
31150
|
}
|
|
30925
31151
|
};
|
|
30926
31152
|
|
|
30927
|
-
// bazel-out/
|
|
31153
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/checkbox/checkbox-styles.js
|
|
30928
31154
|
var CheckboxStylesMigrator = class extends StyleMigrator {
|
|
30929
31155
|
constructor() {
|
|
30930
31156
|
super(...arguments);
|
|
@@ -30948,7 +31174,7 @@ var CheckboxStylesMigrator = class extends StyleMigrator {
|
|
|
30948
31174
|
}
|
|
30949
31175
|
};
|
|
30950
31176
|
|
|
30951
|
-
// bazel-out/
|
|
31177
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-styles.js
|
|
30952
31178
|
var ChipsStylesMigrator = class extends StyleMigrator {
|
|
30953
31179
|
constructor() {
|
|
30954
31180
|
super(...arguments);
|
|
@@ -30979,7 +31205,7 @@ var ChipsStylesMigrator = class extends StyleMigrator {
|
|
|
30979
31205
|
}
|
|
30980
31206
|
};
|
|
30981
31207
|
|
|
30982
|
-
// bazel-out/
|
|
31208
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/chips/chips-template.js
|
|
30983
31209
|
var ChipsTemplateMigrator = class extends TemplateMigrator {
|
|
30984
31210
|
constructor() {
|
|
30985
31211
|
super(...arguments);
|
|
@@ -31059,7 +31285,7 @@ var ChipsTemplateMigrator = class extends TemplateMigrator {
|
|
|
31059
31285
|
}
|
|
31060
31286
|
};
|
|
31061
31287
|
|
|
31062
|
-
// bazel-out/
|
|
31288
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/dialog/dialog-styles.js
|
|
31063
31289
|
var DialogStylesMigrator = class extends StyleMigrator {
|
|
31064
31290
|
constructor() {
|
|
31065
31291
|
super(...arguments);
|
|
@@ -31089,7 +31315,7 @@ var DialogStylesMigrator = class extends StyleMigrator {
|
|
|
31089
31315
|
}
|
|
31090
31316
|
};
|
|
31091
31317
|
|
|
31092
|
-
// bazel-out/
|
|
31318
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-styles.js
|
|
31093
31319
|
var FormFieldStylesMigrator = class extends StyleMigrator {
|
|
31094
31320
|
constructor() {
|
|
31095
31321
|
super(...arguments);
|
|
@@ -31146,7 +31372,7 @@ var FormFieldStylesMigrator = class extends StyleMigrator {
|
|
|
31146
31372
|
}
|
|
31147
31373
|
};
|
|
31148
31374
|
|
|
31149
|
-
// bazel-out/
|
|
31375
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/input/input-styles.js
|
|
31150
31376
|
var InputStylesMigrator = class extends StyleMigrator {
|
|
31151
31377
|
constructor() {
|
|
31152
31378
|
super(...arguments);
|
|
@@ -31170,7 +31396,7 @@ var InputStylesMigrator = class extends StyleMigrator {
|
|
|
31170
31396
|
}
|
|
31171
31397
|
};
|
|
31172
31398
|
|
|
31173
|
-
// bazel-out/
|
|
31399
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/list/list-styles.js
|
|
31174
31400
|
var ListStylesMigrator = class extends StyleMigrator {
|
|
31175
31401
|
constructor() {
|
|
31176
31402
|
super(...arguments);
|
|
@@ -31201,7 +31427,7 @@ var ListStylesMigrator = class extends StyleMigrator {
|
|
|
31201
31427
|
}
|
|
31202
31428
|
};
|
|
31203
31429
|
|
|
31204
|
-
// bazel-out/
|
|
31430
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/menu/menu-styles.js
|
|
31205
31431
|
var MenuStylesMigrator = class extends StyleMigrator {
|
|
31206
31432
|
constructor() {
|
|
31207
31433
|
super(...arguments);
|
|
@@ -31234,7 +31460,7 @@ var MenuStylesMigrator = class extends StyleMigrator {
|
|
|
31234
31460
|
}
|
|
31235
31461
|
};
|
|
31236
31462
|
|
|
31237
|
-
// bazel-out/
|
|
31463
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/paginator/paginator-styles.js
|
|
31238
31464
|
var PaginatorStylesMigrator = class extends StyleMigrator {
|
|
31239
31465
|
constructor() {
|
|
31240
31466
|
super(...arguments);
|
|
@@ -31280,7 +31506,7 @@ var PaginatorStylesMigrator = class extends StyleMigrator {
|
|
|
31280
31506
|
}
|
|
31281
31507
|
};
|
|
31282
31508
|
|
|
31283
|
-
// bazel-out/
|
|
31509
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-bar/progress-bar-styles.js
|
|
31284
31510
|
var ProgressBarStylesMigrator = class extends StyleMigrator {
|
|
31285
31511
|
constructor() {
|
|
31286
31512
|
super(...arguments);
|
|
@@ -31304,7 +31530,7 @@ var ProgressBarStylesMigrator = class extends StyleMigrator {
|
|
|
31304
31530
|
}
|
|
31305
31531
|
};
|
|
31306
31532
|
|
|
31307
|
-
// bazel-out/
|
|
31533
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/progress-spinner/progress-spinner-styles.js
|
|
31308
31534
|
var ProgressSpinnerStylesMigrator = class extends StyleMigrator {
|
|
31309
31535
|
constructor() {
|
|
31310
31536
|
super(...arguments);
|
|
@@ -31331,7 +31557,7 @@ var ProgressSpinnerStylesMigrator = class extends StyleMigrator {
|
|
|
31331
31557
|
}
|
|
31332
31558
|
};
|
|
31333
31559
|
|
|
31334
|
-
// bazel-out/
|
|
31560
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/radio/radio-styles.js
|
|
31335
31561
|
var RadioStylesMigrator = class extends StyleMigrator {
|
|
31336
31562
|
constructor() {
|
|
31337
31563
|
super(...arguments);
|
|
@@ -31358,7 +31584,7 @@ var RadioStylesMigrator = class extends StyleMigrator {
|
|
|
31358
31584
|
}
|
|
31359
31585
|
};
|
|
31360
31586
|
|
|
31361
|
-
// bazel-out/
|
|
31587
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/select/select-styles.js
|
|
31362
31588
|
var SelectStylesMigrator = class extends StyleMigrator {
|
|
31363
31589
|
constructor() {
|
|
31364
31590
|
super(...arguments);
|
|
@@ -31389,7 +31615,7 @@ var SelectStylesMigrator = class extends StyleMigrator {
|
|
|
31389
31615
|
}
|
|
31390
31616
|
};
|
|
31391
31617
|
|
|
31392
|
-
// bazel-out/
|
|
31618
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slide-toggle/slide-toggle-styles.js
|
|
31393
31619
|
var SlideToggleStylesMigrator = class extends StyleMigrator {
|
|
31394
31620
|
constructor() {
|
|
31395
31621
|
super(...arguments);
|
|
@@ -31413,7 +31639,7 @@ var SlideToggleStylesMigrator = class extends StyleMigrator {
|
|
|
31413
31639
|
}
|
|
31414
31640
|
};
|
|
31415
31641
|
|
|
31416
|
-
// bazel-out/
|
|
31642
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-styles.js
|
|
31417
31643
|
var SliderStylesMigrator = class extends StyleMigrator {
|
|
31418
31644
|
constructor() {
|
|
31419
31645
|
super(...arguments);
|
|
@@ -31437,7 +31663,7 @@ var SliderStylesMigrator = class extends StyleMigrator {
|
|
|
31437
31663
|
}
|
|
31438
31664
|
};
|
|
31439
31665
|
|
|
31440
|
-
// bazel-out/
|
|
31666
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/snack-bar/snack-bar-styles.js
|
|
31441
31667
|
var SnackBarMigrator = class extends StyleMigrator {
|
|
31442
31668
|
constructor() {
|
|
31443
31669
|
super(...arguments);
|
|
@@ -31470,7 +31696,7 @@ var SnackBarMigrator = class extends StyleMigrator {
|
|
|
31470
31696
|
}
|
|
31471
31697
|
};
|
|
31472
31698
|
|
|
31473
|
-
// bazel-out/
|
|
31699
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/table/table-styles.js
|
|
31474
31700
|
var TableStylesMigrator = class extends StyleMigrator {
|
|
31475
31701
|
constructor() {
|
|
31476
31702
|
super(...arguments);
|
|
@@ -31511,7 +31737,7 @@ var TableStylesMigrator = class extends StyleMigrator {
|
|
|
31511
31737
|
}
|
|
31512
31738
|
};
|
|
31513
31739
|
|
|
31514
|
-
// bazel-out/
|
|
31740
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tabs/tabs-styles.js
|
|
31515
31741
|
var TabsStylesMigrator = class extends StyleMigrator {
|
|
31516
31742
|
constructor() {
|
|
31517
31743
|
super(...arguments);
|
|
@@ -31542,7 +31768,7 @@ var TabsStylesMigrator = class extends StyleMigrator {
|
|
|
31542
31768
|
}
|
|
31543
31769
|
};
|
|
31544
31770
|
|
|
31545
|
-
// bazel-out/
|
|
31771
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/tooltip/tooltip-styles.js
|
|
31546
31772
|
var TooltipStylesMigrator = class extends StyleMigrator {
|
|
31547
31773
|
constructor() {
|
|
31548
31774
|
super(...arguments);
|
|
@@ -31576,7 +31802,7 @@ var TooltipStylesMigrator = class extends StyleMigrator {
|
|
|
31576
31802
|
}
|
|
31577
31803
|
};
|
|
31578
31804
|
|
|
31579
|
-
// bazel-out/
|
|
31805
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/optgroup/optgroup-styles.js
|
|
31580
31806
|
var OptgroupStylesMigrator = class extends StyleMigrator {
|
|
31581
31807
|
constructor() {
|
|
31582
31808
|
super(...arguments);
|
|
@@ -31609,7 +31835,7 @@ var OptgroupStylesMigrator = class extends StyleMigrator {
|
|
|
31609
31835
|
}
|
|
31610
31836
|
};
|
|
31611
31837
|
|
|
31612
|
-
// bazel-out/
|
|
31838
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/option/option-styles.js
|
|
31613
31839
|
var OptionStylesMigrator = class extends StyleMigrator {
|
|
31614
31840
|
constructor() {
|
|
31615
31841
|
super(...arguments);
|
|
@@ -31662,7 +31888,7 @@ var OptionStylesMigrator = class extends StyleMigrator {
|
|
|
31662
31888
|
}
|
|
31663
31889
|
};
|
|
31664
31890
|
|
|
31665
|
-
// bazel-out/
|
|
31891
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/form-field/form-field-template.js
|
|
31666
31892
|
var FormFieldTemplateMigrator = class extends TemplateMigrator {
|
|
31667
31893
|
getUpdates(ast) {
|
|
31668
31894
|
const updates = [];
|
|
@@ -31679,7 +31905,7 @@ var FormFieldTemplateMigrator = class extends TemplateMigrator {
|
|
|
31679
31905
|
}
|
|
31680
31906
|
};
|
|
31681
31907
|
|
|
31682
|
-
// bazel-out/
|
|
31908
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/slider/slider-template.js
|
|
31683
31909
|
var BindingType;
|
|
31684
31910
|
(function(BindingType2) {
|
|
31685
31911
|
BindingType2[BindingType2["INPUT"] = 0] = "INPUT";
|
|
@@ -31805,7 +32031,7 @@ var SliderTemplateMigrator = class extends TemplateMigrator {
|
|
|
31805
32031
|
}
|
|
31806
32032
|
};
|
|
31807
32033
|
|
|
31808
|
-
// bazel-out/
|
|
32034
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/constants.js
|
|
31809
32035
|
var mappings = [
|
|
31810
32036
|
["display-4", "headline-1"],
|
|
31811
32037
|
["display-3", "headline-2"],
|
|
@@ -31822,7 +32048,7 @@ var RENAMED_TYPOGRAPHY_LEVELS = new Map(mappings);
|
|
|
31822
32048
|
var RENAMED_TYPOGRAPHY_CLASSES = new Map(mappings.map((m) => ["mat-" + m[0], "mat-" + m[1]]));
|
|
31823
32049
|
var COMBINED_TYPOGRAPHY_LEVELS = /* @__PURE__ */ new Map([["input", "body-1"]]);
|
|
31824
32050
|
|
|
31825
|
-
// bazel-out/
|
|
32051
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-template.js
|
|
31826
32052
|
var TypographyHierarchyTemplateMigrator = class extends TemplateMigrator {
|
|
31827
32053
|
getUpdates(ast) {
|
|
31828
32054
|
const updates = [];
|
|
@@ -31865,7 +32091,7 @@ var TypographyHierarchyTemplateMigrator = class extends TemplateMigrator {
|
|
|
31865
32091
|
}
|
|
31866
32092
|
};
|
|
31867
32093
|
|
|
31868
|
-
// bazel-out/
|
|
32094
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/components/typography-hierarchy/typography-hierarchy-styles.js
|
|
31869
32095
|
var TypographyHierarchyStylesMigrator = class extends StyleMigrator {
|
|
31870
32096
|
constructor() {
|
|
31871
32097
|
super();
|
|
@@ -31886,7 +32112,7 @@ var TypographyHierarchyStylesMigrator = class extends StyleMigrator {
|
|
|
31886
32112
|
}
|
|
31887
32113
|
};
|
|
31888
32114
|
|
|
31889
|
-
// bazel-out/
|
|
32115
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/index.js
|
|
31890
32116
|
var LEGACY_MODULES = new Set([
|
|
31891
32117
|
"legacy-autocomplete",
|
|
31892
32118
|
"legacy-autocomplete/testing",
|
|
@@ -32040,14 +32266,14 @@ var PERMANENT_MIGRATORS = [
|
|
|
32040
32266
|
];
|
|
32041
32267
|
var CORE_COMPONENTS = ["option", "optgroup"];
|
|
32042
32268
|
|
|
32043
|
-
// bazel-out/
|
|
32269
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
|
|
32044
32270
|
var import_schematics4 = require("@angular/cdk/schematics");
|
|
32045
32271
|
|
|
32046
|
-
// bazel-out/
|
|
32272
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
|
|
32047
32273
|
var import_schematics3 = require("@angular/cdk/schematics");
|
|
32048
32274
|
var ts = __toESM(require("typescript"));
|
|
32049
32275
|
|
|
32050
|
-
// bazel-out/
|
|
32276
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
|
|
32051
32277
|
var import_schematics = require("@angular/cdk/schematics");
|
|
32052
32278
|
var import_path = require("path");
|
|
32053
32279
|
|
|
@@ -32090,7 +32316,7 @@ var scss_syntax_default = import_scss_syntax.default;
|
|
|
32090
32316
|
var stringify3 = import_scss_syntax.default.stringify;
|
|
32091
32317
|
var parse3 = import_scss_syntax.default.parse;
|
|
32092
32318
|
|
|
32093
|
-
// bazel-out/
|
|
32319
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/theming-styles.js
|
|
32094
32320
|
var COMPONENTS_MIXIN_NAME = /\.([^(;]*)/;
|
|
32095
32321
|
var ThemingStylesMigration = class extends import_schematics.Migration {
|
|
32096
32322
|
constructor() {
|
|
@@ -32374,17 +32600,17 @@ function extractValueRange(content, colonIndex) {
|
|
|
32374
32600
|
return start > -1 && end > -1 ? { start, end, fullEnd } : null;
|
|
32375
32601
|
}
|
|
32376
32602
|
|
|
32377
|
-
// bazel-out/
|
|
32603
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
|
|
32378
32604
|
var import_schematics2 = require("@angular/cdk/schematics");
|
|
32379
32605
|
|
|
32380
|
-
// bazel-out/
|
|
32606
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/migration-utilities/update.js
|
|
32381
32607
|
function writeUpdates(content, updates) {
|
|
32382
32608
|
updates.sort((a, b) => b.offset - a.offset);
|
|
32383
32609
|
updates.forEach((update) => content = update.updateFn(content));
|
|
32384
32610
|
return content;
|
|
32385
32611
|
}
|
|
32386
32612
|
|
|
32387
|
-
// bazel-out/
|
|
32613
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/template-migration.js
|
|
32388
32614
|
var TemplateMigration = class extends import_schematics2.Migration {
|
|
32389
32615
|
constructor() {
|
|
32390
32616
|
super(...arguments);
|
|
@@ -32412,7 +32638,7 @@ var TemplateMigration = class extends import_schematics2.Migration {
|
|
|
32412
32638
|
}
|
|
32413
32639
|
};
|
|
32414
32640
|
|
|
32415
|
-
// bazel-out/
|
|
32641
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/rules/ts-migration/runtime-migration.js
|
|
32416
32642
|
var RuntimeCodeMigration = class extends import_schematics3.Migration {
|
|
32417
32643
|
constructor() {
|
|
32418
32644
|
super(...arguments);
|
|
@@ -32641,7 +32867,7 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
|
|
|
32641
32867
|
}
|
|
32642
32868
|
};
|
|
32643
32869
|
|
|
32644
|
-
// bazel-out/
|
|
32870
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/mdc-migration/index.mjs
|
|
32645
32871
|
var migrationGroups = [
|
|
32646
32872
|
["autocomplete", "form-field", "input", "option", "optgroup", "select"],
|
|
32647
32873
|
["button"],
|
|
@@ -32745,7 +32971,7 @@ ${[...componentsToMigrate].join("\n")}`);
|
|
|
32745
32971
|
* found in the LICENSE file at https://angular.io/license
|
|
32746
32972
|
*/
|
|
32747
32973
|
/**
|
|
32748
|
-
* @license Angular v17.0.
|
|
32974
|
+
* @license Angular v17.0.4
|
|
32749
32975
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
32750
32976
|
* License: MIT
|
|
32751
32977
|
*/
|