@acorex/platform 20.4.1 → 20.5.0-next.0

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.
@@ -1012,6 +1012,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
1012
1012
  //#region ---- Tree Node Interface ----
1013
1013
  //#endregion
1014
1014
 
1015
+ //#region ---- Component ----
1016
+ /**
1017
+ * Color Palette Picker Component
1018
+ * Displays a grid of color swatches for selection
1019
+ */
1020
+ class AXPColorPalettePickerComponent {
1021
+ constructor() {
1022
+ //#region ---- Inputs ----
1023
+ /**
1024
+ * Array of color codes to display
1025
+ */
1026
+ this.colors = input([], ...(ngDevMode ? [{ debugName: "colors" }] : []));
1027
+ /**
1028
+ * Currently selected color
1029
+ */
1030
+ this.selectedColor = input(...(ngDevMode ? [undefined, { debugName: "selectedColor" }] : []));
1031
+ /**
1032
+ * Disable the entire palette
1033
+ */
1034
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
1035
+ /**
1036
+ * Make the palette readonly
1037
+ */
1038
+ this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
1039
+ //#endregion
1040
+ //#region ---- Outputs ----
1041
+ /**
1042
+ * Emits when a color is selected
1043
+ */
1044
+ this.colorSelected = output();
1045
+ }
1046
+ //#endregion
1047
+ //#region ---- Event Handlers ----
1048
+ /**
1049
+ * Handle color selection
1050
+ */
1051
+ handleColorSelect(color) {
1052
+ if (this.disabled() || this.readonly()) {
1053
+ return;
1054
+ }
1055
+ this.colorSelected.emit(color);
1056
+ }
1057
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPColorPalettePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1058
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPColorPalettePickerComponent, isStandalone: true, selector: "axp-color-palette-picker", inputs: { colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, selectedColor: { classPropertyName: "selectedColor", publicName: "selectedColor", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorSelected: "colorSelected" }, ngImport: i0, template: "<div class=\"axp-color-palette-picker\">\n <div class=\"__swatches\">\n @for (color of colors(); track color) {\n <button type=\"button\" class=\"__swatch\" [class.__selected]=\"selectedColor() === color\"\n [class.__disabled]=\"disabled() || readonly()\" [style.background-color]=\"color\"\n [disabled]=\"disabled() || readonly()\" (click)=\"handleColorSelect(color)\">\n @if (selectedColor() === color) {\n <svg class=\"__checkmark\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 13l4 4L19 7\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </button>\n }\n </div>\n</div>", styles: [".axp-color-palette-picker{width:100%}.axp-color-palette-picker .__swatches{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:.5rem}.axp-color-palette-picker .__swatches .__swatch{height:1.5rem;width:1.5rem;border-radius:9999px;border-width:2px;border-color:transparent;cursor:pointer;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;align-items:center;justify-content:center;position:relative}.axp-color-palette-picker .__swatches .__swatch:hover:not(.__disabled){--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 0 0 4px var(--ax-color-hover)}.axp-color-palette-picker .__swatches .__swatch:focus-visible:not(.__disabled){outline:2px solid var(--ax-color-primary);outline-offset:2px;box-shadow:0 0 0 4px var(--ax-color-primary-alpha-20)}.axp-color-palette-picker .__swatches .__swatch.__selected{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 0 0 4px var(--ax-color-primary-alpha-20);outline:1px solid var(--ax-color-border);outline-offset:0}.axp-color-palette-picker .__swatches .__swatch.__disabled{cursor:not-allowed;opacity:.5}.axp-color-palette-picker .__swatches .__swatch .__checkmark{height:1.25rem;width:1.25rem;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6)) drop-shadow(0 0 1px rgba(255,255,255,.3))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1059
+ }
1060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPColorPalettePickerComponent, decorators: [{
1061
+ type: Component,
1062
+ args: [{ selector: 'axp-color-palette-picker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "<div class=\"axp-color-palette-picker\">\n <div class=\"__swatches\">\n @for (color of colors(); track color) {\n <button type=\"button\" class=\"__swatch\" [class.__selected]=\"selectedColor() === color\"\n [class.__disabled]=\"disabled() || readonly()\" [style.background-color]=\"color\"\n [disabled]=\"disabled() || readonly()\" (click)=\"handleColorSelect(color)\">\n @if (selectedColor() === color) {\n <svg class=\"__checkmark\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 13l4 4L19 7\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </button>\n }\n </div>\n</div>", styles: [".axp-color-palette-picker{width:100%}.axp-color-palette-picker .__swatches{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:.5rem}.axp-color-palette-picker .__swatches .__swatch{height:1.5rem;width:1.5rem;border-radius:9999px;border-width:2px;border-color:transparent;cursor:pointer;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;align-items:center;justify-content:center;position:relative}.axp-color-palette-picker .__swatches .__swatch:hover:not(.__disabled){--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 0 0 4px var(--ax-color-hover)}.axp-color-palette-picker .__swatches .__swatch:focus-visible:not(.__disabled){outline:2px solid var(--ax-color-primary);outline-offset:2px;box-shadow:0 0 0 4px var(--ax-color-primary-alpha-20)}.axp-color-palette-picker .__swatches .__swatch.__selected{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 0 0 4px var(--ax-color-primary-alpha-20);outline:1px solid var(--ax-color-border);outline-offset:0}.axp-color-palette-picker .__swatches .__swatch.__disabled{cursor:not-allowed;opacity:.5}.axp-color-palette-picker .__swatches .__swatch .__checkmark{height:1.25rem;width:1.25rem;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6)) drop-shadow(0 0 1px rgba(255,255,255,.3))}\n"] }]
1063
+ }] });
1064
+
1015
1065
  class AXPQueryColumnsComponent {
1016
1066
  constructor() {
1017
1067
  this.columns = model([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
@@ -3154,7 +3204,7 @@ class AXPExtraPropertiesComponent {
3154
3204
  </axp-widgets-container>
3155
3205
  </div>
3156
3206
 
3157
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3207
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3158
3208
  }
3159
3209
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesComponent, decorators: [{
3160
3210
  type: Component,
@@ -3503,7 +3553,7 @@ class AXPExtraPropertiesSchemaComponent {
3503
3553
  return `${k}${i}`;
3504
3554
  }
3505
3555
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesSchemaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3506
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPExtraPropertiesSchemaComponent, isStandalone: true, selector: "axp-extra-properties-schema", inputs: { schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { schemaChange: "schemaChange" }, host: { classAttribute: "ax-flex ax-flex-1 ax-h-full ax-gap-4 ax-p-4" }, ngImport: i0, template: "<!-- Left Panel: list/manage properties -->\n<div class=\"ax-flex ax-flex-col ax-gap-3 ax-min-h-0 ax-h-full ax-w-2/3\">\n <div class=\"ax-overflow-y-auto ax-min-h-0 ax-h-full ax-pe-2 -ax-me-2\">\n <div cdkDropList (cdkDropListDropped)=\"handleDrop($event)\" class=\"ax-flex ax-flex-col ax-gap-3\">\n @for (item of schema(); track item.key) {\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center ax-rounded ax-border ax-p-3 ax-cursor-pointer ax-lightest-surface \"\n [class.!ax-lighter-surface]=\"item.key === selectedKey()\" (click)=\"handleSelect(item.key)\" cdkDrag\n [cdkDragDisabled]=\"false\">\n <div class=\"ax-col-span-12 md:ax-col-span-4 ax-flex ax-items-center ax-gap-3\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move ax-text-neutral-500\"\n cdkDragHandle></ax-icon>\n <div>\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n </div>\n </div>\n <div class=\"ax-col-span-12 md:ax-col-span-7 ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center\">\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-select-box [value]=\"item.type\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\"\n (onValueChanged)=\"handleUpdateType(item.key, $event.value)\"></ax-select-box>\n </ax-form-field>\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-text-box [ngModel]=\"item.title\"\n (onValueChanged)=\"handleUpdateTitle(item.key, $event.value)\"></ax-text-box>\n </ax-form-field>\n </div>\n <div class=\"ax-hidden md:ax-block md:ax-col-span-1 md:ax-justify-self-end\">\n <ax-button look=\"blank\" color=\"danger\" (onClick)=\"handleRemove(item.key)\">\n <ax-prefix><ax-icon class=\"fa-light fa-trash-can\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n } @else {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-1 ax-rounded ax-border ax-p-3\">\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n <div class=\"ax-col-span-12 ax-text-xs ax-text-muted\">{{ item.key }}</div>\n </div>\n }\n } @empty {\n <div class=\"ax-text-sm ax-text-gray-400\">{{ '@extra-properties:messages.no-schema-fields' | translate |\n async\n }}</div>\n }\n\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-end ax-mt-4 ax-border-t ax-border-dashed ax-pt-4\">\n <!-- Type -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.type' | translate | async }}</ax-label>\n <ax-select-box [ngModel]=\"newTypeId()\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\" (onValueChanged)=\"newTypeChanged($event.value)\"></ax-select-box>\n </ax-form-field>\n <!-- Title -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.title' | translate | async }}</ax-label>\n <ax-text-box [ngModel]=\"newTitle()\"\n (onValueChanged)=\"handleTitleChange($event.value)\"></ax-text-box>\n </ax-form-field>\n <!-- Add -->\n <div class=\"ax-col-span-12 ax-flex ax-justify-end\">\n <ax-button look=\"solid\" (onClick)=\"handleAdd()\" [disabled]=\"!canAdd()\"\n text=\"{{ '@extra-properties:actions.add-field' | translate | async }}\">\n <ax-prefix><ax-icon class=\"fa-solid fa-add\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n\n<!-- Right Panel: widget property viewer for selected item -->\n<div class=\"ax-w-1/3 ax-border ax-rounded ax-h-full ax-flex ax-flex-col ax-lightest-surface\">\n @if (mode() === 'edit' && selectedItem()) {\n <div class=\"ax-p-4 ax-font-semibold ax-border-b ax-lighter-surface\">\n {{selectedItem()?.title}}\n </div>\n <div class=\"ax-overflow-y-auto ax-flex-1\">\n <axp-widget-property-viewer [widget]=\"{ type: selectedItem()!.type, options: selectedItem()!.options }\"\n [mode]=\"'advanced'\" (onChanged)=\"handleViewerChanged($event)\" />\n </div>\n }\n @else {\n <div class=\"ax-text-sm ax-text-muted ax-p-4 ax-text-center\">{{ '@extra-properties:messages.select-field-to-edit' |\n translate | async }}</div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3556
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPExtraPropertiesSchemaComponent, isStandalone: true, selector: "axp-extra-properties-schema", inputs: { schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { schemaChange: "schemaChange" }, host: { classAttribute: "ax-flex ax-flex-1 ax-h-full ax-gap-4 ax-p-4" }, ngImport: i0, template: "<!-- Left Panel: list/manage properties -->\n<div class=\"ax-flex ax-flex-col ax-gap-3 ax-min-h-0 ax-h-full ax-w-2/3\">\n <div class=\"ax-overflow-y-auto ax-min-h-0 ax-h-full ax-pe-2 -ax-me-2\">\n <div cdkDropList (cdkDropListDropped)=\"handleDrop($event)\" class=\"ax-flex ax-flex-col ax-gap-3\">\n @for (item of schema(); track item.key) {\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center ax-rounded ax-border ax-p-3 ax-cursor-pointer ax-lightest-surface \"\n [class.!ax-lighter-surface]=\"item.key === selectedKey()\" (click)=\"handleSelect(item.key)\" cdkDrag\n [cdkDragDisabled]=\"false\">\n <div class=\"ax-col-span-12 md:ax-col-span-4 ax-flex ax-items-center ax-gap-3\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move ax-text-neutral-500\"\n cdkDragHandle></ax-icon>\n <div>\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n </div>\n </div>\n <div class=\"ax-col-span-12 md:ax-col-span-7 ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center\">\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-select-box [value]=\"item.type\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\"\n (onValueChanged)=\"handleUpdateType(item.key, $event.value)\"></ax-select-box>\n </ax-form-field>\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-text-box [ngModel]=\"item.title\"\n (onValueChanged)=\"handleUpdateTitle(item.key, $event.value)\"></ax-text-box>\n </ax-form-field>\n </div>\n <div class=\"ax-hidden md:ax-block md:ax-col-span-1 md:ax-justify-self-end\">\n <ax-button look=\"blank\" color=\"danger\" (onClick)=\"handleRemove(item.key)\">\n <ax-prefix><ax-icon class=\"fa-light fa-trash-can\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n } @else {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-1 ax-rounded ax-border ax-p-3\">\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n <div class=\"ax-col-span-12 ax-text-xs ax-text-muted\">{{ item.key }}</div>\n </div>\n }\n } @empty {\n <div class=\"ax-text-sm ax-text-gray-400\">{{ '@extra-properties:messages.no-schema-fields' | translate |\n async\n }}</div>\n }\n\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-end ax-mt-4 ax-border-t ax-border-dashed ax-pt-4\">\n <!-- Type -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.type' | translate | async }}</ax-label>\n <ax-select-box [ngModel]=\"newTypeId()\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\" (onValueChanged)=\"newTypeChanged($event.value)\"></ax-select-box>\n </ax-form-field>\n <!-- Title -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.title' | translate | async }}</ax-label>\n <ax-text-box [ngModel]=\"newTitle()\"\n (onValueChanged)=\"handleTitleChange($event.value)\"></ax-text-box>\n </ax-form-field>\n <!-- Add -->\n <div class=\"ax-col-span-12 ax-flex ax-justify-end\">\n <ax-button look=\"solid\" (onClick)=\"handleAdd()\" [disabled]=\"!canAdd()\"\n text=\"{{ '@extra-properties:actions.add-field' | translate | async }}\">\n <ax-prefix><ax-icon class=\"fa-solid fa-add\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n\n<!-- Right Panel: widget property viewer for selected item -->\n<div class=\"ax-w-1/3 ax-border ax-rounded ax-h-full ax-flex ax-flex-col ax-lightest-surface\">\n @if (mode() === 'edit' && selectedItem()) {\n <div class=\"ax-p-4 ax-font-semibold ax-border-b ax-lighter-surface\">\n {{selectedItem()?.title}}\n </div>\n <div class=\"ax-overflow-y-auto ax-flex-1\">\n <axp-widget-property-viewer [widget]=\"{ type: selectedItem()!.type, options: selectedItem()!.options }\"\n [mode]=\"'advanced'\" (onChanged)=\"handleViewerChanged($event)\" />\n </div>\n }\n @else {\n <div class=\"ax-text-sm ax-text-muted ax-p-4 ax-text-center\">{{ '@extra-properties:messages.select-field-to-edit' |\n translate | async }}</div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3507
3557
  }
3508
3558
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesSchemaComponent, decorators: [{
3509
3559
  type: Component,
@@ -3932,7 +3982,7 @@ class AXPQueryFiltersComponent {
3932
3982
  }
3933
3983
  #effect2;
3934
3984
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3935
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQueryFiltersComponent, isStandalone: true, selector: "axp-query-filters", inputs: { filtersDefinitions: { classPropertyName: "filtersDefinitions", publicName: "filtersDefinitions", isSignal: true, isRequired: false, transformFunction: null }, initialFilters: { classPropertyName: "initialFilters", publicName: "initialFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFiltersChanged: "onFiltersChanged" }, viewQueries: [{ propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ["caseItem"], descendants: true }], ngImport: i0, template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [readonly]=\"filtersDefinitions().length === 0\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"\n (filtersDefinitions().length === 0\n ? '@general:terms.interface.filter.no-filter-definitions'\n : '@general:terms.interface.filter.placeholder'\n )\n | translate\n | async\n \"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n (onOpened)=\"onPopoverOpened($event)\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div\n class=\"md:ax-min-w-72 ax-border ax-surface ax-w-full ax-rounded-md md:ax-max-h-96 ax-max-w-80 md:ax-overflow-auto\"\n >\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options,\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button\n class=\"ax-xs\"\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (onClick)=\"handleApplyFilter()\"\n ></ax-button>\n </ax-footer>\n </div>\n } @else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if (tagBox.inputValue()) {\n @for (inlineFilter of inlineFilters(); track inlineFilter.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{\n tagBox.inputValue()\n }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n }\n @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-query-filters{width:100%}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: AXTranslationModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$5.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSelectionListModule }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i5$3.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i7.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i7.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i8.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3985
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQueryFiltersComponent, isStandalone: true, selector: "axp-query-filters", inputs: { filtersDefinitions: { classPropertyName: "filtersDefinitions", publicName: "filtersDefinitions", isSignal: true, isRequired: false, transformFunction: null }, initialFilters: { classPropertyName: "initialFilters", publicName: "initialFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFiltersChanged: "onFiltersChanged" }, viewQueries: [{ propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ["caseItem"], descendants: true }], ngImport: i0, template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [readonly]=\"filtersDefinitions().length === 0\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"\n (filtersDefinitions().length === 0\n ? '@general:terms.interface.filter.no-filter-definitions'\n : '@general:terms.interface.filter.placeholder'\n )\n | translate\n | async\n \"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n (onOpened)=\"onPopoverOpened($event)\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div\n class=\"md:ax-min-w-72 ax-border ax-surface ax-w-full ax-rounded-md md:ax-max-h-96 ax-max-w-80 md:ax-overflow-auto\"\n >\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options,\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button\n class=\"ax-xs\"\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (onClick)=\"handleApplyFilter()\"\n ></ax-button>\n </ax-footer>\n </div>\n } @else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if (tagBox.inputValue()) {\n @for (inlineFilter of inlineFilters(); track inlineFilter.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{\n tagBox.inputValue()\n }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n }\n @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-query-filters{width:100%}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: AXTranslationModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$5.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSelectionListModule }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i5$3.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i7.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i7.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i8.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3936
3986
  }
3937
3987
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryFiltersComponent, decorators: [{
3938
3988
  type: Component,
@@ -4432,28 +4482,566 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
4432
4482
  }]
4433
4483
  }] });
4434
4484
 
4435
- const AXP_USER_AVATAR_PROVIDER = new InjectionToken('AXP_USER_AVATAR_PROVIDER', {
4436
- providedIn: 'root',
4437
- factory: () => {
4438
- return new AXPUserAvatarProviderDefault();
4485
+ class AXPTreeListItemComponent {
4486
+ constructor() {
4487
+ // Inputs
4488
+ this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
4489
+ this.level = input(0, ...(ngDevMode ? [{ debugName: "level" }] : []));
4490
+ this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
4491
+ this.look = input('default', ...(ngDevMode ? [{ debugName: "look" }] : []));
4492
+ this.expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
4493
+ this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
4494
+ this.dragState = input.required(...(ngDevMode ? [{ debugName: "dragState" }] : []));
4495
+ this.expandedNodes = input.required(...(ngDevMode ? [{ debugName: "expandedNodes" }] : []));
4496
+ this.selectedNodes = input.required(...(ngDevMode ? [{ debugName: "selectedNodes" }] : []));
4497
+ this.isLastChild = input(false, ...(ngDevMode ? [{ debugName: "isLastChild" }] : []));
4498
+ // Outputs
4499
+ this.dragStart = output();
4500
+ this.dragOver = output();
4501
+ this.dragEnd = output();
4502
+ this.dragCancel = output();
4503
+ this.nodeClick = output();
4504
+ this.toggle = output();
4505
+ this.select = output();
4506
+ // Internal state
4507
+ this.dropPosition = signal(null, ...(ngDevMode ? [{ debugName: "dropPosition" }] : []));
4508
+ this.dragOverZone = signal(null, ...(ngDevMode ? [{ debugName: "dragOverZone" }] : []));
4509
+ // Computed
4510
+ this.hasChildren = computed(() => {
4511
+ const children = this.node().children;
4512
+ return children && children.length > 0;
4513
+ }, ...(ngDevMode ? [{ debugName: "hasChildren" }] : []));
4514
+ this.isDragging = computed(() => {
4515
+ const state = this.dragState();
4516
+ return state.isDragging && state.dragNode?.id === this.node().id;
4517
+ }, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
4518
+ this.isDragOver = computed(() => {
4519
+ const state = this.dragState();
4520
+ return state.isDragging && state.dropTarget?.id === this.node().id;
4521
+ }, ...(ngDevMode ? [{ debugName: "isDragOver" }] : []));
4522
+ this.canDrop = computed(() => {
4523
+ const state = this.dragState();
4524
+ return this.isDragOver() && state.canDrop;
4525
+ }, ...(ngDevMode ? [{ debugName: "canDrop" }] : []));
4526
+ this.indentStyle = computed(() => ({
4527
+ paddingLeft: `${this.level() * this.config().indentSize}px`,
4528
+ }), ...(ngDevMode ? [{ debugName: "indentStyle" }] : []));
4529
+ this.showExpandIcon = computed(() => {
4530
+ return this.config().expandable && this.hasChildren();
4531
+ }, ...(ngDevMode ? [{ debugName: "showExpandIcon" }] : []));
4532
+ this.visibleActions = computed(() => {
4533
+ return this.node().actions?.filter((action) => action.visible !== false) || [];
4534
+ }, ...(ngDevMode ? [{ debugName: "visibleActions" }] : []));
4535
+ }
4536
+ // Checkbox model for two-way binding
4537
+ get checkboxValue() {
4538
+ return this.selected();
4539
+ }
4540
+ set checkboxValue(value) {
4541
+ if (value !== this.selected()) {
4542
+ this.select.emit(this.node());
4543
+ }
4439
4544
  }
4440
- });
4441
- class AXPUserAvatarProviderDefault {
4442
- provide(userId) {
4443
- return Promise.resolve({
4444
- id: userId,
4445
- username: 'johndoe',
4446
- firstName: 'John',
4447
- lastName: 'Doe',
4448
- status: 'online',
4449
- avatarUrl: 'https://via.placeholder.com/150',
4545
+ // Drag and drop handlers
4546
+ onDragStart(event) {
4547
+ if (!this.config().dragEnabled || this.node().disabled || this.node().draggable === false) {
4548
+ event.preventDefault();
4549
+ return;
4550
+ }
4551
+ event.stopPropagation();
4552
+ if (event.dataTransfer) {
4553
+ event.dataTransfer.effectAllowed = 'move';
4554
+ event.dataTransfer.setData('text/plain', this.node().id);
4555
+ // Create drag image from the entire item content
4556
+ const itemContent = event.target.closest('.axp-tree-list-item-content');
4557
+ if (itemContent) {
4558
+ const dragImage = itemContent.cloneNode(true);
4559
+ dragImage.style.position = 'absolute';
4560
+ dragImage.style.top = '-9999px';
4561
+ dragImage.style.opacity = '0.8';
4562
+ dragImage.style.pointerEvents = 'none';
4563
+ document.body.appendChild(dragImage);
4564
+ event.dataTransfer.setDragImage(dragImage, 20, 20);
4565
+ setTimeout(() => document.body.removeChild(dragImage), 0);
4566
+ }
4567
+ }
4568
+ this.dragStart.emit(this.node());
4569
+ }
4570
+ onDragOver(event) {
4571
+ if (!this.config().dragEnabled) {
4572
+ return;
4573
+ }
4574
+ event.preventDefault();
4575
+ event.stopPropagation();
4576
+ const state = this.dragState();
4577
+ if (!state.isDragging || !state.dragNode) {
4578
+ return;
4579
+ }
4580
+ // Calculate drop position based on mouse position
4581
+ const rect = event.currentTarget.getBoundingClientRect();
4582
+ const y = event.clientY - rect.top;
4583
+ const height = rect.height;
4584
+ const threshold = height / 3;
4585
+ let position;
4586
+ let zone;
4587
+ if (y < threshold) {
4588
+ position = 'before';
4589
+ zone = 'top';
4590
+ }
4591
+ else if (y > height - threshold) {
4592
+ position = 'after';
4593
+ zone = 'bottom';
4594
+ }
4595
+ else {
4596
+ position = 'inside';
4597
+ zone = 'middle';
4598
+ }
4599
+ // Don't allow dropping inside if node doesn't accept children
4600
+ if (position === 'inside' && this.node().droppable === false) {
4601
+ position = y < height / 2 ? 'before' : 'after';
4602
+ zone = y < height / 2 ? 'top' : 'bottom';
4603
+ }
4604
+ this.dropPosition.set(position);
4605
+ this.dragOverZone.set(zone);
4606
+ this.dragOver.emit({ node: this.node(), position });
4607
+ if (event.dataTransfer) {
4608
+ event.dataTransfer.dropEffect = state.canDrop ? 'move' : 'none';
4609
+ }
4610
+ }
4611
+ onDragLeave(event) {
4612
+ event.stopPropagation();
4613
+ // Only clear if we're actually leaving this element
4614
+ const relatedTarget = event.relatedTarget;
4615
+ if (!relatedTarget || !event.currentTarget.contains(relatedTarget)) {
4616
+ this.dropPosition.set(null);
4617
+ this.dragOverZone.set(null);
4618
+ }
4619
+ }
4620
+ onDrop(event) {
4621
+ event.preventDefault();
4622
+ event.stopPropagation();
4623
+ this.dropPosition.set(null);
4624
+ this.dragOverZone.set(null);
4625
+ this.dragEnd.emit();
4626
+ }
4627
+ onDragEnd(event) {
4628
+ event.stopPropagation();
4629
+ this.dropPosition.set(null);
4630
+ this.dragOverZone.set(null);
4631
+ this.dragEnd.emit();
4632
+ }
4633
+ // Node interaction handlers
4634
+ onToggleClick(event) {
4635
+ event.stopPropagation();
4636
+ if (this.config().expandable && this.hasChildren()) {
4637
+ this.toggle.emit(this.node());
4638
+ }
4639
+ }
4640
+ onContentClick(event) {
4641
+ if (!this.node().disabled) {
4642
+ this.nodeClick.emit(this.node());
4643
+ if (this.node().selectable !== false) {
4644
+ this.select.emit(this.node());
4645
+ }
4646
+ }
4647
+ }
4648
+ onActionClick(event, action) {
4649
+ event.stopPropagation();
4650
+ if (!action.disabled && action.onClick) {
4651
+ action.onClick(this.node());
4652
+ }
4653
+ }
4654
+ // Helper methods
4655
+ getDropIndicatorClass() {
4656
+ const zone = this.dragOverZone();
4657
+ const canDrop = this.canDrop();
4658
+ if (!zone || !canDrop) {
4659
+ return '';
4660
+ }
4661
+ return `axp-tree-list-item-drop-${zone}`;
4662
+ }
4663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTreeListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4664
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPTreeListItemComponent, isStandalone: true, selector: "axp-tree-list-item", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, dragState: { classPropertyName: "dragState", publicName: "dragState", isSignal: true, isRequired: true, transformFunction: null }, expandedNodes: { classPropertyName: "expandedNodes", publicName: "expandedNodes", isSignal: true, isRequired: true, transformFunction: null }, selectedNodes: { classPropertyName: "selectedNodes", publicName: "selectedNodes", isSignal: true, isRequired: true, transformFunction: null }, isLastChild: { classPropertyName: "isLastChild", publicName: "isLastChild", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dragStart: "dragStart", dragOver: "dragOver", dragEnd: "dragEnd", dragCancel: "dragCancel", nodeClick: "nodeClick", toggle: "toggle", select: "select" }, host: { properties: { "class.axp-tree-list-item-expanded": "expanded()", "class.axp-tree-list-item-collapsed": "!expanded() && hasChildren()", "class.axp-tree-list-item-selected": "selected()", "class.axp-tree-list-item-disabled": "node().disabled", "class.axp-tree-list-item-dragging": "isDragging()", "class.axp-tree-list-item-drag-over": "isDragOver()", "class.axp-tree-list-item-can-drop": "canDrop()", "attr.data-level": "level()", "attr.data-node-id": "node().id" }, classAttribute: "axp-tree-list-item" }, ngImport: i0, template: "<div\n class=\"axp-tree-list-item-wrapper\"\n [class]=\"getDropIndicatorClass()\"\n [style.--indent]=\"level() * config().indentSize + 'px'\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Tree lines -->\n @if (config().showLines && level() > 0) {\n <div class=\"axp-tree-list-item-lines\">\n <!-- Vertical line -->\n <div\n class=\"axp-tree-list-item-line-vertical\"\n [class.last-child]=\"isLastChild()\"\n [style.left.px]=\"(level() - 1) * config().indentSize + 12\"\n ></div>\n <!-- Horizontal line -->\n <div class=\"axp-tree-list-item-line-horizontal\" [style.left.px]=\"(level() - 1) * config().indentSize + 12\"></div>\n </div>\n }\n\n <div class=\"axp-tree-list-item-content\" [ngStyle]=\"indentStyle()\" (click)=\"onContentClick($event)\">\n <!-- Expand/Collapse Icon -->\n @if (showExpandIcon()) {\n <ax-button\n class=\"axp-tree-list-item-toggle\"\n [class.axp-tree-list-item-toggle-expanded]=\"expanded()\"\n (click)=\"onToggleClick($event)\"\n mode=\"text\"\n size=\"sm\"\n >\n <i class=\"fa-light\" [class.fa-chevron-right]=\"!expanded()\" [class.fa-chevron-down]=\"expanded()\"></i>\n </ax-button>\n } @else if (config().expandable) {\n <span class=\"axp-tree-list-item-toggle-placeholder\"></span>\n }\n\n <!-- Drag Indicator -->\n @if (config().dragEnabled && config().showDragIndicator && !node().disabled && node().draggable !== false) {\n <div\n class=\"axp-tree-list-item-drag-handle\"\n [attr.draggable]=\"true\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\"\n >\n <i class=\"fa-light fa-grip-vertical\"></i>\n </div>\n }\n\n <!-- Checkbox -->\n @if (config().showCheckboxes) {\n <div class=\"axp-tree-list-item-checkbox\" (click)=\"$event.stopPropagation()\">\n <ax-check-box [(ngModel)]=\"checkboxValue\" />\n </div>\n }\n\n <!-- Icon -->\n @if (config().showIcons && node().icon) {\n <div class=\"axp-tree-list-item-icon\">\n <i [class]=\"node().icon\"></i>\n </div>\n }\n\n <!-- Content -->\n <div class=\"axp-tree-list-item-main\">\n <div class=\"axp-tree-list-item-title\">\n <span>{{ node().title }}</span>\n\n <!-- Badge -->\n @if (config().showBadges && node().badge) {\n <ax-badge [color]=\"node().badge?.color || 'primary'\" [text]=\"node().badge?.text ?? ''\"></ax-badge>\n }\n </div>\n\n <!-- Description -->\n @if (config().showDescription && node().description) {\n <div class=\"axp-tree-list-item-description\">\n {{ node().description }}\n </div>\n }\n </div>\n\n <!-- Actions -->\n @if (config().showActions && visibleActions().length > 0) {\n <div class=\"axp-tree-list-item-actions\">\n @for (action of visibleActions(); track action.id) {\n <ax-button\n class=\"axp-tree-list-item-action\"\n [disabled]=\"action.disabled\"\n [color]=\"action.color || 'secondary'\"\n [title]=\"action.text\"\n (click)=\"onActionClick($event, action)\"\n mode=\"text\"\n size=\"sm\"\n >\n @if (action.icon) {\n <i [class]=\"action.icon\"></i>\n }\n </ax-button>\n }\n </div>\n }\n </div>\n\n <!-- Drop Indicators -->\n @if (canDrop()) {\n <div class=\"axp-tree-list-item-drop-indicator\" [attr.data-position]=\"dropPosition()\"></div>\n }\n</div>\n\n<!-- Children -->\n@if (hasChildren() && expanded()) {\n <div class=\"axp-tree-list-item-children\">\n @for (child of node().children; track child.id; let isLast = $last) {\n <axp-tree-list-item\n [node]=\"child\"\n [level]=\"level() + 1\"\n [config]=\"config()\"\n [look]=\"look()\"\n [expanded]=\"expandedNodes().has(child.id)\"\n [selected]=\"selectedNodes().has(child.id)\"\n [dragState]=\"dragState()\"\n [expandedNodes]=\"expandedNodes()\"\n [selectedNodes]=\"selectedNodes()\"\n [isLastChild]=\"isLast\"\n (dragStart)=\"dragStart.emit($event)\"\n (dragOver)=\"dragOver.emit($event)\"\n (dragEnd)=\"dragEnd.emit()\"\n (dragCancel)=\"dragCancel.emit()\"\n (nodeClick)=\"nodeClick.emit($event)\"\n (toggle)=\"toggle.emit($event)\"\n (select)=\"select.emit($event)\"\n />\n }\n </div>\n}\n", styles: [".axp-tree-list-item{display:block;position:relative}.axp-tree-list-item-wrapper{position:relative;transition:all .2s ease}.axp-tree-list-item-content{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;min-height:2.5rem;cursor:pointer;transition:all .15s ease;border-radius:4px;position:relative;z-index:1}.axp-tree-list-item-content:hover{background-color:var(--ax-color-hover)}.axp-tree-list-item-content:active{background-color:var(--ax-color-active)}.axp-tree-list-item-selected .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary);font-weight:500}.axp-tree-list-item-disabled .axp-tree-list-item-content{opacity:.5;cursor:not-allowed;pointer-events:none}.axp-tree-list-item-toggle{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border:none;background:none;cursor:pointer;color:var(--ax-color-text-secondary);transition:all .15s ease;border-radius:2px;flex-shrink:0}.axp-tree-list-item-toggle:hover{background-color:var(--ax-color-hover);color:var(--ax-color-text-primary)}.axp-tree-list-item-toggle i{font-size:.75rem;transition:transform .2s ease}.axp-tree-list-item-toggle-expanded i{transform:rotate(0)}.axp-tree-list-item-toggle-placeholder{width:1.25rem;height:1.25rem;flex-shrink:0}.axp-tree-list-item-drag-handle{display:flex;align-items:center;justify-content:center;width:1rem;color:var(--ax-color-text-tertiary);cursor:grab;flex-shrink:0;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.axp-tree-list-item-drag-handle:active{cursor:grabbing}.axp-tree-list-item-drag-handle i{font-size:.975rem;pointer-events:none}.axp-tree-list-item-dragging{opacity:.5}.axp-tree-list-item-dragging .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);border:2px dashed var(--ax-color-primary)}.axp-tree-list-item-drag-over .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-5)}.axp-tree-list-item-checkbox{display:flex;align-items:center;flex-shrink:0}.axp-tree-list-item-checkbox input[type=checkbox]{width:1rem;height:1rem;cursor:pointer}.axp-tree-list-item-icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;color:var(--ax-color-text-secondary);flex-shrink:0}.axp-tree-list-item-icon i{font-size:1.125rem}.axp-tree-list-item-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.axp-tree-list-item-title{display:flex;align-items:center;gap:1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-tree-list-item-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-tree-list-item-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;font-size:.75rem;font-weight:600;border-radius:9999px;flex-shrink:0}.axp-tree-list-item-badge[data-color=primary]{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary)}.axp-tree-list-item-badge[data-color=secondary]{background-color:var(--ax-color-secondary-alpha-10);color:var(--ax-color-secondary)}.axp-tree-list-item-badge[data-color=success]{background-color:var(--ax-color-success-alpha-10);color:var(--ax-color-success)}.axp-tree-list-item-badge[data-color=danger]{background-color:var(--ax-color-danger-alpha-10);color:var(--ax-color-danger)}.axp-tree-list-item-badge[data-color=warning]{background-color:var(--ax-color-warning-alpha-10);color:var(--ax-color-warning)}.axp-tree-list-item-badge[data-color=info]{background-color:var(--ax-color-info-alpha-10);color:var(--ax-color-info)}.axp-tree-list-item-description{font-size:.75rem;line-height:1rem;color:var(--ax-color-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-tree-list-item-actions{display:flex;align-items:center;gap:.25rem;margin-left:auto;flex-shrink:0;opacity:0;transition:opacity .15s ease}.axp-tree-list-item-content:hover .axp-tree-list-item-actions{opacity:1}.axp-tree-list-item-action{display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;background:none;cursor:pointer;border-radius:4px;transition:all .15s ease;color:var(--ax-color-text-secondary)}.axp-tree-list-item-action:hover{background-color:var(--ax-color-hover);color:var(--ax-color-text-primary)}.axp-tree-list-item-action[data-color=danger]:hover{background-color:var(--ax-color-danger-alpha-10);color:var(--ax-color-danger)}.axp-tree-list-item-action[data-color=success]:hover{background-color:var(--ax-color-success-alpha-10);color:var(--ax-color-success)}.axp-tree-list-item-action[data-color=warning]:hover{background-color:var(--ax-color-warning-alpha-10);color:var(--ax-color-warning)}.axp-tree-list-item-action[data-color=primary]:hover{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary)}.axp-tree-list-item-action-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.axp-tree-list-item-action i{font-size:.975rem}.axp-tree-list-item-children{overflow:hidden;animation:expandCollapse .2s ease}.axp-tree-list-item-drop-indicator{position:absolute;left:0;right:0;height:2px;background-color:var(--ax-color-primary);pointer-events:none;z-index:10}.axp-tree-list-item-drop-indicator:before{content:\"\";position:absolute;left:0;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--ax-color-primary)}.axp-tree-list-item-drop-indicator[data-position=before]{top:-1px}.axp-tree-list-item-drop-indicator[data-position=after]{bottom:-1px}.axp-tree-list-item-drop-indicator[data-position=inside]{display:none}.axp-tree-list-item-drop-top{border-top:2px solid var(--ax-color-primary)}.axp-tree-list-item-drop-bottom{border-bottom:2px solid var(--ax-color-primary)}.axp-tree-list-item-drop-middle.axp-tree-list-item-can-drop .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);border:2px dashed var(--ax-color-primary)}.axp-tree-list-lines .axp-tree-list-item,.axp-tree-list-item-children{position:relative}.axp-tree-list-item-lines{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0}.axp-tree-list-item-line-vertical{position:absolute;top:0;bottom:0;width:1px;background-color:var(--ax-color-border, #d0d0d0)}.axp-tree-list-item-line-vertical.last-child{bottom:50%}.axp-tree-list-item-line-horizontal{position:absolute;top:50%;width:12px;height:1px;background-color:var(--ax-color-border, #d0d0d0)}@keyframes expandCollapse{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "component", type: AXPTreeListItemComponent, selector: "axp-tree-list-item", inputs: ["node", "level", "config", "look", "expanded", "selected", "dragState", "expandedNodes", "selectedNodes", "isLastChild"], outputs: ["dragStart", "dragOver", "dragEnd", "dragCancel", "nodeClick", "toggle", "select"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.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: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2$3.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i8.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4665
+ }
4666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTreeListItemComponent, decorators: [{
4667
+ type: Component,
4668
+ args: [{ selector: 'axp-tree-list-item', standalone: true, imports: [CommonModule, FormsModule, AXButtonModule, AXCheckBoxModule, AXBadgeModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
4669
+ class: 'axp-tree-list-item',
4670
+ '[class.axp-tree-list-item-expanded]': 'expanded()',
4671
+ '[class.axp-tree-list-item-collapsed]': '!expanded() && hasChildren()',
4672
+ '[class.axp-tree-list-item-selected]': 'selected()',
4673
+ '[class.axp-tree-list-item-disabled]': 'node().disabled',
4674
+ '[class.axp-tree-list-item-dragging]': 'isDragging()',
4675
+ '[class.axp-tree-list-item-drag-over]': 'isDragOver()',
4676
+ '[class.axp-tree-list-item-can-drop]': 'canDrop()',
4677
+ '[attr.data-level]': 'level()',
4678
+ '[attr.data-node-id]': 'node().id',
4679
+ }, template: "<div\n class=\"axp-tree-list-item-wrapper\"\n [class]=\"getDropIndicatorClass()\"\n [style.--indent]=\"level() * config().indentSize + 'px'\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Tree lines -->\n @if (config().showLines && level() > 0) {\n <div class=\"axp-tree-list-item-lines\">\n <!-- Vertical line -->\n <div\n class=\"axp-tree-list-item-line-vertical\"\n [class.last-child]=\"isLastChild()\"\n [style.left.px]=\"(level() - 1) * config().indentSize + 12\"\n ></div>\n <!-- Horizontal line -->\n <div class=\"axp-tree-list-item-line-horizontal\" [style.left.px]=\"(level() - 1) * config().indentSize + 12\"></div>\n </div>\n }\n\n <div class=\"axp-tree-list-item-content\" [ngStyle]=\"indentStyle()\" (click)=\"onContentClick($event)\">\n <!-- Expand/Collapse Icon -->\n @if (showExpandIcon()) {\n <ax-button\n class=\"axp-tree-list-item-toggle\"\n [class.axp-tree-list-item-toggle-expanded]=\"expanded()\"\n (click)=\"onToggleClick($event)\"\n mode=\"text\"\n size=\"sm\"\n >\n <i class=\"fa-light\" [class.fa-chevron-right]=\"!expanded()\" [class.fa-chevron-down]=\"expanded()\"></i>\n </ax-button>\n } @else if (config().expandable) {\n <span class=\"axp-tree-list-item-toggle-placeholder\"></span>\n }\n\n <!-- Drag Indicator -->\n @if (config().dragEnabled && config().showDragIndicator && !node().disabled && node().draggable !== false) {\n <div\n class=\"axp-tree-list-item-drag-handle\"\n [attr.draggable]=\"true\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\"\n >\n <i class=\"fa-light fa-grip-vertical\"></i>\n </div>\n }\n\n <!-- Checkbox -->\n @if (config().showCheckboxes) {\n <div class=\"axp-tree-list-item-checkbox\" (click)=\"$event.stopPropagation()\">\n <ax-check-box [(ngModel)]=\"checkboxValue\" />\n </div>\n }\n\n <!-- Icon -->\n @if (config().showIcons && node().icon) {\n <div class=\"axp-tree-list-item-icon\">\n <i [class]=\"node().icon\"></i>\n </div>\n }\n\n <!-- Content -->\n <div class=\"axp-tree-list-item-main\">\n <div class=\"axp-tree-list-item-title\">\n <span>{{ node().title }}</span>\n\n <!-- Badge -->\n @if (config().showBadges && node().badge) {\n <ax-badge [color]=\"node().badge?.color || 'primary'\" [text]=\"node().badge?.text ?? ''\"></ax-badge>\n }\n </div>\n\n <!-- Description -->\n @if (config().showDescription && node().description) {\n <div class=\"axp-tree-list-item-description\">\n {{ node().description }}\n </div>\n }\n </div>\n\n <!-- Actions -->\n @if (config().showActions && visibleActions().length > 0) {\n <div class=\"axp-tree-list-item-actions\">\n @for (action of visibleActions(); track action.id) {\n <ax-button\n class=\"axp-tree-list-item-action\"\n [disabled]=\"action.disabled\"\n [color]=\"action.color || 'secondary'\"\n [title]=\"action.text\"\n (click)=\"onActionClick($event, action)\"\n mode=\"text\"\n size=\"sm\"\n >\n @if (action.icon) {\n <i [class]=\"action.icon\"></i>\n }\n </ax-button>\n }\n </div>\n }\n </div>\n\n <!-- Drop Indicators -->\n @if (canDrop()) {\n <div class=\"axp-tree-list-item-drop-indicator\" [attr.data-position]=\"dropPosition()\"></div>\n }\n</div>\n\n<!-- Children -->\n@if (hasChildren() && expanded()) {\n <div class=\"axp-tree-list-item-children\">\n @for (child of node().children; track child.id; let isLast = $last) {\n <axp-tree-list-item\n [node]=\"child\"\n [level]=\"level() + 1\"\n [config]=\"config()\"\n [look]=\"look()\"\n [expanded]=\"expandedNodes().has(child.id)\"\n [selected]=\"selectedNodes().has(child.id)\"\n [dragState]=\"dragState()\"\n [expandedNodes]=\"expandedNodes()\"\n [selectedNodes]=\"selectedNodes()\"\n [isLastChild]=\"isLast\"\n (dragStart)=\"dragStart.emit($event)\"\n (dragOver)=\"dragOver.emit($event)\"\n (dragEnd)=\"dragEnd.emit()\"\n (dragCancel)=\"dragCancel.emit()\"\n (nodeClick)=\"nodeClick.emit($event)\"\n (toggle)=\"toggle.emit($event)\"\n (select)=\"select.emit($event)\"\n />\n }\n </div>\n}\n", styles: [".axp-tree-list-item{display:block;position:relative}.axp-tree-list-item-wrapper{position:relative;transition:all .2s ease}.axp-tree-list-item-content{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;min-height:2.5rem;cursor:pointer;transition:all .15s ease;border-radius:4px;position:relative;z-index:1}.axp-tree-list-item-content:hover{background-color:var(--ax-color-hover)}.axp-tree-list-item-content:active{background-color:var(--ax-color-active)}.axp-tree-list-item-selected .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary);font-weight:500}.axp-tree-list-item-disabled .axp-tree-list-item-content{opacity:.5;cursor:not-allowed;pointer-events:none}.axp-tree-list-item-toggle{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border:none;background:none;cursor:pointer;color:var(--ax-color-text-secondary);transition:all .15s ease;border-radius:2px;flex-shrink:0}.axp-tree-list-item-toggle:hover{background-color:var(--ax-color-hover);color:var(--ax-color-text-primary)}.axp-tree-list-item-toggle i{font-size:.75rem;transition:transform .2s ease}.axp-tree-list-item-toggle-expanded i{transform:rotate(0)}.axp-tree-list-item-toggle-placeholder{width:1.25rem;height:1.25rem;flex-shrink:0}.axp-tree-list-item-drag-handle{display:flex;align-items:center;justify-content:center;width:1rem;color:var(--ax-color-text-tertiary);cursor:grab;flex-shrink:0;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.axp-tree-list-item-drag-handle:active{cursor:grabbing}.axp-tree-list-item-drag-handle i{font-size:.975rem;pointer-events:none}.axp-tree-list-item-dragging{opacity:.5}.axp-tree-list-item-dragging .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);border:2px dashed var(--ax-color-primary)}.axp-tree-list-item-drag-over .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-5)}.axp-tree-list-item-checkbox{display:flex;align-items:center;flex-shrink:0}.axp-tree-list-item-checkbox input[type=checkbox]{width:1rem;height:1rem;cursor:pointer}.axp-tree-list-item-icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;color:var(--ax-color-text-secondary);flex-shrink:0}.axp-tree-list-item-icon i{font-size:1.125rem}.axp-tree-list-item-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.axp-tree-list-item-title{display:flex;align-items:center;gap:1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-tree-list-item-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-tree-list-item-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;font-size:.75rem;font-weight:600;border-radius:9999px;flex-shrink:0}.axp-tree-list-item-badge[data-color=primary]{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary)}.axp-tree-list-item-badge[data-color=secondary]{background-color:var(--ax-color-secondary-alpha-10);color:var(--ax-color-secondary)}.axp-tree-list-item-badge[data-color=success]{background-color:var(--ax-color-success-alpha-10);color:var(--ax-color-success)}.axp-tree-list-item-badge[data-color=danger]{background-color:var(--ax-color-danger-alpha-10);color:var(--ax-color-danger)}.axp-tree-list-item-badge[data-color=warning]{background-color:var(--ax-color-warning-alpha-10);color:var(--ax-color-warning)}.axp-tree-list-item-badge[data-color=info]{background-color:var(--ax-color-info-alpha-10);color:var(--ax-color-info)}.axp-tree-list-item-description{font-size:.75rem;line-height:1rem;color:var(--ax-color-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axp-tree-list-item-actions{display:flex;align-items:center;gap:.25rem;margin-left:auto;flex-shrink:0;opacity:0;transition:opacity .15s ease}.axp-tree-list-item-content:hover .axp-tree-list-item-actions{opacity:1}.axp-tree-list-item-action{display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;background:none;cursor:pointer;border-radius:4px;transition:all .15s ease;color:var(--ax-color-text-secondary)}.axp-tree-list-item-action:hover{background-color:var(--ax-color-hover);color:var(--ax-color-text-primary)}.axp-tree-list-item-action[data-color=danger]:hover{background-color:var(--ax-color-danger-alpha-10);color:var(--ax-color-danger)}.axp-tree-list-item-action[data-color=success]:hover{background-color:var(--ax-color-success-alpha-10);color:var(--ax-color-success)}.axp-tree-list-item-action[data-color=warning]:hover{background-color:var(--ax-color-warning-alpha-10);color:var(--ax-color-warning)}.axp-tree-list-item-action[data-color=primary]:hover{background-color:var(--ax-color-primary-alpha-10);color:var(--ax-color-primary)}.axp-tree-list-item-action-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.axp-tree-list-item-action i{font-size:.975rem}.axp-tree-list-item-children{overflow:hidden;animation:expandCollapse .2s ease}.axp-tree-list-item-drop-indicator{position:absolute;left:0;right:0;height:2px;background-color:var(--ax-color-primary);pointer-events:none;z-index:10}.axp-tree-list-item-drop-indicator:before{content:\"\";position:absolute;left:0;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--ax-color-primary)}.axp-tree-list-item-drop-indicator[data-position=before]{top:-1px}.axp-tree-list-item-drop-indicator[data-position=after]{bottom:-1px}.axp-tree-list-item-drop-indicator[data-position=inside]{display:none}.axp-tree-list-item-drop-top{border-top:2px solid var(--ax-color-primary)}.axp-tree-list-item-drop-bottom{border-bottom:2px solid var(--ax-color-primary)}.axp-tree-list-item-drop-middle.axp-tree-list-item-can-drop .axp-tree-list-item-content{background-color:var(--ax-color-primary-alpha-10);border:2px dashed var(--ax-color-primary)}.axp-tree-list-lines .axp-tree-list-item,.axp-tree-list-item-children{position:relative}.axp-tree-list-item-lines{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0}.axp-tree-list-item-line-vertical{position:absolute;top:0;bottom:0;width:1px;background-color:var(--ax-color-border, #d0d0d0)}.axp-tree-list-item-line-vertical.last-child{bottom:50%}.axp-tree-list-item-line-horizontal{position:absolute;top:50%;width:12px;height:1px;background-color:var(--ax-color-border, #d0d0d0)}@keyframes expandCollapse{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}\n"] }]
4680
+ }] });
4681
+
4682
+ /**
4683
+ * Helper functions for tree-list node operations
4684
+ */
4685
+ class AXPTreeListHelper {
4686
+ /**
4687
+ * Find a node by its ID in the tree
4688
+ */
4689
+ static findNodeById(nodes, nodeId) {
4690
+ for (const node of nodes) {
4691
+ if (node.id === nodeId) {
4692
+ return node;
4693
+ }
4694
+ if (node.children) {
4695
+ const found = this.findNodeById(node.children, nodeId);
4696
+ if (found) {
4697
+ return found;
4698
+ }
4699
+ }
4700
+ }
4701
+ return null;
4702
+ }
4703
+ /**
4704
+ * Find a node's parent and index in the tree
4705
+ */
4706
+ static findNodeParentAndIndex(nodes, nodeId, parent = null) {
4707
+ for (let i = 0; i < nodes.length; i++) {
4708
+ const node = nodes[i];
4709
+ if (node.id === nodeId) {
4710
+ return { parent, index: i };
4711
+ }
4712
+ if (node.children) {
4713
+ const result = this.findNodeParentAndIndex(node.children, nodeId, node);
4714
+ if (result.parent !== null || result.index !== -1) {
4715
+ return result;
4716
+ }
4717
+ }
4718
+ }
4719
+ return { parent: null, index: -1 };
4720
+ }
4721
+ /**
4722
+ * Remove a node from the tree by its ID
4723
+ */
4724
+ static removeNode(nodes, nodeId) {
4725
+ return nodes
4726
+ .filter((node) => node.id !== nodeId)
4727
+ .map((node) => ({
4728
+ ...node,
4729
+ children: node.children ? this.removeNode(node.children, nodeId) : undefined,
4730
+ }));
4731
+ }
4732
+ /**
4733
+ * Check if a node is a descendant of another node
4734
+ */
4735
+ static isDescendant(parent, child) {
4736
+ if (parent.id === child.id) {
4737
+ return true;
4738
+ }
4739
+ if (!parent.children) {
4740
+ return false;
4741
+ }
4742
+ for (const node of parent.children) {
4743
+ if (this.isDescendant(node, child)) {
4744
+ return true;
4745
+ }
4746
+ }
4747
+ return false;
4748
+ }
4749
+ /**
4750
+ * Get all node IDs from the tree
4751
+ */
4752
+ static getAllNodeIds(nodes) {
4753
+ const ids = [];
4754
+ this.traverseNodes(nodes, (node) => ids.push(node.id));
4755
+ return ids;
4756
+ }
4757
+ /**
4758
+ * Traverse all nodes in the tree and apply a callback
4759
+ */
4760
+ static traverseNodes(nodes, callback) {
4761
+ for (const node of nodes) {
4762
+ callback(node);
4763
+ if (node.children) {
4764
+ this.traverseNodes(node.children, callback);
4765
+ }
4766
+ }
4767
+ }
4768
+ /**
4769
+ * Validate if drop is allowed
4770
+ */
4771
+ static validateDrop(dragNode, dropNode, position, config) {
4772
+ // Check if dropping to root is allowed
4773
+ if (dropNode === null && !config.allowDragToRoot) {
4774
+ return false;
4775
+ }
4776
+ // Check if target node accepts drops
4777
+ if (dropNode && dropNode.droppable === false) {
4778
+ return false;
4779
+ }
4780
+ // Check custom validation
4781
+ if (config.validateDrop && !config.validateDrop(dragNode, dropNode, position)) {
4782
+ return false;
4783
+ }
4784
+ return true;
4785
+ }
4786
+ /**
4787
+ * Perform the drop operation on the nodes array
4788
+ */
4789
+ static performDrop(nodes, dragNode, dropNode, position) {
4790
+ const { parent: oldParent, index: oldIndex } = this.findNodeParentAndIndex(nodes, dragNode.id);
4791
+ // Remove from old position
4792
+ const newNodes = this.removeNode(nodes, dragNode.id);
4793
+ // Insert at new position
4794
+ let newParent = null;
4795
+ let newIndex = 0;
4796
+ if (dropNode === null) {
4797
+ // Drop at root level
4798
+ newIndex = position === 'before' ? 0 : newNodes.length;
4799
+ newNodes.splice(newIndex, 0, dragNode);
4800
+ }
4801
+ else if (position === 'inside') {
4802
+ // Drop inside target node - need to find the node in newNodes tree
4803
+ const targetNode = this.findNodeById(newNodes, dropNode.id);
4804
+ if (targetNode) {
4805
+ newParent = targetNode;
4806
+ if (!targetNode.children) {
4807
+ targetNode.children = [];
4808
+ }
4809
+ newIndex = targetNode.children.length;
4810
+ targetNode.children.push(dragNode);
4811
+ }
4812
+ }
4813
+ else {
4814
+ // Drop before or after target node
4815
+ const { parent, index } = this.findNodeParentAndIndex(newNodes, dropNode.id);
4816
+ newParent = parent;
4817
+ newIndex = position === 'before' ? index : index + 1;
4818
+ if (parent) {
4819
+ parent.children.splice(newIndex, 0, dragNode);
4820
+ }
4821
+ else {
4822
+ newNodes.splice(newIndex, 0, dragNode);
4823
+ }
4824
+ }
4825
+ return {
4826
+ newNodes,
4827
+ oldParent,
4828
+ newParent,
4829
+ oldIndex,
4830
+ newIndex,
4831
+ };
4832
+ }
4833
+ }
4834
+
4835
+ class AXPTreeListComponent {
4836
+ constructor() {
4837
+ // Inputs
4838
+ this.nodes = model([], ...(ngDevMode ? [{ debugName: "nodes" }] : []));
4839
+ this.config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
4840
+ this.look = input('default', ...(ngDevMode ? [{ debugName: "look" }] : []));
4841
+ // Outputs
4842
+ this.nodeDrop = output();
4843
+ this.nodeClick = output();
4844
+ this.nodeExpand = output();
4845
+ this.nodeSelect = output();
4846
+ // Internal state
4847
+ this.dragState = signal({
4848
+ isDragging: false,
4849
+ dragNode: null,
4850
+ dropTarget: null,
4851
+ dropPosition: null,
4852
+ canDrop: false,
4853
+ }, ...(ngDevMode ? [{ debugName: "dragState" }] : []));
4854
+ this.expandedNodes = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedNodes" }] : []));
4855
+ this.selectedNodes = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedNodes" }] : []));
4856
+ // Computed
4857
+ this.mergedConfig = computed(() => ({
4858
+ dragEnabled: this.config().dragEnabled ?? false,
4859
+ showDragIndicator: this.config().showDragIndicator ?? true,
4860
+ expandable: this.config().expandable ?? true,
4861
+ showLines: this.config().showLines ?? false,
4862
+ defaultExpanded: this.config().defaultExpanded ?? false,
4863
+ multiSelect: this.config().multiSelect ?? false,
4864
+ showCheckboxes: this.config().showCheckboxes ?? false,
4865
+ showIcons: this.config().showIcons ?? true,
4866
+ showActions: this.config().showActions ?? true,
4867
+ showDescription: this.config().showDescription ?? true,
4868
+ showBadges: this.config().showBadges ?? true,
4869
+ indentSize: this.config().indentSize ?? 24,
4870
+ animationDuration: this.config().animationDuration ?? 200,
4871
+ allowDragToRoot: this.config().allowDragToRoot ?? true,
4872
+ allowDragBetweenLevels: this.config().allowDragBetweenLevels ?? true,
4873
+ validateDrop: this.config().validateDrop ?? (() => true),
4874
+ }), ...(ngDevMode ? [{ debugName: "mergedConfig" }] : []));
4875
+ // Initialize expanded state based on defaultExpanded
4876
+ effect(() => {
4877
+ const config = this.mergedConfig();
4878
+ if (config.defaultExpanded) {
4879
+ this.expandAll();
4880
+ }
4881
+ });
4882
+ }
4883
+ // Public API methods
4884
+ expandAll() {
4885
+ const allIds = AXPTreeListHelper.getAllNodeIds(this.nodes());
4886
+ this.expandedNodes.set(new Set(allIds));
4887
+ }
4888
+ collapseAll() {
4889
+ this.expandedNodes.set(new Set());
4890
+ }
4891
+ expandNode(nodeId) {
4892
+ this.expandedNodes.update((set) => {
4893
+ const newSet = new Set(set);
4894
+ newSet.add(nodeId);
4895
+ return newSet;
4896
+ });
4897
+ }
4898
+ collapseNode(nodeId) {
4899
+ this.expandedNodes.update((set) => {
4900
+ const newSet = new Set(set);
4901
+ newSet.delete(nodeId);
4902
+ return newSet;
4903
+ });
4904
+ }
4905
+ toggleNode(nodeId) {
4906
+ if (this.expandedNodes().has(nodeId)) {
4907
+ this.collapseNode(nodeId);
4908
+ }
4909
+ else {
4910
+ this.expandNode(nodeId);
4911
+ }
4912
+ }
4913
+ selectNode(nodeId, multiSelect = false) {
4914
+ this.selectedNodes.update((set) => {
4915
+ const newSet = multiSelect ? new Set(set) : new Set();
4916
+ if (newSet.has(nodeId)) {
4917
+ newSet.delete(nodeId);
4918
+ }
4919
+ else {
4920
+ newSet.add(nodeId);
4921
+ }
4922
+ return newSet;
4923
+ });
4924
+ }
4925
+ clearSelection() {
4926
+ this.selectedNodes.set(new Set());
4927
+ }
4928
+ getSelectedNodes() {
4929
+ const selected = [];
4930
+ const selectedIds = this.selectedNodes();
4931
+ AXPTreeListHelper.traverseNodes(this.nodes(), (node) => {
4932
+ if (selectedIds.has(node.id)) {
4933
+ selected.push(node);
4934
+ }
4935
+ });
4936
+ return selected;
4937
+ }
4938
+ // Drag and drop handlers
4939
+ onDragStart(node) {
4940
+ const config = this.mergedConfig();
4941
+ if (!config.dragEnabled || node.disabled || node.draggable === false) {
4942
+ return;
4943
+ }
4944
+ this.dragState.set({
4945
+ isDragging: true,
4946
+ dragNode: node,
4947
+ dropTarget: null,
4948
+ dropPosition: null,
4949
+ canDrop: false,
4950
+ });
4951
+ }
4952
+ onDragOver(node, position) {
4953
+ const state = this.dragState();
4954
+ if (!state.isDragging || !state.dragNode) {
4955
+ return;
4956
+ }
4957
+ // Prevent dropping on itself or its descendants
4958
+ if (node && AXPTreeListHelper.isDescendant(state.dragNode, node)) {
4959
+ this.dragState.update((s) => ({ ...s, dropTarget: null, dropPosition: null, canDrop: false }));
4960
+ return;
4961
+ }
4962
+ // Validate drop
4963
+ const canDrop = AXPTreeListHelper.validateDrop(state.dragNode, node, position, this.mergedConfig());
4964
+ this.dragState.update((s) => ({
4965
+ ...s,
4966
+ dropTarget: node,
4967
+ dropPosition: position,
4968
+ canDrop,
4969
+ }));
4970
+ }
4971
+ onDragEnd() {
4972
+ const state = this.dragState();
4973
+ if (state.isDragging && state.dragNode && state.canDrop && state.dropTarget !== undefined && state.dropPosition) {
4974
+ this.performDrop(state.dragNode, state.dropTarget, state.dropPosition);
4975
+ }
4976
+ this.dragState.set({
4977
+ isDragging: false,
4978
+ dragNode: null,
4979
+ dropTarget: null,
4980
+ dropPosition: null,
4981
+ canDrop: false,
4982
+ });
4983
+ }
4984
+ onDragCancel() {
4985
+ this.dragState.set({
4986
+ isDragging: false,
4987
+ dragNode: null,
4988
+ dropTarget: null,
4989
+ dropPosition: null,
4990
+ canDrop: false,
4450
4991
  });
4451
4992
  }
4993
+ // Node event handlers
4994
+ onNodeClick(node, event) {
4995
+ this.nodeClick.emit({ node, event });
4996
+ }
4997
+ onNodeToggle(node) {
4998
+ this.toggleNode(node.id);
4999
+ this.nodeExpand.emit({ node, expanded: this.expandedNodes().has(node.id) });
5000
+ }
5001
+ onNodeSelect(node) {
5002
+ const multiSelect = this.mergedConfig().multiSelect;
5003
+ this.selectNode(node.id, multiSelect);
5004
+ this.nodeSelect.emit({
5005
+ node,
5006
+ selected: this.selectedNodes().has(node.id),
5007
+ selectedNodes: this.getSelectedNodes(),
5008
+ });
5009
+ }
5010
+ // Helper methods
5011
+ performDrop(dragNode, dropNode, position) {
5012
+ const result = AXPTreeListHelper.performDrop(this.nodes(), dragNode, dropNode, position);
5013
+ // Auto-expand the target node if dropping inside
5014
+ if (position === 'inside' && dropNode) {
5015
+ this.expandNode(dropNode.id);
5016
+ }
5017
+ this.nodes.set([...result.newNodes]);
5018
+ this.nodeDrop.emit({
5019
+ dragNode,
5020
+ dropNode,
5021
+ position,
5022
+ oldParent: result.oldParent,
5023
+ newParent: result.newParent,
5024
+ oldIndex: result.oldIndex,
5025
+ newIndex: result.newIndex,
5026
+ });
5027
+ }
5028
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTreeListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5029
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPTreeListComponent, isStandalone: true, selector: "axp-tree-list", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodes: "nodesChange", nodeDrop: "nodeDrop", nodeClick: "nodeClick", nodeExpand: "nodeExpand", nodeSelect: "nodeSelect" }, host: { properties: { "class.axp-tree-list-dragging": "dragState().isDragging", "attr.data-look": "look()" }, classAttribute: "axp-tree-list" }, ngImport: i0, template: "<div class=\"axp-tree-list-container\">\n @for (node of nodes(); track node.id; let isLast = $last) {\n <axp-tree-list-item\n [node]=\"node\"\n [level]=\"0\"\n [config]=\"mergedConfig()\"\n [look]=\"look()\"\n [expanded]=\"expandedNodes().has(node.id)\"\n [selected]=\"selectedNodes().has(node.id)\"\n [dragState]=\"dragState()\"\n [isLastChild]=\"isLast\"\n (dragStart)=\"onDragStart($event)\"\n (dragOver)=\"onDragOver($event.node, $event.position)\"\n (dragEnd)=\"onDragEnd()\"\n (dragCancel)=\"onDragCancel()\"\n (nodeClick)=\"onNodeClick($event, $any($event))\"\n (toggle)=\"onNodeToggle($event)\"\n (select)=\"onNodeSelect($event)\"\n [expandedNodes]=\"expandedNodes()\"\n [selectedNodes]=\"selectedNodes()\"\n />\n }\n\n @if (nodes().length === 0) {\n <div class=\"axp-tree-list-empty\">\n <i class=\"fa-light fa-folder-open\"></i>\n <span>No items to display</span>\n </div>\n }\n</div>\n", styles: [".axp-tree-list{display:block;width:100%}.axp-tree-list-container{display:flex;flex-direction:column;gap:2px}.axp-tree-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem;color:var(--ax-color-text-secondary);gap:.5rem}.axp-tree-list-empty i{font-size:2rem;opacity:.5}.axp-tree-list-empty span{font-size:.875rem}.axp-tree-list-dragging{-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;cursor:grabbing}.axp-tree-list[data-look=folder] .axp-tree-list-item-content{border-radius:0;border-left:3px solid transparent}.axp-tree-list[data-look=folder] .axp-tree-list-item-content:hover{border-left-color:var(--ax-color-primary)}.axp-tree-list[data-look=folder] .axp-tree-list-item-selected .axp-tree-list-item-content{border-left-color:var(--ax-color-primary);background-color:var(--ax-color-primary-alpha-10)}.axp-tree-list[data-look=card] .axp-tree-list-item-content{border:1px solid var(--ax-color-border);border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.05)}.axp-tree-list[data-look=card] .axp-tree-list-item-content:hover{box-shadow:0 2px 6px rgba(0,0,0,.1)}.axp-tree-list[data-look=card] .axp-tree-list-item-selected .axp-tree-list-item-content{border-color:var(--ax-color-primary);box-shadow:0 0 0 2px var(--ax-color-primary-alpha-20)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXPTreeListItemComponent, selector: "axp-tree-list-item", inputs: ["node", "level", "config", "look", "expanded", "selected", "dragState", "expandedNodes", "selectedNodes", "isLastChild"], outputs: ["dragStart", "dragOver", "dragEnd", "dragCancel", "nodeClick", "toggle", "select"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4452
5030
  }
5031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTreeListComponent, decorators: [{
5032
+ type: Component,
5033
+ args: [{ selector: 'axp-tree-list', standalone: true, imports: [CommonModule, AXPTreeListItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
5034
+ class: 'axp-tree-list',
5035
+ '[class.axp-tree-list-dragging]': 'dragState().isDragging',
5036
+ '[attr.data-look]': 'look()',
5037
+ }, template: "<div class=\"axp-tree-list-container\">\n @for (node of nodes(); track node.id; let isLast = $last) {\n <axp-tree-list-item\n [node]=\"node\"\n [level]=\"0\"\n [config]=\"mergedConfig()\"\n [look]=\"look()\"\n [expanded]=\"expandedNodes().has(node.id)\"\n [selected]=\"selectedNodes().has(node.id)\"\n [dragState]=\"dragState()\"\n [isLastChild]=\"isLast\"\n (dragStart)=\"onDragStart($event)\"\n (dragOver)=\"onDragOver($event.node, $event.position)\"\n (dragEnd)=\"onDragEnd()\"\n (dragCancel)=\"onDragCancel()\"\n (nodeClick)=\"onNodeClick($event, $any($event))\"\n (toggle)=\"onNodeToggle($event)\"\n (select)=\"onNodeSelect($event)\"\n [expandedNodes]=\"expandedNodes()\"\n [selectedNodes]=\"selectedNodes()\"\n />\n }\n\n @if (nodes().length === 0) {\n <div class=\"axp-tree-list-empty\">\n <i class=\"fa-light fa-folder-open\"></i>\n <span>No items to display</span>\n </div>\n }\n</div>\n", styles: [".axp-tree-list{display:block;width:100%}.axp-tree-list-container{display:flex;flex-direction:column;gap:2px}.axp-tree-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem;color:var(--ax-color-text-secondary);gap:.5rem}.axp-tree-list-empty i{font-size:2rem;opacity:.5}.axp-tree-list-empty span{font-size:.875rem}.axp-tree-list-dragging{-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;cursor:grabbing}.axp-tree-list[data-look=folder] .axp-tree-list-item-content{border-radius:0;border-left:3px solid transparent}.axp-tree-list[data-look=folder] .axp-tree-list-item-content:hover{border-left-color:var(--ax-color-primary)}.axp-tree-list[data-look=folder] .axp-tree-list-item-selected .axp-tree-list-item-content{border-left-color:var(--ax-color-primary);background-color:var(--ax-color-primary-alpha-10)}.axp-tree-list[data-look=card] .axp-tree-list-item-content{border:1px solid var(--ax-color-border);border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.05)}.axp-tree-list[data-look=card] .axp-tree-list-item-content:hover{box-shadow:0 2px 6px rgba(0,0,0,.1)}.axp-tree-list[data-look=card] .axp-tree-list-item-selected .axp-tree-list-item-content{border-color:var(--ax-color-primary);box-shadow:0 0 0 2px var(--ax-color-primary-alpha-20)}\n"] }]
5038
+ }], ctorParameters: () => [] });
5039
+
5040
+ const AXP_USER_AVATAR_PROVIDER = new InjectionToken('AXP_USER_AVATAR_PROVIDER');
4453
5041
 
4454
5042
  class AXPUserAvatarService {
4455
5043
  constructor() {
4456
- this.provider = inject(AXP_USER_AVATAR_PROVIDER);
5044
+ this.provider = inject(AXP_USER_AVATAR_PROVIDER, { optional: true });
4457
5045
  // Cache configuration
4458
5046
  this.cacheExpiryTime = 5 * 60 * 1000; // 5 minutes in milliseconds
4459
5047
  this.refreshInterval = 3 * 60 * 1000; // 3 minutes in milliseconds
@@ -4538,7 +5126,7 @@ class AXPUserAvatarService {
4538
5126
  */
4539
5127
  async fetchAndUpdateCache(userId) {
4540
5128
  try {
4541
- const data = await this.provider.provide(userId);
5129
+ const data = await this.provider?.provide(userId);
4542
5130
  if (!data) {
4543
5131
  throw new Error(`User info not found for ${userId}`);
4544
5132
  }
@@ -4590,13 +5178,14 @@ class AXPUserAvatarComponent {
4590
5178
  this.isOnline = computed(() => this.userInfo()?.status === 'online', ...(ngDevMode ? [{ debugName: "isOnline" }] : []));
4591
5179
  this.avatarText = computed(() => this.getInitials(), ...(ngDevMode ? [{ debugName: "avatarText" }] : []));
4592
5180
  this.avatarColor = computed(() => this.pickColor(this.avatarText()), ...(ngDevMode ? [{ debugName: "avatarColor" }] : []));
4593
- this.hasPicture = signal(true, ...(ngDevMode ? [{ debugName: "hasPicture" }] : []));
5181
+ this.hasAvatar = computed(() => !isNil(this.src()) && !isEmpty(this.src()), ...(ngDevMode ? [{ debugName: "hasAvatar" }] : []));
5182
+ this.isAvatarLoaded = signal(false, ...(ngDevMode ? [{ debugName: "isAvatarLoaded" }] : []));
4594
5183
  }
4595
5184
  onImageError(event) {
4596
- this.hasPicture.set(false);
5185
+ this.isAvatarLoaded.set(false);
4597
5186
  }
4598
5187
  onImageLoad(event) {
4599
- this.hasPicture.set(true);
5188
+ this.isAvatarLoaded.set(true);
4600
5189
  }
4601
5190
  ngOnInit() {
4602
5191
  this.loadUserData();
@@ -4630,12 +5219,6 @@ class AXPUserAvatarComponent {
4630
5219
  if (this.userInfo()?.avatarUrl) {
4631
5220
  this.src.set(this.userInfo()?.avatarUrl);
4632
5221
  }
4633
- else {
4634
- // Generate a placeholder - you could use an external service like UI Avatars
4635
- // or implement your own logic
4636
- const initials = this.getInitials();
4637
- this.src.set(`https://avatar.iran.liara.run/username?username=${encodeURIComponent(initials)}`);
4638
- }
4639
5222
  }
4640
5223
  /**
4641
5224
  * Get initials from first and last name
@@ -4659,11 +5242,11 @@ class AXPUserAvatarComponent {
4659
5242
  return colors[idx];
4660
5243
  }
4661
5244
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4662
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPUserAvatarComponent, isStandalone: true, selector: "axp-user-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i1$4.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "shape", "look"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.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: AXImageModule }, { kind: "component", type: i3$5.AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXBadgeModule }], encapsulation: i0.ViewEncapsulation.None }); }
5245
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPUserAvatarComponent, isStandalone: true, selector: "axp-user-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasAvatar()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->", styles: [""], dependencies: [{ kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i1$4.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "shape", "look"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.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: AXImageModule }, { kind: "component", type: i3$5.AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXBadgeModule }], encapsulation: i0.ViewEncapsulation.None }); }
4663
5246
  }
4664
5247
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarComponent, decorators: [{
4665
5248
  type: Component,
4666
- args: [{ selector: 'axp-user-avatar', imports: [AXAvatarModule, AXDecoratorModule, AXImageModule, AXBadgeModule], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->\n" }]
5249
+ args: [{ selector: 'axp-user-avatar', imports: [AXAvatarModule, AXDecoratorModule, AXImageModule, AXBadgeModule], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasAvatar()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->" }]
4667
5250
  }] });
4668
5251
 
4669
5252
  class AXPQueryViewsComponent {
@@ -4764,5 +5347,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
4764
5347
  * Generated bundle index. Do not edit.
4765
5348
  */
4766
5349
 
4767
- export { AXPActivityLogComponent, AXPCategoryTreeComponent, AXPCompareViewComponent, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPDataSelectorComponent, AXPDataSelectorService, AXPDynamicFormDesignerComponent, AXPExtraPropertiesComponent, AXPExtraPropertiesSchemaComponent, AXPExtraPropertiesValuesComponent, AXPImageEditorPopupComponent, AXPImageEditorService, AXPMenuBadgeHelper, AXPQueryColumnsComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPStateMessageComponent, AXPTaskBadgeDirective, AXPTaskBadgeProvider, AXPTaskBadgeService, AXPTemplateViewerComponent, AXPTemplateViewerService, AXPThemeLayoutActionsComponent, AXPThemeLayoutBlockComponent, AXPThemeLayoutContainerComponent, AXPThemeLayoutEndSideComponent, AXPThemeLayoutFooterComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutListComponent, AXPThemeLayoutListItemComponent, AXPThemeLayoutListItemsGroupComponent, AXPThemeLayoutPageHeaderComponent, AXPThemeLayoutPagePrimaryActionsComponent, AXPThemeLayoutPageSecondaryActionsComponent, AXPThemeLayoutSectionComponent, AXPThemeLayoutStartSideComponent, AXPThemeLayoutToolbarComponent, AXPUserAvatarComponent, AXPUserAvatarService, AXPWidgetItemComponent, AXPWidgetPropertyViewerComponent, AXPWidgetPropertyViewerPopupComponent, AXPWidgetPropertyViewerService, AXP_EXTRA_PROPERTY_TYPES, AXP_TASK_BADGE_PROVIDERS, AXP_USER_AVATAR_PROVIDER, convertDesignerFieldToFormField, convertDesignerGroupToFormGroup, convertDesignerStateToFormDefinition };
5350
+ export { AXPActivityLogComponent, AXPCategoryTreeComponent, AXPColorPalettePickerComponent, AXPCompareViewComponent, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPDataSelectorComponent, AXPDataSelectorService, AXPDynamicFormDesignerComponent, AXPExtraPropertiesComponent, AXPExtraPropertiesSchemaComponent, AXPExtraPropertiesValuesComponent, AXPImageEditorPopupComponent, AXPImageEditorService, AXPMenuBadgeHelper, AXPQueryColumnsComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPStateMessageComponent, AXPTaskBadgeDirective, AXPTaskBadgeProvider, AXPTaskBadgeService, AXPTemplateViewerComponent, AXPTemplateViewerService, AXPThemeLayoutActionsComponent, AXPThemeLayoutBlockComponent, AXPThemeLayoutContainerComponent, AXPThemeLayoutEndSideComponent, AXPThemeLayoutFooterComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutListComponent, AXPThemeLayoutListItemComponent, AXPThemeLayoutListItemsGroupComponent, AXPThemeLayoutPageHeaderComponent, AXPThemeLayoutPagePrimaryActionsComponent, AXPThemeLayoutPageSecondaryActionsComponent, AXPThemeLayoutSectionComponent, AXPThemeLayoutStartSideComponent, AXPThemeLayoutToolbarComponent, AXPTreeListComponent, AXPTreeListHelper, AXPTreeListItemComponent, AXPUserAvatarComponent, AXPUserAvatarService, AXPWidgetItemComponent, AXPWidgetPropertyViewerComponent, AXPWidgetPropertyViewerPopupComponent, AXPWidgetPropertyViewerService, AXP_EXTRA_PROPERTY_TYPES, AXP_TASK_BADGE_PROVIDERS, AXP_USER_AVATAR_PROVIDER, convertDesignerFieldToFormField, convertDesignerGroupToFormGroup, convertDesignerStateToFormDefinition };
4768
5351
  //# sourceMappingURL=acorex-platform-layout-components.mjs.map