@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
|
@@ -3,13 +3,14 @@
|
|
|
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
|
|
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_replacementDriver = require('../../utils/replacement-driver.cjs');
|
|
10
|
+
var migrations_dlStandaloneNames_data = require('./data.cjs');
|
|
10
11
|
require('@angular-devkit/schematics');
|
|
11
12
|
require('@schematics/angular/utility');
|
|
12
|
-
require('../../list-item-pattern
|
|
13
|
+
require('../../utils/list-item-pattern.cjs');
|
|
13
14
|
|
|
14
15
|
const LABEL = '[dl-standalone-names]';
|
|
15
16
|
const TS_EXT = '.ts';
|
|
@@ -261,13 +262,13 @@ function migrateSource(content, fileName) {
|
|
|
261
262
|
// Added before the module goes, so that an import of the module alone gains them in place rather than being
|
|
262
263
|
// dropped and recreated at the top of the file.
|
|
263
264
|
for (const component of missing)
|
|
264
|
-
result =
|
|
265
|
+
result = utils_replacementDriver.ensureImport(result, component, migrations_dlStandaloneNames_data.DL_PACKAGE);
|
|
265
266
|
for (const old of droppedOld)
|
|
266
|
-
result =
|
|
267
|
+
result = utils_replacementDriver.removeImport(result, old, migrations_dlStandaloneNames_data.DL_PACKAGE);
|
|
267
268
|
// The module import goes once nothing refers to it; an import nothing used is not this migration's business.
|
|
268
269
|
if (moduleReferences > 0 && !moduleKept)
|
|
269
|
-
result =
|
|
270
|
-
result =
|
|
270
|
+
result = utils_replacementDriver.removeImport(result, migrations_dlStandaloneNames_data.DL_MODULE, migrations_dlStandaloneNames_data.DL_PACKAGE);
|
|
271
|
+
result = utils_replacementDriver.dedupeImportSpecifiers(result, content);
|
|
271
272
|
return { content: result, changed: result !== content, keptModuleLines };
|
|
272
273
|
}
|
|
273
274
|
/**
|
|
@@ -285,7 +286,7 @@ function dlStandaloneNames(options) {
|
|
|
285
286
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
286
287
|
let consumers = 0;
|
|
287
288
|
let touched = 0;
|
|
288
|
-
|
|
289
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
289
290
|
if (!filePath.endsWith(TS_EXT))
|
|
290
291
|
return;
|
|
291
292
|
const original = entry.content.toString();
|
|
@@ -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_dropdownDemoteOverlay_data = require('./data.cjs');
|
|
11
12
|
require('@angular-devkit/schematics');
|
|
12
13
|
require('@schematics/angular/utility');
|
|
13
14
|
|
|
@@ -226,7 +227,7 @@ function dropdownDemoteOverlay(options) {
|
|
|
226
227
|
const root = projectDefinition?.root ?? '';
|
|
227
228
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
228
229
|
const filePaths = [];
|
|
229
|
-
|
|
230
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
230
231
|
if (!isMigratableFile(filePath))
|
|
231
232
|
return;
|
|
232
233
|
filePaths.push(filePath);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var utils_signalMembersMigration = require('../../utils/signal-members-migration.cjs');
|
|
6
|
+
var migrations_dropdownSignals_data = require('./data.cjs');
|
|
7
|
+
require('typescript');
|
|
8
|
+
require('../../utils/ast.cjs');
|
|
9
|
+
require('../../utils/messages.cjs');
|
|
10
|
+
require('../../utils/package-config.cjs');
|
|
11
|
+
require('@angular-devkit/schematics');
|
|
12
|
+
require('@schematics/angular/utility');
|
|
13
|
+
require('../../utils/project-files.cjs');
|
|
14
|
+
require('../../utils/typescript.cjs');
|
|
15
|
+
|
|
16
|
+
function dropdownSignals(options) {
|
|
17
|
+
return utils_signalMembersMigration.signalMembersRule(migrations_dropdownSignals_data.config, options);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.default = dropdownSignals;
|
|
@@ -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_emptyStateErrorColor_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -43,7 +44,7 @@ function emptyStateErrorColor(options) {
|
|
|
43
44
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
44
45
|
let consumers = 0;
|
|
45
46
|
let reported = 0;
|
|
46
|
-
|
|
47
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
47
48
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
48
49
|
return;
|
|
49
50
|
const content = entry?.content.length ? readIfEmptyStateConsumer(entry.content) : undefined;
|
|
@@ -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-empty-state',
|
|
@@ -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_fileUploadCvaAndPrimitives_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -29,7 +30,7 @@ function fileUploadCvaAndPrimitives(options) {
|
|
|
29
30
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
30
31
|
let consumers = 0;
|
|
31
32
|
let reported = 0;
|
|
32
|
-
|
|
33
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
33
34
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
34
35
|
return;
|
|
35
36
|
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_fileUploadDeprecatedOutputs_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -41,7 +42,7 @@ function fileUploadDeprecatedOutputs(options) {
|
|
|
41
42
|
const root = projectDefinition?.root ?? '';
|
|
42
43
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
43
44
|
let touched = 0;
|
|
44
|
-
|
|
45
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
45
46
|
if (isSkippedPath(filePath))
|
|
46
47
|
return;
|
|
47
48
|
if (!isMigratableFile(filePath))
|
|
@@ -3,9 +3,10 @@
|
|
|
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
|
|
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 migrations_filterBarRenameAction_data = require('./data.cjs');
|
|
9
10
|
require('@angular-devkit/schematics');
|
|
10
11
|
require('@schematics/angular/utility');
|
|
11
12
|
|
|
@@ -130,7 +131,7 @@ function filterBarRenameAction(options) {
|
|
|
130
131
|
const root = projectDefinition?.root ?? '';
|
|
131
132
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
132
133
|
const filePaths = [];
|
|
133
|
-
|
|
134
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
134
135
|
if (!isMigratableFile(filePath))
|
|
135
136
|
return;
|
|
136
137
|
filePaths.push(filePath);
|
|
@@ -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_filterBarSignals_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';
|
|
@@ -27,8 +28,8 @@ function applyEdits(content, edits) {
|
|
|
27
28
|
/** The `KbqFilterBar` / `KbqFilterBarHost` receivers of a file, typed by annotation or `inject()`. */
|
|
28
29
|
function collectFileReceivers(sourceFile) {
|
|
29
30
|
return {
|
|
30
|
-
receivers:
|
|
31
|
-
bindings:
|
|
31
|
+
receivers: utils_signalMembersMigration.collectAllReceivers(sourceFile, [migrations_filterBarSignals_data.FILTER_BAR_TYPE, migrations_filterBarSignals_data.FILTER_BAR_HOST_TYPE]),
|
|
32
|
+
bindings: utils_signalMembersMigration.collectBindings(sourceFile)
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
@@ -42,7 +43,7 @@ function isSignalMemberAccess(node, sourceFile, scope) {
|
|
|
42
43
|
!migrations_filterBarSignals_data.SIGNAL_MEMBERS.includes(node.name.text)) {
|
|
43
44
|
return false;
|
|
44
45
|
}
|
|
45
|
-
const receiver =
|
|
46
|
+
const receiver = utils_signalMembersMigration.resolveReceiver(node.expression, node, sourceFile, scope.receivers, scope.bindings);
|
|
46
47
|
return !!receiver && !receiver.signalQuery;
|
|
47
48
|
}
|
|
48
49
|
/** Collects edits for every read/write of a signal member on a known filter-bar receiver. */
|
|
@@ -50,7 +51,7 @@ function collectAccessEdits(sourceFile, scope) {
|
|
|
50
51
|
const edits = [];
|
|
51
52
|
const visit = (node) => {
|
|
52
53
|
if (isSignalMemberAccess(node, sourceFile, scope))
|
|
53
|
-
|
|
54
|
+
utils_signalMembersMigration.classifyAccess(node, sourceFile, migrations_filterBarSignals_data.WRITABLE_MEMBERS, edits);
|
|
54
55
|
node.forEachChild(visit);
|
|
55
56
|
};
|
|
56
57
|
visit(sourceFile);
|
|
@@ -60,11 +61,11 @@ function collectAccessEdits(sourceFile, scope) {
|
|
|
60
61
|
function collectWrites(sourceFile, scope) {
|
|
61
62
|
const writes = { readOnlyWrites: new Set(), compoundWrites: new Set() };
|
|
62
63
|
const visit = (node) => {
|
|
63
|
-
if (isSignalMemberAccess(node, sourceFile, scope) &&
|
|
64
|
+
if (isSignalMemberAccess(node, sourceFile, scope) && utils_signalMembersMigration.isWriteTarget(node)) {
|
|
64
65
|
const name = node.name.text;
|
|
65
66
|
if (!migrations_filterBarSignals_data.WRITABLE_MEMBERS.has(name))
|
|
66
67
|
writes.readOnlyWrites.add(name);
|
|
67
|
-
else if (!
|
|
68
|
+
else if (!utils_signalMembersMigration.isPlainAssignment(node))
|
|
68
69
|
writes.compoundWrites.add(name);
|
|
69
70
|
}
|
|
70
71
|
node.forEachChild(visit);
|
|
@@ -104,7 +105,7 @@ async function migrateTemplate(template) {
|
|
|
104
105
|
const { rootNodes } = parsed.tree;
|
|
105
106
|
// `KbqFilterBar` has no `exportAs`, so only a bare `#ref` is the filter bar; `#ref="ngModel"` names another
|
|
106
107
|
// directive.
|
|
107
|
-
const { content, readOnlyWrites, compoundWrites } =
|
|
108
|
+
const { content, readOnlyWrites, compoundWrites } = utils_templateRefAccess.rewriteRefAccesses(template, rootNodes, (element, value) => element.name === migrations_filterBarSignals_data.FILTER_BAR_ELEMENT && !value ? REF_POLICY : undefined);
|
|
108
109
|
return { content, changed: content !== template, readOnlyWrites, compoundWrites };
|
|
109
110
|
}
|
|
110
111
|
/** Pass B (inline) — rewrite filter-bar ref reads inside inline component templates. */
|
|
@@ -173,7 +174,7 @@ function filterBarSignals(options) {
|
|
|
173
174
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
174
175
|
const tsPaths = [];
|
|
175
176
|
const htmlPaths = [];
|
|
176
|
-
|
|
177
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
177
178
|
if (filePath.endsWith(TS_EXT))
|
|
178
179
|
tsPaths.push(filePath);
|
|
179
180
|
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_filterBarStateSavingDefault_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -31,7 +32,7 @@ function filterBarStateSavingDefault(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();
|
|
@@ -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_flagInnerHtml_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
11
|
|
|
@@ -32,7 +33,7 @@ function flagInnerHtml(options) {
|
|
|
32
33
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
33
34
|
let consumers = 0;
|
|
34
35
|
let rewritten = 0;
|
|
35
|
-
|
|
36
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
36
37
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
37
38
|
return;
|
|
38
39
|
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_formFieldSignals_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 MIGRATION = 'form-field-signals';
|
|
17
18
|
const TS_EXT = '.ts';
|
|
@@ -36,7 +37,7 @@ function applyEdits(content, edits) {
|
|
|
36
37
|
* this pass does not reach.
|
|
37
38
|
*/
|
|
38
39
|
function onReceiver(node, sourceFile, scope) {
|
|
39
|
-
const receiver =
|
|
40
|
+
const receiver = utils_signalMembersMigration.resolveReceiver(node.expression, node, sourceFile, scope.receivers, scope.bindings);
|
|
40
41
|
return !!receiver && !receiver.signalQuery;
|
|
41
42
|
}
|
|
42
43
|
/** Collects edits for every read/write of a migrated member on a known receiver of `target`. */
|
|
@@ -47,7 +48,7 @@ function collectAccessEdits(sourceFile, target, scope) {
|
|
|
47
48
|
ts.isIdentifier(node.name) &&
|
|
48
49
|
target.signalMembers.includes(node.name.text) &&
|
|
49
50
|
onReceiver(node, sourceFile, scope)) {
|
|
50
|
-
|
|
51
|
+
utils_signalMembersMigration.classifyAccess(node, sourceFile, target.writableMembers, edits);
|
|
51
52
|
}
|
|
52
53
|
node.forEachChild(visit);
|
|
53
54
|
};
|
|
@@ -77,9 +78,9 @@ function collectReceiverWarnings(sourceFile, target, scope) {
|
|
|
77
78
|
warnings.removed.add(name);
|
|
78
79
|
}
|
|
79
80
|
// `target.signalMembers` scopes the flat name lists to the members this receiver actually owns.
|
|
80
|
-
if (reachesReceiver && target.signalMembers.includes(name) &&
|
|
81
|
+
if (reachesReceiver && target.signalMembers.includes(name) && utils_signalMembersMigration.isWriteTarget(node)) {
|
|
81
82
|
if (target.writableMembers.has(name)) {
|
|
82
|
-
if (!
|
|
83
|
+
if (!utils_signalMembersMigration.isPlainAssignment(node))
|
|
83
84
|
warnings.writableWrites.add(name);
|
|
84
85
|
}
|
|
85
86
|
else if (migrations_formFieldSignals_data.READ_ONLY_INPUT_MEMBERS.includes(name)) {
|
|
@@ -109,10 +110,10 @@ function collectReceiverWarnings(sourceFile, target, scope) {
|
|
|
109
110
|
/** The members of a file's receivers that can't be auto-fixed, across every target. */
|
|
110
111
|
function collectFileWarnings(filePath, content) {
|
|
111
112
|
const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
112
|
-
const bindings =
|
|
113
|
+
const bindings = utils_signalMembersMigration.collectBindings(sourceFile);
|
|
113
114
|
const merged = emptyWarnings();
|
|
114
115
|
for (const target of migrations_formFieldSignals_data.TARGETS) {
|
|
115
|
-
const receivers =
|
|
116
|
+
const receivers = utils_signalMembersMigration.collectAllReceivers(sourceFile, target.types);
|
|
116
117
|
if (receivers.length === 0)
|
|
117
118
|
continue;
|
|
118
119
|
const warnings = collectReceiverWarnings(sourceFile, target, { receivers, bindings });
|
|
@@ -206,10 +207,10 @@ function migrateTsExpressions(content, fileName) {
|
|
|
206
207
|
// One target at a time, re-parsing in between, so the edit offsets of each pass stay valid.
|
|
207
208
|
for (const target of migrations_formFieldSignals_data.TARGETS) {
|
|
208
209
|
const sourceFile = ts.createSourceFile(fileName, result, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
209
|
-
const receivers =
|
|
210
|
+
const receivers = utils_signalMembersMigration.collectAllReceivers(sourceFile, target.types);
|
|
210
211
|
if (receivers.length === 0)
|
|
211
212
|
continue;
|
|
212
|
-
const edits = collectAccessEdits(sourceFile, target, { receivers, bindings:
|
|
213
|
+
const edits = collectAccessEdits(sourceFile, target, { receivers, bindings: utils_signalMembersMigration.collectBindings(sourceFile) });
|
|
213
214
|
if (edits.length > 0)
|
|
214
215
|
result = applyEdits(result, edits);
|
|
215
216
|
}
|
|
@@ -257,7 +258,7 @@ async function migrateTemplate(template) {
|
|
|
257
258
|
reported: target.removedMembers
|
|
258
259
|
}
|
|
259
260
|
]));
|
|
260
|
-
const result =
|
|
261
|
+
const result = utils_templateRefAccess.rewriteRefAccesses(content, rootNodes, (element, value) => {
|
|
261
262
|
const target = relevant.find((candidate) => refersTo(candidate, element.name, value));
|
|
262
263
|
return target && policies.get(target);
|
|
263
264
|
});
|
|
@@ -326,7 +327,7 @@ function formFieldSignals(options) {
|
|
|
326
327
|
const tsPaths = [];
|
|
327
328
|
const htmlPaths = [];
|
|
328
329
|
const stylePaths = [];
|
|
329
|
-
|
|
330
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath) => {
|
|
330
331
|
if (filePath.endsWith(TS_EXT))
|
|
331
332
|
tsPaths.push(filePath);
|
|
332
333
|
else if (filePath.endsWith(HTML_EXT))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var utils_tagPatterns = require('../../utils/tag-patterns.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Data for the `icon-semantics-and-api` migration.
|
|
@@ -27,7 +27,7 @@ const ICON_TYPE = String.raw `\bKbqIcon\w*\b|\bkbq-icon(?:-button|-item)?\b`;
|
|
|
27
27
|
const ICON_OR_ITEM_ATTRIBUTE = String.raw `[\s\[]kbq-icon(?:-item)?(?![\w-])`;
|
|
28
28
|
const ICON_BUTTON_ATTRIBUTE = String.raw `[\s\[]kbq-icon-button(?![\w-])`;
|
|
29
29
|
/** An opening tag that carries `attribute`, read up to the point the rest of the pattern continues from. */
|
|
30
|
-
const tagWith = (attribute) => String.raw `<[a-zA-Z][\w-]*(?=${
|
|
30
|
+
const tagWith = (attribute) => String.raw `<[a-zA-Z][\w-]*(?=${utils_tagPatterns.TAG_BODY}*${attribute})${utils_tagPatterns.TAG_BODY}*`;
|
|
31
31
|
const warnPatterns = [
|
|
32
32
|
{
|
|
33
33
|
// A plain icon or an icon item only: `small` on an icon button is rewritten by `v21-upgrade`.
|
|
@@ -40,8 +40,8 @@ const warnPatterns = [
|
|
|
40
40
|
{
|
|
41
41
|
// A host the browser does not activate from the keyboard on its own: not a <button>, an <input> or an <a>.
|
|
42
42
|
anchor: ICON_BUTTON_ATTRIBUTE,
|
|
43
|
-
pattern: String.raw `<(?!(?:button|input|a)(?![\w-]))[a-zA-Z][\w-]*(?=${
|
|
44
|
-
String.raw `(?=${
|
|
43
|
+
pattern: String.raw `<(?!(?:button|input|a)(?![\w-]))[a-zA-Z][\w-]*(?=${utils_tagPatterns.TAG_BODY}*${ICON_BUTTON_ATTRIBUTE})` +
|
|
44
|
+
String.raw `(?=${utils_tagPatterns.TAG_BODY}*\s\(click\))(?!${utils_tagPatterns.TAG_BODY}*\s\(keydown)`,
|
|
45
45
|
message: 'kbq-icon-button on a host that is not a native <button> is announced as a button now — ' +
|
|
46
46
|
'role="button" and aria-disabled — but it does not activate itself from Enter or Space, and this ' +
|
|
47
47
|
'one handles (click) only. Bind (keydown.enter) and (keydown.space) to the same handler, calling ' +
|
|
@@ -2,12 +2,13 @@
|
|
|
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_iconSemanticsAndApi_data = require('./data.cjs');
|
|
8
9
|
require('@angular-devkit/schematics');
|
|
9
10
|
require('@schematics/angular/utility');
|
|
10
|
-
require('../../tag-patterns
|
|
11
|
+
require('../../utils/tag-patterns.cjs');
|
|
11
12
|
|
|
12
13
|
const LABEL = '[icon-semantics-and-api]';
|
|
13
14
|
const EXTENSIONS = ['.ts', '.html'];
|
|
@@ -36,7 +37,7 @@ function iconSemanticsAndApi(options) {
|
|
|
36
37
|
const rootDir = root ? tree.getDir(root) : tree.root;
|
|
37
38
|
let consumers = 0;
|
|
38
39
|
let reported = 0;
|
|
39
|
-
|
|
40
|
+
utils_projectFiles.visitProjectFiles(rootDir, (filePath, entry) => {
|
|
40
41
|
if (!EXTENSIONS.some((extension) => filePath.endsWith(extension)))
|
|
41
42
|
return;
|
|
42
43
|
const content = entry.content.toString();
|
|
@@ -6,6 +6,20 @@ This schematic provides migration for new icons naming attribute. It includes:
|
|
|
6
6
|
|
|
7
7
|
[Params](schema.ts)
|
|
8
8
|
|
|
9
|
+
`--project` takes a project name or a folder such as `./libs`; without it the whole workspace is migrated.
|
|
10
|
+
`node_modules` and `dist` are always skipped.
|
|
11
|
+
|
|
12
|
+
The built-in mapping applies unless `--custom-data-path` points at a JSON file of your own, resolved from the
|
|
13
|
+
workspace root (then as an absolute path); a missing file stops the run. The shape is the one `new-icons-pack`
|
|
14
|
+
reads; a name matches anywhere it occurs, so it can be written with or without the `kbq-` prefix:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
[{ "replace": "bolt-circle_16", "replaceWith": "circle-bolt_16" }]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`--replacement-data-path` is the deprecated name of the option: it still works, resolved from the project root
|
|
21
|
+
or the folder first, and so do files of `{ "from", "to" }` pairs; both print a warning.
|
|
22
|
+
|
|
9
23
|
#### Usage for Angular Cli:
|
|
10
24
|
|
|
11
25
|
Apply for project and log file path and icon name should be replaced
|
|
@@ -17,7 +31,7 @@ ng g @koobiq/components:icons-replacement --project "<your project>"
|
|
|
17
31
|
- with custom icon replacement mapping:
|
|
18
32
|
|
|
19
33
|
```shell
|
|
20
|
-
ng g @koobiq/components:icons-replacement --project "<your project>" --
|
|
34
|
+
ng g @koobiq/components:icons-replacement --project "<your project>" --custom-data-path "<path-as-json>"
|
|
21
35
|
```
|
|
22
36
|
|
|
23
37
|
Apply for project and replace icon name.
|
|
@@ -35,7 +49,7 @@ nx g @koobiq/components:icons-replacement --project "<your project>"
|
|
|
35
49
|
- with custom icon replacement mapping:
|
|
36
50
|
|
|
37
51
|
```shell
|
|
38
|
-
nx g @koobiq/components:icons-replacement --project "<your project>" --
|
|
52
|
+
nx g @koobiq/components:icons-replacement --project "<your project>" --custom-data-path "<path-as-json>"
|
|
39
53
|
```
|
|
40
54
|
|
|
41
55
|
### Run locally
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var path = require('path');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var utils_customData = require('../../utils/custom-data.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 migrations_iconsReplacement_data = require('./data.cjs');
|
|
9
11
|
require('@angular-devkit/schematics');
|
|
12
|
+
require('fs');
|
|
10
13
|
require('@schematics/angular/utility');
|
|
11
14
|
|
|
12
15
|
const replaceIcons = (contentToBeUpdated, replacementData) => {
|
|
@@ -42,24 +45,25 @@ const processIconReplacement = ({ fileContent, filePath, fix, logger, replacemen
|
|
|
42
45
|
return { fileContent, changed: false, errors: [] };
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
|
-
const resolveReplacementData = (projectRootPath, tree, customReplacementDataPath) => {
|
|
46
|
-
if (customReplacementDataPath) {
|
|
47
|
-
const replacementData = tree.get(`${projectRootPath}/${customReplacementDataPath}`);
|
|
48
|
-
if (!replacementData)
|
|
49
|
-
return migrations_iconsReplacement_data.iconReplacementData;
|
|
50
|
-
return JSON.parse(replacementData.content.toString());
|
|
51
|
-
}
|
|
52
|
-
return migrations_iconsReplacement_data.iconReplacementData;
|
|
53
|
-
};
|
|
54
48
|
function migrate(options) {
|
|
55
49
|
return async (tree, context) => {
|
|
56
50
|
const { logger } = context;
|
|
57
|
-
const { project, allowed, fix, replacementDataPath } = options;
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
const { project, allowed, fix, customDataPath, replacementDataPath } = options;
|
|
52
|
+
const targetDir = await utils_packageConfig.resolveTargetDir(project, tree);
|
|
53
|
+
if (replacementDataPath && customDataPath) {
|
|
54
|
+
logger.warn('--replacement-data-path is deprecated and ignored next to --custom-data-path.');
|
|
55
|
+
}
|
|
56
|
+
const dataPath = customDataPath ?? replacementDataPath;
|
|
57
|
+
const bases = customDataPath ? undefined : [targetDir.path, '/'];
|
|
58
|
+
const replacementData = dataPath
|
|
59
|
+
? utils_customData.readCustomIconMapping(tree, dataPath, logger, bases)
|
|
60
|
+
: migrations_iconsReplacement_data.iconReplacementData;
|
|
61
|
+
logger.info(dataPath
|
|
62
|
+
? `Icon mapping: ${replacementData.length} entries from '${dataPath}'.`
|
|
63
|
+
: `Icon mapping: the built-in one, ${replacementData.length} entries (--custom-data-path overrides it).`);
|
|
64
|
+
utils_projectFiles.visitProjectFiles(targetDir, (filePath, entry) => {
|
|
61
65
|
if (allowed.length === 0 || allowed.some((ext) => filePath.endsWith(ext))) {
|
|
62
|
-
const initialContent = entry
|
|
66
|
+
const initialContent = entry.content.toString();
|
|
63
67
|
if (!initialContent)
|
|
64
68
|
return;
|
|
65
69
|
const { fileContent, changed } = processIconReplacement({
|
|
@@ -81,4 +85,3 @@ exports.default = migrate;
|
|
|
81
85
|
exports.logReplacement = logReplacement;
|
|
82
86
|
exports.processIconReplacement = processIconReplacement;
|
|
83
87
|
exports.replaceIcons = replaceIcons;
|
|
84
|
-
exports.resolveReplacementData = resolveReplacementData;
|