@acorex/platform 19.2.7 → 19.2.8
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/common/lib/app/application.types.d.ts +1 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +9 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +26 -12
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +4 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs +272 -0
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs → acorex-platform-widgets-tabular-data-view-popup.component-BaslkAPS.mjs} +16 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BaslkAPS.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +310 -112
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +3 -0
- package/layout/entity/lib/entity.viewmodel.d.ts +1 -0
- package/package.json +5 -5
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +23 -3
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +20 -6
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +1 -3
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +4 -1
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.d.ts +11 -2
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-view-popup.component.d.ts +3 -1
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +0 -2
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs +0 -144
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
1
2
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
2
3
|
import { AXPMetaData } from '@acorex/platform/core';
|
|
3
4
|
import { SimpleChanges, WritableSignal } from '@angular/core';
|
|
@@ -43,6 +44,8 @@ export declare class AXPWidgetRendererDirective {
|
|
|
43
44
|
}>;
|
|
44
45
|
protected widgetRegistery: AXPWidgetRegistryService;
|
|
45
46
|
protected unsubscriber: AXUnsubscriber;
|
|
47
|
+
protected translateService: AXTranslationService;
|
|
48
|
+
protected widgetService: AXPWidgetRegistryService;
|
|
46
49
|
private viewContainerRef;
|
|
47
50
|
protected isLoading: WritableSignal<boolean>;
|
|
48
51
|
private instance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/platform",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.8",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=19.0.0",
|
|
6
6
|
"@angular/core": ">=19.0.0",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"types": "./common/index.d.ts",
|
|
46
46
|
"default": "./fesm2022/acorex-platform-common.mjs"
|
|
47
47
|
},
|
|
48
|
-
"./native": {
|
|
49
|
-
"types": "./native/index.d.ts",
|
|
50
|
-
"default": "./fesm2022/acorex-platform-native.mjs"
|
|
51
|
-
},
|
|
52
48
|
"./core": {
|
|
53
49
|
"types": "./core/index.d.ts",
|
|
54
50
|
"default": "./fesm2022/acorex-platform-core.mjs"
|
|
55
51
|
},
|
|
52
|
+
"./native": {
|
|
53
|
+
"types": "./native/index.d.ts",
|
|
54
|
+
"default": "./fesm2022/acorex-platform-native.mjs"
|
|
55
|
+
},
|
|
56
56
|
"./widgets": {
|
|
57
57
|
"types": "./widgets/index.d.ts",
|
|
58
58
|
"default": "./fesm2022/acorex-platform-widgets.mjs"
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
import { AXPWidgetComponent } from '@acorex/platform/layout/builder';
|
|
2
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
3
|
import { AXPBarChartValue } from './bar-chart.type';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AXPBarChartWidgetEditComponent extends AXPWidgetComponent<AXPBarChartValue> {
|
|
5
|
+
export declare class AXPBarChartWidgetEditComponent extends AXPWidgetComponent<AXPBarChartValue> implements OnInit, OnDestroy {
|
|
6
|
+
#private;
|
|
5
7
|
private chartEl;
|
|
6
8
|
private d3;
|
|
7
|
-
|
|
9
|
+
private svg;
|
|
10
|
+
private data;
|
|
11
|
+
private isRendered;
|
|
12
|
+
private tooltip;
|
|
8
13
|
private loadD3;
|
|
9
|
-
private
|
|
14
|
+
private initializeChart;
|
|
15
|
+
private drawChart;
|
|
16
|
+
private updateChart;
|
|
17
|
+
private getChartDimensions;
|
|
18
|
+
private createXScale;
|
|
19
|
+
private createYScale;
|
|
20
|
+
private drawBars;
|
|
21
|
+
private updateBars;
|
|
22
|
+
private drawAxes;
|
|
23
|
+
private updateAxes;
|
|
24
|
+
private addTooltips;
|
|
25
|
+
private updateTooltips;
|
|
26
|
+
private addLegend;
|
|
27
|
+
private updateLegend;
|
|
28
|
+
private addZoom;
|
|
29
|
+
private addExportButton;
|
|
10
30
|
ngOnDestroy(): void;
|
|
11
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPBarChartWidgetEditComponent, never>;
|
|
12
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPBarChartWidgetEditComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { AXPChartValue } from '../chart.type';
|
|
2
|
+
export interface AXPBarChartOption {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
margin?: {
|
|
6
|
+
top: number;
|
|
7
|
+
right: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
left: number;
|
|
10
|
+
};
|
|
11
|
+
color?: string;
|
|
12
|
+
enableTooltip?: boolean;
|
|
13
|
+
enableLegend?: boolean;
|
|
14
|
+
enableZoom?: boolean;
|
|
15
|
+
enableExport?: boolean;
|
|
16
|
+
barPadding?: number;
|
|
17
|
+
axisColor?: string;
|
|
18
|
+
axisFontSize?: number;
|
|
19
|
+
tooltipBackground?: string;
|
|
20
|
+
tooltipTextColor?: string;
|
|
21
|
+
}
|
|
2
22
|
export interface AXPBarChartData {
|
|
3
23
|
id: string;
|
|
4
24
|
name: string;
|
|
5
25
|
value: number;
|
|
6
26
|
color?: string;
|
|
7
27
|
}
|
|
8
|
-
export interface AXPBarChartOption {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
color?: string;
|
|
12
|
-
yAxisTick?: boolean;
|
|
13
|
-
}
|
|
14
28
|
export interface AXPBarChartValue extends AXPChartValue<AXPBarChartData[], AXPBarChartOption> {
|
|
15
29
|
}
|
|
@@ -13,9 +13,7 @@ export declare class AXPDateTimeBoxWidgetEditComponent extends AXPWidgetComponen
|
|
|
13
13
|
protected disabled: Signal<boolean>;
|
|
14
14
|
protected placeholder: Signal<string>;
|
|
15
15
|
protected internalValue: Signal<string[]>;
|
|
16
|
-
|
|
17
|
-
get validationRules(): AXPValidationRules;
|
|
18
|
-
set validationRules(v: AXPValidationRules);
|
|
16
|
+
protected validationRules: Signal<AXPValidationRules>;
|
|
19
17
|
protected handleValueChange(e: AXValueChangedEvent, i: number): void;
|
|
20
18
|
protected calendarFormat: Signal<"dd/MM/yyyy" | "HH:mm" | "dd/MM/yyyy HH:mm">;
|
|
21
19
|
protected addItem(): void;
|
|
@@ -5,9 +5,12 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class AXPRichTextWidgetEditComponent extends AXPWidgetComponent<any> {
|
|
6
6
|
protected placeholder: import("@angular/core").Signal<string>;
|
|
7
7
|
protected disabled: import("@angular/core").Signal<boolean>;
|
|
8
|
+
protected minLineCount: import("@angular/core").Signal<number>;
|
|
9
|
+
protected maxLineCount: import("@angular/core").Signal<number>;
|
|
10
|
+
protected isFitLine: import("@angular/core").Signal<boolean>;
|
|
8
11
|
protected validationRules: import("@angular/core").Signal<AXPValidationRules>;
|
|
9
12
|
protected setWysiwyg(e: AXValueChangedEvent): void;
|
|
10
|
-
|
|
13
|
+
protected getLinePx(count: number): string;
|
|
11
14
|
private get __class();
|
|
12
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPRichTextWidgetEditComponent, never>;
|
|
13
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPRichTextWidgetEditComponent, "axp-rich-text-widget", never, {}, {}, never, never, true, never>;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
+
import { AXDataSource } from '@acorex/components/common';
|
|
2
|
+
import { AXDataTableComponent, AXRowCommandItem, AXRowCommandItemClickEvent } from '@acorex/components/data-table';
|
|
3
|
+
import { AXFormComponent } from '@acorex/components/form';
|
|
1
4
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
2
5
|
import { AXPLayoutContextChangeEvent } from '@acorex/platform/layout/builder';
|
|
3
6
|
import { AXPTabularDataColumn } from './tabular-widget.types';
|
|
4
|
-
import { AXDataTableComponent } from '@acorex/components/data-table';
|
|
5
|
-
import { AXDataSource } from '@acorex/components/common';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class AXPTabularDataPopupComponent extends AXBasePageComponent {
|
|
8
9
|
context: any;
|
|
9
10
|
columns: AXPTabularDataColumn[];
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
defaultRowCount: number;
|
|
13
|
+
contextDiscard: any;
|
|
14
|
+
getCommandRowItems: AXRowCommandItem[];
|
|
15
|
+
protected ngOnInit(): void;
|
|
10
16
|
protected dataSource: AXDataSource<unknown>;
|
|
11
17
|
protected grid: import("@angular/core").Signal<AXDataTableComponent | undefined>;
|
|
12
18
|
handleContextChange(e: AXPLayoutContextChangeEvent): void;
|
|
13
19
|
onClose(): void;
|
|
20
|
+
onCloseDiscard(): void;
|
|
14
21
|
addRecord(): void;
|
|
15
22
|
handleSelectionChange(e: any): void;
|
|
23
|
+
protected handleRowCommandClick(e: AXRowCommandItemClickEvent): Promise<void>;
|
|
24
|
+
protected handleSaveClick(form: AXFormComponent): Promise<void>;
|
|
16
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPTabularDataPopupComponent, never>;
|
|
17
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPTabularDataPopupComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
18
27
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { AXDataSource } from '@acorex/components/common';
|
|
1
2
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
2
3
|
import { AXPTabularDataColumn } from './tabular-widget.types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class AXPTabularDataPopupComponent extends AXBasePageComponent {
|
|
5
|
-
|
|
6
|
+
items: [];
|
|
6
7
|
columns: AXPTabularDataColumn[];
|
|
8
|
+
protected dataSource: AXDataSource<never>;
|
|
7
9
|
onClose(): void;
|
|
8
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPTabularDataPopupComponent, never>;
|
|
9
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPTabularDataPopupComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -3,7 +3,7 @@ import { AXPTabularDataColumn } from './tabular-widget.types';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class AXPTabularDataEditorWidgetEditComponent extends AXPWidgetComponent<any> {
|
|
5
5
|
protected columns: import("@angular/core").Signal<AXPTabularDataColumn[]>;
|
|
6
|
-
protected
|
|
6
|
+
protected defaultRowCount: import("@angular/core").Signal<number>;
|
|
7
7
|
private popupService;
|
|
8
8
|
private platform;
|
|
9
9
|
protected openPopup(): Promise<void>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AXDataSource } from '@acorex/components/common';
|
|
2
1
|
import { AXPWidgetComponent } from '@acorex/platform/layout/builder';
|
|
3
2
|
import { AXPTabularDataColumn } from './tabular-widget.types';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
@@ -6,7 +5,6 @@ export declare class AXPTabularDataEditorWidgetViewComponent extends AXPWidgetCo
|
|
|
6
5
|
private popupService;
|
|
7
6
|
private platform;
|
|
8
7
|
protected columns: AXPTabularDataColumn[];
|
|
9
|
-
protected dataSource: AXDataSource<unknown>;
|
|
10
8
|
protected openPopup(): Promise<void>;
|
|
11
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPTabularDataEditorWidgetViewComponent, never>;
|
|
12
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPTabularDataEditorWidgetViewComponent, "axp-table-editor-widget", never, {}, {}, never, never, true, never>;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import * as i5 from '@acorex/components/button';
|
|
2
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
-
import * as i3 from '@acorex/components/decorators';
|
|
4
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
-
import { AXBasePageComponent } from '@acorex/components/page';
|
|
6
|
-
import * as i1$1 from '@acorex/platform/layout/builder';
|
|
7
|
-
import { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
8
|
-
import * as i0 from '@angular/core';
|
|
9
|
-
import { viewChild, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
10
|
-
import * as i5$1 from '@acorex/components/data-table';
|
|
11
|
-
import { AXDataTableModule } from '@acorex/components/data-table';
|
|
12
|
-
import { AXDataSource } from '@acorex/components/common';
|
|
13
|
-
import * as i5$2 from '@acorex/core/translation';
|
|
14
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
|
15
|
-
import * as i1 from '@angular/common';
|
|
16
|
-
import { CommonModule } from '@angular/common';
|
|
17
|
-
|
|
18
|
-
class AXPTabularDataPopupComponent extends AXBasePageComponent {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.dataSource = new AXDataSource({
|
|
22
|
-
load: async () => {
|
|
23
|
-
const items = this.context;
|
|
24
|
-
return {
|
|
25
|
-
items: items ?? [],
|
|
26
|
-
total: 0
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
pageSize: 1000,
|
|
30
|
-
key: 'gridItem',
|
|
31
|
-
});
|
|
32
|
-
this.grid = viewChild('grid');
|
|
33
|
-
}
|
|
34
|
-
handleContextChange(e) {
|
|
35
|
-
this.context = e.data;
|
|
36
|
-
}
|
|
37
|
-
onClose() {
|
|
38
|
-
console.log(this.context);
|
|
39
|
-
this.close({
|
|
40
|
-
context: this.context,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
addRecord() {
|
|
44
|
-
console.log(this.columns);
|
|
45
|
-
const value = this.context ?? [];
|
|
46
|
-
const newRecord = this.columns?.reduce((acc, column) => {
|
|
47
|
-
acc[column.name] = ''; // or any default value
|
|
48
|
-
return acc;
|
|
49
|
-
}, {});
|
|
50
|
-
console.log(value);
|
|
51
|
-
this.context = [...value, newRecord];
|
|
52
|
-
this.grid()?.refresh();
|
|
53
|
-
}
|
|
54
|
-
handleSelectionChange(e) {
|
|
55
|
-
console.log(e);
|
|
56
|
-
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTabularDataPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTabularDataPopupComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
59
|
-
<div class="ax-p-4">
|
|
60
|
-
<ax-data-table
|
|
61
|
-
#grid
|
|
62
|
-
[paging]="false"
|
|
63
|
-
(selectedRowsChange)="handleSelectionChange($event)"
|
|
64
|
-
[dataSource]="dataSource"
|
|
65
|
-
>
|
|
66
|
-
@for (column of columns; track $index) {
|
|
67
|
-
<ax-text-column [caption]="column.title" [dataField]="column.name" [cellTemplate]="cell"></ax-text-column>
|
|
68
|
-
<ng-template #cell let-item>
|
|
69
|
-
<axp-widgets-container [context]="context" (onContextChanged)="handleContextChange($event)">
|
|
70
|
-
<ng-container
|
|
71
|
-
axp-widget-renderer
|
|
72
|
-
[node]="{
|
|
73
|
-
path:item.rowIndex + '.' + column.name,
|
|
74
|
-
type: column.type.name,
|
|
75
|
-
options:column.options ?? {}
|
|
76
|
-
}"
|
|
77
|
-
[mode]="'edit'"
|
|
78
|
-
>
|
|
79
|
-
</ng-container>
|
|
80
|
-
</axp-widgets-container>
|
|
81
|
-
</ng-template>
|
|
82
|
-
}
|
|
83
|
-
</ax-data-table>
|
|
84
|
-
<div class="ax-flex ax-justify-center ax-items-center">
|
|
85
|
-
<ax-button color="success" (onClick)="addRecord()">
|
|
86
|
-
<ax-icon class="fa-solid fa-plus"></ax-icon>
|
|
87
|
-
</ax-button>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<ax-footer>
|
|
91
|
-
<ax-suffix>
|
|
92
|
-
<ax-button color="primary" [text]="'Okay' | translate | async" (onClick)="onClose()"></ax-button>
|
|
93
|
-
</ax-suffix>
|
|
94
|
-
</ax-footer>
|
|
95
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.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: i5.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { 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"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i5$1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged"] }, { kind: "component", type: i5$1.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5$2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
96
|
-
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTabularDataPopupComponent, decorators: [{
|
|
98
|
-
type: Component,
|
|
99
|
-
args: [{
|
|
100
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
101
|
-
template: `
|
|
102
|
-
<div class="ax-p-4">
|
|
103
|
-
<ax-data-table
|
|
104
|
-
#grid
|
|
105
|
-
[paging]="false"
|
|
106
|
-
(selectedRowsChange)="handleSelectionChange($event)"
|
|
107
|
-
[dataSource]="dataSource"
|
|
108
|
-
>
|
|
109
|
-
@for (column of columns; track $index) {
|
|
110
|
-
<ax-text-column [caption]="column.title" [dataField]="column.name" [cellTemplate]="cell"></ax-text-column>
|
|
111
|
-
<ng-template #cell let-item>
|
|
112
|
-
<axp-widgets-container [context]="context" (onContextChanged)="handleContextChange($event)">
|
|
113
|
-
<ng-container
|
|
114
|
-
axp-widget-renderer
|
|
115
|
-
[node]="{
|
|
116
|
-
path:item.rowIndex + '.' + column.name,
|
|
117
|
-
type: column.type.name,
|
|
118
|
-
options:column.options ?? {}
|
|
119
|
-
}"
|
|
120
|
-
[mode]="'edit'"
|
|
121
|
-
>
|
|
122
|
-
</ng-container>
|
|
123
|
-
</axp-widgets-container>
|
|
124
|
-
</ng-template>
|
|
125
|
-
}
|
|
126
|
-
</ax-data-table>
|
|
127
|
-
<div class="ax-flex ax-justify-center ax-items-center">
|
|
128
|
-
<ax-button color="success" (onClick)="addRecord()">
|
|
129
|
-
<ax-icon class="fa-solid fa-plus"></ax-icon>
|
|
130
|
-
</ax-button>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
<ax-footer>
|
|
134
|
-
<ax-suffix>
|
|
135
|
-
<ax-button color="primary" [text]="'Okay' | translate | async" (onClick)="onClose()"></ax-button>
|
|
136
|
-
</ax-suffix>
|
|
137
|
-
</ax-footer>
|
|
138
|
-
`,
|
|
139
|
-
imports: [CommonModule, AXDecoratorModule, AXButtonModule, AXPLayoutBuilderModule, AXDataTableModule, AXTranslationModule]
|
|
140
|
-
}]
|
|
141
|
-
}] });
|
|
142
|
-
|
|
143
|
-
export { AXPTabularDataPopupComponent };
|
|
144
|
-
//# sourceMappingURL=acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs","sources":["../../../../libs/platform/widgets/src/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXPLayoutBuilderModule, AXPLayoutContextChangeEvent } from '@acorex/platform/layout/builder';\nimport { ChangeDetectionStrategy, Component, effect, viewChild } from '@angular/core';\nimport { AXPTabularDataColumn } from './tabular-widget.types';\nimport { AXDataTableComponent, AXDataTableModule } from '@acorex/components/data-table';\nimport { AXComponentClosing, AXDataSource } from '@acorex/components/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-p-4\">\n <ax-data-table\n #grid\n [paging]=\"false\"\n (selectedRowsChange)=\"handleSelectionChange($event)\"\n [dataSource]=\"dataSource\"\n >\n @for (column of columns; track $index) {\n <ax-text-column [caption]=\"column.title\" [dataField]=\"column.name\" [cellTemplate]=\"cell\"></ax-text-column>\n <ng-template #cell let-item>\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChange($event)\">\n <ng-container\n axp-widget-renderer\n [node]=\"{\n path:item.rowIndex + '.' + column.name,\n type: column.type.name,\n options:column.options ?? {}\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </axp-widgets-container>\n </ng-template>\n }\n </ax-data-table>\n <div class=\"ax-flex ax-justify-center ax-items-center\">\n <ax-button color=\"success\" (onClick)=\"addRecord()\">\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-button>\n </div>\n </div>\n <ax-footer>\n <ax-suffix>\n <ax-button color=\"primary\" [text]=\"'Okay' | translate | async\" (onClick)=\"onClose()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n `,\n imports: [CommonModule, AXDecoratorModule, AXButtonModule, AXPLayoutBuilderModule, AXDataTableModule, AXTranslationModule]\n})\nexport class AXPTabularDataPopupComponent extends AXBasePageComponent {\n context: any;\n columns: AXPTabularDataColumn[];\n\n protected dataSource = new AXDataSource({\n load: async () => {\n const items = this.context;\n return {\n items: items ?? [],\n total: 0\n };\n },\n pageSize: 1000,\n key: 'gridItem',\n });\n\n protected grid = viewChild<AXDataTableComponent>('grid');\n\n handleContextChange(e: AXPLayoutContextChangeEvent) {\n this.context = e.data;\n }\n\n onClose() {\n console.log(this.context);\n this.close({\n context: this.context,\n });\n }\n\n addRecord() {\n\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\n}\n"],"names":["i2","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;AAqDM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AA1CrE,IAAA,WAAA,GAAA;;QA8CY,IAAU,CAAA,UAAA,GAAG,IAAI,YAAY,CAAC;YACtC,IAAI,EAAE,YAAW;AACf,gBAAA,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO;gBAC1B,OAAO;oBACL,KAAK,EAAE,KAAK,IAAI,EAAE;AAClB,oBAAA,KAAK,EAAE;iBACR;aACF;AACD,YAAA,QAAQ,EAAE,IAAI;AAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCT,EAAA,CAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,mBAAmB;AAC1H,iBAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs","sources":["../../../../libs/platform/widgets/src/lib/widgets/editors/tabular-data/tabular-data-view-popup.component.ts"],"sourcesContent":["import { 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 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 dataSource: [];\n columns: AXPTabularDataColumn[];\n onClose() {\n this.close();\n }\n}\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;AAsBM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;IAGnE,OAAO,GAAA;QACL,IAAI,CAAC,KAAK,EAAE;;8GAJH,4BAA4B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAA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