@angular/material 17.3.0 → 18.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chips/index.d.ts +1 -0
- package/core/index.d.ts +4 -0
- package/datepicker/index.d.ts +8 -2
- package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/autocomplete/autocomplete.mjs +4 -4
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +7 -7
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +7 -7
- package/esm2022/button/button.mjs +7 -7
- package/esm2022/button/fab.mjs +13 -13
- package/esm2022/button/icon-button.mjs +7 -7
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +7 -7
- package/esm2022/card/card.mjs +43 -43
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +4 -4
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +4 -4
- package/esm2022/chips/chip-row.mjs +4 -4
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +10 -10
- package/esm2022/chips/module.mjs +5 -5
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +5 -5
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option.mjs +4 -4
- package/esm2022/core/private/ripple-loader.mjs +6 -6
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +15 -17
- package/esm2022/datepicker/calendar.mjs +7 -7
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +4 -4
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +18 -11
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +4 -4
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +4 -4
- package/esm2022/dialog/dialog-content-directives.mjs +16 -16
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +4 -4
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +5 -5
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +10 -10
- package/esm2022/expansion/expansion-panel.mjs +7 -7
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +4 -4
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +4 -4
- package/esm2022/grid-list/grid-tile.mjs +16 -16
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +4 -4
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +4 -4
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +4 -4
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +4 -4
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/menu/menu-content.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +4 -4
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +5 -5
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +4 -4
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +7 -7
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +7 -7
- package/esm2022/sidenav/drawer.mjs +10 -10
- package/esm2022/sidenav/sidenav-module.mjs +5 -5
- package/esm2022/sidenav/sidenav.mjs +10 -10
- package/esm2022/slide-toggle/module.mjs +9 -9
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +4 -4
- package/esm2022/slider/module.mjs +5 -5
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +4 -4
- package/esm2022/slider/slider.mjs +4 -4
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +4 -4
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +4 -4
- package/esm2022/sort/sort-module.mjs +5 -5
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +4 -4
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +7 -7
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +7 -7
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/ink-bar.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +10 -9
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +4 -4
- package/esm2022/tabs/tab-header.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
- package/esm2022/tabs/tab.mjs +4 -4
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +7 -7
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +13 -10
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +4 -4
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +47 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +61 -61
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +104 -98
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +34 -34
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +16 -16
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +10 -10
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +14 -14
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +49 -48
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +16 -13
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +7 -7
- package/schematics/migration.json +4 -4
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/mdc-migration/index_bundled.js +2099 -2090
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-update/index_bundled.js +5 -404
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/tabs/index.d.ts +1 -0
- package/tooltip/index.d.ts +1 -0
|
@@ -24,26 +24,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var __async = (__this, __arguments, generator) => {
|
|
28
|
-
return new Promise((resolve, reject) => {
|
|
29
|
-
var fulfilled = (value) => {
|
|
30
|
-
try {
|
|
31
|
-
step(generator.next(value));
|
|
32
|
-
} catch (e) {
|
|
33
|
-
reject(e);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var rejected = (value) => {
|
|
37
|
-
try {
|
|
38
|
-
step(generator.throw(value));
|
|
39
|
-
} catch (e) {
|
|
40
|
-
reject(e);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
44
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
27
|
|
|
48
28
|
// node_modules/tslib/tslib.js
|
|
49
29
|
var require_tslib = __commonJS({
|
|
@@ -474,79 +454,6 @@ var require_tslib = __commonJS({
|
|
|
474
454
|
}
|
|
475
455
|
});
|
|
476
456
|
|
|
477
|
-
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/legacy-imports-error.js
|
|
478
|
-
var require_legacy_imports_error = __commonJS({
|
|
479
|
-
"bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/legacy-imports-error.js"(exports) {
|
|
480
|
-
"use strict";
|
|
481
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
482
|
-
exports.legacyImportsError = void 0;
|
|
483
|
-
var tslib_1 = require_tslib();
|
|
484
|
-
var tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
485
|
-
var ts = tslib_1.__importStar(require("typescript"));
|
|
486
|
-
var LEGACY_IMPORTS_START = "@angular/material/legacy-";
|
|
487
|
-
var MAX_FILES_TO_PRINT = 50;
|
|
488
|
-
function legacyImportsError2(onSuccess) {
|
|
489
|
-
return (tree, context) => __async(this, null, function* () {
|
|
490
|
-
const filesUsingLegacyImports = /* @__PURE__ */ new Set();
|
|
491
|
-
tree.visit((path) => {
|
|
492
|
-
if (path.includes("node_modules") || path.endsWith(".d.ts") || !path.endsWith(".ts")) {
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
const content = tree.readText(path);
|
|
496
|
-
if (!content.includes(LEGACY_IMPORTS_START)) {
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
const sourceFile = ts.createSourceFile(path, content, ts.ScriptTarget.Latest);
|
|
500
|
-
for (const statement of sourceFile.statements) {
|
|
501
|
-
if (!ts.isImportDeclaration(statement) && !ts.isExportDeclaration(statement)) {
|
|
502
|
-
continue;
|
|
503
|
-
}
|
|
504
|
-
if (statement.moduleSpecifier && ts.isStringLiteralLike(statement.moduleSpecifier) && statement.moduleSpecifier.text.startsWith(LEGACY_IMPORTS_START)) {
|
|
505
|
-
filesUsingLegacyImports.add(path);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
if (filesUsingLegacyImports.size === 0) {
|
|
510
|
-
return onSuccess;
|
|
511
|
-
}
|
|
512
|
-
if (tree.exists("package.json")) {
|
|
513
|
-
let packageJson = null;
|
|
514
|
-
try {
|
|
515
|
-
packageJson = JSON.parse(tree.readText("package.json"));
|
|
516
|
-
} catch (e) {
|
|
517
|
-
}
|
|
518
|
-
if (packageJson !== null && packageJson["dependencies"]) {
|
|
519
|
-
packageJson["dependencies"]["@angular/material"] = "^16.2.0";
|
|
520
|
-
tree.overwrite("package.json", JSON.stringify(packageJson, null, 2));
|
|
521
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
context.logger.fatal(formatErrorMessage(filesUsingLegacyImports));
|
|
525
|
-
return;
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
exports.legacyImportsError = legacyImportsError2;
|
|
529
|
-
function formatErrorMessage(filesUsingLegacyImports) {
|
|
530
|
-
const files = Array.from(filesUsingLegacyImports, (path) => " - " + path);
|
|
531
|
-
const filesMessage = files.length > MAX_FILES_TO_PRINT ? [
|
|
532
|
-
...files.slice(0, MAX_FILES_TO_PRINT),
|
|
533
|
-
`${files.length - MAX_FILES_TO_PRINT} more...`,
|
|
534
|
-
`Search your project for "${LEGACY_IMPORTS_START}" to view all usages.`
|
|
535
|
-
].join("\n") : files.join("\n");
|
|
536
|
-
return `Cannot update to Angular Material v17 because the project is using the legacy Material components
|
|
537
|
-
that have been deleted. While Angular Material v16 is compatible with Angular v17, it is recommended
|
|
538
|
-
to switch away from the legacy components as soon as possible because they no longer receive bug fixes,
|
|
539
|
-
accessibility improvements and new features.
|
|
540
|
-
|
|
541
|
-
Read more about migrating away from legacy components: https://material.angular.io/guide/mdc-migration
|
|
542
|
-
|
|
543
|
-
Files in the project using legacy Material components:
|
|
544
|
-
${filesMessage}
|
|
545
|
-
`;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
|
|
550
457
|
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js
|
|
551
458
|
var require_attribute_selectors = __commonJS({
|
|
552
459
|
"bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js"(exports) {
|
|
@@ -688,323 +595,17 @@ var require_upgrade_data = __commonJS({
|
|
|
688
595
|
}
|
|
689
596
|
});
|
|
690
597
|
|
|
691
|
-
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/theme-base-v17/migration.js
|
|
692
|
-
var require_migration = __commonJS({
|
|
693
|
-
"bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/theme-base-v17/migration.js"(exports) {
|
|
694
|
-
"use strict";
|
|
695
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
696
|
-
exports.addThemeBaseMixins = exports.checkThemeBaseMixins = void 0;
|
|
697
|
-
var MISSING_MIXIN_PREAMBLE_LINES = `
|
|
698
|
-
// The following mixins include base theme styles that are only needed once per application. These
|
|
699
|
-
// theme styles do not depend on the color, typography, or density settings in your theme. However,
|
|
700
|
-
// these styles may differ depending on the theme's design system. Currently all themes use the
|
|
701
|
-
// Material 2 design system, but in the future it may be possible to create theme based on other
|
|
702
|
-
// design systems, such as Material 3.
|
|
703
|
-
//
|
|
704
|
-
// Please note: you do not need to include the 'base' mixins, if you include the corresponding
|
|
705
|
-
// 'theme' mixin elsewhere in your Sass. The full 'theme' mixins already include the base styles.
|
|
706
|
-
//
|
|
707
|
-
// To learn more about "base" theme styles visit our theming guide:
|
|
708
|
-
// https://material.angular.io/guide/theming#theming-dimensions
|
|
709
|
-
//
|
|
710
|
-
// TODO(v17): Please move these @include statements to the preferred place in your Sass, and pass
|
|
711
|
-
// your theme to them. This will ensure the correct values for your app are included.`.split("\n");
|
|
712
|
-
var THEME_MIXIN_SETS = [
|
|
713
|
-
{
|
|
714
|
-
theme: "all-component-themes",
|
|
715
|
-
color: "all-component-colors",
|
|
716
|
-
typography: "all-component-typographies",
|
|
717
|
-
density: "all-component-densities",
|
|
718
|
-
base: "all-component-bases"
|
|
719
|
-
},
|
|
720
|
-
...[
|
|
721
|
-
"core",
|
|
722
|
-
"card",
|
|
723
|
-
"progress-bar",
|
|
724
|
-
"tooltip",
|
|
725
|
-
"form-field",
|
|
726
|
-
"input",
|
|
727
|
-
"select",
|
|
728
|
-
"autocomplete",
|
|
729
|
-
"dialog",
|
|
730
|
-
"chips",
|
|
731
|
-
"slide-toggle",
|
|
732
|
-
"radio",
|
|
733
|
-
"slider",
|
|
734
|
-
"menu",
|
|
735
|
-
"list",
|
|
736
|
-
"paginator",
|
|
737
|
-
"tabs",
|
|
738
|
-
"checkbox",
|
|
739
|
-
"button",
|
|
740
|
-
"icon-button",
|
|
741
|
-
"fab",
|
|
742
|
-
"snack-bar",
|
|
743
|
-
"table",
|
|
744
|
-
"progress-spinner",
|
|
745
|
-
"badge",
|
|
746
|
-
"bottom-sheet",
|
|
747
|
-
"button-toggle",
|
|
748
|
-
"datepicker",
|
|
749
|
-
"divider",
|
|
750
|
-
"expansion",
|
|
751
|
-
"grid-list",
|
|
752
|
-
"icon",
|
|
753
|
-
"sidenav",
|
|
754
|
-
"stepper",
|
|
755
|
-
"sort",
|
|
756
|
-
"toolbar",
|
|
757
|
-
"tree"
|
|
758
|
-
].map((comp) => ({
|
|
759
|
-
theme: `${comp}-theme`,
|
|
760
|
-
color: `${comp}-color`,
|
|
761
|
-
typography: `${comp}-typography`,
|
|
762
|
-
density: `${comp}-density`,
|
|
763
|
-
base: `${comp}-base`
|
|
764
|
-
}))
|
|
765
|
-
];
|
|
766
|
-
var COMMENT_PAIRS = /* @__PURE__ */ new Map([
|
|
767
|
-
["/*", "*/"],
|
|
768
|
-
["//", "\n"]
|
|
769
|
-
]);
|
|
770
|
-
var COMMENT_PLACEHOLDER_START = "__<<ngThemingMigrationEscapedComment";
|
|
771
|
-
var COMMENT_PLACEHOLDER_END = ">>__";
|
|
772
|
-
function escapeComments(content) {
|
|
773
|
-
const placeholders = {};
|
|
774
|
-
let commentCounter = 0;
|
|
775
|
-
let [openIndex, closeIndex] = findComment(content);
|
|
776
|
-
while (openIndex > -1 && closeIndex > -1) {
|
|
777
|
-
const placeholder = COMMENT_PLACEHOLDER_START + commentCounter++ + COMMENT_PLACEHOLDER_END;
|
|
778
|
-
placeholders[placeholder] = content.slice(openIndex, closeIndex);
|
|
779
|
-
content = content.slice(0, openIndex) + placeholder + content.slice(closeIndex);
|
|
780
|
-
[openIndex, closeIndex] = findComment(content);
|
|
781
|
-
}
|
|
782
|
-
return { content, placeholders };
|
|
783
|
-
}
|
|
784
|
-
function findComment(content) {
|
|
785
|
-
content += "\n";
|
|
786
|
-
for (const [open, close] of COMMENT_PAIRS.entries()) {
|
|
787
|
-
const openIndex = content.indexOf(open);
|
|
788
|
-
if (openIndex > -1) {
|
|
789
|
-
const closeIndex = content.indexOf(close, openIndex + 1);
|
|
790
|
-
return closeIndex > -1 ? [openIndex, closeIndex + close.length] : [-1, -1];
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
return [-1, -1];
|
|
794
|
-
}
|
|
795
|
-
function restoreComments(content, placeholders) {
|
|
796
|
-
Object.keys(placeholders).forEach((key) => content = content.replace(key, placeholders[key]));
|
|
797
|
-
return content;
|
|
798
|
-
}
|
|
799
|
-
function escapeRegExp(str) {
|
|
800
|
-
return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
|
801
|
-
}
|
|
802
|
-
function extractNamespaceFromUseStatement(fullImport) {
|
|
803
|
-
const closeQuoteIndex = Math.max(fullImport.lastIndexOf(`"`), fullImport.lastIndexOf(`'`));
|
|
804
|
-
if (closeQuoteIndex > -1) {
|
|
805
|
-
const asExpression = "as ";
|
|
806
|
-
const asIndex = fullImport.indexOf(asExpression, closeQuoteIndex);
|
|
807
|
-
if (asIndex > -1) {
|
|
808
|
-
return fullImport.slice(asIndex + asExpression.length).split(";")[0].trim();
|
|
809
|
-
}
|
|
810
|
-
const lastSlashIndex = fullImport.lastIndexOf("/", closeQuoteIndex);
|
|
811
|
-
if (lastSlashIndex > -1) {
|
|
812
|
-
const fileName = fullImport.slice(lastSlashIndex + 1, closeQuoteIndex).replace(/^_|(\.import)?\.scss$|\.import$/g, "");
|
|
813
|
-
if (fileName === "index") {
|
|
814
|
-
const nextSlashIndex = fullImport.lastIndexOf("/", lastSlashIndex - 1);
|
|
815
|
-
if (nextSlashIndex > -1) {
|
|
816
|
-
return fullImport.slice(nextSlashIndex + 1, lastSlashIndex);
|
|
817
|
-
}
|
|
818
|
-
} else {
|
|
819
|
-
return fileName;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
throw Error(`Could not extract namespace from import "${fullImport}".`);
|
|
824
|
-
}
|
|
825
|
-
function getAtUseNamespaces(content, path) {
|
|
826
|
-
const namespaces = /* @__PURE__ */ new Set();
|
|
827
|
-
const pattern = new RegExp(`@use +['"]~?${escapeRegExp(path)}['"].*;?
|
|
828
|
-
`, "g");
|
|
829
|
-
let match = null;
|
|
830
|
-
while (match = pattern.exec(content)) {
|
|
831
|
-
namespaces.add(extractNamespaceFromUseStatement(match[0]));
|
|
832
|
-
}
|
|
833
|
-
return namespaces;
|
|
834
|
-
}
|
|
835
|
-
function getAtIncludes(content, namespace, mixin) {
|
|
836
|
-
const ending = "([^\\n\\w-][^\\n]*)?($|\\n)";
|
|
837
|
-
const pattern = new RegExp(`@include\\s+${escapeRegExp(namespace)}\\.${escapeRegExp(mixin)}${ending}`, "g");
|
|
838
|
-
return [...content.matchAll(pattern)];
|
|
839
|
-
}
|
|
840
|
-
function isMixinAtIncluded(content, namespace, mixin) {
|
|
841
|
-
return !!getAtIncludes(content, namespace, mixin).length;
|
|
842
|
-
}
|
|
843
|
-
function insertLinesAfterMatch(content, match, lines) {
|
|
844
|
-
const insertionPoint = match.index + match[0].length;
|
|
845
|
-
return content.substring(0, insertionPoint) + lines.join("\n") + "\n" + content.substring(insertionPoint);
|
|
846
|
-
}
|
|
847
|
-
function getIndentation(content, index) {
|
|
848
|
-
let indentationStart = 0;
|
|
849
|
-
let indentationEnd = index;
|
|
850
|
-
for (let i = index; i >= 0; i--) {
|
|
851
|
-
if (content[i] === "\n") {
|
|
852
|
-
indentationStart = i + 1;
|
|
853
|
-
break;
|
|
854
|
-
}
|
|
855
|
-
if (!/\s/.exec(content[i])) {
|
|
856
|
-
indentationEnd = i;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
return content.slice(indentationStart, indentationEnd);
|
|
860
|
-
}
|
|
861
|
-
function getMissingMixinLines(namespace, mixins, indentation) {
|
|
862
|
-
return [
|
|
863
|
-
...MISSING_MIXIN_PREAMBLE_LINES,
|
|
864
|
-
...[...mixins].sort().map((mixin) => `@include ${namespace}.${mixin}(/* TODO(v17): pass $your-theme here */);`),
|
|
865
|
-
""
|
|
866
|
-
].map((line) => (indentation + line).trimRight());
|
|
867
|
-
}
|
|
868
|
-
function checkThemeBaseMixins(fileContent) {
|
|
869
|
-
const found = /* @__PURE__ */ new Set();
|
|
870
|
-
const missing = /* @__PURE__ */ new Set();
|
|
871
|
-
const { content } = escapeComments(fileContent);
|
|
872
|
-
const materialNamespaces = getAtUseNamespaces(content, "@angular/material");
|
|
873
|
-
for (const namespace of materialNamespaces) {
|
|
874
|
-
for (const mixins of THEME_MIXIN_SETS) {
|
|
875
|
-
if (isMixinAtIncluded(content, namespace, mixins.theme)) {
|
|
876
|
-
found.add(mixins.base);
|
|
877
|
-
missing.delete(mixins.base);
|
|
878
|
-
continue;
|
|
879
|
-
}
|
|
880
|
-
if (!found.has(mixins.base)) {
|
|
881
|
-
if (isMixinAtIncluded(content, namespace, mixins.color) || isMixinAtIncluded(content, namespace, mixins.typography) || isMixinAtIncluded(content, namespace, mixins.density)) {
|
|
882
|
-
missing.add(mixins.base);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
return { found, missing };
|
|
888
|
-
}
|
|
889
|
-
exports.checkThemeBaseMixins = checkThemeBaseMixins;
|
|
890
|
-
function addThemeBaseMixins(fileContent, mixins) {
|
|
891
|
-
let { content, placeholders } = escapeComments(fileContent);
|
|
892
|
-
const materialNamespaces = getAtUseNamespaces(content, "@angular/material");
|
|
893
|
-
for (const namespace of materialNamespaces) {
|
|
894
|
-
const coreIncludes = getAtIncludes(content, namespace, "core").reverse();
|
|
895
|
-
for (const coreInclude of coreIncludes) {
|
|
896
|
-
if (coreInclude.index === void 0) {
|
|
897
|
-
throw Error(`Cannot find location of mat.core() match: ${coreInclude}`);
|
|
898
|
-
}
|
|
899
|
-
const indentation = getIndentation(content, coreInclude.index);
|
|
900
|
-
const lines = getMissingMixinLines(namespace, mixins, indentation);
|
|
901
|
-
content = insertLinesAfterMatch(content, coreInclude, lines);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
return restoreComments(content, placeholders);
|
|
905
|
-
}
|
|
906
|
-
exports.addThemeBaseMixins = addThemeBaseMixins;
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
|
|
910
|
-
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/theme-base-v17/index.js
|
|
911
|
-
var require_theme_base_v17 = __commonJS({
|
|
912
|
-
"bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/theme-base-v17/index.js"(exports) {
|
|
913
|
-
"use strict";
|
|
914
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
915
|
-
exports.ThemeBaseMigration = void 0;
|
|
916
|
-
var core_1 = require("@angular-devkit/core");
|
|
917
|
-
var schematics_1 = require("@angular/cdk/schematics");
|
|
918
|
-
var migration_1 = require_migration();
|
|
919
|
-
var _ThemeBaseMigration = class extends schematics_1.DevkitMigration {
|
|
920
|
-
constructor() {
|
|
921
|
-
super(...arguments);
|
|
922
|
-
this.enabled = this.targetVersion === schematics_1.TargetVersion.V17;
|
|
923
|
-
this.visitedSassStylesheets = [];
|
|
924
|
-
}
|
|
925
|
-
visitStylesheet(stylesheet) {
|
|
926
|
-
if ((0, core_1.extname)(stylesheet.filePath) === ".scss") {
|
|
927
|
-
this.visitedSassStylesheets.push(stylesheet);
|
|
928
|
-
const content = stylesheet.content;
|
|
929
|
-
const { found, missing } = (0, migration_1.checkThemeBaseMixins)(content);
|
|
930
|
-
for (const mixin of found) {
|
|
931
|
-
_ThemeBaseMigration.foundBaseMixins.add(mixin);
|
|
932
|
-
_ThemeBaseMigration.missingBaseMixins.delete(mixin);
|
|
933
|
-
}
|
|
934
|
-
for (const mixin of missing) {
|
|
935
|
-
if (!_ThemeBaseMigration.foundBaseMixins.has(mixin)) {
|
|
936
|
-
_ThemeBaseMigration.missingBaseMixins.add(mixin);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
postAnalysis() {
|
|
942
|
-
if (_ThemeBaseMigration.missingBaseMixins.size === 0) {
|
|
943
|
-
return;
|
|
944
|
-
}
|
|
945
|
-
if (_ThemeBaseMigration.foundBaseMixins.has("all-component-bases")) {
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
if (_ThemeBaseMigration.missingBaseMixins.has("all-component-bases")) {
|
|
949
|
-
_ThemeBaseMigration.missingBaseMixins = /* @__PURE__ */ new Set(["all-component-bases"]);
|
|
950
|
-
}
|
|
951
|
-
for (const stylesheet of this.visitedSassStylesheets) {
|
|
952
|
-
const content = stylesheet.content;
|
|
953
|
-
const migratedContent = content ? (0, migration_1.addThemeBaseMixins)(content, _ThemeBaseMigration.missingBaseMixins) : content;
|
|
954
|
-
if (migratedContent && migratedContent !== content) {
|
|
955
|
-
this.fileSystem.edit(stylesheet.filePath).remove(0, stylesheet.content.length).insertLeft(0, migratedContent);
|
|
956
|
-
_ThemeBaseMigration.migratedFileCount++;
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
if (_ThemeBaseMigration.migratedFileCount === 0) {
|
|
960
|
-
const mixinsText = [..._ThemeBaseMigration.missingBaseMixins].sort().map((m) => `mat.${m}($theme)`).join("\n");
|
|
961
|
-
this.failures.push({
|
|
962
|
-
filePath: this.context.tree.root.path,
|
|
963
|
-
message: `The following mixins could not be automatically added, please add them manually if needed:
|
|
964
|
-
${mixinsText}`
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
static globalPostMigration(_tree, _targetVersion, context) {
|
|
969
|
-
const fileCount = _ThemeBaseMigration.migratedFileCount;
|
|
970
|
-
const mixinCount = _ThemeBaseMigration.missingBaseMixins.size;
|
|
971
|
-
if (fileCount > 0 && mixinCount > 0) {
|
|
972
|
-
const fileCountText = fileCount === 1 ? "1 file" : `${fileCount} files`;
|
|
973
|
-
const mixinCountText = mixinCount === 1 ? "1 theme base mixin" : `${mixinCount} theme base mixins`;
|
|
974
|
-
context.logger.info(`Added ${mixinCountText} to ${fileCountText}. Please search for, and address, any "TODO(v17)" comments.`);
|
|
975
|
-
}
|
|
976
|
-
_ThemeBaseMigration.migratedFileCount = 0;
|
|
977
|
-
_ThemeBaseMigration.missingBaseMixins = /* @__PURE__ */ new Set();
|
|
978
|
-
_ThemeBaseMigration.foundBaseMixins = /* @__PURE__ */ new Set();
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
var ThemeBaseMigration2 = _ThemeBaseMigration;
|
|
982
|
-
(() => {
|
|
983
|
-
_ThemeBaseMigration.migratedFileCount = 0;
|
|
984
|
-
})();
|
|
985
|
-
(() => {
|
|
986
|
-
_ThemeBaseMigration.foundBaseMixins = /* @__PURE__ */ new Set();
|
|
987
|
-
})();
|
|
988
|
-
(() => {
|
|
989
|
-
_ThemeBaseMigration.missingBaseMixins = /* @__PURE__ */ new Set();
|
|
990
|
-
})();
|
|
991
|
-
exports.ThemeBaseMigration = ThemeBaseMigration2;
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
|
|
995
598
|
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/index.mjs
|
|
996
599
|
var ng_update_exports = {};
|
|
997
600
|
__export(ng_update_exports, {
|
|
998
|
-
|
|
601
|
+
updateToV18: () => updateToV18
|
|
999
602
|
});
|
|
1000
603
|
module.exports = __toCommonJS(ng_update_exports);
|
|
1001
604
|
var import_schematics = require("@angular/cdk/schematics");
|
|
1002
|
-
var import_legacy_imports_error = __toESM(require_legacy_imports_error(), 1);
|
|
1003
605
|
var import_upgrade_data = __toESM(require_upgrade_data(), 1);
|
|
1004
|
-
var
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
return (0, import_legacy_imports_error.legacyImportsError)((0, import_schematics.createMigrationSchematicRule)(import_schematics.TargetVersion.V17, materialMigrations, import_upgrade_data.materialUpgradeData, onMigrationComplete));
|
|
606
|
+
var materialMigrations = [];
|
|
607
|
+
function updateToV18() {
|
|
608
|
+
return (0, import_schematics.createMigrationSchematicRule)(import_schematics.TargetVersion.V18, materialMigrations, import_upgrade_data.materialUpgradeData, onMigrationComplete);
|
|
1008
609
|
}
|
|
1009
610
|
function onMigrationComplete(context, targetVersion, hasFailures) {
|
|
1010
611
|
context.logger.info("");
|
|
@@ -1016,7 +617,7 @@ function onMigrationComplete(context, targetVersion, hasFailures) {
|
|
|
1016
617
|
}
|
|
1017
618
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1018
619
|
0 && (module.exports = {
|
|
1019
|
-
|
|
620
|
+
updateToV18
|
|
1020
621
|
});
|
|
1021
622
|
/*! *****************************************************************************
|
|
1022
623
|
Copyright (c) Microsoft Corporation.
|