@sumaris-net/ngx-components 1.0.8 → 1.1.1
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/bundles/sumaris-net.ngx-components.umd.js +104 -52
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/editor.class.js +4 -2
- package/esm2015/src/app/core/form/entity-editor.class.js +1 -1
- package/esm2015/src/app/core/form/form.utils.js +2 -2
- package/esm2015/src/app/core/graphql/graphql.service.js +2 -2
- package/esm2015/src/app/core/services/account.service.js +2 -2
- package/esm2015/src/app/core/services/base-graphql-service.class.js +3 -3
- package/esm2015/src/app/core/services/local-settings.service.js +5 -3
- package/esm2015/src/app/core/services/model/config.model.js +2 -2
- package/esm2015/src/app/core/services/model/entity.model.js +2 -2
- package/esm2015/src/app/core/services/pipes/department-to-string.pipe.js +2 -2
- package/esm2015/src/app/core/services/storage/entity-store.class.js +3 -3
- package/esm2015/src/app/shared/dates.js +9 -1
- package/esm2015/src/app/shared/form/field.component.js +2 -2
- package/esm2015/src/app/shared/functions.js +1 -1
- package/esm2015/src/app/shared/pipes/form.pipes.js +56 -5
- package/esm2015/src/app/shared/pipes/translate-context.pipe.js +7 -28
- package/esm2015/src/app/shared/shared-routing.module.js +21 -11
- package/fesm2015/sumaris-net.ngx-components.js +103 -52
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +3 -1
- package/src/app/shared/pipes/form.pipes.d.ts +14 -3
- package/src/app/shared/pipes/translate-context.pipe.d.ts +2 -7
- package/src/app/shared/shared-routing.module.d.ts +7 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Duration, Moment } from 'moment';
|
|
1
|
+
import { Duration, Moment, unitOfTime } from 'moment';
|
|
2
2
|
export declare const DATE_UNIX_TIMESTAMP = "X";
|
|
3
3
|
export declare const DATE_UNIX_MS_TIMESTAMP = "x";
|
|
4
4
|
export declare class DateUtils {
|
|
@@ -7,6 +7,8 @@ export declare class DateUtils {
|
|
|
7
7
|
toDuration: typeof toDuration;
|
|
8
8
|
static min(date1: Moment, date2: Moment): Moment;
|
|
9
9
|
static max(date1: Moment, date2: Moment): Moment;
|
|
10
|
+
static equals(date1: Moment | string, date2: Moment | string): boolean;
|
|
11
|
+
static isSame(date1: Moment | string, date2: Moment | string, granularity?: unitOfTime.StartOf): boolean;
|
|
10
12
|
}
|
|
11
13
|
export declare function toDateISOString(value: any): string | undefined;
|
|
12
14
|
export declare function fromDateISOString(value: any): Moment | undefined;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { FormErrorTranslator, FormErrorTranslatorOptions } from '../validator/form-error-adapter.class';
|
|
4
|
-
export declare class FormErrorTranslatePipe implements PipeTransform {
|
|
4
|
+
export declare class FormErrorTranslatePipe implements PipeTransform, OnDestroy {
|
|
5
5
|
private adapter;
|
|
6
|
-
|
|
6
|
+
private _ref;
|
|
7
|
+
value: string;
|
|
8
|
+
private _lastForm;
|
|
9
|
+
private _lastOptions;
|
|
10
|
+
private _onFormStatusChange;
|
|
11
|
+
constructor(adapter: FormErrorTranslator, _ref: ChangeDetectorRef);
|
|
7
12
|
transform(form: FormGroup, opts?: FormErrorTranslatorOptions): string;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
private _updateValue;
|
|
15
|
+
/**
|
|
16
|
+
* Clean any existing subscription to change events
|
|
17
|
+
*/
|
|
18
|
+
private _dispose;
|
|
8
19
|
}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { TranslateContextService } from '../services/translate-context.service';
|
|
3
3
|
export declare class TranslateContextPipe implements PipeTransform {
|
|
4
4
|
private translate;
|
|
5
|
-
|
|
6
|
-
value: string;
|
|
7
|
-
lastKey: string | null;
|
|
8
|
-
lastSuffix: string | null;
|
|
9
|
-
lastParams: any[];
|
|
10
|
-
constructor(translate: TranslateContextService, _ref: ChangeDetectorRef);
|
|
5
|
+
constructor(translate: TranslateContextService);
|
|
11
6
|
transform(query: string, ...params: any[]): string;
|
|
12
7
|
}
|
|
13
8
|
export declare class TranslatablePipe implements PipeTransform {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
2
2
|
import { IonicRouteStrategy } from '@ionic/angular';
|
|
3
3
|
export declare class CustomReuseStrategy extends IonicRouteStrategy {
|
|
4
|
+
/**
|
|
5
|
+
* Force to reuse the route when:
|
|
6
|
+
* - path change from [/new] -> [/:id]
|
|
7
|
+
* - or path change from [/new] -> [/new?id=:id]
|
|
8
|
+
* @param future
|
|
9
|
+
* @param curr
|
|
10
|
+
*/
|
|
4
11
|
shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
|
|
5
12
|
}
|
|
6
13
|
export declare class SharedRoutingModule {
|