@spartan-ng/cli 0.0.1-alpha.366 → 0.0.1-alpha.367
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/package.json +5 -4
- package/src/generators/base/generator.js +22 -25
- package/src/generators/base/generator.js.map +1 -1
- package/src/generators/base/lib/build-dependency-array.js +6 -6
- package/src/generators/base/lib/build-dependency-array.js.map +1 -1
- package/src/generators/base/lib/get-target-library-directory.js +3 -2
- package/src/generators/base/lib/get-target-library-directory.js.map +1 -1
- package/src/generators/base/lib/initialize-angular-library.js +38 -19
- package/src/generators/base/lib/initialize-angular-library.js.map +1 -1
- package/src/generators/base/versions.d.ts +22 -22
- package/src/generators/base/versions.js +22 -22
- package/src/generators/base/versions.js.map +1 -1
- package/src/generators/theme/compat.js +2 -1
- package/src/generators/theme/compat.js.map +1 -1
- package/src/generators/theme/generator.js +45 -48
- package/src/generators/theme/generator.js.map +1 -1
- package/src/generators/theme/libs/add-theme-to-application-styles.js +12 -7
- package/src/generators/theme/libs/add-theme-to-application-styles.js.map +1 -1
- package/src/generators/ui/add-dependent-primitive.js +12 -26
- package/src/generators/ui/add-dependent-primitive.js.map +1 -1
- package/src/generators/ui/compat.js +3 -2
- package/src/generators/ui/compat.js.map +1 -1
- package/src/generators/ui/generator.js +86 -64
- package/src/generators/ui/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +3 -10
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-accordion-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-alert-dialog-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-alert-dialog-helm/generator.js.map +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-icon.directive.ts.template +4 -10
- 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 +4 -8
- package/src/generators/ui/libs/ui-alert-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-alert-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-alert-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.spec.ts.template +2 -1
- package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +9 -11
- package/src/generators/ui/libs/ui-aspect-ratio-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-aspect-ratio-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-aspect-ratio-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.directive.spec.ts.template +2 -2
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.directive.ts.template +2 -2
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template +3 -3
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +6 -10
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.spec.ts.template +2 -2
- 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-avatar-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-avatar-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +9 -22
- package/src/generators/ui/libs/ui-badge-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-badge-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-badge-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/index.ts.template +32 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-ellipsis.component.ts.template +23 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-item.directive.ts.template +16 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-link.directive.ts.template +36 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-list.directive.ts.template +18 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-page.directive.ts.template +19 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb-separator.component.ts.template +30 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/breadcrumb.directive.ts.template +19 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/generator.js +14 -0
- package/src/generators/ui/libs/ui-breadcrumb-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-button-helm/files/.DS_Store.template +0 -0
- package/src/generators/ui/libs/ui-button-helm/files/index.ts.template +1 -0
- package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +13 -16
- package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.token.ts.template +22 -0
- package/src/generators/ui/libs/ui-button-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-button-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-button-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-calendar-helm/files/index.ts.template +10 -0
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.component.ts.template +160 -0
- package/src/generators/ui/libs/ui-calendar-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-calendar-helm/generator.js +14 -0
- package/src/generators/ui/libs/ui-calendar-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-card-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-card-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-card-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +3 -3
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +7 -3
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +11 -15
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +14 -15
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +8 -8
- package/src/generators/ui/libs/ui-carousel-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-carousel-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +11 -27
- package/src/generators/ui/libs/ui-checkbox-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-checkbox-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-checkbox-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +5 -9
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -9
- package/src/generators/ui/libs/ui-command-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-command-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-command-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/.DS_Store.template +0 -0
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog.service.ts.template +3 -3
- package/src/generators/ui/libs/ui-dialog-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-dialog-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/form-field.spec.ts.template +4 -2
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-error.directive.ts.template +1 -0
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.component.ts.template +6 -7
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-hint.directive.ts.template +1 -0
- package/src/generators/ui/libs/ui-form-field-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-form-field-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-form-field-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-hover-card-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-hover-card-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-hover-card-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-icon-helm/files/index.ts.template +1 -0
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +5 -5
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.ts.template +26 -48
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.token.ts.template +23 -0
- package/src/generators/ui/libs/ui-icon-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-icon-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-icon-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +26 -26
- package/src/generators/ui/libs/ui-input-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-input-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-input-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +14 -13
- package/src/generators/ui/libs/ui-label-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-label-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-label-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -9
- 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.component.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-menu-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-menu-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/index.ts.template +3 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination.component.ts.template +269 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +3 -2
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.component.ts.template +7 -7
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +4 -2
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +8 -6
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.component.ts.template +10 -12
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.component.ts.template +10 -12
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +6 -4
- package/src/generators/ui/libs/ui-pagination-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-pagination-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +3 -3
- package/src/generators/ui/libs/ui-popover-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-popover-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-popover-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +12 -22
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-progress-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-progress-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-progress-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-radio-group-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.component.ts.template +15 -44
- package/src/generators/ui/libs/ui-scroll-area-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-scroll-area-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-scroll-area-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +2 -10
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +4 -10
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +2 -10
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +4 -7
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +0 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +0 -1
- package/src/generators/ui/libs/ui-select-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-select-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-select-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-separator-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-separator-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-separator-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +4 -4
- 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/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-sheet-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-skeleton-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-skeleton-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-skeleton-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-slider-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-slider-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-slider-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.component.ts.template +21 -17
- package/src/generators/ui/libs/ui-sonner-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-sonner-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-sonner-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-spinner-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-spinner-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-spinner-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-ng-model.component.ignore.spec.ts.template +1 -0
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +2 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +37 -59
- package/src/generators/ui/libs/ui-switch-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-switch-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-switch-helm/generator.js.map +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.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-table-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-table-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.component.ts.template +16 -13
- package/src/generators/ui/libs/ui-tabs-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-tabs-helm/generator.js.map +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-toggle-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-toggle-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-toggle-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-tooltip-helm/files/lib/hlm-tooltip-trigger.directive.ts.template +1 -1
- package/src/generators/ui/libs/ui-tooltip-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-tooltip-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-tooltip-helm/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-typography-helm/generator.d.ts +1 -1
- package/src/generators/ui/libs/ui-typography-helm/generator.js +7 -4
- package/src/generators/ui/libs/ui-typography-helm/generator.js.map +1 -1
- package/src/generators/ui/primivite-deps.js +2 -2
- package/src/generators/ui/primivite-deps.js.map +1 -1
- package/src/generators/ui/primivites.d.ts +1 -1
- package/src/generators/ui/schema.json +0 -1
- package/src/generators/ui/supported-ui-libraries.json +184 -130
- package/src/utils/config.d.ts +5 -0
- package/src/utils/config.js +26 -0
- package/src/utils/config.js.map +1 -0
- package/src/utils/version-utils.js +3 -4
- package/src/utils/version-utils.js.map +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const generator_1 = require("./generator");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
5
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
exports.default = (0, devkit_1.convertNxGenerator)((tree, schema) => (0, generator_1.default)(tree,
|
|
7
|
+
exports.default = (0, devkit_1.convertNxGenerator)((tree, schema) => (0, generator_1.default)(tree, { ...schema, angularCli: true }));
|
|
7
8
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/compat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/compat.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAyC;AAGzC,8DAA8D;AAC9D,kBAAe,IAAA,2BAAkB,EAAC,CAAC,IAAS,EAAE,MAAuD,EAAE,EAAE,CACxG,IAAA,mBAAc,EAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACrD,CAAC"}
|
|
@@ -1,79 +1,101 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.default = hlmUIGenerator;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
27
|
const devkit_1 = require("@nx/devkit");
|
|
6
28
|
const enquirer_1 = require("enquirer");
|
|
29
|
+
const config_1 = require("../../utils/config");
|
|
7
30
|
const versions_1 = require("../base/versions");
|
|
8
31
|
const add_dependent_primitive_1 = require("./add-dependent-primitive");
|
|
9
|
-
function hlmUIGenerator(tree, options) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const availablePrimitiveNames = [...Object.keys(availablePrimitives), 'collapsible', 'menubar', 'contextmenu'];
|
|
14
|
-
let response = { primitives: [] };
|
|
15
|
-
if (options.name && availablePrimitiveNames.includes(options.name)) {
|
|
16
|
-
response.primitives.push(options.name);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
response = yield (0, enquirer_1.prompt)({
|
|
20
|
-
type: 'multiselect',
|
|
21
|
-
required: true,
|
|
22
|
-
name: 'primitives',
|
|
23
|
-
message: 'Choose which primitives you want to copy',
|
|
24
|
-
choices: ['all', ...availablePrimitiveNames.sort()],
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
tasks.push(...(yield createPrimitiveLibraries(response, availablePrimitiveNames, availablePrimitives, tree, options)));
|
|
28
|
-
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
32
|
+
async function hlmUIGenerator(tree, options) {
|
|
33
|
+
const tasks = [];
|
|
34
|
+
const config = await (0, config_1.getOrCreateConfig)(tree, {
|
|
35
|
+
componentsPath: options.directory,
|
|
29
36
|
});
|
|
37
|
+
const availablePrimitives = await Promise.resolve().then(() => __importStar(require('./supported-ui-libraries.json')));
|
|
38
|
+
const availablePrimitiveNames = [...Object.keys(availablePrimitives), 'collapsible', 'menubar', 'contextmenu'];
|
|
39
|
+
let response = { primitives: [] };
|
|
40
|
+
if (options.name && availablePrimitiveNames.includes(options.name)) {
|
|
41
|
+
response.primitives.push(options.name);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
response = await (0, enquirer_1.prompt)({
|
|
45
|
+
type: 'multiselect',
|
|
46
|
+
required: true,
|
|
47
|
+
name: 'primitives',
|
|
48
|
+
message: 'Choose which primitives you want to copy',
|
|
49
|
+
choices: ['all', ...availablePrimitiveNames.sort()],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
tasks.push(...(await createPrimitiveLibraries(response, availablePrimitiveNames, availablePrimitives, tree, options, config)));
|
|
53
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
30
54
|
}
|
|
31
|
-
function createPrimitiveLibraries(response, availablePrimitiveNames, availablePrimitives, tree, options) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (primitivesToCreate.length === 1 && primitivesToCreate[0] === 'collapsible') {
|
|
44
|
-
return tasks;
|
|
45
|
-
}
|
|
46
|
-
// Use Promise.all() to handle parallel execution of primitive library creation tasks
|
|
47
|
-
const installTasks = yield Promise.all(primitivesToCreate.map((primitiveName) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
if (primitiveName === 'collapsible')
|
|
49
|
-
return;
|
|
50
|
-
const internalName = availablePrimitives[primitiveName].internalName;
|
|
51
|
-
const peerDependencies = availablePrimitives[primitiveName].peerDependencies;
|
|
52
|
-
const { generator } = yield Promise.resolve(`${
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
`./libs/${internalName}/generator`}`).then(s => require(s));
|
|
56
|
-
return generator(tree, {
|
|
57
|
-
internalName: '',
|
|
58
|
-
publicName: '',
|
|
59
|
-
primitiveName: '',
|
|
60
|
-
peerDependencies,
|
|
61
|
-
skipBrainDependencies: options.skipBrainDependencies,
|
|
62
|
-
directory: options.directory,
|
|
63
|
-
tags: options.tags,
|
|
64
|
-
rootProject: options.rootProject,
|
|
65
|
-
angularCli: options.angularCli,
|
|
66
|
-
});
|
|
67
|
-
})));
|
|
68
|
-
tasks.push(...installTasks.filter(Boolean));
|
|
55
|
+
async function createPrimitiveLibraries(response, availablePrimitiveNames, availablePrimitives, tree, options, config) {
|
|
56
|
+
const allPrimitivesSelected = response.primitives.includes('all');
|
|
57
|
+
const primitivesToCreate = allPrimitivesSelected ? availablePrimitiveNames : response.primitives;
|
|
58
|
+
const tasks = [];
|
|
59
|
+
if (!response.primitives.includes('all')) {
|
|
60
|
+
await (0, add_dependent_primitive_1.addDependentPrimitives)(primitivesToCreate);
|
|
61
|
+
}
|
|
62
|
+
await replaceContextAndMenuBar(primitivesToCreate, allPrimitivesSelected);
|
|
63
|
+
if (primitivesToCreate.includes('collapsible')) {
|
|
64
|
+
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, { '@spartan-ng/ui-collapsible-brain': versions_1.SPARTAN_COLLAPSIBLE_BRAIN_VERSION }, {}));
|
|
65
|
+
}
|
|
66
|
+
if (primitivesToCreate.length === 1 && primitivesToCreate[0] === 'collapsible') {
|
|
69
67
|
return tasks;
|
|
70
|
-
}
|
|
68
|
+
}
|
|
69
|
+
// Use Promise.all() to handle parallel execution of primitive library creation tasks
|
|
70
|
+
const installTasks = await Promise.all(primitivesToCreate.map(async (primitiveName) => {
|
|
71
|
+
if (primitiveName === 'collapsible')
|
|
72
|
+
return;
|
|
73
|
+
const internalName = availablePrimitives[primitiveName].internalName;
|
|
74
|
+
const peerDependencies = availablePrimitives[primitiveName].peerDependencies;
|
|
75
|
+
const { generator } = await Promise.resolve(`${
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
`./libs/${internalName}/generator`}`).then(s => __importStar(require(s)));
|
|
79
|
+
return generator(tree, {
|
|
80
|
+
internalName: '',
|
|
81
|
+
publicName: '',
|
|
82
|
+
primitiveName: '',
|
|
83
|
+
peerDependencies,
|
|
84
|
+
skipBrainDependencies: options.skipBrainDependencies,
|
|
85
|
+
directory: options.directory ?? config.componentsPath,
|
|
86
|
+
tags: options.tags,
|
|
87
|
+
rootProject: options.rootProject,
|
|
88
|
+
angularCli: options.angularCli,
|
|
89
|
+
});
|
|
90
|
+
}));
|
|
91
|
+
tasks.push(...installTasks.filter(Boolean));
|
|
92
|
+
return tasks;
|
|
71
93
|
}
|
|
72
|
-
const replaceContextAndMenuBar =
|
|
94
|
+
const replaceContextAndMenuBar = async (primtivesToCreate, silent = false) => {
|
|
73
95
|
const contextIndex = primtivesToCreate.indexOf('contextmenu');
|
|
74
96
|
if (contextIndex >= 0) {
|
|
75
97
|
if (!silent) {
|
|
76
|
-
|
|
98
|
+
await (0, enquirer_1.prompt)({
|
|
77
99
|
type: 'confirm',
|
|
78
100
|
name: 'contextMenu',
|
|
79
101
|
message: 'The context menu is implemented as part of the menu-helm primitive. Adding menu primitive.',
|
|
@@ -84,7 +106,7 @@ const replaceContextAndMenuBar = (primtivesToCreate_1, ...args_1) => tslib_1.__a
|
|
|
84
106
|
const menubarIndex = primtivesToCreate.indexOf('menubar');
|
|
85
107
|
if (menubarIndex >= 0) {
|
|
86
108
|
if (!silent) {
|
|
87
|
-
|
|
109
|
+
await (0, enquirer_1.prompt)({
|
|
88
110
|
type: 'confirm',
|
|
89
111
|
name: 'menubar',
|
|
90
112
|
message: 'The menubar is implemented as part of the menu-helm primitive. Adding menu primitive.',
|
|
@@ -92,5 +114,5 @@ const replaceContextAndMenuBar = (primtivesToCreate_1, ...args_1) => tslib_1.__a
|
|
|
92
114
|
}
|
|
93
115
|
primtivesToCreate.splice(menubarIndex, 1);
|
|
94
116
|
}
|
|
95
|
-
}
|
|
117
|
+
};
|
|
96
118
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/ui/generator.ts"],"names":[],"mappings":"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"}
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
import { Directive, computed,
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { lucideChevronDown } from '@ng-icons/lucide';
|
|
3
3
|
import { hlm } from '@spartan-ng/ui-core';
|
|
4
|
-
import {
|
|
4
|
+
import { provideHlmIconConfig, provideIcons } from '@spartan-ng/ui-icon-helm';
|
|
5
5
|
import type { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
@Directive({
|
|
8
8
|
selector: 'hlm-icon[hlmAccordionIcon], hlm-icon[hlmAccIcon]',
|
|
9
9
|
standalone: true,
|
|
10
|
-
providers: [provideIcons({ lucideChevronDown })],
|
|
10
|
+
providers: [provideIcons({ lucideChevronDown }), provideHlmIconConfig({ name: 'lucideChevronDown', size: 'none' })],
|
|
11
11
|
host: {
|
|
12
12
|
'[class]': '_computedClass()',
|
|
13
13
|
},
|
|
14
14
|
})
|
|
15
15
|
export class HlmAccordionIconDirective {
|
|
16
|
-
private readonly _hlmIcon = inject(HlmIconComponent);
|
|
17
|
-
|
|
18
16
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
19
17
|
protected _computedClass = computed(() =>
|
|
20
18
|
hlm('inline-block h-4 w-4 transition-transform [animation-duration:200]', this.userClass()),
|
|
21
19
|
);
|
|
22
|
-
|
|
23
|
-
constructor() {
|
|
24
|
-
this._hlmIcon.size = 'none';
|
|
25
|
-
this._hlmIcon.name = 'lucideChevronDown';
|
|
26
|
-
}
|
|
27
20
|
}
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template
CHANGED
|
@@ -16,6 +16,6 @@ export class HlmAccordionDirective {
|
|
|
16
16
|
|
|
17
17
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
18
|
protected readonly _computedClass = computed(() =>
|
|
19
|
-
hlm('flex', this._brn.orientation === 'horizontal' ? 'flex-row' : 'flex-col', this.userClass()),
|
|
19
|
+
hlm('flex', this._brn.orientation() === 'horizontal' ? 'flex-row' : 'flex-col', this.userClass()),
|
|
20
20
|
);
|
|
21
21
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
2
|
+
import type { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
3
3
|
export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generator = generator;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const generator_1 = require("../../../base/generator");
|
|
6
|
-
function generator(tree, options) {
|
|
7
|
-
return
|
|
8
|
-
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("../../../base/generator"));
|
|
6
|
+
async function generator(tree, options) {
|
|
7
|
+
return await (0, generator_1.default)(tree, {
|
|
8
|
+
...options,
|
|
9
|
+
primitiveName: 'accordion',
|
|
10
|
+
internalName: 'ui-accordion-helm',
|
|
11
|
+
publicName: 'ui-accordion-helm',
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-accordion-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-accordion-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;AAVD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE;QACnC,GAAG,OAAO;QACV,aAAa,EAAE,WAAW;QAC1B,YAAY,EAAE,mBAAmB;QACjC,UAAU,EAAE,mBAAmB;KAC/B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Directive, computed,
|
|
2
|
-
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
|
+
import { HlmButtonDirective, provideBrnButtonConfig } from '@spartan-ng/ui-button-helm';
|
|
3
3
|
import { hlm } from '@spartan-ng/ui-core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
@@ -7,17 +7,12 @@ import type { ClassValue } from 'clsx';
|
|
|
7
7
|
selector: 'button[hlmAlertDialogCancel]',
|
|
8
8
|
standalone: true,
|
|
9
9
|
hostDirectives: [HlmButtonDirective],
|
|
10
|
+
providers: [provideBrnButtonConfig({ variant: 'outline' })],
|
|
10
11
|
host: {
|
|
11
12
|
'[class]': '_computedClass()',
|
|
12
13
|
},
|
|
13
14
|
})
|
|
14
15
|
export class HlmAlertDialogCancelButtonDirective {
|
|
15
|
-
private readonly _hlmBtn = inject(HlmButtonDirective, { host: true });
|
|
16
|
-
|
|
17
16
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
17
|
protected readonly _computedClass = computed(() => hlm('mt-2 sm:mt-0', this.userClass()));
|
|
19
|
-
|
|
20
|
-
constructor() {
|
|
21
|
-
this._hlmBtn.variant = 'outline';
|
|
22
|
-
}
|
|
23
18
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
2
|
+
import type { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
3
3
|
export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generator = generator;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const generator_1 = require("../../../base/generator");
|
|
6
|
-
function generator(tree, options) {
|
|
7
|
-
return
|
|
8
|
-
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("../../../base/generator"));
|
|
6
|
+
async function generator(tree, options) {
|
|
7
|
+
return await (0, generator_1.default)(tree, {
|
|
8
|
+
...options,
|
|
9
|
+
primitiveName: 'alertdialog',
|
|
10
|
+
internalName: 'ui-alert-dialog-helm',
|
|
11
|
+
publicName: 'ui-alertdialog-helm',
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-alert-dialog-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-alert-dialog-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;AAVD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE;QACnC,GAAG,OAAO;QACV,aAAa,EAAE,aAAa;QAC5B,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,qBAAqB;KACjC,CAAC,CAAC;AACJ,CAAC"}
|
package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template
CHANGED
|
@@ -17,5 +17,5 @@ export type AlertDescriptionVariants = VariantProps<typeof alertDescriptionVaria
|
|
|
17
17
|
})
|
|
18
18
|
export class HlmAlertDescriptionDirective {
|
|
19
19
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
20
|
-
protected _computedClass = computed(() => hlm(alertDescriptionVariants(), this.userClass()));
|
|
20
|
+
protected readonly _computedClass = computed(() => hlm(alertDescriptionVariants(), this.userClass()));
|
|
21
21
|
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { Directive
|
|
2
|
-
import {
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import { provideHlmIconConfig } from '@spartan-ng/ui-icon-helm';
|
|
3
3
|
|
|
4
4
|
@Directive({
|
|
5
5
|
selector: '[hlmAlertIcon]',
|
|
6
6
|
standalone: true,
|
|
7
|
+
providers: [provideHlmIconConfig({ size: 'sm' })],
|
|
7
8
|
})
|
|
8
|
-
export class HlmAlertIconDirective {
|
|
9
|
-
private _icon = inject(HlmIconComponent, { host: true, optional: true });
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
if (!this._icon) return;
|
|
13
|
-
this._icon.size = 'sm';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
9
|
+
export class HlmAlertIconDirective {}
|
package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template
CHANGED
|
@@ -17,5 +17,5 @@ export type AlertTitleVariants = VariantProps<typeof alertTitleVariants>;
|
|
|
17
17
|
})
|
|
18
18
|
export class HlmAlertTitleDirective {
|
|
19
19
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
20
|
-
protected _computedClass = computed(() => hlm(alertTitleVariants(), this.userClass()));
|
|
20
|
+
protected readonly _computedClass = computed(() => hlm(alertTitleVariants(), this.userClass()));
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '@spartan-ng/ui-core';
|
|
3
3
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
@@ -10,7 +10,7 @@ export const alertVariants = cva(
|
|
|
10
10
|
variant: {
|
|
11
11
|
default: 'bg-background text-foreground',
|
|
12
12
|
destructive:
|
|
13
|
-
'text-destructive border-destructive/50 dark:border-destructive [&>[hlmAlertIcon]]:text-destructive
|
|
13
|
+
'text-destructive border-destructive/50 dark:border-destructive [&>[hlmAlertIcon]]:text-destructive',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
@@ -30,11 +30,7 @@ export type AlertVariants = VariantProps<typeof alertVariants>;
|
|
|
30
30
|
})
|
|
31
31
|
export class HlmAlertDirective {
|
|
32
32
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
33
|
-
protected _computedClass = computed(() => hlm(alertVariants({ variant: this.
|
|
33
|
+
protected readonly _computedClass = computed(() => hlm(alertVariants({ variant: this.variant() }), this.userClass()));
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
@Input()
|
|
37
|
-
set variant(variant: AlertVariants['variant']) {
|
|
38
|
-
this._variant.set(variant);
|
|
39
|
-
}
|
|
35
|
+
public readonly variant = input<AlertVariants['variant']>('default');
|
|
40
36
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
2
|
+
import type { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
3
3
|
export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generator = generator;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const generator_1 = require("../../../base/generator");
|
|
6
|
-
function generator(tree, options) {
|
|
7
|
-
return
|
|
8
|
-
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("../../../base/generator"));
|
|
6
|
+
async function generator(tree, options) {
|
|
7
|
+
return await (0, generator_1.default)(tree, {
|
|
8
|
+
...options,
|
|
9
|
+
primitiveName: 'alert',
|
|
10
|
+
internalName: 'ui-alert-helm',
|
|
11
|
+
publicName: 'ui-alert-helm',
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-alert-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-alert-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;AAVD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE;QACnC,GAAG,OAAO;QACV,aAAa,EAAE,OAAO;QACtB,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,eAAe;KAC3B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -9,13 +9,14 @@ import { HlmAspectRatioDirective } from './helm-aspect-ratio.directive';
|
|
|
9
9
|
template: `
|
|
10
10
|
<div [hlmAspectRatio]="ratio">
|
|
11
11
|
<img
|
|
12
|
+
alt="Sample image"
|
|
12
13
|
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIpQBKci6KEg9Q6H9kovIHoCIVQJJCKE1ENFjnAgcaSGC6rEnxBwA04Tx43t2FnvDAfjkNibxgHxnWb2e/u992bee7tCa00YFsffekFY+nUzFtjW0LrvjRXrCDIAaPLlW0nHL0SsZtVoaF98mLrx3pdhOqLtYPHChahZcYYO7KvPFxvRl5XPp1sN3adWiD1ZAqD6XYK1b/dvE5IWryTt2udLFedwc1+9kLp+vbbpoDh+6TklxBeAi9TL0taeWpdmZzQDry0AcO+jQ12RyohqqoYoo8RDwJrU+qXkjWtfi8Xxt58BdQuwQs9qC/afLwCw8tnQbqYAPsgxE1S6F3EAIXux2oQFKm0ihMsOF71dHYx+f3NND68ghCu1YIoePPQN1pGRABkJ6Bus96CutRZMydTl+TvuiRW1m3n0eDl0vRPcEysqdXn+jsQPsrHMquGeXEaY4Yk4wxWcY5V/9scqOMOVUFthatyTy8QyqwZ+kDURKoMWxNKr2EeqVKcTNOajqKoBgOE28U4tdQl5p5bwCw7BWquaZSzAPlwjlithJtp3pTImSqQRrb2Z8PHGigD4RZuNX6JYj6wj7O4TFLbCO/Mn/m8R+h6rYSUb3ekokRY6f/YukArN979jcW+V/S8g0eT/N3VN3kTqWbQ428m9/8k0P/1aIhF36PccEl6EhOcAUCrXKZXXWS3XKd2vc/TRBG9O5ELC17MmWubD2nKhUKZa26Ba2+D3P+4/MNCFwg59oWVeYhkzgN/JDR8deKBoD7Y+ljEjGZ0sosXVTvbc6RHirr2reNy1OXd6pJsQ+gqjk8VWFYmHrwBzW/n+uMPFiRwHB2I7ih8ciHFxIkd/3Omk5tCDV1t+2nNu5sxxpDFNx+huNhVT3/zMDz8usXC3ddaHBj1GHj/As08fwTS7Kt1HBTmyN29vdwAw+/wbwLVOJ3uAD1wi/dUH7Qei66PfyuRj4Ik9is+hglfbkbfR3cnZm7chlUWLdwmprtCohX4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII="
|
|
13
14
|
/>
|
|
14
15
|
</div>
|
|
15
16
|
`,
|
|
16
17
|
})
|
|
17
18
|
class MockComponent {
|
|
18
|
-
ratio: number | undefined = 16 / 9;
|
|
19
|
+
public ratio: number | undefined = 16 / 9;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
describe('HelmAspectRatioDirective', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type NumberInput, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import { type AfterViewInit, Directive, ElementRef,
|
|
2
|
+
import { type AfterViewInit, Directive, ElementRef, computed, inject, input } from '@angular/core';
|
|
3
3
|
import { hlm } from '@spartan-ng/ui-core';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
@@ -20,22 +20,20 @@ const parseDividedString = (value: NumberInput): NumberInput => {
|
|
|
20
20
|
},
|
|
21
21
|
})
|
|
22
22
|
export class HlmAspectRatioDirective implements AfterViewInit {
|
|
23
|
-
private readonly
|
|
24
|
-
private readonly _el: HTMLElement = inject(ElementRef).nativeElement;
|
|
23
|
+
private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
public readonly ratio = input(1, {
|
|
26
|
+
alias: 'hlmAspectRatio',
|
|
27
|
+
transform: (value: NumberInput) => {
|
|
28
|
+
const coerced = coerceNumberProperty(parseDividedString(value));
|
|
29
|
+
return coerced <= 0 ? 1 : coerced;
|
|
30
|
+
},
|
|
28
31
|
});
|
|
32
|
+
protected readonly _computedPaddingBottom = computed(() => `${100 / this.ratio()}%`);
|
|
29
33
|
|
|
30
34
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
31
35
|
protected readonly _computedClass = computed(() => hlm('relative w-full', this.userClass()));
|
|
32
36
|
|
|
33
|
-
@Input()
|
|
34
|
-
set hlmAspectRatio(value: NumberInput) {
|
|
35
|
-
const coerced = coerceNumberProperty(parseDividedString(value));
|
|
36
|
-
this._ratio.set(coerced <= 0 ? 1 : coerced);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
37
|
ngAfterViewInit() {
|
|
40
38
|
// support delayed addition of image to dom
|
|
41
39
|
const child = this._el.firstElementChild;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
2
|
+
import type { HlmBaseGeneratorSchema } from '../../../base/schema';
|
|
3
3
|
export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generator = generator;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const generator_1 = require("../../../base/generator");
|
|
6
|
-
function generator(tree, options) {
|
|
7
|
-
return
|
|
8
|
-
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("../../../base/generator"));
|
|
6
|
+
async function generator(tree, options) {
|
|
7
|
+
return await (0, generator_1.default)(tree, {
|
|
8
|
+
...options,
|
|
9
|
+
primitiveName: 'aspectratio',
|
|
10
|
+
internalName: 'ui-aspect-ratio-helm',
|
|
11
|
+
publicName: 'ui-aspectratio-helm',
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-aspect-ratio-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-aspect-ratio-helm/generator.ts"],"names":[],"mappings":";;AAIA,8BAOC;;AAVD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE;QACnC,GAAG,OAAO;QACV,aAAa,EAAE,aAAa;QAC5B,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,qBAAqB;KACjC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -12,8 +12,8 @@ import { HlmAvatarFallbackDirective } from './hlm-avatar-fallback.directive';
|
|
|
12
12
|
`,
|
|
13
13
|
})
|
|
14
14
|
class HlmMockComponent {
|
|
15
|
-
userCls = '';
|
|
16
|
-
autoColor = false;
|
|
15
|
+
public userCls = '';
|
|
16
|
+
public autoColor = false;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
describe('HlmAvatarFallbackDirective', () => {
|
|
@@ -20,7 +20,7 @@ import { hlm } from '@spartan-ng/ui-core';
|
|
|
20
20
|
export class HlmAvatarFallbackDirective {
|
|
21
21
|
private readonly _brn = inject(BrnAvatarFallbackDirective);
|
|
22
22
|
private readonly _hex = computed(() => {
|
|
23
|
-
if (!this._brn.
|
|
23
|
+
if (!this._brn.autoColor() || !this._brn.getTextContent()) return;
|
|
24
24
|
return hexColorFor(this._brn.getTextContent());
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -34,7 +34,7 @@ export class HlmAvatarFallbackDirective {
|
|
|
34
34
|
return hlm(
|
|
35
35
|
'flex h-full w-full items-center justify-center rounded-full',
|
|
36
36
|
this._autoColorTextCls() ?? 'bg-muted',
|
|
37
|
-
this._brn?.
|
|
37
|
+
this._brn?.userClass(),
|
|
38
38
|
);
|
|
39
39
|
});
|
|
40
40
|
}
|
package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template
CHANGED
|
@@ -14,7 +14,7 @@ import { HlmAvatarComponent } from './hlm-avatar.component';
|
|
|
14
14
|
standalone: true,
|
|
15
15
|
})
|
|
16
16
|
class MockComponent {
|
|
17
|
-
@Input() class = '';
|
|
17
|
+
@Input() public class = '';
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
describe('HlmAvatarComponent', () => {
|
|
@@ -44,13 +44,13 @@ describe('HlmAvatarComponent', () => {
|
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
it('should change the size when the variant is changed', () => {
|
|
47
|
-
|
|
47
|
+
fixture.componentRef.setInput('variant', 'small');
|
|
48
48
|
fixture.detectChanges();
|
|
49
49
|
expect(fixture.nativeElement.className).toContain('h-6');
|
|
50
50
|
expect(fixture.nativeElement.className).toContain('w-6');
|
|
51
51
|
expect(fixture.nativeElement.className).toContain('text-xs');
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
fixture.componentRef.setInput('variant', 'large');
|
|
54
54
|
fixture.detectChanges();
|
|
55
55
|
expect(fixture.nativeElement.className).toContain('h-14');
|
|
56
56
|
expect(fixture.nativeElement.className).toContain('w-14');
|