@ethlete/components 0.1.0-next.8 ā 1.0.0-next.100
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/CHANGELOG.md +3486 -0
- package/README.md +1 -1
- package/design/accordion.ts +73 -0
- package/design/anchored-dialog.ts +102 -0
- package/design/avatar.ts +90 -0
- package/design/badge.ts +48 -0
- package/design/banner.ts +77 -0
- package/design/bracket.ts +457 -0
- package/design/breadcrumb.ts +145 -0
- package/design/button.ts +118 -0
- package/design/calendar.ts +306 -0
- package/design/card.ts +92 -0
- package/design/carousel.ts +240 -0
- package/design/chart.ts +512 -0
- package/design/checkbox.ts +275 -0
- package/design/chip.ts +64 -0
- package/design/config.json +26 -0
- package/design/control.ts +19 -0
- package/design/copy-button.ts +59 -0
- package/design/description-list.ts +41 -0
- package/design/dialog.ts +216 -0
- package/design/divider.ts +27 -0
- package/design/empty-state.ts +45 -0
- package/design/floating-action.ts +55 -0
- package/design/form-field.ts +256 -0
- package/design/grid.ts +148 -0
- package/design/icon-set.ts +19 -0
- package/design/icon.ts +9 -0
- package/design/input.ts +86 -0
- package/design/kbd.ts +19 -0
- package/design/loader.ts +156 -0
- package/design/masonry.ts +115 -0
- package/design/match.ts +131 -0
- package/design/menu.ts +147 -0
- package/design/notification.ts +133 -0
- package/design/otp-input.ts +107 -0
- package/design/pagination.ts +120 -0
- package/design/picture.ts +80 -0
- package/design/progress-steps.ts +79 -0
- package/design/query-error.ts +60 -0
- package/design/radio-group.ts +132 -0
- package/design/scheduler.ts +369 -0
- package/design/scrollable.ts +219 -0
- package/design/scrollbar.ts +47 -0
- package/design/sdk/assets/fallback.svg +1 -0
- package/design/sdk/assets/fonts/et-kbd-arrows-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/et-kbd-control-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/et-kbd-keys-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
- package/design/sdk/assets/tall.svg +1 -0
- package/design/sdk/assets/wide.svg +1 -0
- package/design/sdk/components/accent-on-light/accent-on-light.css +35 -0
- package/design/sdk/components/accent-on-light/accent-on-light.ts +15 -0
- package/design/sdk/components/accent-on-light/shared/controls.ts +46 -0
- package/design/sdk/components/accordion/accordion.css +17 -0
- package/design/sdk/components/accordion/accordion.ts +79 -0
- package/design/sdk/components/action-sheet/action-sheet.css +124 -0
- package/design/sdk/components/action-sheet/action-sheet.ts +129 -0
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +60 -0
- package/design/sdk/components/anchored-dialog/anchored-dialog.ts +89 -0
- package/design/sdk/components/avatar/avatar.css +14 -0
- package/design/sdk/components/avatar/avatar.ts +95 -0
- package/design/sdk/components/badge/badge.css +31 -0
- package/design/sdk/components/badge/badge.ts +89 -0
- package/design/sdk/components/banner/banner.css +18 -0
- package/design/sdk/components/banner/banner.ts +160 -0
- package/design/sdk/components/bracket/bracket.css +59 -0
- package/design/sdk/components/bracket/bracket.ts +183 -0
- package/design/sdk/components/breadcrumb/breadcrumb.css +25 -0
- package/design/sdk/components/breadcrumb/breadcrumb.ts +96 -0
- package/design/sdk/components/button/button.css +29 -0
- package/design/sdk/components/button/button.ts +201 -0
- package/design/sdk/components/calendar/calendar.css +33 -0
- package/design/sdk/components/calendar/calendar.ts +183 -0
- package/design/sdk/components/card/card.css +19 -0
- package/design/sdk/components/card/card.ts +111 -0
- package/design/sdk/components/carousel/carousel.css +44 -0
- package/design/sdk/components/carousel/carousel.ts +162 -0
- package/design/sdk/components/chart/chart.css +56 -0
- package/design/sdk/components/chart/chart.ts +146 -0
- package/design/sdk/components/checkbox/checkbox.css +10 -0
- package/design/sdk/components/checkbox/checkbox.ts +223 -0
- package/design/sdk/components/chip/chip.css +18 -0
- package/design/sdk/components/chip/chip.ts +99 -0
- package/design/sdk/components/copy-button/copy-button.css +14 -0
- package/design/sdk/components/copy-button/copy-button.ts +77 -0
- package/design/sdk/components/description-list/description-list.css +7 -0
- package/design/sdk/components/description-list/description-list.ts +64 -0
- package/design/sdk/components/dialog/dialog.css +29 -0
- package/design/sdk/components/dialog/dialog.ts +173 -0
- package/design/sdk/components/divider/divider.css +26 -0
- package/design/sdk/components/divider/divider.ts +49 -0
- package/design/sdk/components/empty-state/empty-state.css +39 -0
- package/design/sdk/components/empty-state/empty-state.ts +67 -0
- package/design/sdk/components/floating-action/floating-action.css +51 -0
- package/design/sdk/components/floating-action/floating-action.ts +78 -0
- package/design/sdk/components/form-field/form-field.ts +204 -0
- package/design/sdk/components/grid/grid.css +17 -0
- package/design/sdk/components/grid/grid.ts +96 -0
- package/design/sdk/components/input/input.css +57 -0
- package/design/sdk/components/input/input.ts +156 -0
- package/design/sdk/components/kbd/kbd.css +25 -0
- package/design/sdk/components/kbd/kbd.ts +70 -0
- package/design/sdk/components/loader/loader.css +37 -0
- package/design/sdk/components/loader/loader.ts +79 -0
- package/design/sdk/components/masonry/masonry.css +7 -0
- package/design/sdk/components/masonry/masonry.ts +50 -0
- package/design/sdk/components/match/match.css +25 -0
- package/design/sdk/components/match/match.ts +95 -0
- package/design/sdk/components/menu/menu.css +22 -0
- package/design/sdk/components/menu/menu.ts +120 -0
- package/design/sdk/components/notification/notification.css +32 -0
- package/design/sdk/components/notification/notification.ts +117 -0
- package/design/sdk/components/otp-input/otp-input.css +35 -0
- package/design/sdk/components/otp-input/otp-input.ts +94 -0
- package/design/sdk/components/pagination/pagination.css +14 -0
- package/design/sdk/components/pagination/pagination.ts +97 -0
- package/design/sdk/components/picture/picture.css +37 -0
- package/design/sdk/components/picture/picture.ts +112 -0
- package/design/sdk/components/progress-steps/progress-steps.css +37 -0
- package/design/sdk/components/progress-steps/progress-steps.ts +109 -0
- package/design/sdk/components/query-error/query-error.css +33 -0
- package/design/sdk/components/query-error/query-error.ts +167 -0
- package/design/sdk/components/radio-group/radio-group.css +10 -0
- package/design/sdk/components/radio-group/radio-group.ts +209 -0
- package/design/sdk/components/scheduler/scheduler.css +55 -0
- package/design/sdk/components/scheduler/scheduler.ts +267 -0
- package/design/sdk/components/scrollable/scrollable.css +58 -0
- package/design/sdk/components/scrollable/scrollable.ts +198 -0
- package/design/sdk/components/scrollbar/scrollbar.css +78 -0
- package/design/sdk/components/scrollbar/scrollbar.ts +152 -0
- package/design/sdk/components/select/select.css +5 -0
- package/design/sdk/components/select/select.ts +42 -0
- package/design/sdk/components/select/shared/select-part.ts +80 -0
- package/design/sdk/components/select-panel/select-panel.css +3 -0
- package/design/sdk/components/select-panel/select-panel.ts +144 -0
- package/design/sdk/components/skeleton/skeleton.css +22 -0
- package/design/sdk/components/skeleton/skeleton.ts +58 -0
- package/design/sdk/components/slider/slider.css +52 -0
- package/design/sdk/components/slider/slider.ts +133 -0
- package/design/sdk/components/standings/standings.css +33 -0
- package/design/sdk/components/standings/standings.ts +146 -0
- package/design/sdk/components/stat-tile/stat-tile.css +15 -0
- package/design/sdk/components/stat-tile/stat-tile.ts +97 -0
- package/design/sdk/components/stream/stream.css +48 -0
- package/design/sdk/components/stream/stream.ts +63 -0
- package/design/sdk/components/switch/switch.ts +94 -0
- package/design/sdk/components/table/table.css +67 -0
- package/design/sdk/components/table/table.ts +320 -0
- package/design/sdk/components/tabs/tabs.css +13 -0
- package/design/sdk/components/tabs/tabs.ts +95 -0
- package/design/sdk/components/textarea/textarea.css +99 -0
- package/design/sdk/components/textarea/textarea.ts +154 -0
- package/design/sdk/components/timeline/timeline.css +30 -0
- package/design/sdk/components/timeline/timeline.ts +98 -0
- package/design/sdk/components/toolbar/toolbar.css +24 -0
- package/design/sdk/components/toolbar/toolbar.ts +104 -0
- package/design/sdk/components/tooltip/tooltip.css +15 -0
- package/design/sdk/components/tooltip/tooltip.ts +39 -0
- package/design/sdk/components/tree/selected-tint.css +15 -0
- package/design/sdk/components/tree/tree.ts +89 -0
- package/design/sdk/fixtures.ts +0 -0
- package/design/sdk/foundations/colors/colors.css +660 -0
- package/design/sdk/foundations/colors/colors.ts +216 -0
- package/design/sdk/foundations/colors/faces.css +75 -0
- package/design/sdk/foundations/colors/overrides.json +19 -0
- package/design/sdk/foundations/colors/shared/contrast.ts +105 -0
- package/design/sdk/foundations/elevation/elevation.css +6 -0
- package/design/sdk/foundations/elevation/elevation.ts +18 -0
- package/design/sdk/foundations/elevation/shared/elevation/scene.css +101 -0
- package/design/sdk/foundations/elevation/shared/elevation/scene.ts +74 -0
- package/design/sdk/foundations/icons/icons.ts +125 -0
- package/design/sdk/lint-baseline.json +6 -0
- package/design/sdk/ready.json +593 -0
- package/design/sdk/rule-baseline.json +48 -0
- package/design/select.ts +199 -0
- package/design/skeleton.ts +67 -0
- package/design/slider.ts +155 -0
- package/design/standings.ts +166 -0
- package/design/stat-tile.ts +109 -0
- package/design/stream.ts +92 -0
- package/design/switch.ts +83 -0
- package/design/table.ts +309 -0
- package/design/tabs.ts +75 -0
- package/design/textarea.ts +94 -0
- package/design/timeline.ts +52 -0
- package/design/toolbar.ts +95 -0
- package/design/tooltip.ts +95 -0
- package/design/tree.ts +106 -0
- package/fesm2022/ethlete-components-testing.mjs +440 -0
- package/fesm2022/ethlete-components-testing.mjs.map +1 -0
- package/fesm2022/ethlete-components.mjs +115419 -11680
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/component/component-names.js +42 -0
- package/generators/component/component-templates.js +211 -0
- package/generators/component/generator.js +144 -0
- package/generators/component/schema.json +109 -0
- package/generators/component/workspace-edits.js +92 -0
- package/generators/generators.json +116 -0
- package/generators/icons/generator.js +231 -0
- package/generators/icons/schema.json +35 -0
- package/generators/migrate-bracket-default-cards/bracket-default-cards.js +67 -0
- package/generators/migrate-bracket-default-cards/migration.js +63 -0
- package/generators/migrate-bracket-default-cards/schema.json +26 -0
- package/generators/migrate-bracket-ethlete-renames/bracket-ethlete-renames.js +15 -0
- package/generators/migrate-bracket-ethlete-renames/migration.js +31 -0
- package/generators/migrate-bracket-ethlete-renames/schema.json +26 -0
- package/generators/migrate-cascader-tree-internals/cascader-tree-internals.js +6 -0
- package/generators/migrate-cascader-tree-internals/migration.js +11 -0
- package/generators/migrate-cascader-tree-internals/schema.json +26 -0
- package/generators/migrate-chart-baseline-y/chart-baseline-y.js +10 -0
- package/generators/migrate-chart-baseline-y/migration.js +41 -0
- package/generators/migrate-chart-baseline-y/schema.json +26 -0
- package/generators/migrate-duration-format-internals/duration-format-internals.js +6 -0
- package/generators/migrate-duration-format-internals/migration.js +11 -0
- package/generators/migrate-duration-format-internals/schema.json +26 -0
- package/generators/migrate-error-color-theme-signal/error-color-theme-signal.js +37 -0
- package/generators/migrate-error-color-theme-signal/migration.js +55 -0
- package/generators/migrate-error-color-theme-signal/schema.json +26 -0
- package/generators/migrate-grid-engine-internals/grid-engine-internals.js +43 -0
- package/generators/migrate-grid-engine-internals/migration.js +11 -0
- package/generators/migrate-grid-engine-internals/schema.json +26 -0
- package/generators/migrate-line-chart-stacked-area-mix/line-chart-stacked-area-mix.js +48 -0
- package/generators/migrate-line-chart-stacked-area-mix/migration.js +35 -0
- package/generators/migrate-line-chart-stacked-area-mix/schema.json +26 -0
- package/generators/migrate-loader-determinate/loader-determinate.js +87 -0
- package/generators/migrate-loader-determinate/migration.js +49 -0
- package/generators/migrate-loader-determinate/schema.json +26 -0
- package/generators/migrate-overlay-fullscreen-animation/migration.js +11 -0
- package/generators/migrate-overlay-fullscreen-animation/overlay-fullscreen-animation.js +16 -0
- package/generators/migrate-overlay-fullscreen-animation/schema.json +26 -0
- package/generators/migrate-overlay-nav-tab-imports/migration.js +35 -0
- package/generators/migrate-overlay-nav-tab-imports/overlay-nav-tab-imports.js +25 -0
- package/generators/migrate-overlay-nav-tab-imports/schema.json +26 -0
- package/generators/migrate-pip-window-z-index/migration.js +85 -0
- package/generators/migrate-pip-window-z-index/pip-window-z-index.js +60 -0
- package/generators/migrate-pip-window-z-index/schema.json +26 -0
- package/generators/migrate-query-error-labels/migration-scope.js +30 -0
- package/generators/migrate-query-error-labels/migration.js +58 -0
- package/generators/migrate-query-error-labels/query-error-labels.js +30 -0
- package/generators/migrate-query-error-labels/schema.json +26 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/migration.js +57 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/rich-text-editor-floating-toolbar.js +28 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/schema.json +26 -0
- package/generators/migrate-rich-text-editor-link-editor/migration.js +57 -0
- package/generators/migrate-rich-text-editor-link-editor/rich-text-editor-link-editor.js +28 -0
- package/generators/migrate-rich-text-editor-link-editor/schema.json +26 -0
- package/generators/migrate-rich-text-editor-tools/migration.js +64 -0
- package/generators/migrate-rich-text-editor-tools/rich-text-editor-tools.js +36 -0
- package/generators/migrate-rich-text-editor-tools/schema.json +26 -0
- package/generators/migrate-select-input-renames/migration.js +41 -0
- package/generators/migrate-select-input-renames/schema.json +26 -0
- package/generators/migrate-select-input-renames/select-input-renames.js +37 -0
- package/generators/migrate-stream-default-components/migration.js +86 -0
- package/generators/migrate-stream-default-components/schema.json +26 -0
- package/generators/migrate-stream-default-components/stream-default-components.js +111 -0
- package/generators/migrate-time-picker-ring/migration.js +17 -0
- package/generators/migrate-time-picker-ring/schema.json +26 -0
- package/generators/migrate-time-picker-ring/time-picker-ring.js +25 -0
- package/generators/migrate-youtube-player-slot-directive/migration.js +11 -0
- package/generators/migrate-youtube-player-slot-directive/schema.json +26 -0
- package/generators/migrate-youtube-player-slot-directive/youtube-player-slot-directive.js +12 -0
- package/generators/removed-exports/removed-exports.js +154 -0
- package/generators/removed-exports/run-removed-exports-migration.js +48 -0
- package/migrations/components-sdk-layer.md +55 -0
- package/migrations.json +193 -0
- package/package.json +47 -17
- package/src/lib/accordion/accordion-group.component.css +12 -0
- package/src/lib/accordion/accordion.component.css +237 -0
- package/src/lib/avatar/avatar-group.component.css +31 -0
- package/src/lib/avatar/avatar.component.css +90 -0
- package/src/lib/badge/badge.component.css +114 -0
- package/src/lib/banner/banner.component.css +102 -0
- package/src/lib/bracket/bracket-default-continue.component.css +29 -0
- package/src/lib/bracket/bracket-default-final-match.component.css +76 -0
- package/src/lib/bracket/bracket-default-match.component.css +21 -0
- package/src/lib/bracket/bracket-default-round-header.component.css +36 -0
- package/src/lib/bracket/bracket-default-section-title.component.css +14 -0
- package/src/lib/bracket/bracket-participants.component.css +13 -0
- package/src/lib/bracket/bracket-pick-card.component.css +232 -0
- package/src/lib/bracket/bracket-rounds-list.component.css +75 -0
- package/src/lib/bracket/bracket-skeleton.component.css +55 -0
- package/src/lib/bracket/bracket.component.css +123 -0
- package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +10 -0
- package/src/lib/breadcrumb/breadcrumb-outlet.component.css +5 -0
- package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
- package/src/lib/breadcrumb/breadcrumb.component.css +127 -0
- package/src/lib/button/button-properties-styles.component.css +195 -0
- package/src/lib/button/button.component.css +242 -0
- package/src/lib/button/button.types.ts +33 -0
- package/src/lib/button/fab.component.css +260 -0
- package/src/lib/button/icon-button.component.css +156 -0
- package/src/lib/button/split-button.component.css +106 -0
- package/src/lib/button/text-button.component.css +142 -0
- package/src/lib/button/window-control-button.component.css +225 -0
- package/src/lib/calendar/calendar-coarse-grid-styles.component.css +29 -0
- package/src/lib/calendar/calendar-comparison-band-styles.component.css +36 -0
- package/src/lib/calendar/calendar-week-numbers-styles.component.css +32 -0
- package/src/lib/calendar/calendar.component.css +376 -0
- package/src/lib/card/card.component.css +43 -0
- package/src/lib/carousel/carousel-autoplay-styles.component.css +177 -0
- package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
- package/src/lib/carousel/carousel.component.css +232 -0
- package/src/lib/chart/bar-chart.component.css +176 -0
- package/src/lib/chart/chart-axis.component.css +40 -0
- package/src/lib/chart/chart-grid.component.css +6 -0
- package/src/lib/chart/chart-legend.component.css +46 -0
- package/src/lib/chart/chart-tooltip.component.css +34 -0
- package/src/lib/chart/line-chart-tooltip.component.css +51 -0
- package/src/lib/chart/line-chart.component.css +234 -0
- package/src/lib/chart/pie-chart.component.css +176 -0
- package/src/lib/chart/sankey-chart.component.css +221 -0
- package/src/lib/chip/chip.component.css +163 -0
- package/src/lib/collapse/collapse.component.css +43 -0
- package/src/lib/command-palette/command-palette-item.component.css +98 -0
- package/src/lib/command-palette/command-palette.component.css +148 -0
- package/src/lib/description-list/description-list.component.css +78 -0
- package/src/lib/divider/divider.component.css +40 -0
- package/src/lib/empty-state/empty-state.component.css +79 -0
- package/src/lib/floating-action/floating-action-styles.component.css +105 -0
- package/src/lib/focus-ring/focus-ring-styles.component.css +31 -0
- package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
- package/src/lib/forms/cascader/cascader-panel.component.css +387 -0
- package/src/lib/forms/cascader/cascader-sheet-styles.component.css +241 -0
- package/src/lib/forms/cascader/cascader.component.css +52 -0
- package/src/lib/forms/checkbox/checkbox.component.css +291 -0
- package/src/lib/forms/choice-field/choice-field-card-styles.component.css +66 -0
- package/src/lib/forms/choice-field/choice-field.component.css +227 -0
- package/src/lib/forms/color-input/color-input.component.css +110 -0
- package/src/lib/forms/color-input/color-picker-panel.component.css +353 -0
- package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
- package/src/lib/forms/date-time/date-picker-panel.component.css +115 -0
- package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
- package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
- package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
- package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
- package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
- package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
- package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
- package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
- package/src/lib/forms/description/description.component.css +7 -0
- package/src/lib/forms/dropzone/dropzone-crop.component.css +139 -0
- package/src/lib/forms/dropzone/dropzone-item.component.css +67 -0
- package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +83 -0
- package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
- package/src/lib/forms/dropzone/dropzone-row-styles.component.css +85 -0
- package/src/lib/forms/dropzone/dropzone.component.css +293 -0
- package/src/lib/forms/form-field/counter.component.css +25 -0
- package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +176 -0
- package/src/lib/forms/form-field/form-field-rich-text-styles.component.css +31 -0
- package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +93 -0
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +409 -0
- package/src/lib/forms/form-field/form-field-textarea-styles.component.css +94 -0
- package/src/lib/forms/form-field/form-field.component.css +382 -0
- package/src/lib/forms/form-field/form-support-styles.component.css +102 -0
- package/src/lib/forms/form-field/headless/label.directive.css +25 -0
- package/src/lib/forms/form-field/hint.component.css +18 -0
- package/src/lib/forms/input/input.component.css +53 -0
- package/src/lib/forms/input/number-input.component.css +128 -0
- package/src/lib/forms/input/password-input.component.css +104 -0
- package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
- package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +104 -0
- package/src/lib/forms/otp-input/otp-input.component.css +222 -0
- package/src/lib/forms/phone-input/phone-input.component.css +127 -0
- package/src/lib/forms/rating/rating.component.css +198 -0
- package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +234 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +92 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +172 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +149 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-token-palette.component.css +18 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +203 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +177 -0
- package/src/lib/forms/rich-text-editor/rich-text-viewer.component.css +6 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-align-tool.component.css +5 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-heading-tool.component.css +5 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +109 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +21 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +44 -0
- package/src/lib/forms/select/select-all-option.component.css +14 -0
- package/src/lib/forms/select/select-extras-styles.component.css +149 -0
- package/src/lib/forms/select/select-option-group.component.css +36 -0
- package/src/lib/forms/select/select-option-styles.component.css +167 -0
- package/src/lib/forms/select/select-panel.component.css +119 -0
- package/src/lib/forms/select/select.component.css +247 -0
- package/src/lib/forms/selection-card-styles.component.css +148 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +108 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +142 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +172 -0
- package/src/lib/forms/selection-list/radio-group/radio-group.component.css +134 -0
- package/src/lib/forms/selection-list/radio-group/radio.component.css +154 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +213 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +199 -0
- package/src/lib/forms/slider/range-slider.component.css +440 -0
- package/src/lib/forms/slider/slider.component.css +434 -0
- package/src/lib/forms/switch/switch.component.css +217 -0
- package/src/lib/forms/tag-input/tag-input.component.css +54 -0
- package/src/lib/forms/textarea/textarea-autosize-styles.component.css +16 -0
- package/src/lib/forms/textarea/textarea.component.css +45 -0
- package/src/lib/grid/grid-debug.component.css +130 -0
- package/src/lib/grid/grid-item-default-actions.component.css +11 -0
- package/src/lib/grid/grid-item-toolbar.component.css +10 -0
- package/src/lib/grid/grid-item.component.css +177 -0
- package/src/lib/grid/grid.component.css +56 -0
- package/src/lib/icon/headless/align-icons.ts +30 -0
- package/src/lib/icon/headless/arrow-out-up-right-icon.ts +17 -0
- package/src/lib/icon/headless/arrow-right-icon.ts +23 -0
- package/src/lib/icon/headless/arrow-up-icon.ts +30 -0
- package/src/lib/icon/headless/arrows-left-right-icon.ts +31 -0
- package/src/lib/icon/headless/bold-icon.ts +11 -0
- package/src/lib/icon/headless/calendar-icon.ts +21 -0
- package/src/lib/icon/headless/check-icon.ts +14 -0
- package/src/lib/icon/headless/chevron-icon.ts +14 -0
- package/src/lib/icon/headless/circle-check-icon.ts +14 -0
- package/src/lib/icon/headless/circle-info-icon.ts +14 -0
- package/src/lib/icon/headless/clipboard-check-icon.ts +28 -0
- package/src/lib/icon/headless/clock-icon.ts +21 -0
- package/src/lib/icon/headless/code-block-icon.ts +15 -0
- package/src/lib/icon/headless/code-icon.ts +14 -0
- package/src/lib/icon/headless/ellipsis-icon.ts +13 -0
- package/src/lib/icon/headless/ellipsis-vertical-icon.ts +13 -0
- package/src/lib/icon/headless/eye-icons.ts +27 -0
- package/src/lib/icon/headless/eyedropper-icon.ts +22 -0
- package/src/lib/icon/headless/file-icon.ts +16 -0
- package/src/lib/icon/headless/filter-icon.ts +11 -0
- package/src/lib/icon/headless/floppy-disk-icon.ts +27 -0
- package/src/lib/icon/headless/focus-frame-icon.ts +16 -0
- package/src/lib/icon/headless/grid-2x2-icon.ts +17 -0
- package/src/lib/icon/headless/heading-1-icon.ts +11 -0
- package/src/lib/icon/headless/heading-2-icon.ts +11 -0
- package/src/lib/icon/headless/heading-3-icon.ts +11 -0
- package/src/lib/icon/headless/icon-definition.ts +14 -0
- package/src/lib/icon/headless/icon-styles.component.css +7 -0
- package/src/lib/icon/headless/image-icon.ts +14 -0
- package/src/lib/icon/headless/italic-icon.ts +19 -0
- package/src/lib/icon/headless/link-icon.ts +17 -0
- package/src/lib/icon/headless/list-bulleted-icon.ts +14 -0
- package/src/lib/icon/headless/list-numbered-icon.ts +14 -0
- package/src/lib/icon/headless/location-icon.ts +21 -0
- package/src/lib/icon/headless/lock-icon.ts +14 -0
- package/src/lib/icon/headless/minus-icon.ts +14 -0
- package/src/lib/icon/headless/paragraph-icon.ts +11 -0
- package/src/lib/icon/headless/pause-icon.ts +11 -0
- package/src/lib/icon/headless/pencil-icon.ts +21 -0
- package/src/lib/icon/headless/play-icon.ts +10 -0
- package/src/lib/icon/headless/plus-icon.ts +21 -0
- package/src/lib/icon/headless/quote-icon.ts +15 -0
- package/src/lib/icon/headless/rotate-right-icon.ts +16 -0
- package/src/lib/icon/headless/star-icon.ts +14 -0
- package/src/lib/icon/headless/strikethrough-icon.ts +18 -0
- package/src/lib/icon/headless/table-icon.ts +15 -0
- package/src/lib/icon/headless/thumbtack-icon.ts +18 -0
- package/src/lib/icon/headless/times-icon.ts +14 -0
- package/src/lib/icon/headless/trash-icon.ts +24 -0
- package/src/lib/icon/headless/triangle-exclamation-icon.ts +14 -0
- package/src/lib/icon/headless/trophy-icon.ts +24 -0
- package/src/lib/icon/headless/underline-icon.ts +12 -0
- package/src/lib/icon/headless/undo-redo-icons.ts +24 -0
- package/src/lib/icon/headless/upload-icon.ts +16 -0
- package/src/lib/kbd/kbd.component.css +62 -0
- package/src/lib/loader/brand-loader/brand-loader.component.css +133 -0
- package/src/lib/loader/progress-bar/progress-bar.component.css +186 -0
- package/src/lib/loader/spinner/spinner-styles.component.css +225 -0
- package/src/lib/loader/spinner/spinner-sweep-dashes.ts +19 -0
- package/src/lib/masonry/masonry-styles.component.css +84 -0
- package/src/lib/match/match-card.component.css +556 -0
- package/src/lib/match/match-participant.component.css +236 -0
- package/src/lib/match/match-score.component.css +77 -0
- package/src/lib/match/match-scoreline.component.css +53 -0
- package/src/lib/match/match-time.component.css +5 -0
- package/src/lib/menu/menu-group-label.component.css +12 -0
- package/src/lib/menu/menu-item-shortcut.component.css +26 -0
- package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
- package/src/lib/menu/menu-item.component.css +36 -0
- package/src/lib/menu/menu-search-styles.component.css +83 -0
- package/src/lib/menu/menu-selection-item.component.css +92 -0
- package/src/lib/menu/menu-separator.component.css +9 -0
- package/src/lib/menu/menu.component.css +307 -0
- package/src/lib/notification/notification-stack.component.css +114 -0
- package/src/lib/notification/notification.component.css +275 -0
- package/src/lib/overlay/alert-dialog/alert-dialog.component.css +55 -0
- package/src/lib/overlay/floating-panel-styles.component.css +71 -0
- package/src/lib/overlay/floating-tip-styles.component.css +84 -0
- package/src/lib/overlay/overlay-container.component.css +170 -0
- package/src/lib/overlay/overlay-main-styles.component.css +105 -0
- package/src/lib/overlay/overlay-template-host.component.css +7 -0
- package/src/lib/overlay/routing/overlay-route-header-template-outlet.component.css +36 -0
- package/src/lib/overlay/routing/overlay-router-outlet.component.css +215 -0
- package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
- package/src/lib/overlay/sidebar/overlay-sidebar.component.css +23 -0
- package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +78 -0
- package/src/lib/overlay/strategies/dialog-styles.component.css +77 -0
- package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +141 -0
- package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
- package/src/lib/overlay/strategies/overlay-origin-clone.component.css +92 -0
- package/src/lib/overlay/strategies/sheet-styles.component.css +170 -0
- package/src/lib/pagination/page-size-select.component.css +6 -0
- package/src/lib/pagination/pagination.component.css +186 -0
- package/src/lib/picture/picture.component.css +82 -0
- package/src/lib/progress-steps/progress-step.component.css +269 -0
- package/src/lib/progress-steps/progress-steps.component.css +26 -0
- package/src/lib/query-error/query-error.component.css +27 -0
- package/src/lib/scheduler/scheduler-agenda-view.component.css +106 -0
- package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +56 -0
- package/src/lib/scheduler/scheduler-appointment-styles.component.css +127 -0
- package/src/lib/scheduler/scheduler-edit-color.component.css +16 -0
- package/src/lib/scheduler/scheduler-edit-surface-actions.component.css +14 -0
- package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +26 -0
- package/src/lib/scheduler/scheduler-edit-surface-children.component.css +57 -0
- package/src/lib/scheduler/scheduler-edit-surface-fields.component.css +11 -0
- package/src/lib/scheduler/scheduler-edit-surface-footer.component.css +7 -0
- package/src/lib/scheduler/scheduler-edit-surface-header.component.css +15 -0
- package/src/lib/scheduler/scheduler-edit-time-range.component.css +11 -0
- package/src/lib/scheduler/scheduler-month-view.component.css +145 -0
- package/src/lib/scheduler/scheduler-time-grid-view.component.css +271 -0
- package/src/lib/scheduler/scheduler.component.css +87 -0
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +223 -0
- package/src/lib/scrollable/headless/scrollable-footer.css +37 -0
- package/src/lib/scrollable/headless/scrollable-masks.component.css +165 -0
- package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
- package/src/lib/scrollable/scrollable.component.css +234 -0
- package/src/lib/scrollbar/scrollbar.component.css +116 -0
- package/src/lib/skeleton/skeleton.component.css +138 -0
- package/src/lib/standings/standings-pick.component.css +216 -0
- package/src/lib/standings/standings.component.css +353 -0
- package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
- package/src/lib/stat-tile/stat-tile.component.css +134 -0
- package/src/lib/stream/consent/stream-consent.component.css +100 -0
- package/src/lib/stream/error/stream-player-error.component.css +101 -0
- package/src/lib/stream/loading/stream-player-loading.component.css +16 -0
- package/src/lib/stream/pip/pip-player.component.css +40 -0
- package/src/lib/stream/pip/pip-slot-placeholder.component.css +68 -0
- package/src/lib/stream/pip/pip-stage-styles.component.css +96 -0
- package/src/lib/stream/pip/pip-window.component.css +222 -0
- package/src/lib/stream/stream-manager-styles.component.css +10 -0
- package/src/lib/stream/stream-overlay-card-styles.component.css +69 -0
- package/src/lib/stream/stream-player-slot-styles.component.css +18 -0
- package/src/lib/table/table-column-chooser.component.css +17 -0
- package/src/lib/table/table-column-menu-trigger.component.css +31 -0
- package/src/lib/table/table-detail-styles.component.css +103 -0
- package/src/lib/table/table-drag-scroll-styles.component.css +18 -0
- package/src/lib/table/table-expander-cell.component.css +64 -0
- package/src/lib/table/table-filter-trigger.component.css +44 -0
- package/src/lib/table/table-group-header-row.component.css +38 -0
- package/src/lib/table/table-inline-edit-styles.component.css +20 -0
- package/src/lib/table/table-page-sticky-header-styles.component.css +77 -0
- package/src/lib/table/table-reorder-overlay.component.css +42 -0
- package/src/lib/table/table-resize-grip.component.css +66 -0
- package/src/lib/table/table-row-box-styles.component.css +272 -0
- package/src/lib/table/table-select-cell.component.css +119 -0
- package/src/lib/table/table-skeleton-rows.component.css +19 -0
- package/src/lib/table/table-sort-priority-styles.component.css +15 -0
- package/src/lib/table/table-sticky-columns-styles.component.css +80 -0
- package/src/lib/table/table-virtual-scroll-styles.component.css +9 -0
- package/src/lib/table/table.component.css +865 -0
- package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +37 -0
- package/src/lib/tabs/tab-bar-styles.component.css +230 -0
- package/src/lib/tabs/tab-scale-styles.component.css +61 -0
- package/src/lib/tabs/tabs/tab-group.component.css +115 -0
- package/src/lib/time-picker/time-picker.component.css +221 -0
- package/src/lib/timeline/timeline-item.component.css +142 -0
- package/src/lib/timeline/timeline.component.css +7 -0
- package/src/lib/toggletip/toggletip.component.css +83 -0
- package/src/lib/toolbar/toolbar.component.css +44 -0
- package/src/lib/tooltip/tooltip.component.css +84 -0
- package/src/lib/tree/tree.component.css +221 -0
- package/types/ethlete-components-testing.d.ts +300 -0
- package/types/ethlete-components.d.ts +37454 -3707
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const COMPONENTS_IMPORT = /from\s*['"]@ethlete\/components(?:\/[^'"]*)?['"]/;
|
|
2
|
+
const BASELINE_Y = /(\.\s*)baselineY\b/g;
|
|
3
|
+
export const TEMPLATE_URL = /templateUrl\s*:\s*['"]([^'"]+)['"]/g;
|
|
4
|
+
export const importsEthleteComponents = (content) => COMPONENTS_IMPORT.test(content);
|
|
5
|
+
/** Returns the source or template with every `.baselineY` renamed to `.baseline`, or `null` when there is none. */
|
|
6
|
+
export const renameBaselineY = (content) => {
|
|
7
|
+
const next = content.replace(BASELINE_Y, '$1baseline');
|
|
8
|
+
return next === content ? null : next;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chart-baseline-y.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { formatFiles, joinPathFragments } from '@nx/devkit';
|
|
2
|
+
import { dirname } from 'node:path/posix';
|
|
3
|
+
import { createMigrationScope } from '../migrate-query-error-labels/migration-scope.js';
|
|
4
|
+
import { importsEthleteComponents, renameBaselineY, TEMPLATE_URL } from './chart-baseline-y.js';
|
|
5
|
+
export default async function migrateChartBaselineY(tree, schema) {
|
|
6
|
+
console.log('\nš Renaming the removed chart-grid baselineY alias to baseline...');
|
|
7
|
+
const scope = createMigrationScope(tree, schema);
|
|
8
|
+
console.log(` Scope: ${scope.describe()}`);
|
|
9
|
+
const changed = [];
|
|
10
|
+
const write = (filePath, content) => {
|
|
11
|
+
const next = renameBaselineY(content);
|
|
12
|
+
if (next === null)
|
|
13
|
+
return;
|
|
14
|
+
tree.write(filePath, next);
|
|
15
|
+
changed.push(filePath);
|
|
16
|
+
};
|
|
17
|
+
scope.visit(tree, (filePath) => {
|
|
18
|
+
if (!filePath.endsWith('.ts') || filePath.endsWith('.d.ts'))
|
|
19
|
+
return;
|
|
20
|
+
const content = tree.read(filePath, 'utf-8');
|
|
21
|
+
if (!content || !importsEthleteComponents(content))
|
|
22
|
+
return;
|
|
23
|
+
for (const match of content.matchAll(TEMPLATE_URL)) {
|
|
24
|
+
const templatePath = joinPathFragments(dirname(filePath), match[1] ?? '');
|
|
25
|
+
const template = tree.read(templatePath, 'utf-8');
|
|
26
|
+
if (template !== null)
|
|
27
|
+
write(templatePath, template);
|
|
28
|
+
}
|
|
29
|
+
write(filePath, content);
|
|
30
|
+
});
|
|
31
|
+
if (!schema.skipFormat) {
|
|
32
|
+
await formatFiles(tree);
|
|
33
|
+
}
|
|
34
|
+
if (changed.length > 0) {
|
|
35
|
+
console.log(`\nā
Renamed baselineY in ${changed.length} file(s).`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log('\nā
Nothing to do.');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-chart-baseline-y",
|
|
4
|
+
"title": "Rename the removed chart-grid baselineY alias to baseline",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const NAMES = ['UNIT_MS', 'deriveDurationFormatSpec', 'formatDuration', 'parseDuration'];
|
|
2
|
+
export const DURATION_FORMAT_INTERNALS_REMOVALS = NAMES.map((name) => ({
|
|
3
|
+
name,
|
|
4
|
+
todo: `${name} is no longer exported; it is a duration input internal. Bind a duration input with a durationFormat, or format and parse the milliseconds in the app.`,
|
|
5
|
+
}));
|
|
6
|
+
//# sourceMappingURL=duration-format-internals.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { runRemovedExportsMigration, } from '../removed-exports/run-removed-exports-migration.js';
|
|
2
|
+
import { DURATION_FORMAT_INTERNALS_REMOVALS } from './duration-format-internals.js';
|
|
3
|
+
export const DURATION_FORMAT_INTERNALS_REPORT_PATH = 'duration-format-internals-migration-tasks.md';
|
|
4
|
+
export default async function migrateDurationFormatInternals(tree, schema) {
|
|
5
|
+
await runRemovedExportsMigration(tree, schema, {
|
|
6
|
+
title: 'Removing the duration format helpers from @ethlete/components',
|
|
7
|
+
removed: DURATION_FORMAT_INTERNALS_REMOVALS,
|
|
8
|
+
reportPath: DURATION_FORMAT_INTERNALS_REPORT_PATH,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-duration-format-internals",
|
|
4
|
+
"title": "Remove the duration format helpers from @ethlete/components and mark the uses it cannot remove",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const IDENTIFIER = '[A-Za-z_$][\\w$]*';
|
|
2
|
+
const ASSIGNED = `\\s*[!?]?\\s*(?::[^=;\\n]*)?=\\s*`;
|
|
3
|
+
const RECEIVER_PATTERNS = [
|
|
4
|
+
new RegExp(`(${IDENTIFIER})${ASSIGNED}injectFormSupport\\s*\\(`, 'g'),
|
|
5
|
+
new RegExp(`(${IDENTIFIER})\\s*[!?]?\\s*:\\s*(?:Readonly\\s*<\\s*)?FormSupport\\b`, 'g'),
|
|
6
|
+
new RegExp(`(${IDENTIFIER})\\s*[!?]?\\s*:\\s*TableComponent\\b`, 'g'),
|
|
7
|
+
new RegExp(`(${IDENTIFIER})${ASSIGNED}(?:viewChild|contentChild|inject)(?:\\s*\\.\\s*required)?\\s*(?:<[^>]*>)?\\s*\\(\\s*TableComponent\\b`, 'g'),
|
|
8
|
+
new RegExp(`<et-table\\b[^>]*?\\s#(${IDENTIFIER})`, 'g'),
|
|
9
|
+
];
|
|
10
|
+
const NOT_CALLED_OR_ASSIGNED = '(?![\\w$])(?!\\s*(?:\\(|=(?!=)))';
|
|
11
|
+
const MEMBER_ACCESS = '(?:\\s*\\(\\s*\\))?\\s*!?\\s*(?:\\?\\.|\\.)\\s*';
|
|
12
|
+
const DIRECT_READ = new RegExp(`(injectFormSupport\\s*\\(\\s*\\)${MEMBER_ACCESS})errorColorTheme${NOT_CALLED_OR_ASSIGNED}`, 'g');
|
|
13
|
+
const ANY_READ = new RegExp(`\\.\\s*errorColorTheme${NOT_CALLED_OR_ASSIGNED}`);
|
|
14
|
+
const escape = (value) => value.replace(/[$]/g, '\\$&');
|
|
15
|
+
/** Returns the names a file binds to an `injectFormSupport()` result or a `TableComponent` instance, including `<et-table #ref>` template refs. */
|
|
16
|
+
export const collectErrorColorThemeReceivers = (content) => {
|
|
17
|
+
const names = new Set();
|
|
18
|
+
for (const pattern of RECEIVER_PATTERNS) {
|
|
19
|
+
for (const match of content.matchAll(pattern)) {
|
|
20
|
+
if (match[1])
|
|
21
|
+
names.add(match[1]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return names;
|
|
25
|
+
};
|
|
26
|
+
/** Returns the source or template with every read of `errorColorTheme` on a known receiver turned into a call, or `null` when there is none. */
|
|
27
|
+
export const callErrorColorTheme = (content, receivers) => {
|
|
28
|
+
let next = content.replace(DIRECT_READ, '$1errorColorTheme()');
|
|
29
|
+
for (const name of receivers) {
|
|
30
|
+
const read = new RegExp(`(?<![\\w$.])((?:this\\s*\\.\\s*)?${escape(name)}${MEMBER_ACCESS})errorColorTheme${NOT_CALLED_OR_ASSIGNED}`, 'g');
|
|
31
|
+
next = next.replace(read, '$1errorColorTheme()');
|
|
32
|
+
}
|
|
33
|
+
return next === content ? null : next;
|
|
34
|
+
};
|
|
35
|
+
/** Whether the content still reads an `errorColorTheme` member without calling it. */
|
|
36
|
+
export const hasUncalledErrorColorTheme = (content) => ANY_READ.test(content);
|
|
37
|
+
//# sourceMappingURL=error-color-theme-signal.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { formatFiles, joinPathFragments } from '@nx/devkit';
|
|
2
|
+
import { createMigrationScope } from '../migrate-query-error-labels/migration-scope.js';
|
|
3
|
+
import { callErrorColorTheme, collectErrorColorThemeReceivers, hasUncalledErrorColorTheme, } from './error-color-theme-signal.js';
|
|
4
|
+
const componentSourcesOf = (tree, templatePath) => {
|
|
5
|
+
const separator = templatePath.lastIndexOf('/');
|
|
6
|
+
const directory = separator === -1 ? '' : templatePath.slice(0, separator);
|
|
7
|
+
const templateName = templatePath.slice(separator + 1);
|
|
8
|
+
return tree
|
|
9
|
+
.children(directory)
|
|
10
|
+
.filter((name) => name.endsWith('.ts') && !name.endsWith('.d.ts'))
|
|
11
|
+
.map((name) => tree.read(joinPathFragments(directory, name), 'utf-8') ?? '')
|
|
12
|
+
.filter((source) => source.includes(templateName));
|
|
13
|
+
};
|
|
14
|
+
const receiversFor = (tree, filePath, content) => {
|
|
15
|
+
const receivers = collectErrorColorThemeReceivers(content);
|
|
16
|
+
if (filePath.endsWith('.html')) {
|
|
17
|
+
for (const source of componentSourcesOf(tree, filePath)) {
|
|
18
|
+
for (const name of collectErrorColorThemeReceivers(source))
|
|
19
|
+
receivers.add(name);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return receivers;
|
|
23
|
+
};
|
|
24
|
+
export default async function migrateErrorColorThemeSignal(tree, schema) {
|
|
25
|
+
console.log('\nš Calling the errorColorTheme signal of injectFormSupport() and TableComponent...');
|
|
26
|
+
const scope = createMigrationScope(tree, schema);
|
|
27
|
+
console.log(` Scope: ${scope.describe()}`);
|
|
28
|
+
const changed = [];
|
|
29
|
+
scope.visit(tree, (filePath) => {
|
|
30
|
+
if (!/\.(ts|html)$/.test(filePath) || filePath.endsWith('.d.ts'))
|
|
31
|
+
return;
|
|
32
|
+
const content = tree.read(filePath, 'utf-8');
|
|
33
|
+
if (!content?.includes('errorColorTheme'))
|
|
34
|
+
return;
|
|
35
|
+
const receivers = receiversFor(tree, filePath, content);
|
|
36
|
+
const next = callErrorColorTheme(content, receivers);
|
|
37
|
+
if (next !== null) {
|
|
38
|
+
tree.write(filePath, next);
|
|
39
|
+
changed.push(filePath);
|
|
40
|
+
}
|
|
41
|
+
if (receivers.size > 0 && hasUncalledErrorColorTheme(next ?? content)) {
|
|
42
|
+
console.warn(`\nā ļø ${filePath} still reads an errorColorTheme it could not tie to injectFormSupport() or a TableComponent. If it is one of those, call it: errorColorTheme().`);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
if (!schema.skipFormat) {
|
|
46
|
+
await formatFiles(tree);
|
|
47
|
+
}
|
|
48
|
+
if (changed.length > 0) {
|
|
49
|
+
console.log(`\nā
Called errorColorTheme in ${changed.length} file(s).`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.log('\nā
Nothing to do.');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-error-color-theme-signal",
|
|
4
|
+
"title": "Call the errorColorTheme signal of injectFormSupport() and TableComponent where it is read",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const NAMES = [
|
|
2
|
+
'PixelRect',
|
|
3
|
+
'GridGeometry',
|
|
4
|
+
'ResizeSpanBounds',
|
|
5
|
+
'computeGeometry',
|
|
6
|
+
'spanWidth',
|
|
7
|
+
'spanHeight',
|
|
8
|
+
'positionToPixelRect',
|
|
9
|
+
'rowsToPixelHeight',
|
|
10
|
+
'pixelRectsEqual',
|
|
11
|
+
'positionsEqual',
|
|
12
|
+
'SNAP_HYSTERESIS',
|
|
13
|
+
'hysteresisRound',
|
|
14
|
+
'resizeSpanBounds',
|
|
15
|
+
'clampResizeRect',
|
|
16
|
+
'snapResizeSpan',
|
|
17
|
+
'projectDragCell',
|
|
18
|
+
'FindCollisionOptions',
|
|
19
|
+
'AutoPlaceOptions',
|
|
20
|
+
'ClampPositionOptions',
|
|
21
|
+
'ResolveCollisionsOptions',
|
|
22
|
+
'RowFloors',
|
|
23
|
+
'CompactLayoutOptions',
|
|
24
|
+
'itemsCollide',
|
|
25
|
+
'findCollision',
|
|
26
|
+
'compactLayout',
|
|
27
|
+
'autoPlace',
|
|
28
|
+
'clampPosition',
|
|
29
|
+
'resolveCollisions',
|
|
30
|
+
'computeGridHeight',
|
|
31
|
+
'MapLayoutOptions',
|
|
32
|
+
'resolveBreakpoint',
|
|
33
|
+
'mapLayoutToBreakpoint',
|
|
34
|
+
'AutoScrollPointer',
|
|
35
|
+
'AutoScroller',
|
|
36
|
+
'findScrollableAncestor',
|
|
37
|
+
'createAutoScroller',
|
|
38
|
+
];
|
|
39
|
+
export const GRID_ENGINE_INTERNALS_REMOVALS = NAMES.map((name) => ({
|
|
40
|
+
name,
|
|
41
|
+
todo: `${name} is no longer exported; the grid layout engine is internal. Use the GridComponent inputs and outputs, createGridAdapter, or serializeGridLayout / deserializeGridLayout instead.`,
|
|
42
|
+
}));
|
|
43
|
+
//# sourceMappingURL=grid-engine-internals.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { runRemovedExportsMigration, } from '../removed-exports/run-removed-exports-migration.js';
|
|
2
|
+
import { GRID_ENGINE_INTERNALS_REMOVALS } from './grid-engine-internals.js';
|
|
3
|
+
export const GRID_ENGINE_INTERNALS_REPORT_PATH = 'grid-engine-internals-migration-tasks.md';
|
|
4
|
+
export default async function migrateGridEngineInternals(tree, schema) {
|
|
5
|
+
await runRemovedExportsMigration(tree, schema, {
|
|
6
|
+
title: 'Removing the grid engine internals from @ethlete/components',
|
|
7
|
+
removed: GRID_ENGINE_INTERNALS_REMOVALS,
|
|
8
|
+
reportPath: GRID_ENGINE_INTERNALS_REPORT_PATH,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-grid-engine-internals",
|
|
4
|
+
"title": "Remove the grid engine internals from @ethlete/components and mark the uses it cannot remove",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const OLD_TOKEN = '--et-line-chart-stacked-area-opacity';
|
|
2
|
+
const NEW_TOKEN = '--et-line-chart-stacked-area-mix';
|
|
3
|
+
const OCCURRENCE = new RegExp([
|
|
4
|
+
`var\\(\\s*${OLD_TOKEN}\\s*(?:(?<fallbackLead>,\\s*)(?<fallback>[^()]*?)(?<fallbackTail>\\s*))?\\)`,
|
|
5
|
+
`${OLD_TOKEN}(?<colon>\\s*:\\s*)(?<value>[^;}\\n"'\`]*)`,
|
|
6
|
+
OLD_TOKEN,
|
|
7
|
+
].join('|'), 'g');
|
|
8
|
+
const NUMBER = /^[+-]?(?:\d+\.?\d*|\.\d+)$/;
|
|
9
|
+
const PERCENTAGE = /^[+-]?(?:\d+\.?\d*|\.\d+)%$/;
|
|
10
|
+
export const opacityToMix = (value) => {
|
|
11
|
+
const trimmed = value.trim();
|
|
12
|
+
if (NUMBER.test(trimmed))
|
|
13
|
+
return `${Math.round(Number(trimmed) * 100)}%`;
|
|
14
|
+
if (PERCENTAGE.test(trimmed))
|
|
15
|
+
return trimmed;
|
|
16
|
+
return null;
|
|
17
|
+
};
|
|
18
|
+
const lineAt = (content, index) => content.slice(0, index).split('\n').length;
|
|
19
|
+
/** Renames every `--et-line-chart-stacked-area-opacity` to `--et-line-chart-stacked-area-mix` and maps its values, or returns `null` when there is none. */
|
|
20
|
+
export const migrateStackedAreaMix = (content) => {
|
|
21
|
+
if (!content.includes(OLD_TOKEN))
|
|
22
|
+
return null;
|
|
23
|
+
const unmapped = [];
|
|
24
|
+
const next = content.replace(OCCURRENCE, (match, ...args) => {
|
|
25
|
+
const index = args.at(-3);
|
|
26
|
+
const groups = args.at(-1);
|
|
27
|
+
if (match.startsWith('var(')) {
|
|
28
|
+
if (groups['fallback'] === undefined)
|
|
29
|
+
return `var(${NEW_TOKEN})`;
|
|
30
|
+
const mapped = opacityToMix(groups['fallback']);
|
|
31
|
+
if (mapped === null)
|
|
32
|
+
unmapped.push(lineAt(content, index));
|
|
33
|
+
return `var(${NEW_TOKEN}${groups['fallbackLead']}${mapped ?? groups['fallback']}${groups['fallbackTail']})`;
|
|
34
|
+
}
|
|
35
|
+
if (groups['colon'] !== undefined) {
|
|
36
|
+
const value = groups['value'] ?? '';
|
|
37
|
+
const trimmed = value.trimEnd();
|
|
38
|
+
const mapped = opacityToMix(trimmed);
|
|
39
|
+
if (mapped === null)
|
|
40
|
+
unmapped.push(lineAt(content, index));
|
|
41
|
+
return `${NEW_TOKEN}${groups['colon']}${mapped ?? trimmed}${value.slice(trimmed.length)}`;
|
|
42
|
+
}
|
|
43
|
+
unmapped.push(lineAt(content, index));
|
|
44
|
+
return NEW_TOKEN;
|
|
45
|
+
});
|
|
46
|
+
return { content: next, unmapped };
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=line-chart-stacked-area-mix.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { formatFiles } from '@nx/devkit';
|
|
2
|
+
import { createMigrationScope } from '../migrate-query-error-labels/migration-scope.js';
|
|
3
|
+
import { migrateStackedAreaMix } from './line-chart-stacked-area-mix.js';
|
|
4
|
+
const EXTENSIONS = ['.css', '.scss', '.html', '.ts'];
|
|
5
|
+
export default async function migrateLineChartStackedAreaMix(tree, schema) {
|
|
6
|
+
console.log('\nš Renaming --et-line-chart-stacked-area-opacity to --et-line-chart-stacked-area-mix...');
|
|
7
|
+
const scope = createMigrationScope(tree, schema);
|
|
8
|
+
console.log(` Scope: ${scope.describe()}`);
|
|
9
|
+
const changed = [];
|
|
10
|
+
scope.visit(tree, (filePath) => {
|
|
11
|
+
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)) || filePath.endsWith('.d.ts'))
|
|
12
|
+
return;
|
|
13
|
+
const content = tree.read(filePath, 'utf-8');
|
|
14
|
+
if (!content)
|
|
15
|
+
return;
|
|
16
|
+
const result = migrateStackedAreaMix(content);
|
|
17
|
+
if (result === null)
|
|
18
|
+
return;
|
|
19
|
+
tree.write(filePath, result.content);
|
|
20
|
+
changed.push(filePath);
|
|
21
|
+
for (const line of result.unmapped) {
|
|
22
|
+
console.warn(`\nā ļø ${filePath}:${line} now reads --et-line-chart-stacked-area-mix, but its value could not be mapped and was left as is. The token is a percentage (default 45%), the share of the series color in a mix with the surface: an opacity v becomes v * 100%. See the line chart guide: /components/line-chart.`);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (!schema.skipFormat) {
|
|
26
|
+
await formatFiles(tree);
|
|
27
|
+
}
|
|
28
|
+
if (changed.length > 0) {
|
|
29
|
+
console.log(`\nā
Renamed the stacked area token in ${changed.length} file(s).`);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
console.log('\nā
Nothing to do.');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-line-chart-stacked-area-mix",
|
|
4
|
+
"title": "Rename the removed --et-line-chart-stacked-area-opacity token to --et-line-chart-stacked-area-mix",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ATTRIBUTE, START_TAG } from '../migrate-select-input-renames/select-input-renames.js';
|
|
2
|
+
const LOADERS = {
|
|
3
|
+
'et-spinner': { flag: 'determinate', flagMeansDeterminate: true },
|
|
4
|
+
'et-progress-bar': { flag: 'indeterminate', flagMeansDeterminate: false },
|
|
5
|
+
};
|
|
6
|
+
const SIMPLE_EXPRESSION = /^!?[\w$.]+(\(\))?$/;
|
|
7
|
+
const parseAttributes = (attributes) => [...attributes.matchAll(ATTRIBUTE)].map((match) => {
|
|
8
|
+
const rawName = match[2] ?? '';
|
|
9
|
+
const rawValue = (match[3] ?? '').replace(/^\s*=\s*/, '');
|
|
10
|
+
const expression = /^(["'])([\s\S]*)\1$/.exec(rawValue)?.[2] ?? rawValue;
|
|
11
|
+
const bracketed = /^\[([^\]]+)\]$/.exec(rawName)?.[1];
|
|
12
|
+
if (bracketed)
|
|
13
|
+
return { text: match[0], name: bracketed, bound: true, expression: expression.trim() };
|
|
14
|
+
if (rawName.startsWith('bind-')) {
|
|
15
|
+
return { text: match[0], name: rawName.slice(5), bound: true, expression: expression.trim() };
|
|
16
|
+
}
|
|
17
|
+
return { text: match[0], name: rawName, bound: false, expression };
|
|
18
|
+
});
|
|
19
|
+
const readFlag = (attribute) => {
|
|
20
|
+
if (!attribute.bound)
|
|
21
|
+
return { kind: 'constant', on: attribute.expression !== 'false' };
|
|
22
|
+
if (attribute.expression === 'true' || attribute.expression === 'false') {
|
|
23
|
+
return { kind: 'constant', on: attribute.expression === 'true' };
|
|
24
|
+
}
|
|
25
|
+
return { kind: 'dynamic', expression: attribute.expression };
|
|
26
|
+
};
|
|
27
|
+
const valueExpression = (attribute) => {
|
|
28
|
+
if (attribute.bound)
|
|
29
|
+
return attribute.expression;
|
|
30
|
+
return /^-?\d+(\.\d+)?$/.test(attribute.expression.trim())
|
|
31
|
+
? attribute.expression.trim()
|
|
32
|
+
: `'${attribute.expression}'`;
|
|
33
|
+
};
|
|
34
|
+
const wrapCondition = (expression) => (SIMPLE_EXPRESSION.test(expression) ? expression : `(${expression})`);
|
|
35
|
+
const wrapBranch = (expression) => (/[?|]/.test(expression) ? `(${expression})` : expression);
|
|
36
|
+
const bindValue = (expression) => expression.includes('"') ? `[value]='${expression}'` : `[value]="${expression}"`;
|
|
37
|
+
export const migrateLoaderDeterminate = (content, options = {}) => {
|
|
38
|
+
const findings = [];
|
|
39
|
+
const next = content.replace(START_TAG, (tag, tagName, attributes, offset) => {
|
|
40
|
+
const loader = LOADERS[tagName];
|
|
41
|
+
if (!loader || (tagName === 'et-spinner' && options.skipSpinner))
|
|
42
|
+
return tag;
|
|
43
|
+
const parsed = parseAttributes(attributes);
|
|
44
|
+
if (parsed.some((attribute) => attribute.name === 'mode'))
|
|
45
|
+
return tag;
|
|
46
|
+
const flagAttribute = parsed.find((attribute) => attribute.name === loader.flag);
|
|
47
|
+
const valueAttribute = parsed.find((attribute) => attribute.name === 'value');
|
|
48
|
+
const line = content.slice(0, offset).split('\n').length;
|
|
49
|
+
const report = (message) => findings.push({ line, message: `<${tagName}> ${message}` });
|
|
50
|
+
let rewritten = attributes;
|
|
51
|
+
const remove = (attribute) => (rewritten = rewritten.replace(attribute.text, ''));
|
|
52
|
+
const replace = (attribute, expression) => (rewritten = rewritten.replace(attribute.text, `${/^\s+/.exec(attribute.text)?.[0] ?? ' '}${bindValue(expression)}`));
|
|
53
|
+
if (!flagAttribute) {
|
|
54
|
+
if (loader.flagMeansDeterminate && valueAttribute) {
|
|
55
|
+
report('binds value without determinate. A bound value now makes it determinate; drop it to stay indeterminate.');
|
|
56
|
+
}
|
|
57
|
+
if (!loader.flagMeansDeterminate && !valueAttribute) {
|
|
58
|
+
report('has no value binding, so it now renders indeterminate instead of an empty bar. Bind [value].');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const flag = readFlag(flagAttribute);
|
|
63
|
+
remove(flagAttribute);
|
|
64
|
+
if (flag.kind === 'constant') {
|
|
65
|
+
const determinate = flag.on === loader.flagMeansDeterminate;
|
|
66
|
+
if (!determinate && valueAttribute)
|
|
67
|
+
remove(valueAttribute);
|
|
68
|
+
if (determinate && !valueAttribute) {
|
|
69
|
+
report(`had a constant ${loader.flag} binding but no value, so it now renders indeterminate. Bind [value].`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (valueAttribute) {
|
|
73
|
+
const condition = wrapCondition(flag.expression);
|
|
74
|
+
const value = wrapBranch(valueExpression(valueAttribute));
|
|
75
|
+
replace(valueAttribute, loader.flagMeansDeterminate ? `${condition} ? ${value} : undefined` : `${condition} ? undefined : ${value}`);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
report(`had [${loader.flag}]="${flag.expression}" but no value. It is removed; bind [value] to a number while the loader is determinate and to undefined otherwise.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return rewritten === attributes
|
|
82
|
+
? tag
|
|
83
|
+
: `<${tagName}${rewritten}${tag.slice(tagName.length + attributes.length + 1)}`;
|
|
84
|
+
});
|
|
85
|
+
return { content: next === content ? null : next, findings };
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=loader-determinate.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { formatFiles, joinPathFragments } from '@nx/devkit';
|
|
2
|
+
import { dirname } from 'node:path/posix';
|
|
3
|
+
import { createMigrationScope } from '../migrate-query-error-labels/migration-scope.js';
|
|
4
|
+
import { importsEthleteComponents, TEMPLATE_URL } from '../migrate-select-input-renames/select-input-renames.js';
|
|
5
|
+
import { migrateLoaderDeterminate } from './loader-determinate.js';
|
|
6
|
+
const CDK_SPINNER_IMPORT = /\bProgressSpinnerComponent\b[^;]*from\s*['"]@ethlete\/cdk/;
|
|
7
|
+
export default async function migrateLoaderDeterminateInputs(tree, schema) {
|
|
8
|
+
console.log('\nš Removing the spinner determinate and progress bar indeterminate inputs...');
|
|
9
|
+
const scope = createMigrationScope(tree, schema);
|
|
10
|
+
console.log(` Scope: ${scope.describe()}`);
|
|
11
|
+
const changed = [];
|
|
12
|
+
const findings = [];
|
|
13
|
+
const migrate = (filePath, content, skipSpinner) => {
|
|
14
|
+
const result = migrateLoaderDeterminate(content, { skipSpinner });
|
|
15
|
+
findings.push(...result.findings.map((finding) => ({ ...finding, filePath })));
|
|
16
|
+
if (result.content === null)
|
|
17
|
+
return;
|
|
18
|
+
tree.write(filePath, result.content);
|
|
19
|
+
changed.push(filePath);
|
|
20
|
+
};
|
|
21
|
+
scope.visit(tree, (filePath) => {
|
|
22
|
+
if (!filePath.endsWith('.ts') || filePath.endsWith('.d.ts'))
|
|
23
|
+
return;
|
|
24
|
+
const content = tree.read(filePath, 'utf-8');
|
|
25
|
+
if (!content || !importsEthleteComponents(content))
|
|
26
|
+
return;
|
|
27
|
+
const skipSpinner = CDK_SPINNER_IMPORT.test(content);
|
|
28
|
+
for (const match of content.matchAll(TEMPLATE_URL)) {
|
|
29
|
+
const templatePath = joinPathFragments(dirname(filePath), match[1] ?? '');
|
|
30
|
+
const template = tree.read(templatePath, 'utf-8');
|
|
31
|
+
if (template !== null)
|
|
32
|
+
migrate(templatePath, template, skipSpinner);
|
|
33
|
+
}
|
|
34
|
+
migrate(filePath, content, skipSpinner);
|
|
35
|
+
});
|
|
36
|
+
if (!schema.skipFormat) {
|
|
37
|
+
await formatFiles(tree);
|
|
38
|
+
}
|
|
39
|
+
for (const finding of findings) {
|
|
40
|
+
console.warn(`\nā ļø ${finding.filePath}:${finding.line} ${finding.message} See /components/loader.`);
|
|
41
|
+
}
|
|
42
|
+
if (changed.length > 0) {
|
|
43
|
+
console.log(`\nā
Migrated loader bindings in ${changed.length} file(s).`);
|
|
44
|
+
}
|
|
45
|
+
else if (findings.length === 0) {
|
|
46
|
+
console.log('\nā
Nothing to do.');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "migrate-loader-determinate",
|
|
4
|
+
"title": "Remove the spinner determinate and progress bar indeterminate inputs",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": { "type": "string" },
|
|
10
|
+
"description": "Nx projects to scan. Defaults to every project in the workspace.",
|
|
11
|
+
"alias": "project"
|
|
12
|
+
},
|
|
13
|
+
"include": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "string" },
|
|
16
|
+
"description": "Path prefixes to scan, relative to the workspace root (e.g. 'apps/shop'). Unioned with `projects`.",
|
|
17
|
+
"alias": "includePath"
|
|
18
|
+
},
|
|
19
|
+
"skipFormat": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Skip formatting files after migration",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { runRemovedExportsMigration, } from '../removed-exports/run-removed-exports-migration.js';
|
|
2
|
+
import { OVERLAY_FULLSCREEN_ANIMATION_REMOVALS } from './overlay-fullscreen-animation.js';
|
|
3
|
+
export const OVERLAY_FULLSCREEN_ANIMATION_REPORT_PATH = 'overlay-fullscreen-animation-migration-tasks.md';
|
|
4
|
+
export default async function migrateOverlayFullscreenAnimation(tree, schema) {
|
|
5
|
+
await runRemovedExportsMigration(tree, schema, {
|
|
6
|
+
title: 'Removing the overlay fullscreen animation internals from @ethlete/components',
|
|
7
|
+
removed: OVERLAY_FULLSCREEN_ANIMATION_REMOVALS,
|
|
8
|
+
reportPath: OVERLAY_FULLSCREEN_ANIMATION_REPORT_PATH,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const NAMES = [
|
|
2
|
+
'ViewportTransformData',
|
|
3
|
+
'FullscreenAnimationCancellable',
|
|
4
|
+
'FullscreenAnimationState',
|
|
5
|
+
'FullscreenAnimationDeps',
|
|
6
|
+
'cleanupFullscreenAnimationStyles',
|
|
7
|
+
'startFullscreenEnterAnimation',
|
|
8
|
+
'startFullscreenLeaveAnimation',
|
|
9
|
+
'cleanupFullscreenAnimation',
|
|
10
|
+
'abortFullscreenAnimation',
|
|
11
|
+
];
|
|
12
|
+
export const OVERLAY_FULLSCREEN_ANIMATION_REMOVALS = NAMES.map((name) => ({
|
|
13
|
+
name,
|
|
14
|
+
todo: `${name} is no longer exported; the full-screen morph animation is internal to fullScreenDialogOverlayStrategy. Configure the strategy instead of driving the animation yourself.`,
|
|
15
|
+
}));
|
|
16
|
+
//# sourceMappingURL=overlay-fullscreen-animation.js.map
|