@ohos-ports/magic-xpa-angular 0.0.0-stage → 4.1201.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/fesm2022/magic-xpa-angular.mjs +6942 -0
- package/fesm2022/magic-xpa-angular.mjs.map +1 -0
- package/index.d.ts +61 -0
- package/package.json +46 -4
- package/src/controls.metadata.model.d.ts +78 -0
- package/src/interfaces/sub-form-definition.iterface.d.ts +18 -0
- package/src/magic.core.module.d.ts +44 -0
- package/src/services/ISubformMagicService.d.ts +4 -0
- package/src/services/OverlayWindowService.d.ts +49 -0
- package/src/services/StylesMapManager.d.ts +8 -0
- package/src/services/accessor.magic.service.d.ts +311 -0
- package/src/services/commands-collector.magic.service.d.ts +18 -0
- package/src/services/component-list.magic.service.d.ts +50 -0
- package/src/services/confirmation.components.magic.provider.d.ts +24 -0
- package/src/services/engine.magic.service.d.ts +32 -0
- package/src/services/exit.magic.service.d.ts +12 -0
- package/src/services/magic-color.service.d.ts +25 -0
- package/src/services/magic.lazy.loader.service.d.ts +6 -0
- package/src/services/magic.providers.d.ts +110 -0
- package/src/services/magic.services.d.ts +22 -0
- package/src/services/mg-date-adapter.d.ts +38 -0
- package/src/services/overlay.conainer.magic.provider.d.ts +7 -0
- package/src/services/router-commands.magic.service.d.ts +23 -0
- package/src/services/subform.magic.service.d.ts +71 -0
- package/src/services/table.magic.service.d.ts +86 -0
- package/src/services/task.magics.service.d.ts +405 -0
- package/src/services/title.magic.service.d.ts +20 -0
- package/src/ui/GuiInteractiveExecutor.d.ts +25 -0
- package/src/ui/components/base-magic-alert.component.d.ts +26 -0
- package/src/ui/components/base-magic-confirm.component.d.ts +28 -0
- package/src/ui/components/magic-alert.component.d.ts +9 -0
- package/src/ui/components/magic-confirmation-box.component.d.ts +9 -0
- package/src/ui/directives/NonMagicControlDirective.d.ts +67 -0
- package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +15 -0
- package/src/ui/directives/magic/checkbox.magic.directive.d.ts +34 -0
- package/src/ui/directives/magic/combobox.magic.directive.d.ts +19 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +13 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +36 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +13 -0
- package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +15 -0
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +21 -0
- package/src/ui/directives/magic/row.magic.directive.d.ts +32 -0
- package/src/ui/directives/magic-focus.directive.d.ts +12 -0
- package/src/ui/directives/magic.directive.d.ts +127 -0
- package/src/ui/directives/magicViewContainerRef.directive.d.ts +11 -0
- package/src/ui/directives/mgformat.magic.directive.d.ts +82 -0
- package/src/ui/directives/range-validator.magic.directive.d.ts +33 -0
- package/src/ui/magic-confirmationBox.d.ts +25 -0
- package/src/ui/magic-modal/base-magic-overlay-container.d.ts +14 -0
- package/src/ui/magic-modal/magic-modal-form.d.ts +8 -0
- package/src/ui/magic-modal/magic-modal-interface.d.ts +45 -0
- package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +50 -0
- package/src/ui/magic-modal/magic-overlay-container.d.ts +117 -0
- package/src/ui/magic-root.component.d.ts +85 -0
- package/src/ui/mgerror.magic.component.d.ts +39 -0
- package/src/ui/pipes/date.magic.pipe.d.ts +23 -0
- package/src/ui/pipes/time.magic.pipe.d.ts +14 -0
- package/src/ui/pipes/time24.magic.pipe.d.ts +10 -0
- package/src/ui/router-container.magic.component.d.ts +50 -0
- package/src/ui/subform.magic.component.d.ts +37 -0
- package/src/ui/task-base.magic.component.d.ts +112 -0
- package/src/ui/utils.d.ts +12 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { NgModuleRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface ComponentData {
|
|
4
|
+
component: any;
|
|
5
|
+
moduleRef: NgModuleRef<any>;
|
|
6
|
+
}
|
|
7
|
+
export interface ModuleData {
|
|
8
|
+
moduleName: string;
|
|
9
|
+
modulePath: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Manages the list of components in a project, and the project title
|
|
13
|
+
*/
|
|
14
|
+
export declare class ComponentListMagicService {
|
|
15
|
+
/**
|
|
16
|
+
* Map of project components
|
|
17
|
+
*/
|
|
18
|
+
components: Map<string, ComponentData>;
|
|
19
|
+
/**
|
|
20
|
+
* Map of project dialogs
|
|
21
|
+
*/
|
|
22
|
+
dialogs: Map<string, any>;
|
|
23
|
+
lazyLoadModulesMap: any;
|
|
24
|
+
getData(name: string, mustHaveData: boolean): ComponentData;
|
|
25
|
+
/**
|
|
26
|
+
* Return a component according to name
|
|
27
|
+
* @param name Name of requested component
|
|
28
|
+
* @returns The requested component
|
|
29
|
+
*/
|
|
30
|
+
getComponent(name: string, mustHaveData?: boolean): any;
|
|
31
|
+
addComponents(componentList: any, modulRef?: NgModuleRef<any>): void;
|
|
32
|
+
/**
|
|
33
|
+
* Return a component according to name
|
|
34
|
+
* @param name Name of requested component
|
|
35
|
+
* @returns The requested component
|
|
36
|
+
*/
|
|
37
|
+
getModuleRef(name: string): NgModuleRef<any>;
|
|
38
|
+
/**
|
|
39
|
+
* Return the lazy load module details of the specified component
|
|
40
|
+
* @param name: Name of requested component
|
|
41
|
+
* @returns: lazy load module details
|
|
42
|
+
*/
|
|
43
|
+
getLazyLoadModuleData(name: string): ModuleData;
|
|
44
|
+
/**
|
|
45
|
+
* Project title
|
|
46
|
+
*/
|
|
47
|
+
title: string;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentListMagicService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ComponentListMagicService>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Service managing alert and confirmation windows
|
|
4
|
+
* This is Magic's default provider
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConfirmationComponentsMagicProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Return true when use default javascript alert and confirmation or return false to provide custom components
|
|
9
|
+
* @returns true is we want to use default javascript alert and confirmation
|
|
10
|
+
*/
|
|
11
|
+
showDefaultConfirmations(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Returns component that will replace javascript alert. The component will be used only if showDefaultConfirmations = false
|
|
14
|
+
* @returns component that will replace javascript Alert
|
|
15
|
+
*/
|
|
16
|
+
getAlertComponent(): any;
|
|
17
|
+
/**
|
|
18
|
+
* Returns component that will replace javascript confirmation box. The component will be used only if showDefaultConfirmations = false
|
|
19
|
+
* @returns component that will replace javascript confirmation box
|
|
20
|
+
*/
|
|
21
|
+
getConfirmtionComponent(): any;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationComponentsMagicProvider, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationComponentsMagicProvider>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
|
+
import { IGuiEvent, MagicBridge } from "@ohos-ports/magic-xpa-engine";
|
|
3
|
+
import { GuiCommand, GuiInteractive } from "@ohos-ports/magic-xpa-gui";
|
|
4
|
+
import { HttpClient } from "@angular/common/http";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineMagicService {
|
|
10
|
+
magicBridge: typeof MagicBridge;
|
|
11
|
+
isStub: boolean;
|
|
12
|
+
isLoggedIn: boolean;
|
|
13
|
+
refreshDom: Subject<GuiCommand>;
|
|
14
|
+
interactiveCommands: Subject<GuiInteractive>;
|
|
15
|
+
startMagicEngine(httpClient: HttpClient, args: Map<string, string>): void;
|
|
16
|
+
terminateMagic(): Promise<void>;
|
|
17
|
+
insertEvent(guiEvent: IGuiEvent): void;
|
|
18
|
+
GetRangedValue(taskId: string, controlName: string, value: string): string;
|
|
19
|
+
GetControlPictureMask(taskId: string, controlName: string): any;
|
|
20
|
+
UploadFileToServer(fileContent: any, serverFileName: string): any;
|
|
21
|
+
DownloadFileFromServer(serverFileName: string): Promise<ArrayBuffer>;
|
|
22
|
+
GetFormattedValue(taskId: string, controlName: string, value: any, rowId?: string): any;
|
|
23
|
+
ValidateControlValue(taskId: string, controlName: string, value: any): string;
|
|
24
|
+
GetFldRanges(taskId: string, controlName: string): string;
|
|
25
|
+
saveData(data: string): void;
|
|
26
|
+
getIsLoggedIn(): boolean;
|
|
27
|
+
setIsLoggedIn(setIsLoggedIn: boolean): void;
|
|
28
|
+
TransCacheExists(): boolean;
|
|
29
|
+
TerminateContextUsingFetchAPI(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EngineMagicService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EngineMagicService>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* This service supports custom actions on magic exit
|
|
4
|
+
*/
|
|
5
|
+
export declare class ExitMagicService {
|
|
6
|
+
/**
|
|
7
|
+
* Override this method to implement custom logic on magic exit
|
|
8
|
+
*/
|
|
9
|
+
exitMagic(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExitMagicService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExitMagicService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare let COLOR_FILE_NAME: InjectionToken<string>;
|
|
5
|
+
export declare const MAGIC_FG_COLOR: number;
|
|
6
|
+
export declare const MAGIC_BG_COLOR: number;
|
|
7
|
+
export declare class MagicColorService {
|
|
8
|
+
private http;
|
|
9
|
+
colorFileName: string;
|
|
10
|
+
getColorFilePath(): string;
|
|
11
|
+
private colorsData;
|
|
12
|
+
private fileNotFound;
|
|
13
|
+
constructor(http: HttpClient, colorFile1?: string);
|
|
14
|
+
private getColorData;
|
|
15
|
+
private hexToRgba;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the rgba value of specified color
|
|
18
|
+
* @returns : value in format rgba(128,128,128,1)
|
|
19
|
+
* @param : colorNumber -0 based index of color for which RGBA values are returned
|
|
20
|
+
* @param: colorType : 1-MAGIC_FG_COLOR, 2-MAGIC_BG_COLOR
|
|
21
|
+
*/
|
|
22
|
+
getColor(colorIndex: number, colorType: number): any;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagicColorService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagicColorService>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { MagicServices } from "./magic.services";
|
|
2
|
+
import { TaskMagicService } from "./task.magics.service";
|
|
3
|
+
import { SubformMagicService } from "./subform.magic.service";
|
|
4
|
+
import { TableMagicService } from "./table.magic.service";
|
|
5
|
+
import { TitleMagicService } from "./title.magic.service";
|
|
6
|
+
import { AccessorMagicService } from "./accessor.magic.service";
|
|
7
|
+
import { MgDateAdapter } from "./mg-date-adapter";
|
|
8
|
+
import { DateAdapter } from '@angular/material/core';
|
|
9
|
+
export declare const matDateProviders: ({
|
|
10
|
+
provide: typeof DateAdapter;
|
|
11
|
+
useClass: typeof MgDateAdapter;
|
|
12
|
+
useValue?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
provide: import("@angular/core").InjectionToken<import("@angular/material/core").MatDateFormats>;
|
|
15
|
+
useValue: {
|
|
16
|
+
parse: {
|
|
17
|
+
dateInput: {
|
|
18
|
+
month: string;
|
|
19
|
+
year: string;
|
|
20
|
+
day: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
display: {
|
|
24
|
+
dateInput: string;
|
|
25
|
+
monthYearLabel: {
|
|
26
|
+
year: string;
|
|
27
|
+
month: string;
|
|
28
|
+
};
|
|
29
|
+
dateA11yLabel: {
|
|
30
|
+
year: string;
|
|
31
|
+
month: string;
|
|
32
|
+
day: string;
|
|
33
|
+
};
|
|
34
|
+
monthYearA11yLabel: {
|
|
35
|
+
year: string;
|
|
36
|
+
month: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
useClass?: undefined;
|
|
41
|
+
})[];
|
|
42
|
+
/**
|
|
43
|
+
* Magic service providers
|
|
44
|
+
*/
|
|
45
|
+
export declare const basicMagicProviders: (typeof SubformMagicService | typeof TitleMagicService | typeof AccessorMagicService | typeof TaskMagicService | typeof MagicServices | ({
|
|
46
|
+
provide: typeof DateAdapter;
|
|
47
|
+
useClass: typeof MgDateAdapter;
|
|
48
|
+
useValue?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
provide: import("@angular/core").InjectionToken<import("@angular/material/core").MatDateFormats>;
|
|
51
|
+
useValue: {
|
|
52
|
+
parse: {
|
|
53
|
+
dateInput: {
|
|
54
|
+
month: string;
|
|
55
|
+
year: string;
|
|
56
|
+
day: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
display: {
|
|
60
|
+
dateInput: string;
|
|
61
|
+
monthYearLabel: {
|
|
62
|
+
year: string;
|
|
63
|
+
month: string;
|
|
64
|
+
};
|
|
65
|
+
dateA11yLabel: {
|
|
66
|
+
year: string;
|
|
67
|
+
month: string;
|
|
68
|
+
day: string;
|
|
69
|
+
};
|
|
70
|
+
monthYearA11yLabel: {
|
|
71
|
+
year: string;
|
|
72
|
+
month: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
useClass?: undefined;
|
|
77
|
+
})[])[];
|
|
78
|
+
export declare const magicProviders: (typeof SubformMagicService | typeof TitleMagicService | typeof AccessorMagicService | typeof TaskMagicService | typeof TableMagicService | typeof MagicServices | ({
|
|
79
|
+
provide: typeof DateAdapter;
|
|
80
|
+
useClass: typeof MgDateAdapter;
|
|
81
|
+
useValue?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
provide: import("@angular/core").InjectionToken<import("@angular/material/core").MatDateFormats>;
|
|
84
|
+
useValue: {
|
|
85
|
+
parse: {
|
|
86
|
+
dateInput: {
|
|
87
|
+
month: string;
|
|
88
|
+
year: string;
|
|
89
|
+
day: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
display: {
|
|
93
|
+
dateInput: string;
|
|
94
|
+
monthYearLabel: {
|
|
95
|
+
year: string;
|
|
96
|
+
month: string;
|
|
97
|
+
};
|
|
98
|
+
dateA11yLabel: {
|
|
99
|
+
year: string;
|
|
100
|
+
month: string;
|
|
101
|
+
day: string;
|
|
102
|
+
};
|
|
103
|
+
monthYearA11yLabel: {
|
|
104
|
+
year: string;
|
|
105
|
+
month: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
useClass?: undefined;
|
|
110
|
+
})[])[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SubformMagicService } from "./subform.magic.service";
|
|
2
|
+
import { TableMagicService } from "./table.magic.service";
|
|
3
|
+
import { TaskMagicService } from "./task.magics.service";
|
|
4
|
+
import { TitleMagicService } from "./title.magic.service";
|
|
5
|
+
import { AccessorMagicService } from "./accessor.magic.service";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Central place for adding the Magic services
|
|
9
|
+
*/
|
|
10
|
+
export declare class MagicServices {
|
|
11
|
+
task: TaskMagicService;
|
|
12
|
+
subformService: SubformMagicService;
|
|
13
|
+
tableService: TableMagicService;
|
|
14
|
+
titleService: TitleMagicService;
|
|
15
|
+
mgAccessorService: AccessorMagicService;
|
|
16
|
+
/**
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
constructor(task: TaskMagicService, subformService: SubformMagicService, tableService: TableMagicService, titleService: TitleMagicService, mgAccessorService: AccessorMagicService);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagicServices, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagicServices>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NativeDateAdapter } from '@angular/material/core';
|
|
2
|
+
import { TaskMagicService } from "./task.magics.service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const MG_FORMATS: {
|
|
5
|
+
parse: {
|
|
6
|
+
dateInput: {
|
|
7
|
+
month: string;
|
|
8
|
+
year: string;
|
|
9
|
+
day: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
display: {
|
|
13
|
+
dateInput: string;
|
|
14
|
+
monthYearLabel: {
|
|
15
|
+
year: string;
|
|
16
|
+
month: string;
|
|
17
|
+
};
|
|
18
|
+
dateA11yLabel: {
|
|
19
|
+
year: string;
|
|
20
|
+
month: string;
|
|
21
|
+
day: string;
|
|
22
|
+
};
|
|
23
|
+
monthYearA11yLabel: {
|
|
24
|
+
year: string;
|
|
25
|
+
month: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare class MgDateAdapter extends NativeDateAdapter {
|
|
30
|
+
protected task: TaskMagicService;
|
|
31
|
+
localeId: string;
|
|
32
|
+
mgdtfmt: string;
|
|
33
|
+
constructor(task: TaskMagicService, localeId: string);
|
|
34
|
+
parse(value: any): Date | null;
|
|
35
|
+
format(date: Date, displayFormat: Object): string;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MgDateAdapter, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MgDateAdapter>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MagicOverlayContainer } from "../ui/magic-modal/magic-overlay-container";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OverlayContainerMagicProvider {
|
|
4
|
+
getComponent(): typeof MagicOverlayContainer;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayContainerMagicProvider, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OverlayContainerMagicProvider>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { List } from '@ohos-ports/magic-xpa-mscorelib';
|
|
2
|
+
import { ISubformMagicService } from './ISubformMagicService';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export declare class RouteCommand {
|
|
8
|
+
callerMgSubformServiceRef: ISubformMagicService;
|
|
9
|
+
routerOutletName: string;
|
|
10
|
+
formName: string;
|
|
11
|
+
parameters: any;
|
|
12
|
+
routeParams: List<any>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
export declare class RouterCommandsMagicService {
|
|
18
|
+
private pendingRouteCommands;
|
|
19
|
+
AddRouteCommand(routeCommand: RouteCommand): void;
|
|
20
|
+
ExecuteNextCommand(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterCommandsMagicService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RouterCommandsMagicService>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Compiler, Component, Injector } from '@angular/core';
|
|
2
|
+
import { TaskMagicService } from './task.magics.service';
|
|
3
|
+
import { List } from '@ohos-ports/magic-xpa-mscorelib';
|
|
4
|
+
import { ComponentListMagicService } from './component-list.magic.service';
|
|
5
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
|
+
import { CommandsCollectorMagicService } from './commands-collector.magic.service';
|
|
7
|
+
import { RouteDefinition } from '../interfaces/sub-form-definition.iterface';
|
|
8
|
+
import { RouteCommand, RouterCommandsMagicService } from '../services/router-commands.magic.service';
|
|
9
|
+
import { ISubformMagicService } from './ISubformMagicService';
|
|
10
|
+
import { RouterContainerMagicComponent } from '../ui/router-container.magic.component';
|
|
11
|
+
import { MagicLazyLoaderService } from './magic.lazy.loader.service';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* Service for managing subforms and routing
|
|
15
|
+
*/
|
|
16
|
+
export declare class SubformMagicService implements ISubformMagicService {
|
|
17
|
+
private task;
|
|
18
|
+
protected activatedRoute: ActivatedRoute;
|
|
19
|
+
protected componentList: ComponentListMagicService;
|
|
20
|
+
protected pendingCommandsCollector: CommandsCollectorMagicService;
|
|
21
|
+
protected router: Router;
|
|
22
|
+
protected routerCommandsMagicService: RouterCommandsMagicService;
|
|
23
|
+
private componentListMagicService;
|
|
24
|
+
private loader;
|
|
25
|
+
private injector;
|
|
26
|
+
private compiler;
|
|
27
|
+
subformsDict: {};
|
|
28
|
+
routesDict: {
|
|
29
|
+
[x: string]: string;
|
|
30
|
+
};
|
|
31
|
+
currentRouteDefinition: RouteDefinition;
|
|
32
|
+
static currentCallerMgSubformServiceRef: any;
|
|
33
|
+
static routerContainers: Array<RouterContainerMagicComponent>;
|
|
34
|
+
constructor(task: TaskMagicService, activatedRoute: ActivatedRoute, componentList: ComponentListMagicService, pendingCommandsCollector: CommandsCollectorMagicService, router: Router, routerCommandsMagicService: RouterCommandsMagicService, componentListMagicService: ComponentListMagicService, loader: MagicLazyLoaderService, injector: Injector, compiler: Compiler);
|
|
35
|
+
/**
|
|
36
|
+
* Finds and returns the component according to the subform name
|
|
37
|
+
* @param subformName
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
mgGetComp(subformName: string): Component;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the parameters of the subform
|
|
43
|
+
* @param subformName
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
mgGetParameters(subformName: string): any;
|
|
47
|
+
/**
|
|
48
|
+
* @ignore
|
|
49
|
+
*/
|
|
50
|
+
deleteSubformComp(subformControlName: string, formName: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* @ignore
|
|
53
|
+
*/
|
|
54
|
+
addSubformComp(subformControlName: string, formName: string, taskId: string, taskDescription: any, routerPath: string, params: List<any>, inDefaultOutlet: boolean): void;
|
|
55
|
+
/**
|
|
56
|
+
* Open the subform using a route command
|
|
57
|
+
*/
|
|
58
|
+
ExecuteRouteCommand(routeCommand: RouteCommand): void;
|
|
59
|
+
private PerformRouterNavigate;
|
|
60
|
+
/**
|
|
61
|
+
* @ignore
|
|
62
|
+
*/
|
|
63
|
+
init(): void;
|
|
64
|
+
/**
|
|
65
|
+
* @ignore
|
|
66
|
+
*/
|
|
67
|
+
refreshView(): void;
|
|
68
|
+
static getRelativeRoute(sendActivatedRoute: ActivatedRoute): ActivatedRoute;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubformMagicService, never>;
|
|
70
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SubformMagicService>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { TaskMagicService } from "./task.magics.service";
|
|
2
|
+
import { ComponentListMagicService } from "./component-list.magic.service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Implements various table-related functionalities
|
|
6
|
+
*/
|
|
7
|
+
export declare class TableMagicService {
|
|
8
|
+
protected componentList: ComponentListMagicService;
|
|
9
|
+
protected task: TaskMagicService;
|
|
10
|
+
selectedItem: any;
|
|
11
|
+
private chunkSize;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param componentList Component-mapping service
|
|
15
|
+
* @param task Magic task service
|
|
16
|
+
*/
|
|
17
|
+
constructor(componentList: ComponentListMagicService, task: TaskMagicService);
|
|
18
|
+
shouldOpenFieldTextEditor: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Refreshes the DataSource
|
|
21
|
+
*/
|
|
22
|
+
refreshDataSource(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the table page size
|
|
25
|
+
* chunkSize as default value for non-paginated tables.
|
|
26
|
+
*/
|
|
27
|
+
getPageSize(): number;
|
|
28
|
+
setChunkSize(size: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns max no of rows in the table.
|
|
31
|
+
*/
|
|
32
|
+
getMaxRowsInTable(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Selects the specified row
|
|
35
|
+
* @param rowId The row to select
|
|
36
|
+
*/
|
|
37
|
+
selectRow(rowId: string): void;
|
|
38
|
+
getSelectedRow(): any;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the selected row
|
|
41
|
+
*/
|
|
42
|
+
selectedRow(): any;
|
|
43
|
+
/**
|
|
44
|
+
* Selects the specified page
|
|
45
|
+
* @param pageId The page to select
|
|
46
|
+
*/
|
|
47
|
+
selectPage(pageId: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* Returns whether a dialog should be opened for the HTML element
|
|
50
|
+
* @param element The HTML element for which a dialog may be needed
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
OpenDialogForControl(element: HTMLElement): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the dialog used to edit values
|
|
56
|
+
*/
|
|
57
|
+
getDialog(): any;
|
|
58
|
+
/**
|
|
59
|
+
* Handles the table "scrolled" event
|
|
60
|
+
*/
|
|
61
|
+
onScrollDown(): void;
|
|
62
|
+
/**
|
|
63
|
+
* To be overwitten in specific implelemtations
|
|
64
|
+
*/
|
|
65
|
+
sortData(e: any): void;
|
|
66
|
+
/**
|
|
67
|
+
* To be overwitten in specific implelemtations
|
|
68
|
+
*/
|
|
69
|
+
mgOnPaginateChange(e: any, changeSelectedRow?: boolean): void;
|
|
70
|
+
mgOptionChanged(e: any): void;
|
|
71
|
+
/**
|
|
72
|
+
* Change the number of lines in a table
|
|
73
|
+
* @param size New number of lines in table
|
|
74
|
+
*/
|
|
75
|
+
updateTableSize(size: number): void;
|
|
76
|
+
/**
|
|
77
|
+
* @ignore
|
|
78
|
+
*/
|
|
79
|
+
setTableTopIndex(value: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* @ignore
|
|
82
|
+
*/
|
|
83
|
+
getTableTopIndex(): number;
|
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableMagicService, never>;
|
|
85
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableMagicService>;
|
|
86
|
+
}
|