@koobiq/components 21.0.0 → 21.1.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/badge/_badge-theme.scss +31 -0
- package/breadcrumbs/breadcrumbs.scss +5 -1
- package/checkbox/_checkbox-theme.scss +0 -17
- package/checkbox/checkbox-tokens.scss +0 -4
- package/code-block/_code-block-theme.scss +7 -6
- package/code-block/code-block-tokens.scss +8 -4
- package/code-block/code-block.scss +54 -32
- package/content-panel/content-panel-header.scss +2 -3
- package/content-panel/content-panel.scss +3 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox-tokens.scss +0 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -2
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -2
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +2 -2
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +18 -8
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +78 -10
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +106 -394
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +4 -4
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +300 -37
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +151 -60
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +3 -3
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +3 -3
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +17 -8
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +124 -41
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +3 -3
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +90 -27
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +38 -17
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +19 -2
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +76 -17
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +1 -1
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +3 -3
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +86 -25
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +4 -4
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +116 -38
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +86 -7
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +41 -19
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +29 -17
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +49 -12
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +198 -186
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +49 -25
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +30 -11
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +28 -11
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +2 -2
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +71 -16
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +2 -2
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +25 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +90 -17
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +27 -7
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +24 -9
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +288 -109
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +0 -12
- package/file-upload/file-upload-tokens.scss +0 -1
- package/file-upload/file-upload.scss +0 -1
- package/filter-bar/_filter-bar-theme.scss +7 -8
- package/filter-bar/filter-bar.scss +0 -1
- package/filter-bar/pipes/base-pipe.scss +36 -2
- package/filter-bar/pipes/pipe-multi-tree-select.scss +27 -0
- package/form-field/_fieldset-theme.scss +2 -7
- package/form-field/_form-field-theme.scss +9 -22
- package/form-field/_hint-theme.scss +20 -0
- package/form-field/fieldset-tokens.scss +0 -1
- package/form-field/fieldset.scss +0 -3
- package/form-field/form-field-tokens.scss +1 -1
- package/form-field/form-field.scss +9 -0
- package/form-field/hint-tokens.scss +3 -0
- package/modal/modal.scss +2 -0
- package/navbar/_navbar-item_vertical.scss +48 -2
- package/navbar/_navbar-theme.scss +11 -3
- package/navbar/navbar-item.scss +17 -0
- package/navbar/navbar-tokens.scss +3 -0
- package/package.json +4 -4
- package/popover/popover.scss +1 -1
- package/radio/_radio-theme.scss +0 -30
- package/radio/radio-tokens.scss +0 -2
- package/schematics/collection.json +94 -89
- package/schematics/migrations/accordion-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/actions-panel-overlay-container/{index.js → index.cjs} +5 -4
- package/schematics/migrations/alert-signals/{index.js → index.cjs} +14 -13
- package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
- package/schematics/migrations/app-switcher-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
- package/schematics/migrations/autocomplete-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/badge-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-state-and-styles/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-supported-colors/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-toggle-signals-and-aria/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-truncation/{index.js → index.cjs} +7 -6
- package/schematics/migrations/checkbox-signals/{index.js → index.cjs} +9 -8
- package/schematics/migrations/clamped-text-disclosure/{index.js → index.cjs} +5 -4
- package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
- package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
- package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
- package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
- package/schematics/migrations/code-block-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/color-signals/index.cjs +20 -0
- package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
- package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
- package/schematics/migrations/datepicker-signals/index.cjs +18 -0
- package/schematics/migrations/deprecated-icons/README.md +21 -5
- package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +15 -28
- package/schematics/migrations/deprecated-icons/schema.json +1 -1
- package/schematics/migrations/design-tokens-v4/{index.js → index.cjs} +3 -2
- package/schematics/migrations/divider-signals-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/dl-attribute-coercion/{index.js → index.cjs} +7 -6
- package/schematics/migrations/dl-standalone-names/{index.js → index.cjs} +11 -10
- package/schematics/migrations/dropdown-demote-overlay/{index.js → index.cjs} +7 -6
- package/schematics/migrations/dropdown-signals/index.cjs +20 -0
- package/schematics/migrations/empty-state-error-color/{index.js → index.cjs} +5 -4
- package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/file-upload-cva-and-primitives/{index.js → index.cjs} +5 -4
- package/schematics/migrations/file-upload-deprecated-outputs/{index.js → index.cjs} +5 -4
- package/schematics/migrations/filter-bar-rename-action/{index.js → index.cjs} +5 -4
- package/schematics/migrations/filter-bar-signals/{index.js → index.cjs} +16 -15
- package/schematics/migrations/filter-bar-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/flag-inner-html/{index.js → index.cjs} +5 -4
- package/schematics/migrations/form-field-signals/{index.js → index.cjs} +18 -17
- package/schematics/migrations/icon-semantics-and-api/{data.js → data.cjs} +4 -4
- package/schematics/migrations/icon-semantics-and-api/{index.js → index.cjs} +6 -5
- package/schematics/migrations/icons-replacement/README.md +16 -2
- package/schematics/migrations/icons-replacement/{index.js → index.cjs} +21 -18
- package/schematics/migrations/icons-replacement/schema.json +12 -3
- package/schematics/migrations/inline-edit-a11y-and-types/{index.js → index.cjs} +5 -4
- package/schematics/migrations/input-number-surface/{index.js → index.cjs} +5 -4
- package/schematics/migrations/input-signals/index.cjs +18 -0
- package/schematics/migrations/link-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/link-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/list-signals/index.cjs +18 -0
- package/schematics/migrations/list-tree-multiple-input/{index.js → index.cjs} +7 -6
- package/schematics/migrations/loader-overlay-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/locale-configuration-providers/{index.js → index.cjs} +5 -4
- package/schematics/migrations/mandatory-peer-dependencies/{index.js → index.cjs} +3 -2
- package/schematics/migrations/markdown-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/modal-dialog-semantics/{index.js → index.cjs} +5 -4
- package/schematics/migrations/modal-signals/index.cjs +20 -0
- package/schematics/migrations/navbar-signals-and-aria/{index.js → index.cjs} +7 -6
- package/schematics/migrations/new-icons-pack/README.md +37 -25
- package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +29 -38
- package/schematics/migrations/new-icons-pack/replacement.json +2 -14
- package/schematics/migrations/new-icons-pack/schema.json +3 -3
- package/schematics/migrations/notification-center-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/option-signals/index.cjs +20 -0
- package/schematics/migrations/popover-leave-delay/{index.js → index.cjs} +5 -4
- package/schematics/migrations/progress-bar-percentage-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/progress-spinner-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/query-list-signals/index.cjs +18 -0
- package/schematics/migrations/radio-signals-and-aria/{index.js → index.cjs} +9 -8
- package/schematics/migrations/read-state-dwell-handlers/{index.js → index.cjs} +5 -4
- package/schematics/migrations/scrollbar-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/select-signal-inputs/{index.js → index.cjs} +5 -4
- package/schematics/migrations/sidepanel-non-modal-behavior/{index.js → index.cjs} +5 -4
- package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
- package/schematics/migrations/split-button-optional-disabled/{index.js → index.cjs} +5 -4
- package/schematics/migrations/splitter-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/table-cell-content/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tabs-signals-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tag-list-cleaner/{index.js → index.cjs} +7 -6
- package/schematics/migrations/tag-slots/{index.js → index.cjs} +6 -5
- package/schematics/migrations/tags-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/textarea-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/time-range-title-for/{index.js → index.cjs} +5 -4
- package/schematics/migrations/timepicker-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/timezone-grouping-utils/{index.js → index.cjs} +5 -4
- package/schematics/migrations/title-encapsulation/{index.js → index.cjs} +5 -4
- package/schematics/migrations/toast-stack-and-defaults/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tooltip-pointer-events-and-types/{index.js → index.cjs} +5 -4
- package/schematics/migrations/top-bar-container-selectors/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-select-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/username-pipe-injection/{index.js → index.cjs} +5 -4
- package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +7 -7
- package/schematics/migrations/v20-upgrade/index.cjs +19 -0
- package/schematics/migrations/v21-upgrade/{data.js → data.cjs} +22 -22
- package/schematics/migrations/v21-upgrade/{index.js → index.cjs} +11 -10
- package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
- package/schematics/migrations.json +87 -82
- package/schematics/ng-add/{index.js → index.cjs} +15 -289
- package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
- package/schematics/utils/custom-data.cjs +64 -0
- package/schematics/utils/{deprecated-path-migration.js → deprecated-path-migration.cjs} +4 -3
- package/schematics/utils/html-config.cjs +148 -0
- package/schematics/utils/{icon-migration.js → icon-migration.cjs} +11 -5
- package/schematics/utils/list-item-pattern.cjs +16 -0
- package/schematics/utils/{messages.js → messages.cjs} +4 -0
- package/schematics/utils/package-config.cjs +99 -0
- package/schematics/utils/project-files.cjs +25 -0
- package/schematics/utils/replacement-driver.cjs +337 -0
- package/schematics/utils/safe-rule.cjs +23 -0
- package/schematics/utils/signal-members-migration.cjs +779 -0
- package/schematics/utils/tag-patterns.cjs +21 -0
- package/schematics/utils/template-ref-access.cjs +155 -0
- package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
- package/schematics/utils/warn-only-migration.cjs +52 -0
- package/schematics/utils/workspace-styles.cjs +123 -0
- package/select/select.scss +7 -0
- package/tabs/_tabs-common.scss +23 -0
- package/textarea/textarea-tokens.scss +4 -1
- package/toast/toast.component.scss +1 -0
- package/toggle/_toggle-theme.scss +0 -17
- package/tooltip/tooltip.scss +1 -1
- package/top-bar/top-bar-tokens.scss +1 -0
- package/top-bar/top-bar.scss +10 -0
- package/types/koobiq-components-accordion.d.ts +25 -0
- package/types/koobiq-components-button-toggle.d.ts +6 -0
- package/types/koobiq-components-checkbox.d.ts +30 -0
- package/types/koobiq-components-clamped-text.d.ts +16 -3
- package/types/koobiq-components-code-block.d.ts +55 -14
- package/types/koobiq-components-core.d.ts +226 -13
- package/types/koobiq-components-datepicker.d.ts +28 -1
- package/types/koobiq-components-divider.d.ts +28 -10
- package/types/koobiq-components-dropdown.d.ts +19 -0
- package/types/koobiq-components-filter-bar.d.ts +79 -6
- package/types/koobiq-components-flag.d.ts +18 -0
- package/types/koobiq-components-form-field.d.ts +87 -6
- package/types/koobiq-components-icon.d.ts +15 -0
- package/types/koobiq-components-inline-edit.d.ts +8 -1
- package/types/koobiq-components-input.d.ts +22 -3
- package/types/koobiq-components-list.d.ts +6 -0
- package/types/koobiq-components-modal.d.ts +7 -0
- package/types/koobiq-components-navbar.d.ts +71 -7
- package/types/koobiq-components-notification-center.d.ts +13 -0
- package/types/koobiq-components-overflow-items.d.ts +26 -2
- package/types/koobiq-components-popover.d.ts +38 -3
- package/types/koobiq-components-radio.d.ts +30 -0
- package/types/koobiq-components-search-expandable.d.ts +10 -0
- package/types/koobiq-components-select.d.ts +36 -4
- package/types/koobiq-components-sidepanel.d.ts +52 -1
- package/types/koobiq-components-splitter.d.ts +13 -4
- package/types/koobiq-components-tabs.d.ts +4 -0
- package/types/koobiq-components-tags.d.ts +6 -0
- package/types/koobiq-components-textarea.d.ts +9 -2
- package/types/koobiq-components-timepicker.d.ts +15 -0
- package/types/koobiq-components-toggle.d.ts +30 -0
- package/types/koobiq-components-tooltip.d.ts +55 -10
- package/types/koobiq-components-top-bar.d.ts +11 -3
- package/types/koobiq-components-tree-select.d.ts +23 -8
- package/types/koobiq-components-tree.d.ts +144 -60
- package/schematics/migrations/angular-animations-removal/index.js +0 -20
- package/schematics/migrations/color-signals/index.js +0 -19
- package/schematics/migrations/core-mixins-removal/index.js +0 -17
- package/schematics/migrations/datepicker-signals/index.js +0 -17
- package/schematics/migrations/dropdown-signals/index.js +0 -19
- package/schematics/migrations/input-signals/index.js +0 -17
- package/schematics/migrations/list-signals/index.js +0 -17
- package/schematics/migrations/modal-signals/index.js +0 -19
- package/schematics/migrations/option-signals/index.js +0 -19
- package/schematics/migrations/query-list-signals/index.js +0 -17
- package/schematics/migrations/signal-inputs-subclasses/index.js +0 -17
- package/schematics/migrations/v20-upgrade/index.js +0 -18
- package/schematics/migrations/zoneless-change-detection/index.js +0 -20
- package/schematics/utils/package-config.js +0 -13
- /package/schematics/migrations/accordion-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/actions-panel-overlay-container/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/alert-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/angular-animations-removal/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/app-switcher-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/autocomplete-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/badge-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-state-and-styles/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-supported-colors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-toggle-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-truncation/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/checkbox-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/clamped-text-disclosure/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/code-block-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/color-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/core-mixins-removal/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/datepicker-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/divider-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dl-attribute-coercion/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dl-standalone-names/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dropdown-demote-overlay/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dropdown-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/empty-state-error-color/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/file-upload-cva-and-primitives/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/file-upload-deprecated-outputs/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-rename-action/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/flag-inner-html/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/form-field-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/inline-edit-a11y-and-types/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/input-number-surface/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/input-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/link-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/list-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/list-tree-multiple-input/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/loader-overlay-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/locale-configuration-providers/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/markdown-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/modal-dialog-semantics/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/modal-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/navbar-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/notification-center-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/option-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/popover-leave-delay/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/progress-bar-percentage-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/progress-spinner-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/query-list-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/radio-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/read-state-dwell-handlers/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/select-signal-inputs/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/sidepanel-non-modal-behavior/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/signal-inputs-subclasses/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/split-button-optional-disabled/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/table-cell-content/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tabs-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tag-list-cleaner/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tags-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/textarea-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/time-range-title-for/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/timepicker-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/timezone-grouping-utils/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/title-encapsulation/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/toast-stack-and-defaults/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tooltip-pointer-events-and-types/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/top-bar-container-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-select-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/username-pipe-injection/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/zoneless-change-detection/{data.js → data.cjs} +0 -0
- /package/schematics/utils/{ast.js → ast.cjs} +0 -0
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var utils_messages = require('../../utils/messages.
|
|
6
|
-
var utils_packageConfig = require('../../package-config
|
|
7
|
-
var
|
|
5
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
6
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
7
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
8
|
+
var migrations_accordionStateSavingDefault_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -30,7 +31,7 @@ function accordionStateSavingDefault(options) {
|
|
|
30
31
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
31
32
|
let consumers = 0;
|
|
32
33
|
let reported = 0;
|
|
33
|
-
|
|
34
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
34
35
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
35
36
|
return;
|
|
36
37
|
const content = entry?.content.toString();
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var utils_messages = require('../../utils/messages.
|
|
6
|
-
var utils_packageConfig = require('../../package-config
|
|
7
|
-
var
|
|
5
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
6
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
7
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
8
|
+
var migrations_actionsPanelOverlayContainer_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -26,7 +27,7 @@ function actionsPanelOverlayContainer(options) {
|
|
|
26
27
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
27
28
|
let consumers = 0;
|
|
28
29
|
let reported = 0;
|
|
29
|
-
|
|
30
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
30
31
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
31
32
|
return;
|
|
32
33
|
const content = entry?.content.toString();
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_messages = require('../../utils/messages.
|
|
7
|
-
var utils_packageConfig = require('../../package-config
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
6
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
7
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
8
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
9
|
+
var utils_signalMembersMigration = require('../../utils/signal-members-migration.cjs');
|
|
10
|
+
var utils_templateRefAccess = require('../../utils/template-ref-access.cjs');
|
|
11
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
12
|
+
var migrations_alertSignals_data = require('./data.cjs');
|
|
12
13
|
require('@angular-devkit/schematics');
|
|
13
14
|
require('@schematics/angular/utility');
|
|
14
|
-
require('../../utils/ast.
|
|
15
|
+
require('../../utils/ast.cjs');
|
|
15
16
|
|
|
16
17
|
const TS_EXT = '.ts';
|
|
17
18
|
const HTML_EXT = '.html';
|
|
@@ -26,7 +27,7 @@ function applyEdits(content, edits) {
|
|
|
26
27
|
}
|
|
27
28
|
/** The `KbqAlert` receivers of a file, typed by annotation or `inject()`. */
|
|
28
29
|
function collectFileReceivers(sourceFile) {
|
|
29
|
-
return { receivers:
|
|
30
|
+
return { receivers: utils_signalMembersMigration.collectAllReceivers(sourceFile, [migrations_alertSignals_data.ALERT_TYPE]), bindings: utils_signalMembersMigration.collectBindings(sourceFile) };
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* Whether a property access reads from an alert receiver. The shared engine resolves the receiver at this
|
|
@@ -34,7 +35,7 @@ function collectFileReceivers(sourceFile) {
|
|
|
34
35
|
* followed. A signal query holds the instance behind a call of its own, which this pass does not reach.
|
|
35
36
|
*/
|
|
36
37
|
function onReceiver(node, sourceFile, scope) {
|
|
37
|
-
const receiver =
|
|
38
|
+
const receiver = utils_signalMembersMigration.resolveReceiver(node.expression, node, sourceFile, scope.receivers, scope.bindings);
|
|
38
39
|
return !!receiver && !receiver.signalQuery;
|
|
39
40
|
}
|
|
40
41
|
/** Collects edits for every read/write of a value-safe signal member on a known alert receiver. */
|
|
@@ -46,7 +47,7 @@ function collectAccessEdits(sourceFile, scope) {
|
|
|
46
47
|
migrations_alertSignals_data.SIGNAL_MEMBERS.includes(node.name.text) &&
|
|
47
48
|
onReceiver(node, sourceFile, scope)) {
|
|
48
49
|
// `KbqAlert` signal members are `input()`, so every write is left for the consumer and reported.
|
|
49
|
-
|
|
50
|
+
utils_signalMembersMigration.classifyAccess(node, sourceFile, migrations_alertSignals_data.WRITABLE_MEMBERS, edits);
|
|
50
51
|
}
|
|
51
52
|
node.forEachChild(visit);
|
|
52
53
|
};
|
|
@@ -55,7 +56,7 @@ function collectAccessEdits(sourceFile, scope) {
|
|
|
55
56
|
}
|
|
56
57
|
/** Whether a signal member is written rather than read, in any form: the migration leaves it for the consumer. */
|
|
57
58
|
function isReadOnlyWrite(node) {
|
|
58
|
-
return migrations_alertSignals_data.SIGNAL_MEMBERS.includes(node.name.text) && !migrations_alertSignals_data.WRITABLE_MEMBERS.has(node.name.text) &&
|
|
59
|
+
return migrations_alertSignals_data.SIGNAL_MEMBERS.includes(node.name.text) && !migrations_alertSignals_data.WRITABLE_MEMBERS.has(node.name.text) && utils_signalMembersMigration.isWriteTarget(node);
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* Collects the manual-migration members (`alertColor`, now-`protected` queries, writes to read-only signal
|
|
@@ -134,7 +135,7 @@ async function migrateTemplate(template) {
|
|
|
134
135
|
return untouched;
|
|
135
136
|
const { rootNodes } = parsed.tree;
|
|
136
137
|
// A bare `#ref` or one naming the alert; `#ref="ngModel"` names another directive.
|
|
137
|
-
const { content, readOnlyWrites } =
|
|
138
|
+
const { content, readOnlyWrites } = utils_templateRefAccess.rewriteRefAccesses(template, rootNodes, (element, value) => element.name === migrations_alertSignals_data.ALERT_ELEMENT && (!value || value === migrations_alertSignals_data.ALERT_EXPORT_AS) ? REF_POLICY : undefined);
|
|
138
139
|
return { content, changed: content !== template, readOnlyWrites };
|
|
139
140
|
}
|
|
140
141
|
/** Pass B (inline) — rewrite alert ref reads inside inline component templates. */
|
|
@@ -174,7 +175,7 @@ function alertSignals(options) {
|
|
|
174
175
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
175
176
|
const tsPaths = [];
|
|
176
177
|
const htmlPaths = [];
|
|
177
|
-
|
|
178
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
178
179
|
if (filePath.endsWith(TS_EXT))
|
|
179
180
|
tsPaths.push(filePath);
|
|
180
181
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var utils_warnOnlyMigration = require('../../utils/warn-only-migration.cjs');
|
|
6
|
+
var migrations_angularAnimationsRemoval_data = require('./data.cjs');
|
|
7
|
+
require('../../utils/messages.cjs');
|
|
8
|
+
require('../../utils/package-config.cjs');
|
|
9
|
+
require('@angular-devkit/schematics');
|
|
10
|
+
require('@schematics/angular/utility');
|
|
11
|
+
require('../../utils/project-files.cjs');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Reports the uses of the removed animation triggers and of the members that carried an `AnimationEvent`.
|
|
15
|
+
* Never writes: what replaces a member depends on what the code did with the event.
|
|
16
|
+
*/
|
|
17
|
+
function angularAnimationsRemoval(options) {
|
|
18
|
+
return utils_warnOnlyMigration.warnOnlyRule({ label: '[angular-animations-removal]', warnPatterns: migrations_angularAnimationsRemoval_data.warnPatterns, summary: migrations_angularAnimationsRemoval_data.SUMMARY }, options);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.default = angularAnimationsRemoval;
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_appSwitcherSignals_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -305,7 +306,7 @@ function appSwitcherSignals(options) {
|
|
|
305
306
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
306
307
|
const tsPaths = [];
|
|
307
308
|
const htmlPaths = [];
|
|
308
|
-
|
|
309
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
309
310
|
if (filePath.endsWith(TS_EXT))
|
|
310
311
|
tsPaths.push(filePath);
|
|
311
312
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var utils_angularParsing = require('../../utils/angular-parsing.
|
|
6
|
-
var utils_packageConfig = require('../../package-config
|
|
7
|
-
var utils_typescript = require('../../utils/typescript.
|
|
5
|
+
var utils_angularParsing = require('../../utils/angular-parsing.cjs');
|
|
6
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
7
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
8
8
|
require('typescript');
|
|
9
|
-
require('../../utils/ast.
|
|
9
|
+
require('../../utils/ast.cjs');
|
|
10
10
|
require('@angular-devkit/schematics');
|
|
11
11
|
require('@schematics/angular/utility');
|
|
12
|
-
require('../../utils/messages.
|
|
12
|
+
require('../../utils/messages.cjs');
|
|
13
|
+
require('../../utils/project-files.cjs');
|
|
13
14
|
|
|
14
15
|
const migrationData = {
|
|
15
16
|
elementName: 'kbq-autocomplete',
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_autocompleteSignals_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -644,7 +645,7 @@ function autocompleteSignals(options) {
|
|
|
644
645
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
645
646
|
const tsPaths = [];
|
|
646
647
|
const htmlPaths = [];
|
|
647
|
-
|
|
648
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
648
649
|
if (filePath.endsWith(TS_EXT))
|
|
649
650
|
tsPaths.push(filePath);
|
|
650
651
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_badgeSignals_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -633,7 +634,7 @@ function badgeSignals(options) {
|
|
|
633
634
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
634
635
|
const tsPaths = [];
|
|
635
636
|
const htmlPaths = [];
|
|
636
|
-
|
|
637
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
637
638
|
if (filePath.endsWith(TS_EXT))
|
|
638
639
|
tsPaths.push(filePath);
|
|
639
640
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_buttonStateAndStyles_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -163,7 +164,7 @@ function buttonStateAndStyles(options) {
|
|
|
163
164
|
const root = projectDefinition?.root ?? '';
|
|
164
165
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
165
166
|
const filePaths = [];
|
|
166
|
-
|
|
167
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
167
168
|
if (!isMigratableFile(filePath))
|
|
168
169
|
return;
|
|
169
170
|
filePaths.push(filePath);
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_buttonSupportedColors_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -197,7 +198,7 @@ function buttonSupportedColors(options) {
|
|
|
197
198
|
const root = projectDefinition?.root ?? '';
|
|
198
199
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
199
200
|
const filePaths = [];
|
|
200
|
-
|
|
201
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
201
202
|
if (!isMigratableFile(filePath))
|
|
202
203
|
return;
|
|
203
204
|
filePaths.push(filePath);
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_buttonToggleSignalsAndAria_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -425,7 +426,7 @@ function buttonToggleSignalsAndAria(options) {
|
|
|
425
426
|
const tsPaths = [];
|
|
426
427
|
const htmlPaths = [];
|
|
427
428
|
const stylePaths = [];
|
|
428
|
-
|
|
429
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
429
430
|
if (filePath.endsWith(TS_EXT))
|
|
430
431
|
tsPaths.push(filePath);
|
|
431
432
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
11
|
+
var migrations_buttonTruncation_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -204,7 +205,7 @@ function buttonTruncation(options) {
|
|
|
204
205
|
const tsPaths = [];
|
|
205
206
|
const htmlPaths = [];
|
|
206
207
|
const stylePaths = [];
|
|
207
|
-
|
|
208
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
208
209
|
if (filePath.endsWith(TS_EXT))
|
|
209
210
|
tsPaths.push(filePath);
|
|
210
211
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var ts = require('typescript');
|
|
6
|
-
var utils_ast = require('../../utils/ast.
|
|
7
|
-
var utils_messages = require('../../utils/messages.
|
|
8
|
-
var utils_packageConfig = require('../../package-config
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
6
|
+
var utils_ast = require('../../utils/ast.cjs');
|
|
7
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
8
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
9
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
10
|
+
var utils_signalMembersMigration = require('../../utils/signal-members-migration.cjs');
|
|
11
|
+
var utils_typescript = require('../../utils/typescript.cjs');
|
|
12
|
+
var migrations_checkboxSignals_data = require('./data.cjs');
|
|
12
13
|
require('@angular-devkit/schematics');
|
|
13
14
|
require('@schematics/angular/utility');
|
|
14
15
|
|
|
@@ -234,7 +235,7 @@ function classifyAccess(node, edits) {
|
|
|
234
235
|
// a destructuring target. Every migrated member is an `input()`, so there is no writable half: the write is
|
|
235
236
|
// left untouched and reported, and appending `()` would produce unparseable TypeScript instead of the
|
|
236
237
|
// read-only error the consumer should see.
|
|
237
|
-
if (
|
|
238
|
+
if (utils_signalMembersMigration.isWriteTarget(node))
|
|
238
239
|
return 'write';
|
|
239
240
|
// Read (incl. optional chain `x?.id`): append `()`.
|
|
240
241
|
edits.push({ start: node.getEnd(), end: node.getEnd(), text: '()' });
|
|
@@ -563,7 +564,7 @@ function checkboxSignals(options) {
|
|
|
563
564
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
564
565
|
const tsPaths = [];
|
|
565
566
|
const htmlPaths = [];
|
|
566
|
-
|
|
567
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
567
568
|
if (filePath.endsWith(TS_EXT))
|
|
568
569
|
tsPaths.push(filePath);
|
|
569
570
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var utils_messages = require('../../utils/messages.
|
|
6
|
-
var utils_packageConfig = require('../../package-config
|
|
7
|
-
var
|
|
5
|
+
var utils_messages = require('../../utils/messages.cjs');
|
|
6
|
+
var utils_packageConfig = require('../../utils/package-config.cjs');
|
|
7
|
+
var utils_projectFiles = require('../../utils/project-files.cjs');
|
|
8
|
+
var migrations_clampedTextDisclosure_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -31,7 +32,7 @@ function clampedTextDisclosure(options) {
|
|
|
31
32
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
32
33
|
let consumers = 0;
|
|
33
34
|
let reported = 0;
|
|
34
|
-
|
|
35
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
35
36
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
36
37
|
return;
|
|
37
38
|
const content = entry?.content.toString();
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# code-block-highlight-js-core
|
|
2
|
+
|
|
3
|
+
Migration schematic invoked automatically by `ng update @koobiq/components` (registered for `21.1.0-0`).
|
|
4
|
+
Keeps the full highlight.js bundle where the code block loaded it by default.
|
|
5
|
+
|
|
6
|
+
## Background
|
|
7
|
+
|
|
8
|
+
A highlight.js configuration without `core`, or no configuration at all, used to load the full bundle:
|
|
9
|
+
every language highlight.js has, about 1 MB. Since the library held `import('highlight.js')`, every
|
|
10
|
+
application bundled that chunk, even one whose configuration loaded the core and a few languages: a bundler
|
|
11
|
+
emits a chunk for each `import()` it finds, whether it is called or not.
|
|
12
|
+
|
|
13
|
+
The code block loads the core now, `highlight.js/lib/core`, which has no languages but plain text. The full
|
|
14
|
+
bundle is loaded only where the application asks for it:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
kbqCodeBlockHighlightJsConfigProvider({ core: () => import('highlight.js') });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What it rewrites
|
|
21
|
+
|
|
22
|
+
- An application that imports `@koobiq/components/code-block` and has no highlight.js configuration in its
|
|
23
|
+
root providers gets the provider above there, through `addRootProvider`, standalone or NgModule.
|
|
24
|
+
- A configuration written as an object literal without `core` - the argument of
|
|
25
|
+
`kbqCodeBlockHighlightJsConfigProvider` and the `useValue` of a `KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG`
|
|
26
|
+
provider, imported under another name or passed to `TestBed.overrideProvider` too - gets
|
|
27
|
+
`core: () => import('highlight.js')`, in specs too.
|
|
28
|
+
|
|
29
|
+
## What it does _not_ do
|
|
30
|
+
|
|
31
|
+
| Case | Manual migration |
|
|
32
|
+
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
33
|
+
| A configuration in a variable, with a spread or from a factory | Add `core: () => import('highlight.js')` if it has no `core` |
|
|
34
|
+
| A configuration the root providers get through a function | Remove the added root provider, which overrides it |
|
|
35
|
+
| A library that renders code blocks | Provide a configuration in the applications that use it |
|
|
36
|
+
| A bootstrap it cannot analyze, or root providers not in an array | Add the provider to the root providers by hand |
|
|
37
|
+
| A spec that checks the highlighted markup of a code block | Add the configuration to its `TestBed`: specs do not get the application's providers |
|
|
38
|
+
|
|
39
|
+
To drop the full bundle, about 1 MB, list the languages the files use instead; plain text needs no entry:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
kbqCodeBlockHighlightJsConfigProvider({
|
|
43
|
+
languages: {
|
|
44
|
+
typescript: () => import('highlight.js/lib/languages/typescript')
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Running it manually
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
ng generate @koobiq/components:code-block-highlight-js-core --project my-app
|
|
53
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Data for the `code-block-highlight-js-core` migration.
|
|
5
|
+
*
|
|
6
|
+
* A configuration without `core` used to load the full highlight.js bundle, every language of it, about 1 MB. It
|
|
7
|
+
* loads the core now, which has no languages but plain text: the `import('highlight.js')` the library held made
|
|
8
|
+
* every application bundle the full one, configured or not, since a bundler emits a chunk for each `import()` it
|
|
9
|
+
* finds. The migration keeps the full bundle where the code block loaded it, by asking for it explicitly.
|
|
10
|
+
*/
|
|
11
|
+
const CODE_BLOCK_PACKAGE = '@koobiq/components/code-block';
|
|
12
|
+
const CONFIG_PROVIDER = 'kbqCodeBlockHighlightJsConfigProvider';
|
|
13
|
+
const CONFIG_TOKEN = 'KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG';
|
|
14
|
+
/** The property that asks for the full bundle, which a configuration without `core` loaded. */
|
|
15
|
+
const FULL_BUNDLE_CORE = "core: () => import('highlight.js')";
|
|
16
|
+
const FULL_BUNDLE_PROVIDER = `${CONFIG_PROVIDER}({ ${FULL_BUNDLE_CORE} })`;
|
|
17
|
+
const unreadConfigMessage = (line) => `Line ${line}: a highlight.js configuration the migration cannot read. If it has no \`core\`, the code block ` +
|
|
18
|
+
`now loads the core, which has no languages but plain text: add \`${FULL_BUNDLE_CORE}\` to keep every ` +
|
|
19
|
+
'language, or list the languages of the files in `languages`.';
|
|
20
|
+
const addedRootProviderMessage = (project, fix) => [
|
|
21
|
+
`Project "${project}" renders code blocks without a highlight.js configuration in its root providers. ` +
|
|
22
|
+
`${fix ? 'Added' : 'Would add'} \`${FULL_BUNDLE_PROVIDER}\` to them to keep every language. To bundle the ` +
|
|
23
|
+
'core and the languages of the files only, about 1 MB less, list them instead:',
|
|
24
|
+
` ${CONFIG_PROVIDER}({ languages: { typescript: () => import('highlight.js/lib/languages/typescript') } })`
|
|
25
|
+
];
|
|
26
|
+
const rootProviderFallback = (project) => [
|
|
27
|
+
`Could not tell whether project "${project}" provides a highlight.js configuration in its root providers: its ` +
|
|
28
|
+
'bootstrap cannot be analyzed statically, or its root providers are not an array literal. If it does not, ' +
|
|
29
|
+
'add one by hand, or its code blocks highlight plain text only:',
|
|
30
|
+
` ${FULL_BUNDLE_PROVIDER}`
|
|
31
|
+
];
|
|
32
|
+
const noWorkspaceMessage = () => [
|
|
33
|
+
'Could not read the workspace, so the root providers of its applications were not checked. Add ' +
|
|
34
|
+
`\`${FULL_BUNDLE_PROVIDER}\` to those of an application that renders code blocks without a highlight.js ` +
|
|
35
|
+
'configuration there, or its code blocks highlight plain text only.'
|
|
36
|
+
];
|
|
37
|
+
const otherConfigsMessage = (project) => [
|
|
38
|
+
`Project "${project}" also provides a highlight.js configuration outside its root providers. If one of them ` +
|
|
39
|
+
'reaches every code block, through a function the root providers call, remove the added provider, which ' +
|
|
40
|
+
'overrides it.'
|
|
41
|
+
];
|
|
42
|
+
const libraryMessage = (project) => [
|
|
43
|
+
`Library "${project}" renders code blocks without a highlight.js configuration. Without one, the code block ` +
|
|
44
|
+
'now loads the core, which has no languages but plain text: the applications that use the library have ' +
|
|
45
|
+
`to provide \`${FULL_BUNDLE_PROVIDER}\` or the languages of its files.`
|
|
46
|
+
];
|
|
47
|
+
const SUMMARY = [
|
|
48
|
+
'The code block loads the highlight.js core when its configuration has no `core`, rather than the full bundle:',
|
|
49
|
+
'register the languages of the files in `languages`, plain text needs no entry. Specs render code blocks without',
|
|
50
|
+
"the application's providers: add the configuration to the TestBed of a spec that checks highlighted markup."
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
exports.CODE_BLOCK_PACKAGE = CODE_BLOCK_PACKAGE;
|
|
54
|
+
exports.CONFIG_PROVIDER = CONFIG_PROVIDER;
|
|
55
|
+
exports.CONFIG_TOKEN = CONFIG_TOKEN;
|
|
56
|
+
exports.FULL_BUNDLE_CORE = FULL_BUNDLE_CORE;
|
|
57
|
+
exports.FULL_BUNDLE_PROVIDER = FULL_BUNDLE_PROVIDER;
|
|
58
|
+
exports.SUMMARY = SUMMARY;
|
|
59
|
+
exports.addedRootProviderMessage = addedRootProviderMessage;
|
|
60
|
+
exports.libraryMessage = libraryMessage;
|
|
61
|
+
exports.noWorkspaceMessage = noWorkspaceMessage;
|
|
62
|
+
exports.otherConfigsMessage = otherConfigsMessage;
|
|
63
|
+
exports.rootProviderFallback = rootProviderFallback;
|
|
64
|
+
exports.unreadConfigMessage = unreadConfigMessage;
|