@webiny/api-headless-cms-ddb 6.3.0 → 6.4.0-beta.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.
Files changed (100) hide show
  1. package/definitions/entry.js +7 -9
  2. package/definitions/entry.js.map +1 -1
  3. package/definitions/group.js +7 -9
  4. package/definitions/group.js.map +1 -1
  5. package/definitions/model.js +7 -9
  6. package/definitions/model.js.map +1 -1
  7. package/definitions/table.js +6 -7
  8. package/definitions/table.js.map +1 -1
  9. package/definitions/types.d.ts +1 -0
  10. package/definitions/types.js +0 -3
  11. package/dynamoDb/index.js +6 -1
  12. package/dynamoDb/index.js.map +1 -1
  13. package/dynamoDb/path/locationFolderId.js +16 -29
  14. package/dynamoDb/path/locationFolderId.js.map +1 -1
  15. package/dynamoDb/path/plainObject.js +11 -21
  16. package/dynamoDb/path/plainObject.js.map +1 -1
  17. package/dynamoDb/transformValue/datetime.js +21 -32
  18. package/dynamoDb/transformValue/datetime.js.map +1 -1
  19. package/index.js +67 -77
  20. package/index.js.map +1 -1
  21. package/operations/entry/dataLoader/DataLoaderCache.js +22 -26
  22. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  23. package/operations/entry/dataLoader/constants.js +2 -1
  24. package/operations/entry/dataLoader/constants.js.map +1 -1
  25. package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
  26. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  27. package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -29
  28. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  29. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +31 -41
  30. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  31. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +31 -41
  32. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  33. package/operations/entry/dataLoader/getRevisionById.js +33 -47
  34. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  35. package/operations/entry/dataLoader/index.js +8 -9
  36. package/operations/entry/dataLoader/index.js.map +1 -1
  37. package/operations/entry/dataLoader/types.js +0 -3
  38. package/operations/entry/dataLoaders.js +81 -99
  39. package/operations/entry/dataLoaders.js.map +1 -1
  40. package/operations/entry/filtering/createExpressions.js +109 -157
  41. package/operations/entry/filtering/createExpressions.js.map +1 -1
  42. package/operations/entry/filtering/createFields.js +83 -96
  43. package/operations/entry/filtering/createFields.js.map +1 -1
  44. package/operations/entry/filtering/extractSort.js +50 -74
  45. package/operations/entry/filtering/extractSort.js.map +1 -1
  46. package/operations/entry/filtering/filter.js +72 -140
  47. package/operations/entry/filtering/filter.js.map +1 -1
  48. package/operations/entry/filtering/fullTextSearch.js +21 -38
  49. package/operations/entry/filtering/fullTextSearch.js.map +1 -1
  50. package/operations/entry/filtering/getValue.js +31 -53
  51. package/operations/entry/filtering/getValue.js.map +1 -1
  52. package/operations/entry/filtering/index.js +0 -2
  53. package/operations/entry/filtering/mapPlugins.js +15 -22
  54. package/operations/entry/filtering/mapPlugins.js.map +1 -1
  55. package/operations/entry/filtering/plugins/defaultFilterCreate.js +29 -33
  56. package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +1 -1
  57. package/operations/entry/filtering/plugins/index.js +7 -3
  58. package/operations/entry/filtering/plugins/index.js.map +1 -1
  59. package/operations/entry/filtering/plugins/objectFilterCreate.js +60 -76
  60. package/operations/entry/filtering/plugins/objectFilterCreate.js.map +1 -1
  61. package/operations/entry/filtering/plugins/refFilterCreate.js +55 -66
  62. package/operations/entry/filtering/plugins/refFilterCreate.js.map +1 -1
  63. package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js +43 -56
  64. package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js.map +1 -1
  65. package/operations/entry/filtering/sort.js +34 -60
  66. package/operations/entry/filtering/sort.js.map +1 -1
  67. package/operations/entry/filtering/systemFields.js +144 -126
  68. package/operations/entry/filtering/systemFields.js.map +1 -1
  69. package/operations/entry/filtering/transform.js +4 -8
  70. package/operations/entry/filtering/transform.js.map +1 -1
  71. package/operations/entry/filtering/types.js +0 -3
  72. package/operations/entry/filtering/values.js +11 -12
  73. package/operations/entry/filtering/values.js.map +1 -1
  74. package/operations/entry/filtering/where.js +17 -23
  75. package/operations/entry/filtering/where.js.map +1 -1
  76. package/operations/entry/index.js +894 -1148
  77. package/operations/entry/index.js.map +1 -1
  78. package/operations/entry/keys.js +54 -77
  79. package/operations/entry/keys.js.map +1 -1
  80. package/operations/group/index.js +113 -134
  81. package/operations/group/index.js.map +1 -1
  82. package/operations/model/index.js +100 -121
  83. package/operations/model/index.js.map +1 -1
  84. package/package.json +16 -16
  85. package/plugins/CmsEntryFieldFilterPathPlugin.js +23 -33
  86. package/plugins/CmsEntryFieldFilterPathPlugin.js.map +1 -1
  87. package/plugins/CmsEntryFieldFilterPlugin.js +16 -17
  88. package/plugins/CmsEntryFieldFilterPlugin.js.map +1 -1
  89. package/plugins/CmsEntryFieldSortingPlugin.js +16 -15
  90. package/plugins/CmsEntryFieldSortingPlugin.js.map +1 -1
  91. package/plugins/CmsFieldFilterValueTransformPlugin.js +15 -12
  92. package/plugins/CmsFieldFilterValueTransformPlugin.js.map +1 -1
  93. package/plugins/index.js +0 -2
  94. package/types.js +6 -5
  95. package/types.js.map +1 -1
  96. package/definitions/types.js.map +0 -1
  97. package/operations/entry/dataLoader/types.js.map +0 -1
  98. package/operations/entry/filtering/index.js.map +0 -1
  99. package/operations/entry/filtering/types.js.map +0 -1
  100. package/plugins/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","createFullTextSearch","createExpressions","transformValue","getValue","ValueFilterRegistry","executeFilter","params","value","filter","canUse","compareValue","matched","matches","negate","executeExpressions","expressions","getCachedValue","filters","condition","length","result","expression","items","records","where","plugins","fields","fullTextSearch","container","valueFilterRegistry","resolve","keys","Object","term","fullTextSearchFilter","get","search","targetFields","record","cachedValues","path","undefined","plainValue","rawValue","transform","exprResult"],"sources":["filter.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsEntry,\n CmsEntryListWhere,\n CmsEntryValues\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport type { Field } from \"./types.js\";\nimport { createFullTextSearch } from \"./fullTextSearch.js\";\nimport type { Expression, ExpressionCondition, Filter } from \"./createExpressions.js\";\nimport { createExpressions } from \"./createExpressions.js\";\nimport { transformValue } from \"./transform.js\";\nimport { getValue } from \"~/operations/entry/filtering/getValue.js\";\nimport { ValueFilterRegistry } from \"@webiny/db-dynamodb/exports/api/db.js\";\n\ninterface ExecuteFilterParams {\n value: any;\n filter: Filter;\n}\n\nconst executeFilter = (params: ExecuteFilterParams) => {\n const { value, filter } = params;\n\n /**\n * We need to check if the filter can be used.\n * If it cannot, we will just return true.\n */\n const canUse = filter.filter.canUse({\n value,\n compareValue: filter.compareValue\n });\n if (!canUse) {\n return true;\n }\n\n const matched = filter.filter.matches({\n value,\n compareValue: filter.compareValue\n });\n if (filter.negate) {\n return matched === false;\n }\n return matched;\n};\n\ninterface ExecuteExpressionsParams {\n getCachedValue: (filter: Filter) => Promise<any>;\n expressions: Expression[];\n filters: Filter[];\n condition: ExpressionCondition;\n}\n\nconst executeExpressions = (params: ExecuteExpressionsParams): boolean => {\n const { expressions, getCachedValue, filters, condition } = params;\n if (expressions.length === 0 && filters.length === 0) {\n return true;\n }\n /**\n * Always run filters first as they might trigger an early return.\n */\n for (const filter of filters) {\n const value = getCachedValue(filter);\n\n const result = executeFilter({\n value,\n filter\n });\n /**\n * Filters are ALWAYS executed as an AND.\n * So if even one is false, everything false.\n */\n if (!result) {\n return false;\n }\n }\n /**\n * Then we move onto expressions, which are basically nested upon nested filters with different conditions.\n */\n for (const expression of expressions) {\n const result = executeExpressions({\n ...expression,\n getCachedValue\n });\n if (result && condition === \"OR\") {\n return true;\n } else if (!result && condition == \"AND\") {\n return false;\n }\n }\n /**\n * If condition is an OR, we can fail the expressions check because the code would return a lot earlier than this line.\n *\n * Also, if condition is not an OR, we can say that the expressions check is ok, because it would fail a lot earlier than this line.\n */\n return condition === \"OR\" ? false : true;\n};\n\ninterface IFilterParams<T extends CmsEntryValues = CmsEntryValues> {\n plugins: PluginsContainer;\n container: CmsContext[\"container\"];\n items: CmsEntry<T>[];\n where: Partial<CmsEntryListWhere>;\n fields: Record<string, Field>;\n fullTextSearch?: {\n term?: string;\n fields?: string[];\n };\n}\n\nexport const filter = <T extends CmsEntryValues = CmsEntryValues>(\n params: IFilterParams<T>\n): CmsEntry<T>[] => {\n const { items: records, where, plugins, fields, fullTextSearch, container } = params;\n\n const valueFilterRegistry = container.resolve(ValueFilterRegistry);\n\n const keys = Object.keys(where);\n if (keys.length === 0 && !fullTextSearch) {\n return records;\n }\n const expression = createExpressions({\n plugins,\n where,\n fields,\n container\n });\n\n /**\n * No point in going further if there are no expressions to be applied and no full text search to be executed.\n */\n if (\n expression.filters.length === 0 &&\n expression.expressions.length === 0 &&\n !fullTextSearch?.term\n ) {\n return records;\n }\n /**\n * We need the contains plugin to run the full text search.\n */\n const fullTextSearchFilter = valueFilterRegistry.get(\"contains\");\n if (!fullTextSearchFilter) {\n throw new WebinyError(\n `Missing \"contains\" plugin to run the full-text search.`,\n \"MISSING_PLUGIN\"\n );\n }\n\n const search = createFullTextSearch({\n term: fullTextSearch?.term,\n targetFields: fullTextSearch?.fields,\n fields,\n filter: fullTextSearchFilter\n });\n\n return records.filter(record => {\n const cachedValues: Record<string, any> = {};\n\n const getCachedValue = (filter: Filter) => {\n const { path } = filter;\n if (cachedValues[path] !== undefined) {\n return cachedValues[path];\n }\n const plainValue = getValue(record, path);\n\n const rawValue = transformValue({\n value: plainValue,\n transform: filter.transformValue\n });\n\n cachedValues[path] = rawValue;\n return rawValue;\n };\n\n const exprResult = executeExpressions({ ...expression, getCachedValue });\n /**\n * If expression result is false we do not need to continue further.\n * Also, if there is no full text search defined, just return the expression result.\n */\n if (!exprResult || !search) {\n return exprResult;\n }\n\n return search(record);\n });\n};\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/filter.js","sources":["../../../../src/operations/entry/filtering/filter.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsEntry,\n CmsEntryListWhere,\n CmsEntryValues\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport type { Field } from \"./types.js\";\nimport { createFullTextSearch } from \"./fullTextSearch.js\";\nimport type { Expression, ExpressionCondition, Filter } from \"./createExpressions.js\";\nimport { createExpressions } from \"./createExpressions.js\";\nimport { transformValue } from \"./transform.js\";\nimport { getValue } from \"~/operations/entry/filtering/getValue.js\";\nimport { ValueFilterRegistry } from \"@webiny/db-dynamodb/exports/api/db.js\";\n\ninterface ExecuteFilterParams {\n value: any;\n filter: Filter;\n}\n\nconst executeFilter = (params: ExecuteFilterParams) => {\n const { value, filter } = params;\n\n /**\n * We need to check if the filter can be used.\n * If it cannot, we will just return true.\n */\n const canUse = filter.filter.canUse({\n value,\n compareValue: filter.compareValue\n });\n if (!canUse) {\n return true;\n }\n\n const matched = filter.filter.matches({\n value,\n compareValue: filter.compareValue\n });\n if (filter.negate) {\n return matched === false;\n }\n return matched;\n};\n\ninterface ExecuteExpressionsParams {\n getCachedValue: (filter: Filter) => Promise<any>;\n expressions: Expression[];\n filters: Filter[];\n condition: ExpressionCondition;\n}\n\nconst executeExpressions = (params: ExecuteExpressionsParams): boolean => {\n const { expressions, getCachedValue, filters, condition } = params;\n if (expressions.length === 0 && filters.length === 0) {\n return true;\n }\n /**\n * Always run filters first as they might trigger an early return.\n */\n for (const filter of filters) {\n const value = getCachedValue(filter);\n\n const result = executeFilter({\n value,\n filter\n });\n /**\n * Filters are ALWAYS executed as an AND.\n * So if even one is false, everything false.\n */\n if (!result) {\n return false;\n }\n }\n /**\n * Then we move onto expressions, which are basically nested upon nested filters with different conditions.\n */\n for (const expression of expressions) {\n const result = executeExpressions({\n ...expression,\n getCachedValue\n });\n if (result && condition === \"OR\") {\n return true;\n } else if (!result && condition == \"AND\") {\n return false;\n }\n }\n /**\n * If condition is an OR, we can fail the expressions check because the code would return a lot earlier than this line.\n *\n * Also, if condition is not an OR, we can say that the expressions check is ok, because it would fail a lot earlier than this line.\n */\n return condition === \"OR\" ? false : true;\n};\n\ninterface IFilterParams<T extends CmsEntryValues = CmsEntryValues> {\n plugins: PluginsContainer;\n container: CmsContext[\"container\"];\n items: CmsEntry<T>[];\n where: Partial<CmsEntryListWhere>;\n fields: Record<string, Field>;\n fullTextSearch?: {\n term?: string;\n fields?: string[];\n };\n}\n\nexport const filter = <T extends CmsEntryValues = CmsEntryValues>(\n params: IFilterParams<T>\n): CmsEntry<T>[] => {\n const { items: records, where, plugins, fields, fullTextSearch, container } = params;\n\n const valueFilterRegistry = container.resolve(ValueFilterRegistry);\n\n const keys = Object.keys(where);\n if (keys.length === 0 && !fullTextSearch) {\n return records;\n }\n const expression = createExpressions({\n plugins,\n where,\n fields,\n container\n });\n\n /**\n * No point in going further if there are no expressions to be applied and no full text search to be executed.\n */\n if (\n expression.filters.length === 0 &&\n expression.expressions.length === 0 &&\n !fullTextSearch?.term\n ) {\n return records;\n }\n /**\n * We need the contains plugin to run the full text search.\n */\n const fullTextSearchFilter = valueFilterRegistry.get(\"contains\");\n if (!fullTextSearchFilter) {\n throw new WebinyError(\n `Missing \"contains\" plugin to run the full-text search.`,\n \"MISSING_PLUGIN\"\n );\n }\n\n const search = createFullTextSearch({\n term: fullTextSearch?.term,\n targetFields: fullTextSearch?.fields,\n fields,\n filter: fullTextSearchFilter\n });\n\n return records.filter(record => {\n const cachedValues: Record<string, any> = {};\n\n const getCachedValue = (filter: Filter) => {\n const { path } = filter;\n if (cachedValues[path] !== undefined) {\n return cachedValues[path];\n }\n const plainValue = getValue(record, path);\n\n const rawValue = transformValue({\n value: plainValue,\n transform: filter.transformValue\n });\n\n cachedValues[path] = rawValue;\n return rawValue;\n };\n\n const exprResult = executeExpressions({ ...expression, getCachedValue });\n /**\n * If expression result is false we do not need to continue further.\n * Also, if there is no full text search defined, just return the expression result.\n */\n if (!exprResult || !search) {\n return exprResult;\n }\n\n return search(record);\n });\n};\n"],"names":["executeFilter","params","value","filter","canUse","matched","executeExpressions","expressions","getCachedValue","filters","condition","result","expression","records","where","plugins","fields","fullTextSearch","container","valueFilterRegistry","ValueFilterRegistry","keys","Object","createExpressions","fullTextSearchFilter","WebinyError","search","createFullTextSearch","record","cachedValues","path","undefined","plainValue","getValue","rawValue","transformValue","exprResult"],"mappings":";;;;;;AAqBA,MAAMA,gBAAgB,CAACC;IACnB,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGF;IAM1B,MAAMG,SAASD,OAAO,MAAM,CAAC,MAAM,CAAC;QAChCD;QACA,cAAcC,OAAO,YAAY;IACrC;IACA,IAAI,CAACC,QACD,OAAO;IAGX,MAAMC,UAAUF,OAAO,MAAM,CAAC,OAAO,CAAC;QAClCD;QACA,cAAcC,OAAO,YAAY;IACrC;IACA,IAAIA,OAAO,MAAM,EACb,OAAOE,AAAY,UAAZA;IAEX,OAAOA;AACX;AASA,MAAMC,qBAAqB,CAACL;IACxB,MAAM,EAAEM,WAAW,EAAEC,cAAc,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGT;IAC5D,IAAIM,AAAuB,MAAvBA,YAAY,MAAM,IAAUE,AAAmB,MAAnBA,QAAQ,MAAM,EAC1C,OAAO;IAKX,KAAK,MAAMN,UAAUM,QAAS;QAC1B,MAAMP,QAAQM,eAAeL;QAE7B,MAAMQ,SAASX,cAAc;YACzBE;YACAC;QACJ;QAKA,IAAI,CAACQ,QACD,OAAO;IAEf;IAIA,KAAK,MAAMC,cAAcL,YAAa;QAClC,MAAMI,SAASL,mBAAmB;YAC9B,GAAGM,UAAU;YACbJ;QACJ;QACA,IAAIG,UAAUD,AAAc,SAAdA,WACV,OAAO;QACJ,IAAI,CAACC,UAAUD,AAAa,SAAbA,WAClB,OAAO;IAEf;IAMA,OAAOA,AAAc,SAAdA;AACX;AAcO,MAAMP,gBAAS,CAClBF;IAEA,MAAM,EAAE,OAAOY,OAAO,EAAEC,KAAK,EAAEC,OAAO,EAAEC,MAAM,EAAEC,cAAc,EAAEC,SAAS,EAAE,GAAGjB;IAE9E,MAAMkB,sBAAsBD,UAAU,OAAO,CAACE;IAE9C,MAAMC,OAAOC,OAAO,IAAI,CAACR;IACzB,IAAIO,AAAgB,MAAhBA,KAAK,MAAM,IAAU,CAACJ,gBACtB,OAAOJ;IAEX,MAAMD,aAAaW,kBAAkB;QACjCR;QACAD;QACAE;QACAE;IACJ;IAKA,IACIN,AAA8B,MAA9BA,WAAW,OAAO,CAAC,MAAM,IACzBA,AAAkC,MAAlCA,WAAW,WAAW,CAAC,MAAM,IAC7B,CAACK,gBAAgB,MAEjB,OAAOJ;IAKX,MAAMW,uBAAuBL,oBAAoB,GAAG,CAAC;IACrD,IAAI,CAACK,sBACD,MAAM,IAAIC,MACN,0DACA;IAIR,MAAMC,SAASC,qBAAqB;QAChC,MAAMV,gBAAgB;QACtB,cAAcA,gBAAgB;QAC9BD;QACA,QAAQQ;IACZ;IAEA,OAAOX,QAAQ,MAAM,CAACe,CAAAA;QAClB,MAAMC,eAAoC,CAAC;QAE3C,MAAMrB,iBAAiB,CAACL;YACpB,MAAM,EAAE2B,IAAI,EAAE,GAAG3B;YACjB,IAAI0B,AAAuBE,WAAvBF,YAAY,CAACC,KAAK,EAClB,OAAOD,YAAY,CAACC,KAAK;YAE7B,MAAME,aAAaC,SAASL,QAAQE;YAEpC,MAAMI,WAAWC,eAAe;gBAC5B,OAAOH;gBACP,WAAW7B,OAAO,cAAc;YACpC;YAEA0B,YAAY,CAACC,KAAK,GAAGI;YACrB,OAAOA;QACX;QAEA,MAAME,aAAa9B,mBAAmB;YAAE,GAAGM,UAAU;YAAEJ;QAAe;QAKtE,IAAI,CAAC4B,cAAc,CAACV,QAChB,OAAOU;QAGX,OAAOV,OAAOE;IAClB;AACJ"}
@@ -1,42 +1,25 @@
1
- import WebinyError from "@webiny/error";
1
+ import error from "@webiny/error";
2
2
  import { getValue } from "./getValue.js";
3
- /**
4
- * Unfortunately we must use the contains plugin directly as plugins do not support multi field searching.
5
- */
6
- export const createFullTextSearch = params => {
7
- const {
8
- term,
9
- targetFields,
10
- fields: fieldDefinitions,
11
- filter
12
- } = params;
13
- if (!term || term.trim().length === 0 || !targetFields || targetFields.length === 0) {
14
- return null;
15
- }
16
- return item => {
17
- for (const target of targetFields) {
18
- /**
19
- * As fields is a mapped Field objects where key is a path to the value, we can directly find the related field.
20
- */
21
- const field = fieldDefinitions[target];
22
- if (!field) {
23
- throw new WebinyError(`Unknown field "${target}" in the model.`, "UNKNOWN_FIELD", {
24
- target
25
- });
26
- }
27
- const value = getValue(item, target);
28
- if (!value) {
29
- continue;
30
- }
31
- if (filter.matches({
32
- value,
33
- compareValue: term
34
- }) === true) {
35
- return true;
36
- }
37
- }
38
- return false;
39
- };
3
+ const createFullTextSearch = (params)=>{
4
+ const { term, targetFields, fields: fieldDefinitions, filter } = params;
5
+ if (!term || 0 === term.trim().length || !targetFields || 0 === targetFields.length) return null;
6
+ return (item)=>{
7
+ for (const target of targetFields){
8
+ const field = fieldDefinitions[target];
9
+ if (!field) throw new error(`Unknown field "${target}" in the model.`, "UNKNOWN_FIELD", {
10
+ target
11
+ });
12
+ const value = getValue(item, target);
13
+ if (value) {
14
+ if (true === filter.matches({
15
+ value,
16
+ compareValue: term
17
+ })) return true;
18
+ }
19
+ }
20
+ return false;
21
+ };
40
22
  };
23
+ export { createFullTextSearch };
41
24
 
42
25
  //# sourceMappingURL=fullTextSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","getValue","createFullTextSearch","params","term","targetFields","fields","fieldDefinitions","filter","trim","length","item","target","field","value","matches","compareValue"],"sources":["fullTextSearch.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { CmsEntry } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { Field } from \"./types.js\";\nimport { getValue } from \"./getValue.js\";\nimport { ValueFilter } from \"@webiny/db-dynamodb/exports/api/db.js\";\n\ninterface Params {\n term?: string;\n targetFields?: string[];\n fields: Record<string, Field>;\n filter: ValueFilter.Interface;\n}\n\n/**\n * Unfortunately we must use the contains plugin directly as plugins do not support multi field searching.\n */\nexport const createFullTextSearch = (params: Params) => {\n const { term, targetFields, fields: fieldDefinitions, filter } = params;\n if (!term || term.trim().length === 0 || !targetFields || targetFields.length === 0) {\n return null;\n }\n return (item: CmsEntry) => {\n for (const target of targetFields) {\n /**\n * As fields is a mapped Field objects where key is a path to the value, we can directly find the related field.\n */\n const field = fieldDefinitions[target];\n\n if (!field) {\n throw new WebinyError(`Unknown field \"${target}\" in the model.`, \"UNKNOWN_FIELD\", {\n target\n });\n }\n const value = getValue(item, target);\n if (!value) {\n continue;\n }\n if (filter.matches({ value, compareValue: term }) === true) {\n return true;\n }\n }\n return false;\n };\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAGvC,SAASC,QAAQ;AAUjB;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAIC,MAAc,IAAK;EACpD,MAAM;IAAEC,IAAI;IAAEC,YAAY;IAAEC,MAAM,EAAEC,gBAAgB;IAAEC;EAAO,CAAC,GAAGL,MAAM;EACvE,IAAI,CAACC,IAAI,IAAIA,IAAI,CAACK,IAAI,CAAC,CAAC,CAACC,MAAM,KAAK,CAAC,IAAI,CAACL,YAAY,IAAIA,YAAY,CAACK,MAAM,KAAK,CAAC,EAAE;IACjF,OAAO,IAAI;EACf;EACA,OAAQC,IAAc,IAAK;IACvB,KAAK,MAAMC,MAAM,IAAIP,YAAY,EAAE;MAC/B;AACZ;AACA;MACY,MAAMQ,KAAK,GAAGN,gBAAgB,CAACK,MAAM,CAAC;MAEtC,IAAI,CAACC,KAAK,EAAE;QACR,MAAM,IAAIb,WAAW,CAAC,kBAAkBY,MAAM,iBAAiB,EAAE,eAAe,EAAE;UAC9EA;QACJ,CAAC,CAAC;MACN;MACA,MAAME,KAAK,GAAGb,QAAQ,CAACU,IAAI,EAAEC,MAAM,CAAC;MACpC,IAAI,CAACE,KAAK,EAAE;QACR;MACJ;MACA,IAAIN,MAAM,CAACO,OAAO,CAAC;QAAED,KAAK;QAAEE,YAAY,EAAEZ;MAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QACxD,OAAO,IAAI;MACf;IACJ;IACA,OAAO,KAAK;EAChB,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/fullTextSearch.js","sources":["../../../../src/operations/entry/filtering/fullTextSearch.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { CmsEntry } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { Field } from \"./types.js\";\nimport { getValue } from \"./getValue.js\";\nimport { ValueFilter } from \"@webiny/db-dynamodb/exports/api/db.js\";\n\ninterface Params {\n term?: string;\n targetFields?: string[];\n fields: Record<string, Field>;\n filter: ValueFilter.Interface;\n}\n\n/**\n * Unfortunately we must use the contains plugin directly as plugins do not support multi field searching.\n */\nexport const createFullTextSearch = (params: Params) => {\n const { term, targetFields, fields: fieldDefinitions, filter } = params;\n if (!term || term.trim().length === 0 || !targetFields || targetFields.length === 0) {\n return null;\n }\n return (item: CmsEntry) => {\n for (const target of targetFields) {\n /**\n * As fields is a mapped Field objects where key is a path to the value, we can directly find the related field.\n */\n const field = fieldDefinitions[target];\n\n if (!field) {\n throw new WebinyError(`Unknown field \"${target}\" in the model.`, \"UNKNOWN_FIELD\", {\n target\n });\n }\n const value = getValue(item, target);\n if (!value) {\n continue;\n }\n if (filter.matches({ value, compareValue: term }) === true) {\n return true;\n }\n }\n return false;\n };\n};\n"],"names":["createFullTextSearch","params","term","targetFields","fieldDefinitions","filter","item","target","field","WebinyError","value","getValue"],"mappings":";;AAgBO,MAAMA,uBAAuB,CAACC;IACjC,MAAM,EAAEC,IAAI,EAAEC,YAAY,EAAE,QAAQC,gBAAgB,EAAEC,MAAM,EAAE,GAAGJ;IACjE,IAAI,CAACC,QAAQA,AAAuB,MAAvBA,KAAK,IAAI,GAAG,MAAM,IAAU,CAACC,gBAAgBA,AAAwB,MAAxBA,aAAa,MAAM,EACzE,OAAO;IAEX,OAAO,CAACG;QACJ,KAAK,MAAMC,UAAUJ,aAAc;YAI/B,MAAMK,QAAQJ,gBAAgB,CAACG,OAAO;YAEtC,IAAI,CAACC,OACD,MAAM,IAAIC,MAAY,CAAC,eAAe,EAAEF,OAAO,eAAe,CAAC,EAAE,iBAAiB;gBAC9EA;YACJ;YAEJ,MAAMG,QAAQC,SAASL,MAAMC;YAC7B,IAAKG,OAGL;gBAAA,IAAIL,AAAkD,SAAlDA,OAAO,OAAO,CAAC;oBAAEK;oBAAO,cAAcR;gBAAK,IAC3C,OAAO;YACX;QACJ;QACA,OAAO;IACX;AACJ"}
@@ -1,59 +1,37 @@
1
- const addArrayResult = (target, result) => {
2
- for (const r of result) {
3
- if (target.some(t => r === t)) {
4
- continue;
5
- }
6
- target.push(r);
7
- }
1
+ const addArrayResult = (target, result)=>{
2
+ for (const r of result)if (!target.some((t)=>r === t)) target.push(r);
8
3
  };
9
- /**
10
- * A recursive function which goes through given input paths and returns the value in it.
11
- * In case a path is an array, it goes through the array of those values to get values further down the path line.
12
- */
13
- const find = (target, input) => {
14
- const paths = [...input];
15
- const path = paths.shift();
16
- if (!path) {
17
- return undefined;
18
- }
19
- const value = target?.[path];
20
- if (value === undefined) {
21
- return undefined;
22
- }
23
- if (paths.length === 0) {
24
- return value;
25
- } else if (Array.isArray(value)) {
26
- if (value.length === 0) {
27
- return undefined;
4
+ const find = (target, input)=>{
5
+ const paths = [
6
+ ...input
7
+ ];
8
+ const path = paths.shift();
9
+ if (!path) return;
10
+ const value = target?.[path];
11
+ if (void 0 === value) return;
12
+ if (0 === paths.length) return value;
13
+ if (Array.isArray(value)) {
14
+ if (0 === value.length) return;
15
+ return value.reduce((collection, v)=>{
16
+ const result = find(v, paths);
17
+ if (void 0 === result) return collection;
18
+ if (Array.isArray(result)) {
19
+ addArrayResult(collection, result);
20
+ return collection;
21
+ }
22
+ collection.push(result);
23
+ return collection;
24
+ }, []);
28
25
  }
29
- return value.reduce((collection, v) => {
30
- const result = find(v, paths);
31
- if (result === undefined) {
32
- return collection;
33
- } else if (Array.isArray(result)) {
34
- addArrayResult(collection, result);
35
- return collection;
36
- }
37
- collection.push(result);
38
- return collection;
39
- }, []);
40
- }
41
- return find(value, paths);
26
+ return find(value, paths);
42
27
  };
43
- /**
44
- * A wrapper function for the find function.
45
- * Basically it transforms input paths to an array (and runs various checks).
46
- */
47
- export const getValue = (target, input) => {
48
- const paths = Array.isArray(input) ? input : input.split(".");
49
- if (paths.length === 0) {
50
- throw new Error(`Path is empty!`);
51
- }
52
- const filtered = paths.filter(Boolean);
53
- if (paths.length !== filtered.length) {
54
- throw new Error(`Input path is different than the filtered empty path string. (${paths.join(".")} to ${filtered.join(".")})`);
55
- }
56
- return find(target, paths);
28
+ const getValue = (target, input)=>{
29
+ const paths = Array.isArray(input) ? input : input.split(".");
30
+ if (0 === paths.length) throw new Error("Path is empty!");
31
+ const filtered = paths.filter(Boolean);
32
+ if (paths.length !== filtered.length) throw new Error(`Input path is different than the filtered empty path string. (${paths.join(".")} to ${filtered.join(".")})`);
33
+ return find(target, paths);
57
34
  };
35
+ export { getValue };
58
36
 
59
37
  //# sourceMappingURL=getValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["addArrayResult","target","result","r","some","t","push","find","input","paths","path","shift","undefined","value","length","Array","isArray","reduce","collection","v","getValue","split","Error","filtered","filter","Boolean","join"],"sources":["getValue.ts"],"sourcesContent":["const addArrayResult = (target: any[], result: any[]): void => {\n for (const r of result) {\n if (target.some(t => r === t)) {\n continue;\n }\n target.push(r);\n }\n};\n/**\n * A recursive function which goes through given input paths and returns the value in it.\n * In case a path is an array, it goes through the array of those values to get values further down the path line.\n */\nconst find = (target: Record<string, any> | undefined, input: string[]): any[] | undefined => {\n const paths = [...input];\n const path = paths.shift();\n\n if (!path) {\n return undefined;\n }\n\n const value = target?.[path];\n if (value === undefined) {\n return undefined;\n }\n if (paths.length === 0) {\n return value;\n } else if (Array.isArray(value)) {\n if (value.length === 0) {\n return undefined;\n }\n return value.reduce<any[]>((collection, v) => {\n const result = find(v, paths);\n if (result === undefined) {\n return collection;\n } else if (Array.isArray(result)) {\n addArrayResult(collection, result);\n return collection;\n }\n collection.push(result);\n return collection;\n }, []);\n }\n return find(value, paths);\n};\n/**\n * A wrapper function for the find function.\n * Basically it transforms input paths to an array (and runs various checks).\n */\nexport const getValue = (target: Record<string, any>, input: string | string[]): any => {\n const paths = Array.isArray(input) ? input : input.split(\".\");\n if (paths.length === 0) {\n throw new Error(`Path is empty!`);\n }\n const filtered = paths.filter(Boolean);\n if (paths.length !== filtered.length) {\n throw new Error(\n `Input path is different than the filtered empty path string. (${paths.join(\n \".\"\n )} to ${filtered.join(\".\")})`\n );\n }\n\n return find(target, paths);\n};\n"],"mappings":"AAAA,MAAMA,cAAc,GAAGA,CAACC,MAAa,EAAEC,MAAa,KAAW;EAC3D,KAAK,MAAMC,CAAC,IAAID,MAAM,EAAE;IACpB,IAAID,MAAM,CAACG,IAAI,CAACC,CAAC,IAAIF,CAAC,KAAKE,CAAC,CAAC,EAAE;MAC3B;IACJ;IACAJ,MAAM,CAACK,IAAI,CAACH,CAAC,CAAC;EAClB;AACJ,CAAC;AACD;AACA;AACA;AACA;AACA,MAAMI,IAAI,GAAGA,CAACN,MAAuC,EAAEO,KAAe,KAAwB;EAC1F,MAAMC,KAAK,GAAG,CAAC,GAAGD,KAAK,CAAC;EACxB,MAAME,IAAI,GAAGD,KAAK,CAACE,KAAK,CAAC,CAAC;EAE1B,IAAI,CAACD,IAAI,EAAE;IACP,OAAOE,SAAS;EACpB;EAEA,MAAMC,KAAK,GAAGZ,MAAM,GAAGS,IAAI,CAAC;EAC5B,IAAIG,KAAK,KAAKD,SAAS,EAAE;IACrB,OAAOA,SAAS;EACpB;EACA,IAAIH,KAAK,CAACK,MAAM,KAAK,CAAC,EAAE;IACpB,OAAOD,KAAK;EAChB,CAAC,MAAM,IAAIE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;IAC7B,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;MACpB,OAAOF,SAAS;IACpB;IACA,OAAOC,KAAK,CAACI,MAAM,CAAQ,CAACC,UAAU,EAAEC,CAAC,KAAK;MAC1C,MAAMjB,MAAM,GAAGK,IAAI,CAACY,CAAC,EAAEV,KAAK,CAAC;MAC7B,IAAIP,MAAM,KAAKU,SAAS,EAAE;QACtB,OAAOM,UAAU;MACrB,CAAC,MAAM,IAAIH,KAAK,CAACC,OAAO,CAACd,MAAM,CAAC,EAAE;QAC9BF,cAAc,CAACkB,UAAU,EAAEhB,MAAM,CAAC;QAClC,OAAOgB,UAAU;MACrB;MACAA,UAAU,CAACZ,IAAI,CAACJ,MAAM,CAAC;MACvB,OAAOgB,UAAU;IACrB,CAAC,EAAE,EAAE,CAAC;EACV;EACA,OAAOX,IAAI,CAACM,KAAK,EAAEJ,KAAK,CAAC;AAC7B,CAAC;AACD;AACA;AACA;AACA;AACA,OAAO,MAAMW,QAAQ,GAAGA,CAACnB,MAA2B,EAAEO,KAAwB,KAAU;EACpF,MAAMC,KAAK,GAAGM,KAAK,CAACC,OAAO,CAACR,KAAK,CAAC,GAAGA,KAAK,GAAGA,KAAK,CAACa,KAAK,CAAC,GAAG,CAAC;EAC7D,IAAIZ,KAAK,CAACK,MAAM,KAAK,CAAC,EAAE;IACpB,MAAM,IAAIQ,KAAK,CAAC,gBAAgB,CAAC;EACrC;EACA,MAAMC,QAAQ,GAAGd,KAAK,CAACe,MAAM,CAACC,OAAO,CAAC;EACtC,IAAIhB,KAAK,CAACK,MAAM,KAAKS,QAAQ,CAACT,MAAM,EAAE;IAClC,MAAM,IAAIQ,KAAK,CACX,iEAAiEb,KAAK,CAACiB,IAAI,CACvE,GACJ,CAAC,OAAOH,QAAQ,CAACG,IAAI,CAAC,GAAG,CAAC,GAC9B,CAAC;EACL;EAEA,OAAOnB,IAAI,CAACN,MAAM,EAAEQ,KAAK,CAAC;AAC9B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/getValue.js","sources":["../../../../src/operations/entry/filtering/getValue.ts"],"sourcesContent":["const addArrayResult = (target: any[], result: any[]): void => {\n for (const r of result) {\n if (target.some(t => r === t)) {\n continue;\n }\n target.push(r);\n }\n};\n/**\n * A recursive function which goes through given input paths and returns the value in it.\n * In case a path is an array, it goes through the array of those values to get values further down the path line.\n */\nconst find = (target: Record<string, any> | undefined, input: string[]): any[] | undefined => {\n const paths = [...input];\n const path = paths.shift();\n\n if (!path) {\n return undefined;\n }\n\n const value = target?.[path];\n if (value === undefined) {\n return undefined;\n }\n if (paths.length === 0) {\n return value;\n } else if (Array.isArray(value)) {\n if (value.length === 0) {\n return undefined;\n }\n return value.reduce<any[]>((collection, v) => {\n const result = find(v, paths);\n if (result === undefined) {\n return collection;\n } else if (Array.isArray(result)) {\n addArrayResult(collection, result);\n return collection;\n }\n collection.push(result);\n return collection;\n }, []);\n }\n return find(value, paths);\n};\n/**\n * A wrapper function for the find function.\n * Basically it transforms input paths to an array (and runs various checks).\n */\nexport const getValue = (target: Record<string, any>, input: string | string[]): any => {\n const paths = Array.isArray(input) ? input : input.split(\".\");\n if (paths.length === 0) {\n throw new Error(`Path is empty!`);\n }\n const filtered = paths.filter(Boolean);\n if (paths.length !== filtered.length) {\n throw new Error(\n `Input path is different than the filtered empty path string. (${paths.join(\n \".\"\n )} to ${filtered.join(\".\")})`\n );\n }\n\n return find(target, paths);\n};\n"],"names":["addArrayResult","target","result","r","t","find","input","paths","path","value","undefined","Array","collection","v","getValue","Error","filtered","Boolean"],"mappings":"AAAA,MAAMA,iBAAiB,CAACC,QAAeC;IACnC,KAAK,MAAMC,KAAKD,OACZ,KAAID,OAAO,IAAI,CAACG,CAAAA,IAAKD,MAAMC,IAG3BH,OAAO,IAAI,CAACE;AAEpB;AAKA,MAAME,OAAO,CAACJ,QAAyCK;IACnD,MAAMC,QAAQ;WAAID;KAAM;IACxB,MAAME,OAAOD,MAAM,KAAK;IAExB,IAAI,CAACC,MACD;IAGJ,MAAMC,QAAQR,QAAQ,CAACO,KAAK;IAC5B,IAAIC,AAAUC,WAAVD,OACA;IAEJ,IAAIF,AAAiB,MAAjBA,MAAM,MAAM,EACZ,OAAOE;IACJ,IAAIE,MAAM,OAAO,CAACF,QAAQ;QAC7B,IAAIA,AAAiB,MAAjBA,MAAM,MAAM,EACZ;QAEJ,OAAOA,MAAM,MAAM,CAAQ,CAACG,YAAYC;YACpC,MAAMX,SAASG,KAAKQ,GAAGN;YACvB,IAAIL,AAAWQ,WAAXR,QACA,OAAOU;YACJ,IAAID,MAAM,OAAO,CAACT,SAAS;gBAC9BF,eAAeY,YAAYV;gBAC3B,OAAOU;YACX;YACAA,WAAW,IAAI,CAACV;YAChB,OAAOU;QACX,GAAG,EAAE;IACT;IACA,OAAOP,KAAKI,OAAOF;AACvB;AAKO,MAAMO,WAAW,CAACb,QAA6BK;IAClD,MAAMC,QAAQI,MAAM,OAAO,CAACL,SAASA,QAAQA,MAAM,KAAK,CAAC;IACzD,IAAIC,AAAiB,MAAjBA,MAAM,MAAM,EACZ,MAAM,IAAIQ,MAAM;IAEpB,MAAMC,WAAWT,MAAM,MAAM,CAACU;IAC9B,IAAIV,MAAM,MAAM,KAAKS,SAAS,MAAM,EAChC,MAAM,IAAID,MACN,CAAC,8DAA8D,EAAER,MAAM,IAAI,CACvE,KACF,IAAI,EAAES,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC;IAIrC,OAAOX,KAAKJ,QAAQM;AACxB"}
@@ -1,4 +1,2 @@
1
1
  export { filter } from "./filter.js";
2
2
  export { sort } from "./sort.js";
3
-
4
- //# sourceMappingURL=index.js.map
@@ -1,25 +1,18 @@
1
- import WebinyError from "@webiny/error";
2
- export const getMappedPlugins = params => {
3
- const {
4
- plugins: pluginsContainer,
5
- type,
6
- property
7
- } = params;
8
- const plugins = pluginsContainer.byType(type);
9
- if (plugins.length === 0) {
10
- return {};
11
- }
12
- return plugins.reduce((collection, plugin) => {
13
- const key = plugin[property];
14
- if (typeof key !== "string") {
15
- throw new WebinyError("Property to map the plugins on must be a string.", "PLUGIN_PROPERTY_ERROR", {
16
- type,
17
- property
18
- });
19
- }
20
- collection[key] = plugin;
21
- return collection;
22
- }, {});
1
+ import error from "@webiny/error";
2
+ const getMappedPlugins = (params)=>{
3
+ const { plugins: pluginsContainer, type, property } = params;
4
+ const plugins = pluginsContainer.byType(type);
5
+ if (0 === plugins.length) return {};
6
+ return plugins.reduce((collection, plugin)=>{
7
+ const key = plugin[property];
8
+ if ("string" != typeof key) throw new error("Property to map the plugins on must be a string.", "PLUGIN_PROPERTY_ERROR", {
9
+ type,
10
+ property
11
+ });
12
+ collection[key] = plugin;
13
+ return collection;
14
+ }, {});
23
15
  };
16
+ export { getMappedPlugins };
24
17
 
25
18
  //# sourceMappingURL=mapPlugins.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","getMappedPlugins","params","plugins","pluginsContainer","type","property","byType","length","reduce","collection","plugin","key"],"sources":["mapPlugins.ts"],"sourcesContent":["import type { Plugin, PluginsContainer } from \"@webiny/plugins/types.js\";\nimport WebinyError from \"@webiny/error\";\n\ninterface Params {\n plugins: PluginsContainer;\n type: string;\n property: string;\n}\nexport const getMappedPlugins = <T extends Plugin>(params: Params) => {\n const { plugins: pluginsContainer, type, property } = params;\n const plugins = pluginsContainer.byType<T>(type);\n if (plugins.length === 0) {\n return {};\n }\n return plugins.reduce<Record<string, T>>((collection, plugin) => {\n const key: keyof typeof plugin = plugin[property];\n if (typeof key !== \"string\") {\n throw new WebinyError(\n \"Property to map the plugins on must be a string.\",\n \"PLUGIN_PROPERTY_ERROR\",\n {\n type,\n property\n }\n );\n }\n collection[key] = plugin;\n return collection;\n }, {});\n};\n"],"mappings":"AACA,OAAOA,WAAW,MAAM,eAAe;AAOvC,OAAO,MAAMC,gBAAgB,GAAsBC,MAAc,IAAK;EAClE,MAAM;IAAEC,OAAO,EAAEC,gBAAgB;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGJ,MAAM;EAC5D,MAAMC,OAAO,GAAGC,gBAAgB,CAACG,MAAM,CAAIF,IAAI,CAAC;EAChD,IAAIF,OAAO,CAACK,MAAM,KAAK,CAAC,EAAE;IACtB,OAAO,CAAC,CAAC;EACb;EACA,OAAOL,OAAO,CAACM,MAAM,CAAoB,CAACC,UAAU,EAAEC,MAAM,KAAK;IAC7D,MAAMC,GAAwB,GAAGD,MAAM,CAACL,QAAQ,CAAC;IACjD,IAAI,OAAOM,GAAG,KAAK,QAAQ,EAAE;MACzB,MAAM,IAAIZ,WAAW,CACjB,kDAAkD,EAClD,uBAAuB,EACvB;QACIK,IAAI;QACJC;MACJ,CACJ,CAAC;IACL;IACAI,UAAU,CAACE,GAAG,CAAC,GAAGD,MAAM;IACxB,OAAOD,UAAU;EACrB,CAAC,EAAE,CAAC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/mapPlugins.js","sources":["../../../../src/operations/entry/filtering/mapPlugins.ts"],"sourcesContent":["import type { Plugin, PluginsContainer } from \"@webiny/plugins/types.js\";\nimport WebinyError from \"@webiny/error\";\n\ninterface Params {\n plugins: PluginsContainer;\n type: string;\n property: string;\n}\nexport const getMappedPlugins = <T extends Plugin>(params: Params) => {\n const { plugins: pluginsContainer, type, property } = params;\n const plugins = pluginsContainer.byType<T>(type);\n if (plugins.length === 0) {\n return {};\n }\n return plugins.reduce<Record<string, T>>((collection, plugin) => {\n const key: keyof typeof plugin = plugin[property];\n if (typeof key !== \"string\") {\n throw new WebinyError(\n \"Property to map the plugins on must be a string.\",\n \"PLUGIN_PROPERTY_ERROR\",\n {\n type,\n property\n }\n );\n }\n collection[key] = plugin;\n return collection;\n }, {});\n};\n"],"names":["getMappedPlugins","params","pluginsContainer","type","property","plugins","collection","plugin","key","WebinyError"],"mappings":";AAQO,MAAMA,mBAAmB,CAAmBC;IAC/C,MAAM,EAAE,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGH;IACtD,MAAMI,UAAUH,iBAAiB,MAAM,CAAIC;IAC3C,IAAIE,AAAmB,MAAnBA,QAAQ,MAAM,EACd,OAAO,CAAC;IAEZ,OAAOA,QAAQ,MAAM,CAAoB,CAACC,YAAYC;QAClD,MAAMC,MAA2BD,MAAM,CAACH,SAAS;QACjD,IAAI,AAAe,YAAf,OAAOI,KACP,MAAM,IAAIC,MACN,oDACA,yBACA;YACIN;YACAC;QACJ;QAGRE,UAAU,CAACE,IAAI,GAAGD;QAClB,OAAOD;IACX,GAAG,CAAC;AACR"}
@@ -1,37 +1,33 @@
1
- import WebinyError from "@webiny/error";
1
+ import error from "@webiny/error";
2
2
  import { CmsEntryFieldFilterPlugin } from "../../../../plugins/CmsEntryFieldFilterPlugin.js";
3
- export const createDefaultFilterCreate = () => {
4
- const plugin = new CmsEntryFieldFilterPlugin({
5
- fieldType: CmsEntryFieldFilterPlugin.ALL,
6
- create: params => {
7
- const {
8
- negate,
9
- transformValue,
10
- field,
11
- compareValue,
12
- valueFilterRegistry
13
- } = params;
14
- const filter = valueFilterRegistry.get(params.operation);
15
- if (!filter) {
16
- throw new WebinyError(`Missing ValueFilterPlugin for operation "${params.operation}".`, "MISSING_OPERATION_PLUGIN", {
17
- operation: params.operation
18
- });
19
- }
20
- return {
21
- negate,
22
- transformValue,
23
- field,
24
- compareValue,
25
- fieldPathId: [...field.parents.map(f => f.fieldId), field.fieldId].join("."),
26
- path: field.createPath({
27
- field
28
- }),
29
- filter
30
- };
31
- }
32
- });
33
- plugin.name = `headless-cms.ddb.filter.default`;
34
- return plugin;
3
+ const createDefaultFilterCreate = ()=>{
4
+ const plugin = new CmsEntryFieldFilterPlugin({
5
+ fieldType: CmsEntryFieldFilterPlugin.ALL,
6
+ create: (params)=>{
7
+ const { negate, transformValue, field, compareValue, valueFilterRegistry } = params;
8
+ const filter = valueFilterRegistry.get(params.operation);
9
+ if (!filter) throw new error(`Missing ValueFilterPlugin for operation "${params.operation}".`, "MISSING_OPERATION_PLUGIN", {
10
+ operation: params.operation
11
+ });
12
+ return {
13
+ negate,
14
+ transformValue,
15
+ field,
16
+ compareValue,
17
+ fieldPathId: [
18
+ ...field.parents.map((f)=>f.fieldId),
19
+ field.fieldId
20
+ ].join("."),
21
+ path: field.createPath({
22
+ field
23
+ }),
24
+ filter
25
+ };
26
+ }
27
+ });
28
+ plugin.name = "headless-cms.ddb.filter.default";
29
+ return plugin;
35
30
  };
31
+ export { createDefaultFilterCreate };
36
32
 
37
33
  //# sourceMappingURL=defaultFilterCreate.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","CmsEntryFieldFilterPlugin","createDefaultFilterCreate","plugin","fieldType","ALL","create","params","negate","transformValue","field","compareValue","valueFilterRegistry","filter","get","operation","fieldPathId","parents","map","f","fieldId","join","path","createPath","name"],"sources":["defaultFilterCreate.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryFieldFilterPlugin } from \"~/plugins/CmsEntryFieldFilterPlugin.js\";\n\nexport const createDefaultFilterCreate = () => {\n const plugin = new CmsEntryFieldFilterPlugin({\n fieldType: CmsEntryFieldFilterPlugin.ALL,\n create: params => {\n const { negate, transformValue, field, compareValue, valueFilterRegistry } = params;\n const filter = valueFilterRegistry.get(params.operation);\n if (!filter) {\n throw new WebinyError(\n `Missing ValueFilterPlugin for operation \"${params.operation}\".`,\n \"MISSING_OPERATION_PLUGIN\",\n {\n operation: params.operation\n }\n );\n }\n return {\n negate,\n transformValue,\n field,\n compareValue,\n fieldPathId: [...field.parents.map(f => f.fieldId), field.fieldId].join(\".\"),\n path: field.createPath({\n field\n }),\n filter\n };\n }\n });\n\n plugin.name = `headless-cms.ddb.filter.default`;\n\n return plugin;\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AACvC,SAASC,yBAAyB;AAElC,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC3C,MAAMC,MAAM,GAAG,IAAIF,yBAAyB,CAAC;IACzCG,SAAS,EAAEH,yBAAyB,CAACI,GAAG;IACxCC,MAAM,EAAEC,MAAM,IAAI;MACd,MAAM;QAAEC,MAAM;QAAEC,cAAc;QAAEC,KAAK;QAAEC,YAAY;QAAEC;MAAoB,CAAC,GAAGL,MAAM;MACnF,MAAMM,MAAM,GAAGD,mBAAmB,CAACE,GAAG,CAACP,MAAM,CAACQ,SAAS,CAAC;MACxD,IAAI,CAACF,MAAM,EAAE;QACT,MAAM,IAAIb,WAAW,CACjB,4CAA4CO,MAAM,CAACQ,SAAS,IAAI,EAChE,0BAA0B,EAC1B;UACIA,SAAS,EAAER,MAAM,CAACQ;QACtB,CACJ,CAAC;MACL;MACA,OAAO;QACHP,MAAM;QACNC,cAAc;QACdC,KAAK;QACLC,YAAY;QACZK,WAAW,EAAE,CAAC,GAAGN,KAAK,CAACO,OAAO,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,OAAO,CAAC,EAAEV,KAAK,CAACU,OAAO,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;QAC5EC,IAAI,EAAEZ,KAAK,CAACa,UAAU,CAAC;UACnBb;QACJ,CAAC,CAAC;QACFG;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEFV,MAAM,CAACqB,IAAI,GAAG,iCAAiC;EAE/C,OAAOrB,MAAM;AACjB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/plugins/defaultFilterCreate.js","sources":["../../../../../src/operations/entry/filtering/plugins/defaultFilterCreate.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryFieldFilterPlugin } from \"~/plugins/CmsEntryFieldFilterPlugin.js\";\n\nexport const createDefaultFilterCreate = () => {\n const plugin = new CmsEntryFieldFilterPlugin({\n fieldType: CmsEntryFieldFilterPlugin.ALL,\n create: params => {\n const { negate, transformValue, field, compareValue, valueFilterRegistry } = params;\n const filter = valueFilterRegistry.get(params.operation);\n if (!filter) {\n throw new WebinyError(\n `Missing ValueFilterPlugin for operation \"${params.operation}\".`,\n \"MISSING_OPERATION_PLUGIN\",\n {\n operation: params.operation\n }\n );\n }\n return {\n negate,\n transformValue,\n field,\n compareValue,\n fieldPathId: [...field.parents.map(f => f.fieldId), field.fieldId].join(\".\"),\n path: field.createPath({\n field\n }),\n filter\n };\n }\n });\n\n plugin.name = `headless-cms.ddb.filter.default`;\n\n return plugin;\n};\n"],"names":["createDefaultFilterCreate","plugin","CmsEntryFieldFilterPlugin","params","negate","transformValue","field","compareValue","valueFilterRegistry","filter","WebinyError","f"],"mappings":";;AAGO,MAAMA,4BAA4B;IACrC,MAAMC,SAAS,IAAIC,0BAA0B;QACzC,WAAWA,0BAA0B,GAAG;QACxC,QAAQC,CAAAA;YACJ,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAEC,YAAY,EAAEC,mBAAmB,EAAE,GAAGL;YAC7E,MAAMM,SAASD,oBAAoB,GAAG,CAACL,OAAO,SAAS;YACvD,IAAI,CAACM,QACD,MAAM,IAAIC,MACN,CAAC,yCAAyC,EAAEP,OAAO,SAAS,CAAC,EAAE,CAAC,EAChE,4BACA;gBACI,WAAWA,OAAO,SAAS;YAC/B;YAGR,OAAO;gBACHC;gBACAC;gBACAC;gBACAC;gBACA,aAAa;uBAAID,MAAM,OAAO,CAAC,GAAG,CAACK,CAAAA,IAAKA,EAAE,OAAO;oBAAGL,MAAM,OAAO;iBAAC,CAAC,IAAI,CAAC;gBACxE,MAAMA,MAAM,UAAU,CAAC;oBACnBA;gBACJ;gBACAG;YACJ;QACJ;IACJ;IAEAR,OAAO,IAAI,GAAG;IAEd,OAAOA;AACX"}
@@ -2,8 +2,12 @@ import { createDefaultFilterCreate } from "./defaultFilterCreate.js";
2
2
  import { createRefFilterCreate } from "./refFilterCreate.js";
3
3
  import { objectFilterCreate } from "./objectFilterCreate.js";
4
4
  import { searchableJsonFilterCreate } from "./searchableJsonFilterCreate.js";
5
- export const createFilterCreatePlugins = () => {
6
- return [createDefaultFilterCreate(), createRefFilterCreate(), objectFilterCreate(), searchableJsonFilterCreate()];
7
- };
5
+ const createFilterCreatePlugins = ()=>[
6
+ createDefaultFilterCreate(),
7
+ createRefFilterCreate(),
8
+ objectFilterCreate(),
9
+ searchableJsonFilterCreate()
10
+ ];
11
+ export { createFilterCreatePlugins };
8
12
 
9
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createDefaultFilterCreate","createRefFilterCreate","objectFilterCreate","searchableJsonFilterCreate","createFilterCreatePlugins"],"sources":["index.ts"],"sourcesContent":["import { createDefaultFilterCreate } from \"./defaultFilterCreate.js\";\nimport { createRefFilterCreate } from \"./refFilterCreate.js\";\nimport { objectFilterCreate } from \"./objectFilterCreate.js\";\nimport { searchableJsonFilterCreate } from \"./searchableJsonFilterCreate.js\";\n\nexport const createFilterCreatePlugins = () => {\n return [\n createDefaultFilterCreate(),\n createRefFilterCreate(),\n objectFilterCreate(),\n searchableJsonFilterCreate()\n ];\n};\n"],"mappings":"AAAA,SAASA,yBAAyB;AAClC,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;AAC3B,SAASC,0BAA0B;AAEnC,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC3C,OAAO,CACHJ,yBAAyB,CAAC,CAAC,EAC3BC,qBAAqB,CAAC,CAAC,EACvBC,kBAAkB,CAAC,CAAC,EACpBC,0BAA0B,CAAC,CAAC,CAC/B;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/filtering/plugins/index.js","sources":["../../../../../src/operations/entry/filtering/plugins/index.ts"],"sourcesContent":["import { createDefaultFilterCreate } from \"./defaultFilterCreate.js\";\nimport { createRefFilterCreate } from \"./refFilterCreate.js\";\nimport { objectFilterCreate } from \"./objectFilterCreate.js\";\nimport { searchableJsonFilterCreate } from \"./searchableJsonFilterCreate.js\";\n\nexport const createFilterCreatePlugins = () => {\n return [\n createDefaultFilterCreate(),\n createRefFilterCreate(),\n objectFilterCreate(),\n searchableJsonFilterCreate()\n ];\n};\n"],"names":["createFilterCreatePlugins","createDefaultFilterCreate","createRefFilterCreate","objectFilterCreate","searchableJsonFilterCreate"],"mappings":";;;;AAKO,MAAMA,4BAA4B,IAC9B;QACHC;QACAC;QACAC;QACAC;KACH"}
@@ -1,84 +1,68 @@
1
1
  import { CmsEntryFieldFilterPlugin } from "../../../../plugins/CmsEntryFieldFilterPlugin.js";
2
2
  import { extractWhereParams } from "../where.js";
3
- import WebinyError from "@webiny/error";
3
+ import error from "@webiny/error";
4
4
  import { transformValue } from "../transform.js";
5
5
  import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
6
- export const objectFilterCreate = () => {
7
- const plugin = new CmsEntryFieldFilterPlugin({
8
- fieldType: "object",
9
- create: params => {
10
- const {
11
- value: objectValue,
12
- valueFilterRegistry,
13
- transformValuePlugins,
14
- getFilterCreatePlugin,
15
- field: parentField,
16
- fields
17
- } = params;
18
- const filters = [];
19
- for (const key in objectValue) {
20
- const value = objectValue[key];
21
- if (value === undefined) {
22
- continue;
6
+ const objectFilterCreate = ()=>{
7
+ const plugin = new CmsEntryFieldFilterPlugin({
8
+ fieldType: "object",
9
+ create: (params)=>{
10
+ const { value: objectValue, valueFilterRegistry, transformValuePlugins, getFilterCreatePlugin, field: parentField, fields } = params;
11
+ const filters = [];
12
+ for(const key in objectValue){
13
+ const value = objectValue[key];
14
+ if (void 0 === value) continue;
15
+ const whereParams = extractWhereParams(key);
16
+ if (!whereParams) continue;
17
+ const { negate, fieldId, operation } = whereParams;
18
+ const fieldPath = parentField.parents.map((p)=>p.fieldId).concat([
19
+ parentField.fieldId,
20
+ fieldId
21
+ ]).join(".");
22
+ const field = fields[fieldPath];
23
+ if (!field) throw new error(`There is no field with the field path "${fieldPath}".`, "FIELD_ERROR", {
24
+ fieldId
25
+ });
26
+ const fieldType = getBaseFieldType(field);
27
+ const filterCreatePlugin = getFilterCreatePlugin(fieldType);
28
+ const transformValuePlugin = transformValuePlugins[fieldType];
29
+ const transformValueCallable = (value)=>{
30
+ if (!transformValuePlugin) return value;
31
+ return transformValuePlugin.transform({
32
+ field,
33
+ value
34
+ });
35
+ };
36
+ const result = filterCreatePlugin.create({
37
+ key,
38
+ value,
39
+ valueFilterRegistry,
40
+ transformValuePlugins,
41
+ getFilterCreatePlugin,
42
+ operation,
43
+ negate,
44
+ field,
45
+ fields,
46
+ compareValue: transformValue({
47
+ value,
48
+ transform: transformValueCallable
49
+ }),
50
+ transformValue: transformValueCallable
51
+ });
52
+ if (result) {
53
+ if (Array.isArray(result)) {
54
+ filters.push(...result);
55
+ continue;
56
+ }
57
+ filters.push(result);
58
+ }
59
+ }
60
+ return filters;
23
61
  }
24
- const whereParams = extractWhereParams(key);
25
- if (!whereParams) {
26
- continue;
27
- }
28
- const {
29
- negate,
30
- fieldId,
31
- operation
32
- } = whereParams;
33
- const fieldPath = parentField.parents.map(p => p.fieldId).concat([parentField.fieldId, fieldId]).join(".");
34
- const field = fields[fieldPath];
35
- if (!field) {
36
- throw new WebinyError(`There is no field with the field path "${fieldPath}".`, "FIELD_ERROR", {
37
- fieldId
38
- });
39
- }
40
- const fieldType = getBaseFieldType(field);
41
- const filterCreatePlugin = getFilterCreatePlugin(fieldType);
42
- const transformValuePlugin = transformValuePlugins[fieldType];
43
- const transformValueCallable = value => {
44
- if (!transformValuePlugin) {
45
- return value;
46
- }
47
- return transformValuePlugin.transform({
48
- field,
49
- value
50
- });
51
- };
52
- const result = filterCreatePlugin.create({
53
- key,
54
- value,
55
- valueFilterRegistry,
56
- transformValuePlugins,
57
- getFilterCreatePlugin,
58
- operation,
59
- negate,
60
- field,
61
- fields,
62
- compareValue: transformValue({
63
- value,
64
- transform: transformValueCallable
65
- }),
66
- transformValue: transformValueCallable
67
- });
68
- if (!result) {
69
- continue;
70
- }
71
- if (Array.isArray(result)) {
72
- filters.push(...result);
73
- continue;
74
- }
75
- filters.push(result);
76
- }
77
- return filters;
78
- }
79
- });
80
- plugin.name = `headless-cms.ddb.filter.object`;
81
- return plugin;
62
+ });
63
+ plugin.name = "headless-cms.ddb.filter.object";
64
+ return plugin;
82
65
  };
66
+ export { objectFilterCreate };
83
67
 
84
68
  //# sourceMappingURL=objectFilterCreate.js.map