@ecodev/natural 44.0.1 → 44.0.4
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/lib/classes/abstract-editable-list.mjs +1 -1
- package/esm2020/lib/classes/data-source.mjs +8 -14
- package/esm2020/lib/classes/utility.mjs +5 -1
- package/esm2020/lib/modules/avatar/service/md5.mjs +207 -0
- package/esm2020/lib/modules/avatar/sources/gravatar.mjs +4 -4
- package/esm2020/lib/modules/select/select/select.component.mjs +1 -1
- package/fesm2015/ecodev-natural.mjs +221 -17
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +221 -17
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/classes/abstract-editable-list.d.ts +2 -2
- package/lib/classes/data-source.d.ts +5 -11
- package/lib/classes/utility.d.ts +2 -0
- package/lib/modules/avatar/service/md5.d.ts +1 -0
- package/lib/modules/select/select/select.component.d.ts +1 -1
- package/package.json +8 -2
|
@@ -36,12 +36,12 @@ export declare class NaturalAbstractEditableList<TService extends NaturalAbstrac
|
|
|
36
36
|
/**
|
|
37
37
|
* Set the list of items (overwriting what may have existed)
|
|
38
38
|
*/
|
|
39
|
-
setItems(items: T[]): void;
|
|
39
|
+
setItems(items: readonly T[]): void;
|
|
40
40
|
/**
|
|
41
41
|
* Add given items to the list
|
|
42
42
|
* Reproduces the model data loading the same way as it would be on a detail page (via AbstractDetail controller) but without resolving
|
|
43
43
|
*/
|
|
44
|
-
addItems(items: T[]): void;
|
|
44
|
+
addItems(items: readonly T[]): void;
|
|
45
45
|
removeAt(index: number): void;
|
|
46
46
|
/**
|
|
47
47
|
* Add empty item at the end of the list
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data source to provide what data should be rendered in the table. The observable provided
|
|
3
|
-
* in connect should emit exactly the data that should be rendered by the table. If the data is
|
|
4
|
-
* altered, the observable should emit that new set of data on the stream. In our case here,
|
|
5
|
-
* we return a stream that contains only one set of data that doesn't change.
|
|
6
|
-
*/
|
|
7
1
|
import { DataSource } from '@angular/cdk/collections';
|
|
8
2
|
import { Observable } from 'rxjs';
|
|
9
3
|
import { Literal } from '../types/types';
|
|
10
4
|
export interface PaginatedData<T> {
|
|
11
|
-
items: T[];
|
|
12
|
-
offset?: number;
|
|
13
|
-
pageSize: number;
|
|
14
|
-
pageIndex: number;
|
|
15
|
-
length: number;
|
|
5
|
+
readonly items: readonly T[];
|
|
6
|
+
readonly offset?: number;
|
|
7
|
+
readonly pageSize: number;
|
|
8
|
+
readonly pageIndex: number;
|
|
9
|
+
readonly length: number;
|
|
16
10
|
}
|
|
17
11
|
/**
|
|
18
12
|
* A NaturalDataSource will connect immediately, in order to know as soon as possible if
|
package/lib/classes/utility.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Literal } from '../types/types';
|
|
2
|
+
import type { ReadonlyDeep } from 'type-fest';
|
|
2
3
|
/**
|
|
3
4
|
* Very basic formatting to get only date, without time and ignoring entirely the timezone
|
|
4
5
|
*
|
|
@@ -53,3 +54,4 @@ export declare function mergeOverrideArray(destValue: any, source: any): any;
|
|
|
53
54
|
* Accepts line breaks `\n` as textarea do.
|
|
54
55
|
*/
|
|
55
56
|
export declare function copyToClipboard(document: Document, text: string): void;
|
|
57
|
+
export declare function deepFreeze<T>(o: T): ReadonlyDeep<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function md5(string: string): string;
|
|
@@ -56,7 +56,7 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
56
56
|
/**
|
|
57
57
|
* Items returned by server to show in listing
|
|
58
58
|
*/
|
|
59
|
-
items: null | Observable<any[]>;
|
|
59
|
+
items: null | Observable<readonly any[]>;
|
|
60
60
|
/**
|
|
61
61
|
* Whether a we are searching something
|
|
62
62
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural",
|
|
3
|
-
"version": "44.0.
|
|
3
|
+
"version": "44.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:Ecodev/natural",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -19,14 +19,20 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"ts-md5": "^1.2.9",
|
|
23
22
|
"tslib": "^2.3.1"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
25
|
+
"@angular/animations": "^14.1.0",
|
|
26
|
+
"@angular/cdk": "^14.1.0",
|
|
26
27
|
"@angular/common": "^14.1.0",
|
|
27
28
|
"@angular/core": "^14.1.0",
|
|
29
|
+
"@angular/flex-layout": "^14.1.0",
|
|
30
|
+
"@angular/forms": "^14.1.0",
|
|
28
31
|
"@angular/localize": "^14.1.0",
|
|
29
32
|
"@angular/material": "^14.1.0",
|
|
33
|
+
"@angular/platform-browser": "^14.1.0",
|
|
34
|
+
"@angular/platform-browser-dynamic": "^14.1.0",
|
|
35
|
+
"@angular/router": "^14.1.0",
|
|
30
36
|
"apollo-angular": "^3.0.0",
|
|
31
37
|
"lodash-es": "^4.17.21",
|
|
32
38
|
"rxjs": "^7.4.0"
|