@sumaris-net/ngx-components 2.0.0-rc44 → 2.0.0-rc46
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/esm2020/src/app/core/form/text-popover/text-popover.component.mjs +11 -1
- package/esm2020/src/app/core/table/entities-table-datasource.class.mjs +2 -1
- package/esm2020/src/app/shared/image/gallery/image-gallery.component.mjs +119 -59
- package/esm2020/src/app/shared/image/gallery/image-gallery.module.mjs +15 -3
- package/esm2020/src/app/shared/image/gallery/testing/gallery.testing.mjs +10 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +177 -103
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +175 -98
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/text-popover/text-popover.component.d.ts +3 -1
- package/src/app/core/table/entities-table-datasource.class.d.ts +1 -0
- package/src/app/shared/image/gallery/image-gallery.component.d.ts +31 -16
- package/src/app/shared/image/gallery/image-gallery.module.d.ts +6 -4
- package/src/app/shared/image/gallery/testing/gallery.testing.d.ts +1 -0
- package/src/assets/i18n/fr.json +3 -1
- package/src/theme/_ngx-components.scss +3 -3
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { PopoverController } from '@ionic/angular';
|
|
2
|
+
import { PopoverController, PopoverOptions } from '@ionic/angular';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import { TextForm } from './text-form.component';
|
|
6
6
|
import { ValidatorFn } from '@angular/forms';
|
|
7
|
+
import { OverlayEventDetail } from '@ionic/core';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export interface TextPopoverOptions {
|
|
9
10
|
text?: string;
|
|
@@ -17,6 +18,7 @@ export interface TextPopoverOptions {
|
|
|
17
18
|
export declare class TextPopover implements OnInit, AfterViewInit, OnDestroy, TextPopoverOptions {
|
|
18
19
|
protected popoverController: PopoverController;
|
|
19
20
|
protected translate: TranslateService;
|
|
21
|
+
static show(ctrl: PopoverController, event: Event, opts: TextPopoverOptions, popoverOpts?: PopoverOptions): Promise<OverlayEventDetail>;
|
|
20
22
|
form: TextForm;
|
|
21
23
|
text: string;
|
|
22
24
|
placeholder: string;
|
|
@@ -9,6 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
export interface EntitiesTableDataSourceConfig<T extends Entity<T, ID>, ID = number, WO extends EntitiesServiceWatchOptions = EntitiesServiceWatchOptions, SO = any> extends TableDataSourceConfig {
|
|
10
10
|
onRowCreated?: (row: TableElement<T>) => Promise<void> | void;
|
|
11
11
|
saveOnlyDirtyRows?: boolean;
|
|
12
|
+
saveBeforeDelete?: boolean;
|
|
12
13
|
readOnly?: boolean;
|
|
13
14
|
/**
|
|
14
15
|
* @deprecated
|
|
@@ -4,15 +4,19 @@ import { TableDataSource, TableElement } from '@e-is/ngx-material-table';
|
|
|
4
4
|
import { Environment } from '../../../../environments/environment.class';
|
|
5
5
|
import { ImageService } from '../image.service';
|
|
6
6
|
import { Image } from '../image.model';
|
|
7
|
-
import { AlertController, IonModal, IonSlides, Platform } from '@ionic/angular';
|
|
7
|
+
import { AlertController, IonModal, IonPopover, IonSlides, Platform, PopoverController } from '@ionic/angular';
|
|
8
8
|
import { CollectionViewer, ListRange } from '@angular/cdk/collections';
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
|
+
import { AppColors } from '../../types';
|
|
11
|
+
import { FormGroup } from '@angular/forms';
|
|
12
|
+
import { EventEmitter } from '@angular/core';
|
|
10
13
|
import * as i0 from "@angular/core";
|
|
11
14
|
export declare type GalleryMode = 'mosaic' | 'list';
|
|
12
15
|
export declare class AppImageGalleryComponent<T extends Image> implements OnInit, OnDestroy, CollectionViewer, AfterContentChecked {
|
|
13
16
|
protected image: ImageService;
|
|
14
17
|
protected platform: Platform;
|
|
15
18
|
protected alterCtrl: AlertController;
|
|
19
|
+
protected popoverCtrl: PopoverController;
|
|
16
20
|
protected translate: TranslateService;
|
|
17
21
|
protected cd: ChangeDetectorRef;
|
|
18
22
|
protected _destroySubject: Subject<void>;
|
|
@@ -23,55 +27,66 @@ export declare class AppImageGalleryComponent<T extends Image> implements OnInit
|
|
|
23
27
|
protected _colSize: number;
|
|
24
28
|
protected _selectedRowIndex: number;
|
|
25
29
|
protected _presentingElement: Element;
|
|
30
|
+
protected _titleForm: FormGroup;
|
|
31
|
+
protected _titleAutofocus: boolean;
|
|
26
32
|
zoomActive: boolean;
|
|
27
33
|
zoomScale: number;
|
|
28
34
|
sliderOpts: {
|
|
29
35
|
allowSlidePrev: boolean;
|
|
30
36
|
allowSlideNext: boolean;
|
|
31
|
-
zoom:
|
|
32
|
-
maxRatio: number;
|
|
33
|
-
};
|
|
34
|
-
on: {
|
|
35
|
-
zoomChange: (scale: any, imageEl: any, slideEl: any) => void;
|
|
36
|
-
};
|
|
37
|
+
zoom: boolean;
|
|
37
38
|
};
|
|
38
39
|
modalSliderOpts: {
|
|
39
40
|
zoom: boolean;
|
|
40
41
|
};
|
|
41
42
|
viewChange: BehaviorSubject<ListRange>;
|
|
42
43
|
debug: boolean;
|
|
43
|
-
readOnly: boolean;
|
|
44
44
|
disabled: boolean;
|
|
45
|
-
|
|
45
|
+
readOnly: boolean;
|
|
46
46
|
mobile: boolean;
|
|
47
47
|
mode: GalleryMode;
|
|
48
48
|
confirmBeforeDelete: boolean;
|
|
49
|
+
showToolbar: boolean;
|
|
49
50
|
showFabButton: boolean;
|
|
51
|
+
showTitle: boolean;
|
|
52
|
+
showAddCardButton: boolean;
|
|
53
|
+
addButtonColor: AppColors;
|
|
50
54
|
set dataSource(dataSource: TableDataSource<T>);
|
|
51
55
|
get dataSource(): TableDataSource<T>;
|
|
52
56
|
get enabled(): boolean;
|
|
53
57
|
get rows(): TableElement<T>[];
|
|
54
|
-
slides: IonSlides;
|
|
55
58
|
zoomModal: IonModal;
|
|
56
|
-
|
|
59
|
+
titlePopover: IonPopover;
|
|
60
|
+
onBeforeDeleteRows: EventEmitter<import("../../events").PromiseEvent<boolean, {
|
|
61
|
+
rows: TableElement<T>[];
|
|
62
|
+
}>>;
|
|
63
|
+
onAfterAddRows: EventEmitter<TableElement<T>[]>;
|
|
64
|
+
constructor(image: ImageService, platform: Platform, alterCtrl: AlertController, popoverCtrl: PopoverController, translate: TranslateService, cd: ChangeDetectorRef, environment?: Environment);
|
|
57
65
|
ngOnInit(): void;
|
|
58
66
|
ngAfterContentChecked(): void;
|
|
59
67
|
ngOnDestroy(): void;
|
|
60
68
|
add(event?: Event): Promise<void>;
|
|
61
|
-
delete(event: Event, row: TableElement<T
|
|
69
|
+
delete(event: Event, row: TableElement<T>, opts?: {
|
|
70
|
+
interactive?: boolean;
|
|
71
|
+
}): Promise<boolean>;
|
|
62
72
|
toggleViewMode(event?: Event): void;
|
|
63
73
|
trackByFn(index: number, row: TableElement<T>): number;
|
|
74
|
+
editTitle(event: MouseEvent, row: TableElement<T>, cardToolbar: any): Promise<void>;
|
|
75
|
+
protected showCardToolbar(cardToolbar: any): void;
|
|
76
|
+
protected hideCardToolbar(cardToolbar: any): void;
|
|
64
77
|
protected _switchDataSource(dataSource: TableDataSource<T>): void;
|
|
65
78
|
protected _observeRenderChanges(): void;
|
|
66
79
|
protected getTableUnknownDataSourceError(): Error;
|
|
67
|
-
protected touchStart(card: any): void;
|
|
68
|
-
protected touchEnd(card: any): Promise<void>;
|
|
69
80
|
protected clickRow(row: TableElement<T>, index: number): Promise<void>;
|
|
70
81
|
protected initModalSlides(slides: IonSlides): Promise<void>;
|
|
71
82
|
protected zoom(slides: IonSlides, zoomIn: boolean): Promise<void>;
|
|
72
83
|
protected deleteFromModal(event: any, slides: IonSlides): Promise<boolean>;
|
|
73
84
|
protected slidePrev(slides: IonSlides): Promise<void>;
|
|
74
85
|
protected slideNext(slides: IonSlides): Promise<void>;
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
protected canDeleteRows(rows: TableElement<T>[], opts?: {
|
|
87
|
+
interactive?: boolean;
|
|
88
|
+
}): Promise<boolean>;
|
|
89
|
+
protected markForCheck(): void;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppImageGalleryComponent<any>, [null, null, null, null, null, null, { optional: true; }]>;
|
|
91
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppImageGalleryComponent<any>, "app-image-gallery", never, { "debug": "debug"; "disabled": "disabled"; "readOnly": "readOnly"; "mobile": "mobile"; "mode": "mode"; "confirmBeforeDelete": "confirmBeforeDelete"; "showToolbar": "showToolbar"; "showFabButton": "showFabButton"; "showTitle": "showTitle"; "showAddCardButton": "showAddCardButton"; "addButtonColor": "addButtonColor"; "dataSource": "dataSource"; }, { "onBeforeDeleteRows": "onBeforeDeleteRows"; "onAfterAddRows": "onAfterAddRows"; }, never, never, false>;
|
|
77
92
|
}
|
|
@@ -2,11 +2,13 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./image-gallery.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@ionic/angular";
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "../../
|
|
7
|
-
import * as i6 from "
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "../../material/material.module";
|
|
7
|
+
import * as i6 from "../../pipes/pipes.module";
|
|
8
|
+
import * as i7 from "../../directives/directives.module";
|
|
9
|
+
import * as i8 from "@ngx-translate/core";
|
|
8
10
|
export declare class ImageGalleryModule {
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImageGalleryModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ImageGalleryModule, [typeof i1.AppImageGalleryComponent], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ImageGalleryModule, [typeof i1.AppImageGalleryComponent], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ReactiveFormsModule, typeof i5.SharedMaterialModule, typeof i6.SharedPipesModule, typeof i7.SharedDirectivesModule, typeof i8.TranslateModule], [typeof i3.IonicModule, typeof i8.TranslateModule, typeof i1.AppImageGalleryComponent]>;
|
|
11
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<ImageGalleryModule>;
|
|
12
14
|
}
|
|
@@ -10,6 +10,7 @@ export declare class GalleryTestPage implements OnInit, OnDestroy {
|
|
|
10
10
|
constructor(dataService: ImageAttachmentService);
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
ngOnDestroy(): void;
|
|
13
|
+
save(): void;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<GalleryTestPage, never>;
|
|
14
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<GalleryTestPage, "app-gallery-test-page", never, {}, {}, never, never, false>;
|
|
15
16
|
}
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -454,7 +454,9 @@
|
|
|
454
454
|
"BTN_CAMERA_SOURCE": "Prendre une photo",
|
|
455
455
|
"BTN_GALLERY_SOURCE": "Ouvrir la galerie",
|
|
456
456
|
"GALLERY": {
|
|
457
|
-
"
|
|
457
|
+
"BTN_EDIT_TITLE": "Éditer le titre",
|
|
458
|
+
"BTN_ADD_TITLE": "Ajouter un titre",
|
|
459
|
+
"TITLE": "Titre"
|
|
458
460
|
}
|
|
459
461
|
},
|
|
460
462
|
"ERROR": {
|
|
@@ -1260,9 +1260,9 @@ ion-modal.stack-modal {
|
|
|
1260
1260
|
--backdrop-opacity: var(--ion-backdrop-opacity, 0.32);
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
|
-
.modal-large
|
|
1264
|
-
min-
|
|
1265
|
-
min-
|
|
1263
|
+
ion-modal.modal-large{
|
|
1264
|
+
--min-height: calc(100% - 50px) !important;
|
|
1265
|
+
--min-width: calc(100% - 100px) !important;
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
1268
1268
|
// --------------------------------------------------
|