@acorex/platform 21.0.0-next.56 → 21.0.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-common.mjs +28 -4
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +7 -5
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +5 -5
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +35 -3
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs → acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map → acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map → acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +235 -9
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +6 -6
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +4 -2
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +35 -3
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +4 -2
- package/types/acorex-platform-common.d.ts +23 -1
- package/types/acorex-platform-core.d.ts +2 -1
- package/types/acorex-platform-layout-entity.d.ts +42 -3
- package/types/acorex-platform-layout-widget-core.d.ts +1 -0
- package/types/acorex-platform-workflow.d.ts +36 -2
|
@@ -105,7 +105,7 @@ class AXPRepeaterWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRepeaterWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRepeaterWidgetColumnComponent, isStandalone: true, selector: "axp-repeater-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, providers: [AXPWidgetCoreService, AXPContextStore], viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center \">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"ax-text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3 ax-overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRepeaterWidgetColumnComponent, isStandalone: true, selector: "axp-repeater-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, providers: [AXPWidgetCoreService, AXPContextStore], viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center \">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"ax-text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3 ax-overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
109
109
|
}
|
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRepeaterWidgetColumnComponent, decorators: [{
|
|
111
111
|
type: Component,
|
|
@@ -113,4 +113,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
113
113
|
}], propDecorators: { moreButton: [{ type: i0.ViewChild, args: ['moreButton', { isSignal: true }] }], morePopover: [{ type: i0.ViewChild, args: ['morePopover', { isSignal: true }] }] } });
|
|
114
114
|
|
|
115
115
|
export { AXPRepeaterWidgetColumnComponent };
|
|
116
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-repeater-widget-column.component-
|
|
116
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.ts","../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.html"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent, AXPWidgetNode, AXPWidgetCoreModule, AXPWidgetCoreService } from '@acorex/platform/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, signal, viewChild } from '@angular/core';\n\nimport { isNil } from 'lodash-es';\nimport { AXPContextStore } from '@acorex/platform/core';\n\n@Component({\n selector: 'axp-repeater-widget-column',\n templateUrl: './repeater-widget-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXBadgeModule, AXButtonModule, AXPopoverModule, AXPWidgetCoreModule],\n providers: [AXPWidgetCoreService, AXPContextStore],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPRepeaterWidgetColumnComponent extends AXPColumnWidgetComponent<any[]> {\n //#region ---- View Children ----\n\n protected moreButton = viewChild<ElementRef>('moreButton');\n protected morePopover = viewChild<AXPopoverComponent>('morePopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected maxVisible: number = this.options['maxVisible'] ?? 2;\n protected childWidgetNode: AXPWidgetNode | undefined = this.options['children']?.[0];\n\n //#endregion\n\n //#region ---- Signals ----\n\n protected isMorePopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Node Cache ----\n\n // Cache nodes by index to prevent recreation on every change detection\n private nodeCache = new Map<number, AXPWidgetNode>();\n private lastItems: any[] = [];\n\n // Clear cache when items change\n private clearCacheIfNeeded(): void {\n const currentItems = this.allItems();\n if (currentItems.length !== this.lastItems.length ||\n currentItems.some((item, idx) => item !== this.lastItems[idx])) {\n this.nodeCache.clear();\n this.lastItems = [...currentItems];\n }\n }\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected displayItems = computed(() => {\n if (isNil(this.rawValue)) {\n return [];\n }\n const items = Array.isArray(this.rawValue) ? this.rawValue : [this.rawValue];\n return items.filter((item) => item != null);\n });\n\n protected allItems = computed(() => this.displayItems());\n\n protected visibleItems = computed(() => {\n const items = this.allItems();\n return items.slice(0, this.maxVisible);\n });\n\n protected hasMoreItems = computed(() => {\n return this.allItems().length > this.maxVisible;\n });\n\n protected remainingItemsCount = computed(() => {\n return this.allItems().length - this.maxVisible;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showMoreItems(): void {\n this.openMorePopover();\n }\n\n protected onMorePopoverOpenChange(event: any): void {\n this.isMorePopoverOpen.set(event);\n }\n\n protected getItemNode(item: any, index: number): AXPWidgetNode | undefined {\n if (!this.childWidgetNode) {\n return undefined;\n }\n\n // Clear cache if items changed\n this.clearCacheIfNeeded();\n\n // Return cached node if exists\n const cachedNode = this.nodeCache.get(index);\n if (cachedNode) {\n return cachedNode;\n }\n\n const child = this.childWidgetNode;\n const childBindingRaw = child.path ?? child.name;\n const childBinding =\n childBindingRaw != null && String(childBindingRaw).trim() !== '' ? String(childBindingRaw).trim() : '';\n const baseItemPath = `${this.path}[${index}]`;\n const itemPath = childBinding ? `${baseItemPath}.${childBinding}` : baseItemPath;\n\n // Create new node and cache it\n const node: AXPWidgetNode = {\n ...child,\n path: itemPath,\n defaultValue: item,\n options: {\n ...child.options,\n rawValue: item,\n rowData: this.rowData,\n },\n };\n\n this.nodeCache.set(index, node);\n return node;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openMorePopover(): void {\n if (this.morePopover() && this.moreButton()) {\n this.morePopover()!.target = this.moreButton()!.nativeElement;\n this.morePopover()!.open();\n this.isMorePopoverOpen.set(true);\n }\n }\n\n //#endregion\n}\n\n","<div class=\"ax-flex ax-gap-1 ax-items-center \">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"ax-text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3 ax-overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>"],"names":["i2"],"mappings":";;;;;;;;;;;AAiBM,MAAO,gCAAiC,SAAQ,wBAA+B,CAAA;AARrF,IAAA,WAAA,GAAA;;;AAWc,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAa,YAAY,iFAAC;AAChD,QAAA,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa,kFAAC;;;QAM1D,IAAA,CAAA,UAAU,GAAW,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QACpD,IAAA,CAAA,eAAe,GAA8B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;;;AAM1E,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,wFAAC;;;;AAOnC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAyB;QAC5C,IAAA,CAAA,SAAS,GAAU,EAAE;;;AAgBnB,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACnC,YAAA,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACtB,gBAAA,OAAO,EAAE;YACb;YACA,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC5E,YAAA,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC;AAC/C,QAA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AA,EAAA,IAAA,EAAE,eAAe,kYAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,0BAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,EAAA,gBAAA,EAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIpE,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAR5C,SAAS;+BACI,4BAA4B,EAAA,eAAA,EAErB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC,EAAA,SAAA,EACnE,CAAC,oBAAoB,EAAE,eAAe,CAAC,EAAA,MAAA,EAC1C,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,mjDAAA,EAAA;AAKc,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,qEACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.ts","../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.html"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent, AXPWidgetNode, AXPWidgetCoreModule, AXPWidgetCoreService } from '@acorex/platform/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, signal, viewChild } from '@angular/core';\n\nimport { isNil } from 'lodash-es';\nimport { AXPContextStore } from '@acorex/platform/core';\n\n@Component({\n selector: 'axp-repeater-widget-column',\n templateUrl: './repeater-widget-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXBadgeModule, AXButtonModule, AXPopoverModule, AXPWidgetCoreModule],\n providers: [AXPWidgetCoreService, AXPContextStore],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPRepeaterWidgetColumnComponent extends AXPColumnWidgetComponent<any[]> {\n //#region ---- View Children ----\n\n protected moreButton = viewChild<ElementRef>('moreButton');\n protected morePopover = viewChild<AXPopoverComponent>('morePopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected maxVisible: number = this.options['maxVisible'] ?? 2;\n protected childWidgetNode: AXPWidgetNode | undefined = this.options['children']?.[0];\n\n //#endregion\n\n //#region ---- Signals ----\n\n protected isMorePopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Node Cache ----\n\n // Cache nodes by index to prevent recreation on every change detection\n private nodeCache = new Map<number, AXPWidgetNode>();\n private lastItems: any[] = [];\n\n // Clear cache when items change\n private clearCacheIfNeeded(): void {\n const currentItems = this.allItems();\n if (currentItems.length !== this.lastItems.length ||\n currentItems.some((item, idx) => item !== this.lastItems[idx])) {\n this.nodeCache.clear();\n this.lastItems = [...currentItems];\n }\n }\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected displayItems = computed(() => {\n if (isNil(this.rawValue)) {\n return [];\n }\n const items = Array.isArray(this.rawValue) ? this.rawValue : [this.rawValue];\n return items.filter((item) => item != null);\n });\n\n protected allItems = computed(() => this.displayItems());\n\n protected visibleItems = computed(() => {\n const items = this.allItems();\n return items.slice(0, this.maxVisible);\n });\n\n protected hasMoreItems = computed(() => {\n return this.allItems().length > this.maxVisible;\n });\n\n protected remainingItemsCount = computed(() => {\n return this.allItems().length - this.maxVisible;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showMoreItems(): void {\n this.openMorePopover();\n }\n\n protected onMorePopoverOpenChange(event: any): void {\n this.isMorePopoverOpen.set(event);\n }\n\n protected getItemNode(item: any, index: number): AXPWidgetNode | undefined {\n if (!this.childWidgetNode) {\n return undefined;\n }\n\n // Clear cache if items changed\n this.clearCacheIfNeeded();\n\n // Return cached node if exists\n const cachedNode = this.nodeCache.get(index);\n if (cachedNode) {\n return cachedNode;\n }\n\n const child = this.childWidgetNode;\n const childBindingRaw = child.path ?? child.name;\n const childBinding =\n childBindingRaw != null && String(childBindingRaw).trim() !== '' ? String(childBindingRaw).trim() : '';\n const baseItemPath = `${this.path}[${index}]`;\n const itemPath = childBinding ? `${baseItemPath}.${childBinding}` : baseItemPath;\n\n // Create new node and cache it\n const node: AXPWidgetNode = {\n ...child,\n path: itemPath,\n defaultValue: item,\n options: {\n ...child.options,\n rawValue: item,\n rowData: this.rowData,\n },\n };\n\n this.nodeCache.set(index, node);\n return node;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openMorePopover(): void {\n if (this.morePopover() && this.moreButton()) {\n this.morePopover()!.target = this.moreButton()!.nativeElement;\n this.morePopover()!.open();\n this.isMorePopoverOpen.set(true);\n }\n }\n\n //#endregion\n}\n\n","<div class=\"ax-flex ax-gap-1 ax-items-center \">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"ax-text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3 ax-overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>"],"names":["i2"],"mappings":";;;;;;;;;;;AAiBM,MAAO,gCAAiC,SAAQ,wBAA+B,CAAA;AARrF,IAAA,WAAA,GAAA;;;AAWc,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAa,YAAY,iFAAC;AAChD,QAAA,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa,kFAAC;;;QAM1D,IAAA,CAAA,UAAU,GAAW,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QACpD,IAAA,CAAA,eAAe,GAA8B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;;;AAM1E,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,wFAAC;;;;AAOnC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAyB;QAC5C,IAAA,CAAA,SAAS,GAAU,EAAE;;;AAgBnB,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACnC,YAAA,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACtB,g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ePageComponent {
|
|
|
183
183
|
</ax-footer>
|
|
184
184
|
</ax-form>
|
|
185
185
|
</axp-widgets-container>
|
|
186
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXPWidgetCoreModule }, { kind: "component", type: i1$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "
|
|
186
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXPWidgetCoreModule }, { kind: "component", type: i1$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "hasTitle", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i3.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
187
187
|
}
|
|
188
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTabularDataPopupComponent, decorators: [{
|
|
189
189
|
type: Component,
|
|
@@ -271,4 +271,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
271
271
|
}], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
272
272
|
|
|
273
273
|
export { AXPTabularDataPopupComponent };
|
|
274
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-edit-popup.component-
|
|
274
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport {\n AXDataTableComponent,\n AXDataTableModule,\n AXRowCommandItem,\n AXRowCommandItemClickEvent,\n} from '@acorex/components/data-table';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPContextChangeEvent, AXPDataGenerator } from '@acorex/platform/core';\nimport { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, viewChild } from '@angular/core';\nimport { cloneDeep } from 'lodash-es';\nimport { AXPTabularDataColumn } from './tabular-widget.types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChange($event)\">\n <ax-form #form>\n <div class=\"ax-p-4\">\n <ax-data-table\n #grid\n [paging]=\"false\"\n [allowReordering]=\"true\"\n (selectedRowsChange)=\"handleSelectionChange($event)\"\n [dataSource]=\"dataSource\"\n class=\"ax-h-96 ax-overflow-auto\"\n >\n @for (column of columns; track $index) {\n <ax-text-column\n width=\"200px\"\n [caption]=\"column.title\"\n [dataField]=\"column.name\"\n [cellTemplate]=\"cell\"\n [allowResizing]=\"true\"\n ></ax-text-column>\n <ng-template #cell let-item>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n path: item.rowIndex + '.' + column.name,\n type: column.type,\n options: column.options ?? {},\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ng-template>\n }\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems.length * 60 + 'px'\"\n [items]=\"getCommandRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n </ax-data-table>\n @if (!disabled) {\n <div class=\"ax-flex ax-justify-end ax-py-4\">\n <ax-button\n [text]=\"(this.context ?? []).length ? 'Start Adding Items' : 'Add Your First Item'\"\n look=\"twotone\"\n [disabled]=\"disabled\"\n (onClick)=\"addRecord()\"\n class=\"ax-col-start-10 ax-col-end-13\"\n >\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (onClick)=\"onCloseDiscard()\"></ax-button>\n <ax-button\n color=\"primary\"\n [text]=\"'@general:actions.ok.title' | translate | async\"\n (onClick)=\"handleSaveClick(form)\"\n ></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-form>\n </axp-widgets-container>\n `,\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXPWidgetCoreModule,\n AXDataTableModule,\n AXTranslationModule,\n AXFormModule,\n ],\n})\nexport class AXPTabularDataPopupComponent extends AXBasePageComponent {\n context: any;\n columns: AXPTabularDataColumn[];\n disabled: boolean = false;\n defaultRowCount: number = 0;\n contextDiscard: any;\n\n getCommandRowItems: AXRowCommandItem[] = [\n {\n name: 'delete',\n text: \"@general:actions.delete.title\",\n icon: 'fa-light fa-trash ax-text-danger',\n //divided: boolean,\n //disabled: boolean,\n color: 'danger',\n },\n ];\n\n protected override ngOnInit(): void {\n this.columns = this.columns.filter((col) => col.name != null && col.name != '' && col.type != null);\n\n this.columns = this.columns.map((col) => {\n return {\n ...col,\n options: {\n ...(col.options ?? {}),\n validationRules: [\n {\n rule: 'required',\n },\n ],\n },\n };\n });\n this.contextDiscard = cloneDeep(this.context);\n if (this.context == null || this.context?.length == 0) {\n for (let i = 0; i < this.defaultRowCount; i++) {\n this.addRecord();\n }\n }\n }\n\n protected dataSource = new AXDataSource({\n load: async () => {\n this.context = (this.context ?? []).map((x: any) => {\n return {\n ...x,\n id: AXPDataGenerator.uuid(),\n options: {},\n };\n });\n const items = this.context;\n console.log(this.context);\n\n return {\n items: items ?? [],\n total: (items ?? []).length,\n };\n },\n pageSize: 1,\n key: 'gridItem',\n });\n\n protected grid = viewChild<AXDataTableComponent>('grid');\n\n handleContextChange(e: AXPContextChangeEvent) {\n this.context = e.data;\n }\n\n onCloseDiscard() {\n this.close({\n context: this.contextDiscard,\n });\n }\n\n addRecord() {\n console.log(this.columns);\n\n const value = this.context ?? [];\n const newRecord = this.columns?.reduce((acc: { [key: string]: any }, column) => {\n acc[column.name] = ''; // or any default value\n return acc;\n }, {});\n console.log(value);\n this.context = [...value, newRecord];\n this.grid()?.refresh();\n }\n\n handleSelectionChange(e: any) {\n console.log(e);\n }\n\n protected async handleRowCommandClick(e: AXRowCommandItemClickEvent) {\n if (e.name == 'delete') {\n this.context = this.context.filter((item: any) => item.id !== e.data.id);\n this.grid()?.refresh();\n }\n }\n\n protected async handleSaveClick(form: AXFormComponent) {\n const formResult = await form.validate();\n console.log(formResult.rules);\n\n if (formResult.result) {\n this.close({\n context: this.context,\n });\n }\n }\n}\n"],"names":["i1","i2","i3","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoGM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAjFrE,IAAA,WAAA,GAAA;;QAoFE,IAAA,CAAA,QAAQ,GAAY,KAAK;QACzB,IAAA,CAAA,eAAe,GAAW,CAAC;AAG3B,QAAA,IAAA,CAAA,kBAAkB,GAAuB;AACvC,YAAA;AACE,gBAAA,IAAI,EAAE,QAAQ;AACd,gBAAA,IAAI,EAAE,+BAA+B;AACrC,gBAAA,IAAI,EAAE,kCAAkC;;;AAGxC,gBAAA,KAAK,EAAE,QAAQ;AAChB,aAAA;SACF;QA0BS,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAAC;YACtC,IAAI,EAAE,YAAW;AACf,gBAAA,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAAM,KAAI;oBACjD,OAAO;AACL,wBAAA,GAAG,CAAC;AACJ,wBAAA,EAAE,EAAE,gBAAgB,CAAC,IAAI,EAAE;AAC3B,wBAAA,OAAO,EAAE,EAAE;qBACZ;AACH,gBAAA,CAAC,CAAC;AACF,gBAAA,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO;AAC1B,gBAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;gBAEzB,OAAO;oBACL,KAAK,EAAE,KAAK,IAAI,EAAE;AAClB,oBAAA,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM;iBAC5B;YACH,CAAC;AACD,YAAA,QAAQ,EAAE,CAAC;AACX,YAAA,GAAG,EAAE,UAAU;AAChB,SAAA,CAAC;AAEQ,QAAA,IAAA,CAAA,IA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EAAA,CAAA;oBACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoET,EAAA,CAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,YAAY;AACb,qBAAA;AACF,iBAAA;kEAgEkD,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport {\n AXDataTableComponent,\n AXDataTableModule,\n AXRowCommandItem,\n AXRowCommandItemClickEvent,\n} from '@acorex/components/data-table';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPContextChangeEvent, AXPDataGenerator } from '@acorex/platform/core';\nimport { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, viewChild } from '@angular/core';\nimport { cloneDeep } from 'lodash-es';\nimport { AXPTabularDataColumn } from './tabular-widget.types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChange($event)\">\n <ax-form #form>\n <div class=\"ax-p-4\">\n <ax-data-table\n #grid\n [paging]=\"false\"\n [allowReordering]=\"true\"\n (selectedRowsChange)=\"handleSelectionChange($event)\"\n [dataSource]=\"dataSource\"\n class=\"ax-h-96 ax-overflow-auto\"\n >\n @for (column of columns; track $index) {\n <ax-text-column\n width=\"200px\"\n [caption]=\"column.title\"\n [dataField]=\"column.name\"\n [cellTemplate]=\"cell\"\n [allowResizing]=\"true\"\n ></ax-text-column>\n <ng-template #cell let-item>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n path: item.rowIndex + '.' + column.name,\n type: column.type,\n options: column.options ?? {},\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ng-template>\n }\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems.length * 60 + 'px'\"\n [items]=\"getCommandRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n </ax-data-table>\n @if (!disabled) {\n <div class=\"ax-flex ax-justify-end ax-py-4\">\n <ax-button\n [text]=\"(this.context ?? []).length ? 'Start Adding Items' : 'Add Your First Item'\"\n look=\"twotone\"\n [disabled]=\"disabled\"\n (onClick)=\"addRecord()\"\n class=\"ax-col-start-10 ax-col-end-13\"\n >\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (onClick)=\"onCloseDiscard()\"></ax-button>\n <ax-button\n color=\"primary\"\n [text]=\"'@general:actions.ok.title' | translate | async\"\n (onClick)=\"handleSaveClick(form)\"\n ></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-form>\n </axp-widgets-container>\n `,\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXPWidgetCoreModule,\n AXDataTableModule,\n AXTranslationModule,\n AXFormModule,\n ],\n})\nexport class AXPTabularDataPopupComponent extends AXBasePageComponent {\n context: any;\n columns: AXPTabularDataColumn[];\n disabled: boolean = false;\n defaultRowCount: number = 0;\n contextDiscard: any;\n\n getCommandRowItems: AXRowCommandItem[] = [\n {\n name: 'delete',\n text: \"@general:actions.delete.title\",\n icon: 'fa-light fa-trash ax-text-danger',\n //divided: boolean,\n //disabled: boolean,\n color: 'danger',\n },\n ];\n\n protected override ngOnInit(): void {\n this.columns = this.columns.filter((col) => col.name != null && col.name != '' && col.type != null);\n\n this.columns = this.columns.map((col) => {\n return {\n ...col,\n options: {\n ...(col.options ?? {}),\n validationRules: [\n {\n rule: 'required',\n },\n ],\n },\n };\n });\n this.contextDiscard = cloneDeep(this.context);\n if (this.context == null || this.context?.length == 0) {\n for (let i = 0; i < this.defaultRowCount; i++) {\n this.addRecord();\n }\n }\n }\n\n protected dataSource = new AXDataSource({\n load: async () => {\n this.context = (this.context ?? []).map((x: any) => {\n return {\n ...x,\n id: AXPDataGenerator.uuid(),\n options: {},\n };\n });\n const items = this.context;\n console.log(this.context);\n\n return {\n items: items ?? [],\n total: (items ?? []).length,\n };\n },\n pageSize: 1,\n key: 'gridItem',\n });\n\n protected grid = viewChild<AXDataTableComponent>('grid');\n\n handleContextChange(e: AXPContextChangeEvent) {\n this.context = e.data;\n }\n\n onCloseDiscard() {\n this.close({\n context: this.contextDiscard,\n });\n }\n\n addRecord() {\n console.log(this.columns);\n\n const value = this.context ?? [];\n const newRecord = this.columns?.reduce((acc: { [key: string]: any }, column) => {\n acc[column.name] = ''; // or any default value\n return acc;\n }, {});\n console.log(value);\n this.context = [...value, newRecord];\n this.grid()?.refresh();\n }\n\n handleSelectionChange(e: any) {\n console.log(e);\n }\n\n protected async handleRowCommandClick(e: AXRowCommandItemClickEvent) {\n if (e.name == 'delete') {\n this.context = this.context.filter((item: any) => item.id !== e.data.id);\n this.grid()?.refresh();\n }\n }\n\n protected async handleSaveClick(form: AXFormComponent) {\n const formResult = await form.validate();\n console.log(formResult.rules);\n\n if (formResult.result) {\n this.close({\n context: this.context,\n });\n }\n }\n}\n"],"names":["i1","i2","i3","i4","i5","i6","i7"],"mappings":";;;;;;;;;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,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,YAAY;AACb,qBAAA;AACF,iBAAA;kEAgEkD,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -38,7 +38,7 @@ class AXPTabularDataPopupComponent extends AXBasePageComponent {
|
|
|
38
38
|
><div class="ax-flex ax-w-full ax-justify-end">
|
|
39
39
|
<ax-button color="primary" [text]="'Okay'" (onClick)="onClose()"></ax-button></div
|
|
40
40
|
></ax-footer>
|
|
41
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXDataTableModule }, { kind: "component", type: i1$1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "
|
|
41
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXDataTableModule }, { kind: "component", type: i1$1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$1.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "hasTitle", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
42
42
|
}
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTabularDataPopupComponent, decorators: [{
|
|
44
44
|
type: Component,
|
|
@@ -61,4 +61,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
61
61
|
}] });
|
|
62
62
|
|
|
63
63
|
export { AXPTabularDataPopupComponent };
|
|
64
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-view-popup.component-
|
|
64
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layout-widgets-tabular-data-view-popup.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/editors/tabular-data/tabular-data-view-popup.component.ts"],"sourcesContent":["import { AXDataSource } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDataTableModule } from '@acorex/components/data-table';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AXPTabularDataColumn } from './tabular-widget.types';\n\n@Component({\n selector: 'axp-tabular-data-view-popup',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ax-data-table class=\"ax-m-4\" #grid [paging]=\"false\" [dataSource]=\"dataSource\">\n @for (column of columns; track $index) {\n <ax-text-column [dataField]=\"column.name\" [caption]=\"column.title\"></ax-text-column>\n }\n </ax-data-table>\n <ax-footer\n ><div class=\"ax-flex ax-w-full ax-justify-end\">\n <ax-button color=\"primary\" [text]=\"'Okay'\" (onClick)=\"onClose()\"></ax-button></div\n ></ax-footer>\n `,\n imports: [AXDecoratorModule, AXButtonModule, AXDataTableModule],\n})\nexport class AXPTabularDataPopupComponent extends AXBasePageComponent {\n items: [];\n columns: AXPTabularDataColumn[];\n\n protected dataSource = new AXDataSource({\n load: async () => {\n const items = this.items;\n return {\n items: items,\n total: items.length,\n };\n },\n pageSize: 1,\n key: 'gridItem',\n });\n\n onClose() {\n this.close();\n }\n}\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;AAwBM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAhBrE,IAAA,WAAA,GAAA;;QAoBY,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAAC;YACtC,IAAI,EAAE,YAAW;AACf,gBAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK;gBACxB,OAAO;AACL,oBAAA,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,KAAK,CAAC,MAAM;iBACpB;YACH,CAAC;AACD,YAAA,QAAQ,EAAE,CAAC;A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