imm-element-ui 2.4.3 → 2.4.5
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/esm2022/lib/am/am.component.mjs +11 -7
- package/esm2022/lib/crumb-action/crumb-action.component.mjs +4 -3
- package/esm2022/lib/form/form/form.component.mjs +77 -30
- package/esm2022/lib/form/form-field/field-utils.mjs +10 -6
- package/esm2022/lib/form/form-field/form-field.mjs +5 -1
- package/esm2022/lib/grid/cell-render/primeAct-renderer.mjs +12 -10
- package/esm2022/lib/grid/grid/grid.component.mjs +15 -5
- package/esm2022/lib/page-form/page-form.component.mjs +522 -32
- package/esm2022/lib/page-form/page-form.interface.mjs +1 -1
- package/esm2022/lib/page-grid-list/page-grid-list.component.mjs +2 -2
- package/esm2022/lib/row-selector/row-selector.component.mjs +15 -9
- package/esm2022/lib/share/utils.mjs +76 -6
- package/esm2022/lib/single-select-listbox/single-select-listbox.component.mjs +129 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/imm-element-ui.mjs +899 -139
- package/fesm2022/imm-element-ui.mjs.map +1 -1
- package/lib/crumb-action/crumb-action.component.d.ts +2 -1
- package/lib/form/form/form.component.d.ts +2 -0
- package/lib/form/form-field/field-utils.d.ts +2 -0
- package/lib/grid/grid/grid.component.d.ts +7 -3
- package/lib/page-form/page-form.component.d.ts +63 -8
- package/lib/page-form/page-form.interface.d.ts +50 -0
- package/lib/row-selector/row-selector.component.d.ts +5 -2
- package/lib/search/pop-date/pop-date.component.d.ts +1 -1
- package/lib/share/utils.d.ts +2 -0
- package/lib/single-select-listbox/single-select-listbox.component.d.ts +38 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/page-form/page-form.component.scss +3 -0
- package/src/lib/single-select-listbox/single-select-listbox.component.scss +104 -0
- package/esm2022/lib/mock/index.mjs +0 -2
- package/esm2022/lib/mock/mssf-task.mock.mjs +0 -950
- package/lib/mock/index.d.ts +0 -1
- package/lib/mock/mssf-task.mock.d.ts +0 -142
|
@@ -36,6 +36,7 @@ export declare class CrumbActionComponent extends AmComponent implements OnInit
|
|
|
36
36
|
isSave: import("@angular/core").Signal<boolean>;
|
|
37
37
|
loading: import("@angular/core").Signal<boolean>;
|
|
38
38
|
saveBtnDisable: import("@angular/core").InputSignal<boolean>;
|
|
39
|
+
showSaveButton: import("@angular/core").InputSignal<boolean>;
|
|
39
40
|
currentPageUrl: string;
|
|
40
41
|
constructor();
|
|
41
42
|
resize(event: any): void;
|
|
@@ -52,5 +53,5 @@ export declare class CrumbActionComponent extends AmComponent implements OnInit
|
|
|
52
53
|
setSaveClass(): "danger" | "secondary";
|
|
53
54
|
ngOnDestroy(): void;
|
|
54
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrumbActionComponent, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CrumbActionComponent, "app-crumb-action", never, { "isShowCog": { "alias": "isShowCog"; "required": false; "isSignal": true; }; "addVisible": { "alias": "addVisible"; "required": false; "isSignal": true; }; "importVisible": { "alias": "importVisible"; "required": false; "isSignal": true; }; "exportVisible": { "alias": "exportVisible"; "required": false; "isSignal": true; }; "newUrl": { "alias": "newUrl"; "required": false; "isSignal": true; }; "configNewPath": { "alias": "configNewPath"; "required": false; "isSignal": true; }; "onExport": { "alias": "onExport"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "isList": { "alias": "isList"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; "actionList": { "alias": "actionList"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "saveBtnDisable": { "alias": "saveBtnDisable"; "required": false; "isSignal": true; }; }, { "saveEvent": "saveEvent"; "cancelEvent": "cancelEvent"; "actionEvent": "actionEvent"; }, ["newBtnTemplateRef"], never, true, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CrumbActionComponent, "app-crumb-action", never, { "isShowCog": { "alias": "isShowCog"; "required": false; "isSignal": true; }; "addVisible": { "alias": "addVisible"; "required": false; "isSignal": true; }; "importVisible": { "alias": "importVisible"; "required": false; "isSignal": true; }; "exportVisible": { "alias": "exportVisible"; "required": false; "isSignal": true; }; "newUrl": { "alias": "newUrl"; "required": false; "isSignal": true; }; "configNewPath": { "alias": "configNewPath"; "required": false; "isSignal": true; }; "onExport": { "alias": "onExport"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "isList": { "alias": "isList"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; "actionList": { "alias": "actionList"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "saveBtnDisable": { "alias": "saveBtnDisable"; "required": false; "isSignal": true; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; "isSignal": true; }; }, { "saveEvent": "saveEvent"; "cancelEvent": "cancelEvent"; "actionEvent": "actionEvent"; }, ["newBtnTemplateRef"], never, true, never>;
|
|
56
57
|
}
|
|
@@ -49,6 +49,8 @@ export declare class FormComponent {
|
|
|
49
49
|
ngAfterViewInit(): void;
|
|
50
50
|
ngOnDestroy(): void;
|
|
51
51
|
initForm(): void;
|
|
52
|
+
private applyDefaultValues;
|
|
53
|
+
private shouldApplyDefaults;
|
|
52
54
|
getField(key: string): FormField | undefined;
|
|
53
55
|
parseFields(fields: FormField[]): void;
|
|
54
56
|
handleFieldControl(field: FormField): void;
|
|
@@ -4,6 +4,8 @@ import { I18nService } from '../../service/i18n.service';
|
|
|
4
4
|
export declare const fieldUtils: {
|
|
5
5
|
props: (field: FormField) => FieldProps;
|
|
6
6
|
label: (field: FormField, i18nService: I18nService) => string | undefined;
|
|
7
|
+
getModel: (model: any, key: string) => any;
|
|
8
|
+
setModel: (model: any, key: string, value: any) => void;
|
|
7
9
|
fieldHandler: (field: FormField) => void;
|
|
8
10
|
dafaultValueHandler: (field: FormField, defaultValue: any, datePipe: DatePipe) => any;
|
|
9
11
|
triggerHookAndSetValue: (field: FormField, value: any, emitEvent: boolean, emitHook: boolean, hookObservers: any[], callback: any, datePipe: DatePipe) => void;
|
|
@@ -67,10 +67,10 @@ export declare class GridComponent {
|
|
|
67
67
|
rawPrm?: Search;
|
|
68
68
|
deleteEmit: import("@angular/core").OutputEmitterRef<number[]>;
|
|
69
69
|
addEmit: import("@angular/core").OutputEmitterRef<void>;
|
|
70
|
-
addType: import("@angular/core").InputSignal<"
|
|
70
|
+
addType: import("@angular/core").InputSignal<"none" | "select" | "handle" | undefined>;
|
|
71
71
|
selectData: import("@angular/core").InputSignal<any[] | undefined>;
|
|
72
72
|
showAct: import("@angular/core").InputSignal<boolean>;
|
|
73
|
-
actPos: import("@angular/core").InputSignal<"
|
|
73
|
+
actPos: import("@angular/core").InputSignal<"top" | "bottom">;
|
|
74
74
|
authLevel: import("@angular/core").InputSignal<number>;
|
|
75
75
|
http: HttpClient;
|
|
76
76
|
renderer: Renderer2;
|
|
@@ -79,6 +79,10 @@ export declare class GridComponent {
|
|
|
79
79
|
showDelete: import("@angular/core").InputSignal<boolean>;
|
|
80
80
|
gridDisable: import("@angular/core").InputSignal<boolean>;
|
|
81
81
|
addSort: import("@angular/core").InputSignal<string | undefined>;
|
|
82
|
+
subSaveVisible: import("@angular/core").InputSignal<boolean>;
|
|
83
|
+
subSaveLabel: import("@angular/core").InputSignal<string>;
|
|
84
|
+
subSaveDisabled: import("@angular/core").InputSignal<boolean>;
|
|
85
|
+
subSaveEmit: import("@angular/core").OutputEmitterRef<void>;
|
|
82
86
|
richMultMap: Record<string, any>;
|
|
83
87
|
horizontalScrollBarObserver: any;
|
|
84
88
|
horizontalScrollBarHeight: number;
|
|
@@ -125,5 +129,5 @@ export declare class GridComponent {
|
|
|
125
129
|
onRowDragEnd(event: RowDragEndEvent): void;
|
|
126
130
|
isRange(columnFilter: ColumnFilter[]): any;
|
|
127
131
|
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
128
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "custom-grid", never, { "gridOptions": { "alias": "gridOptions"; "required": false; "isSignal": true; }; "selectionKeys": { "alias": "selectionKeys"; "required": false; "isSignal": true; }; "upsert": { "alias": "upsert"; "required": false; "isSignal": true; }; "rowData": { "alias": "rowData"; "required": false; "isSignal": true; }; "searchPrm": { "alias": "searchPrm"; "required": false; "isSignal": true; }; "addType": { "alias": "addType"; "required": false; "isSignal": true; }; "selectData": { "alias": "selectData"; "required": false; "isSignal": true; }; "showAct": { "alias": "showAct"; "required": false; "isSignal": true; }; "actPos": { "alias": "actPos"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; "showDelete": { "alias": "showDelete"; "required": false; "isSignal": true; }; "gridDisable": { "alias": "gridDisable"; "required": false; "isSignal": true; }; "addSort": { "alias": "addSort"; "required": false; "isSignal": true; }; }, { "deleteEmit": "deleteEmit"; "addEmit": "addEmit"; }, never, never, true, never>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "custom-grid", never, { "gridOptions": { "alias": "gridOptions"; "required": false; "isSignal": true; }; "selectionKeys": { "alias": "selectionKeys"; "required": false; "isSignal": true; }; "upsert": { "alias": "upsert"; "required": false; "isSignal": true; }; "rowData": { "alias": "rowData"; "required": false; "isSignal": true; }; "searchPrm": { "alias": "searchPrm"; "required": false; "isSignal": true; }; "addType": { "alias": "addType"; "required": false; "isSignal": true; }; "selectData": { "alias": "selectData"; "required": false; "isSignal": true; }; "showAct": { "alias": "showAct"; "required": false; "isSignal": true; }; "actPos": { "alias": "actPos"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; "showDelete": { "alias": "showDelete"; "required": false; "isSignal": true; }; "gridDisable": { "alias": "gridDisable"; "required": false; "isSignal": true; }; "addSort": { "alias": "addSort"; "required": false; "isSignal": true; }; "subSaveVisible": { "alias": "subSaveVisible"; "required": false; "isSignal": true; }; "subSaveLabel": { "alias": "subSaveLabel"; "required": false; "isSignal": true; }; "subSaveDisabled": { "alias": "subSaveDisabled"; "required": false; "isSignal": true; }; }, { "deleteEmit": "deleteEmit"; "addEmit": "addEmit"; "subSaveEmit": "subSaveEmit"; }, never, never, true, never>;
|
|
129
133
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { UserHistoryService } from '../service/userHistory.service';
|
|
2
|
-
import { AfterContentInit, AfterViewInit,
|
|
2
|
+
import { AfterContentInit, AfterViewInit, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
3
3
|
import { FormComponent, FormOptions } from '../form/form/form.component';
|
|
4
|
-
import {
|
|
4
|
+
import { RowSelectorComponent } from '../row-selector/row-selector.component';
|
|
5
|
+
import { Step, StepsComponent } from '../steps/steps.component';
|
|
5
6
|
import { GridComponent, GridOptions } from '../grid/grid/grid.component';
|
|
6
|
-
import { AmComponent, Get } from '../am/am.component';
|
|
7
|
-
import {
|
|
8
|
-
import { HrefBtnList, GridList, PageFormSlotContext } from './page-form.interface';
|
|
9
|
-
import { PermissionBtn } from './page-form.interface';
|
|
7
|
+
import { AmComponent, Get, Search } from '../am/am.component';
|
|
8
|
+
import { GridList, HrefBtnList, PageFormSlotContext, PageLeftPanelConfig, PermissionBtn, CustomListDialog, CustomListFormTemplateContext } from './page-form.interface';
|
|
10
9
|
import { ActionService } from '../service/action.service';
|
|
11
10
|
import { PageFormService } from '../service/page-form.service';
|
|
12
11
|
import { PageFormSlotDirective } from './page-form-slot.directive';
|
|
12
|
+
import { SingleSelectListboxChangeEvent } from '../single-select-listbox/single-select-listbox.component';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare class PageFormComponent extends AmComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentInit {
|
|
15
15
|
cForm: FormComponent;
|
|
16
16
|
customGrid: QueryList<GridComponent>;
|
|
17
17
|
tabForm: QueryList<FormComponent>;
|
|
18
|
+
rowSelector?: RowSelectorComponent;
|
|
18
19
|
pageFormSlots: QueryList<PageFormSlotDirective>;
|
|
19
20
|
showLog: import("@angular/core").Signal<boolean>;
|
|
20
21
|
addVisible: import("@angular/core").InputSignal<boolean | undefined>;
|
|
@@ -32,13 +33,22 @@ export declare class PageFormComponent extends AmComponent implements OnInit, On
|
|
|
32
33
|
statusConf: import("@angular/core").InputSignal<any>;
|
|
33
34
|
formDetail: import("@angular/core").InputSignal<any>;
|
|
34
35
|
saveFunc: import("@angular/core").InputSignal<any>;
|
|
36
|
+
showMainSaveButton: import("@angular/core").InputSignal<boolean>;
|
|
35
37
|
configNewPath: import("@angular/core").InputSignal<any>;
|
|
38
|
+
runtimeContextInput: import("@angular/core").InputSignal<any>;
|
|
36
39
|
customLeftPanel: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
40
|
+
customListFormTemplateMap: import("@angular/core").InputSignal<Record<string, TemplateRef<CustomListFormTemplateContext>> | null>;
|
|
41
|
+
customListFormInstanceMap: import("@angular/core").InputSignal<Record<string, CustomListDialog | undefined> | null>;
|
|
42
|
+
leftPanel: import("@angular/core").InputSignal<PageLeftPanelConfig | null>;
|
|
43
|
+
panelSelectedData: import("@angular/core").InputSignal<any>;
|
|
44
|
+
runtimeContext: Record<string, any>;
|
|
37
45
|
private currentIdAndModelName;
|
|
38
46
|
userHistoryService: UserHistoryService;
|
|
39
47
|
pageFormService: PageFormService<Record<string, unknown>>;
|
|
40
48
|
private readonly cdr;
|
|
41
49
|
private _indexValue;
|
|
50
|
+
private readonly internalGridList;
|
|
51
|
+
private gridListOverridden;
|
|
42
52
|
visible: boolean;
|
|
43
53
|
dialogSearchPrm: Search;
|
|
44
54
|
selectOptions: GridOptions;
|
|
@@ -53,21 +63,48 @@ export declare class PageFormComponent extends AmComponent implements OnInit, On
|
|
|
53
63
|
gridDisable: boolean;
|
|
54
64
|
selectionKeys: any[];
|
|
55
65
|
subDeleteIds: any[];
|
|
66
|
+
leftPanelItems: any[];
|
|
67
|
+
leftPanelSelectedValue: any;
|
|
68
|
+
leftPanelSelectedItem: any;
|
|
69
|
+
leftPanelInitialized: boolean;
|
|
70
|
+
private baseGridListSnapshot;
|
|
56
71
|
stepsVisible: boolean;
|
|
57
72
|
private destroy$;
|
|
58
73
|
private readonly slotMap;
|
|
59
74
|
private readonly slotContextMap;
|
|
75
|
+
currentSelectModelCode: string | null;
|
|
60
76
|
slotRenderStates: Array<{
|
|
61
77
|
slot?: PageFormSlotDirective;
|
|
62
78
|
context: PageFormSlotContext;
|
|
63
79
|
}>;
|
|
64
80
|
get indexValue(): number;
|
|
81
|
+
get currentCustomListFormTemplate(): TemplateRef<CustomListFormTemplateContext> | null;
|
|
82
|
+
get currentCustomListFormContext(): CustomListFormTemplateContext;
|
|
83
|
+
getDialogSelectedResult(): any[];
|
|
84
|
+
setRuntimeContext(data?: Record<string, any>): void;
|
|
65
85
|
set indexValue(value: number);
|
|
86
|
+
get grids(): any[];
|
|
87
|
+
set grids(value: any[]);
|
|
88
|
+
private resolvedGridList;
|
|
89
|
+
private syncUpsertSubserts;
|
|
66
90
|
onResize(): void;
|
|
67
91
|
constructor();
|
|
68
92
|
ngAfterContentInit(): void;
|
|
69
93
|
ngOnInit(): void;
|
|
70
94
|
ngOnDestroy(): void;
|
|
95
|
+
private initializeLeftPanel;
|
|
96
|
+
private loadLeftPanelItems;
|
|
97
|
+
private resolveMaybeAsync;
|
|
98
|
+
private createLeftPanelEventContext;
|
|
99
|
+
private runLeftPanelEvent;
|
|
100
|
+
private resolveLeftPanelValue;
|
|
101
|
+
onLeftPanelSelectionChange(event: SingleSelectListboxChangeEvent): Promise<void>;
|
|
102
|
+
private applyLeftPanelSelection;
|
|
103
|
+
private syncGetPrmFiterPreloads;
|
|
104
|
+
private syncGetPrmForCurrentView;
|
|
105
|
+
private buildFormOptions;
|
|
106
|
+
private resolveLeftPanelAppendGroups;
|
|
107
|
+
private mergeDetailWithLeftPanel;
|
|
71
108
|
private bindPageFormService;
|
|
72
109
|
private syncSubFormModelFromData;
|
|
73
110
|
private mergeUpsert;
|
|
@@ -77,7 +114,7 @@ export declare class PageFormComponent extends AmComponent implements OnInit, On
|
|
|
77
114
|
upCb(res?: any): void;
|
|
78
115
|
onOk(e: any): void;
|
|
79
116
|
onCancelSelected(e: any): void;
|
|
80
|
-
getDetail(): void;
|
|
117
|
+
getDetail(index?: number): void;
|
|
81
118
|
detailCb(res: any): void;
|
|
82
119
|
setHrefValue(): void;
|
|
83
120
|
updateTitle(res: any): void;
|
|
@@ -96,8 +133,26 @@ export declare class PageFormComponent extends AmComponent implements OnInit, On
|
|
|
96
133
|
private getOrCreatePageFormSlotContext;
|
|
97
134
|
private resolveSlotKey;
|
|
98
135
|
private getGridRenderKey;
|
|
136
|
+
getCurrentGrid(): any;
|
|
137
|
+
private getCurrentSubModelName;
|
|
138
|
+
private getSubsertByGrid;
|
|
139
|
+
private cloneSubsert;
|
|
140
|
+
private getCurrentFormComponent;
|
|
141
|
+
canShowCurrentTabSave(grid?: GridList | null): boolean;
|
|
142
|
+
getCurrentTabSaveLabel(grid?: GridList | null): any;
|
|
143
|
+
private hasMainPendingChanges;
|
|
144
|
+
private hasSubsertPendingChanges;
|
|
145
|
+
private collectDirtyMainDataSnapshot;
|
|
146
|
+
private collectOtherDirtySubDataSnapshot;
|
|
147
|
+
private restoreDirtySnapshots;
|
|
148
|
+
private refreshCurrentTabData;
|
|
149
|
+
private resetCurrentTabUpsertState;
|
|
150
|
+
private recalculateSaveSignal;
|
|
151
|
+
buildCurrentTabUpsert(): any;
|
|
152
|
+
private handleCurrentTabSaveSuccess;
|
|
153
|
+
saveCurrentTab(cb?: Function): void;
|
|
99
154
|
addRowClickHandler(grid: GridList): void;
|
|
100
155
|
delRowClickHandler(grid: GridList): void;
|
|
101
156
|
static ɵfac: i0.ɵɵFactoryDeclaration<PageFormComponent, never>;
|
|
102
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PageFormComponent, "app-page-form", never, { "addVisible": { "alias": "addVisible"; "required": false; "isSignal": true; }; "gridList": { "alias": "gridList"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "getPrmInput": { "alias": "getPrmInput"; "required": true; "isSignal": true; }; "statusSteps": { "alias": "statusSteps"; "required": false; "isSignal": true; }; "statusKey": { "alias": "statusKey"; "required": false; "isSignal": true; }; "hrefBtnList": { "alias": "hrefBtnList"; "required": false; "isSignal": true; }; "setTitle": { "alias": "setTitle"; "required": false; "isSignal": true; }; "actionList": { "alias": "actionList"; "required": false; "isSignal": true; }; "modelLog": { "alias": "modelLog"; "required": false; "isSignal": true; }; "formDisabled": { "alias": "formDisabled"; "required": false; "isSignal": true; }; "statusConf": { "alias": "statusConf"; "required": false; "isSignal": true; }; "formDetail": { "alias": "formDetail"; "required": false; "isSignal": true; }; "saveFunc": { "alias": "saveFunc"; "required": false; "isSignal": true; }; "configNewPath": { "alias": "configNewPath"; "required": false; "isSignal": true; }; "customLeftPanel": { "alias": "customLeftPanel"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; }, {}, ["pageFormSlots"], never, true, never>;
|
|
157
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageFormComponent, "app-page-form", never, { "addVisible": { "alias": "addVisible"; "required": false; "isSignal": true; }; "gridList": { "alias": "gridList"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "getPrmInput": { "alias": "getPrmInput"; "required": true; "isSignal": true; }; "statusSteps": { "alias": "statusSteps"; "required": false; "isSignal": true; }; "statusKey": { "alias": "statusKey"; "required": false; "isSignal": true; }; "hrefBtnList": { "alias": "hrefBtnList"; "required": false; "isSignal": true; }; "setTitle": { "alias": "setTitle"; "required": false; "isSignal": true; }; "actionList": { "alias": "actionList"; "required": false; "isSignal": true; }; "modelLog": { "alias": "modelLog"; "required": false; "isSignal": true; }; "formDisabled": { "alias": "formDisabled"; "required": false; "isSignal": true; }; "statusConf": { "alias": "statusConf"; "required": false; "isSignal": true; }; "formDetail": { "alias": "formDetail"; "required": false; "isSignal": true; }; "saveFunc": { "alias": "saveFunc"; "required": false; "isSignal": true; }; "showMainSaveButton": { "alias": "showMainSaveButton"; "required": false; "isSignal": true; }; "configNewPath": { "alias": "configNewPath"; "required": false; "isSignal": true; }; "runtimeContextInput": { "alias": "runtimeContextInput"; "required": false; "isSignal": true; }; "customLeftPanel": { "alias": "customLeftPanel"; "required": false; "isSignal": true; }; "customListFormTemplateMap": { "alias": "customListFormTemplateMap"; "required": false; "isSignal": true; }; "customListFormInstanceMap": { "alias": "customListFormInstanceMap"; "required": false; "isSignal": true; }; "leftPanel": { "alias": "leftPanel"; "required": false; "isSignal": true; }; "panelSelectedData": { "alias": "panelSelectedData"; "required": false; "isSignal": true; }; "authLevel": { "alias": "authLevel"; "required": false; "isSignal": true; }; }, {}, ["pageFormSlots"], never, true, never>;
|
|
103
158
|
}
|
|
@@ -3,6 +3,11 @@ import { Search } from '../am/am.component';
|
|
|
3
3
|
import { Button } from 'primeng/button';
|
|
4
4
|
import type { PageFormComponent } from './page-form.component';
|
|
5
5
|
import { SafeAny } from 'imm-bi';
|
|
6
|
+
export interface SubSaveConfig {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
saveFunc?: any;
|
|
10
|
+
}
|
|
6
11
|
export interface HrefBtnList extends Partial<Button> {
|
|
7
12
|
url?: string;
|
|
8
13
|
i18nKey?: string;
|
|
@@ -29,9 +34,16 @@ export interface GridList {
|
|
|
29
34
|
deleteFunc?: Function;
|
|
30
35
|
selectData?: any[];
|
|
31
36
|
uniqueField?: string;
|
|
37
|
+
subSave?: SubSaveConfig;
|
|
32
38
|
[propName: string]: any;
|
|
33
39
|
type?: string;
|
|
34
40
|
}
|
|
41
|
+
export interface CustomListDialog {
|
|
42
|
+
getResult(): any[];
|
|
43
|
+
}
|
|
44
|
+
export interface CustomListFormTemplateContext {
|
|
45
|
+
pageForm: PageFormComponent;
|
|
46
|
+
}
|
|
35
47
|
export interface PageFormSlotContext {
|
|
36
48
|
$implicit: PageFormSlotContext;
|
|
37
49
|
slotKey: string;
|
|
@@ -44,6 +56,44 @@ export interface PageFormSlotContext {
|
|
|
44
56
|
active: boolean;
|
|
45
57
|
gridDisable: boolean;
|
|
46
58
|
}
|
|
59
|
+
export interface PageLeftPanelDataSource {
|
|
60
|
+
loader?: ((context?: any) => any) | any;
|
|
61
|
+
request?: Record<string, any>;
|
|
62
|
+
resultPath?: string;
|
|
63
|
+
transform?: ((items: any, context?: any) => any[]) | any;
|
|
64
|
+
defaultSelect?: ((context?: any) => any) | any;
|
|
65
|
+
options?: any[];
|
|
66
|
+
}
|
|
67
|
+
export interface PageLeftPanelEvents {
|
|
68
|
+
onInit?: (context?: any) => any;
|
|
69
|
+
onItemsLoaded?: (context?: any) => any;
|
|
70
|
+
onSelectionChange?: (context?: any) => any;
|
|
71
|
+
onDetailMerge?: (context?: any) => any;
|
|
72
|
+
}
|
|
73
|
+
export interface PageLeftPanelListConfig {
|
|
74
|
+
optionLabel?: string;
|
|
75
|
+
optionValue?: string;
|
|
76
|
+
allowDeselect?: boolean;
|
|
77
|
+
emptyMessage?: string;
|
|
78
|
+
dataSource?: PageLeftPanelDataSource;
|
|
79
|
+
}
|
|
80
|
+
export interface PageLeftPanelTreeConfig {
|
|
81
|
+
nodeLabel?: string;
|
|
82
|
+
nodeValue?: string;
|
|
83
|
+
childrenField?: string;
|
|
84
|
+
defaultExpand?: boolean;
|
|
85
|
+
dataSource?: PageLeftPanelDataSource;
|
|
86
|
+
}
|
|
87
|
+
export interface PageLeftPanelConfig {
|
|
88
|
+
enabled?: boolean;
|
|
89
|
+
mode?: 'list' | 'tree';
|
|
90
|
+
stateKey?: string;
|
|
91
|
+
panelSelectedDataKey?: string;
|
|
92
|
+
appendGroups?: any[] | ((context?: any) => any[]);
|
|
93
|
+
list?: PageLeftPanelListConfig;
|
|
94
|
+
tree?: PageLeftPanelTreeConfig;
|
|
95
|
+
events?: PageLeftPanelEvents;
|
|
96
|
+
}
|
|
47
97
|
export declare const formTypeToProps: any;
|
|
48
98
|
export interface PageFormSlot {
|
|
49
99
|
handleAdd: (action?: unknown) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Search } from '../am/am.component';
|
|
3
|
+
import { CustomListDialog, CustomListFormTemplateContext } from '../page-form/page-form.interface';
|
|
3
4
|
import { GridComponent, GridOptions } from '../grid/grid/grid.component';
|
|
4
5
|
import { ActionService } from '../service/action.service';
|
|
5
6
|
import { DatePipe } from '@angular/common';
|
|
@@ -18,7 +19,9 @@ export declare class RowSelectorComponent {
|
|
|
18
19
|
showSearch: import("@angular/core").InputSignal<boolean>;
|
|
19
20
|
selectCancel: any[];
|
|
20
21
|
selectModelCode: import("@angular/core").InputSignal<string | undefined>;
|
|
21
|
-
customListFormByDialog: import("@angular/core").InputSignal<TemplateRef<
|
|
22
|
+
customListFormByDialog: import("@angular/core").InputSignal<TemplateRef<CustomListFormTemplateContext> | null>;
|
|
23
|
+
customListFormByDialogContext: import("@angular/core").InputSignal<CustomListFormTemplateContext | null>;
|
|
24
|
+
customListDialogMap: import("@angular/core").InputSignal<Record<string, CustomListDialog | undefined> | null>;
|
|
22
25
|
cancelSelect: EventEmitter<any[]>;
|
|
23
26
|
constructor(action: ActionService);
|
|
24
27
|
api(): import("ag-grid-community").GridApi<any>;
|
|
@@ -29,5 +32,5 @@ export declare class RowSelectorComponent {
|
|
|
29
32
|
onHide(): void;
|
|
30
33
|
onMaximize(event: any): void;
|
|
31
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowSelectorComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RowSelectorComponent, "row-selector", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "selectionKeys": { "alias": "selectionKeys"; "required": false; "isSignal": true; }; "gridOptions": { "alias": "gridOptions"; "required": false; "isSignal": true; }; "searchPrm": { "alias": "searchPrm"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "selectModelCode": { "alias": "selectModelCode"; "required": false; "isSignal": true; }; "customListFormByDialog": { "alias": "customListFormByDialog"; "required": false; "isSignal": true; }; }, { "onOk": "onOk"; "visible": "visibleChange"; "cancelSelect": "cancelSelect"; }, never, never, true, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RowSelectorComponent, "row-selector", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "selectionKeys": { "alias": "selectionKeys"; "required": false; "isSignal": true; }; "gridOptions": { "alias": "gridOptions"; "required": false; "isSignal": true; }; "searchPrm": { "alias": "searchPrm"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "selectModelCode": { "alias": "selectModelCode"; "required": false; "isSignal": true; }; "customListFormByDialog": { "alias": "customListFormByDialog"; "required": false; "isSignal": true; }; "customListFormByDialogContext": { "alias": "customListFormByDialogContext"; "required": false; "isSignal": true; }; "customListDialogMap": { "alias": "customListDialogMap"; "required": false; "isSignal": true; }; }, { "onOk": "onOk"; "visible": "visibleChange"; "cancelSelect": "cancelSelect"; }, never, never, true, never>;
|
|
33
36
|
}
|
|
@@ -8,7 +8,7 @@ export declare class PopDateComponent {
|
|
|
8
8
|
private action;
|
|
9
9
|
private i18n;
|
|
10
10
|
item: import("@angular/core").InputSignal<SearchItem>;
|
|
11
|
-
view: import("@angular/core").Signal<"
|
|
11
|
+
view: import("@angular/core").Signal<"year" | "month" | "date">;
|
|
12
12
|
modelName: import("@angular/core").InputSignal<string | undefined>;
|
|
13
13
|
isActive: boolean;
|
|
14
14
|
value: any;
|
package/lib/share/utils.d.ts
CHANGED
|
@@ -28,9 +28,11 @@ export declare const convertAct: (act: any) => any;
|
|
|
28
28
|
* @param thisArg
|
|
29
29
|
*/
|
|
30
30
|
export declare const changeContent: (content: any, thisArg: any) => void;
|
|
31
|
+
export declare const executeRuntimeContextInit: (thisArg: any) => void;
|
|
31
32
|
export declare const calcRowSpan: (params: any, field?: string) => number;
|
|
32
33
|
export declare const convertCol: (options: any, col: any[], authLevel: number, dragSort?: string) => void;
|
|
33
34
|
export declare const gridOptionsHooker: (gridOptions: any) => void;
|
|
35
|
+
export declare const wrapHeaderValueGetter: (getter: any, colDef: any) => any;
|
|
34
36
|
export declare const convertGrid: (thisArg: any, gridList: any, fiterPreloads: any) => void;
|
|
35
37
|
export declare const convertForm: (thisArg: any, groupArr: any, sourceData: any) => void;
|
|
36
38
|
export declare const clearLocal: () => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface SingleSelectListboxChangeEvent<T = any> {
|
|
5
|
+
originalEvent: Event;
|
|
6
|
+
value: any;
|
|
7
|
+
option: T;
|
|
8
|
+
}
|
|
9
|
+
export declare class SingleSelectListboxComponent implements ControlValueAccessor {
|
|
10
|
+
options: any[];
|
|
11
|
+
optionLabel: string;
|
|
12
|
+
optionValue: string;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
emptyMessage: string;
|
|
15
|
+
allowDeselect: boolean;
|
|
16
|
+
onChange: EventEmitter<SingleSelectListboxChangeEvent<any>>;
|
|
17
|
+
value: any;
|
|
18
|
+
focused: boolean;
|
|
19
|
+
private onModelChange;
|
|
20
|
+
private onModelTouched;
|
|
21
|
+
writeValue(value: any): void;
|
|
22
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
23
|
+
registerOnTouched(fn: () => void): void;
|
|
24
|
+
setDisabledState(isDisabled: boolean): void;
|
|
25
|
+
trackByValue: (_index: number, option: any) => any;
|
|
26
|
+
getOptionLabel(option: any): string;
|
|
27
|
+
getOptionValue(option: any): any;
|
|
28
|
+
isSelected(option: any): boolean;
|
|
29
|
+
isLockedSelected(option: any): boolean;
|
|
30
|
+
handleOptionClick(event: Event, option: any): void;
|
|
31
|
+
handleOptionMouseDown(event: MouseEvent, option: any): void;
|
|
32
|
+
handleOptionKeydown(event: KeyboardEvent, option: any): void;
|
|
33
|
+
onFocus(): void;
|
|
34
|
+
onBlur(): void;
|
|
35
|
+
private resolveFieldData;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SingleSelectListboxComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleSelectListboxComponent, "am-single-select-listbox", never, { "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "allowDeselect": { "alias": "allowDeselect"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
38
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -36,3 +36,4 @@ export * from './lib/import/import.component';
|
|
|
36
36
|
export * from './lib/steps/steps.component';
|
|
37
37
|
export * from './lib/row-selector/row-selector.component';
|
|
38
38
|
export * from './lib/href-btn-list/href-btn-list.component';
|
|
39
|
+
export * from './lib/single-select-listbox/single-select-listbox.component';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
height: calc(100vh - 200px);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.p-listbox {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background: var(--p-content-background, #ffffff);
|
|
11
|
+
color: var(--p-content-color, #334155);
|
|
12
|
+
border: 1px solid var(--p-content-border-color, #d9dee8);
|
|
13
|
+
border-radius: var(--p-border-radius-md, 0.375rem);
|
|
14
|
+
box-shadow: var(--p-listbox-shadow, none);
|
|
15
|
+
outline: 0;
|
|
16
|
+
transition:
|
|
17
|
+
background 0.2s,
|
|
18
|
+
color 0.2s,
|
|
19
|
+
border-color 0.2s,
|
|
20
|
+
box-shadow 0.2s;
|
|
21
|
+
|
|
22
|
+
&.p-focus {
|
|
23
|
+
border-color: var(--p-primary-color, #f97316);
|
|
24
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--p-primary-color, #f97316) 20%, transparent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.p-disabled {
|
|
28
|
+
opacity: 0.7;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.p-listbox-list-container {
|
|
34
|
+
flex: 1;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.p-listbox-list {
|
|
39
|
+
list-style: none;
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: 0.25rem;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 0.25rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.p-listbox-option {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
gap: 0.5rem;
|
|
52
|
+
padding: 0.625rem 0.75rem;
|
|
53
|
+
border-radius: calc(var(--p-border-radius-md, 0.375rem) - 1px);
|
|
54
|
+
color: var(--p-content-color, #334155);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
user-select: none;
|
|
57
|
+
outline: 0;
|
|
58
|
+
transition:
|
|
59
|
+
background 0.2s,
|
|
60
|
+
color 0.2s;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background: var(--p-content-hover-background, #f8fafc);
|
|
64
|
+
color: var(--p-content-hover-color, var(--p-content-color, #334155));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.p-listbox-option-selected {
|
|
68
|
+
background: var(--p-highlight-background, #fff7ed);
|
|
69
|
+
color: var(--p-highlight-color, var(--p-primary-color, #ea580c));
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.am-single-select-listbox__option-locked {
|
|
74
|
+
cursor: default;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.am-single-select-listbox__option-locked:hover,
|
|
78
|
+
&.am-single-select-listbox__option-locked:active {
|
|
79
|
+
background: var(--p-highlight-background, #fff7ed);
|
|
80
|
+
color: var(--p-highlight-color, var(--p-primary-color, #ea580c));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.p-disabled {
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.p-listbox-empty-message {
|
|
89
|
+
padding: 0.75rem;
|
|
90
|
+
color: var(--p-text-muted-color, #64748b);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.am-single-select-listbox__label {
|
|
94
|
+
flex: 1;
|
|
95
|
+
min-width: 0;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.am-single-select-listbox__icon {
|
|
102
|
+
font-size: 0.875rem;
|
|
103
|
+
color: inherit;
|
|
104
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './mssf-task.mock';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9pbW0tZWxlbWVudC11aS9zcmMvbGliL21vY2svaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbXNzZi10YXNrLm1vY2snO1xuIl19
|