@rosoftlab/ionic 1.0.5-alpha-7 → 1.0.5-alpha-9
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/rosoftlab-ionic.mjs +671 -8
- package/fesm2022/rosoftlab-ionic.mjs.map +1 -1
- package/lib/components/generic-ionic-crud/generic-ionic-crud.component.d.ts +69 -0
- package/lib/components/generic-ionic-grid/generic-ionic-grid.component.d.ts +67 -0
- package/lib/components/index.d.ts +2 -0
- package/package.json +14 -6
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Location } from '@angular/common';
|
|
2
|
+
import { Injector, OnInit } from '@angular/core';
|
|
3
|
+
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
4
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';
|
|
6
|
+
import { FormlyJsonschema } from '@ngx-formly/core/json-schema';
|
|
7
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
8
|
+
import { BaseModelFormly, BaseServiceFormly } from '@rosoftlab/formly';
|
|
9
|
+
import { Observable } from 'rxjs';
|
|
10
|
+
import { IonicDialogService } from '../../ionic-dialog.service';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class GenericIonicCrudPageComponent<T extends BaseModelFormly, U extends BaseServiceFormly<T>> implements OnInit {
|
|
13
|
+
fb: UntypedFormBuilder;
|
|
14
|
+
router: Router;
|
|
15
|
+
route: ActivatedRoute;
|
|
16
|
+
dialogService: IonicDialogService;
|
|
17
|
+
translate: TranslateService;
|
|
18
|
+
location: Location;
|
|
19
|
+
private injector;
|
|
20
|
+
private formlyJsonschema;
|
|
21
|
+
baseForm: UntypedFormGroup;
|
|
22
|
+
modelId: string;
|
|
23
|
+
model: T;
|
|
24
|
+
origModel: T;
|
|
25
|
+
isEdit: boolean;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
cancelRoute: string;
|
|
28
|
+
editRoute: string;
|
|
29
|
+
modelService: U;
|
|
30
|
+
changeUrlRoute: boolean;
|
|
31
|
+
title: string;
|
|
32
|
+
fields: FormlyFieldConfig[];
|
|
33
|
+
options: FormlyFormOptions;
|
|
34
|
+
confirmQuestion: string;
|
|
35
|
+
confirmButton: string;
|
|
36
|
+
saveMessage: string;
|
|
37
|
+
constructor(fb: UntypedFormBuilder, router: Router, route: ActivatedRoute, dialogService: IonicDialogService, translate: TranslateService, location: Location, injector: Injector, formlyJsonschema: FormlyJsonschema);
|
|
38
|
+
ionViewWillLeave(): void;
|
|
39
|
+
afterSave(model: T): Observable<T>;
|
|
40
|
+
beforeSave(model: T): Observable<T>;
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
initForm(customInclude?: string, newModelId?: string, model?: T): void;
|
|
43
|
+
generateForm(model?: T): void;
|
|
44
|
+
afterFormGenerated(): void;
|
|
45
|
+
private getFromGroup;
|
|
46
|
+
validateAllFormFields(formGroup?: UntypedFormGroup | string): void;
|
|
47
|
+
isFieldValid(field: string, formGroup?: UntypedFormGroup | string): boolean;
|
|
48
|
+
isFieldValidFromArray(arrayIndex: number, field: string, arrayName?: string): boolean;
|
|
49
|
+
displayFieldCss(field: string): {
|
|
50
|
+
'has-error': boolean;
|
|
51
|
+
'has-feedback': boolean;
|
|
52
|
+
};
|
|
53
|
+
onCancel(): void;
|
|
54
|
+
onSave(): void;
|
|
55
|
+
onSubmit(model: any): void;
|
|
56
|
+
saveModel(formGroup?: UntypedFormGroup | string): void;
|
|
57
|
+
serverErrors(err: any): void;
|
|
58
|
+
private firstCharToLowerCase;
|
|
59
|
+
canDeactivate(): Promise<boolean>;
|
|
60
|
+
getFiledName(filedTranslationKey: string): {
|
|
61
|
+
field: any;
|
|
62
|
+
};
|
|
63
|
+
getCustomErrorMessage(error: any, fieldLabel: string): string;
|
|
64
|
+
getErrorMessageFromArray(arrayIndex: number, field: string, filedTranslationKey: string, arrayName?: string): string;
|
|
65
|
+
getErrorMessage(field: string, filedTranslationKey: string, formGroup?: UntypedFormGroup | string): string;
|
|
66
|
+
getErrorMessageForField(fieldControl: any, filedTranslationKey: string): string;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GenericIonicCrudPageComponent<any, any>, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericIonicCrudPageComponent<any, any>, "generic-ionic-crud", never, {}, {}, never, never, true, never>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import { BaseModel, BaseTableImplementation, LocalFileService } from '@rosoftlab/core';
|
|
5
|
+
import { ColumnMode, SelectionType } from '@swimlane/ngx-datatable';
|
|
6
|
+
import { IonicDialogService } from '../../ionic-dialog.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare type SortDirection = 'asc' | 'desc' | '';
|
|
9
|
+
export declare class GenericIonicGridComponent extends BaseTableImplementation<any, any, any> implements OnInit, OnDestroy {
|
|
10
|
+
router: Router;
|
|
11
|
+
translate: TranslateService;
|
|
12
|
+
dialogServiceIonic: IonicDialogService;
|
|
13
|
+
private el;
|
|
14
|
+
private localFileService;
|
|
15
|
+
actionsTmpl: TemplateRef<any>;
|
|
16
|
+
data: any[];
|
|
17
|
+
pageIndex: number;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
columns: any[];
|
|
20
|
+
allColumns: any[];
|
|
21
|
+
referenceData: Map<string, Map<string, any>>;
|
|
22
|
+
ColumnMode: typeof ColumnMode;
|
|
23
|
+
SelectionType: typeof SelectionType;
|
|
24
|
+
readonly headerHeight = 50;
|
|
25
|
+
readonly rowHeight = 50;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
filterValue: string;
|
|
28
|
+
oldOffsetY: number;
|
|
29
|
+
private isRdict;
|
|
30
|
+
private rdict;
|
|
31
|
+
private tableRdict;
|
|
32
|
+
private parentDict;
|
|
33
|
+
private readonly destroy$;
|
|
34
|
+
constructor(router: Router, translate: TranslateService, dialogServiceIonic: IonicDialogService, el: ElementRef, localFileService: LocalFileService);
|
|
35
|
+
ngOnInit(): Promise<void>;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
private initStandard;
|
|
38
|
+
private initRdict;
|
|
39
|
+
private getParentDict;
|
|
40
|
+
onScroll(offsetY: number): void;
|
|
41
|
+
ionViewWillEnter(): Promise<void>;
|
|
42
|
+
handleChange(event: any): Promise<void>;
|
|
43
|
+
handleRefresh(event: any): Promise<void>;
|
|
44
|
+
loadData(): void;
|
|
45
|
+
private loadDataStandard;
|
|
46
|
+
private loadDataRdict;
|
|
47
|
+
private loadDataViewRdict;
|
|
48
|
+
private onDeleteEventRdict;
|
|
49
|
+
private onChangeEventRdict;
|
|
50
|
+
getListLayout(): void;
|
|
51
|
+
getListLayoutStanderd(): void;
|
|
52
|
+
getListLayoutRdict(): void;
|
|
53
|
+
private setLayout;
|
|
54
|
+
private arrayToMap;
|
|
55
|
+
editHandler(args: any): void;
|
|
56
|
+
removeHandler(args: any): void;
|
|
57
|
+
protected delete(dataItem: any): void;
|
|
58
|
+
performDelete(id: any): void;
|
|
59
|
+
getCellValue(item: any, column: any): any;
|
|
60
|
+
onAdd(): void;
|
|
61
|
+
editModel(model: BaseModel): void;
|
|
62
|
+
deleteModel(model: any): void;
|
|
63
|
+
deleteEnabled(model: BaseModel): boolean;
|
|
64
|
+
private evaluateRule;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GenericIonicGridComponent, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericIonicGridComponent, "generic-ionic-grid", never, {}, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { GenericIonicCrudComponent } from './rsl-ionic-crud.component/rsl-ionic-crud.component';
|
|
2
2
|
export { RslIonicDataTableComponent } from "./rsl-ionic-data-table/rsl-ionic-data-table.component";
|
|
3
|
+
export { GenericIonicCrudPageComponent } from './generic-ionic-crud/generic-ionic-crud.component';
|
|
4
|
+
export { GenericIonicGridComponent } from './generic-ionic-grid/generic-ionic-grid.component';
|
|
3
5
|
export { RslIonicGridComponent } from './rsl-ionic-grid/rsl-ionic-grid.component';
|
|
4
6
|
export { RslIonicSmButtonsComponent } from './rsl-ionic-sm-buttons/ionic-sm-buttons.component';
|
package/package.json
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosoftlab/ionic",
|
|
3
|
-
"version": "1.0.5-alpha-
|
|
3
|
+
"version": "1.0.5-alpha-9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.8",
|
|
6
6
|
"@angular/core": "^19.2.8",
|
|
7
|
+
"@angular/forms": "^19.2.8",
|
|
8
|
+
"@angular/router": "^19.2.8",
|
|
7
9
|
"@ngx-formly/core": "^7.0.1",
|
|
10
|
+
"@ngx-formly/ionic": "^7.0.1",
|
|
11
|
+
"@ngx-translate/core": "^17.0.0",
|
|
8
12
|
"@ionic/angular": "~8.7.17",
|
|
9
13
|
"@swimlane/ngx-datatable": "^20.1.0",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
+
"json-logic-js": "^2.0.5",
|
|
15
|
+
"ngx-filesaver": "^19.0.0",
|
|
16
|
+
"rxjs": "~7.8.1",
|
|
17
|
+
"xlsx": "^0.18.5",
|
|
18
|
+
"@rosoftlab/core": "1.0.5-alpha-9",
|
|
19
|
+
"@rosoftlab/rdict": "1.0.5-alpha-9",
|
|
20
|
+
"@rosoftlab/formly": "1.0.5-alpha-9",
|
|
21
|
+
"@rosoftlab/statemachine": "1.0.5-alpha-9"
|
|
14
22
|
},
|
|
15
23
|
"dependencies": {
|
|
16
|
-
"tslib": "^2.
|
|
24
|
+
"tslib": "^2.8.0"
|
|
17
25
|
},
|
|
18
26
|
"sideEffects": false,
|
|
19
27
|
"author": "rosoftlab",
|
package/public-api.d.ts
CHANGED