@acorex/components 21.0.1-next.16 → 21.0.1-next.18
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/command/index.d.ts +8 -1
- package/fesm2022/acorex-components-command.mjs +11 -5
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +2 -2
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +2 -2
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +35 -17
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +4 -3
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +19 -4
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +31 -31
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +17 -2
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/media-viewer/index.d.ts +2 -1
- package/package.json +3 -3
- package/popover/index.d.ts +6 -2
- package/tooltip/index.d.ts +1 -1
- package/tree-view/index.d.ts +11 -0
package/command/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as polytype from 'polytype';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { TemplateRef } from '@angular/core';
|
|
3
4
|
import { AXEvent, MXInputBaseValueComponent, MXLookComponent, AXHtmlEvent, AXFocusEvent } from '@acorex/cdk/common';
|
|
4
5
|
import { AXListNavigationDirective, AXListNavigationItemDirective } from '@acorex/cdk/list-navigation';
|
|
5
6
|
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
@@ -38,6 +39,12 @@ declare class AXCommandComponent extends AXCommandComponent_base {
|
|
|
38
39
|
readonly onSearchBoxBlur: _angular_core.OutputEmitterRef<AXHtmlEvent<FocusEvent>>;
|
|
39
40
|
protected listNavigation: _angular_core.Signal<AXListNavigationDirective>;
|
|
40
41
|
private listNav;
|
|
42
|
+
/**
|
|
43
|
+
* The custom template used for rendering content.
|
|
44
|
+
*
|
|
45
|
+
* @param {TemplateRef<any>} customTemplate
|
|
46
|
+
*/
|
|
47
|
+
customTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
41
48
|
protected displayItems: _angular_core.Signal<CommandItem[]>;
|
|
42
49
|
protected focusHandler(e: AXFocusEvent): void;
|
|
43
50
|
protected blurHandler(e: AXFocusEvent): void;
|
|
@@ -48,7 +55,7 @@ declare class AXCommandComponent extends AXCommandComponent_base {
|
|
|
48
55
|
protected closeHandler(e: AXHtmlEvent<KeyboardEvent>): void;
|
|
49
56
|
protected activeHandler(l: AXListNavigationDirective, i: AXListNavigationItemDirective): void;
|
|
50
57
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommandComponent, never>;
|
|
51
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommandComponent, "ax-command", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "onSubmit": "onSubmit"; "onEscape": "onEscape"; "onSearchBoxFocus": "onSearchBoxFocus"; "onSearchBoxBlur": "onSearchBoxBlur"; }, never, never, true, never>;
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommandComponent, "ax-command", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; "onEscape": "onEscape"; "onSearchBoxFocus": "onSearchBoxFocus"; "onSearchBoxBlur": "onSearchBoxBlur"; }, never, never, true, never>;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
declare class AXCommandModule {
|
|
@@ -9,7 +9,7 @@ import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
|
9
9
|
import * as i3 from '@angular/common';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
import * as i0 from '@angular/core';
|
|
12
|
-
import { signal, viewChild, output, computed, forwardRef, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
12
|
+
import { signal, viewChild, output, input, computed, forwardRef, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
13
13
|
import * as i4 from '@angular/forms';
|
|
14
14
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
15
15
|
import { classes } from 'polytype';
|
|
@@ -25,6 +25,12 @@ class AXCommandComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
|
25
25
|
this.onSearchBoxBlur = output();
|
|
26
26
|
this.listNavigation = viewChild('l', ...(ngDevMode ? [{ debugName: "listNavigation", read: AXListNavigationDirective }] : [{ read: AXListNavigationDirective }]));
|
|
27
27
|
this.listNav = viewChild(AXListNavigationDirective, ...(ngDevMode ? [{ debugName: "listNav" }] : []));
|
|
28
|
+
/**
|
|
29
|
+
* The custom template used for rendering content.
|
|
30
|
+
*
|
|
31
|
+
* @param {TemplateRef<any>} customTemplate
|
|
32
|
+
*/
|
|
33
|
+
this.customTemplate = input(...(ngDevMode ? [undefined, { debugName: "customTemplate" }] : []));
|
|
28
34
|
this.displayItems = computed(() => {
|
|
29
35
|
const searchValue = this.searchValue();
|
|
30
36
|
let filtered;
|
|
@@ -92,7 +98,7 @@ class AXCommandComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
|
92
98
|
l?.navigateTo(i);
|
|
93
99
|
}
|
|
94
100
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXCommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXCommandComponent, isStandalone: true, selector: "ax-command", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", placeholder: "placeholder", value: "value", state: "state", name: "name", id: "id" }, outputs: { onSubmit: "onSubmit", onEscape: "onEscape", onSearchBoxFocus: "onSearchBoxFocus", onSearchBoxBlur: "onSearchBoxBlur" }, providers: [
|
|
101
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXCommandComponent, isStandalone: true, selector: "ax-command", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSubmit: "onSubmit", onEscape: "onEscape", onSearchBoxFocus: "onSearchBoxFocus", onSearchBoxBlur: "onSearchBoxBlur" }, providers: [
|
|
96
102
|
{
|
|
97
103
|
provide: NG_VALUE_ACCESSOR,
|
|
98
104
|
useExisting: forwardRef(() => AXCommandComponent),
|
|
@@ -100,7 +106,7 @@ class AXCommandComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
|
100
106
|
},
|
|
101
107
|
{ provide: AXComponent, useExisting: AXCommandComponent },
|
|
102
108
|
{ provide: AXValuableComponent, useExisting: AXCommandComponent },
|
|
103
|
-
], viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["f"], descendants: true, isSignal: true }, { propertyName: "listNavigation", first: true, predicate: ["l"], descendants: true, read: AXListNavigationDirective, isSignal: true }, { propertyName: "listNav", first: true, predicate: AXListNavigationDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [ngClass]=\"{ 'ax-command-item-container-active': a.isActive() }\"\n #a=\"axListNavigationItem\"\n axListNavigationItem\n (click)=\"onItemClick(item)\"\n (onKeypress)=\"keyPress($event, item)\"\n >\n <div class=\"ax-command-item\">\n @if (item.icon) {\n <i class=\"ax-command-item-icon\" [class]=\"item.icon\"></i>\n }\n <span class=\"ax-command-item-text\">{{ item.text }}</span>\n </div>\n </div>\n\n @if (item.children?.length) {\n @for (child of item.children; track child.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: child, level: level + 1, listNavigation: s }\"\n >\n </ng-container>\n }\n }\n </ng-template>\n</div>\n\n<div class=\"ax-command-footer\">\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↑', '↓']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to navigate</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↩']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to select</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['esc']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to close</ax-text>\n </div>\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-font-weight:initial;--tw-border-style:solid}}}@layer components{ax-command{border-radius:var(--radius-lg,.5rem);outline-style:var(--tw-outline-style);outline-width:4px;outline-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));display:block;overflow:hidden}ax-command .ax-search-box-container{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));padding:calc(var(--spacing,.25rem)*3)}ax-command .ax-search-box-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{max-height:calc(var(--spacing,.25rem)*80);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-surface,rgba(var(--ax-sys-color-on-surface)));overflow:auto}ax-command .ax-command-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{scrollbar-width:none;-ms-overflow-style:none}ax-command .ax-command-container .ax-command-item-pinned-container{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{padding:calc(var(--spacing,.25rem)*3);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-item-wrapper{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-container{cursor:pointer;border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*2);border-width:1px;border-color:#0000}ax-command .ax-command-container .ax-command-item-container .ax-command-item{align-items:center;gap:calc(var(--spacing,.25rem)*2);display:flex}ax-command .ax-command-container .ax-command-item-container .ax-command-item-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-on-lightest,rgba(var(--ax-sys-color-on-lightest-surface)))}ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-not-found{padding:calc(var(--spacing,.25rem)*4);justify-content:center;display:flex}ax-command .ax-command-container .ax-command-item-container-active{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:#0000}ax-command .ax-kbd{justify-content:center;align-items:center;height:100%;display:flex}ax-command .ax-command-footer{align-items:center;gap:calc(var(--spacing,.25rem)*6);border-bottom-right-radius:var(--radius-lg,.5rem);border-bottom-left-radius:var(--radius-lg,.5rem);background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));padding:calc(var(--spacing,.25rem)*3);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-light-surface))50%,transparent);display:flex}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-footer{color:color-mix(in oklab,var(--color-on-light,rgba(var(--ax-sys-color-on-light-surface)))50%,transparent)}}ax-command .ax-command-footer .ax-kbd-footer{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem)*3);display:flex}ax-command .ax-command-footer .ax-kbd-footer kbd{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)))}ax-command .ax-command-footer .ax-kbd-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i5.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i5.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "component", type: AXKBDComponent, selector: "ax-kbd", inputs: ["look"] }, { kind: "component", type: AXKBDItemComponent, selector: "ax-kbd-item", inputs: ["keys", "join", "look"], outputs: ["lookChange"] }, { kind: "directive", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
109
|
+
], viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["f"], descendants: true, isSignal: true }, { propertyName: "listNavigation", first: true, predicate: ["l"], descendants: true, read: AXListNavigationDirective, isSignal: true }, { propertyName: "listNav", first: true, predicate: AXListNavigationDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [class.ax-command-item-container-active]=\"a.isActive() && !customTemplate()\"\n #a=\"axListNavigationItem\"\n axListNavigationItem\n (click)=\"onItemClick(item)\"\n (onKeypress)=\"keyPress($event, item)\"\n >\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n level: level,\n isActive: a.isActive(),\n }\"\n ></ng-container>\n } @else {\n <div class=\"ax-command-item\">\n @if (item.icon) {\n <i class=\"ax-command-item-icon\" [class]=\"item.icon\"></i>\n }\n <span class=\"ax-command-item-text\">{{ item.text }}</span>\n </div>\n }\n </div>\n\n @if (item.children?.length) {\n @for (child of item.children; track child.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: child, level: level + 1, listNavigation: s }\"\n >\n </ng-container>\n }\n }\n </ng-template>\n</div>\n\n<div class=\"ax-command-footer\">\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↑', '↓']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to navigate</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↩']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to select</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['esc']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to close</ax-text>\n </div>\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-font-weight:initial;--tw-border-style:solid}}}@layer components{ax-command{border-radius:var(--radius-lg,.5rem);outline-style:var(--tw-outline-style);outline-width:4px;outline-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));display:block;overflow:hidden}ax-command .ax-search-box-container{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));padding:calc(var(--spacing,.25rem)*3)}ax-command .ax-search-box-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{max-height:calc(var(--spacing,.25rem)*80);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-surface,rgba(var(--ax-sys-color-on-surface)));overflow:auto}ax-command .ax-command-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{scrollbar-width:none;-ms-overflow-style:none}ax-command .ax-command-container .ax-command-item-pinned-container{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{padding:calc(var(--spacing,.25rem)*3);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-item-wrapper{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-container{cursor:pointer;border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*2);border-width:1px;border-color:#0000}ax-command .ax-command-container .ax-command-item-container .ax-command-item{align-items:center;gap:calc(var(--spacing,.25rem)*2);display:flex}ax-command .ax-command-container .ax-command-item-container .ax-command-item-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-on-lightest,rgba(var(--ax-sys-color-on-lightest-surface)))}ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-not-found{padding:calc(var(--spacing,.25rem)*4);justify-content:center;display:flex}ax-command .ax-command-container .ax-command-item-container-active{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:#0000}ax-command .ax-kbd{justify-content:center;align-items:center;height:100%;display:flex}ax-command .ax-command-footer{align-items:center;gap:calc(var(--spacing,.25rem)*6);border-bottom-right-radius:var(--radius-lg,.5rem);border-bottom-left-radius:var(--radius-lg,.5rem);background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));padding:calc(var(--spacing,.25rem)*3);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-light-surface))50%,transparent);display:flex}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-footer{color:color-mix(in oklab,var(--color-on-light,rgba(var(--ax-sys-color-on-light-surface)))50%,transparent)}}ax-command .ax-command-footer .ax-kbd-footer{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem)*3);display:flex}ax-command .ax-command-footer .ax-kbd-footer kbd{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)))}ax-command .ax-command-footer .ax-kbd-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i5.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i5.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "component", type: AXKBDComponent, selector: "ax-kbd", inputs: ["look"] }, { kind: "component", type: AXKBDItemComponent, selector: "ax-kbd-item", inputs: ["keys", "join", "look"], outputs: ["lookChange"] }, { kind: "directive", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
104
110
|
}
|
|
105
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXCommandComponent, decorators: [{
|
|
106
112
|
type: Component,
|
|
@@ -121,8 +127,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
121
127
|
},
|
|
122
128
|
{ provide: AXComponent, useExisting: AXCommandComponent },
|
|
123
129
|
{ provide: AXValuableComponent, useExisting: AXCommandComponent },
|
|
124
|
-
], inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'], template: "<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [
|
|
125
|
-
}], propDecorators: { searchBox: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }], onSubmit: [{ type: i0.Output, args: ["onSubmit"] }], onEscape: [{ type: i0.Output, args: ["onEscape"] }], onSearchBoxFocus: [{ type: i0.Output, args: ["onSearchBoxFocus"] }], onSearchBoxBlur: [{ type: i0.Output, args: ["onSearchBoxBlur"] }], listNavigation: [{ type: i0.ViewChild, args: ['l', { ...{ read: AXListNavigationDirective }, isSignal: true }] }], listNav: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXListNavigationDirective), { isSignal: true }] }] } });
|
|
130
|
+
], inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'], template: "<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [class.ax-command-item-container-active]=\"a.isActive() && !customTemplate()\"\n #a=\"axListNavigationItem\"\n axListNavigationItem\n (click)=\"onItemClick(item)\"\n (onKeypress)=\"keyPress($event, item)\"\n >\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n level: level,\n isActive: a.isActive(),\n }\"\n ></ng-container>\n } @else {\n <div class=\"ax-command-item\">\n @if (item.icon) {\n <i class=\"ax-command-item-icon\" [class]=\"item.icon\"></i>\n }\n <span class=\"ax-command-item-text\">{{ item.text }}</span>\n </div>\n }\n </div>\n\n @if (item.children?.length) {\n @for (child of item.children; track child.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: child, level: level + 1, listNavigation: s }\"\n >\n </ng-container>\n }\n }\n </ng-template>\n</div>\n\n<div class=\"ax-command-footer\">\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↑', '↓']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to navigate</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↩']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to select</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['esc']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to close</ax-text>\n </div>\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-font-weight:initial;--tw-border-style:solid}}}@layer components{ax-command{border-radius:var(--radius-lg,.5rem);outline-style:var(--tw-outline-style);outline-width:4px;outline-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));display:block;overflow:hidden}ax-command .ax-search-box-container{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));padding:calc(var(--spacing,.25rem)*3)}ax-command .ax-search-box-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{max-height:calc(var(--spacing,.25rem)*80);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-surface,rgba(var(--ax-sys-color-on-surface)));overflow:auto}ax-command .ax-command-container:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-command .ax-command-container{scrollbar-width:none;-ms-overflow-style:none}ax-command .ax-command-container .ax-command-item-pinned-container{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{padding:calc(var(--spacing,.25rem)*3);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-pinned-container .ax-command-item-pinned-text{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-item-wrapper{padding-inline:calc(var(--spacing,.25rem)*3)}ax-command .ax-command-container .ax-command-item-container{cursor:pointer;border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*2);border-width:1px;border-color:#0000}ax-command .ax-command-container .ax-command-item-container .ax-command-item{align-items:center;gap:calc(var(--spacing,.25rem)*2);display:flex}ax-command .ax-command-container .ax-command-item-container .ax-command-item-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-on-lightest,rgba(var(--ax-sys-color-on-lightest-surface)))}ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in srgb,rgba(var(--ax-sys-color-on-lighter-surface))50%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-container .ax-command-item-container .ax-command-item-icon{color:color-mix(in oklab,var(--color-on-lighter,rgba(var(--ax-sys-color-on-lighter-surface)))50%,transparent)}}ax-command .ax-command-container .ax-command-not-found{padding:calc(var(--spacing,.25rem)*4);justify-content:center;display:flex}ax-command .ax-command-container .ax-command-item-container-active{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-border-light,rgba(var(--ax-sys-color-border-light-surface)));background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:#0000}ax-command .ax-kbd{justify-content:center;align-items:center;height:100%;display:flex}ax-command .ax-command-footer{align-items:center;gap:calc(var(--spacing,.25rem)*6);border-bottom-right-radius:var(--radius-lg,.5rem);border-bottom-left-radius:var(--radius-lg,.5rem);background-color:var(--color-light,rgba(var(--ax-sys-color-light-surface)));padding:calc(var(--spacing,.25rem)*3);color:color-mix(in srgb,rgba(var(--ax-sys-color-on-light-surface))50%,transparent);display:flex}@supports (color:color-mix(in lab,red,red)){ax-command .ax-command-footer{color:color-mix(in oklab,var(--color-on-light,rgba(var(--ax-sys-color-on-light-surface)))50%,transparent)}}ax-command .ax-command-footer .ax-kbd-footer{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem)*3);display:flex}ax-command .ax-command-footer .ax-kbd-footer kbd{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)))}ax-command .ax-command-footer .ax-kbd-text{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"] }]
|
|
131
|
+
}], propDecorators: { searchBox: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }], onSubmit: [{ type: i0.Output, args: ["onSubmit"] }], onEscape: [{ type: i0.Output, args: ["onEscape"] }], onSearchBoxFocus: [{ type: i0.Output, args: ["onSearchBoxFocus"] }], onSearchBoxBlur: [{ type: i0.Output, args: ["onSearchBoxBlur"] }], listNavigation: [{ type: i0.ViewChild, args: ['l', { ...{ read: AXListNavigationDirective }, isSignal: true }] }], listNav: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXListNavigationDirective), { isSignal: true }] }], customTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTemplate", required: false }] }] } });
|
|
126
132
|
|
|
127
133
|
const COMPONENT = [AXCommandComponent];
|
|
128
134
|
const MODULES = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-command.mjs","sources":["../../../../packages/components/command/src/lib/command.component.ts","../../../../packages/components/command/src/lib/command.component.html","../../../../packages/components/command/src/lib/command.module.ts","../../../../packages/components/command/src/lib/command.type.ts","../../../../packages/components/command/src/acorex-components-command.ts"],"sourcesContent":["import {\n AXAutoFocusDirective,\n AXComponent,\n AXFocusEvent,\n AXHtmlEvent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/cdk/common';\nimport {\n AXListNavigationDirective,\n AXListNavigationItemDirective,\n AXListNavigationModule,\n} from '@acorex/cdk/list-navigation';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXKBDComponent, AXKBDItemComponent } from '@acorex/components/kbd';\nimport { AXSearchBoxComponent, AXSearchBoxModule } from '@acorex/components/search-box';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, forwardRef, output, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\nimport { AXCommandComponentEvent, CommandItem, CommandMenuItem } from './command.type';\n\n@Component({\n selector: 'ax-command',\n templateUrl: './command.component.html',\n styleUrl: './command.component.compiled.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXSearchBoxModule,\n AXDecoratorModule,\n CommonModule,\n FormsModule,\n AXListNavigationModule,\n AXKBDComponent,\n AXKBDItemComponent,\n AXAutoFocusDirective,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXCommandComponent),\n multi: true,\n },\n { provide: AXComponent, useExisting: AXCommandComponent },\n { provide: AXValuableComponent, useExisting: AXCommandComponent },\n ],\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'],\n})\nexport class AXCommandComponent extends classes(MXInputBaseValueComponent<CommandMenuItem>, MXLookComponent) {\n protected searchValue = signal('');\n protected searchBox = viewChild<AXSearchBoxComponent>('f');\n readonly onSubmit = output<AXCommandComponentEvent>();\n readonly onEscape = output<AXHtmlEvent<KeyboardEvent>>();\n readonly onSearchBoxFocus = output<AXHtmlEvent<FocusEvent>>();\n readonly onSearchBoxBlur = output<AXHtmlEvent<FocusEvent>>();\n protected listNavigation = viewChild('l', { read: AXListNavigationDirective });\n private listNav = viewChild(AXListNavigationDirective);\n\n protected displayItems = computed<CommandItem[]>(() => {\n const searchValue = this.searchValue();\n let filtered: CommandItem[];\n if (searchValue) {\n filtered = this.filterRecursive(this.value?.items ?? [], searchValue);\n } else {\n filtered = [];\n }\n\n return filtered;\n });\n\n protected focusHandler(e: AXFocusEvent) {\n this.onSearchBoxFocus.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n\n protected blurHandler(e: AXFocusEvent) {\n this.onSearchBoxBlur.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n\n private filterRecursive(items: any[], value: string): any[] {\n const lowerSignal = value.toLowerCase();\n\n return items\n .map((item) => {\n const isMatch =\n item.text?.toLowerCase().includes(lowerSignal) || item.href?.toLowerCase().includes(lowerSignal);\n\n const filteredChildren = item.children ? this.filterRecursive(item.children, value) : [];\n\n if (isMatch || filteredChildren.length > 0) {\n return {\n ...item,\n children: filteredChildren,\n };\n }\n\n return null;\n })\n .filter(Boolean);\n }\n\n protected onItemClick(item: CommandItem) {\n this.onSubmit.emit({ data: item, component: this });\n }\n\n protected keyPress(e: AXHtmlEvent<KeyboardEvent>, item: CommandItem) {\n if (e.nativeEvent.key === 'Enter' || e.nativeEvent.code === 'Space') {\n e.nativeEvent.stopPropagation();\n e.nativeEvent.preventDefault();\n this.onSubmit.emit({ data: item, component: this });\n }\n }\n\n protected searchEscapeHandler(e: AXHtmlEvent<KeyboardEvent>) {\n if (e.nativeEvent.key === 'Escape') {\n this.onEscape.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n if (e.nativeEvent.key === 'ArrowDown') {\n this.listNavigation().focusOnIndex(0);\n }\n }\n\n protected closeHandler(e: AXHtmlEvent<KeyboardEvent>) {\n if (!this.listNav().activeIndex() && e.nativeEvent.key === 'ArrowUp') {\n this.searchBox().focus();\n }\n\n if (\n e.nativeEvent.key === 'ArrowUp' ||\n e.nativeEvent.key === 'ArrowDown' ||\n e.nativeEvent.key === 'Tab' ||\n e.nativeEvent.key === 'Shift'\n )\n return;\n\n this.searchBox().focus();\n }\n\n protected activeHandler(l: AXListNavigationDirective, i: AXListNavigationItemDirective) {\n l?.navigateTo(i);\n }\n}\n","<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [ngClass]=\"{ 'ax-command-item-container-active': a.isActive() }\"\n #a=\"axListNavigationItem\"\n axListNavigationItem\n (click)=\"onItemClick(item)\"\n (onKeypress)=\"keyPress($event, item)\"\n >\n <div class=\"ax-command-item\">\n @if (item.icon) {\n <i class=\"ax-command-item-icon\" [class]=\"item.icon\"></i>\n }\n <span class=\"ax-command-item-text\">{{ item.text }}</span>\n </div>\n </div>\n\n @if (item.children?.length) {\n @for (child of item.children; track child.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: child, level: level + 1, listNavigation: s }\"\n >\n </ng-container>\n }\n }\n </ng-template>\n</div>\n\n<div class=\"ax-command-footer\">\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↑', '↓']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to navigate</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↩']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to select</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['esc']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to close</ax-text>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXCommandComponent } from './command.component';\n\nconst COMPONENT = [AXCommandComponent];\nconst MODULES = [];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXCommandModule {}\n","import { AXEvent } from '@acorex/cdk/common';\n\nexport type CommandItem = {\n id: string | number;\n text: string;\n icon?: string;\n href?: string;\n children?: CommandItem[];\n index?: number;\n data?: any;\n};\n\nexport type CommandMenuItem = {\n pinned?: { title: string; items: CommandItem[] };\n items: CommandItem[];\n};\n\nexport class AXCommandComponentEvent extends AXEvent {\n data: CommandItem;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkDM,MAAO,kBAAmB,SAAQ,OAAO,EAAC,yBAA0C,GAAE,eAAe,CAAC,CAAA;AA1B5G,IAAA,WAAA,GAAA;;AA2BY,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,SAAS,CAAuB,GAAG,qDAAC;QACjD,IAAA,CAAA,QAAQ,GAAG,MAAM,EAA2B;QAC5C,IAAA,CAAA,QAAQ,GAAG,MAAM,EAA8B;QAC/C,IAAA,CAAA,gBAAgB,GAAG,MAAM,EAA2B;QACpD,IAAA,CAAA,eAAe,GAAG,MAAM,EAA2B;AAClD,QAAA,IAAA,CAAA,cAAc,GAAG,SAAS,CAAC,GAAG,kDAAI,IAAI,EAAE,yBAAyB,EAAA,CAAA,GAAA,CAAjC,EAAE,IAAI,EAAE,yBAAyB,EAAE,GAAC;AACtE,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,yBAAyB,mDAAC;AAE5C,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CA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AAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvDvD,MAAM,SAAS,GAAG,CAAC,kBAAkB,CAAC;AACtC,MAAM,OAAO,GAAG,EAAE;MAOL,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAf,eAAe,EAAA,OAAA,EAAA,CART,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAAlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;gHAQxB,eAAe,EAAA,OAAA,EAAA,CAJb,OAAO,EAAK,SAAS,CAAA,EAAA,CAAA,CAAA;;4FAIvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACOK,MAAO,uBAAwB,SAAQ,OAAO,CAAA;AAEnD;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-command.mjs","sources":["../../../../packages/components/command/src/lib/command.component.ts","../../../../packages/components/command/src/lib/command.component.html","../../../../packages/components/command/src/lib/command.module.ts","../../../../packages/components/command/src/lib/command.type.ts","../../../../packages/components/command/src/acorex-components-command.ts"],"sourcesContent":["import {\n AXAutoFocusDirective,\n AXComponent,\n AXFocusEvent,\n AXHtmlEvent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/cdk/common';\nimport {\n AXListNavigationDirective,\n AXListNavigationItemDirective,\n AXListNavigationModule,\n} from '@acorex/cdk/list-navigation';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXKBDComponent, AXKBDItemComponent } from '@acorex/components/kbd';\nimport { AXSearchBoxComponent, AXSearchBoxModule } from '@acorex/components/search-box';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n computed,\n forwardRef,\n input,\n output,\n signal,\n TemplateRef,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\nimport { AXCommandComponentEvent, CommandItem, CommandMenuItem } from './command.type';\n\n@Component({\n selector: 'ax-command',\n templateUrl: './command.component.html',\n styleUrl: './command.component.compiled.css',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXSearchBoxModule,\n AXDecoratorModule,\n CommonModule,\n FormsModule,\n AXListNavigationModule,\n AXKBDComponent,\n AXKBDItemComponent,\n AXAutoFocusDirective,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXCommandComponent),\n multi: true,\n },\n { provide: AXComponent, useExisting: AXCommandComponent },\n { provide: AXValuableComponent, useExisting: AXCommandComponent },\n ],\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id'],\n})\nexport class AXCommandComponent extends classes(MXInputBaseValueComponent<CommandMenuItem>, MXLookComponent) {\n protected searchValue = signal('');\n protected searchBox = viewChild<AXSearchBoxComponent>('f');\n readonly onSubmit = output<AXCommandComponentEvent>();\n readonly onEscape = output<AXHtmlEvent<KeyboardEvent>>();\n readonly onSearchBoxFocus = output<AXHtmlEvent<FocusEvent>>();\n readonly onSearchBoxBlur = output<AXHtmlEvent<FocusEvent>>();\n protected listNavigation = viewChild('l', { read: AXListNavigationDirective });\n private listNav = viewChild(AXListNavigationDirective);\n\n /**\n * The custom template used for rendering content.\n *\n * @param {TemplateRef<any>} customTemplate\n */\n customTemplate = input<TemplateRef<any>>();\n\n protected displayItems = computed<CommandItem[]>(() => {\n const searchValue = this.searchValue();\n let filtered: CommandItem[];\n if (searchValue) {\n filtered = this.filterRecursive(this.value?.items ?? [], searchValue);\n } else {\n filtered = [];\n }\n\n return filtered;\n });\n\n protected focusHandler(e: AXFocusEvent) {\n this.onSearchBoxFocus.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n\n protected blurHandler(e: AXFocusEvent) {\n this.onSearchBoxBlur.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n\n private filterRecursive(items: any[], value: string): any[] {\n const lowerSignal = value.toLowerCase();\n\n return items\n .map((item) => {\n const isMatch =\n item.text?.toLowerCase().includes(lowerSignal) || item.href?.toLowerCase().includes(lowerSignal);\n\n const filteredChildren = item.children ? this.filterRecursive(item.children, value) : [];\n\n if (isMatch || filteredChildren.length > 0) {\n return {\n ...item,\n children: filteredChildren,\n };\n }\n\n return null;\n })\n .filter(Boolean);\n }\n\n protected onItemClick(item: CommandItem) {\n this.onSubmit.emit({ data: item, component: this });\n }\n\n protected keyPress(e: AXHtmlEvent<KeyboardEvent>, item: CommandItem) {\n if (e.nativeEvent.key === 'Enter' || e.nativeEvent.code === 'Space') {\n e.nativeEvent.stopPropagation();\n e.nativeEvent.preventDefault();\n this.onSubmit.emit({ data: item, component: this });\n }\n }\n\n protected searchEscapeHandler(e: AXHtmlEvent<KeyboardEvent>) {\n if (e.nativeEvent.key === 'Escape') {\n this.onEscape.emit({ component: this, nativeEvent: e.nativeEvent });\n }\n if (e.nativeEvent.key === 'ArrowDown') {\n this.listNavigation().focusOnIndex(0);\n }\n }\n\n protected closeHandler(e: AXHtmlEvent<KeyboardEvent>) {\n if (!this.listNav().activeIndex() && e.nativeEvent.key === 'ArrowUp') {\n this.searchBox().focus();\n }\n\n if (\n e.nativeEvent.key === 'ArrowUp' ||\n e.nativeEvent.key === 'ArrowDown' ||\n e.nativeEvent.key === 'Tab' ||\n e.nativeEvent.key === 'Shift'\n )\n return;\n\n this.searchBox().focus();\n }\n\n protected activeHandler(l: AXListNavigationDirective, i: AXListNavigationItemDirective) {\n l?.navigateTo(i);\n }\n}\n","<div class=\"ax-search-box-container\">\n <ax-search-box\n #f\n [delayTime]=\"20\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(ngModel)]=\"searchValue\"\n (onFocus)=\"focusHandler($event)\"\n (onBlur)=\"blurHandler($event)\"\n (onKeyDown)=\"searchEscapeHandler($event)\"\n [axAutoFocus]=\"true\"\n look=\"fill\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n</div>\n\n<div #l class=\"ax-command-container\" #s=\"axListNavigation\" axListNavigation (onKeypress)=\"closeHandler($event)\">\n @if (value?.pinned && !searchValue()) {\n <div class=\"ax-command-item-pinned-container\">\n <ax-text class=\"ax-command-item-pinned-text\">{{ value.pinned.title }}</ax-text>\n\n @for (item of value.pinned.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n }\n </div>\n }\n\n @if (displayItems() && searchValue()) {\n <div class=\"ax-command-item-wrapper\">\n @for (item of displayItems(); track $index) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, level: 1, listNavigation: s }\"\n >\n </ng-container>\n } @empty {\n <div class=\"ax-command-not-found\">\n <ax-text>No results found for \"{{ searchValue() }}\"</ax-text>\n </div>\n }\n </div>\n }\n\n <ng-template #renderItem let-item let-level=\"level\" let-listNavigation=\"listNavigation\">\n <div\n (mouseenter)=\"activeHandler(listNavigation, a)\"\n class=\"ax-command-item-container\"\n [style.padding-inline-start.rem]=\"level * 0.625\"\n [class.ax-command-item-container-active]=\"a.isActive() && !customTemplate()\"\n #a=\"axListNavigationItem\"\n axListNavigationItem\n (click)=\"onItemClick(item)\"\n (onKeypress)=\"keyPress($event, item)\"\n >\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n level: level,\n isActive: a.isActive(),\n }\"\n ></ng-container>\n } @else {\n <div class=\"ax-command-item\">\n @if (item.icon) {\n <i class=\"ax-command-item-icon\" [class]=\"item.icon\"></i>\n }\n <span class=\"ax-command-item-text\">{{ item.text }}</span>\n </div>\n }\n </div>\n\n @if (item.children?.length) {\n @for (child of item.children; track child.id) {\n <ng-container\n [ngTemplateOutlet]=\"renderItem\"\n [ngTemplateOutletContext]=\"{ $implicit: child, level: level + 1, listNavigation: s }\"\n >\n </ng-container>\n }\n }\n </ng-template>\n</div>\n\n<div class=\"ax-command-footer\">\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↑', '↓']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to navigate</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['↩']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to select</ax-text>\n </div>\n\n <div class=\"ax-kbd-footer\">\n <ax-kbd class=\"ax-kbd\">\n <ax-kbd-item [keys]=\"['esc']\"></ax-kbd-item>\n </ax-kbd>\n <ax-text class=\"ax-kbd-text\">to close</ax-text>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXCommandComponent } from './command.component';\n\nconst COMPONENT = [AXCommandComponent];\nconst MODULES = [];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXCommandModule {}\n","import { AXEvent } from '@acorex/cdk/common';\n\nexport type CommandItem = {\n id: string | number;\n text: string;\n icon?: string;\n href?: string;\n children?: CommandItem[];\n index?: number;\n data?: any;\n};\n\nexport type CommandMenuItem = {\n pinned?: { title: string; items: CommandItem[] };\n items: CommandItem[];\n};\n\nexport class AXCommandComponentEvent extends AXEvent {\n data: CommandItem;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;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;;4FAIvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACOK,MAAO,uBAAwB,SAAQ,OAAO,CAAA;AAEnD;;ACnBD;;AAEG;;;;"}
|
|
@@ -424,7 +424,7 @@ class AXDateTimePickerComponent extends classes(MXCalendarBaseComponent, (MXValu
|
|
|
424
424
|
useExisting: forwardRef(() => AXDateTimePickerComponent),
|
|
425
425
|
multi: true,
|
|
426
426
|
},
|
|
427
|
-
], viewQueries: [{ propertyName: "tabs", first: true, predicate: AXTabsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (_hasDatePart && _hasTimePart) {\n <div class=\"ax-header\">\n <ax-tabs [look]=\"'default'\" [fitParent]=\"true\" [location]=\"'top'\" (onActiveTabChanged)=\"_handleViewChanged($event)\">\n <ax-tab-item\n [text]=\"'@acorex:dateTime.date' | translate | async\"\n [key]=\"'date'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n <ax-tab-item\n [text]=\"'@acorex:dateTime.time' | translate | async\"\n [key]=\"'time'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n </ax-tabs>\n </div>\n}\n<div class=\"ax-content\">\n @if (_activePart() === 'date') {\n <div class=\"ax-calendar-part\">\n <ax-calendar\n #calendar\n id=\"calendar\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [weekend]=\"weekend()\"\n [weekdays]=\"weekdays()\"\n [ngModel]=\"editingDateObj().date\"\n [minValue]=\"minValue\"\n [maxValue]=\"maxValue\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"\n (onValueChanged)=\"_handleCalendarOnValueChanged($event)\"\n [type]=\"_calendarSystem()\"\n >\n </ax-calendar>\n </div>\n }\n\n @if (_activePart() === 'time') {\n <div class=\"ax-picker-part\">\n <div class=\"ax-header\">\n @if (picker() === 'datetime') {\n {{ editingDateObj() | format: 'time' : '
|
|
427
|
+
], viewQueries: [{ propertyName: "tabs", first: true, predicate: AXTabsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (_hasDatePart && _hasTimePart) {\n <div class=\"ax-header\">\n <ax-tabs [look]=\"'default'\" [fitParent]=\"true\" [location]=\"'top'\" (onActiveTabChanged)=\"_handleViewChanged($event)\">\n <ax-tab-item\n [text]=\"'@acorex:dateTime.date' | translate | async\"\n [key]=\"'date'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n <ax-tab-item\n [text]=\"'@acorex:dateTime.time' | translate | async\"\n [key]=\"'time'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n </ax-tabs>\n </div>\n}\n<div class=\"ax-content\">\n @if (_activePart() === 'date') {\n <div class=\"ax-calendar-part\">\n <ax-calendar\n #calendar\n id=\"calendar\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [weekend]=\"weekend()\"\n [weekdays]=\"weekdays()\"\n [ngModel]=\"editingDateObj().date\"\n [minValue]=\"minValue\"\n [maxValue]=\"maxValue\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"\n (onValueChanged)=\"_handleCalendarOnValueChanged($event)\"\n [type]=\"_calendarSystem()\"\n >\n </ax-calendar>\n </div>\n }\n\n @if (_activePart() === 'time') {\n <div class=\"ax-picker-part\">\n <div class=\"ax-header\">\n @if (picker() === 'datetime') {\n {{ editingDateObj() | format: 'time' : 'short' | async }}\n {{ editingDateObj() | format: 'date' : 'short' | async }}\n } @else {\n {{ editingDateObj() | format: picker() : 'medium' | async }}\n }\n </div>\n <div dir=\"ltr\" class=\"ax-picker-time-container\">\n @if (_parts.hour.enabled) {\n <ng-container [ngTemplateOutlet]=\"hourRef\"> </ng-container>\n }\n\n @if (_parts.minute.enabled) {\n <ng-container [ngTemplateOutlet]=\"minuteRef\"> </ng-container>\n }\n\n @if (_parts.second.enabled) {\n <ng-container [ngTemplateOutlet]=\"secondRef\"> </ng-container>\n }\n </div>\n </div>\n }\n</div>\n@if (!disabled && !readonly && (currentTimeButton || _hasTimePart)) {\n <div class=\"ax-footer\">\n <div>\n @if (currentTimeButton) {\n <ax-button\n [text]=\"`@acorex:${buttonText()}` | translate | async\"\n class=\"ax-sm\"\n (onClick)=\"_handleNowClick()\"\n [disabled]=\"isTodayDisabled()\"\n ></ax-button>\n }\n </div>\n <div>\n @if (_hasTimePart) {\n <ax-button\n color=\"primary\"\n [text]=\"'@acorex:dateTime.set' | translate | async\"\n class=\"ax-sm\"\n (onClick)=\"_handleSetClick()\"\n ></ax-button>\n }\n </div>\n </div>\n}\n\n<ng-template #hourRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.hour' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"hours\"\n [ngModel]=\"editingDateObj().hour\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'hour')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerHoursMinValue()\"\n [maxValue]=\"pickerHoursMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n\n<ng-template #minuteRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.minute' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"minutes\"\n [ngModel]=\"editingDateObj().minute\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'minute')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerMinuteMinValue()\"\n [maxValue]=\"pickerMinuteMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n\n<ng-template #secondRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.second' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"minutes\"\n [ngModel]=\"editingDateObj().second\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'second')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerSecondMinValue()\"\n [maxValue]=\"pickerSecondMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-datetime-picker{flex-direction:column;display:flex}ax-datetime-picker>.ax-header{padding-top:calc(var(--spacing,.25rem)*2);padding-right:calc(var(--spacing,.25rem)*2);padding-left:calc(var(--spacing,.25rem)*2);justify-content:center;display:flex}ax-datetime-picker>.ax-content{flex-direction:column;justify-content:center;align-items:center;width:100%;display:flex;overflow:hidden}@media (min-width:768px){ax-datetime-picker>.ax-content{width:calc(var(--spacing,.25rem)*80)}}ax-datetime-picker>.ax-content .ax-picker-part{flex-direction:column;width:100%;height:376px;display:flex}ax-datetime-picker>.ax-content .ax-picker-part .ax-picker-time-container{height:100%;display:flex}ax-datetime-picker>.ax-content .ax-picker-part>.ax-header{border-bottom-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-bottom-width:1px;border-bottom-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));padding:calc(var(--spacing,.25rem)*3);text-align:center;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-datetime-picker>.ax-content .ax-picker-part ax-picker{flex:1}ax-datetime-picker>.ax-content .ax-calendar-part{width:100%;padding-top:calc(var(--spacing,.25rem)*1);padding-bottom:calc(var(--spacing,.25rem)*1)}ax-datetime-picker>.ax-content .ax-calendar-part ax-calendar{width:100%}ax-datetime-picker>.ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));padding:calc(var(--spacing,.25rem)*2);justify-content:space-between;display:flex}ax-datetime-picker>.ax-footer ax-button{min-width:100%}app-demo-box .log-container{flex-direction:row-reverse;justify-content:space-between;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "minValue", "maxValue", "disabledDates", "holidayDates", "type", "dayCellTemplate", "monthCellTemplate", "yearCellTemplate", "cellClass", "showNavigation", "count", "id", "weekend", "weekdays"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "minValueChange", "maxValueChange", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick", "countChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXPickerContainerComponent, selector: "ax-picker-container", inputs: ["class"] }, { kind: "component", type: AXPickerTitleComponent, selector: "ax-picker-title" }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXPickerItemsComponent, selector: "ax-picker-items", inputs: ["disabled", "readonly", "readonlyChange", "disabledChange", "items", "valueField", "textField", "slidesPerGroup", "loop", "minValue", "maxValue"], outputs: ["onValueChanged"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXFormatPipe, name: "format" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
428
428
|
}
|
|
429
429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXDateTimePickerComponent, decorators: [{
|
|
430
430
|
type: Component,
|
|
@@ -486,7 +486,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
486
486
|
AsyncPipe,
|
|
487
487
|
AXFormatPipe,
|
|
488
488
|
AXTranslatorPipe,
|
|
489
|
-
], template: "@if (_hasDatePart && _hasTimePart) {\n <div class=\"ax-header\">\n <ax-tabs [look]=\"'default'\" [fitParent]=\"true\" [location]=\"'top'\" (onActiveTabChanged)=\"_handleViewChanged($event)\">\n <ax-tab-item\n [text]=\"'@acorex:dateTime.date' | translate | async\"\n [key]=\"'date'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n <ax-tab-item\n [text]=\"'@acorex:dateTime.time' | translate | async\"\n [key]=\"'time'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n </ax-tabs>\n </div>\n}\n<div class=\"ax-content\">\n @if (_activePart() === 'date') {\n <div class=\"ax-calendar-part\">\n <ax-calendar\n #calendar\n id=\"calendar\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [weekend]=\"weekend()\"\n [weekdays]=\"weekdays()\"\n [ngModel]=\"editingDateObj().date\"\n [minValue]=\"minValue\"\n [maxValue]=\"maxValue\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"\n (onValueChanged)=\"_handleCalendarOnValueChanged($event)\"\n [type]=\"_calendarSystem()\"\n >\n </ax-calendar>\n </div>\n }\n\n @if (_activePart() === 'time') {\n <div class=\"ax-picker-part\">\n <div class=\"ax-header\">\n @if (picker() === 'datetime') {\n {{ editingDateObj() | format: 'time' : '
|
|
489
|
+
], template: "@if (_hasDatePart && _hasTimePart) {\n <div class=\"ax-header\">\n <ax-tabs [look]=\"'default'\" [fitParent]=\"true\" [location]=\"'top'\" (onActiveTabChanged)=\"_handleViewChanged($event)\">\n <ax-tab-item\n [text]=\"'@acorex:dateTime.date' | translate | async\"\n [key]=\"'date'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n <ax-tab-item\n [text]=\"'@acorex:dateTime.time' | translate | async\"\n [key]=\"'time'\"\n [disabled]=\"disabled\"\n ></ax-tab-item>\n </ax-tabs>\n </div>\n}\n<div class=\"ax-content\">\n @if (_activePart() === 'date') {\n <div class=\"ax-calendar-part\">\n <ax-calendar\n #calendar\n id=\"calendar\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [weekend]=\"weekend()\"\n [weekdays]=\"weekdays()\"\n [ngModel]=\"editingDateObj().date\"\n [minValue]=\"minValue\"\n [maxValue]=\"maxValue\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleCalendarOnNavigate($event)\"\n (onValueChanged)=\"_handleCalendarOnValueChanged($event)\"\n [type]=\"_calendarSystem()\"\n >\n </ax-calendar>\n </div>\n }\n\n @if (_activePart() === 'time') {\n <div class=\"ax-picker-part\">\n <div class=\"ax-header\">\n @if (picker() === 'datetime') {\n {{ editingDateObj() | format: 'time' : 'short' | async }}\n {{ editingDateObj() | format: 'date' : 'short' | async }}\n } @else {\n {{ editingDateObj() | format: picker() : 'medium' | async }}\n }\n </div>\n <div dir=\"ltr\" class=\"ax-picker-time-container\">\n @if (_parts.hour.enabled) {\n <ng-container [ngTemplateOutlet]=\"hourRef\"> </ng-container>\n }\n\n @if (_parts.minute.enabled) {\n <ng-container [ngTemplateOutlet]=\"minuteRef\"> </ng-container>\n }\n\n @if (_parts.second.enabled) {\n <ng-container [ngTemplateOutlet]=\"secondRef\"> </ng-container>\n }\n </div>\n </div>\n }\n</div>\n@if (!disabled && !readonly && (currentTimeButton || _hasTimePart)) {\n <div class=\"ax-footer\">\n <div>\n @if (currentTimeButton) {\n <ax-button\n [text]=\"`@acorex:${buttonText()}` | translate | async\"\n class=\"ax-sm\"\n (onClick)=\"_handleNowClick()\"\n [disabled]=\"isTodayDisabled()\"\n ></ax-button>\n }\n </div>\n <div>\n @if (_hasTimePart) {\n <ax-button\n color=\"primary\"\n [text]=\"'@acorex:dateTime.set' | translate | async\"\n class=\"ax-sm\"\n (onClick)=\"_handleSetClick()\"\n ></ax-button>\n }\n </div>\n </div>\n}\n\n<ng-template #hourRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.hour' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"hours\"\n [ngModel]=\"editingDateObj().hour\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'hour')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerHoursMinValue()\"\n [maxValue]=\"pickerHoursMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n\n<ng-template #minuteRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.minute' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"minutes\"\n [ngModel]=\"editingDateObj().minute\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'minute')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerMinuteMinValue()\"\n [maxValue]=\"pickerMinuteMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n\n<ng-template #secondRef>\n <ax-picker-container>\n <ax-picker-title>\n <ax-text>{{ '@acorex:dateTime.units.second' | translate | async }}</ax-text>\n </ax-picker-title>\n <ax-picker-items\n [items]=\"minutes\"\n [ngModel]=\"editingDateObj().second\"\n (onValueChanged)=\"_handlePickerOnValueChanged($event, 'second')\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [minValue]=\"pickerSecondMinValue()\"\n [maxValue]=\"pickerSecondMaxValue()\"\n ></ax-picker-items>\n </ax-picker-container>\n</ng-template>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-datetime-picker{flex-direction:column;display:flex}ax-datetime-picker>.ax-header{padding-top:calc(var(--spacing,.25rem)*2);padding-right:calc(var(--spacing,.25rem)*2);padding-left:calc(var(--spacing,.25rem)*2);justify-content:center;display:flex}ax-datetime-picker>.ax-content{flex-direction:column;justify-content:center;align-items:center;width:100%;display:flex;overflow:hidden}@media (min-width:768px){ax-datetime-picker>.ax-content{width:calc(var(--spacing,.25rem)*80)}}ax-datetime-picker>.ax-content .ax-picker-part{flex-direction:column;width:100%;height:376px;display:flex}ax-datetime-picker>.ax-content .ax-picker-part .ax-picker-time-container{height:100%;display:flex}ax-datetime-picker>.ax-content .ax-picker-part>.ax-header{border-bottom-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-bottom-width:1px;border-bottom-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));padding:calc(var(--spacing,.25rem)*3);text-align:center;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-datetime-picker>.ax-content .ax-picker-part ax-picker{flex:1}ax-datetime-picker>.ax-content .ax-calendar-part{width:100%;padding-top:calc(var(--spacing,.25rem)*1);padding-bottom:calc(var(--spacing,.25rem)*1)}ax-datetime-picker>.ax-content .ax-calendar-part ax-calendar{width:100%}ax-datetime-picker>.ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));padding:calc(var(--spacing,.25rem)*2);justify-content:space-between;display:flex}ax-datetime-picker>.ax-footer ax-button{min-width:100%}app-demo-box .log-container{flex-direction:row-reverse;justify-content:space-between;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"] }]
|
|
490
490
|
}], propDecorators: { weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], weekdays: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekdays", required: false }] }], currentTimeButton: [{
|
|
491
491
|
type: Input
|
|
492
492
|
}], tabs: [{
|