arlas-web-core 19.3.0-dev0 → 20.0.0-beta.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/index.d.ts +6 -0
- package/{src/index.ts → index.js} +4 -7
- package/index.js.map +1 -0
- package/models/collaboration.d.ts +29 -0
- package/{src/models/collaboration.ts → models/collaboration.js} +6 -30
- package/models/collaboration.js.map +1 -0
- package/models/contributor.d.ts +57 -0
- package/models/contributor.js +116 -0
- package/models/contributor.js.map +1 -0
- package/models/projections.d.ts +35 -0
- package/models/projections.js +38 -0
- package/models/projections.js.map +1 -0
- package/package.json +3 -9
- package/patches/url+0.11.0.patch +12 -0
- package/services/collaborativesearch.service.d.ts +353 -0
- package/{src/services/collaborativesearch.service.ts → services/collaborativesearch.service.js} +178 -366
- package/services/collaborativesearch.service.js.map +1 -0
- package/services/config.service.d.ts +31 -0
- package/{src/services/config.service.ts → services/config.service.js} +11 -15
- package/services/config.service.js.map +1 -0
- package/utils/utils.d.ts +22 -0
- package/utils/utils.js +63 -0
- package/utils/utils.js.map +1 -0
- package/.editorconfig +0 -13
- package/.gitlab-ci.yml +0 -19
- package/.travis.yml +0 -27
- package/CHANGELOG.md +0 -446
- package/CONTRIBUTING.md +0 -48
- package/LICENSE.txt +0 -201
- package/NOTICE.txt +0 -10
- package/README-NPM.md +0 -78
- package/README.md +0 -78
- package/arlas-web-core-19.3.0-dev0.tgz +0 -0
- package/build.sh +0 -9
- package/jsconfig.json +0 -13
- package/mkDocs.sh +0 -18
- package/package-release.json +0 -25
- package/release.sh +0 -429
- package/src/models/contributor.ts +0 -161
- package/src/models/projections.ts +0 -58
- package/src/utils/utils.ts +0 -80
- package/tsconfig-build.json +0 -21
- package/tsconfig.json +0 -15
- package/tslint.json +0 -116
package/src/utils/utils.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Licensed to Gisaïa under one or more contributor
|
|
3
|
-
* license agreements. See the NOTICE.txt file distributed with
|
|
4
|
-
* this work for additional information regarding copyright
|
|
5
|
-
* ownership. Gisaïa licenses this file to you under
|
|
6
|
-
* the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
-
* not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Get object or String value of an object from key
|
|
22
|
-
* sample usage: getObject(object,key1.key2)
|
|
23
|
-
* @param {object} datalayer - datalayer object
|
|
24
|
-
* @param {string} objectKey? - optional
|
|
25
|
-
* @returns {any} returns object by key or string value
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
export function getObject(datalayer: object, objectKey?: string): any {
|
|
29
|
-
// if datalayer doesn't exists, just return
|
|
30
|
-
if (!datalayer) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
// default return datalayer
|
|
34
|
-
let current = datalayer;
|
|
35
|
-
// check every layer
|
|
36
|
-
if (typeof objectKey === 'string') {
|
|
37
|
-
const numberOfObjectHierarchy = objectKey.match(/\./g).length;
|
|
38
|
-
for (let i = 1; i <= numberOfObjectHierarchy; i++) {
|
|
39
|
-
const currentKey = objectKey.split(/\./)[i];
|
|
40
|
-
if (typeof current[currentKey] === 'undefined') {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
current = current[currentKey];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return current;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** This interface will be used to get on which field to aggregate for a collection */
|
|
51
|
-
export interface CollectionAggField {
|
|
52
|
-
field?: string;
|
|
53
|
-
collectionName: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** checks if there is a common string in the given arrays */
|
|
57
|
-
export function hasAtLeastOneCommon(collections1: string[], collections2: string[]): boolean {
|
|
58
|
-
const cSet1 = new Set(collections1);
|
|
59
|
-
if (!!cSet1 && collections2) {
|
|
60
|
-
return collections2.filter(c => cSet1.has(c)).length > 0;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function fromEntries<T = any>(map: Map<string, T>): { [k: string]: T } {
|
|
66
|
-
|
|
67
|
-
const object = {};
|
|
68
|
-
if (!!map) {
|
|
69
|
-
map.forEach((v, k) => {
|
|
70
|
-
object[k] = v;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return object;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface CollectionCount {
|
|
77
|
-
count: number;
|
|
78
|
-
collection: string;
|
|
79
|
-
}
|
|
80
|
-
|
package/tsconfig-build.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compileOnSave": false,
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./dist/",
|
|
5
|
-
"baseUrl": "src",
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"target": "es6",
|
|
9
|
-
"module": "es2015",
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"emitDecoratorMetadata": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"stripInternal": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"typeRoots": ["node_modules/@types"],
|
|
16
|
-
"lib": ["es2015", "es6", "es2019", "dom"]
|
|
17
|
-
},
|
|
18
|
-
"files": ["src/index.ts"],
|
|
19
|
-
"include": ["src/**/*"],
|
|
20
|
-
"exclude": ["node_modules", "dist"]
|
|
21
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compileOnSave": false,
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./dist/",
|
|
5
|
-
"baseUrl": "src",
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"experimentalDecorators": true,
|
|
11
|
-
"target": "es6",
|
|
12
|
-
"typeRoots": ["node_modules/@types"],
|
|
13
|
-
"lib": ["es2016", "es2019", "dom"]
|
|
14
|
-
}
|
|
15
|
-
}
|
package/tslint.json
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rules": {
|
|
3
|
-
"arrow-return-shorthand": true,
|
|
4
|
-
"callable-types": true,
|
|
5
|
-
"class-name": true,
|
|
6
|
-
"comment-format": [
|
|
7
|
-
true,
|
|
8
|
-
"check-space"
|
|
9
|
-
],
|
|
10
|
-
"curly": true,
|
|
11
|
-
"eofline": true,
|
|
12
|
-
"forin": true,
|
|
13
|
-
"import-blacklist": [
|
|
14
|
-
true
|
|
15
|
-
],
|
|
16
|
-
"import-spacing": true,
|
|
17
|
-
"indent": [
|
|
18
|
-
true,
|
|
19
|
-
"spaces"
|
|
20
|
-
],
|
|
21
|
-
"interface-over-type-literal": true,
|
|
22
|
-
"label-position": true,
|
|
23
|
-
"max-line-length": [
|
|
24
|
-
true,
|
|
25
|
-
140
|
|
26
|
-
],
|
|
27
|
-
"member-access": true,
|
|
28
|
-
"member-ordering": [
|
|
29
|
-
true,
|
|
30
|
-
{
|
|
31
|
-
"order": [
|
|
32
|
-
"static-field",
|
|
33
|
-
"instance-field",
|
|
34
|
-
"constructor",
|
|
35
|
-
"public-instance-method",
|
|
36
|
-
"protected-instance-method",
|
|
37
|
-
"private-instance-method"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"no-arg": true,
|
|
42
|
-
"no-bitwise": true,
|
|
43
|
-
"no-console": [
|
|
44
|
-
true,
|
|
45
|
-
"debug",
|
|
46
|
-
"info",
|
|
47
|
-
"time",
|
|
48
|
-
"timeEnd",
|
|
49
|
-
"trace"
|
|
50
|
-
],
|
|
51
|
-
"no-construct": true,
|
|
52
|
-
"no-debugger": true,
|
|
53
|
-
"no-duplicate-super": true,
|
|
54
|
-
"no-duplicate-variable": true,
|
|
55
|
-
"no-empty": false,
|
|
56
|
-
"no-empty-interface": true,
|
|
57
|
-
"no-eval": true,
|
|
58
|
-
"no-internal-module": true,
|
|
59
|
-
"no-inferrable-types": [
|
|
60
|
-
true,
|
|
61
|
-
"ignore-params"
|
|
62
|
-
],
|
|
63
|
-
"no-misused-new": true,
|
|
64
|
-
"no-non-null-assertion": true,
|
|
65
|
-
"no-shadowed-variable": true,
|
|
66
|
-
"no-string-literal": false,
|
|
67
|
-
"no-string-throw": true,
|
|
68
|
-
"no-switch-case-fall-through": true,
|
|
69
|
-
"no-trailing-whitespace": true,
|
|
70
|
-
"no-unnecessary-initializer": true,
|
|
71
|
-
"no-unused-expression": true,
|
|
72
|
-
"no-var-keyword": true,
|
|
73
|
-
"object-literal-sort-keys": false,
|
|
74
|
-
"one-line": [
|
|
75
|
-
true,
|
|
76
|
-
"check-open-brace",
|
|
77
|
-
"check-catch",
|
|
78
|
-
"check-else",
|
|
79
|
-
"check-whitespace"
|
|
80
|
-
],
|
|
81
|
-
"prefer-const": true,
|
|
82
|
-
"quotemark": [
|
|
83
|
-
true,
|
|
84
|
-
"single"
|
|
85
|
-
],
|
|
86
|
-
"radix": true,
|
|
87
|
-
"semicolon": true,
|
|
88
|
-
"triple-equals": [
|
|
89
|
-
true,
|
|
90
|
-
"allow-null-check"
|
|
91
|
-
],
|
|
92
|
-
"typedef-whitespace": [
|
|
93
|
-
true,
|
|
94
|
-
{
|
|
95
|
-
"call-signature": "nospace",
|
|
96
|
-
"index-signature": "nospace",
|
|
97
|
-
"parameter": "nospace",
|
|
98
|
-
"property-declaration": "nospace",
|
|
99
|
-
"variable-declaration": "nospace"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"unified-signatures": true,
|
|
103
|
-
"variable-name": [
|
|
104
|
-
true,
|
|
105
|
-
"ban-keywords"
|
|
106
|
-
],
|
|
107
|
-
"whitespace": [
|
|
108
|
-
true,
|
|
109
|
-
"check-branch",
|
|
110
|
-
"check-decl",
|
|
111
|
-
"check-operator",
|
|
112
|
-
"check-separator",
|
|
113
|
-
"check-type"
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
}
|