@spartan-ng/cli 0.0.1-alpha.508 → 0.0.1-alpha.510
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 +3 -2
- package/src/generators/base/generator.js +1 -1
- package/src/generators/base/generator.js.map +1 -1
- package/src/generators/base/lib/initialize-angular-library.d.ts +1 -1
- package/src/generators/base/lib/initialize-angular-library.js +2 -2
- package/src/generators/base/lib/initialize-angular-library.js.map +1 -1
- package/src/generators/base/schema.d.ts +1 -0
- package/src/generators/migrate-helm-libraries/generator.js +10 -4
- package/src/generators/migrate-helm-libraries/generator.js.map +1 -1
- package/src/generators/migrate-helm-libraries/schema.d.ts +1 -0
- package/src/generators/ui/generator.d.ts +1 -0
- package/src/generators/ui/generator.js +2 -0
- package/src/generators/ui/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.ts.template +2 -2
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.ts.template +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-action-button.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-icon.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.ts.template +1 -1
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.ts.template +1 -1
- package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.ts.template +1 -1
- package/src/generators/ui/libs/ui-autocomplete-helm/files/index.ts.template +36 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-empty.ts.template +14 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-group.ts.template +27 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-item.ts.template +33 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-list.ts.template +27 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-search-input.ts.template +26 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-search.ts.template +28 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-trigger.ts.template +32 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete.token.ts.template +23 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete.ts.template +286 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/generator.js +14 -0
- package/src/generators/ui/libs/ui-autocomplete-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.ts.template +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.ts.template +1 -1
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.ts.template +1 -1
- package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-ellipsis.ts.template +2 -2
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-link.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-list.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-page.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-separator.ts.template +1 -1
- package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb.ts.template +1 -1
- package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.ts.template +1 -1
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.ts.template +3 -3
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-range.ts.template +3 -3
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.ts.template +3 -3
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-action.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.ts.template +1 -1
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.ts.template +3 -3
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.ts.template +3 -3
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.ts.template +1 -1
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.ts.template +1 -1
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.ts.template +2 -2
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group-label.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-icon.ts.template +2 -2
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.ts.template +4 -16
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search-input.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-search.ts.template +4 -4
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-separator.ts.template +3 -3
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.ts.template +1 -1
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.ts.template +3 -3
- package/src/generators/ui/libs/ui-date-picker-helm/files/index.ts.template +1 -0
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.token.ts.template +1 -1
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template +21 -11
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.ts.template +17 -7
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template +21 -11
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.ts.template +2 -2
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.ts.template +1 -1
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.ts.template +1 -1
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-error.ts.template +1 -1
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.ts.template +1 -1
- package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-hint.ts.template +1 -1
- package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-group.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-separator.ts.template +2 -2
- package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp-slot.ts.template +1 -1
- package/src/generators/ui/libs/ui-input-otp-helm/files/lib/hlm-input-otp.ts.template +1 -1
- package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.ts.template +2 -2
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.ts.template +2 -2
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio-indicator.ts.template +2 -2
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.ts.template +2 -2
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.ts.template +1 -1
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination-query-params.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.ts.template +2 -2
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.ts.template +2 -2
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.ts.template +3 -3
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.ts.template +3 -3
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.ts.template +1 -1
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.ts.template +1 -1
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.ts.template +1 -1
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.ts.template +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.ts.template +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.ts.template +1 -1
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.ts.template +1 -1
- package/src/generators/ui/libs/ui-scroll-area-helm/files/lib/hlm-scroll-area.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.ts.template +2 -2
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.ts.template +2 -2
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.ts.template +2 -2
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.ts.template +2 -2
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.ts.template +1 -1
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.ts.template +1 -1
- package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.ts.template +2 -2
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.ts.template +1 -1
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.ts.template +1 -1
- package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.ts.template +1 -1
- package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.ts.template +1 -1
- package/src/generators/ui/libs/ui-sonner-helm/files/lib/hlm-toaster.ts.template +1 -1
- package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.ts.template +1 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.ts.template +1 -1
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.ts.template +1 -1
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.ts.template +3 -3
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.ts.template +1 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.ts.template +1 -1
- package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-group.ts.template +1 -1
- package/src/generators/ui/libs/ui-toggle-group-helm/files/lib/hlm-toggle-item.ts.template +1 -1
- package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.ts.template +1 -1
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.ts.template +1 -1
- package/src/generators/ui/primitive-deps.js +3 -0
- package/src/generators/ui/primitive-deps.js.map +1 -1
- package/src/generators/ui/primitives.d.ts +1 -1
- package/src/generators/ui/supported-ui-libraries.json +40 -28
- package/src/utils/config.d.ts +18 -6
- package/src/utils/config.js +49 -3
- package/src/utils/config.js.map +1 -1
package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete-trigger.ts.template
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { booleanAttribute, Directive, ElementRef, inject, input } from '@angular/core';
|
|
3
|
+
import { BrnDialog } from '@spartan-ng/brain/dialog';
|
|
4
|
+
|
|
5
|
+
@Directive({
|
|
6
|
+
selector: '[hlmAutocompleteTrigger]',
|
|
7
|
+
host: {
|
|
8
|
+
'(click)': 'open()',
|
|
9
|
+
},
|
|
10
|
+
})
|
|
11
|
+
export class HlmAutocompleteTrigger {
|
|
12
|
+
private readonly _host = inject(ElementRef, { host: true });
|
|
13
|
+
|
|
14
|
+
private readonly _brnDialog = inject(BrnDialog, { optional: true });
|
|
15
|
+
|
|
16
|
+
/** Whether the trigger is disabled. */
|
|
17
|
+
public readonly disabledTrigger = input<boolean, BooleanInput>(false, {
|
|
18
|
+
transform: booleanAttribute,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
if (!this._brnDialog) return;
|
|
23
|
+
|
|
24
|
+
this._brnDialog.mutableAttachTo.set(this._host.nativeElement);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
open() {
|
|
28
|
+
if (this.disabledTrigger()) return;
|
|
29
|
+
|
|
30
|
+
this._brnDialog?.open();
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/generators/ui/libs/ui-autocomplete-helm/files/lib/hlm-autocomplete.token.ts.template
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { inject, InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
export type TransformValueToString<T> = (value: T) => string;
|
|
4
|
+
|
|
5
|
+
export interface HlmAutocompleteConfig<T> {
|
|
6
|
+
transformValueToSearch: TransformValueToString<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function getDefaultConfig<T>(): HlmAutocompleteConfig<T> {
|
|
10
|
+
return {
|
|
11
|
+
transformValueToSearch: (value: T) => (typeof value === 'string' ? value : String(value)),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const HlmAutocompleteConfigToken = new InjectionToken<HlmAutocompleteConfig<unknown>>('HlmAutocompleteConfig');
|
|
16
|
+
|
|
17
|
+
export function provideHlmAutocompleteConfig<T>(config: Partial<HlmAutocompleteConfig<T>>): ValueProvider {
|
|
18
|
+
return { provide: HlmAutocompleteConfigToken, useValue: { ...getDefaultConfig(), ...config } };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function injectHlmAutocompleteConfig<T>(): HlmAutocompleteConfig<T> {
|
|
22
|
+
return inject(HlmAutocompleteConfigToken, { optional: true }) ?? getDefaultConfig();
|
|
23
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
+
import {
|
|
4
|
+
booleanAttribute,
|
|
5
|
+
ChangeDetectionStrategy,
|
|
6
|
+
Component,
|
|
7
|
+
computed,
|
|
8
|
+
ElementRef,
|
|
9
|
+
forwardRef,
|
|
10
|
+
inject,
|
|
11
|
+
input,
|
|
12
|
+
linkedSignal,
|
|
13
|
+
output,
|
|
14
|
+
TemplateRef,
|
|
15
|
+
viewChild,
|
|
16
|
+
} from '@angular/core';
|
|
17
|
+
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
18
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
19
|
+
import { lucideChevronDown, lucideSearch } from '@ng-icons/lucide';
|
|
20
|
+
import { BrnAutocomplete, BrnAutocompleteEmpty } from '@spartan-ng/brain/autocomplete';
|
|
21
|
+
import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
|
|
22
|
+
import { BrnPopover, BrnPopoverContent } from '@spartan-ng/brain/popover';
|
|
23
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
24
|
+
import { HlmPopoverContent } from '<%- importAlias %>/popover';
|
|
25
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
26
|
+
import type { ClassValue } from 'clsx';
|
|
27
|
+
import { HlmAutocompleteEmpty } from './hlm-autocomplete-empty';
|
|
28
|
+
import { HlmAutocompleteGroup } from './hlm-autocomplete-group';
|
|
29
|
+
import { HlmAutocompleteItem } from './hlm-autocomplete-item';
|
|
30
|
+
import { HlmAutocompleteList } from './hlm-autocomplete-list';
|
|
31
|
+
import { HlmAutocompleteSearch } from './hlm-autocomplete-search';
|
|
32
|
+
import { HlmAutocompleteSearchInput } from './hlm-autocomplete-search-input';
|
|
33
|
+
import { HlmAutocompleteTrigger } from './hlm-autocomplete-trigger';
|
|
34
|
+
import { injectHlmAutocompleteConfig } from './hlm-autocomplete.token';
|
|
35
|
+
|
|
36
|
+
export const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
37
|
+
provide: NG_VALUE_ACCESSOR,
|
|
38
|
+
useExisting: forwardRef(() => HlmAutocomplete),
|
|
39
|
+
multi: true,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
selector: 'hlm-autocomplete',
|
|
44
|
+
imports: [
|
|
45
|
+
NgTemplateOutlet,
|
|
46
|
+
|
|
47
|
+
BrnPopover,
|
|
48
|
+
BrnPopoverContent,
|
|
49
|
+
HlmPopoverContent,
|
|
50
|
+
|
|
51
|
+
BrnAutocomplete,
|
|
52
|
+
BrnAutocompleteEmpty,
|
|
53
|
+
HlmAutocompleteEmpty,
|
|
54
|
+
HlmAutocompleteGroup,
|
|
55
|
+
HlmAutocompleteItem,
|
|
56
|
+
HlmAutocompleteList,
|
|
57
|
+
HlmAutocompleteSearch,
|
|
58
|
+
HlmAutocompleteSearchInput,
|
|
59
|
+
HlmAutocompleteTrigger,
|
|
60
|
+
|
|
61
|
+
NgIcon,
|
|
62
|
+
HlmIcon,
|
|
63
|
+
],
|
|
64
|
+
providers: [HLM_AUTOCOMPLETE_VALUE_ACCESSOR, provideIcons({ lucideSearch, lucideChevronDown })],
|
|
65
|
+
template: `
|
|
66
|
+
<brn-popover
|
|
67
|
+
#popover
|
|
68
|
+
align="start"
|
|
69
|
+
autoFocus="first-heading"
|
|
70
|
+
sideOffset="5"
|
|
71
|
+
closeDelay="100"
|
|
72
|
+
[closeOnOutsidePointerEvents]="true"
|
|
73
|
+
>
|
|
74
|
+
<div brnAutocomplete>
|
|
75
|
+
<hlm-autocomplete-search hlmAutocompleteTrigger [disabledTrigger]="!_search()">
|
|
76
|
+
<ng-icon name="lucideSearch" hlm />
|
|
77
|
+
<input
|
|
78
|
+
#input
|
|
79
|
+
type="text"
|
|
80
|
+
autocomplete="off"
|
|
81
|
+
hlm-autocomplete-search-input
|
|
82
|
+
[id]="inputId()"
|
|
83
|
+
[placeholder]="searchPlaceholderText()"
|
|
84
|
+
[disabled]="_disabled()"
|
|
85
|
+
[value]="_search()"
|
|
86
|
+
(input)="_onSearchChanged($event)"
|
|
87
|
+
(keydown.arrowDown)="_openPopover()"
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
<button
|
|
91
|
+
class="flex items-center justify-center outline-none disabled:cursor-not-allowed [&>_ng-icon]:opacity-50"
|
|
92
|
+
tabindex="-1"
|
|
93
|
+
type="button"
|
|
94
|
+
[attr.aria-label]="ariaLabelToggleButton()"
|
|
95
|
+
[disabled]="_disabled()"
|
|
96
|
+
(click)="_toggleOptions()"
|
|
97
|
+
>
|
|
98
|
+
<ng-icon name="lucideChevronDown" hlm />
|
|
99
|
+
</button>
|
|
100
|
+
</hlm-autocomplete-search>
|
|
101
|
+
|
|
102
|
+
<div
|
|
103
|
+
*brnPopoverContent="let ctx"
|
|
104
|
+
hlmPopoverContent
|
|
105
|
+
class="p-0"
|
|
106
|
+
[style.width.px]="_elementRef.nativeElement.offsetWidth"
|
|
107
|
+
>
|
|
108
|
+
<hlm-autocomplete-list
|
|
109
|
+
[class]="_computedAutocompleteListClass()"
|
|
110
|
+
[class.hidden]="filteredOptions().length === 0"
|
|
111
|
+
>
|
|
112
|
+
<hlm-autocomplete-group>
|
|
113
|
+
@for (option of filteredOptions(); track option) {
|
|
114
|
+
<button hlm-autocomplete-item [value]="option" (selected)="_optionSelected(option)">
|
|
115
|
+
@if (optionTemplate(); as optionTemplate) {
|
|
116
|
+
<ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: option }" />
|
|
117
|
+
} @else {
|
|
118
|
+
{{ option }}
|
|
119
|
+
}
|
|
120
|
+
</button>
|
|
121
|
+
}
|
|
122
|
+
</hlm-autocomplete-group>
|
|
123
|
+
</hlm-autocomplete-list>
|
|
124
|
+
|
|
125
|
+
<div *brnAutocompleteEmpty hlmAutocompleteEmpty [class]="_computedAutocompleteEmptyClass()">
|
|
126
|
+
@if (loading()) {
|
|
127
|
+
<ng-content select="[loading]">{{ loadingText() }}</ng-content>
|
|
128
|
+
} @else {
|
|
129
|
+
<ng-content select="[empty]">{{ emptyText() }}</ng-content>
|
|
130
|
+
}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</brn-popover>
|
|
135
|
+
`,
|
|
136
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
137
|
+
host: {
|
|
138
|
+
'[class]': '_computedClass()',
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
export class HlmAutocomplete<T> implements ControlValueAccessor {
|
|
142
|
+
private static _id = 0;
|
|
143
|
+
private readonly _config = injectHlmAutocompleteConfig<T>();
|
|
144
|
+
|
|
145
|
+
private readonly _brnPopover = viewChild.required(BrnPopover);
|
|
146
|
+
private readonly _inputRef = viewChild.required('input', { read: ElementRef });
|
|
147
|
+
|
|
148
|
+
protected readonly _elementRef = inject(ElementRef<HTMLElement>);
|
|
149
|
+
|
|
150
|
+
/** The user defined class */
|
|
151
|
+
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
152
|
+
protected readonly _computedClass = computed(() => hlm('block w-full', this.userClass()));
|
|
153
|
+
|
|
154
|
+
/** Custom class for the autocomplete list. */
|
|
155
|
+
public readonly autocompleteListClass = input<ClassValue>('');
|
|
156
|
+
protected readonly _computedAutocompleteListClass = computed(() => hlm('', this.autocompleteListClass()));
|
|
157
|
+
|
|
158
|
+
/** Custom class for the empty and loading state container. */
|
|
159
|
+
public readonly autocompleteEmptyClass = input<ClassValue>('');
|
|
160
|
+
protected readonly _computedAutocompleteEmptyClass = computed(() => hlm('', this.autocompleteEmptyClass()));
|
|
161
|
+
|
|
162
|
+
/** The list of filtered options to display in the autocomplete. */
|
|
163
|
+
public readonly filteredOptions = input<T[]>([]);
|
|
164
|
+
|
|
165
|
+
/** The selected value. */
|
|
166
|
+
public readonly value = input<T>();
|
|
167
|
+
protected readonly _value = linkedSignal(() => this.value());
|
|
168
|
+
|
|
169
|
+
/** The search query. */
|
|
170
|
+
public readonly search = input<string>();
|
|
171
|
+
protected readonly _search = linkedSignal(() => this.search() || '');
|
|
172
|
+
|
|
173
|
+
/** Function to transform an option value to a search string. Defaults to identity function for strings. */
|
|
174
|
+
public readonly transformValueToSearch = input<(value: T) => string>(this._config.transformValueToSearch);
|
|
175
|
+
|
|
176
|
+
/** Optional template for rendering each option. */
|
|
177
|
+
public readonly optionTemplate = input<TemplateRef<HlmAutocompleteOption<T>>>();
|
|
178
|
+
|
|
179
|
+
/** Whether the autocomplete is in a loading state. */
|
|
180
|
+
public readonly loading = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
181
|
+
|
|
182
|
+
/** Placeholder text for the input field. */
|
|
183
|
+
public readonly searchPlaceholderText = input('Select an option');
|
|
184
|
+
|
|
185
|
+
/** Text to display when loading options. */
|
|
186
|
+
public readonly loadingText = input('Loading options...');
|
|
187
|
+
|
|
188
|
+
/** Text to display when no options are found. */
|
|
189
|
+
public readonly emptyText = input('No options found');
|
|
190
|
+
|
|
191
|
+
/** Aria label for the toggle button. */
|
|
192
|
+
public readonly ariaLabelToggleButton = input<string>('Toggle options');
|
|
193
|
+
|
|
194
|
+
/** The id of the input field. */
|
|
195
|
+
public readonly inputId = input<string>(`hlm-autocomplete-input-${++HlmAutocomplete._id}`);
|
|
196
|
+
|
|
197
|
+
/** Whether the autocomplete is disabled. */
|
|
198
|
+
public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
199
|
+
protected readonly _disabled = linkedSignal(() => this.disabled());
|
|
200
|
+
|
|
201
|
+
/** Emitted when the selected value changes. */
|
|
202
|
+
public readonly valueChange = output<T | null>();
|
|
203
|
+
|
|
204
|
+
/** Emitted when the search query changes. */
|
|
205
|
+
public readonly searchChange = output<string>();
|
|
206
|
+
|
|
207
|
+
protected _onChange?: ChangeFn<T | null>;
|
|
208
|
+
protected _onTouched?: TouchFn;
|
|
209
|
+
|
|
210
|
+
protected _setPopoverState(state: 'open' | 'closed') {
|
|
211
|
+
if (state === 'open') {
|
|
212
|
+
this._brnPopover().open();
|
|
213
|
+
} else {
|
|
214
|
+
this._brnPopover().close();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
protected _openPopover() {
|
|
219
|
+
if (this._search() || this.filteredOptions().length > 0) {
|
|
220
|
+
// only open if there's a search term or options to show
|
|
221
|
+
this._brnPopover().open();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
protected _toggleOptions() {
|
|
226
|
+
if (this._search() || this.filteredOptions().length > 0) {
|
|
227
|
+
// only toggle if there's a search term or options to show
|
|
228
|
+
const state = this._brnPopover().stateComputed();
|
|
229
|
+
this._setPopoverState(state === 'open' ? 'closed' : 'open');
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
this._inputRef().nativeElement.focus();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
protected _onSearchChanged(event: Event) {
|
|
236
|
+
const input = event.target as HTMLInputElement;
|
|
237
|
+
this._search.set(input.value);
|
|
238
|
+
this.searchChange.emit(input.value);
|
|
239
|
+
|
|
240
|
+
this._clearOption();
|
|
241
|
+
|
|
242
|
+
if (this._brnPopover().stateComputed() !== 'open' && input.value.length > 0) {
|
|
243
|
+
this._setPopoverState('open');
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
protected _clearOption() {
|
|
248
|
+
this._value.set(undefined);
|
|
249
|
+
this._onChange?.(null);
|
|
250
|
+
this.valueChange.emit(null);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
protected _optionSelected(option: T) {
|
|
254
|
+
this._value.set(option);
|
|
255
|
+
this._onChange?.(option);
|
|
256
|
+
this.valueChange.emit(option);
|
|
257
|
+
|
|
258
|
+
const searchValue = this.transformValueToSearch()(option);
|
|
259
|
+
|
|
260
|
+
this._search.set(searchValue);
|
|
261
|
+
this.searchChange.emit(searchValue);
|
|
262
|
+
|
|
263
|
+
this._setPopoverState('closed');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** CONTROL VALUE ACCESSOR */
|
|
267
|
+
public writeValue(value: T | null): void {
|
|
268
|
+
this._value.set(value ? value : undefined);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
public registerOnChange(fn: ChangeFn<T | null>): void {
|
|
272
|
+
this._onChange = fn;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
public registerOnTouched(fn: TouchFn): void {
|
|
276
|
+
this._onTouched = fn;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
public setDisabledState(isDisabled: boolean): void {
|
|
280
|
+
this._disabled.set(isDisabled);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
interface HlmAutocompleteOption<T> {
|
|
285
|
+
$implicit: T;
|
|
286
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generator = generator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
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: 'autocomplete',
|
|
10
|
+
internalName: 'ui-autocomplete-helm',
|
|
11
|
+
publicName: 'ui-autocomplete-helm',
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-autocomplete-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,cAAc;QAC7B,YAAY,EAAE,sBAAsB;QACpC,UAAU,EAAE,sBAAsB;KAClC,CAAC,CAAC;AACJ,CAAC"}
|
package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.ts.template
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, inject } from '@angular/core';
|
|
2
2
|
import { BrnAvatarFallback } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
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 { BrnAvatar } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Component({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, inject, input } from '@angular/core';
|
|
2
2
|
import { BrnAvatarImage } from '@spartan-ng/brain/avatar';
|
|
3
|
-
import { hlm } from '
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
|
-
import { hlm } from '
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-ellipsis.ts.template
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideEllipsis } from '@ng-icons/lucide';
|
|
4
|
-
import { HlmIcon } from '
|
|
5
|
-
import { hlm } from '
|
|
4
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
5
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
6
6
|
import type { ClassValue } from 'clsx';
|
|
7
7
|
|
|
8
8
|
@Component({
|
package/src/generators/ui/libs/ui-breadcrumb-helm/files/lib/hlm-breadcrumb-separator.ts.template
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
2
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
3
|
import { lucideChevronRight } from '@ng-icons/lucide';
|
|
4
|
-
import { hlm } from '
|
|
4
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
5
5
|
import type { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, computed, input, signal } from '@angular/core';
|
|
2
2
|
import { BrnButton } from '@spartan-ng/brain/button';
|
|
3
|
-
import { hlm } from '
|
|
3
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
4
4
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
5
5
|
import type { ClassValue } from 'clsx';
|
|
6
6
|
import { injectBrnButtonConfig } from './hlm-button.token';
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
Weekday,
|
|
26
26
|
} from '@spartan-ng/brain/calendar';
|
|
27
27
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
28
|
-
import { buttonVariants } from '
|
|
29
|
-
import { HlmIcon } from '
|
|
30
|
-
import { hlm } from '
|
|
28
|
+
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
30
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
31
31
|
import type { ClassValue } from 'clsx';
|
|
32
32
|
|
|
33
33
|
@Component({
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
Weekday,
|
|
26
26
|
} from '@spartan-ng/brain/calendar';
|
|
27
27
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
28
|
-
import { buttonVariants } from '
|
|
29
|
-
import { HlmIcon } from '
|
|
30
|
-
import { hlm } from '
|
|
28
|
+
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
30
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
31
31
|
import type { ClassValue } from 'clsx';
|
|
32
32
|
|
|
33
33
|
@Component({
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
Weekday,
|
|
26
26
|
} from '@spartan-ng/brain/calendar';
|
|
27
27
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
28
|
-
import { buttonVariants } from '
|
|
29
|
-
import { HlmIcon } from '
|
|
30
|
-
import { hlm } from '
|
|
28
|
+
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
30
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
31
31
|
import type { ClassValue } from 'clsx';
|
|
32
32
|
|
|
33
33
|
@Component({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Directive, computed, input } from '@angular/core';
|
|
2
|
-
import { hlm } from '
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
4
|
import type { ClassValue } from 'clsx';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';
|
|
2
|
-
import { hlm } from '
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
import { HlmCarousel } from './hlm-carousel';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';
|
|
2
|
-
import { hlm } from '
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import type { ClassValue } from 'clsx';
|
|
4
4
|
import { HlmCarousel } from './hlm-carousel';
|
|
5
5
|
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
} from '@angular/core';
|
|
11
11
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
12
12
|
import { lucideArrowRight } from '@ng-icons/lucide';
|
|
13
|
-
import { HlmButton, provideBrnButtonConfig } from '
|
|
14
|
-
import { HlmIcon } from '
|
|
15
|
-
import { hlm } from '
|
|
13
|
+
import { HlmButton, provideBrnButtonConfig } from '<%- importAlias %>/button';
|
|
14
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
15
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
16
16
|
import type { ClassValue } from 'clsx';
|
|
17
17
|
import { HlmCarousel } from './hlm-carousel';
|
|
18
18
|
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
} from '@angular/core';
|
|
11
11
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
12
12
|
import { lucideArrowLeft } from '@ng-icons/lucide';
|
|
13
|
-
import { HlmButton, provideBrnButtonConfig } from '
|
|
14
|
-
import { HlmIcon } from '
|
|
15
|
-
import { hlm } from '
|
|
13
|
+
import { HlmButton, provideBrnButtonConfig } from '<%- importAlias %>/button';
|
|
14
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
15
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
16
16
|
import type { ClassValue } from 'clsx';
|
|
17
17
|
import { HlmCarousel } from './hlm-carousel';
|
|
18
18
|
|
package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.ts.template
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
|
2
|
-
import { hlm } from '
|
|
2
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
import { HlmCarousel } from './hlm-carousel';
|
|
5
5
|
|
|
@@ -15,8 +15,8 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
|
15
15
|
import { lucideCheck } from '@ng-icons/lucide';
|
|
16
16
|
import { BrnCheckbox } from '@spartan-ng/brain/checkbox';
|
|
17
17
|
import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
|
|
18
|
-
import { HlmIcon } from '
|
|
19
|
-
import { hlm } from '
|
|
18
|
+
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
19
|
+
import { hlm } from '<%- importAlias %>/utils';
|
|
20
20
|
import type { ClassValue } from 'clsx';
|
|
21
21
|
|
|
22
22
|
export const HLM_CHECKBOX_VALUE_ACCESSOR = {
|