@lucca-front/ng 22.0.0-rc.2 → 22.0.0-rc.4
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/fesm2022/lucca-front-ng-a11y.mjs +125 -8
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-activity-feed.mjs +74 -27
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +116 -78
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +4 -4
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +44 -6
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +15 -9
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +28 -13
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs +20 -10
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +105 -63
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +33 -13
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +17 -8
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-code.mjs +4 -4
- package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-color.mjs +16 -8
- package/fesm2022/lucca-front-ng-color.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-comment.mjs +48 -27
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +13 -6
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +70 -24
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +31 -18
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +21 -15
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +12 -9
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs +168 -0
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +9 -6
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +65 -41
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +355 -236
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +86 -29
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +143 -81
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +91 -62
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +375 -161
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +31 -27
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +71 -51
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +16 -8
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +42 -41
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +56 -30
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-error-page.mjs +15 -7
- package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +57 -45
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +23 -11
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +135 -69
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +83 -52
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +17 -8
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +124 -71
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +12 -6
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-label.mjs +65 -42
- package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +9 -6
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +58 -58
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +58 -40
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +8 -9
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +263 -105
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +370 -154
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +23 -13
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +39 -18
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +50 -15
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-text.mjs +28 -0
- package/fesm2022/lucca-front-ng-highlight-text.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +174 -17
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +124 -0
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-index-table.mjs +82 -54
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +17 -7
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +27 -24
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +54 -23
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +31 -18
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +16 -12
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs +13 -6
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +6 -6
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +15 -5
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +32 -26
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +247 -123
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +5 -4
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number-format.mjs +14 -10
- package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number.mjs +7 -7
- package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +24 -12
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +160 -140
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +12 -8
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +26 -10
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +14 -8
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +23 -20
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +107 -35
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup.mjs +10 -10
- package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +13 -6
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-stepper.mjs +22 -12
- package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +38 -17
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +26 -17
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +8 -6
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +14 -10
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +26 -14
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +12 -10
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +30 -23
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
- package/fesm2022/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +66 -50
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +131 -62
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +16 -11
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs +34 -25
- package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +14 -11
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +15 -7
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-table-of-content.mjs +8 -7
- package/fesm2022/lucca-front-ng-table-of-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +22 -11
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-text-flow.mjs +4 -4
- package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +416 -80
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-title.mjs +34 -15
- package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +20 -14
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +60 -30
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +20 -13
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +28 -23
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +172 -113
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +34 -24
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/action-icon/index.js +34 -1
- package/schematics/action-icon/migration.spec.js +36 -3
- package/schematics/alignment-utilities/migration.spec.js +36 -3
- package/schematics/cdn-urls/migration.spec.js +36 -3
- package/schematics/class-prefix/migration.spec.js +36 -3
- package/schematics/collection.json +10 -0
- package/schematics/color-text/migration.spec.js +36 -3
- package/schematics/component-path/migration.spec.js +36 -3
- package/schematics/deprecated-resolver/index.js +73 -0
- package/schematics/deprecated-resolver/migration.spec.js +58 -0
- package/schematics/deprecated-resolver/schema.json +23 -0
- package/schematics/empty-state-title/migration.spec.js +35 -2
- package/schematics/lib/css-mapper.js +44 -6
- package/schematics/lib/deprecated-mapper.js +109 -0
- package/schematics/lib/index.js +1 -0
- package/schematics/lib/lf-schematic-context.js +34 -1
- package/schematics/lib/local-deps/package-lock.json +17 -79
- package/schematics/lib/local-deps/package.json +1 -1
- package/schematics/lib/local-deps/postcss.js +34 -1
- package/schematics/lib/migration-test.js +5 -2
- package/schematics/lib/scss-ast.js +53 -0
- package/schematics/lu-button/migration.spec.js +34 -1
- package/schematics/lu-container/migration.spec.js +34 -1
- package/schematics/lu-grid/index.js +23 -0
- package/schematics/lu-grid/migration.js +237 -0
- package/schematics/lu-grid/migration.spec.js +56 -0
- package/schematics/lu-grid/migration.utils.js +60 -0
- package/schematics/lu-grid/schema.json +23 -0
- package/schematics/lu-icon/migration.spec.js +34 -1
- package/schematics/lu-loading/migration.spec.js +34 -1
- package/schematics/lu-select/migration.spec.js +34 -1
- package/schematics/lu-text-input/migration.spec.js +34 -1
- package/schematics/new-icons/index.js +35 -2
- package/schematics/new-icons/migration.spec.js +36 -3
- package/schematics/package.json +3 -0
- package/schematics/palettes/index.js +17 -2
- package/schematics/palettes/migration.spec.js +36 -3
- package/schematics/tokens-radius/migration.spec.js +36 -3
- package/schematics/tokens-spacing/migration.spec.js +36 -3
- package/schematics/tokens-typo/migration.spec.js +36 -3
- package/src/components/_picker.scss +6 -1
- package/src/components/_popover.scss +1 -2
- package/src/definitions/option/_option-item.scss +6 -25
- package/types/lucca-front-ng-a11y.d.ts +30 -2
- package/types/lucca-front-ng-activity-feed.d.ts +18 -3
- package/types/lucca-front-ng-api.d.ts +14 -8
- package/types/lucca-front-ng-box.d.ts +6 -1
- package/types/lucca-front-ng-bubble-icon.d.ts +12 -3
- package/types/lucca-front-ng-bubble-illustration.d.ts +11 -5
- package/types/lucca-front-ng-callout.d.ts +24 -16
- package/types/lucca-front-ng-chip.d.ts +10 -1
- package/types/lucca-front-ng-clear.d.ts +9 -3
- package/types/lucca-front-ng-color.d.ts +8 -1
- package/types/lucca-front-ng-comment.d.ts +8 -1
- package/types/lucca-front-ng-container.d.ts +8 -1
- package/types/lucca-front-ng-core-select-api.d.ts +13 -1
- package/types/lucca-front-ng-core-select-department.d.ts +3 -2
- package/types/lucca-front-ng-core-select-legal-units.d.ts +56 -0
- package/types/lucca-front-ng-core-select-user.d.ts +2 -1
- package/types/lucca-front-ng-core-select.d.ts +34 -15
- package/types/lucca-front-ng-core.d.ts +31 -8
- package/types/lucca-front-ng-data-table.d.ts +18 -3
- package/types/lucca-front-ng-date2.d.ts +28 -9
- package/types/lucca-front-ng-dialog.d.ts +13 -2
- package/types/lucca-front-ng-divider.d.ts +8 -1
- package/types/lucca-front-ng-empty-state.d.ts +16 -8
- package/types/lucca-front-ng-error-page.d.ts +9 -4
- package/types/lucca-front-ng-fancy-box.d.ts +8 -1
- package/types/lucca-front-ng-file-upload.d.ts +23 -11
- package/types/lucca-front-ng-filter-pills.d.ts +0 -1
- package/types/lucca-front-ng-footer.d.ts +11 -2
- package/types/lucca-front-ng-form-field.d.ts +34 -17
- package/types/lucca-front-ng-form-header.d.ts +9 -2
- package/types/lucca-front-ng-form-label.d.ts +13 -5
- package/types/lucca-front-ng-form.d.ts +2 -0
- package/types/lucca-front-ng-forms-phone-number-input.d.ts +19 -12
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +17 -2
- package/types/lucca-front-ng-forms.d.ts +90 -22
- package/types/lucca-front-ng-gauge.d.ts +1 -1
- package/types/lucca-front-ng-grid.d.ts +23 -8
- package/types/lucca-front-ng-highlight-data.d.ts +16 -1
- package/types/lucca-front-ng-highlight-text.d.ts +12 -0
- package/types/lucca-front-ng-horizontal-navigation.d.ts +40 -3
- package/types/lucca-front-ng-impersonation.d.ts +33 -0
- package/types/lucca-front-ng-index-table.d.ts +19 -4
- package/types/lucca-front-ng-inline-message.d.ts +11 -4
- package/types/lucca-front-ng-input.d.ts +2 -1
- package/types/lucca-front-ng-link.d.ts +13 -3
- package/types/lucca-front-ng-listbox.d.ts +8 -1
- package/types/lucca-front-ng-listing.d.ts +1 -1
- package/types/lucca-front-ng-loading.d.ts +8 -1
- package/types/lucca-front-ng-modal.d.ts +1 -1
- package/types/lucca-front-ng-multi-select.d.ts +3 -0
- package/types/lucca-front-ng-numeric-badge.d.ts +9 -2
- package/types/lucca-front-ng-pagination.d.ts +8 -1
- package/types/lucca-front-ng-popover2.d.ts +23 -2
- package/types/lucca-front-ng-progress-bar.d.ts +8 -1
- package/types/lucca-front-ng-progress-stepper.d.ts +8 -1
- package/types/lucca-front-ng-read-more.d.ts +8 -1
- package/types/lucca-front-ng-resource-card.d.ts +10 -1
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +2 -0
- package/types/lucca-front-ng-segmented-control.d.ts +4 -2
- package/types/lucca-front-ng-simple-select.d.ts +16 -17
- package/types/lucca-front-ng-skeleton.d.ts +51 -19
- package/types/lucca-front-ng-software-icon.d.ts +11 -6
- package/types/lucca-front-ng-sortable-list.d.ts +2 -1
- package/types/lucca-front-ng-status-badge.d.ts +9 -2
- package/types/lucca-front-ng-tag.d.ts +9 -2
- package/types/lucca-front-ng-time.d.ts +89 -8
- package/types/lucca-front-ng-title.d.ts +6 -1
- package/types/lucca-front-ng-tooltip.d.ts +7 -2
- package/types/lucca-front-ng-user.d.ts +19 -5
- package/types/lucca-front-ng-vertical-navigation.d.ts +1 -1
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const glob = require("glob");
|
|
5
|
-
const path = require("path");
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
37
|
+
const glob = __importStar(require("glob"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
6
39
|
const lib_1 = require("../lib");
|
|
7
40
|
const collectionPath = path.normalize(path.join(__dirname, '..', 'collection.json'));
|
|
8
41
|
const testsRoot = path.join(__dirname, 'tests');
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lib_1 = require("../lib");
|
|
4
|
+
// Nx need to see "@angular-devkit/schematics" in order to run this migration correctly (see https://github.com/nrwl/nx/blob/d9fed4b832bf01d1b9a44ae9e486a5e5cd2d2253/packages/nx/src/command-line/migrate/migrate.ts#L1729-L1738)
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
6
|
+
require('@angular-devkit/schematics');
|
|
7
|
+
exports.default = (options) => {
|
|
8
|
+
return async (tree, context) => {
|
|
9
|
+
await lib_1.currentSchematicContext.init(context, options);
|
|
10
|
+
new lib_1.DeprecatedMapper(tree, {
|
|
11
|
+
modules: {
|
|
12
|
+
// LuDateModule
|
|
13
|
+
LuDatePickerModule: 'LuDatePickerComponent',
|
|
14
|
+
LuDateSelectInputModule: 'LuDateSelectInputComponent',
|
|
15
|
+
LuDateAdapterModule: 'LuDateAdapterPipe',
|
|
16
|
+
// LuApiModule
|
|
17
|
+
LuApiSelectInputModule: 'LuApiSelectInputComponent',
|
|
18
|
+
// LuDropdownModule
|
|
19
|
+
LuDropdownPanelModule: 'LuDropdownPanelComponent',
|
|
20
|
+
LuDropdownItemModule: 'LuDropdownItemDirective',
|
|
21
|
+
LuDropdownTriggerModule: 'LuDropdownTriggerDirective',
|
|
22
|
+
// LuDepartmentModule
|
|
23
|
+
LuDepartmentSelectInputModule: 'LuDepartmentSelectInputComponent',
|
|
24
|
+
// LuEstablishmentModule
|
|
25
|
+
LuEstablishmentSelectInputModule: 'LuEstablishmentSelectInputComponent',
|
|
26
|
+
// LuUserModule
|
|
27
|
+
LuUserSelectInputModule: 'LuUserSelectInputComponent',
|
|
28
|
+
LuUserDisplayModule: 'LuUserDisplayPipe',
|
|
29
|
+
LuUserPictureModule: 'LuUserPictureComponent',
|
|
30
|
+
LuUserTileModule: 'LuUserTileComponent',
|
|
31
|
+
LuUserMeOptionModule: 'LuUserMeOptionDirective',
|
|
32
|
+
LuUserSearcherModule: 'LuUserPagedSearcherComponent',
|
|
33
|
+
// LuOptionModule
|
|
34
|
+
LuOptionItemModule: 'LuOptionItemComponent',
|
|
35
|
+
LuOptionFeederModule: 'LuOptionFeederComponent',
|
|
36
|
+
LuOptionPagerModule: 'LuOptionPagerComponent',
|
|
37
|
+
LuOptionSearcherModule: 'LuOptionSearcherComponent',
|
|
38
|
+
LuOptionSelectAllModule: 'LuOptionSelectAllComponent',
|
|
39
|
+
LuForOptionsModule: 'LuForOptionsDirective',
|
|
40
|
+
// LuTreeOptionModule
|
|
41
|
+
LuTreeOptionItemModule: 'LuTreeOptionItemComponent',
|
|
42
|
+
LuTreeOptionFeederModule: 'LuTreeOptionFeederComponent',
|
|
43
|
+
LuForTreeOptionsModule: 'LuForTreeOptionsDirective',
|
|
44
|
+
LuTreeOptionSearcherModule: 'LuTreeOptionSearcherComponent',
|
|
45
|
+
// LuPopoverModule
|
|
46
|
+
LuPopoverPanelModule: 'LuPopoverPanelComponent',
|
|
47
|
+
// LuTooltipModule
|
|
48
|
+
LuTooltipTriggerModule: 'LuTooltipTriggerDirective',
|
|
49
|
+
// LuInputModule
|
|
50
|
+
LuInputClearerModule: 'LuInputClearerComponent',
|
|
51
|
+
LuInputDisplayerModule: 'LuInputDisplayerDirective',
|
|
52
|
+
// NgModules simples
|
|
53
|
+
LuToastsModule: 'LuToastsComponent',
|
|
54
|
+
LuNumberModule: 'LuNumberPipe',
|
|
55
|
+
LuScrollModule: 'LuScrollDirective',
|
|
56
|
+
LuSafeContentModule: 'LuSafeHtmlPipe',
|
|
57
|
+
},
|
|
58
|
+
types: {
|
|
59
|
+
ILuTranslation: 'LuTranslation',
|
|
60
|
+
},
|
|
61
|
+
inputsOutputs: {
|
|
62
|
+
'lu-divider': { withRole: '' },
|
|
63
|
+
'button': { delete: 'critical' },
|
|
64
|
+
'lu-loading': { type: { fullpage: 'fullPage' } },
|
|
65
|
+
'lu-single-file-upload': { illustration: { paper: 'invoice' }, size: { 'S': 'L' } },
|
|
66
|
+
'lu-multi-file-upload': { size: { 'S': 'L' } },
|
|
67
|
+
'lu-file-entry': { size: { 'S': 'L' } },
|
|
68
|
+
'lu-file-dropzone': { size: { 'S': 'L' } },
|
|
69
|
+
'lu-highlight-data': { icon: { 'manifying-glass': 'magnifying-glass' } },
|
|
70
|
+
},
|
|
71
|
+
}).run();
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const lib_1 = require("../lib");
|
|
39
|
+
const collectionPath = path.normalize(path.join(__dirname, '..', 'collection.json'));
|
|
40
|
+
const testsRoot = path.join(__dirname, 'tests');
|
|
41
|
+
const files = fs.readdirSync(testsRoot);
|
|
42
|
+
describe('Deprecated Resolver Migration', () => {
|
|
43
|
+
it('should rename deprecated module, type identifiers and inputOutput ', async () => {
|
|
44
|
+
// Arrange
|
|
45
|
+
const tree = (0, lib_1.createTreeFromFiles)(testsRoot, files, '.input.');
|
|
46
|
+
const expectedTree = (0, lib_1.createTreeFromFiles)(testsRoot, files, '.output.');
|
|
47
|
+
// Act
|
|
48
|
+
try {
|
|
49
|
+
await (0, lib_1.runSchematic)('collection', collectionPath, 'deprecated-resolver', { skipInstallation: true }, tree);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
// eslint-disable-next-line no-console
|
|
53
|
+
console.log(error);
|
|
54
|
+
}
|
|
55
|
+
// Assert
|
|
56
|
+
(0, lib_1.expectTree)(tree).toMatchTree(expectedTree);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "LuccaFrontDeprecatedResolver",
|
|
4
|
+
"title": "Lucca Front Deprecated Resolver Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"dryRun": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"description": "Run through the migration without making any changes.",
|
|
10
|
+
"default": false
|
|
11
|
+
},
|
|
12
|
+
"skipInstall": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "Skip installing dependencies.",
|
|
15
|
+
"default": false
|
|
16
|
+
},
|
|
17
|
+
"verbose": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Enable verbose logging.",
|
|
20
|
+
"default": false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
37
|
+
const path = __importStar(require("path"));
|
|
5
38
|
const lib_1 = require("../lib");
|
|
6
39
|
const collectionPath = path.normalize(path.join(__dirname, '..', 'migrations.json'));
|
|
7
40
|
const testsRoot = path.join(__dirname, 'tests');
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.CssMapper = void 0;
|
|
4
37
|
const typescript_1 = require("typescript");
|
|
@@ -18,21 +51,23 @@ class CssMapper {
|
|
|
18
51
|
this.mappings = {
|
|
19
52
|
classes: (0, schematic_utils_1.expand)(this.rawMappings.classes, this.mappingProps),
|
|
20
53
|
variables: (0, schematic_utils_1.expand)(this.rawMappings.variables, this.mappingProps),
|
|
21
|
-
mixins: (0, schematic_utils_1.expand)(this.rawMappings.mixins, this.mappingProps)
|
|
54
|
+
mixins: (0, schematic_utils_1.expand)(this.rawMappings.mixins, this.mappingProps),
|
|
55
|
+
rgbaVariables: this.rawMappings.rgbaVariables ? (0, schematic_utils_1.expand)(this.rawMappings.rgbaVariables, this.mappingProps) : undefined,
|
|
22
56
|
};
|
|
23
57
|
this.classesToUpdate = new Set(Object.keys(this.mappings.classes));
|
|
24
58
|
this.varsToUpdate = new Set(Object.keys(this.mappings.variables));
|
|
25
59
|
}
|
|
26
60
|
async run() {
|
|
27
|
-
const postCssScss = await Promise.resolve().then(() => require('../lib/local-deps/postcss-scss.js'));
|
|
28
|
-
const { postcssValueParser } = await Promise.resolve().then(() => require('../lib/local-deps/postcss-value-parser.js'));
|
|
29
|
-
const { postcssSelectorParser } = await Promise.resolve().then(() => require('../lib/local-deps/postcss-selector-parser.js'));
|
|
61
|
+
const postCssScss = await Promise.resolve().then(() => __importStar(require('../lib/local-deps/postcss-scss.js')));
|
|
62
|
+
const { postcssValueParser } = await Promise.resolve().then(() => __importStar(require('../lib/local-deps/postcss-value-parser.js')));
|
|
63
|
+
const { postcssSelectorParser } = await Promise.resolve().then(() => __importStar(require('../lib/local-deps/postcss-selector-parser.js')));
|
|
64
|
+
const { postCss } = await Promise.resolve().then(() => __importStar(require('../lib/local-deps/postcss.js')));
|
|
30
65
|
this.tree.visit((path, entry) => {
|
|
31
66
|
if (path.includes('node_modules') || !entry) {
|
|
32
67
|
return;
|
|
33
68
|
}
|
|
34
69
|
if (path.endsWith('.scss')) {
|
|
35
|
-
(0, schematics_1.migrateFile)(path, entry, this.tree, (content) => this.migrateScssFile(content, postCssScss, postcssValueParser, postcssSelectorParser));
|
|
70
|
+
(0, schematics_1.migrateFile)(path, entry, this.tree, (content) => this.migrateScssFile(content, postCssScss, postcssValueParser, postcssSelectorParser, postCss));
|
|
36
71
|
}
|
|
37
72
|
if (path.endsWith('.html')) {
|
|
38
73
|
(0, schematics_1.migrateFile)(path, entry, this.tree, (content) => this.migrateHTMLFile(content));
|
|
@@ -42,11 +77,14 @@ class CssMapper {
|
|
|
42
77
|
}
|
|
43
78
|
});
|
|
44
79
|
}
|
|
45
|
-
migrateScssFile(content, postCssScss, postcssValueParser, postcssSelectorParser) {
|
|
80
|
+
migrateScssFile(content, postCssScss, postcssValueParser, postcssSelectorParser, postCss) {
|
|
46
81
|
const root = postCssScss.parse(content);
|
|
47
82
|
(0, scss_ast_1.updateMixinNames)(root, this.mappings.mixins);
|
|
48
83
|
(0, scss_ast_1.updateCSSVariableNames)(root, this.mappings.variables, postcssValueParser);
|
|
49
84
|
(0, scss_ast_1.updateCSSClassNamesInRules)(root, this.mappings.classes, postcssSelectorParser);
|
|
85
|
+
if (this.mappings.rgbaVariables && Object.keys(this.mappings.rgbaVariables).length) {
|
|
86
|
+
(0, scss_ast_1.updateRgbaToTransparentize)(root, this.mappings.rgbaVariables, postcssValueParser, postCss);
|
|
87
|
+
}
|
|
50
88
|
return root.toResult({ syntax: { stringify: postCssScss.stringify } }).css;
|
|
51
89
|
}
|
|
52
90
|
migrateHTMLFile(content) {
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeprecatedMapper = void 0;
|
|
4
|
+
const typescript_1 = require("typescript");
|
|
5
|
+
const angular_template_1 = require("./angular-template");
|
|
6
|
+
const file_update_1 = require("./file-update");
|
|
7
|
+
const html_ast_1 = require("./html-ast");
|
|
8
|
+
const schematics_1 = require("./schematics");
|
|
9
|
+
class DeprecatedMapper {
|
|
10
|
+
constructor(tree, mappings) {
|
|
11
|
+
this.tree = tree;
|
|
12
|
+
this.mappings = mappings;
|
|
13
|
+
this.allIdentifierMappings = Object.assign(Object.create(null), mappings.modules, mappings.types);
|
|
14
|
+
this.hasTemplateMigrations = Object.keys(mappings.inputsOutputs).length > 0;
|
|
15
|
+
}
|
|
16
|
+
run() {
|
|
17
|
+
this.tree.visit((path, entry) => {
|
|
18
|
+
if (path.includes('node_modules') || !entry) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
22
|
+
(0, schematics_1.migrateFile)(path, entry, this.tree, (content) => this.migrateTsFile(path, content));
|
|
23
|
+
}
|
|
24
|
+
else if (path.endsWith('.html') && this.hasTemplateMigrations) {
|
|
25
|
+
(0, schematics_1.migrateFile)(path, entry, this.tree, (content) => this.migrateTemplate(content));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
migrateTsFile(fileName, content) {
|
|
30
|
+
// 1. Rename TypeScript identifiers (modules & types mappings)
|
|
31
|
+
let result = this.migrateTsIdentifiers(fileName, content);
|
|
32
|
+
// 2. Apply inputsOutputs migrations to any inline Angular template
|
|
33
|
+
if (this.hasTemplateMigrations) {
|
|
34
|
+
result = (0, angular_template_1.updateAngularTemplate)(fileName, result, (template) => this.migrateTemplate(template));
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
migrateTsIdentifiers(fileName, content) {
|
|
39
|
+
const sourceFile = (0, typescript_1.createSourceFile)(fileName, content, typescript_1.ScriptTarget.ESNext);
|
|
40
|
+
const updates = [];
|
|
41
|
+
(0, typescript_1.forEachChild)(sourceFile, (0, angular_template_1.createVisitor)(typescript_1.isIdentifier, (node) => {
|
|
42
|
+
const newName = this.allIdentifierMappings[node.text];
|
|
43
|
+
if (newName !== undefined && newName !== node.text) {
|
|
44
|
+
updates.push({
|
|
45
|
+
position: node.getStart(sourceFile),
|
|
46
|
+
oldContent: node.text,
|
|
47
|
+
newContent: newName,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
return (0, file_update_1.applyUpdates)(content, updates);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Applies all `inputsOutputs` migrations to a template string.
|
|
55
|
+
* Works on both standalone `.html` content and inline template strings extracted from `.ts` files.
|
|
56
|
+
*/
|
|
57
|
+
migrateTemplate(template) {
|
|
58
|
+
let result = template;
|
|
59
|
+
for (const [selector, inputs] of Object.entries(this.mappings.inputsOutputs)) {
|
|
60
|
+
for (const [inputName, migration] of Object.entries(inputs)) {
|
|
61
|
+
if (migration === '') {
|
|
62
|
+
result = this.removeAttribute(result, selector, inputName);
|
|
63
|
+
}
|
|
64
|
+
else if (typeof migration === 'string') {
|
|
65
|
+
result = (0, angular_template_1.replaceComponentInputName)(selector, inputName, migration, result);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
result = (0, angular_template_1.replaceComponentInput)(selector, inputName, migration, result);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Removes all occurrences of a static or bound attribute on elements matching the given selector.
|
|
76
|
+
*
|
|
77
|
+
* Handles:
|
|
78
|
+
* - Static boolean: `<lu-divider withRole>`
|
|
79
|
+
* - Static with value: `<lu-divider withRole="true">`
|
|
80
|
+
* - One-way bound: `<lu-divider [withRole]="expr">`
|
|
81
|
+
*
|
|
82
|
+
* The preceding whitespace is included in the removal to keep the markup clean.
|
|
83
|
+
*/
|
|
84
|
+
removeAttribute(template, selector, attrName) {
|
|
85
|
+
return (0, file_update_1.updateContent)(template, (updates) => {
|
|
86
|
+
const htmlAst = new html_ast_1.HtmlAst(template);
|
|
87
|
+
htmlAst.visitElements(selector, (el) => {
|
|
88
|
+
const elAst = new html_ast_1.HtmlAstVisitor(el);
|
|
89
|
+
// Static text attribute: `attrName` (boolean) or `attrName="value"`
|
|
90
|
+
elAst.visitAttribute(attrName, (attr) => {
|
|
91
|
+
const from = attr.sourceSpan.start.offset;
|
|
92
|
+
const to = attr.sourceSpan.end.offset;
|
|
93
|
+
const hasLeadingSpace = from > 0 && template[from - 1] === ' ';
|
|
94
|
+
const removeFrom = hasLeadingSpace ? from - 1 : from;
|
|
95
|
+
updates.push({ position: removeFrom, oldContent: template.slice(removeFrom, to), newContent: '' });
|
|
96
|
+
});
|
|
97
|
+
// Bound attribute: `[attrName]="expr"`
|
|
98
|
+
elAst.visitBoundAttribute(attrName, (attr) => {
|
|
99
|
+
const from = attr.sourceSpan.start.offset;
|
|
100
|
+
const to = attr.sourceSpan.end.offset;
|
|
101
|
+
const hasLeadingSpace = from > 0 && template[from - 1] === ' ';
|
|
102
|
+
const removeFrom = hasLeadingSpace ? from - 1 : from;
|
|
103
|
+
updates.push({ position: removeFrom, oldContent: template.slice(removeFrom, to), newContent: '' });
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.DeprecatedMapper = DeprecatedMapper;
|
package/schematics/lib/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./angular-component-ast"), exports);
|
|
18
18
|
__exportStar(require("./angular-template"), exports);
|
|
19
19
|
__exportStar(require("./component-mapper"), exports);
|
|
20
|
+
__exportStar(require("./deprecated-mapper"), exports);
|
|
20
21
|
__exportStar(require("./css-mapper"), exports);
|
|
21
22
|
__exportStar(require("./file-update"), exports);
|
|
22
23
|
__exportStar(require("./html-ast"), exports);
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.currentSchematicContext = exports.LfSchematicContext = void 0;
|
|
4
37
|
const installer_1 = require("./local-deps/installer");
|
|
@@ -22,7 +55,7 @@ class LfSchematicContext {
|
|
|
22
55
|
if (!this.skipInstall) {
|
|
23
56
|
(0, installer_1.installLocalDependencies)(context);
|
|
24
57
|
}
|
|
25
|
-
this._angularCompiler = await Promise.resolve().then(() => require('@angular/compiler'));
|
|
58
|
+
this._angularCompiler = await Promise.resolve().then(() => __importStar(require('@angular/compiler')));
|
|
26
59
|
}
|
|
27
60
|
get angularCompiler() {
|
|
28
61
|
if (!this._angularCompiler) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucca-front/internal-schematics-deps",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"lockfileVersion":
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"version": "1.0.0",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"postcss": "8.5.
|
|
12
|
+
"postcss": "8.5.10",
|
|
13
13
|
"postcss-scss": "4.0.9",
|
|
14
14
|
"postcss-selector-parser": "7.1.0",
|
|
15
15
|
"postcss-value-parser": "4.2.0"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
|
21
21
|
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
|
22
22
|
"dev": true,
|
|
23
|
+
"license": "MIT",
|
|
23
24
|
"bin": {
|
|
24
25
|
"cssesc": "bin/cssesc"
|
|
25
26
|
},
|
|
@@ -28,9 +29,9 @@
|
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
"node_modules/nanoid": {
|
|
31
|
-
"version": "3.3.
|
|
32
|
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.
|
|
33
|
-
"integrity": "sha512-
|
|
32
|
+
"version": "3.3.12",
|
|
33
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
|
34
|
+
"integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==",
|
|
34
35
|
"dev": true,
|
|
35
36
|
"funding": [
|
|
36
37
|
{
|
|
@@ -50,12 +51,13 @@
|
|
|
50
51
|
"version": "1.1.1",
|
|
51
52
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
|
52
53
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
|
53
|
-
"dev": true
|
|
54
|
+
"dev": true,
|
|
55
|
+
"license": "ISC"
|
|
54
56
|
},
|
|
55
57
|
"node_modules/postcss": {
|
|
56
|
-
"version": "8.5.
|
|
57
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
58
|
-
"integrity": "sha512-
|
|
58
|
+
"version": "8.5.10",
|
|
59
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz",
|
|
60
|
+
"integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==",
|
|
59
61
|
"dev": true,
|
|
60
62
|
"funding": [
|
|
61
63
|
{
|
|
@@ -72,9 +74,8 @@
|
|
|
72
74
|
}
|
|
73
75
|
],
|
|
74
76
|
"license": "MIT",
|
|
75
|
-
"peer": true,
|
|
76
77
|
"dependencies": {
|
|
77
|
-
"nanoid": "^3.3.
|
|
78
|
+
"nanoid": "^3.3.11",
|
|
78
79
|
"picocolors": "^1.1.1",
|
|
79
80
|
"source-map-js": "^1.2.1"
|
|
80
81
|
},
|
|
@@ -101,6 +102,7 @@
|
|
|
101
102
|
"url": "https://github.com/sponsors/ai"
|
|
102
103
|
}
|
|
103
104
|
],
|
|
105
|
+
"license": "MIT",
|
|
104
106
|
"engines": {
|
|
105
107
|
"node": ">=12.0"
|
|
106
108
|
},
|
|
@@ -126,13 +128,15 @@
|
|
|
126
128
|
"version": "4.2.0",
|
|
127
129
|
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
|
128
130
|
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
|
129
|
-
"dev": true
|
|
131
|
+
"dev": true,
|
|
132
|
+
"license": "MIT"
|
|
130
133
|
},
|
|
131
134
|
"node_modules/source-map-js": {
|
|
132
135
|
"version": "1.2.1",
|
|
133
136
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
|
134
137
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
|
135
138
|
"dev": true,
|
|
139
|
+
"license": "BSD-3-Clause",
|
|
136
140
|
"engines": {
|
|
137
141
|
"node": ">=0.10.0"
|
|
138
142
|
}
|
|
@@ -141,74 +145,8 @@
|
|
|
141
145
|
"version": "1.0.2",
|
|
142
146
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
|
143
147
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
|
144
|
-
"dev": true
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"dependencies": {
|
|
148
|
-
"cssesc": {
|
|
149
|
-
"version": "3.0.0",
|
|
150
|
-
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
|
151
|
-
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
|
152
|
-
"dev": true
|
|
153
|
-
},
|
|
154
|
-
"nanoid": {
|
|
155
|
-
"version": "3.3.11",
|
|
156
|
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
|
157
|
-
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
|
158
|
-
"dev": true
|
|
159
|
-
},
|
|
160
|
-
"picocolors": {
|
|
161
|
-
"version": "1.1.1",
|
|
162
|
-
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
|
163
|
-
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
|
164
|
-
"dev": true
|
|
165
|
-
},
|
|
166
|
-
"postcss": {
|
|
167
|
-
"version": "8.5.3",
|
|
168
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
|
|
169
|
-
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
|
|
170
|
-
"dev": true,
|
|
171
|
-
"peer": true,
|
|
172
|
-
"requires": {
|
|
173
|
-
"nanoid": "^3.3.8",
|
|
174
|
-
"picocolors": "^1.1.1",
|
|
175
|
-
"source-map-js": "^1.2.1"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"postcss-scss": {
|
|
179
|
-
"version": "4.0.9",
|
|
180
|
-
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz",
|
|
181
|
-
"integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==",
|
|
182
|
-
"dev": true,
|
|
183
|
-
"requires": {}
|
|
184
|
-
},
|
|
185
|
-
"postcss-selector-parser": {
|
|
186
|
-
"version": "7.1.0",
|
|
187
|
-
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz",
|
|
188
|
-
"integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==",
|
|
189
148
|
"dev": true,
|
|
190
|
-
"
|
|
191
|
-
"cssesc": "^3.0.0",
|
|
192
|
-
"util-deprecate": "^1.0.2"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"postcss-value-parser": {
|
|
196
|
-
"version": "4.2.0",
|
|
197
|
-
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
|
198
|
-
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
|
199
|
-
"dev": true
|
|
200
|
-
},
|
|
201
|
-
"source-map-js": {
|
|
202
|
-
"version": "1.2.1",
|
|
203
|
-
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
|
204
|
-
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
|
205
|
-
"dev": true
|
|
206
|
-
},
|
|
207
|
-
"util-deprecate": {
|
|
208
|
-
"version": "1.0.2",
|
|
209
|
-
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
|
210
|
-
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
|
211
|
-
"dev": true
|
|
149
|
+
"license": "MIT"
|
|
212
150
|
}
|
|
213
151
|
}
|
|
214
152
|
}
|