@dotcms/client 0.0.1-alpha.2 → 0.0.1-alpha.21
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/README.md +0 -1
- package/package.json +4 -1
- package/src/index.d.ts +6 -2
- package/src/index.js +6 -2
- package/src/index.js.map +1 -1
- package/src/lib/client/content/builders/collection/collection.d.ts +148 -0
- package/src/lib/client/content/builders/collection/collection.js +264 -0
- package/src/lib/client/content/builders/collection/collection.js.map +1 -0
- package/src/lib/client/content/content-api.d.ts +78 -0
- package/src/lib/client/content/content-api.js +87 -0
- package/src/lib/client/content/content-api.js.map +1 -0
- package/src/lib/client/content/shared/const.d.ts +3 -0
- package/src/lib/client/content/shared/const.js +5 -0
- package/src/lib/client/content/shared/const.js.map +1 -0
- package/src/lib/client/content/shared/types.d.ts +62 -0
- package/src/lib/client/content/shared/types.js +2 -0
- package/src/lib/client/content/shared/types.js.map +1 -0
- package/src/lib/client/content/shared/utils.d.ts +12 -0
- package/src/lib/client/content/shared/utils.js +20 -0
- package/src/lib/client/content/shared/utils.js.map +1 -0
- package/src/lib/client/models/index.d.ts +1 -0
- package/src/lib/client/models/index.js +9 -0
- package/src/lib/client/models/index.js.map +1 -0
- package/src/lib/{sdk-js-client.d.ts → client/sdk-js-client.d.ts} +11 -2
- package/src/lib/{sdk-js-client.js → client/sdk-js-client.js} +14 -0
- package/src/lib/client/sdk-js-client.js.map +1 -0
- package/src/lib/editor/listeners/listeners.d.ts +46 -0
- package/src/lib/editor/listeners/listeners.js +198 -0
- package/src/lib/editor/listeners/listeners.js.map +1 -0
- package/src/lib/{postMessageToEditor.d.ts → editor/models/client.model.d.ts} +26 -1
- package/src/lib/editor/models/client.model.js +62 -0
- package/src/lib/editor/models/client.model.js.map +1 -0
- package/src/lib/editor/models/editor.model.d.ts +16 -0
- package/src/lib/editor/models/editor.model.js +2 -0
- package/src/lib/editor/models/editor.model.js.map +1 -0
- package/src/lib/editor/models/listeners.model.d.ts +47 -0
- package/src/lib/editor/models/listeners.model.js +26 -0
- package/src/lib/editor/models/listeners.model.js.map +1 -0
- package/src/lib/editor/sdk-editor-vtl.d.ts +6 -0
- package/src/lib/editor/sdk-editor-vtl.js +21 -0
- package/src/lib/editor/sdk-editor-vtl.js.map +1 -0
- package/src/lib/editor/sdk-editor.d.ts +29 -0
- package/src/lib/editor/sdk-editor.js +68 -0
- package/src/lib/editor/sdk-editor.js.map +1 -0
- package/src/lib/editor/utils/editor.utils.d.ts +83 -0
- package/src/lib/editor/utils/editor.utils.js +134 -0
- package/src/lib/editor/utils/editor.utils.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/Equals.d.ts +83 -0
- package/src/lib/query-builder/lucene-syntax/Equals.js +101 -0
- package/src/lib/query-builder/lucene-syntax/Equals.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/Field.d.ts +23 -0
- package/src/lib/query-builder/lucene-syntax/Field.js +31 -0
- package/src/lib/query-builder/lucene-syntax/Field.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/NotOperand.d.ts +22 -0
- package/src/lib/query-builder/lucene-syntax/NotOperand.js +30 -0
- package/src/lib/query-builder/lucene-syntax/NotOperand.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/Operand.d.ts +44 -0
- package/src/lib/query-builder/lucene-syntax/Operand.js +55 -0
- package/src/lib/query-builder/lucene-syntax/Operand.js.map +1 -0
- package/src/lib/query-builder/lucene-syntax/index.d.ts +4 -0
- package/src/lib/query-builder/lucene-syntax/index.js +5 -0
- package/src/lib/query-builder/lucene-syntax/index.js.map +1 -0
- package/src/lib/query-builder/sdk-query-builder.d.ts +42 -0
- package/src/lib/query-builder/sdk-query-builder.js +54 -0
- package/src/lib/query-builder/sdk-query-builder.js.map +1 -0
- package/src/lib/query-builder/utils/index.d.ts +91 -0
- package/src/lib/query-builder/utils/index.js +115 -0
- package/src/lib/query-builder/utils/index.js.map +1 -0
- package/src/lib/utils/graphql/transforms.d.ts +12 -0
- package/src/lib/utils/graphql/transforms.js +47 -0
- package/src/lib/utils/graphql/transforms.js.map +1 -0
- package/src/lib/utils/index.d.ts +2 -0
- package/src/lib/utils/index.js +3 -0
- package/src/lib/utils/index.js.map +1 -0
- package/src/lib/utils/page/common-utils.d.ts +14 -0
- package/src/lib/utils/page/common-utils.js +12 -0
- package/src/lib/utils/page/common-utils.js.map +1 -0
- package/src/lib/postMessageToEditor.js +0 -37
- package/src/lib/postMessageToEditor.js.map +0 -1
- package/src/lib/sdk-js-client.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var _NotOperand_query;
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
+
import { buildEquals } from '../utils';
|
|
4
|
+
/**
|
|
5
|
+
* 'NotOperand' Is a Typescript class that provides the ability to use the NOT operand in the lucene query string.
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class NotOperand
|
|
9
|
+
*/
|
|
10
|
+
export class NotOperand {
|
|
11
|
+
constructor(query) {
|
|
12
|
+
this.query = query;
|
|
13
|
+
_NotOperand_query.set(this, '');
|
|
14
|
+
__classPrivateFieldSet(this, _NotOperand_query, this.query, "f");
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This method appends to the query a term that should be included in the search.
|
|
18
|
+
*
|
|
19
|
+
* Ex: myValue or "My value"
|
|
20
|
+
*
|
|
21
|
+
* @param {string} term - The term that should be included in the search.
|
|
22
|
+
* @return {*} {Equals} - An instance of Equals.
|
|
23
|
+
* @memberof NotOperand
|
|
24
|
+
*/
|
|
25
|
+
equals(term) {
|
|
26
|
+
return buildEquals(__classPrivateFieldGet(this, _NotOperand_query, "f"), term);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_NotOperand_query = new WeakMap();
|
|
30
|
+
//# sourceMappingURL=NotOperand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotOperand.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/NotOperand.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IAGnB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,4BAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,qBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,yBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Equals } from './Equals';
|
|
2
|
+
import { Field } from './Field';
|
|
3
|
+
/**
|
|
4
|
+
* 'Operand' Is a Typescript class that provides the ability to use operands in the lucene query string.}
|
|
5
|
+
* An operand is a logical operator used to join two or more conditions in a query.
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class Operand
|
|
9
|
+
*/
|
|
10
|
+
export declare class Operand {
|
|
11
|
+
#private;
|
|
12
|
+
private query;
|
|
13
|
+
constructor(query: string);
|
|
14
|
+
/**
|
|
15
|
+
* This method appends to the query a term that should be excluded in the search.
|
|
16
|
+
*
|
|
17
|
+
* Ex: "-myValue"
|
|
18
|
+
*
|
|
19
|
+
* @param {string} field - The field that should be excluded in the search.
|
|
20
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
21
|
+
* @memberof Operand
|
|
22
|
+
*/
|
|
23
|
+
excludeField(field: string): Field;
|
|
24
|
+
/**
|
|
25
|
+
* This method appends to the query a field that should be included in the search.
|
|
26
|
+
*
|
|
27
|
+
* Ex: "+myField:"
|
|
28
|
+
*
|
|
29
|
+
* @param {string} field - The field that should be included in the search.
|
|
30
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
31
|
+
* @memberof Operand
|
|
32
|
+
*/
|
|
33
|
+
field(field: string): Field;
|
|
34
|
+
/**
|
|
35
|
+
* This method appends to the query a term that should be included in the search.
|
|
36
|
+
*
|
|
37
|
+
* Ex: myValue or "My value"
|
|
38
|
+
*
|
|
39
|
+
* @param {string} term - The term that should be included in the search.
|
|
40
|
+
* @return {*} {Equals} - An instance of Equals.
|
|
41
|
+
* @memberof Operand
|
|
42
|
+
*/
|
|
43
|
+
equals(term: string): Equals;
|
|
44
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var _Operand_query;
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
+
import { buildExcludeField, buildField, buildEquals } from '../utils';
|
|
4
|
+
/**
|
|
5
|
+
* 'Operand' Is a Typescript class that provides the ability to use operands in the lucene query string.}
|
|
6
|
+
* An operand is a logical operator used to join two or more conditions in a query.
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @class Operand
|
|
10
|
+
*/
|
|
11
|
+
export class Operand {
|
|
12
|
+
constructor(query) {
|
|
13
|
+
this.query = query;
|
|
14
|
+
_Operand_query.set(this, '');
|
|
15
|
+
__classPrivateFieldSet(this, _Operand_query, this.query, "f");
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This method appends to the query a term that should be excluded in the search.
|
|
19
|
+
*
|
|
20
|
+
* Ex: "-myValue"
|
|
21
|
+
*
|
|
22
|
+
* @param {string} field - The field that should be excluded in the search.
|
|
23
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
24
|
+
* @memberof Operand
|
|
25
|
+
*/
|
|
26
|
+
excludeField(field) {
|
|
27
|
+
return buildExcludeField(__classPrivateFieldGet(this, _Operand_query, "f"), field);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This method appends to the query a field that should be included in the search.
|
|
31
|
+
*
|
|
32
|
+
* Ex: "+myField:"
|
|
33
|
+
*
|
|
34
|
+
* @param {string} field - The field that should be included in the search.
|
|
35
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
36
|
+
* @memberof Operand
|
|
37
|
+
*/
|
|
38
|
+
field(field) {
|
|
39
|
+
return buildField(__classPrivateFieldGet(this, _Operand_query, "f"), field);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This method appends to the query a term that should be included in the search.
|
|
43
|
+
*
|
|
44
|
+
* Ex: myValue or "My value"
|
|
45
|
+
*
|
|
46
|
+
* @param {string} term - The term that should be included in the search.
|
|
47
|
+
* @return {*} {Equals} - An instance of Equals.
|
|
48
|
+
* @memberof Operand
|
|
49
|
+
*/
|
|
50
|
+
equals(term) {
|
|
51
|
+
return buildEquals(__classPrivateFieldGet(this, _Operand_query, "f"), term);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_Operand_query = new WeakMap();
|
|
55
|
+
//# sourceMappingURL=Operand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Operand.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/Operand.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,OAAO,OAAO;IAGhB,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAFjC,yBAAS,EAAE,EAAC;QAGR,uBAAA,IAAI,kBAAU,IAAI,CAAC,KAAK,MAAA,CAAC;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,sBAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY;QACf,OAAO,WAAW,CAAC,uBAAA,IAAI,sBAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/lucene-syntax/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Equals, Field } from './lucene-syntax/index';
|
|
2
|
+
/**
|
|
3
|
+
* 'QueryBuilder' Is a Typescript class that provides the ability to build a query string using the Lucene syntax in a more readable way.
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class QueryBuilder
|
|
7
|
+
*/
|
|
8
|
+
export declare class QueryBuilder {
|
|
9
|
+
#private;
|
|
10
|
+
/**
|
|
11
|
+
* This method appends to the query a field that should be included in the search.
|
|
12
|
+
*
|
|
13
|
+
* Ex: "+myField:"
|
|
14
|
+
*
|
|
15
|
+
* @param {string} field - The field that should be included in the search.
|
|
16
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
17
|
+
* @memberof QueryBuilder
|
|
18
|
+
*/
|
|
19
|
+
field(field: string): Field;
|
|
20
|
+
/**
|
|
21
|
+
* This method appends to the query a field that should be excluded from the search.
|
|
22
|
+
*
|
|
23
|
+
* Ex: "-myField:"
|
|
24
|
+
*
|
|
25
|
+
* @param {string} field - The field that should be excluded from the search.
|
|
26
|
+
* @return {*} {Field} - An instance of a Lucene Exclude Field. An exclude field is a key used to exclude for a specific value in a document.
|
|
27
|
+
* @memberof QueryBuilder
|
|
28
|
+
*/
|
|
29
|
+
excludeField(field: string): Field;
|
|
30
|
+
/**
|
|
31
|
+
* This method allows to pass a raw query string to the query builder.
|
|
32
|
+
* This raw query should end in Equals.
|
|
33
|
+
* This method is useful when you want to append a complex query or an already written query to the query builder.
|
|
34
|
+
*
|
|
35
|
+
* Ex: "+myField: value AND (someOtherValue OR anotherValue)"
|
|
36
|
+
*
|
|
37
|
+
* @param {string} query - A raw query string.
|
|
38
|
+
* @return {*} {Equals} - An instance of Equals. A term is a value used to search for a specific value in a document.
|
|
39
|
+
* @memberof QueryBuilder
|
|
40
|
+
*/
|
|
41
|
+
raw(query: string): Equals;
|
|
42
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _QueryBuilder_query;
|
|
2
|
+
import { __classPrivateFieldGet } from "tslib";
|
|
3
|
+
import { buildExcludeField, buildField, buildRawEquals } from './utils';
|
|
4
|
+
/**
|
|
5
|
+
* 'QueryBuilder' Is a Typescript class that provides the ability to build a query string using the Lucene syntax in a more readable way.
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class QueryBuilder
|
|
9
|
+
*/
|
|
10
|
+
export class QueryBuilder {
|
|
11
|
+
constructor() {
|
|
12
|
+
_QueryBuilder_query.set(this, '');
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This method appends to the query a field that should be included in the search.
|
|
16
|
+
*
|
|
17
|
+
* Ex: "+myField:"
|
|
18
|
+
*
|
|
19
|
+
* @param {string} field - The field that should be included in the search.
|
|
20
|
+
* @return {*} {Field} - An instance of a Lucene Field. A field is a key used to search for a specific value in a document.
|
|
21
|
+
* @memberof QueryBuilder
|
|
22
|
+
*/
|
|
23
|
+
field(field) {
|
|
24
|
+
return buildField(__classPrivateFieldGet(this, _QueryBuilder_query, "f"), field);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This method appends to the query a field that should be excluded from the search.
|
|
28
|
+
*
|
|
29
|
+
* Ex: "-myField:"
|
|
30
|
+
*
|
|
31
|
+
* @param {string} field - The field that should be excluded from the search.
|
|
32
|
+
* @return {*} {Field} - An instance of a Lucene Exclude Field. An exclude field is a key used to exclude for a specific value in a document.
|
|
33
|
+
* @memberof QueryBuilder
|
|
34
|
+
*/
|
|
35
|
+
excludeField(field) {
|
|
36
|
+
return buildExcludeField(__classPrivateFieldGet(this, _QueryBuilder_query, "f"), field);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* This method allows to pass a raw query string to the query builder.
|
|
40
|
+
* This raw query should end in Equals.
|
|
41
|
+
* This method is useful when you want to append a complex query or an already written query to the query builder.
|
|
42
|
+
*
|
|
43
|
+
* Ex: "+myField: value AND (someOtherValue OR anotherValue)"
|
|
44
|
+
*
|
|
45
|
+
* @param {string} query - A raw query string.
|
|
46
|
+
* @return {*} {Equals} - An instance of Equals. A term is a value used to search for a specific value in a document.
|
|
47
|
+
* @memberof QueryBuilder
|
|
48
|
+
*/
|
|
49
|
+
raw(query) {
|
|
50
|
+
return buildRawEquals(__classPrivateFieldGet(this, _QueryBuilder_query, "f"), query);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
_QueryBuilder_query = new WeakMap();
|
|
54
|
+
//# sourceMappingURL=sdk-query-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-query-builder.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/query-builder/sdk-query-builder.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAExE;;;;;GAKG;AACH,MAAM,OAAO,YAAY;IAAzB;QACI,8BAAS,EAAE,EAAC;IA0ChB,CAAC;IAxCG;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAa;QACf,OAAO,UAAU,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,iBAAiB,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,KAAa;QACb,OAAO,cAAc,CAAC,uBAAA,IAAI,2BAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Equals } from '../lucene-syntax/Equals';
|
|
2
|
+
import { Field } from '../lucene-syntax/Field';
|
|
3
|
+
import { NotOperand } from '../lucene-syntax/NotOperand';
|
|
4
|
+
import { Operand } from '../lucene-syntax/Operand';
|
|
5
|
+
/**
|
|
6
|
+
* Enum for common Operands
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @enum {number}
|
|
10
|
+
*/
|
|
11
|
+
export declare enum OPERAND {
|
|
12
|
+
OR = "OR",
|
|
13
|
+
AND = "AND",
|
|
14
|
+
NOT = "NOT"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This function removes extra spaces from a string.
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @param {string} str
|
|
21
|
+
* @return {*} {string}
|
|
22
|
+
*/
|
|
23
|
+
export declare function sanitizeQuery(str: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* This function sanitizes a term by adding quotes if it contains spaces.
|
|
26
|
+
* In lucene, a term with spaces should be enclosed in quotes.
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @param {string} term
|
|
30
|
+
* @return {*} {string}
|
|
31
|
+
*/
|
|
32
|
+
export declare function sanitizePhrases(term: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* This function builds a term to be used in a lucene query.
|
|
35
|
+
* We need to sanitize the term before adding it to the query.
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @param {string} query
|
|
39
|
+
* @param {string} term
|
|
40
|
+
* @return {*} {Equals}
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildEquals(query: string, term: string): Equals;
|
|
43
|
+
/**
|
|
44
|
+
* This function builds a term to be used in a lucene query.
|
|
45
|
+
* We need to sanitize the raw query before adding it to the query.
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @param {string} query
|
|
49
|
+
* @param {string} raw
|
|
50
|
+
* @return {*} {Equals}
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildRawEquals(query: string, raw: string): Equals;
|
|
53
|
+
/**
|
|
54
|
+
* This function builds a field to be used in a lucene query.
|
|
55
|
+
* We need to format the field before adding it to the query.
|
|
56
|
+
*
|
|
57
|
+
* @export
|
|
58
|
+
* @param {string} query
|
|
59
|
+
* @param {string} field
|
|
60
|
+
* @return {*} {Field}
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildField(query: string, field: string): Field;
|
|
63
|
+
/**
|
|
64
|
+
* This function builds an exclude field to be used in a lucene query.
|
|
65
|
+
* We need to format the field before adding it to the query.
|
|
66
|
+
*
|
|
67
|
+
* @export
|
|
68
|
+
* @param {string} query
|
|
69
|
+
* @param {string} field
|
|
70
|
+
* @return {*} {Field}
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildExcludeField(query: string, field: string): Field;
|
|
73
|
+
/**
|
|
74
|
+
* This function builds an operand to be used in a lucene query.
|
|
75
|
+
* We need to format the operand before adding it to the query.
|
|
76
|
+
*
|
|
77
|
+
* @export
|
|
78
|
+
* @param {string} query
|
|
79
|
+
* @param {OPERAND} operand
|
|
80
|
+
* @return {*} {Operand}
|
|
81
|
+
*/
|
|
82
|
+
export declare function buildOperand(query: string, operand: OPERAND): Operand;
|
|
83
|
+
/**
|
|
84
|
+
* This function builds a NOT operand to be used in a lucene query.
|
|
85
|
+
* We need to format the operand before adding it to the query.
|
|
86
|
+
*
|
|
87
|
+
* @export
|
|
88
|
+
* @param {string} query
|
|
89
|
+
* @return {*} {NotOperand}
|
|
90
|
+
*/
|
|
91
|
+
export declare function buildNotOperand(query: string): NotOperand;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Equals } from '../lucene-syntax/Equals';
|
|
2
|
+
import { Field } from '../lucene-syntax/Field';
|
|
3
|
+
import { NotOperand } from '../lucene-syntax/NotOperand';
|
|
4
|
+
import { Operand } from '../lucene-syntax/Operand';
|
|
5
|
+
/**
|
|
6
|
+
* Enum for common Operands
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @enum {number}
|
|
10
|
+
*/
|
|
11
|
+
export var OPERAND;
|
|
12
|
+
(function (OPERAND) {
|
|
13
|
+
OPERAND["OR"] = "OR";
|
|
14
|
+
OPERAND["AND"] = "AND";
|
|
15
|
+
OPERAND["NOT"] = "NOT";
|
|
16
|
+
})(OPERAND || (OPERAND = {}));
|
|
17
|
+
/**
|
|
18
|
+
* This function removes extra spaces from a string.
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {string} str
|
|
22
|
+
* @return {*} {string}
|
|
23
|
+
*/
|
|
24
|
+
export function sanitizeQuery(str) {
|
|
25
|
+
return str.replace(/\s{2,}/g, ' ').trim();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* This function sanitizes a term by adding quotes if it contains spaces.
|
|
29
|
+
* In lucene, a term with spaces should be enclosed in quotes.
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @param {string} term
|
|
33
|
+
* @return {*} {string}
|
|
34
|
+
*/
|
|
35
|
+
export function sanitizePhrases(term) {
|
|
36
|
+
return term.includes(' ') ? `"${term}"` : term;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* This function builds a term to be used in a lucene query.
|
|
40
|
+
* We need to sanitize the term before adding it to the query.
|
|
41
|
+
*
|
|
42
|
+
* @export
|
|
43
|
+
* @param {string} query
|
|
44
|
+
* @param {string} term
|
|
45
|
+
* @return {*} {Equals}
|
|
46
|
+
*/
|
|
47
|
+
export function buildEquals(query, term) {
|
|
48
|
+
const newQuery = query + sanitizePhrases(term);
|
|
49
|
+
return new Equals(newQuery);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* This function builds a term to be used in a lucene query.
|
|
53
|
+
* We need to sanitize the raw query before adding it to the query.
|
|
54
|
+
*
|
|
55
|
+
* @export
|
|
56
|
+
* @param {string} query
|
|
57
|
+
* @param {string} raw
|
|
58
|
+
* @return {*} {Equals}
|
|
59
|
+
*/
|
|
60
|
+
export function buildRawEquals(query, raw) {
|
|
61
|
+
const newQuery = query + ` ${raw}`;
|
|
62
|
+
return new Equals(sanitizeQuery(newQuery));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* This function builds a field to be used in a lucene query.
|
|
66
|
+
* We need to format the field before adding it to the query.
|
|
67
|
+
*
|
|
68
|
+
* @export
|
|
69
|
+
* @param {string} query
|
|
70
|
+
* @param {string} field
|
|
71
|
+
* @return {*} {Field}
|
|
72
|
+
*/
|
|
73
|
+
export function buildField(query, field) {
|
|
74
|
+
const newQuery = query + ` +${field}:`;
|
|
75
|
+
return new Field(newQuery);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* This function builds an exclude field to be used in a lucene query.
|
|
79
|
+
* We need to format the field before adding it to the query.
|
|
80
|
+
*
|
|
81
|
+
* @export
|
|
82
|
+
* @param {string} query
|
|
83
|
+
* @param {string} field
|
|
84
|
+
* @return {*} {Field}
|
|
85
|
+
*/
|
|
86
|
+
export function buildExcludeField(query, field) {
|
|
87
|
+
const newQuery = query + ` -${field}:`;
|
|
88
|
+
return new Field(newQuery);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* This function builds an operand to be used in a lucene query.
|
|
92
|
+
* We need to format the operand before adding it to the query.
|
|
93
|
+
*
|
|
94
|
+
* @export
|
|
95
|
+
* @param {string} query
|
|
96
|
+
* @param {OPERAND} operand
|
|
97
|
+
* @return {*} {Operand}
|
|
98
|
+
*/
|
|
99
|
+
export function buildOperand(query, operand) {
|
|
100
|
+
const newQuery = query + ` ${operand} `;
|
|
101
|
+
return new Operand(newQuery);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* This function builds a NOT operand to be used in a lucene query.
|
|
105
|
+
* We need to format the operand before adding it to the query.
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
* @param {string} query
|
|
109
|
+
* @return {*} {NotOperand}
|
|
110
|
+
*/
|
|
111
|
+
export function buildNotOperand(query) {
|
|
112
|
+
const newQuery = query + ` ${OPERAND.NOT} `;
|
|
113
|
+
return new NotOperand(newQuery);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/query-builder/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACf,oBAAS,CAAA;IACT,sBAAW,CAAA;IACX,sBAAW,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,IA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+
layout: unknown;
|
|
5
|
+
template: unknown;
|
|
6
|
+
viewAs: unknown;
|
|
7
|
+
urlContentMap: unknown;
|
|
8
|
+
page: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
containers: Record<string, unknown>;
|
|
12
|
+
} | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// For now, we are not typing the functions in this file
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
export const graphqlToPageEntity = ({ page }) => {
|
|
4
|
+
// If there is no page, return null
|
|
5
|
+
if (!page) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const { layout, template, containers, urlContentMap, viewAs, ...pageAsset } = page;
|
|
9
|
+
return {
|
|
10
|
+
layout,
|
|
11
|
+
template,
|
|
12
|
+
viewAs,
|
|
13
|
+
urlContentMap,
|
|
14
|
+
page: pageAsset,
|
|
15
|
+
containers: parseContainers(containers)
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
const parseContainers = (containers = []) => {
|
|
19
|
+
return containers.reduce((acc, container) => {
|
|
20
|
+
const { path, identifier, containerStructures, containerContentlets, ...rest } = container;
|
|
21
|
+
const key = (path || identifier);
|
|
22
|
+
acc[key] = {
|
|
23
|
+
containerStructures,
|
|
24
|
+
container: {
|
|
25
|
+
path,
|
|
26
|
+
identifier,
|
|
27
|
+
...rest
|
|
28
|
+
},
|
|
29
|
+
contentlets: parseContentletsToUuidMap(containerContentlets)
|
|
30
|
+
};
|
|
31
|
+
return acc;
|
|
32
|
+
}, {});
|
|
33
|
+
};
|
|
34
|
+
const parseContentletsToUuidMap = (containerContentlets) => {
|
|
35
|
+
return containerContentlets.reduce((acc, containerContentlet) => {
|
|
36
|
+
const { uuid, contentlets } = containerContentlet;
|
|
37
|
+
// TODO: This is a temporary solution, we need to find a better way to handle this.
|
|
38
|
+
acc[uuid] = contentlets.map(({ _map = {}, ...rest }) => {
|
|
39
|
+
return {
|
|
40
|
+
..._map,
|
|
41
|
+
...rest
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
return acc;
|
|
45
|
+
}, {});
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=transforms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/utils/graphql/transforms.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,IAAI,EAAqC,EAAE,EAAE;IAC/E,mCAAmC;IACnC,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEnF,OAAO;QACH,MAAM;QACN,QAAQ;QACR,MAAM;QACN,aAAa;QACb,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,eAAe,CAAC,UAAgB,CAAC;KAChD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,UAAU,GAAG,EAAE,EAAE,EAAE;IACxC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,GAA4B,EAAE,SAAkC,EAAE,EAAE;QAC1F,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAE3F,MAAM,GAAG,GAAG,CAAC,IAAI,IAAI,UAAU,CAAW,CAAC;QAE3C,GAAG,CAAC,GAAG,CAAC,GAAG;YACP,mBAAmB;YACnB,SAAS,EAAE;gBACP,IAAI;gBACJ,UAAU;gBACV,GAAG,IAAI;aACV;YACD,WAAW,EAAE,yBAAyB,CAAC,oBAA0B,CAAC;SACrE,CAAC;QAEF,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,oBAA2B,EAAE,EAAE;IAC9D,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;QAC5D,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC;QAElD,mFAAmF;QACnF,GAAG,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;YACnD,OAAO;gBACH,GAAG,IAAI;gBACP,GAAG,IAAI;aACV,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAS,CAAC,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/client/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface PageRequestParamsProps {
|
|
2
|
+
path: string;
|
|
3
|
+
params: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
} | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const getPageRequestParams: ({ path, params }: PageRequestParamsProps) => {
|
|
8
|
+
path: string;
|
|
9
|
+
mode: any;
|
|
10
|
+
language_id: any;
|
|
11
|
+
variantName: any;
|
|
12
|
+
personaId: any;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const getPageRequestParams = ({ path = '', params = {} }) => {
|
|
2
|
+
const dotMarketingPersonaId = params?.['com.dotmarketing.persona.id'] || '';
|
|
3
|
+
const { language_id = 1, mode = '', variantName = '', personaId } = params;
|
|
4
|
+
return {
|
|
5
|
+
path,
|
|
6
|
+
mode,
|
|
7
|
+
language_id,
|
|
8
|
+
variantName,
|
|
9
|
+
personaId: personaId || dotMarketingPersonaId
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=common-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-utils.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/client/src/lib/utils/page/common-utils.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAA0B,EAAE,EAAE;IACvF,MAAM,qBAAqB,GAAG,MAAM,EAAE,CAAC,6BAA6B,CAAC,IAAI,EAAE,CAAC;IAC5E,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,WAAW,GAAG,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAE3E,OAAO;QACH,IAAI;QACJ,IAAI;QACJ,WAAW;QACX,WAAW;QACX,SAAS,EAAE,SAAS,IAAI,qBAAqB;KAChD,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Actions send to the dotcms editor
|
|
3
|
-
*
|
|
4
|
-
* @export
|
|
5
|
-
* @enum {number}
|
|
6
|
-
*/
|
|
7
|
-
export var CUSTOMER_ACTIONS;
|
|
8
|
-
(function (CUSTOMER_ACTIONS) {
|
|
9
|
-
/**
|
|
10
|
-
* Tell the dotcms editor that page change
|
|
11
|
-
*/
|
|
12
|
-
CUSTOMER_ACTIONS["SET_URL"] = "set-url";
|
|
13
|
-
/**
|
|
14
|
-
* Send the element position of the rows, columnsm containers and contentlets
|
|
15
|
-
*/
|
|
16
|
-
CUSTOMER_ACTIONS["SET_BOUNDS"] = "set-bounds";
|
|
17
|
-
/**
|
|
18
|
-
* Send the information of the hovered contentlet
|
|
19
|
-
*/
|
|
20
|
-
CUSTOMER_ACTIONS["SET_CONTENTLET"] = "set-contentlet";
|
|
21
|
-
/**
|
|
22
|
-
* Tell the editor that the page is being scrolled
|
|
23
|
-
*/
|
|
24
|
-
CUSTOMER_ACTIONS["IFRAME_SCROLL"] = "scroll";
|
|
25
|
-
CUSTOMER_ACTIONS["NOOP"] = "noop";
|
|
26
|
-
})(CUSTOMER_ACTIONS || (CUSTOMER_ACTIONS = {}));
|
|
27
|
-
/**
|
|
28
|
-
* Post message to dotcms page editor
|
|
29
|
-
*
|
|
30
|
-
* @export
|
|
31
|
-
* @template T
|
|
32
|
-
* @param {PostMessageProps<T>} message
|
|
33
|
-
*/
|
|
34
|
-
export function postMessageToEditor(message) {
|
|
35
|
-
window.parent.postMessage(message, '*');
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=postMessageToEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postMessageToEditor.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/postMessageToEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAkBX;AAlBD,WAAY,gBAAgB;IACxB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,6CAAyB,CAAA;IACzB;;OAEG;IACH,qDAAiC,CAAA;IACjC;;OAEG;IACH,4CAAwB,CAAA;IACxB,iCAAa,CAAA;AACjB,CAAC,EAlBW,gBAAgB,KAAhB,gBAAgB,QAkB3B;AAcD;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAc,OAA4B;IACzE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/sdk-js-client.ts"],"names":[],"mappings":"AAkHA,SAAS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