@magic-xpa/angular 4.1200.0-dev4120.4 → 4.1200.0-dev4120.40
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/magic-xpa-angular.mjs +1783 -192
- package/fesm2022/magic-xpa-angular.mjs.map +1 -1
- package/index.d.ts +3 -0
- package/package.json +6 -8
- package/src/controls.metadata.model.d.ts +16 -0
- package/src/interfaces/sub-form-definition.iterface.d.ts +6 -0
- package/src/magic.core.module.d.ts +5 -3
- package/src/services/OverlayWindowService.d.ts +19 -0
- package/src/services/StylesMapManager.d.ts +3 -0
- package/src/services/accessor.magic.service.d.ts +243 -3
- package/src/services/commands-collector.magic.service.d.ts +3 -0
- package/src/services/component-list.magic.service.d.ts +27 -0
- package/src/services/confirmation.components.magic.provider.d.ts +16 -0
- package/src/services/engine.magic.service.d.ts +3 -0
- package/src/services/exit.magic.service.d.ts +6 -0
- package/src/services/magic-color.service.d.ts +6 -0
- package/src/services/magic.providers.d.ts +3 -0
- package/src/services/magic.services.d.ts +6 -0
- package/src/services/router-commands.magic.service.d.ts +6 -0
- package/src/services/subform.magic.service.d.ts +28 -0
- package/src/services/table.magic.service.d.ts +56 -0
- package/src/services/task.magics.service.d.ts +300 -0
- package/src/services/title.magic.service.d.ts +11 -0
- package/src/ui/GuiInteractiveExecutor.d.ts +3 -0
- package/src/ui/components/base-magic-alert.component.d.ts +16 -0
- package/src/ui/components/base-magic-confirm.component.d.ts +18 -0
- package/src/ui/components/magic-alert.component.d.ts +3 -0
- package/src/ui/components/magic-confirmation-box.component.d.ts +3 -0
- package/src/ui/directives/NonMagicControlDirective.d.ts +41 -0
- package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +6 -0
- package/src/ui/directives/magic/checkbox.magic.directive.d.ts +12 -0
- package/src/ui/directives/magic/combobox.magic.directive.d.ts +9 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +6 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +13 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +6 -0
- package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +6 -0
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +3 -0
- package/src/ui/directives/magic/row.magic.directive.d.ts +15 -0
- package/src/ui/directives/magic-focus.directive.d.ts +3 -0
- package/src/ui/directives/magic.directive.d.ts +82 -0
- package/src/ui/directives/magicViewContainerRef.directive.d.ts +3 -0
- package/src/ui/directives/mgformat.magic.directive.d.ts +44 -0
- package/src/ui/directives/range-validator.magic.directive.d.ts +16 -0
- package/src/ui/magic-confirmationBox.d.ts +19 -0
- package/src/ui/magic-modal/base-magic-overlay-container.d.ts +9 -0
- package/src/ui/magic-modal/magic-modal-form.d.ts +3 -0
- package/src/ui/magic-modal/magic-modal-interface.d.ts +27 -0
- package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +20 -0
- package/src/ui/magic-modal/magic-overlay-container.d.ts +51 -0
- package/src/ui/magic-root.component.d.ts +42 -0
- package/src/ui/mgerror.magic.component.d.ts +19 -0
- package/src/ui/pipes/date.magic.pipe.d.ts +6 -0
- package/src/ui/pipes/time.magic.pipe.d.ts +3 -0
- package/src/ui/router-container.magic.component.d.ts +19 -0
- package/src/ui/subform.magic.component.d.ts +21 -0
- package/src/ui/task-base.magic.component.d.ts +78 -0
- package/src/ui/utils.d.ts +3 -0
- package/esm2022/index.mjs +0 -59
- package/esm2022/magic-xpa-angular.mjs +0 -2
- package/esm2022/src/controls.metadata.model.mjs +0 -183
- package/esm2022/src/interfaces/sub-form-definition.iterface.mjs +0 -2
- package/esm2022/src/magic.core.module.mjs +0 -159
- package/esm2022/src/services/ISubformMagicService.mjs +0 -2
- package/esm2022/src/services/OverlayWindowService.mjs +0 -245
- package/esm2022/src/services/StylesMapManager.mjs +0 -28
- package/esm2022/src/services/accessor.magic.service.mjs +0 -358
- package/esm2022/src/services/commands-collector.magic.service.mjs +0 -47
- package/esm2022/src/services/component-list.magic.service.mjs +0 -45
- package/esm2022/src/services/confirmation.components.magic.provider.mjs +0 -21
- package/esm2022/src/services/engine.magic.service.mjs +0 -80
- package/esm2022/src/services/exit.magic.service.mjs +0 -13
- package/esm2022/src/services/magic-color.service.mjs +0 -101
- package/esm2022/src/services/magic.lazy.loader.service.mjs +0 -16
- package/esm2022/src/services/magic.providers.mjs +0 -25
- package/esm2022/src/services/magic.services.mjs +0 -36
- package/esm2022/src/services/mg-date-adapter.mjs +0 -108
- package/esm2022/src/services/overlay.conainer.magic.provider.mjs +0 -14
- package/esm2022/src/services/router-commands.magic.service.mjs +0 -31
- package/esm2022/src/services/subform.magic.service.mjs +0 -195
- package/esm2022/src/services/table.magic.service.mjs +0 -81
- package/esm2022/src/services/task.magics.service.mjs +0 -648
- package/esm2022/src/services/title.magic.service.mjs +0 -19
- package/esm2022/src/ui/GuiInteractiveExecutor.mjs +0 -114
- package/esm2022/src/ui/components/base-magic-alert.component.mjs +0 -24
- package/esm2022/src/ui/components/base-magic-confirm.component.mjs +0 -24
- package/esm2022/src/ui/components/magic-alert.component.mjs +0 -36
- package/esm2022/src/ui/components/magic-confirmation-box.component.mjs +0 -42
- package/esm2022/src/ui/directives/NonMagicControlDirective.mjs +0 -58
- package/esm2022/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.mjs +0 -29
- package/esm2022/src/ui/directives/magic/checkbox.magic.directive.mjs +0 -100
- package/esm2022/src/ui/directives/magic/combobox.magic.directive.mjs +0 -37
- package/esm2022/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.mjs +0 -27
- package/esm2022/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.mjs +0 -85
- package/esm2022/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.mjs +0 -32
- package/esm2022/src/ui/directives/magic/input.noformcontrol.magic.directive.mjs +0 -28
- package/esm2022/src/ui/directives/magic/nocontrol.magic.directive.mjs +0 -193
- package/esm2022/src/ui/directives/magic/row.magic.directive.mjs +0 -62
- package/esm2022/src/ui/directives/magic-focus.directive.mjs +0 -20
- package/esm2022/src/ui/directives/magic.directive.mjs +0 -232
- package/esm2022/src/ui/directives/magicViewContainerRef.directive.mjs +0 -20
- package/esm2022/src/ui/directives/mgformat.magic.directive.mjs +0 -579
- package/esm2022/src/ui/directives/range-validator.magic.directive.mjs +0 -60
- package/esm2022/src/ui/magic-confirmationBox.mjs +0 -42
- package/esm2022/src/ui/magic-modal/base-magic-overlay-container.mjs +0 -22
- package/esm2022/src/ui/magic-modal/magic-modal-form.mjs +0 -6
- package/esm2022/src/ui/magic-modal/magic-modal-interface.mjs +0 -2
- package/esm2022/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +0 -125
- package/esm2022/src/ui/magic-modal/magic-overlay-container.mjs +0 -162
- package/esm2022/src/ui/magic-root.component.mjs +0 -236
- package/esm2022/src/ui/mgerror.magic.component.mjs +0 -125
- package/esm2022/src/ui/pipes/date.magic.pipe.mjs +0 -106
- package/esm2022/src/ui/pipes/time.magic.pipe.mjs +0 -52
- package/esm2022/src/ui/pipes/time24.magic.pipe.mjs +0 -35
- package/esm2022/src/ui/router-container.magic.component.mjs +0 -115
- package/esm2022/src/ui/subform.magic.component.mjs +0 -56
- package/esm2022/src/ui/task-base.magic.component.mjs +0 -91
- package/esm2022/src/ui/utils.mjs +0 -54
@@ -1,8 +1,14 @@
|
|
1
1
|
import { MagicDirective } from "../magic.directive";
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* Directive for checkboxes which should not have a form control
|
5
|
+
*/
|
3
6
|
export declare class CheckboxNoFormControlMagicDirective {
|
4
7
|
protected magicDirective: MagicDirective;
|
5
8
|
constructor(magicDirective: MagicDirective);
|
9
|
+
/**
|
10
|
+
* Handle the 'Checkbox' change event - pass it to the Magic engine
|
11
|
+
*/
|
6
12
|
onChange($event: any): void;
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxNoFormControlMagicDirective, never>;
|
8
14
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxNoFormControlMagicDirective, " input[type=checkbox][magic]:([noFormControl]) ", never, {}, {}, never, never, false, never>;
|
@@ -3,6 +3,9 @@ import { MagicDirective } from '../magic.directive';
|
|
3
3
|
import { TaskMagicService } from "../../../services/task.magics.service";
|
4
4
|
import { GuiCommand } from "@magic-xpa/gui";
|
5
5
|
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Directive for checkboxes, to handle the 'change' event
|
8
|
+
*/
|
6
9
|
export declare class CheckboxMagicDirective {
|
7
10
|
protected magicDirective: MagicDirective;
|
8
11
|
private el;
|
@@ -10,12 +13,21 @@ export declare class CheckboxMagicDirective {
|
|
10
13
|
threeState: boolean;
|
11
14
|
private subscribeRefreshDom;
|
12
15
|
private isIndeterminate;
|
16
|
+
/**
|
17
|
+
* @ignore
|
18
|
+
*/
|
13
19
|
constructor(magicDirective: MagicDirective, el: ElementRef, task: TaskMagicService);
|
20
|
+
/**
|
21
|
+
* Handles the Checkbox 'change' event - pass it to the Magic engine
|
22
|
+
*/
|
14
23
|
onChange($event: any): void;
|
15
24
|
ngOnInit(): void;
|
16
25
|
private regUpdatesUI;
|
17
26
|
handleCommand(command: GuiCommand): void;
|
18
27
|
private handleThreeState;
|
28
|
+
/**
|
29
|
+
* Cleanup
|
30
|
+
*/
|
19
31
|
ngOnDestroy(): void;
|
20
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxMagicDirective, never>;
|
21
33
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxMagicDirective, " input[type=checkbox][magic]:not([noFormControl])", never, { "threeState": { "alias": "threeState"; "required": false; }; }, {}, never, never, false, never>;
|
@@ -1,9 +1,18 @@
|
|
1
1
|
import { MagicDirective } from '../magic.directive';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* Directive for comboboxes, to handle the 'change' event
|
5
|
+
*/
|
3
6
|
export declare class ComboboxMagicDirective {
|
4
7
|
protected magicDirective: MagicDirective;
|
5
8
|
constructor(magicDirective: MagicDirective);
|
9
|
+
/**
|
10
|
+
* Handles the Combobox 'change' event - pass it to the Magic engine
|
11
|
+
*/
|
6
12
|
onChange($event: any): void;
|
13
|
+
/**
|
14
|
+
* To refresh Combobox selection as per selected property.
|
15
|
+
*/
|
7
16
|
onComboboxItemsListChanged(): void;
|
8
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxMagicDirective, never>;
|
9
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ComboboxMagicDirective, "select[magic]:not([multiple])", never, {}, {}, never, never, false, never>;
|
package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
import { CheckboxControlValueAccessor } from '@angular/forms';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* @ignore
|
5
|
+
*/
|
3
6
|
export declare const CHECKBOX_VALUE_ACCESSOR: any;
|
7
|
+
/**
|
8
|
+
* Value accessor for Checkbox without a FormControl
|
9
|
+
*/
|
4
10
|
export declare class MagicCheckboxControlValueAccessor extends CheckboxControlValueAccessor {
|
5
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<MagicCheckboxControlValueAccessor, never>;
|
6
12
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MagicCheckboxControlValueAccessor, " input[type=checkbox][magic]:not([formControlName]):not([no-form-control]), input[type=checkbox][magic]:not([formControl]), input[type=checkbox][magic]:not([ngModel]) ", never, {}, {}, never, never, false, never>;
|
package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts
CHANGED
@@ -4,6 +4,14 @@ import { MagicDirective } from "../../../magic.directive";
|
|
4
4
|
import { TaskMagicService } from "../../../../../services/task.magics.service";
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export declare const DATE_VALUE_ACCESSOR: any;
|
7
|
+
/**
|
8
|
+
* The accessor for writing a value and listening to changes on a date input element
|
9
|
+
*
|
10
|
+
* ### Example
|
11
|
+
* `<input type="date" name="birthday" ngModel dateInput>`
|
12
|
+
* OR
|
13
|
+
* `<input type="date" formControlName="birthday" dateInput>`
|
14
|
+
*/
|
7
15
|
export declare class DateValueAccessor implements ControlValueAccessor {
|
8
16
|
private renderer;
|
9
17
|
private elementRef;
|
@@ -13,10 +21,15 @@ export declare class DateValueAccessor implements ControlValueAccessor {
|
|
13
21
|
onTouched: () => void;
|
14
22
|
onBlurEvent(event: any): void;
|
15
23
|
constructor(renderer: Renderer2, elementRef: ElementRef, magicDir: MagicDirective, _task: TaskMagicService);
|
24
|
+
/** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */
|
16
25
|
formatDateWithCentury(userInput: string, century: number, control: AbstractControl): void;
|
26
|
+
/** Writes a new value to the element (model -> view) */
|
17
27
|
writeValue(value: Date): void;
|
28
|
+
/** Registers a callback function, called when value changes (view -> model) */
|
18
29
|
registerOnChange(fn: (_: any) => void): void;
|
30
|
+
/** Registers a callback function, called when the control is blurred */
|
19
31
|
registerOnTouched(fn: () => void): void;
|
32
|
+
/** Enables or disables the element when the control status changes */
|
20
33
|
setDisabledState(isDisabled: boolean): void;
|
21
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateValueAccessor, never>;
|
22
35
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DateValueAccessor, "[dateInput]", never, {}, {}, never, never, false, never>;
|
package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
import { DefaultValueAccessor } from '@angular/forms';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* @ignore
|
5
|
+
*/
|
3
6
|
export declare const MAGIC_DEFAULT_VALUE_ACCESSOR: any;
|
7
|
+
/**
|
8
|
+
* @ignore
|
9
|
+
*/
|
4
10
|
export declare class MagicDefaultValueAccessor extends DefaultValueAccessor {
|
5
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<MagicDefaultValueAccessor, never>;
|
6
12
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MagicDefaultValueAccessor, " input[magic]:not([type=checkbox]):not([formControlName]):not([no-form-control]), textarea[magic]:not([formControlName]):not([noFormControl]):not([no-form-control]) ", ["magic"], {}, {}, never, never, false, never>;
|
@@ -1,8 +1,14 @@
|
|
1
1
|
import { MagicDirective } from '../magic.directive';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* Directive for non-checkbox input controls which do not have a form control
|
5
|
+
*/
|
3
6
|
export declare class InputNoFormControlMagicDirective {
|
4
7
|
protected magicDirective: MagicDirective;
|
5
8
|
constructor(magicDirective: MagicDirective);
|
9
|
+
/**
|
10
|
+
* Handles the 'change' event - pass it to the Magic engine
|
11
|
+
*/
|
6
12
|
onChange($event: any): void;
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputNoFormControlMagicDirective, never>;
|
8
14
|
static ɵdir: i0.ɵɵDirectiveDeclaration<InputNoFormControlMagicDirective, "input[magic]:([noFormControl]):not([type=checkbox]), textarea[magic]:([noFormControl]):not([type=checkbox])", never, {}, {}, never, never, false, never>;
|
@@ -5,6 +5,9 @@ import { TaskMagicService } from "../../../services/task.magics.service";
|
|
5
5
|
import { RowMagicDirective } from "./row.magic.directive";
|
6
6
|
import { Platform } from "@angular/cdk/platform";
|
7
7
|
import * as i0 from "@angular/core";
|
8
|
+
/**
|
9
|
+
* @ignore
|
10
|
+
*/
|
8
11
|
export declare class NoControlMagicDirective extends MagicDirective {
|
9
12
|
set magic(val: any);
|
10
13
|
constructor(_task: TaskMagicService, element: ElementRef, renderer: Renderer2, vcRef: ViewContainerRef, platform: Platform, magicRow: RowMagicDirective);
|
@@ -1,15 +1,30 @@
|
|
1
1
|
import { ElementRef, OnDestroy, OnInit } from "@angular/core";
|
2
2
|
import { TaskMagicService } from "../../../services/task.magics.service";
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* @ignore
|
6
|
+
*/
|
4
7
|
export declare class RowMagicDirective implements OnInit, OnDestroy {
|
5
8
|
protected _task: TaskMagicService;
|
6
9
|
protected element: ElementRef;
|
7
10
|
rowId: string;
|
11
|
+
/**
|
12
|
+
* The HTML element connected to this directive
|
13
|
+
*/
|
8
14
|
protected htmlElement: HTMLElement;
|
15
|
+
/**
|
16
|
+
* @ignore
|
17
|
+
*/
|
9
18
|
private rowChangedSubscriber;
|
10
19
|
constructor(_task: TaskMagicService, element: ElementRef);
|
20
|
+
/**
|
21
|
+
* Initializes this object
|
22
|
+
*/
|
11
23
|
ngOnInit(): void;
|
12
24
|
private isInView;
|
25
|
+
/**
|
26
|
+
* Cleanup
|
27
|
+
*/
|
13
28
|
ngOnDestroy(): void;
|
14
29
|
onClick($event: any): void;
|
15
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowMagicDirective, never>;
|
@@ -6,6 +6,9 @@ import { RowMagicDirective } from "./magic/row.magic.directive";
|
|
6
6
|
import { Subscription } from "rxjs";
|
7
7
|
import { Platform } from "@angular/cdk/platform";
|
8
8
|
import * as i0 from "@angular/core";
|
9
|
+
/**
|
10
|
+
* Connects HTML elements to the Magic Web Client engine
|
11
|
+
*/
|
9
12
|
export declare class MagicDirective implements OnInit, OnDestroy {
|
10
13
|
protected _task: TaskMagicService;
|
11
14
|
protected element: ElementRef;
|
@@ -14,31 +17,110 @@ export declare class MagicDirective implements OnInit, OnDestroy {
|
|
14
17
|
platform: Platform;
|
15
18
|
protected magicRow: RowMagicDirective;
|
16
19
|
set magic(val: any);
|
20
|
+
/**
|
21
|
+
* This flag is used when we only want to register to events, but do not want to execute commands sent from server
|
22
|
+
*/
|
17
23
|
set eventsOnly(val: any);
|
24
|
+
/**
|
25
|
+
* pollTime: after which value will be sent to magic
|
26
|
+
*/
|
18
27
|
pollTime: number;
|
28
|
+
/**
|
29
|
+
* Row id of the control, for when it is on a table
|
30
|
+
*/
|
19
31
|
rowId: string;
|
32
|
+
/**
|
33
|
+
*
|
34
|
+
*/
|
35
|
+
/**
|
36
|
+
* The HTML element connected to this directive
|
37
|
+
*/
|
20
38
|
protected htmlElement: HTMLElement;
|
39
|
+
/**
|
40
|
+
* Magic's component handling this control
|
41
|
+
*/
|
21
42
|
component: TaskBaseMagicComponent;
|
43
|
+
/**
|
44
|
+
* Collection of event handlers for this element
|
45
|
+
*/
|
22
46
|
private eventHandlers;
|
47
|
+
/**
|
48
|
+
* Id of this element
|
49
|
+
*/
|
23
50
|
id: string;
|
51
|
+
/**
|
52
|
+
* @ignore
|
53
|
+
*/
|
24
54
|
protected selector: string;
|
55
|
+
/**
|
56
|
+
* @ignore
|
57
|
+
*/
|
25
58
|
subscribeRefreshDom: Subscription;
|
26
59
|
private focusUnlistener;
|
27
60
|
eventsOnlyVal: boolean;
|
28
61
|
static opened: boolean;
|
29
62
|
static noOfAutoCompleteBoxesOpened: number;
|
30
63
|
subscribeInteractiveCommands: Subscription;
|
64
|
+
/**
|
65
|
+
*
|
66
|
+
* @param _task The task service
|
67
|
+
* @param element The element for which the directive is applied
|
68
|
+
* @param renderer Renderer for the element
|
69
|
+
* @param vcRef
|
70
|
+
* @param platform
|
71
|
+
* @param magicRow
|
72
|
+
*/
|
31
73
|
constructor(_task: TaskMagicService, element: ElementRef, renderer: Renderer2, vcRef: ViewContainerRef, platform: Platform, magicRow: RowMagicDirective);
|
74
|
+
/**
|
75
|
+
* Get the task service
|
76
|
+
* @returns
|
77
|
+
*/
|
32
78
|
get task(): TaskMagicService;
|
79
|
+
/**
|
80
|
+
* Register to the events this element may need to handle
|
81
|
+
*/
|
33
82
|
protected regEvents(): void;
|
83
|
+
/**
|
84
|
+
* Handle focus event
|
85
|
+
*/
|
34
86
|
private OnFocus;
|
87
|
+
/**
|
88
|
+
* Is the command's element the same as this directive's element
|
89
|
+
* @param command
|
90
|
+
* @returns true/false
|
91
|
+
*/
|
35
92
|
IsSameElement(command: any): boolean;
|
93
|
+
/**
|
94
|
+
* Is the command's element the same as this directive's component
|
95
|
+
* @param command
|
96
|
+
* @returns true/false
|
97
|
+
*/
|
36
98
|
private IsSameComponent;
|
99
|
+
/**
|
100
|
+
* @ignore
|
101
|
+
*/
|
37
102
|
private regUpdatesUI;
|
103
|
+
/**
|
104
|
+
* Initializes this object
|
105
|
+
*/
|
38
106
|
ngOnInit(): void;
|
107
|
+
/**
|
108
|
+
* Handles the commands received from the Magic WebClient engine
|
109
|
+
* @param command
|
110
|
+
*/
|
39
111
|
handleCommand(command: GuiCommand): void;
|
112
|
+
/**
|
113
|
+
* handle the interactive commands like CallJS
|
114
|
+
*/
|
40
115
|
handleInteractiveCommands(command: GuiInteractive): void;
|
116
|
+
/**
|
117
|
+
* Handle the Magic set-property command
|
118
|
+
* @param command
|
119
|
+
*/
|
41
120
|
handleSetProperty(command: GuiCommand): void;
|
121
|
+
/**
|
122
|
+
* Cleanup
|
123
|
+
*/
|
42
124
|
ngOnDestroy(): void;
|
43
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<MagicDirective, [null, null, null, null, null, { optional: true; }]>;
|
44
126
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MagicDirective, "[magic]", never, { "magic": { "alias": "magic"; "required": false; }; "eventsOnly": { "alias": "eventsOnly"; "required": false; }; "pollTime": { "alias": "pollTime"; "required": false; }; "rowId": { "alias": "rowId"; "required": false; }; }, {}, never, never, false, never>;
|
@@ -5,33 +5,77 @@ import { MagicDirective } from './magic.directive';
|
|
5
5
|
import { AbstractControl } from '@angular/forms';
|
6
6
|
import { PIC } from '@magic-xpa/gui';
|
7
7
|
import * as i0 from "@angular/core";
|
8
|
+
/**
|
9
|
+
* Perform Magic validation on input controls which hold alphanumeric strings
|
10
|
+
*/
|
8
11
|
export declare class MgformatMagicDirective {
|
9
12
|
protected magicDir: MagicDirective;
|
10
13
|
protected _task: TaskMagicService;
|
11
14
|
datePasteFlag: boolean;
|
15
|
+
/**
|
16
|
+
* @ignore
|
17
|
+
*/
|
12
18
|
constructor(magicDir: MagicDirective, _task: TaskMagicService);
|
13
19
|
ngAfterViewInit(): void;
|
20
|
+
/**
|
21
|
+
* @ignore
|
22
|
+
*/
|
23
|
+
/**
|
24
|
+
* This can be used to set pattern
|
25
|
+
* On input, verifies the input matches the required mask
|
26
|
+
*/
|
14
27
|
onFocusEvent($event: any): void;
|
15
28
|
onPaste(event: ClipboardEvent): void;
|
16
29
|
onInputEvent(event: any): void;
|
17
30
|
dateMasking(event: any): void;
|
31
|
+
/**
|
32
|
+
* @ignore
|
33
|
+
*/
|
18
34
|
onChangeEvent(event: any): void;
|
19
35
|
onBlurEvent(event: any): void;
|
36
|
+
/** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */
|
20
37
|
formatDateWithCentury(userInput: string, century: number, control: AbstractControl): void;
|
21
38
|
updateYear(day: number, month: string, year: number, separator: string, century: number, centuryVal: number, control: AbstractControl): void;
|
22
39
|
getDateSegments1(dateArray: any): any[];
|
23
40
|
getDateSegments2(dateArray: any): any[];
|
24
41
|
getDateSegments3(dateArray: any): any[];
|
25
42
|
getDateSegments4(dateArray: any): any[];
|
43
|
+
/**
|
44
|
+
* @ignore
|
45
|
+
*/
|
26
46
|
calculatePattern(): void;
|
27
47
|
formatDate(pic: PIC): void;
|
48
|
+
/**
|
49
|
+
* @ignore
|
50
|
+
*/
|
28
51
|
formatAlphaUnicode(control: AbstractControl): void;
|
52
|
+
/**
|
53
|
+
* @ignore
|
54
|
+
*/
|
29
55
|
formatBoolean(control: AbstractControl): void;
|
56
|
+
/**
|
57
|
+
* @ignore
|
58
|
+
*/
|
30
59
|
generatePattern(attribute: StorageAttribute, pic: PIC): string;
|
60
|
+
/**
|
61
|
+
* @ignore
|
62
|
+
*/
|
31
63
|
generatePatternForNumber(pic: PIC): string;
|
64
|
+
/**
|
65
|
+
* @ignore
|
66
|
+
*/
|
32
67
|
isPatternGenerationNeeded(attr: StorageAttribute, pic: PIC): boolean;
|
68
|
+
/**
|
69
|
+
* @ignore
|
70
|
+
*/
|
33
71
|
generatePatternForAlpha(pic: PIC): string;
|
72
|
+
/**
|
73
|
+
* @ignore
|
74
|
+
*/
|
34
75
|
getDirectiveCount(mask: string, idx: number, pattern: string, changeInPattern: RefParam<boolean>): number;
|
76
|
+
/**
|
77
|
+
* @ignore
|
78
|
+
*/
|
35
79
|
IsPatternMatches(mask: string, pattern: string): boolean;
|
36
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<MgformatMagicDirective, never>;
|
37
81
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MgformatMagicDirective, "[mgFormat]", never, {}, {}, never, never, false, never>;
|
@@ -2,15 +2,31 @@ import { ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { FormControl, Validator } from '@angular/forms';
|
3
3
|
import { TaskMagicService } from '../../services/task.magics.service';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
/**
|
6
|
+
* Validates the field range.
|
7
|
+
*/
|
5
8
|
export declare class RangeValidatorMagicDirective implements Validator {
|
6
9
|
protected _task: TaskMagicService;
|
7
10
|
protected vcRef: ViewContainerRef;
|
11
|
+
/**
|
12
|
+
*
|
13
|
+
* @param _task The task service
|
14
|
+
* @param vcRef
|
15
|
+
*/
|
8
16
|
constructor(_task: TaskMagicService, vcRef: ViewContainerRef);
|
17
|
+
/**
|
18
|
+
* Validation method
|
19
|
+
* @param c FormControl to validate
|
20
|
+
* @returns If validation fails, return error message, else returns null
|
21
|
+
*/
|
9
22
|
validate(c: FormControl): {
|
10
23
|
rangevalidator: {
|
11
24
|
errorMsg: string;
|
12
25
|
};
|
13
26
|
};
|
27
|
+
/**
|
28
|
+
* @ignore
|
29
|
+
*/
|
14
30
|
getControlName(c: FormControl): string | null;
|
15
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<RangeValidatorMagicDirective, never>;
|
16
32
|
static ɵdir: i0.ɵɵDirectiveDeclaration<RangeValidatorMagicDirective, "[rangevalidator] ", never, {}, {}, never, never, false, never>;
|
@@ -1,6 +1,25 @@
|
|
1
1
|
import { Styles } from "@magic-xpa/gui";
|
2
|
+
/**
|
3
|
+
* Displays a message-box
|
4
|
+
*/
|
2
5
|
export declare class confirmationBox {
|
6
|
+
/**
|
7
|
+
* @ignore
|
8
|
+
*/
|
3
9
|
static isConfirmBox(style: Styles): Boolean;
|
10
|
+
/**
|
11
|
+
* Converts the result from the HTML window to the expected result type
|
12
|
+
* @param style Result received from HTML window
|
13
|
+
* @param okWasPressed Was the "OK" pressed
|
14
|
+
* @returns MessageBox result type
|
15
|
+
*/
|
4
16
|
static convertToExcpectedResultBox(style: Styles, okWasPressed: Boolean): Styles;
|
17
|
+
/**
|
18
|
+
* Show a message box as an HTML window
|
19
|
+
* @param title Title of the message box
|
20
|
+
* @param message Message that will be display in the message box
|
21
|
+
* @param style Style that include buttons \ Icons
|
22
|
+
* @returns MessageBox result
|
23
|
+
*/
|
5
24
|
static showConfirmationBox(title: string, message: string, style: Styles): boolean;
|
6
25
|
}
|
@@ -1,10 +1,37 @@
|
|
1
|
+
/**
|
2
|
+
* Describes the behavior of a modal window
|
3
|
+
*/
|
1
4
|
export interface MagicModalInterface {
|
5
|
+
/**
|
6
|
+
* Returns the X coordinate of the modal window
|
7
|
+
*/
|
2
8
|
X(): any;
|
9
|
+
/**
|
10
|
+
* Returns the Y coordinate of the modal window
|
11
|
+
*/
|
3
12
|
Y(): any;
|
13
|
+
/**
|
14
|
+
* Returns the width of modal window
|
15
|
+
*/
|
4
16
|
Width(): string;
|
17
|
+
/**
|
18
|
+
* Returns the height of modal window
|
19
|
+
*/
|
5
20
|
Height(): string;
|
21
|
+
/**
|
22
|
+
* Is the modal window centered relatively to the main window
|
23
|
+
*/
|
6
24
|
IsCenteredToWindow(): any;
|
25
|
+
/**
|
26
|
+
* Returns the name of the form - title of the modal window
|
27
|
+
*/
|
7
28
|
FormName(): any;
|
29
|
+
/**
|
30
|
+
* Should the title bar be displayed
|
31
|
+
*/
|
8
32
|
ShowTitleBar(): any;
|
33
|
+
/**
|
34
|
+
* Should the modal window close when the user clicks on the background
|
35
|
+
*/
|
9
36
|
ShouldCloseOnBackgroundClick(): any;
|
10
37
|
}
|
@@ -9,17 +9,37 @@ export declare class MagicOverlayContainerWrapper implements IMagicViewContainer
|
|
9
9
|
private injector;
|
10
10
|
private changeDetectorRef;
|
11
11
|
private compiler;
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
*/
|
12
15
|
Component: any;
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
*/
|
13
19
|
Parameters: any;
|
14
20
|
private OverlayTypeParam;
|
15
21
|
private onClose;
|
22
|
+
/**
|
23
|
+
* HTML to be displayed in the modal window
|
24
|
+
*/
|
16
25
|
overlayContentViewContainerRef: ViewContainerRef;
|
17
26
|
overlayContainerWrapperElementRef: ElementRef;
|
27
|
+
/**
|
28
|
+
* @ignore
|
29
|
+
* contais data of allowed base components to use
|
30
|
+
*/
|
18
31
|
static allowedBaseComps: Map<number, {
|
19
32
|
comp: any;
|
20
33
|
error: string;
|
21
34
|
}>;
|
35
|
+
/**
|
36
|
+
*
|
37
|
+
* @param componentFactoryResolver
|
38
|
+
*/
|
22
39
|
constructor(componentListMagicService: ComponentListMagicService, magicLazyModuleLoader: MagicLazyLoaderService, injector: Injector, changeDetectorRef: ChangeDetectorRef, compiler: Compiler);
|
40
|
+
/**
|
41
|
+
*
|
42
|
+
*/
|
23
43
|
ngOnInit(): void;
|
24
44
|
private loadComponent;
|
25
45
|
setViewContainerRef(vcRef: ViewContainerRef): void;
|
@@ -2,22 +2,73 @@ import { ElementRef, EventEmitter, OnInit, ViewContainerRef } from '@angular/cor
|
|
2
2
|
import { BaseMagicOverlayContainer } from './base-magic-overlay-container';
|
3
3
|
import { IMagicViewContainerRef } from '../../..';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
/**
|
6
|
+
* Creates a modal window for Magic modal window components
|
7
|
+
*/
|
5
8
|
export declare class MagicOverlayContainer extends BaseMagicOverlayContainer implements OnInit, IMagicViewContainerRef {
|
9
|
+
/**
|
10
|
+
* HTML to be displayed in the modal window
|
11
|
+
*/
|
6
12
|
modalbodyViewContainerRef: ViewContainerRef;
|
13
|
+
/**
|
14
|
+
* Header of the modal window
|
15
|
+
*/
|
7
16
|
headerElementRef: ElementRef;
|
17
|
+
/**
|
18
|
+
* Foreground of the modal window
|
19
|
+
*/
|
8
20
|
foregroundElementRef: ElementRef;
|
21
|
+
/**
|
22
|
+
*
|
23
|
+
*/
|
9
24
|
ModalComp: any;
|
25
|
+
/**
|
26
|
+
*
|
27
|
+
*/
|
10
28
|
ModalCompParameters: any;
|
11
29
|
onClose: EventEmitter<void>;
|
30
|
+
/**
|
31
|
+
*
|
32
|
+
*/
|
12
33
|
private componentRef;
|
34
|
+
/**
|
35
|
+
*
|
36
|
+
* @param injector
|
37
|
+
* @param componentFactoryResolver
|
38
|
+
*/
|
13
39
|
constructor();
|
40
|
+
/**
|
41
|
+
*
|
42
|
+
*/
|
14
43
|
ngOnInit(): void;
|
15
44
|
setViewContainerRef(vcRef: ViewContainerRef): void;
|
45
|
+
/**
|
46
|
+
* Returns the form name
|
47
|
+
* @returns
|
48
|
+
*/
|
16
49
|
getText(): any;
|
50
|
+
/**
|
51
|
+
* Returns CSS styles for the window
|
52
|
+
* @returns
|
53
|
+
*/
|
17
54
|
getStyle(): {};
|
55
|
+
/**
|
56
|
+
* Returns the CSS styles for the client area
|
57
|
+
* @returns
|
58
|
+
*/
|
18
59
|
getClientAreaStyles(): {};
|
60
|
+
/**
|
61
|
+
* Should the title bar be displayed
|
62
|
+
* @returns
|
63
|
+
*/
|
19
64
|
getShowTitleBar(): any;
|
65
|
+
/**
|
66
|
+
*
|
67
|
+
*/
|
20
68
|
OnClose(): void;
|
69
|
+
/**
|
70
|
+
* Handles click in the background window
|
71
|
+
*/
|
21
72
|
OnBackgroundClick(): void;
|
22
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<MagicOverlayContainer, never>;
|
23
74
|
static ɵcmp: i0.ɵɵComponentDeclaration<MagicOverlayContainer, "app-magic-overlay-container", never, { "ModalComp": { "alias": "ModalComp"; "required": false; }; "ModalCompParameters": { "alias": "ModalCompParameters"; "required": false; }; }, { "onClose": "onClose"; }, never, never, false, never>;
|