@webiny/api-headless-cms-ddb-es 0.0.0-unstable.6f45466a1d → 0.0.0-unstable.7be00a75a9
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/configurations.d.ts +5 -4
- package/configurations.js +27 -33
- package/configurations.js.map +1 -1
- package/definitions/entry.js +7 -9
- package/definitions/entry.js.map +1 -1
- package/definitions/group.js +7 -9
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +7 -9
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +9 -3
- package/definitions/types.js +0 -3
- package/elasticsearch/createElasticsearchIndex.d.ts +3 -3
- package/elasticsearch/createElasticsearchIndex.js +52 -27
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
- package/elasticsearch/deleteElasticsearchIndex.js +18 -26
- package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
- package/exports/api/cms/opensearch.d.ts +9 -0
- package/exports/api/cms/opensearch.js +9 -0
- package/feature.d.ts +1 -0
- package/feature.js +179 -0
- package/feature.js.map +1 -0
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
- package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
- package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
- package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
- package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
- package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
- package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
- package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
- package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
- package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
- package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
- package/features/CmsEntryOpenSearchFilter/index.js +3 -0
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
- package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +17 -0
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +1 -0
- package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +14 -0
- package/features/CmsEntryOpenSearchIndex/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchIndex/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchIndex/feature.d.ts +4 -0
- package/features/CmsEntryOpenSearchIndex/feature.js +11 -0
- package/features/CmsEntryOpenSearchIndex/feature.js.map +1 -0
- package/features/CmsEntryOpenSearchIndex/index.d.ts +3 -0
- package/features/CmsEntryOpenSearchIndex/index.js +3 -0
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
- package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
- package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
- package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
- package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
- package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
- package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
- package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
- package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
- package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
- package/helpers/entryIndexHelpers.d.ts +6 -4
- package/helpers/entryIndexHelpers.js +70 -186
- package/helpers/entryIndexHelpers.js.map +1 -1
- package/helpers/fieldIdentifier.js +18 -30
- package/helpers/fieldIdentifier.js.map +1 -1
- package/helpers/index.js +0 -2
- package/index.d.ts +1 -3
- package/index.js +1 -190
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +22 -29
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/constants.js +2 -1
- package/operations/entry/dataLoader/constants.js.map +1 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -26
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +28 -34
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +28 -34
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.js +33 -43
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/index.js +8 -9
- package/operations/entry/dataLoader/index.js.map +1 -1
- package/operations/entry/dataLoader/types.d.ts +1 -0
- package/operations/entry/dataLoader/types.js +0 -3
- package/operations/entry/dataLoaders.js +81 -97
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +6 -24
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
- package/operations/entry/elasticsearch/body.d.ts +19 -3
- package/operations/entry/elasticsearch/body.js +74 -122
- package/operations/entry/elasticsearch/body.js.map +1 -1
- package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
- package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
- package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
- package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/live.js +50 -0
- package/operations/entry/elasticsearch/fields/live.js.map +1 -0
- package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/location.js +50 -0
- package/operations/entry/elasticsearch/fields/location.js.map +1 -0
- package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/state.js +104 -0
- package/operations/entry/elasticsearch/fields/state.js.map +1 -0
- package/operations/entry/elasticsearch/fields.d.ts +6 -4
- package/operations/entry/elasticsearch/fields.js +194 -388
- package/operations/entry/elasticsearch/fields.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +6 -5
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +32 -45
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +6 -2
- package/operations/entry/elasticsearch/filtering/exec.js +84 -166
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/index.js +0 -2
- package/operations/entry/elasticsearch/filtering/path.d.ts +4 -3
- package/operations/entry/elasticsearch/filtering/path.js +24 -35
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
- package/operations/entry/elasticsearch/filtering/populated.js +8 -14
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/values.js +11 -12
- package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +7 -6
- package/operations/entry/elasticsearch/fullTextSearch.js +45 -79
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +4 -4
- package/operations/entry/elasticsearch/fullTextSearchFields.js +7 -17
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +3 -3
- package/operations/entry/elasticsearch/initialQuery.js +37 -80
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
- package/operations/entry/elasticsearch/keyword.js +13 -27
- package/operations/entry/elasticsearch/keyword.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -2
- package/operations/entry/elasticsearch/plugins/operator.js +10 -21
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +6 -4
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -1
- package/operations/entry/elasticsearch/sort.d.ts +4 -4
- package/operations/entry/elasticsearch/sort.js +69 -96
- package/operations/entry/elasticsearch/sort.js.map +1 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +2 -9
- package/operations/entry/elasticsearch/transformValueForSearch.js +9 -24
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
- package/operations/entry/elasticsearch/types.d.ts +3 -10
- package/operations/entry/elasticsearch/types.js +0 -3
- package/operations/entry/index.d.ts +22 -2
- package/operations/entry/index.js +1316 -1650
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/keys.js +43 -63
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +4 -9
- package/operations/entry/recordType.js.map +1 -1
- package/operations/entry/transformations/convertEntryKeys.js +21 -26
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
- package/operations/entry/transformations/index.d.ts +6 -2
- package/operations/entry/transformations/index.js +84 -112
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/entry/transformations/modifyEntryValues.d.ts +6 -4
- package/operations/entry/transformations/modifyEntryValues.js +12 -17
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
- package/operations/entry/transformations/transformEntryKeys.js +13 -16
- package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
- package/operations/entry/transformations/transformEntryToIndex.d.ts +2 -2
- package/operations/entry/transformations/transformEntryToIndex.js +16 -20
- package/operations/entry/transformations/transformEntryToIndex.js.map +1 -1
- package/operations/group/index.d.ts +2 -2
- package/operations/group/index.js +115 -139
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.d.ts +1 -1
- package/operations/model/index.js +128 -157
- package/operations/model/index.js.map +1 -1
- package/package.json +35 -30
- package/tasks/createIndexTaskPlugin.js +36 -32
- package/tasks/createIndexTaskPlugin.js.map +1 -1
- package/types.d.ts +7 -112
- package/types.js +7 -36
- package/types.js.map +1 -1
- package/values/NoValueContainer.js +8 -10
- package/values/NoValueContainer.js.map +1 -1
- package/definitions/types.js.map +0 -1
- package/dynamoDb/index.d.ts +0 -3
- package/dynamoDb/index.js +0 -8
- package/dynamoDb/index.js.map +0 -1
- package/dynamoDb/storage/longText.d.ts +0 -10
- package/dynamoDb/storage/longText.js +0 -88
- package/dynamoDb/storage/longText.js.map +0 -1
- package/dynamoDb/storage/richText.d.ts +0 -2
- package/dynamoDb/storage/richText.js +0 -51
- package/dynamoDb/storage/richText.js.map +0 -1
- package/elasticsearch/index.d.ts +0 -2
- package/elasticsearch/index.js +0 -5
- package/elasticsearch/index.js.map +0 -1
- package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
- package/elasticsearch/indexing/dateTimeIndexing.js +0 -81
- package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
- package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
- package/elasticsearch/indexing/defaultFieldIndexing.js +0 -47
- package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
- package/elasticsearch/indexing/index.d.ts +0 -2
- package/elasticsearch/indexing/index.js +0 -10
- package/elasticsearch/indexing/index.js.map +0 -1
- package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
- package/elasticsearch/indexing/jsonIndexing.js +0 -21
- package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
- package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
- package/elasticsearch/indexing/longTextIndexing.js +0 -35
- package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
- package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
- package/elasticsearch/indexing/numberIndexing.js +0 -34
- package/elasticsearch/indexing/numberIndexing.js.map +0 -1
- package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
- package/elasticsearch/indexing/objectIndexing.js +0 -194
- package/elasticsearch/indexing/objectIndexing.js.map +0 -1
- package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
- package/elasticsearch/indexing/richTextIndexing.js +0 -24
- package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
- package/elasticsearch/indices/base.d.ts +0 -2
- package/elasticsearch/indices/base.js +0 -7
- package/elasticsearch/indices/base.js.map +0 -1
- package/elasticsearch/indices/index.d.ts +0 -1
- package/elasticsearch/indices/index.js +0 -6
- package/elasticsearch/indices/index.js.map +0 -1
- package/elasticsearch/search/index.d.ts +0 -3
- package/elasticsearch/search/index.js +0 -6
- package/elasticsearch/search/index.js.map +0 -1
- package/elasticsearch/search/refSearch.d.ts +0 -2
- package/elasticsearch/search/refSearch.js +0 -24
- package/elasticsearch/search/refSearch.js.map +0 -1
- package/elasticsearch/search/searchableJson.d.ts +0 -2
- package/elasticsearch/search/searchableJson.js +0 -53
- package/elasticsearch/search/searchableJson.js.map +0 -1
- package/elasticsearch/search/timeSearch.d.ts +0 -2
- package/elasticsearch/search/timeSearch.js +0 -20
- package/elasticsearch/search/timeSearch.js.map +0 -1
- package/helpers/index.js.map +0 -1
- package/index.js.map +0 -1
- package/operations/entry/dataLoader/types.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -22
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -8
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -61
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -49
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -11
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -11
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
- package/operations/entry/elasticsearch/plugins/search.js +0 -18
- package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -11
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
- package/operations/entry/elasticsearch/types.js.map +0 -1
- package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
- package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -46
- package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -13
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -19
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -6
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -32
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -32
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -13
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -13
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
- package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -42
- package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
- package/plugins/CmsEntryFilterPlugin.js +0 -15
- package/plugins/CmsEntryFilterPlugin.js.map +0 -1
- package/plugins/index.d.ts +0 -8
- package/plugins/index.js +0 -10
- package/plugins/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass JsonFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"json\";\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n rawValue: value\n };\n }\n\n public fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return rawValue;\n }\n}\n\nexport const JsonFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: JsonFieldIndexImpl,\n dependencies: []\n});\n"],"names":["JsonFieldIndexImpl","value","rawValue","JsonFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";AAEA,MAAMA;IAGK,QAAQ,EACXC,KAAK,EAC8B,EAAwC;QAC3E,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAU,EAAEC,QAAQ,EAA0C,EAAO;QACxE,OAAOA;IACX;;aAZgB,SAAS,GAAG;;AAahC;AAEO,MAAMC,iBAAiBC,6BAA6B,oBAAoB,CAAC;IAC5E,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
declare class LongTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
+
readonly fieldType = "long-text";
|
|
4
|
+
toIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
5
|
+
fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
6
|
+
}
|
|
7
|
+
export declare const LongTextFieldIndex: typeof LongTextFieldIndexImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
class LongTextFieldIndexImpl {
|
|
3
|
+
toIndex({ rawValue }) {
|
|
4
|
+
return {
|
|
5
|
+
value: Array.isArray(rawValue) ? rawValue : rawValue || ""
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
fromIndex({ value }) {
|
|
9
|
+
if (Array.isArray(value)) return value;
|
|
10
|
+
return value || "";
|
|
11
|
+
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.fieldType = "long-text";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const LongTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
17
|
+
implementation: LongTextFieldIndexImpl,
|
|
18
|
+
dependencies: []
|
|
19
|
+
});
|
|
20
|
+
export { LongTextFieldIndex };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=LongTextFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass LongTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"long-text\";\n\n public toIndex({\n rawValue\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n value: Array.isArray(rawValue) ? rawValue : rawValue || \"\"\n };\n }\n\n public fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (Array.isArray(value)) {\n return value;\n }\n return value || \"\";\n }\n}\n\nexport const LongTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: LongTextFieldIndexImpl,\n dependencies: []\n});\n"],"names":["LongTextFieldIndexImpl","rawValue","Array","value","LongTextFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";AAEA,MAAMA;IAGK,QAAQ,EACXC,QAAQ,EAC2B,EAAwC;QAC3E,OAAO;YACH,OAAOC,MAAM,OAAO,CAACD,YAAYA,WAAWA,YAAY;QAC5D;IACJ;IAEO,UAAU,EAAEE,KAAK,EAA0C,EAAO;QACrE,IAAID,MAAM,OAAO,CAACC,QACd,OAAOA;QAEX,OAAOA,SAAS;IACpB;;aAfgB,SAAS,GAAG;;AAgBhC;AAEO,MAAMC,qBAAqBC,6BAA6B,oBAAoB,CAAC;IAChF,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
declare class NumberFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
+
readonly fieldType = "number";
|
|
4
|
+
unmappedType(): string;
|
|
5
|
+
toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
6
|
+
fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
7
|
+
}
|
|
8
|
+
export declare const NumberFieldIndex: typeof NumberFieldIndexImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
const convertToString = (value)=>{
|
|
3
|
+
if (false === Array.isArray(value)) return value;
|
|
4
|
+
return value.map(String);
|
|
5
|
+
};
|
|
6
|
+
const convertToFloat = (value)=>{
|
|
7
|
+
if (false === Array.isArray(value)) return "string" == typeof value ? parseFloat(value) : value;
|
|
8
|
+
return value.map((v)=>parseFloat(v));
|
|
9
|
+
};
|
|
10
|
+
class NumberFieldIndexImpl {
|
|
11
|
+
unmappedType() {
|
|
12
|
+
return "float";
|
|
13
|
+
}
|
|
14
|
+
toIndex({ value }) {
|
|
15
|
+
return {
|
|
16
|
+
value: convertToString(value)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
fromIndex({ value }) {
|
|
20
|
+
return convertToFloat(value);
|
|
21
|
+
}
|
|
22
|
+
constructor(){
|
|
23
|
+
this.fieldType = "number";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const NumberFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
27
|
+
implementation: NumberFieldIndexImpl,
|
|
28
|
+
dependencies: []
|
|
29
|
+
});
|
|
30
|
+
export { NumberFieldIndex };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=NumberFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nconst convertToString = (value: number[] | number) => {\n if (Array.isArray(value) === false) {\n return value;\n }\n return (value as number[]).map(String);\n};\n\nconst convertToFloat = (value: string[] | number) => {\n if (Array.isArray(value) === false) {\n return typeof value === \"string\" ? parseFloat(value) : value;\n }\n return (value as string[]).map(v => parseFloat(v));\n};\n\nclass NumberFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"number\";\n\n public unmappedType(): string {\n return \"float\";\n }\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n value: convertToString(value)\n };\n }\n\n public fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return convertToFloat(value);\n }\n}\n\nexport const NumberFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: NumberFieldIndexImpl,\n dependencies: []\n});\n"],"names":["convertToString","value","Array","String","convertToFloat","parseFloat","v","NumberFieldIndexImpl","NumberFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";AAEA,MAAMA,kBAAkB,CAACC;IACrB,IAAIC,AAAyB,UAAzBA,MAAM,OAAO,CAACD,QACd,OAAOA;IAEX,OAAQA,MAAmB,GAAG,CAACE;AACnC;AAEA,MAAMC,iBAAiB,CAACH;IACpB,IAAIC,AAAyB,UAAzBA,MAAM,OAAO,CAACD,QACd,OAAO,AAAiB,YAAjB,OAAOA,QAAqBI,WAAWJ,SAASA;IAE3D,OAAQA,MAAmB,GAAG,CAACK,CAAAA,IAAKD,WAAWC;AACnD;AAEA,MAAMC;IAGK,eAAuB;QAC1B,OAAO;IACX;IAEO,QAAQ,EACXN,KAAK,EAC8B,EAAwC;QAC3E,OAAO;YACH,OAAOD,gBAAgBC;QAC3B;IACJ;IAEO,UAAU,EAAEA,KAAK,EAA0C,EAAO;QACrE,OAAOG,eAAeH;IAC1B;;aAhBgB,SAAS,GAAG;;AAiBhC;AAEO,MAAMO,mBAAmBC,6BAA6B,oBAAoB,CAAC;IAC9E,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
declare class ObjectFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
+
readonly fieldType = "object";
|
|
4
|
+
toIndex({ model, field, value: initialValue, rawValue: initialRawValue, getFieldIndex }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
5
|
+
fromIndex({ field, value, rawValue, model, getFieldIndex }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
6
|
+
private processToIndex;
|
|
7
|
+
private processFromIndex;
|
|
8
|
+
}
|
|
9
|
+
export declare const ObjectFieldIndex: typeof ObjectFieldIndexImpl & {
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { getFieldIdentifiers } from "../../../helpers/index.js";
|
|
2
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
+
class ObjectFieldIndexImpl {
|
|
4
|
+
toIndex({ model, field, value: initialValue, rawValue: initialRawValue, getFieldIndex }) {
|
|
5
|
+
if (!initialValue) return {
|
|
6
|
+
value: null
|
|
7
|
+
};
|
|
8
|
+
const fields = field.settings?.fields || [];
|
|
9
|
+
if (field.list) {
|
|
10
|
+
const result = {
|
|
11
|
+
value: [],
|
|
12
|
+
rawValue: []
|
|
13
|
+
};
|
|
14
|
+
for(const key in initialValue){
|
|
15
|
+
const { value, rawValue } = this.processToIndex({
|
|
16
|
+
value: initialValue[key],
|
|
17
|
+
rawValue: initialRawValue[key],
|
|
18
|
+
getFieldIndex,
|
|
19
|
+
model,
|
|
20
|
+
fields
|
|
21
|
+
});
|
|
22
|
+
result.value.push(value);
|
|
23
|
+
result.rawValue.push(rawValue);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
value: result.value.length > 0 ? result.value : void 0,
|
|
27
|
+
rawValue: result.rawValue.length > 0 ? result.rawValue : void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return this.processToIndex({
|
|
31
|
+
value: initialValue,
|
|
32
|
+
rawValue: initialRawValue,
|
|
33
|
+
getFieldIndex,
|
|
34
|
+
model,
|
|
35
|
+
fields
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
fromIndex({ field, value, rawValue, model, getFieldIndex }) {
|
|
39
|
+
if (!value) return null;
|
|
40
|
+
const fields = field.settings?.fields || [];
|
|
41
|
+
if (field.list) {
|
|
42
|
+
const source = value || rawValue || [];
|
|
43
|
+
return source.map((_, index)=>this.processFromIndex({
|
|
44
|
+
value: value ? value[index] || {} : {},
|
|
45
|
+
rawValue: rawValue ? rawValue[index] || {} : {},
|
|
46
|
+
getFieldIndex,
|
|
47
|
+
model,
|
|
48
|
+
fields
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
return this.processFromIndex({
|
|
52
|
+
value,
|
|
53
|
+
rawValue,
|
|
54
|
+
getFieldIndex,
|
|
55
|
+
model,
|
|
56
|
+
fields
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
processToIndex(params) {
|
|
60
|
+
const { fields, value: sourceValue, rawValue: sourceRawValue, getFieldIndex, model } = params;
|
|
61
|
+
return fields.reduce((values, field)=>{
|
|
62
|
+
const plugin = getFieldIndex(field.type);
|
|
63
|
+
const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
|
|
64
|
+
if (!identifiers) return values;
|
|
65
|
+
const { value, rawValue } = plugin.toIndex({
|
|
66
|
+
model,
|
|
67
|
+
field,
|
|
68
|
+
value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
|
|
69
|
+
rawValue: sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier],
|
|
70
|
+
getFieldIndex
|
|
71
|
+
});
|
|
72
|
+
if (void 0 !== value) values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
|
|
73
|
+
if (void 0 !== rawValue) values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] = rawValue;
|
|
74
|
+
return values;
|
|
75
|
+
}, {
|
|
76
|
+
value: {},
|
|
77
|
+
rawValue: {}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
constructor(){
|
|
81
|
+
this.fieldType = "object";
|
|
82
|
+
this.processFromIndex = (params)=>{
|
|
83
|
+
const { fields, value: sourceValue, rawValue: sourceRawValue, getFieldIndex, model } = params;
|
|
84
|
+
return fields.reduce((values, field)=>{
|
|
85
|
+
const plugin = getFieldIndex(field.type);
|
|
86
|
+
const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
|
|
87
|
+
if (!identifiers) return values;
|
|
88
|
+
const value = plugin.fromIndex({
|
|
89
|
+
model,
|
|
90
|
+
field,
|
|
91
|
+
value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
|
|
92
|
+
rawValue: sourceRawValue ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] : null,
|
|
93
|
+
getFieldIndex
|
|
94
|
+
});
|
|
95
|
+
if (void 0 !== value) values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
|
|
96
|
+
return values;
|
|
97
|
+
}, {});
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
102
|
+
implementation: ObjectFieldIndexImpl,
|
|
103
|
+
dependencies: []
|
|
104
|
+
});
|
|
105
|
+
export { ObjectFieldIndex };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=ObjectFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.ts"],"sourcesContent":["import type { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { getFieldIdentifiers } from \"~/helpers/index.js\";\nimport { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\ninterface ProcessToIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue: Record<string, any>;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n model: CmsModel;\n}\n\ninterface ReducerValue {\n value: Record<string, any>;\n rawValue: Record<string, any>;\n}\n\ninterface ProcessFromIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue?: Record<string, any> | null;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n model: CmsModel;\n}\n\nclass ObjectFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"object\";\n\n public toIndex({\n model,\n field,\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n if (!initialValue) {\n return { value: null };\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.list) {\n const result: { value: Record<string, any>[]; rawValue: Record<string, any>[] } = {\n value: [],\n rawValue: []\n };\n for (const key in initialValue) {\n const { value, rawValue } = this.processToIndex({\n value: initialValue[key],\n rawValue: initialRawValue[key],\n getFieldIndex,\n model,\n fields\n });\n\n result.value.push(value);\n result.rawValue.push(rawValue);\n }\n\n return {\n value: result.value.length > 0 ? result.value : undefined,\n rawValue: result.rawValue.length > 0 ? result.rawValue : undefined\n };\n }\n\n return this.processToIndex({\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex,\n model,\n fields\n });\n }\n\n public fromIndex({\n field,\n value,\n rawValue,\n model,\n getFieldIndex\n }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (!value) {\n return null;\n }\n\n const fields = field.settings?.fields || [];\n\n if (field.list) {\n const source = value || rawValue || [];\n\n return source.map((_: any, index: number) =>\n this.processFromIndex({\n value: value ? value[index] || {} : {},\n rawValue: rawValue ? rawValue[index] || {} : {},\n getFieldIndex,\n model,\n fields\n })\n );\n }\n\n return this.processFromIndex({\n value,\n rawValue,\n getFieldIndex,\n model,\n fields\n });\n }\n\n private processToIndex(params: ProcessToIndexParams): ReducerValue {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n model\n } = params;\n\n return fields.reduce<ReducerValue>(\n (values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const { value, rawValue } = plugin.toIndex({\n model,\n field,\n value: sourceValue[\n identifiers.valueIdentifier || identifiers.rawValueIdentifier\n ],\n rawValue:\n sourceRawValue[\n identifiers.rawValueIdentifier || identifiers.valueIdentifier\n ],\n getFieldIndex\n });\n\n if (value !== undefined) {\n values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] =\n value;\n }\n if (rawValue !== undefined) {\n values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] =\n rawValue;\n }\n\n return values;\n },\n { value: {}, rawValue: {} }\n );\n }\n\n private processFromIndex = (params: ProcessFromIndexParams): Record<string, any> => {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n model\n } = params;\n\n return fields.reduce<Record<string, any>>((values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const value = plugin.fromIndex({\n model,\n field,\n value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],\n rawValue: sourceRawValue\n ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier]\n : null,\n getFieldIndex\n });\n\n if (value !== undefined) {\n values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;\n }\n\n return values;\n }, {});\n };\n}\n\nexport const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: ObjectFieldIndexImpl,\n dependencies: []\n});\n"],"names":["ObjectFieldIndexImpl","model","field","initialValue","initialRawValue","getFieldIndex","fields","result","key","value","rawValue","undefined","source","_","index","params","sourceValue","sourceRawValue","values","plugin","identifiers","getFieldIdentifiers","ObjectFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";;AAyBA,MAAMA;IAGK,QAAQ,EACXC,KAAK,EACLC,KAAK,EACL,OAAOC,YAAY,EACnB,UAAUC,eAAe,EACzBC,aAAa,EACsB,EAAwC;QAC3E,IAAI,CAACF,cACD,OAAO;YAAE,OAAO;QAAK;QAGzB,MAAMG,SAAUJ,MAAM,QAAQ,EAAE,UAAU,EAAE;QAE5C,IAAIA,MAAM,IAAI,EAAE;YACZ,MAAMK,SAA4E;gBAC9E,OAAO,EAAE;gBACT,UAAU,EAAE;YAChB;YACA,IAAK,MAAMC,OAAOL,aAAc;gBAC5B,MAAM,EAAEM,KAAK,EAAEC,QAAQ,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;oBAC5C,OAAOP,YAAY,CAACK,IAAI;oBACxB,UAAUJ,eAAe,CAACI,IAAI;oBAC9BH;oBACAJ;oBACAK;gBACJ;gBAEAC,OAAO,KAAK,CAAC,IAAI,CAACE;gBAClBF,OAAO,QAAQ,CAAC,IAAI,CAACG;YACzB;YAEA,OAAO;gBACH,OAAOH,OAAO,KAAK,CAAC,MAAM,GAAG,IAAIA,OAAO,KAAK,GAAGI;gBAChD,UAAUJ,OAAO,QAAQ,CAAC,MAAM,GAAG,IAAIA,OAAO,QAAQ,GAAGI;YAC7D;QACJ;QAEA,OAAO,IAAI,CAAC,cAAc,CAAC;YACvB,OAAOR;YACP,UAAUC;YACVC;YACAJ;YACAK;QACJ;IACJ;IAEO,UAAU,EACbJ,KAAK,EACLO,KAAK,EACLC,QAAQ,EACRT,KAAK,EACLI,aAAa,EACwB,EAAO;QAC5C,IAAI,CAACI,OACD,OAAO;QAGX,MAAMH,SAASJ,MAAM,QAAQ,EAAE,UAAU,EAAE;QAE3C,IAAIA,MAAM,IAAI,EAAE;YACZ,MAAMU,SAASH,SAASC,YAAY,EAAE;YAEtC,OAAOE,OAAO,GAAG,CAAC,CAACC,GAAQC,QACvB,IAAI,CAAC,gBAAgB,CAAC;oBAClB,OAAOL,QAAQA,KAAK,CAACK,MAAM,IAAI,CAAC,IAAI,CAAC;oBACrC,UAAUJ,WAAWA,QAAQ,CAACI,MAAM,IAAI,CAAC,IAAI,CAAC;oBAC9CT;oBACAJ;oBACAK;gBACJ;QAER;QAEA,OAAO,IAAI,CAAC,gBAAgB,CAAC;YACzBG;YACAC;YACAL;YACAJ;YACAK;QACJ;IACJ;IAEQ,eAAeS,MAA4B,EAAgB;QAC/D,MAAM,EACFT,MAAM,EACN,OAAOU,WAAW,EAClB,UAAUC,cAAc,EACxBZ,aAAa,EACbJ,KAAK,EACR,GAAGc;QAEJ,OAAOT,OAAO,MAAM,CAChB,CAACY,QAAQhB;YACL,MAAMiB,SAASd,cAAcH,MAAM,IAAI;YAEvC,MAAMkB,cAAcC,oBAAoBL,aAAaC,gBAAgBf;YACrE,IAAI,CAACkB,aACD,OAAOF;YAGX,MAAM,EAAET,KAAK,EAAEC,QAAQ,EAAE,GAAGS,OAAO,OAAO,CAAC;gBACvClB;gBACAC;gBACA,OAAOc,WAAW,CACdI,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAChE;gBACD,UACIH,cAAc,CACVG,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAChE;gBACLf;YACJ;YAEA,IAAII,AAAUE,WAAVF,OACAS,OAAO,KAAK,CAACE,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC,GACvEX;YAER,IAAIC,AAAaC,WAAbD,UACAQ,OAAO,QAAQ,CAACE,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAAC,GAC1EV;YAGR,OAAOQ;QACX,GACA;YAAE,OAAO,CAAC;YAAG,UAAU,CAAC;QAAE;IAElC;;aAhIgB,SAAS,GAAG;aAkIpB,gBAAgB,GAAG,CAACH;YACxB,MAAM,EACFT,MAAM,EACN,OAAOU,WAAW,EAClB,UAAUC,cAAc,EACxBZ,aAAa,EACbJ,KAAK,EACR,GAAGc;YAEJ,OAAOT,OAAO,MAAM,CAAsB,CAACY,QAAQhB;gBAC/C,MAAMiB,SAASd,cAAcH,MAAM,IAAI;gBAEvC,MAAMkB,cAAcC,oBAAoBL,aAAaC,gBAAgBf;gBACrE,IAAI,CAACkB,aACD,OAAOF;gBAGX,MAAMT,QAAQU,OAAO,SAAS,CAAC;oBAC3BlB;oBACAC;oBACA,OAAOc,WAAW,CAACI,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC;oBACjF,UAAUH,iBACJA,cAAc,CAACG,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAAC,GAC7E;oBACNf;gBACJ;gBAEA,IAAII,AAAUE,WAAVF,OACAS,MAAM,CAACE,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC,GAAGX;gBAG5E,OAAOS;YACX,GAAG,CAAC;QACR;;AACJ;AAEO,MAAMI,mBAAmBC,6BAA6B,oBAAoB,CAAC;IAC9E,gBAAgBvB;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
declare class RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
+
readonly fieldType = "rich-text";
|
|
4
|
+
toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
5
|
+
fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
6
|
+
}
|
|
7
|
+
export declare const RichTextFieldIndex: typeof RichTextFieldIndexImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
class RichTextFieldIndexImpl {
|
|
3
|
+
toIndex({ value }) {
|
|
4
|
+
return {
|
|
5
|
+
rawValue: value
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
fromIndex({ rawValue }) {
|
|
9
|
+
return rawValue;
|
|
10
|
+
}
|
|
11
|
+
constructor(){
|
|
12
|
+
this.fieldType = "rich-text";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
16
|
+
implementation: RichTextFieldIndexImpl,
|
|
17
|
+
dependencies: []
|
|
18
|
+
});
|
|
19
|
+
export { RichTextFieldIndex };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=RichTextFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"rich-text\";\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n rawValue: value\n };\n }\n\n public fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return rawValue;\n }\n}\n\nexport const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: RichTextFieldIndexImpl,\n dependencies: []\n});\n"],"names":["RichTextFieldIndexImpl","value","rawValue","RichTextFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";AAEA,MAAMA;IAGK,QAAQ,EACXC,KAAK,EAC8B,EAAwC;QAC3E,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAU,EAAEC,QAAQ,EAA0C,EAAO;QACxE,OAAOA;IACX;;aAZgB,SAAS,GAAG;;AAahC;AAEO,MAAMC,qBAAqBC,6BAA6B,oBAAoB,CAAC;IAChF,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
+
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
+
declare class TextCompressedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
5
|
+
private readonly fieldRegistry;
|
|
6
|
+
readonly fieldType = TextFieldTypes.COMPRESSED;
|
|
7
|
+
constructor(fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface);
|
|
8
|
+
toIndex(params: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
9
|
+
fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
10
|
+
private isSearchable;
|
|
11
|
+
}
|
|
12
|
+
export declare const TextCompressedFieldIndex: typeof TextCompressedFieldIndexImpl & {
|
|
13
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
+
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
+
class TextCompressedFieldIndexImpl {
|
|
5
|
+
constructor(fieldRegistry){
|
|
6
|
+
this.fieldRegistry = fieldRegistry;
|
|
7
|
+
this.fieldType = TextFieldTypes.COMPRESSED;
|
|
8
|
+
}
|
|
9
|
+
toIndex(params) {
|
|
10
|
+
const { field, value } = params;
|
|
11
|
+
const isSearchable = this.isSearchable(field);
|
|
12
|
+
if (isSearchable) return {
|
|
13
|
+
value
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
rawValue: value
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
fromIndex(params) {
|
|
20
|
+
const { field, value, rawValue } = params;
|
|
21
|
+
const isSearchable = this.isSearchable(field);
|
|
22
|
+
if (isSearchable) return void 0 === value ? rawValue : value;
|
|
23
|
+
return void 0 === rawValue ? value : rawValue;
|
|
24
|
+
}
|
|
25
|
+
isSearchable(field) {
|
|
26
|
+
const fieldType = this.fieldRegistry.get(field.type);
|
|
27
|
+
if (!fieldType?.isSearchable) return false;
|
|
28
|
+
if (field.settings?.disableFullTextSearch === true) return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const TextCompressedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
33
|
+
implementation: TextCompressedFieldIndexImpl,
|
|
34
|
+
dependencies: [
|
|
35
|
+
CmsModelFieldToGraphQLRegistry
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
export { TextCompressedFieldIndex };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=TextCompressedFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { TextFieldTypes } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\n\nclass TextCompressedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = TextFieldTypes.COMPRESSED;\n\n public constructor(private readonly fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface) {}\n\n public toIndex(\n params: CmsEntryOpenSearchFieldIndex.ToIndex\n ): CmsEntryOpenSearchFieldIndex.ToValue {\n const { field, value } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return { value };\n }\n\n return {\n rawValue: value\n };\n }\n\n public fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const { field, value, rawValue } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n\n private isSearchable(field: CmsModelField): boolean {\n const fieldType = this.fieldRegistry.get(field.type);\n if (!fieldType?.isSearchable) {\n return false;\n } else if (field.settings?.disableFullTextSearch === true) {\n return false;\n }\n return true;\n }\n}\n\nexport const TextCompressedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: TextCompressedFieldIndexImpl,\n dependencies: [CmsModelFieldToGraphQLRegistry]\n});\n"],"names":["TextCompressedFieldIndexImpl","fieldRegistry","TextFieldTypes","params","field","value","isSearchable","rawValue","undefined","fieldType","TextCompressedFieldIndex","CmsEntryOpenSearchFieldIndex","CmsModelFieldToGraphQLRegistry"],"mappings":";;;AAKA,MAAMA;IAGF,YAAoCC,aAAuD,CAAE;aAAzDA,aAAa,GAAbA;aAFpB,SAAS,GAAGC,eAAe,UAAU;IAEyC;IAEvF,QACHC,MAA4C,EACR;QACpC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;QACzB,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAO;YAAED;QAAM;QAGnB,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAUF,MAA8C,EAAO;QAClE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEE,QAAQ,EAAE,GAAGJ;QACnC,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAOD,AAAUG,WAAVH,QAAsBE,WAAWF;QAE5C,OAAOE,AAAaC,WAAbD,WAAyBF,QAAQE;IAC5C;IAEQ,aAAaH,KAAoB,EAAW;QAChD,MAAMK,YAAY,IAAI,CAAC,aAAa,CAAC,GAAG,CAACL,MAAM,IAAI;QACnD,IAAI,CAACK,WAAW,cACZ,OAAO;QACJ,IAAIL,MAAM,QAAQ,EAAE,0BAA0B,MACjD,OAAO;QAEX,OAAO;IACX;AACJ;AAEO,MAAMM,2BAA2BC,6BAA6B,oBAAoB,CAAC;IACtF,gBAAgBX;IAChB,cAAc;QAACY;KAA+B;AAClD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
+
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
+
declare class TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
5
|
+
private readonly fieldRegistry;
|
|
6
|
+
readonly fieldType = TextFieldTypes.ENCRYPTED;
|
|
7
|
+
constructor(fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface);
|
|
8
|
+
toIndex(params: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
9
|
+
fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
10
|
+
private isSearchable;
|
|
11
|
+
}
|
|
12
|
+
export declare const TextEncryptedFieldIndex: typeof TextEncryptedFieldIndexImpl & {
|
|
13
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
+
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
+
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
+
class TextEncryptedFieldIndexImpl {
|
|
5
|
+
constructor(fieldRegistry){
|
|
6
|
+
this.fieldRegistry = fieldRegistry;
|
|
7
|
+
this.fieldType = TextFieldTypes.ENCRYPTED;
|
|
8
|
+
}
|
|
9
|
+
toIndex(params) {
|
|
10
|
+
const { field, value } = params;
|
|
11
|
+
const isSearchable = this.isSearchable(field);
|
|
12
|
+
if (isSearchable) return {
|
|
13
|
+
value
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
rawValue: value
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
fromIndex(params) {
|
|
20
|
+
const { field, value, rawValue } = params;
|
|
21
|
+
const isSearchable = this.isSearchable(field);
|
|
22
|
+
if (isSearchable) return void 0 === value ? rawValue : value;
|
|
23
|
+
return void 0 === rawValue ? value : rawValue;
|
|
24
|
+
}
|
|
25
|
+
isSearchable(field) {
|
|
26
|
+
const fieldType = this.fieldRegistry.get(field.type);
|
|
27
|
+
if (!fieldType?.isSearchable) return false;
|
|
28
|
+
if (field.settings?.disableFullTextSearch === true) return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
33
|
+
implementation: TextEncryptedFieldIndexImpl,
|
|
34
|
+
dependencies: [
|
|
35
|
+
CmsModelFieldToGraphQLRegistry
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
export { TextEncryptedFieldIndex };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=TextEncryptedFieldIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { TextFieldTypes } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\n\nclass TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = TextFieldTypes.ENCRYPTED;\n\n public constructor(private readonly fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface) {}\n\n public toIndex(\n params: CmsEntryOpenSearchFieldIndex.ToIndex\n ): CmsEntryOpenSearchFieldIndex.ToValue {\n const { field, value } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return { value };\n }\n\n return {\n rawValue: value\n };\n }\n\n public fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const { field, value, rawValue } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n\n private isSearchable(field: CmsModelField): boolean {\n const fieldType = this.fieldRegistry.get(field.type);\n if (!fieldType?.isSearchable) {\n return false;\n } else if (field.settings?.disableFullTextSearch === true) {\n return false;\n }\n return true;\n }\n}\n\nexport const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: TextEncryptedFieldIndexImpl,\n dependencies: [CmsModelFieldToGraphQLRegistry]\n});\n"],"names":["TextEncryptedFieldIndexImpl","fieldRegistry","TextFieldTypes","params","field","value","isSearchable","rawValue","undefined","fieldType","TextEncryptedFieldIndex","CmsEntryOpenSearchFieldIndex","CmsModelFieldToGraphQLRegistry"],"mappings":";;;AAKA,MAAMA;IAGF,YAAoCC,aAAuD,CAAE;aAAzDA,aAAa,GAAbA;aAFpB,SAAS,GAAGC,eAAe,SAAS;IAE0C;IAEvF,QACHC,MAA4C,EACR;QACpC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;QACzB,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAO;YAAED;QAAM;QAGnB,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAUF,MAA8C,EAAO;QAClE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEE,QAAQ,EAAE,GAAGJ;QACnC,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAOD,AAAUG,WAAVH,QAAsBE,WAAWF;QAE5C,OAAOE,AAAaC,WAAbD,WAAyBF,QAAQE;IAC5C;IAEQ,aAAaH,KAAoB,EAAW;QAChD,MAAMK,YAAY,IAAI,CAAC,aAAa,CAAC,GAAG,CAACL,MAAM,IAAI;QACnD,IAAI,CAACK,WAAW,cACZ,OAAO;QACJ,IAAIL,MAAM,QAAQ,EAAE,0BAA0B,MACjD,OAAO;QAEX,OAAO;IACX;AACJ;AAEO,MAAMM,0BAA0BC,6BAA6B,oBAAoB,CAAC;IACrF,gBAAgBX;IAChB,cAAc;QAACY;KAA+B;AAClD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CmsEntryOpenSearchFieldIndexFeature } from "../../features/CmsEntryOpenSearchFieldIndex/feature.js";
|
|
2
|
+
export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
+
export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CmsEntryOpenSearchFieldIndexFeature } from "./feature.js";
|
|
2
|
+
export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
+
export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFilterRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
|
|
2
|
+
import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
|
|
3
|
+
declare class CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {
|
|
4
|
+
private readonly filters;
|
|
5
|
+
constructor(filters: CmsEntryOpenSearchFilter.Interface[]);
|
|
6
|
+
get(type: string): CmsEntryOpenSearchFilter.Interface;
|
|
7
|
+
}
|
|
8
|
+
export declare const CmsEntryOpenSearchFilterRegistry: typeof CmsEntryOpenSearchFilterRegistryImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchFilterRegistry.js").ICmsEntryOpenSearchFilterRegistry>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import error from "@webiny/error";
|
|
2
|
+
import { CmsEntryOpenSearchFilterRegistry } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
|
|
3
|
+
import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
|
|
4
|
+
import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
|
|
5
|
+
import { FILTER_DEFAULT } from "./constants.js";
|
|
6
|
+
class CmsEntryOpenSearchFilterRegistryImpl {
|
|
7
|
+
constructor(filters){
|
|
8
|
+
this.filters = filters;
|
|
9
|
+
}
|
|
10
|
+
get(type) {
|
|
11
|
+
const fieldType = getBaseFieldType({
|
|
12
|
+
type
|
|
13
|
+
});
|
|
14
|
+
const filter = this.filters.find((f)=>f.fieldType === fieldType);
|
|
15
|
+
if (filter) return filter;
|
|
16
|
+
const fallback = this.filters.find((f)=>f.fieldType === FILTER_DEFAULT);
|
|
17
|
+
if (fallback) return fallback;
|
|
18
|
+
throw new error(`There is no filter for the given field type "${fieldType}".`, "FILTER_REGISTRY_ERROR", {
|
|
19
|
+
fieldType
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry = CmsEntryOpenSearchFilterRegistry.createImplementation({
|
|
24
|
+
implementation: CmsEntryOpenSearchFilterRegistryImpl,
|
|
25
|
+
dependencies: [
|
|
26
|
+
[
|
|
27
|
+
CmsEntryOpenSearchFilter,
|
|
28
|
+
{
|
|
29
|
+
multiple: true
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
export { CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry as CmsEntryOpenSearchFilterRegistry };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilterRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchFilterRegistry.js\";\nimport { CmsEntryOpenSearchFilter } from \"./abstractions/CmsEntryOpenSearchFilter.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\nimport { FILTER_DEFAULT } from \"./constants.js\";\n\nclass CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly filters: CmsEntryOpenSearchFilter.Interface[]) {}\n\n public get(type: string): CmsEntryOpenSearchFilter.Interface {\n const fieldType = getBaseFieldType({ type });\n const filter = this.filters.find(f => {\n return f.fieldType === fieldType;\n });\n if (filter) {\n return filter;\n }\n const fallback = this.filters.find(f => {\n return f.fieldType === FILTER_DEFAULT;\n });\n if (fallback) {\n return fallback;\n }\n throw new WebinyError(\n `There is no filter for the given field type \"${fieldType}\".`,\n \"FILTER_REGISTRY_ERROR\",\n {\n fieldType\n }\n );\n }\n}\n\nexport const CmsEntryOpenSearchFilterRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchFilterRegistryImpl,\n dependencies: [[CmsEntryOpenSearchFilter, { multiple: true }]]\n});\n"],"names":["CmsEntryOpenSearchFilterRegistryImpl","filters","type","fieldType","getBaseFieldType","filter","f","fallback","FILTER_DEFAULT","WebinyError","CmsEntryOpenSearchFilterRegistry","Abstraction","CmsEntryOpenSearchFilter"],"mappings":";;;;;AAMA,MAAMA;IACF,YAAoCC,OAA6C,CAAE;aAA/CA,OAAO,GAAPA;IAAgD;IAE7E,IAAIC,IAAY,EAAsC;QACzD,MAAMC,YAAYC,iBAAiB;YAAEF;QAAK;QAC1C,MAAMG,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,CAACC,CAAAA,IACtBA,EAAE,SAAS,KAAKH;QAE3B,IAAIE,QACA,OAAOA;QAEX,MAAME,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAACD,CAAAA,IACxBA,EAAE,SAAS,KAAKE;QAE3B,IAAID,UACA,OAAOA;QAEX,MAAM,IAAIE,MACN,CAAC,6CAA6C,EAAEN,UAAU,EAAE,CAAC,EAC7D,yBACA;YACIA;QACJ;IAER;AACJ;AAEO,MAAMO,oEAAmCC,iCAAAA,oBAAgC,CAAC;IAC7E,gBAAgBX;IAChB,cAAc;QAAC;YAACY;YAA0B;gBAAE,UAAU;YAAK;SAAE;KAAC;AAClE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ModelField, ModelFields } from "../../../operations/entry/elasticsearch/types.js";
|
|
2
|
+
import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
|
|
3
|
+
interface ApplyParams {
|
|
4
|
+
key: string;
|
|
5
|
+
value: any;
|
|
6
|
+
query: OpenSearchBoolQueryConfig;
|
|
7
|
+
operator: string;
|
|
8
|
+
field: ModelField;
|
|
9
|
+
}
|
|
10
|
+
export interface ApplyFilteringCb {
|
|
11
|
+
(params: ApplyParams): void;
|
|
12
|
+
}
|
|
13
|
+
export interface GetFilterCb {
|
|
14
|
+
(type: string): CmsEntryOpenSearchFilter.Interface;
|
|
15
|
+
}
|
|
16
|
+
export interface IExecParams {
|
|
17
|
+
applyFiltering: ApplyFilteringCb;
|
|
18
|
+
getFilter: GetFilterCb;
|
|
19
|
+
key: string;
|
|
20
|
+
value: any;
|
|
21
|
+
operator: string;
|
|
22
|
+
field: ModelField;
|
|
23
|
+
fields: ModelFields;
|
|
24
|
+
query: OpenSearchBoolQueryConfig;
|
|
25
|
+
}
|
|
26
|
+
export interface ICmsEntryOpenSearchFilter {
|
|
27
|
+
readonly fieldType: string;
|
|
28
|
+
exec(params: IExecParams): void;
|
|
29
|
+
}
|
|
30
|
+
export declare const CmsEntryOpenSearchFilter: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilter>;
|
|
31
|
+
export declare namespace CmsEntryOpenSearchFilter {
|
|
32
|
+
type Interface = ICmsEntryOpenSearchFilter;
|
|
33
|
+
type ExecParams = IExecParams;
|
|
34
|
+
type ApplyFiltering = ApplyFilteringCb;
|
|
35
|
+
type GetFilter = GetFilterCb;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\ninterface ApplyParams {\n key: string;\n value: any;\n query: OpenSearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\n\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterCb {\n (type: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport interface IExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilter: GetFilterCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: OpenSearchBoolQueryConfig;\n}\n\nexport interface ICmsEntryOpenSearchFilter {\n readonly fieldType: string;\n exec(params: IExecParams): void;\n}\n\nexport const CmsEntryOpenSearchFilter = createAbstraction<ICmsEntryOpenSearchFilter>(\n \"Cms/Entry/OpenSearch/Filter\"\n);\n\nexport namespace CmsEntryOpenSearchFilter {\n export type Interface = ICmsEntryOpenSearchFilter;\n export type ExecParams = IExecParams;\n export type ApplyFiltering = ApplyFilteringCb;\n export type GetFilter = GetFilterCb;\n}\n"],"names":["CmsEntryOpenSearchFilter","createAbstraction"],"mappings":";AAoCO,MAAMA,2BAA2BC,kBACpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CmsEntryOpenSearchFilter } from "./CmsEntryOpenSearchFilter.js";
|
|
2
|
+
export interface ICmsEntryOpenSearchFilterRegistry {
|
|
3
|
+
get(fieldType: string): CmsEntryOpenSearchFilter.Interface;
|
|
4
|
+
}
|
|
5
|
+
export declare const CmsEntryOpenSearchFilterRegistry: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilterRegistry>;
|
|
6
|
+
export declare namespace CmsEntryOpenSearchFilterRegistry {
|
|
7
|
+
type Interface = ICmsEntryOpenSearchFilterRegistry;
|
|
8
|
+
type Filter = CmsEntryOpenSearchFilter.Interface;
|
|
9
|
+
}
|
package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntryOpenSearchFilter } from \"./CmsEntryOpenSearchFilter.js\";\n\nexport interface ICmsEntryOpenSearchFilterRegistry {\n get(fieldType: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport const CmsEntryOpenSearchFilterRegistry =\n createAbstraction<ICmsEntryOpenSearchFilterRegistry>(\"Cms/Entry/OpenSearch/FilterRegistry\");\n\nexport namespace CmsEntryOpenSearchFilterRegistry {\n export type Interface = ICmsEntryOpenSearchFilterRegistry;\n export type Filter = CmsEntryOpenSearchFilter.Interface;\n}\n"],"names":["CmsEntryOpenSearchFilterRegistry","createAbstraction"],"mappings":";AAOO,MAAMA,mCACTC,kBAAqD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FILTER_DEFAULT: "*";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFilter/constants.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/constants.ts"],"sourcesContent":["export const FILTER_DEFAULT = \"*\" as const;\n"],"names":["FILTER_DEFAULT"],"mappings":"AAAO,MAAMA,iBAAiB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/api";
|
|
2
|
+
import { DefaultFilter } from "./fields/DefaultFilter.js";
|
|
3
|
+
import { RefFilter } from "./fields/RefFilter.js";
|
|
4
|
+
import { ObjectFilter } from "./fields/ObjectFilter.js";
|
|
5
|
+
import { CmsEntryOpenSearchFilterRegistry } from "./CmsEntryOpenSearchFilterRegistry.js";
|
|
6
|
+
const CmsEntryOpenSearchFilterFeature = createFeature({
|
|
7
|
+
name: "Cms/Entry/OpenSearch/FilterFeature",
|
|
8
|
+
register: (container)=>{
|
|
9
|
+
container.register(DefaultFilter);
|
|
10
|
+
container.register(RefFilter);
|
|
11
|
+
container.register(ObjectFilter);
|
|
12
|
+
container.register(CmsEntryOpenSearchFilterRegistry);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export { CmsEntryOpenSearchFilterFeature };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsEntryOpenSearchFilter/feature.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { DefaultFilter } from \"./fields/DefaultFilter.js\";\nimport { RefFilter } from \"./fields/RefFilter.js\";\nimport { ObjectFilter } from \"./fields/ObjectFilter.js\";\nimport { CmsEntryOpenSearchFilterRegistry } from \"./CmsEntryOpenSearchFilterRegistry.js\";\n\nexport const CmsEntryOpenSearchFilterFeature = createFeature({\n name: \"Cms/Entry/OpenSearch/FilterFeature\",\n register: container => {\n container.register(DefaultFilter);\n container.register(RefFilter);\n container.register(ObjectFilter);\n container.register(CmsEntryOpenSearchFilterRegistry);\n }\n});\n"],"names":["CmsEntryOpenSearchFilterFeature","createFeature","container","DefaultFilter","RefFilter","ObjectFilter","CmsEntryOpenSearchFilterRegistry"],"mappings":";;;;;AAMO,MAAMA,kCAAkCC,cAAc;IACzD,MAAM;IACN,UAAUC,CAAAA;QACNA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;IACvB;AACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
2
|
+
declare class DefaultFilterImpl implements CmsEntryOpenSearchFilter.Interface {
|
|
3
|
+
readonly fieldType: "*";
|
|
4
|
+
exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
|
|
5
|
+
}
|
|
6
|
+
export declare const DefaultFilter: typeof DefaultFilterImpl & {
|
|
7
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|