@planeasyinc/le-angular 0.0.21 → 0.0.23
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/dist/fesm2022/planeasyinc-le-angular.mjs +191 -34
- package/dist/fesm2022/planeasyinc-le-angular.mjs.map +1 -1
- package/dist/lib/components/toast-list/toast-list-item.component.d.ts +14 -0
- package/dist/lib/components/toast-list/toast-list.component.d.ts +2 -2
- package/dist/lib/icons/le-icon.component.d.ts +1 -1
- package/dist/lib/services/le-actions.service.d.ts +15 -0
- package/dist/lib/services/le-toast.service.d.ts +7 -14
- package/dist/lib/types/le-action.d.ts +5 -0
- package/dist/lib/views/form-view/form-view.component.d.ts +4 -0
- package/dist/lib/views/form-view/form-view.utils.d.ts +2 -0
- package/dist/styles/styles.scss +4 -4
- package/package.json +6 -6
- /package/dist/lib/{views/form-view → utils}/form.adapter.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FeFormEngine, FeSection } from '@planeasyinc/fe-core';
|
|
2
|
+
import { FeControlAction } from '@planeasyinc/fe-core/src/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ToastListItemComponent {
|
|
5
|
+
private _engine;
|
|
6
|
+
private _sections;
|
|
7
|
+
controls: import("@angular/core").InputSignal<unknown>;
|
|
8
|
+
actions: import("@angular/core").OutputEmitterRef<FeControlAction[]>;
|
|
9
|
+
readonly engine: import("@angular/core").Signal<FeFormEngine>;
|
|
10
|
+
readonly sections: import("@angular/core").Signal<FeSection[]>;
|
|
11
|
+
constructor();
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastListItemComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastListItemComponent, "le-toast-list-item", never, { "controls": { "alias": "controls"; "required": true; "isSignal": true; }; }, { "actions": "actions"; }, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeControlAction } from '@planeasyinc/fe-core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ToastListComponent {
|
|
4
4
|
private toastService;
|
|
5
5
|
readonly toasts: import("@angular/core").Signal<import("../../services/le-toast.service").LeToast[]>;
|
|
6
|
-
|
|
6
|
+
onActions(actions: FeControlAction[]): void;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToastListComponent, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<ToastListComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class LeIconComponent {
|
|
3
|
-
name: import("@angular/core").InputSignal<"sort" | "close" | "
|
|
3
|
+
name: import("@angular/core").InputSignal<"sort" | "close" | "info" | "arrow-down" | "chevron">;
|
|
4
4
|
size: import("@angular/core").InputSignal<string | number>;
|
|
5
5
|
icon: import("@angular/core").Signal<{
|
|
6
6
|
size: number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FeControlAction } from '@planeasyinc/fe-core';
|
|
2
|
+
import { ActionResponse } from '../types/le-action';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class LeActionsService {
|
|
5
|
+
private _queue;
|
|
6
|
+
private _data;
|
|
7
|
+
get hasActions(): boolean;
|
|
8
|
+
setActions(actions: FeControlAction[], data: ActionResponse | null): void;
|
|
9
|
+
getActions(): {
|
|
10
|
+
actions: FeControlAction[];
|
|
11
|
+
data: ActionResponse | null;
|
|
12
|
+
};
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LeActionsService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LeActionsService>;
|
|
15
|
+
}
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FeControlAction } from '@planeasyinc/fe-core';
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
|
-
export interface LeToastButtonControl {
|
|
3
|
-
type: 'button';
|
|
4
|
-
label: string;
|
|
5
|
-
actions: Array<{
|
|
6
|
-
type: string;
|
|
7
|
-
target: string;
|
|
8
|
-
}>;
|
|
9
|
-
}
|
|
10
|
-
export interface LeToastTextControl {
|
|
11
|
-
type: 'text';
|
|
12
|
-
value: string;
|
|
13
|
-
}
|
|
14
4
|
type LeToastType = 'success' | 'error' | 'info' | 'warning';
|
|
15
5
|
export interface LeToast {
|
|
16
6
|
id: string;
|
|
17
7
|
type: LeToastType;
|
|
18
|
-
controls: Array<
|
|
8
|
+
controls: Array<unknown>;
|
|
19
9
|
}
|
|
20
10
|
export declare class LeToastService {
|
|
21
11
|
private overlayRef?;
|
|
22
12
|
private overlay;
|
|
23
13
|
private _toasts;
|
|
24
14
|
readonly toasts: import("@angular/core").Signal<LeToast[]>;
|
|
15
|
+
readonly hasToasts: import("@angular/core").Signal<boolean>;
|
|
16
|
+
readonly action$: Subject<FeControlAction>;
|
|
25
17
|
constructor();
|
|
26
18
|
notify(toast: LeToast): void;
|
|
27
19
|
warn(...messages: string[]): void;
|
|
@@ -29,10 +21,11 @@ export declare class LeToastService {
|
|
|
29
21
|
success(...messages: string[]): void;
|
|
30
22
|
error(...messages: string[]): void;
|
|
31
23
|
remove(id: string): void;
|
|
32
|
-
processAction(action: LeToastButtonControl['actions'][0]): void;
|
|
33
24
|
private show;
|
|
34
25
|
private hide;
|
|
35
26
|
private buildToast;
|
|
27
|
+
private buildTextControls;
|
|
28
|
+
private buildButtonControl;
|
|
36
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<LeToastService, never>;
|
|
37
30
|
static ɵprov: i0.ɵɵInjectableDeclaration<LeToastService>;
|
|
38
31
|
}
|
|
@@ -7,6 +7,7 @@ export declare class FormViewComponent {
|
|
|
7
7
|
private attachmentService;
|
|
8
8
|
private viewportScroller;
|
|
9
9
|
private toastService;
|
|
10
|
+
private actionsService;
|
|
10
11
|
private _isLoading;
|
|
11
12
|
private _form;
|
|
12
13
|
private _sections;
|
|
@@ -36,6 +37,9 @@ export declare class FormViewComponent {
|
|
|
36
37
|
private mapUpdateFormActionToFormNode;
|
|
37
38
|
private mapUpdateTableActionToTableNode;
|
|
38
39
|
private processActionList;
|
|
40
|
+
private checkDelayedActions;
|
|
41
|
+
private normalizeControls;
|
|
42
|
+
private populatePopupControlsWithResponseData;
|
|
39
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormViewComponent, never>;
|
|
40
44
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormViewComponent, "form-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; }, { "event": "event"; }, never, never, true, never>;
|
|
41
45
|
}
|
|
@@ -17,6 +17,7 @@ export declare const mapActionBodyToFieldsArray: (body: Record<string, string>)
|
|
|
17
17
|
* @returns true if body fields have errors
|
|
18
18
|
*/
|
|
19
19
|
export declare const isErrorCorrespondActionBody: (body: Record<string, string>, errors: Record<string, any>) => boolean;
|
|
20
|
+
export declare const getValueByPath: (obj: Record<string, any>, path: string) => any;
|
|
20
21
|
export declare const mapBodyStringModelToRequestBody: (bodyModel: string, values?: Record<string, any>) => any;
|
|
21
22
|
export declare const mapBodyObjectModelToRequestBody: (bodyModel?: Record<string, any>, values?: Record<string, any>) => Record<string, any>;
|
|
22
23
|
export declare const mapBodyModelToRequestBody: (bodyModel: Record<string, any> | string, values: Record<string, any>) => Record<string, any> | string;
|
|
@@ -35,3 +36,4 @@ export declare const getTabFormValues: (source: FeControlConfig, target: FeContr
|
|
|
35
36
|
export declare const mapFormValuesToJSON: (values: Record<string, any>) => string;
|
|
36
37
|
export declare const mapJSONToFormValues: (json: unknown) => any;
|
|
37
38
|
export declare const getTabJSONControl: (control: any, engine: FeFormEngine) => any;
|
|
39
|
+
export declare const mapValueToString: (value: unknown) => string;
|
package/dist/styles/styles.scss
CHANGED
|
@@ -746,6 +746,7 @@ $sort-icon-size: 6px;
|
|
|
746
746
|
.le-toast {
|
|
747
747
|
display: flex;
|
|
748
748
|
width: fit-content;
|
|
749
|
+
min-width: 220px;
|
|
749
750
|
padding: 8px;
|
|
750
751
|
gap: 8px;
|
|
751
752
|
border-radius: 4px;
|
|
@@ -995,11 +996,10 @@ $sort-icon-size: 6px;
|
|
|
995
996
|
========================== */
|
|
996
997
|
.block-view {
|
|
997
998
|
display: grid;
|
|
998
|
-
grid-template-columns:
|
|
999
|
-
|
|
1000
|
-
.block-view-item {
|
|
1001
|
-
padding-bottom: 1rem;
|
|
999
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1000
|
+
gap: 1rem;
|
|
1002
1001
|
}
|
|
1002
|
+
.block-view-item {}
|
|
1003
1003
|
.block-view-label {
|
|
1004
1004
|
padding-bottom: 1rem;
|
|
1005
1005
|
font-weight: bold;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planeasyinc/le-angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"ng-packagr": "^19.0.0",
|
|
38
38
|
"typescript": "5.6.3",
|
|
39
39
|
"@types/web": "0.0.347",
|
|
40
|
-
"@planeasyinc/
|
|
41
|
-
"@planeasyinc/
|
|
42
|
-
"@planeasyinc/fe-adapters-old": "0.1.
|
|
43
|
-
"@planeasyinc/fe-
|
|
44
|
-
"@planeasyinc/fe-
|
|
40
|
+
"@planeasyinc/le-core": "0.0.5",
|
|
41
|
+
"@planeasyinc/fe-adapters-sections": "0.1.15",
|
|
42
|
+
"@planeasyinc/fe-adapters-old": "0.1.17",
|
|
43
|
+
"@planeasyinc/fe-core": "0.1.27",
|
|
44
|
+
"@planeasyinc/fe-angular": "0.1.44"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"lint": "eslint src",
|
|
File without changes
|