@spartan-ng/cli 0.0.1-alpha.379 → 0.0.1-alpha.382
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/generators.json +30 -0
- package/package.json +4 -2
- package/src/generators/base/lib/build-dependency-array.js +1 -35
- package/src/generators/base/lib/build-dependency-array.js.map +1 -1
- package/src/generators/base/schema.d.ts +0 -1
- package/src/generators/base/versions.d.ts +1 -21
- package/src/generators/base/versions.js +2 -22
- package/src/generators/base/versions.js.map +1 -1
- package/src/generators/migrate-core/compat.d.ts +2 -0
- package/src/generators/migrate-core/compat.js +6 -0
- package/src/generators/migrate-core/compat.js.map +1 -0
- package/src/generators/migrate-core/generator.d.ts +4 -0
- package/src/generators/migrate-core/generator.js +52 -0
- package/src/generators/migrate-core/generator.js.map +1 -0
- package/src/generators/migrate-core/schema.d.ts +3 -0
- package/src/generators/migrate-core/schema.json +14 -0
- package/src/generators/migrate-icon/compat.d.ts +2 -0
- package/src/generators/migrate-icon/compat.js +6 -0
- package/src/generators/migrate-icon/compat.js.map +1 -0
- package/src/generators/migrate-icon/generator.d.ts +4 -0
- package/src/generators/migrate-icon/generator.js +286 -0
- package/src/generators/migrate-icon/generator.js.map +1 -0
- package/src/generators/migrate-icon/schema.d.ts +3 -0
- package/src/generators/migrate-icon/schema.json +14 -0
- package/src/generators/migrate-scroll-area/compat.d.ts +2 -0
- package/src/generators/migrate-scroll-area/compat.js +6 -0
- package/src/generators/migrate-scroll-area/compat.js.map +1 -0
- package/src/generators/migrate-scroll-area/generator.d.ts +4 -0
- package/src/generators/migrate-scroll-area/generator.js +112 -0
- package/src/generators/migrate-scroll-area/generator.js.map +1 -0
- package/src/generators/migrate-scroll-area/schema.d.ts +3 -0
- package/src/generators/migrate-scroll-area/schema.json +14 -0
- package/src/generators/ui/generator.js +0 -5
- package/src/generators/ui/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +4 -3
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-ellipsis.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-link.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-list.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-page.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-separator.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.component.ts.template +7 -5
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input-wrapper.component.ts.template +2 -2
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-icon-helm/files/index.ts.template +4 -7
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.directive.spec.ts.template +66 -0
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.directive.ts.template +41 -0
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.token.ts.template +1 -4
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -3
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/files/index.ts.template +3 -3
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.component.ts.template +23 -0
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.directive.ts.template +5 -2
- package/src/generators/ui/libs/ui-scroll-area-helm/files/index.ts.template +4 -4
- package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.directive.ts.template +20 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +4 -3
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +4 -3
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +6 -6
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +5 -4
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-input.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-thumb.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-tick-mark.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-tick-marks.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-active-fill.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-active.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track-inactive.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider-track.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-caption.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-td.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-th.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-trow.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.component.ts.template +6 -5
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-tooltip-helm/files/lib/hlm-tooltip-trigger.directive.ts.template +19 -24
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.directive.ts.template +1 -1
- package/src/generators/ui/schema.d.ts +0 -1
- package/src/generators/ui/supported-ui-libraries.json +69 -82
- package/src/utils/visit-files.d.ts +2 -0
- package/src/utils/visit-files.js +14 -0
- package/src/utils/visit-files.js.map +1 -0
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +0 -64
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.ts.template +0 -118
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.directive.ts.template +0 -15
- package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.component.ts.template +0 -49
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "MigrateIcon",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"skipFormat": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": false,
|
|
10
|
+
"description": "Skip formatting files"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": []
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const generator_1 = require("./generator");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxGenerator)(generator_1.migrateScrollAreaGenerator);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-scroll-area/compat.ts"],"names":[],"mappings":";;AAAA,uCAAgD;AAChD,2CAAyD;AAEzD,kBAAe,IAAA,2BAAkB,EAAC,sCAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateScrollAreaGenerator = migrateScrollAreaGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const string_change_1 = require("@nx/devkit/src/utils/string-change");
|
|
7
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
8
|
+
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
9
|
+
async function migrateScrollAreaGenerator(tree, { skipFormat }) {
|
|
10
|
+
replaceImports(tree);
|
|
11
|
+
replaceSelector(tree);
|
|
12
|
+
if (!skipFormat) {
|
|
13
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function replaceSelector(tree) {
|
|
17
|
+
// if the element is `<hlm-scroll-area` then we need to replace it with `<ng-scrollbar hlm`
|
|
18
|
+
// we also need to replace the closing tag `</hlm-scroll-area>` with `</ng-scrollbar>`
|
|
19
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '.', (path) => {
|
|
20
|
+
// if this is not an html file or typescript file (inline templates) then skip
|
|
21
|
+
if (!path.endsWith('.html') && !path.endsWith('.ts')) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let content = tree.read(path, 'utf-8');
|
|
25
|
+
if (!content) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
content = content.replace(/<hlm-scroll-area/g, '<ng-scrollbar hlm');
|
|
29
|
+
content = content.replace(/<\/hlm-scroll-area>/g, '</ng-scrollbar>');
|
|
30
|
+
tree.write(path, content);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function replaceImports(tree) {
|
|
34
|
+
// ng modules or standalone components will have import arrays that may need updated.
|
|
35
|
+
// if the import is `HlmScrollAreaModule` then we need to also import `NgScrollbarModule`,
|
|
36
|
+
// if the import is `HlmScrollAreaComponent` we need to rename it to `HlmScrollAreaDirective` and add the `NgScrollbarModule` import.
|
|
37
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '.', (path) => {
|
|
38
|
+
// if the file is not a typescript file then skip
|
|
39
|
+
if (!path.endsWith('.ts')) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
let content = tree.read(path, 'utf-8');
|
|
43
|
+
if (!content) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
// convert the content to an ast
|
|
47
|
+
const sourceFile = typescript_1.default.createSourceFile(path, content, typescript_1.default.ScriptTarget.Latest, true);
|
|
48
|
+
// find all imports of HlmScrollAreaModule or HlmScrollAreaComponent
|
|
49
|
+
const imports = findHlmScrollAreaImports(sourceFile);
|
|
50
|
+
// if no imports are found then skip
|
|
51
|
+
if (imports.length === 0) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const changes = [];
|
|
55
|
+
for (const identifier of imports) {
|
|
56
|
+
// if the identifier is HlmScrollAreaModule then we need to add NgScrollbarModule to the imports
|
|
57
|
+
if (identifier.getText() === 'HlmScrollAreaModule') {
|
|
58
|
+
changes.push({
|
|
59
|
+
type: string_change_1.ChangeType.Insert,
|
|
60
|
+
index: identifier.getStart(),
|
|
61
|
+
text: 'NgScrollbarModule, ',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// if the identifier is HlmScrollAreaComponent then we need to rename it to HlmScrollAreaDirective and add NgScrollbarModule to the imports
|
|
65
|
+
if (identifier.getText() === 'HlmScrollAreaComponent') {
|
|
66
|
+
changes.push({
|
|
67
|
+
type: string_change_1.ChangeType.Insert,
|
|
68
|
+
index: identifier.getStart(),
|
|
69
|
+
text: 'NgScrollbarModule, ',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// check if the NgScrollbarModule import is already present
|
|
73
|
+
if (!hasImport(content, 'NgScrollbarModule', 'ngx-scrollbar')) {
|
|
74
|
+
changes.push({
|
|
75
|
+
type: string_change_1.ChangeType.Insert,
|
|
76
|
+
index: 0,
|
|
77
|
+
text: `import { NgScrollbarModule } from 'ngx-scrollbar';\n`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
content = (0, string_change_1.applyChangesToString)(content, changes);
|
|
82
|
+
// if there are any remaining uses of HlmScrollAreaComponent then replace them with HlmScrollAreaDirective
|
|
83
|
+
content = content.replace(/HlmScrollAreaComponent/g, 'HlmScrollAreaDirective');
|
|
84
|
+
tree.write(path, content);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function findHlmScrollAreaImports(node) {
|
|
88
|
+
const matches = [];
|
|
89
|
+
const visit = (node) => {
|
|
90
|
+
if (typescript_1.default.isPropertyAssignment(node) &&
|
|
91
|
+
node.name.getText() === 'imports' &&
|
|
92
|
+
typescript_1.default.isArrayLiteralExpression(node.initializer)) {
|
|
93
|
+
// check if the array literal contains the HlmScrollAreaModule or HlmScrollAreaComponent
|
|
94
|
+
node.initializer.elements.forEach((element) => {
|
|
95
|
+
if (typescript_1.default.isIdentifier(element)) {
|
|
96
|
+
if (element.getText() === 'HlmScrollAreaModule' || element.getText() === 'HlmScrollAreaComponent') {
|
|
97
|
+
matches.push(element);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
typescript_1.default.forEachChild(node, visit);
|
|
103
|
+
};
|
|
104
|
+
visit(node);
|
|
105
|
+
return matches;
|
|
106
|
+
}
|
|
107
|
+
function hasImport(contents, importName, importPath) {
|
|
108
|
+
const sourceFile = typescript_1.default.createSourceFile('temp.ts', contents, typescript_1.default.ScriptTarget.Latest, true);
|
|
109
|
+
return (0, ast_utils_1.isImported)(sourceFile, importName, importPath);
|
|
110
|
+
}
|
|
111
|
+
exports.default = migrateScrollAreaGenerator;
|
|
112
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-scroll-area/generator.ts"],"names":[],"mappings":";;AAMA,gEAOC;;AAbD,uCAAqE;AACrE,sEAAoG;AACpG,qEAAmE;AACnE,oEAA4B;AAGrB,KAAK,UAAU,0BAA0B,CAAC,IAAU,EAAE,EAAE,UAAU,EAAoC;IAC5G,cAAc,CAAC,IAAI,CAAC,CAAC;IACrB,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED,SAAS,eAAe,CAAC,IAAU;IAClC,2FAA2F;IAC3F,sFAAsF;IACtF,IAAA,6BAAoB,EAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;QACxC,8EAA8E;QAC9E,IA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E,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,SAAS;YACjC,oBAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAC5C,CAAC;YACF,wFAAwF;YACxF,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC7C,IAAI,oBAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC9B,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,qBAAqB,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,wBAAwB,EAAE,CAAC;wBACnG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACvB,CAAC;gBACF,CAAC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,oBAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEF,KAAK,CAAC,IAAI,CAAC,CAAC;IAEZ,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,QAAgB,EAAE,UAAkB,EAAE,UAAkB;IAC1E,MAAM,UAAU,GAAG,oBAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1F,OAAO,IAAA,sBAAU,EAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AACvD,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "MigrateScrollArea",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"skipFormat": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": false,
|
|
10
|
+
"description": "Skip formatting files"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": []
|
|
14
|
+
}
|
|
@@ -27,7 +27,6 @@ exports.default = hlmUIGenerator;
|
|
|
27
27
|
const devkit_1 = require("@nx/devkit");
|
|
28
28
|
const enquirer_1 = require("enquirer");
|
|
29
29
|
const config_1 = require("../../utils/config");
|
|
30
|
-
const versions_1 = require("../base/versions");
|
|
31
30
|
const add_dependent_primitive_1 = require("./add-dependent-primitive");
|
|
32
31
|
async function hlmUIGenerator(tree, options) {
|
|
33
32
|
const tasks = [];
|
|
@@ -60,9 +59,6 @@ async function createPrimitiveLibraries(response, availablePrimitiveNames, avail
|
|
|
60
59
|
await (0, add_dependent_primitive_1.addDependentPrimitives)(primitivesToCreate);
|
|
61
60
|
}
|
|
62
61
|
await replaceContextAndMenuBar(primitivesToCreate, allPrimitivesSelected);
|
|
63
|
-
if (primitivesToCreate.includes('collapsible')) {
|
|
64
|
-
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, { '@spartan-ng/brain/collapsible': versions_1.SPARTAN_COLLAPSIBLE_BRAIN_VERSION }, {}));
|
|
65
|
-
}
|
|
66
62
|
if (primitivesToCreate.length === 1 && primitivesToCreate[0] === 'collapsible') {
|
|
67
63
|
return tasks;
|
|
68
64
|
}
|
|
@@ -81,7 +77,6 @@ async function createPrimitiveLibraries(response, availablePrimitiveNames, avail
|
|
|
81
77
|
publicName: '',
|
|
82
78
|
primitiveName: '',
|
|
83
79
|
peerDependencies,
|
|
84
|
-
skipBrainDependencies: options.skipBrainDependencies,
|
|
85
80
|
directory: options.directory ?? config.componentsPath,
|
|
86
81
|
tags: options.tags,
|
|
87
82
|
rootProject: options.rootProject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,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,CAAC,CAAC;IAC3C,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,GAA2B,EAAE,EAAE,CACtD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, effect, input } from '@angular/core';
|
|
2
2
|
import { BrnAccordionContentComponent } from '@spartan-ng/brain/accordion';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Component({
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { provideIcons } from '@ng-icons/core';
|
|
2
3
|
import { lucideChevronDown } from '@ng-icons/lucide';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
4
|
-
import { provideHlmIconConfig
|
|
4
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
5
|
+
import { provideHlmIconConfig } from '@spartan-ng/ui-icon-helm';
|
|
5
6
|
import type { ClassValue } from 'clsx';
|
|
6
7
|
|
|
7
8
|
@Directive({
|
|
8
9
|
selector: 'hlm-icon[hlmAccordionIcon], hlm-icon[hlmAccIcon]',
|
|
9
10
|
standalone: true,
|
|
10
|
-
providers: [provideIcons({ lucideChevronDown }), provideHlmIconConfig({
|
|
11
|
+
providers: [provideIcons({ lucideChevronDown }), provideHlmIconConfig({ size: 'none' })],
|
|
11
12
|
host: {
|
|
12
13
|
'[class]': '_computedClass()',
|
|
13
14
|
},
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { BrnAccordionItemDirective } from '@spartan-ng/brain/accordion';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { BrnAccordionTriggerDirective } from '@spartan-ng/brain/accordion';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, inject, input } from '@angular/core';
|
|
2
2
|
import { BrnAccordionDirective } from '@spartan-ng/brain/accordion';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
2
3
|
import { HlmButtonDirective, provideBrnButtonConfig } from '@spartan-ng/ui-button-helm';
|
|
3
|
-
import { hlm } from '@spartan-ng/ui-core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input, signal } from '@angular/core';
|
|
2
|
-
import { hlm, injectExposesStateProvider } from '@spartan-ng/
|
|
2
|
+
import { hlm, injectExposesStateProvider } from '@spartan-ng/brain/core';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { BrnAlertDialogDescriptionDirective } from '@spartan-ng/brain/alert-dialog';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Directive, computed, effect, input } from '@angular/core';
|
|
2
|
-
import { hlm, injectCustomClassSettable } from '@spartan-ng/
|
|
2
|
+
import { hlm, injectCustomClassSettable } from '@spartan-ng/brain/core';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
@Directive({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { BrnAlertDialogTitleDirective } from '@spartan-ng/brain/alert-dialog';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type NumberInput, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import { type AfterViewInit, Directive, ElementRef, computed, inject, input } from '@angular/core';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
const parseDividedString = (value: NumberInput): NumberInput => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, inject } from '@angular/core';
|
|
2
2
|
import { BrnAvatarFallbackDirective, hexColorFor, isBright } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmAvatarFallback]',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';
|
|
2
2
|
import { BrnAvatarComponent } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
5
5
|
import type { ClassValue } from 'clsx';
|
|
6
6
|
|
package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, inject, input } from '@angular/core';
|
|
2
2
|
import { BrnAvatarImageDirective } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
2
|
import { Directive, booleanAttribute, computed, input } from '@angular/core';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
3
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
4
4
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
5
5
|
import type { ClassValue } from 'clsx';
|
|
6
6
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Component, computed, input } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
2
3
|
import { lucideEllipsis } from '@ng-icons/lucide';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
4
|
-
import {
|
|
4
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
5
|
+
import { HlmIconDirective } from '@spartan-ng/ui-icon-helm';
|
|
5
6
|
import type { ClassValue } from 'clsx';
|
|
6
7
|
|
|
7
8
|
@Component({
|
|
8
9
|
selector: 'hlm-breadcrumb-ellipsis',
|
|
9
10
|
standalone: true,
|
|
10
|
-
imports: [
|
|
11
|
+
imports: [NgIcon, HlmIconDirective],
|
|
11
12
|
providers: [provideIcons({ lucideEllipsis })],
|
|
12
13
|
template: `
|
|
13
14
|
<span role="presentation" aria-hidden="true" [class]="_computedClass()">
|
|
14
|
-
<
|
|
15
|
+
<ng-icon hlm size="sm" name="lucideEllipsis" />
|
|
15
16
|
<span class="sr-only">More</span>
|
|
16
17
|
</span>
|
|
17
18
|
`,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Component, computed, input } from '@angular/core';
|
|
2
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
2
3
|
import { lucideChevronRight } from '@ng-icons/lucide';
|
|
3
|
-
import { hlm } from '@spartan-ng/
|
|
4
|
-
import {
|
|
4
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
5
|
+
import { HlmIconDirective } from '@spartan-ng/ui-icon-helm';
|
|
5
6
|
import type { ClassValue } from 'clsx';
|
|
6
7
|
|
|
7
8
|
@Component({
|
|
8
9
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
9
10
|
selector: '[hlmBreadcrumbSeparator]',
|
|
10
11
|
standalone: true,
|
|
11
|
-
imports: [
|
|
12
|
+
imports: [NgIcon, HlmIconDirective],
|
|
12
13
|
providers: [provideIcons({ lucideChevronRight })],
|
|
13
14
|
host: {
|
|
14
15
|
role: 'presentation',
|
|
@@ -17,7 +18,7 @@ import type { ClassValue } from 'clsx';
|
|
|
17
18
|
},
|
|
18
19
|
template: `
|
|
19
20
|
<ng-content>
|
|
20
|
-
<
|
|
21
|
+
<ng-icon hlm name="lucideChevronRight" />
|
|
21
22
|
</ng-content>
|
|
22
23
|
`,
|
|
23
24
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Directive, computed, input, signal } from '@angular/core';
|
|
2
|
-
import { hlm } from '@spartan-ng/
|
|
2
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
3
3
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
import { injectBrnButtonConfig } from './hlm-button.token';
|
package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.component.ts.template
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
2
2
|
import { Component, booleanAttribute, computed, input, model, numberAttribute, viewChild } from '@angular/core';
|
|
3
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
4
|
import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
|
|
4
5
|
import {
|
|
5
6
|
BrnCalendarCellButtonDirective,
|
|
@@ -14,10 +15,10 @@ import {
|
|
|
14
15
|
Weekday,
|
|
15
16
|
injectBrnCalendarI18n,
|
|
16
17
|
} from '@spartan-ng/brain/calendar';
|
|
18
|
+
import { hlm } from '@spartan-ng/brain/core';
|
|
17
19
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
18
20
|
import { buttonVariants } from '@spartan-ng/ui-button-helm';
|
|
19
|
-
import {
|
|
20
|
-
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
|
|
21
|
+
import { HlmIconDirective } from '@spartan-ng/ui-icon-helm';
|
|
21
22
|
|
|
22
23
|
@Component({
|
|
23
24
|
standalone: true,
|
|
@@ -32,7 +33,8 @@ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
|
|
|
32
33
|
BrnCalendarCellButtonDirective,
|
|
33
34
|
BrnCalendarCellDirective,
|
|
34
35
|
BrnCalendarGridDirective,
|
|
35
|
-
|
|
36
|
+
NgIcon,
|
|
37
|
+
HlmIconDirective,
|
|
36
38
|
],
|
|
37
39
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
38
40
|
template: `
|
|
@@ -60,14 +62,14 @@ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
|
|
|
60
62
|
brnCalendarPreviousButton
|
|
61
63
|
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute left-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
62
64
|
>
|
|
63
|
-
<
|
|
65
|
+
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
64
66
|
</button>
|
|
65
67
|
|
|
66
68
|
<button
|
|
67
69
|
brnCalendarNextButton
|
|
68
70
|
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute right-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
69
71
|
>
|
|
70
|
-
<
|
|
72
|
+
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
71
73
|
</button>
|
|
72
74
|
</div>
|
|
73
75
|
</div>
|