@datocms/cma-client 5.1.0 → 5.1.2
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/dist/cjs/fieldTypes/rich_text.js +7 -7
- package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
- package/dist/cjs/fieldTypes/single_block.js +21 -19
- package/dist/cjs/fieldTypes/single_block.js.map +1 -1
- package/dist/cjs/fieldTypes/structured_text.js +12 -24
- package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
- package/dist/cjs/generated/{SchemaTypes.js → ApiTypes.js} +1 -1
- package/dist/cjs/generated/ApiTypes.js.map +1 -0
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/{SimpleSchemaTypes.js → RawApiTypes.js} +1 -1
- package/dist/cjs/generated/RawApiTypes.js.map +1 -0
- package/dist/cjs/generated/resources/AccessToken.js.map +1 -1
- package/dist/cjs/generated/resources/AuditLogEvent.js.map +1 -1
- package/dist/cjs/generated/resources/BuildEvent.js.map +1 -1
- package/dist/cjs/generated/resources/BuildTrigger.js.map +1 -1
- package/dist/cjs/generated/resources/EditingSession.js.map +1 -1
- package/dist/cjs/generated/resources/EmojiSuggestions.js.map +1 -1
- package/dist/cjs/generated/resources/Environment.js.map +1 -1
- package/dist/cjs/generated/resources/Field.js.map +1 -1
- package/dist/cjs/generated/resources/Fieldset.js.map +1 -1
- package/dist/cjs/generated/resources/Item.js.map +1 -1
- package/dist/cjs/generated/resources/ItemType.js.map +1 -1
- package/dist/cjs/generated/resources/ItemTypeFilter.js.map +1 -1
- package/dist/cjs/generated/resources/ItemVersion.js.map +1 -1
- package/dist/cjs/generated/resources/JobResult.js.map +1 -1
- package/dist/cjs/generated/resources/MaintenanceMode.js.map +1 -1
- package/dist/cjs/generated/resources/MenuItem.js.map +1 -1
- package/dist/cjs/generated/resources/Plugin.js.map +1 -1
- package/dist/cjs/generated/resources/PublicInfo.js.map +1 -1
- package/dist/cjs/generated/resources/Role.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/cjs/generated/resources/SchemaMenuItem.js.map +1 -1
- package/dist/cjs/generated/resources/SearchResult.js.map +1 -1
- package/dist/cjs/generated/resources/Session.js.map +1 -1
- package/dist/cjs/generated/resources/Site.js.map +1 -1
- package/dist/cjs/generated/resources/SiteInvitation.js.map +1 -1
- package/dist/cjs/generated/resources/SsoGroup.js.map +1 -1
- package/dist/cjs/generated/resources/SsoSettings.js.map +1 -1
- package/dist/cjs/generated/resources/SsoUser.js.map +1 -1
- package/dist/cjs/generated/resources/SubscriptionLimit.js.map +1 -1
- package/dist/cjs/generated/resources/Upload.js.map +1 -1
- package/dist/cjs/generated/resources/UploadCollection.js.map +1 -1
- package/dist/cjs/generated/resources/UploadFilter.js.map +1 -1
- package/dist/cjs/generated/resources/UploadRequest.js.map +1 -1
- package/dist/cjs/generated/resources/UploadSmartTag.js.map +1 -1
- package/dist/cjs/generated/resources/UploadTag.js.map +1 -1
- package/dist/cjs/generated/resources/UploadTrack.js.map +1 -1
- package/dist/cjs/generated/resources/UsageCounter.js.map +1 -1
- package/dist/cjs/generated/resources/User.js.map +1 -1
- package/dist/cjs/generated/resources/Webhook.js.map +1 -1
- package/dist/cjs/generated/resources/WebhookCall.js.map +1 -1
- package/dist/cjs/generated/resources/WhiteLabelSettings.js.map +1 -1
- package/dist/cjs/generated/resources/Workflow.js.map +1 -1
- package/dist/cjs/index.js +2 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/Role.js.map +1 -1
- package/dist/cjs/utilities/blocks.js +7 -7
- package/dist/cjs/utilities/blocks.js.map +1 -1
- package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
- package/dist/cjs/utilities/fieldValue.js +253 -0
- package/dist/cjs/utilities/fieldValue.js.map +1 -0
- package/dist/cjs/utilities/fieldsContainingReferences.js.map +1 -1
- package/dist/cjs/utilities/recursiveBlocks.js +18 -19
- package/dist/cjs/utilities/recursiveBlocks.js.map +1 -1
- package/dist/cjs/utilities/schemaRepository.js.map +1 -1
- package/dist/esm/fieldTypes/rich_text.d.ts +7 -7
- package/dist/esm/fieldTypes/rich_text.js +6 -6
- package/dist/esm/fieldTypes/rich_text.js.map +1 -1
- package/dist/esm/fieldTypes/single_block.d.ts +30 -24
- package/dist/esm/fieldTypes/single_block.js +16 -14
- package/dist/esm/fieldTypes/single_block.js.map +1 -1
- package/dist/esm/fieldTypes/structured_text.d.ts +20 -85
- package/dist/esm/fieldTypes/structured_text.js +11 -23
- package/dist/esm/fieldTypes/structured_text.js.map +1 -1
- package/dist/esm/generated/{SimpleSchemaTypes.d.ts → ApiTypes.d.ts} +13 -8
- package/dist/esm/generated/ApiTypes.js +2 -0
- package/dist/esm/generated/ApiTypes.js.map +1 -0
- package/dist/esm/generated/Client.d.ts +1 -1
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/{SchemaTypes.d.ts → RawApiTypes.d.ts} +13 -8
- package/dist/esm/generated/RawApiTypes.js +2 -0
- package/dist/esm/generated/RawApiTypes.js.map +1 -0
- package/dist/esm/generated/resources/AccessToken.d.ts +14 -14
- package/dist/esm/generated/resources/AccessToken.js.map +1 -1
- package/dist/esm/generated/resources/AuditLogEvent.d.ts +4 -4
- package/dist/esm/generated/resources/AuditLogEvent.js.map +1 -1
- package/dist/esm/generated/resources/BuildEvent.d.ts +8 -8
- package/dist/esm/generated/resources/BuildEvent.js.map +1 -1
- package/dist/esm/generated/resources/BuildTrigger.d.ts +16 -16
- package/dist/esm/generated/resources/BuildTrigger.js.map +1 -1
- package/dist/esm/generated/resources/DailyUsage.d.ts +4 -4
- package/dist/esm/generated/resources/EditingSession.d.ts +7 -7
- package/dist/esm/generated/resources/EditingSession.js.map +1 -1
- package/dist/esm/generated/resources/EmojiSuggestions.d.ts +4 -4
- package/dist/esm/generated/resources/EmojiSuggestions.js.map +1 -1
- package/dist/esm/generated/resources/Environment.d.ts +14 -14
- package/dist/esm/generated/resources/Environment.js.map +1 -1
- package/dist/esm/generated/resources/Field.d.ts +213 -213
- package/dist/esm/generated/resources/Field.js.map +1 -1
- package/dist/esm/generated/resources/Fieldset.d.ts +12 -12
- package/dist/esm/generated/resources/Fieldset.js.map +1 -1
- package/dist/esm/generated/resources/Item.d.ts +36 -36
- package/dist/esm/generated/resources/Item.js.map +1 -1
- package/dist/esm/generated/resources/ItemType.d.ts +15 -15
- package/dist/esm/generated/resources/ItemType.js.map +1 -1
- package/dist/esm/generated/resources/ItemTypeFilter.d.ts +12 -12
- package/dist/esm/generated/resources/ItemTypeFilter.js.map +1 -1
- package/dist/esm/generated/resources/ItemVersion.d.ts +10 -10
- package/dist/esm/generated/resources/ItemVersion.js.map +1 -1
- package/dist/esm/generated/resources/JobResult.d.ts +4 -4
- package/dist/esm/generated/resources/JobResult.js.map +1 -1
- package/dist/esm/generated/resources/MaintenanceMode.d.ts +8 -8
- package/dist/esm/generated/resources/MaintenanceMode.js.map +1 -1
- package/dist/esm/generated/resources/MenuItem.d.ts +14 -14
- package/dist/esm/generated/resources/MenuItem.js.map +1 -1
- package/dist/esm/generated/resources/Plugin.d.ts +14 -14
- package/dist/esm/generated/resources/Plugin.js.map +1 -1
- package/dist/esm/generated/resources/PublicInfo.d.ts +4 -4
- package/dist/esm/generated/resources/PublicInfo.js.map +1 -1
- package/dist/esm/generated/resources/Role.d.ts +14 -14
- package/dist/esm/generated/resources/Role.js.map +1 -1
- package/dist/esm/generated/resources/ScheduledPublication.d.ts +6 -6
- package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +6 -6
- package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/esm/generated/resources/SchemaMenuItem.d.ts +14 -14
- package/dist/esm/generated/resources/SchemaMenuItem.js.map +1 -1
- package/dist/esm/generated/resources/SearchResult.d.ts +6 -6
- package/dist/esm/generated/resources/SearchResult.js.map +1 -1
- package/dist/esm/generated/resources/Session.d.ts +4 -4
- package/dist/esm/generated/resources/Session.js.map +1 -1
- package/dist/esm/generated/resources/Site.d.ts +24 -24
- package/dist/esm/generated/resources/Site.js.map +1 -1
- package/dist/esm/generated/resources/SiteInvitation.d.ts +14 -14
- package/dist/esm/generated/resources/SiteInvitation.js.map +1 -1
- package/dist/esm/generated/resources/SsoGroup.d.ts +10 -10
- package/dist/esm/generated/resources/SsoGroup.js.map +1 -1
- package/dist/esm/generated/resources/SsoSettings.d.ts +8 -8
- package/dist/esm/generated/resources/SsoSettings.js.map +1 -1
- package/dist/esm/generated/resources/SsoUser.d.ts +10 -10
- package/dist/esm/generated/resources/SsoUser.js.map +1 -1
- package/dist/esm/generated/resources/SubscriptionFeature.d.ts +4 -4
- package/dist/esm/generated/resources/SubscriptionLimit.d.ts +6 -6
- package/dist/esm/generated/resources/SubscriptionLimit.js.map +1 -1
- package/dist/esm/generated/resources/Upload.d.ts +22 -22
- package/dist/esm/generated/resources/Upload.js.map +1 -1
- package/dist/esm/generated/resources/UploadCollection.d.ts +14 -14
- package/dist/esm/generated/resources/UploadCollection.js.map +1 -1
- package/dist/esm/generated/resources/UploadFilter.d.ts +12 -12
- package/dist/esm/generated/resources/UploadFilter.js.map +1 -1
- package/dist/esm/generated/resources/UploadRequest.d.ts +4 -4
- package/dist/esm/generated/resources/UploadRequest.js.map +1 -1
- package/dist/esm/generated/resources/UploadSmartTag.d.ts +6 -6
- package/dist/esm/generated/resources/UploadSmartTag.js.map +1 -1
- package/dist/esm/generated/resources/UploadTag.d.ts +8 -8
- package/dist/esm/generated/resources/UploadTag.js.map +1 -1
- package/dist/esm/generated/resources/UploadTrack.d.ts +10 -10
- package/dist/esm/generated/resources/UploadTrack.js.map +1 -1
- package/dist/esm/generated/resources/UsageCounter.d.ts +4 -4
- package/dist/esm/generated/resources/UsageCounter.js.map +1 -1
- package/dist/esm/generated/resources/User.d.ts +12 -12
- package/dist/esm/generated/resources/User.js.map +1 -1
- package/dist/esm/generated/resources/Webhook.d.ts +12 -12
- package/dist/esm/generated/resources/Webhook.js.map +1 -1
- package/dist/esm/generated/resources/WebhookCall.d.ts +9 -9
- package/dist/esm/generated/resources/WebhookCall.js.map +1 -1
- package/dist/esm/generated/resources/WhiteLabelSettings.d.ts +6 -6
- package/dist/esm/generated/resources/WhiteLabelSettings.js.map +1 -1
- package/dist/esm/generated/resources/Workflow.d.ts +11 -11
- package/dist/esm/generated/resources/Workflow.js.map +1 -1
- package/dist/esm/index.d.ts +5 -4
- package/dist/esm/index.js +1 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/Role.d.ts +4 -4
- package/dist/esm/resources/Role.js.map +1 -1
- package/dist/esm/utilities/blocks.d.ts +17 -17
- package/dist/esm/utilities/blocks.js +3 -3
- package/dist/esm/utilities/blocks.js.map +1 -1
- package/dist/esm/utilities/buildBlockRecord.d.ts +5 -5
- package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
- package/dist/esm/utilities/fieldValue.d.ts +166 -0
- package/dist/esm/utilities/fieldValue.js +237 -0
- package/dist/esm/utilities/fieldValue.js.map +1 -0
- package/dist/esm/utilities/fieldsContainingReferences.d.ts +4 -4
- package/dist/esm/utilities/fieldsContainingReferences.js.map +1 -1
- package/dist/esm/utilities/recursiveBlocks.d.ts +13 -10
- package/dist/esm/utilities/recursiveBlocks.js +19 -20
- package/dist/esm/utilities/recursiveBlocks.js.map +1 -1
- package/dist/esm/utilities/schemaRepository.d.ts +29 -26
- package/dist/esm/utilities/schemaRepository.js.map +1 -1
- package/dist/types/fieldTypes/rich_text.d.ts +7 -7
- package/dist/types/fieldTypes/single_block.d.ts +30 -24
- package/dist/types/fieldTypes/structured_text.d.ts +20 -85
- package/dist/types/generated/{SimpleSchemaTypes.d.ts → ApiTypes.d.ts} +13 -8
- package/dist/types/generated/Client.d.ts +1 -1
- package/dist/types/generated/{SchemaTypes.d.ts → RawApiTypes.d.ts} +13 -8
- package/dist/types/generated/resources/AccessToken.d.ts +14 -14
- package/dist/types/generated/resources/AuditLogEvent.d.ts +4 -4
- package/dist/types/generated/resources/BuildEvent.d.ts +8 -8
- package/dist/types/generated/resources/BuildTrigger.d.ts +16 -16
- package/dist/types/generated/resources/DailyUsage.d.ts +4 -4
- package/dist/types/generated/resources/EditingSession.d.ts +7 -7
- package/dist/types/generated/resources/EmojiSuggestions.d.ts +4 -4
- package/dist/types/generated/resources/Environment.d.ts +14 -14
- package/dist/types/generated/resources/Field.d.ts +213 -213
- package/dist/types/generated/resources/Fieldset.d.ts +12 -12
- package/dist/types/generated/resources/Item.d.ts +36 -36
- package/dist/types/generated/resources/ItemType.d.ts +15 -15
- package/dist/types/generated/resources/ItemTypeFilter.d.ts +12 -12
- package/dist/types/generated/resources/ItemVersion.d.ts +10 -10
- package/dist/types/generated/resources/JobResult.d.ts +4 -4
- package/dist/types/generated/resources/MaintenanceMode.d.ts +8 -8
- package/dist/types/generated/resources/MenuItem.d.ts +14 -14
- package/dist/types/generated/resources/Plugin.d.ts +14 -14
- package/dist/types/generated/resources/PublicInfo.d.ts +4 -4
- package/dist/types/generated/resources/Role.d.ts +14 -14
- package/dist/types/generated/resources/ScheduledPublication.d.ts +6 -6
- package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +6 -6
- package/dist/types/generated/resources/SchemaMenuItem.d.ts +14 -14
- package/dist/types/generated/resources/SearchResult.d.ts +6 -6
- package/dist/types/generated/resources/Session.d.ts +4 -4
- package/dist/types/generated/resources/Site.d.ts +24 -24
- package/dist/types/generated/resources/SiteInvitation.d.ts +14 -14
- package/dist/types/generated/resources/SsoGroup.d.ts +10 -10
- package/dist/types/generated/resources/SsoSettings.d.ts +8 -8
- package/dist/types/generated/resources/SsoUser.d.ts +10 -10
- package/dist/types/generated/resources/SubscriptionFeature.d.ts +4 -4
- package/dist/types/generated/resources/SubscriptionLimit.d.ts +6 -6
- package/dist/types/generated/resources/Upload.d.ts +22 -22
- package/dist/types/generated/resources/UploadCollection.d.ts +14 -14
- package/dist/types/generated/resources/UploadFilter.d.ts +12 -12
- package/dist/types/generated/resources/UploadRequest.d.ts +4 -4
- package/dist/types/generated/resources/UploadSmartTag.d.ts +6 -6
- package/dist/types/generated/resources/UploadTag.d.ts +8 -8
- package/dist/types/generated/resources/UploadTrack.d.ts +10 -10
- package/dist/types/generated/resources/UsageCounter.d.ts +4 -4
- package/dist/types/generated/resources/User.d.ts +12 -12
- package/dist/types/generated/resources/Webhook.d.ts +12 -12
- package/dist/types/generated/resources/WebhookCall.d.ts +9 -9
- package/dist/types/generated/resources/WhiteLabelSettings.d.ts +6 -6
- package/dist/types/generated/resources/Workflow.d.ts +11 -11
- package/dist/types/index.d.ts +5 -4
- package/dist/types/resources/Role.d.ts +4 -4
- package/dist/types/utilities/blocks.d.ts +17 -17
- package/dist/types/utilities/buildBlockRecord.d.ts +5 -5
- package/dist/types/utilities/fieldValue.d.ts +166 -0
- package/dist/types/utilities/fieldsContainingReferences.d.ts +4 -4
- package/dist/types/utilities/recursiveBlocks.d.ts +13 -10
- package/dist/types/utilities/schemaRepository.d.ts +29 -26
- package/package.json +5 -5
- package/src/fieldTypes/rich_text.ts +14 -14
- package/src/fieldTypes/single_block.ts +48 -33
- package/src/fieldTypes/structured_text.ts +37 -153
- package/src/generated/{SimpleSchemaTypes.ts → ApiTypes.ts} +44 -9
- package/src/generated/Client.ts +2 -2
- package/src/generated/{SchemaTypes.ts → RawApiTypes.ts} +44 -9
- package/src/generated/resources/AccessToken.ts +32 -34
- package/src/generated/resources/AuditLogEvent.ts +8 -8
- package/src/generated/resources/BuildEvent.ts +16 -18
- package/src/generated/resources/BuildTrigger.ts +30 -30
- package/src/generated/resources/DailyUsage.ts +5 -5
- package/src/generated/resources/EditingSession.ts +12 -12
- package/src/generated/resources/EmojiSuggestions.ts +7 -7
- package/src/generated/resources/Environment.ts +33 -39
- package/src/generated/resources/Field.ts +40 -54
- package/src/generated/resources/Fieldset.ts +28 -36
- package/src/generated/resources/Item.ts +99 -126
- package/src/generated/resources/ItemType.ts +37 -45
- package/src/generated/resources/ItemTypeFilter.ts +26 -26
- package/src/generated/resources/ItemVersion.ts +22 -26
- package/src/generated/resources/JobResult.ts +6 -8
- package/src/generated/resources/MaintenanceMode.ts +13 -13
- package/src/generated/resources/MenuItem.ts +34 -44
- package/src/generated/resources/Plugin.ts +30 -42
- package/src/generated/resources/PublicInfo.ts +5 -7
- package/src/generated/resources/Role.ts +29 -44
- package/src/generated/resources/ScheduledPublication.ts +13 -13
- package/src/generated/resources/ScheduledUnpublishing.ts +13 -13
- package/src/generated/resources/SchemaMenuItem.ts +34 -34
- package/src/generated/resources/SearchResult.ts +12 -12
- package/src/generated/resources/Session.ts +8 -10
- package/src/generated/resources/Site.ts +43 -47
- package/src/generated/resources/SiteInvitation.ts +30 -30
- package/src/generated/resources/SsoGroup.ts +20 -24
- package/src/generated/resources/SsoSettings.ts +14 -16
- package/src/generated/resources/SsoUser.ts +18 -22
- package/src/generated/resources/SubscriptionFeature.ts +5 -5
- package/src/generated/resources/SubscriptionLimit.ts +9 -9
- package/src/generated/resources/Upload.ts +57 -73
- package/src/generated/resources/UploadCollection.ts +34 -34
- package/src/generated/resources/UploadFilter.ts +26 -26
- package/src/generated/resources/UploadRequest.ts +8 -8
- package/src/generated/resources/UploadSmartTag.ts +12 -12
- package/src/generated/resources/UploadTag.ts +18 -20
- package/src/generated/resources/UploadTrack.ts +25 -29
- package/src/generated/resources/UsageCounter.ts +8 -8
- package/src/generated/resources/User.ts +28 -39
- package/src/generated/resources/Webhook.ts +26 -34
- package/src/generated/resources/WebhookCall.ts +17 -19
- package/src/generated/resources/WhiteLabelSettings.ts +11 -11
- package/src/generated/resources/Workflow.ts +23 -29
- package/src/index.ts +7 -4
- package/src/resources/Role.ts +6 -6
- package/src/utilities/blocks.ts +36 -36
- package/src/utilities/buildBlockRecord.ts +4 -4
- package/src/utilities/{fieldValueLocalization.ts → fieldValue.ts} +161 -147
- package/src/utilities/fieldsContainingReferences.ts +4 -4
- package/src/utilities/recursiveBlocks.ts +47 -44
- package/src/utilities/schemaRepository.ts +53 -56
- package/dist/cjs/generated/SchemaTypes.js.map +0 -1
- package/dist/cjs/generated/SimpleSchemaTypes.js.map +0 -1
- package/dist/cjs/utilities/fieldValueLocalization.js +0 -218
- package/dist/cjs/utilities/fieldValueLocalization.js.map +0 -1
- package/dist/cjs/utilities/structuredText.js +0 -371
- package/dist/cjs/utilities/structuredText.js.map +0 -1
- package/dist/esm/generated/SchemaTypes.js +0 -2
- package/dist/esm/generated/SchemaTypes.js.map +0 -1
- package/dist/esm/generated/SimpleSchemaTypes.js +0 -2
- package/dist/esm/generated/SimpleSchemaTypes.js.map +0 -1
- package/dist/esm/utilities/fieldValueLocalization.d.ts +0 -123
- package/dist/esm/utilities/fieldValueLocalization.js +0 -204
- package/dist/esm/utilities/fieldValueLocalization.js.map +0 -1
- package/dist/esm/utilities/structuredText.d.ts +0 -177
- package/dist/esm/utilities/structuredText.js +0 -354
- package/dist/esm/utilities/structuredText.js.map +0 -1
- package/dist/types/utilities/fieldValueLocalization.d.ts +0 -123
- package/dist/types/utilities/structuredText.d.ts +0 -177
- package/src/utilities/structuredText.ts +0 -590
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.visitLocalizedFieldValuesAsync = exports.visitLocalizedFieldValues = exports.everyLocalizedFieldValuesAsync = exports.everyLocalizedFieldValues = exports.someLocalizedFieldValuesAsync = exports.someLocalizedFieldValues = exports.filterLocalizedFieldValuesAsync = exports.filterLocalizedFieldValues = exports.mapLocalizedFieldValuesAsync = exports.mapLocalizedFieldValues = exports.isLocalized = void 0;
|
|
13
|
-
function isLocalized(field) {
|
|
14
|
-
return 'attributes' in field ? field.attributes.localized : field.localized;
|
|
15
|
-
}
|
|
16
|
-
exports.isLocalized = isLocalized;
|
|
17
|
-
/**
|
|
18
|
-
* Maps localized field values using a provided mapping function.
|
|
19
|
-
* For localized fields, applies the mapping function to each locale value.
|
|
20
|
-
* For non-localized fields, applies the mapping function directly to the only non-localizeed value.
|
|
21
|
-
*
|
|
22
|
-
* @template T - The type that the mapping function returns
|
|
23
|
-
* @param field - The DatoCMS field definition
|
|
24
|
-
* @param value - The field value (either localized object or direct value)
|
|
25
|
-
* @param mapFn - The function to apply to each locale value or the direct value
|
|
26
|
-
* @returns The mapped value with the same structure as the input
|
|
27
|
-
*/
|
|
28
|
-
function mapLocalizedFieldValues(field, value, mapFn) {
|
|
29
|
-
if (isLocalized(field)) {
|
|
30
|
-
const localizedValue = value;
|
|
31
|
-
return Object.fromEntries(Object.entries(localizedValue).map(([locale, value]) => [
|
|
32
|
-
locale,
|
|
33
|
-
mapFn(locale, value),
|
|
34
|
-
]));
|
|
35
|
-
}
|
|
36
|
-
return mapFn(undefined, value);
|
|
37
|
-
}
|
|
38
|
-
exports.mapLocalizedFieldValues = mapLocalizedFieldValues;
|
|
39
|
-
/**
|
|
40
|
-
* Maps localized field values using a provided mapping function (async version).
|
|
41
|
-
* For localized fields, applies the mapping function to each locale value.
|
|
42
|
-
* For non-localized fields, applies the mapping function directly to the only non-localizeed value.
|
|
43
|
-
*
|
|
44
|
-
* @template T - The type that the mapping function returns
|
|
45
|
-
* @param field - The DatoCMS field definition
|
|
46
|
-
* @param value - The field value (either localized object or direct value)
|
|
47
|
-
* @param mapFn - The function to apply to each locale value or the direct value
|
|
48
|
-
* @returns The mapped value with the same structure as the input
|
|
49
|
-
*/
|
|
50
|
-
function mapLocalizedFieldValuesAsync(field, value, mapFn) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
if (isLocalized(field)) {
|
|
53
|
-
const localizedValue = value;
|
|
54
|
-
return Object.fromEntries(yield Promise.all(Object.entries(localizedValue).map(([locale, value]) => __awaiter(this, void 0, void 0, function* () { return [locale, yield mapFn(locale, value)]; }))));
|
|
55
|
-
}
|
|
56
|
-
return yield mapFn(undefined, value);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
exports.mapLocalizedFieldValuesAsync = mapLocalizedFieldValuesAsync;
|
|
60
|
-
/**
|
|
61
|
-
* Filters localized field values using a provided filter function.
|
|
62
|
-
* For localized fields, filters each locale value.
|
|
63
|
-
* For non-localized fields, returns the value if the filter passes, otherwise undefined.
|
|
64
|
-
*
|
|
65
|
-
* @param field - The DatoCMS field definition
|
|
66
|
-
* @param value - The field value (either localized object or direct value)
|
|
67
|
-
* @param filterFn - The function to test each locale value or the direct value
|
|
68
|
-
* @returns The filtered value with the same structure as the input
|
|
69
|
-
*/
|
|
70
|
-
function filterLocalizedFieldValues(field, value, filterFn) {
|
|
71
|
-
if (isLocalized(field)) {
|
|
72
|
-
const localizedValue = value;
|
|
73
|
-
return Object.fromEntries(Object.entries(localizedValue).filter(([locale, value]) => filterFn(locale, value)));
|
|
74
|
-
}
|
|
75
|
-
return filterFn(undefined, value) ? value : undefined;
|
|
76
|
-
}
|
|
77
|
-
exports.filterLocalizedFieldValues = filterLocalizedFieldValues;
|
|
78
|
-
/**
|
|
79
|
-
* Filters localized field values using a provided filter function (async version).
|
|
80
|
-
* For localized fields, filters each locale value.
|
|
81
|
-
* For non-localized fields, returns the value if the filter passes, otherwise undefined.
|
|
82
|
-
*
|
|
83
|
-
* @param field - The DatoCMS field definition
|
|
84
|
-
* @param value - The field value (either localized object or direct value)
|
|
85
|
-
* @param filterFn - The function to test each locale value or the direct value
|
|
86
|
-
* @returns The filtered value with the same structure as the input
|
|
87
|
-
*/
|
|
88
|
-
function filterLocalizedFieldValuesAsync(field, value, filterFn) {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
if (isLocalized(field)) {
|
|
91
|
-
const localizedValue = value;
|
|
92
|
-
const results = yield Promise.all(Object.entries(localizedValue).map(([locale, value]) => __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
return [
|
|
94
|
-
locale,
|
|
95
|
-
value,
|
|
96
|
-
yield filterFn(locale, value),
|
|
97
|
-
];
|
|
98
|
-
})));
|
|
99
|
-
return Object.fromEntries(results
|
|
100
|
-
.filter(([, , passed]) => passed)
|
|
101
|
-
.map(([locale, value]) => [locale, value]));
|
|
102
|
-
}
|
|
103
|
-
return (yield filterFn(undefined, value)) ? value : undefined;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
exports.filterLocalizedFieldValuesAsync = filterLocalizedFieldValuesAsync;
|
|
107
|
-
/**
|
|
108
|
-
* Tests whether at least one localized field value passes the test implemented by the provided function.
|
|
109
|
-
* For localized fields, tests each locale value.
|
|
110
|
-
* For non-localized fields, tests the direct value.
|
|
111
|
-
*
|
|
112
|
-
* @param field - The DatoCMS field definition
|
|
113
|
-
* @param value - The field value (either localized object or direct value)
|
|
114
|
-
* @param testFn - The function to test each locale value or the direct value
|
|
115
|
-
* @returns true if at least one value passes the test, false otherwise
|
|
116
|
-
*/
|
|
117
|
-
function someLocalizedFieldValues(field, value, testFn) {
|
|
118
|
-
if (isLocalized(field)) {
|
|
119
|
-
const localizedValue = value;
|
|
120
|
-
return Object.entries(localizedValue).some(([locale, value]) => testFn(locale, value));
|
|
121
|
-
}
|
|
122
|
-
return testFn(undefined, value);
|
|
123
|
-
}
|
|
124
|
-
exports.someLocalizedFieldValues = someLocalizedFieldValues;
|
|
125
|
-
/**
|
|
126
|
-
* Tests whether at least one localized field value passes the test implemented by the provided function (async version).
|
|
127
|
-
* For localized fields, tests each locale value.
|
|
128
|
-
* For non-localized fields, tests the direct value.
|
|
129
|
-
*
|
|
130
|
-
* @param field - The DatoCMS field definition
|
|
131
|
-
* @param value - The field value (either localized object or direct value)
|
|
132
|
-
* @param testFn - The function to test each locale value or the direct value
|
|
133
|
-
* @returns true if at least one value passes the test, false otherwise
|
|
134
|
-
*/
|
|
135
|
-
function someLocalizedFieldValuesAsync(field, value, testFn) {
|
|
136
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
if (isLocalized(field)) {
|
|
138
|
-
const localizedValue = value;
|
|
139
|
-
const results = yield Promise.all(Object.entries(localizedValue).map(([locale, value]) => __awaiter(this, void 0, void 0, function* () { return yield testFn(locale, value); })));
|
|
140
|
-
return results.some((result) => result);
|
|
141
|
-
}
|
|
142
|
-
return yield testFn(undefined, value);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
exports.someLocalizedFieldValuesAsync = someLocalizedFieldValuesAsync;
|
|
146
|
-
/**
|
|
147
|
-
* Tests whether all localized field values pass the test implemented by the provided function.
|
|
148
|
-
* For localized fields, tests each locale value.
|
|
149
|
-
* For non-localized fields, tests the direct value.
|
|
150
|
-
*
|
|
151
|
-
* @param field - The DatoCMS field definition
|
|
152
|
-
* @param value - The field value (either localized object or direct value)
|
|
153
|
-
* @param testFn - The function to test each locale value or the direct value
|
|
154
|
-
* @returns true if all values pass the test, false otherwise
|
|
155
|
-
*/
|
|
156
|
-
function everyLocalizedFieldValues(field, value, testFn) {
|
|
157
|
-
return !someLocalizedFieldValues(field, value, (locale, localeValue) => !testFn(locale, localeValue));
|
|
158
|
-
}
|
|
159
|
-
exports.everyLocalizedFieldValues = everyLocalizedFieldValues;
|
|
160
|
-
/**
|
|
161
|
-
* Tests whether all localized field values pass the test implemented by the provided function (async version).
|
|
162
|
-
* For localized fields, tests each locale value.
|
|
163
|
-
* For non-localized fields, tests the direct value.
|
|
164
|
-
*
|
|
165
|
-
* @param field - The DatoCMS field definition
|
|
166
|
-
* @param value - The field value (either localized object or direct value)
|
|
167
|
-
* @param testFn - The function to test each locale value or the direct value
|
|
168
|
-
* @returns true if all values pass the test, false otherwise
|
|
169
|
-
*/
|
|
170
|
-
function everyLocalizedFieldValuesAsync(field, value, testFn) {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
return !(yield someLocalizedFieldValuesAsync(field, value, (locale, localeValue) => __awaiter(this, void 0, void 0, function* () { return !(yield testFn(locale, localeValue)); })));
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
exports.everyLocalizedFieldValuesAsync = everyLocalizedFieldValuesAsync;
|
|
176
|
-
/**
|
|
177
|
-
* Visits each localized field value with the provided function.
|
|
178
|
-
* For localized fields, visits each locale value.
|
|
179
|
-
* For non-localized fields, visits the direct value.
|
|
180
|
-
*
|
|
181
|
-
* @param field - The DatoCMS field definition
|
|
182
|
-
* @param value - The field value (either localized object or direct value)
|
|
183
|
-
* @param visitFn - The function to call for each locale value or the direct value
|
|
184
|
-
*/
|
|
185
|
-
function visitLocalizedFieldValues(field, value, visitFn) {
|
|
186
|
-
if (isLocalized(field)) {
|
|
187
|
-
const localizedValue = value;
|
|
188
|
-
for (const [locale, value] of Object.entries(localizedValue)) {
|
|
189
|
-
visitFn(locale, value);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
visitFn(undefined, value);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.visitLocalizedFieldValues = visitLocalizedFieldValues;
|
|
197
|
-
/**
|
|
198
|
-
* Visits each localized field value with the provided function (async version).
|
|
199
|
-
* For localized fields, visits each locale value.
|
|
200
|
-
* For non-localized fields, visits the direct value.
|
|
201
|
-
*
|
|
202
|
-
* @param field - The DatoCMS field definition
|
|
203
|
-
* @param value - The field value (either localized object or direct value)
|
|
204
|
-
* @param visitFn - The function to call for each locale value or the direct value
|
|
205
|
-
*/
|
|
206
|
-
function visitLocalizedFieldValuesAsync(field, value, visitFn) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
if (isLocalized(field)) {
|
|
209
|
-
const localizedValue = value;
|
|
210
|
-
yield Promise.all(Object.entries(localizedValue).map(([locale, value]) => __awaiter(this, void 0, void 0, function* () { return yield visitFn(locale, value); })));
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
yield visitFn(undefined, value);
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
exports.visitLocalizedFieldValuesAsync = visitLocalizedFieldValuesAsync;
|
|
218
|
-
//# sourceMappingURL=fieldValueLocalization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fieldValueLocalization.js","sourceRoot":"","sources":["../../../src/utilities/fieldValueLocalization.ts"],"names":[],"mappings":";;;;;;;;;;;;AA8CA,SAAgB,WAAW,CACzB,KAAkD;IAElD,OAAO,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;AAC9E,CAAC;AAJD,kCAIC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,uBAAuB,CACrC,KAAkD,EAClD,KAAc,EACd,KAA8D;IAE9D,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;QACtB,MAAM,cAAc,GAAG,KAA4B,CAAC;QAEpD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YACtD,MAAM;YACN,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;SACrB,CAAC,CACH,CAAC;KACH;IAED,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC;AAjBD,0DAi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CAAC,EAAE;YAC5D,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;SACxB;KACF;SAAM;QACL,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KAC3B;AACH,CAAC;AAdD,8DAcC;AAED;;;;;;;;GAQG;AACH,SAAsB,8BAA8B,CAClD,KAAkD,EAClD,KAAc,EACd,OAA4E;;QAE5E,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,MAAM,cAAc,GAAG,KAA4B,CAAC;YAEpD,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAChC,CAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,gDAAC,OAAA,MAAM,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA,GAAA,CACxD,CACF,CAAC;SACH;aAAM;YACL,MAAM,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;SACjC;IACH,CAAC;CAAA;AAhBD,wEAgBC"}
|
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Tree manipulation utilities for DatoCMS structured text documents.
|
|
4
|
-
*
|
|
5
|
-
* Provides a set of low-level utilities for visiting, transforming, and querying
|
|
6
|
-
* structured text trees. Works with all tree variants (regular, request, nested).
|
|
7
|
-
*/
|
|
8
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.everyNodeAsync = exports.everyNode = exports.someNodeAsync = exports.someNode = exports.reduceNodesAsync = exports.reduceNodes = exports.filterNodesAsync = exports.filterNodes = exports.findAllNodesAsync = exports.findAllNodes = exports.mapNodesAsync = exports.mapNodes = exports.visitNodesAsync = exports.visitNodes = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* Check if a value has children property that is an array
|
|
21
|
-
*/
|
|
22
|
-
function hasChildren(node) {
|
|
23
|
-
return (typeof node === 'object' &&
|
|
24
|
-
node !== null &&
|
|
25
|
-
'children' in node &&
|
|
26
|
-
Array.isArray(node.children));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Visit every node in the Structured Text tree, calling the visitor function for each.
|
|
30
|
-
* Uses pre-order traversal (parent is visited before its children).
|
|
31
|
-
*
|
|
32
|
-
* @template T - The type of the root node in the Structured Text tree
|
|
33
|
-
* @param node - The root node to start visiting from
|
|
34
|
-
* @param visitor - Synchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
|
|
35
|
-
*/
|
|
36
|
-
function visitNodes(node, visitor, parent = null, path = []) {
|
|
37
|
-
// Visit current node
|
|
38
|
-
visitor(node, parent, path);
|
|
39
|
-
// Recursively visit children
|
|
40
|
-
if (hasChildren(node)) {
|
|
41
|
-
for (let index = 0; index < node.children.length; index++) {
|
|
42
|
-
const child = node.children[index];
|
|
43
|
-
visitNodes(child, visitor, node, [
|
|
44
|
-
...path,
|
|
45
|
-
'children',
|
|
46
|
-
index,
|
|
47
|
-
]);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.visitNodes = visitNodes;
|
|
52
|
-
/**
|
|
53
|
-
* Visit every node in the Structured Text tree, calling the visitor function for each.
|
|
54
|
-
* Uses pre-order traversal (parent is visited before its children).
|
|
55
|
-
*
|
|
56
|
-
* @template T - The type of the root node in the Structured Text tree
|
|
57
|
-
* @param node - The root node to start visiting from
|
|
58
|
-
* @param visitor - Asynchronous function called for each node. Receives the node, its parent, and path through the Structured Text tree
|
|
59
|
-
* @returns Promise that resolves when all nodes have been visited
|
|
60
|
-
*/
|
|
61
|
-
function visitNodesAsync(node, visitor, parent = null, path = []) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
// Visit current node
|
|
64
|
-
yield visitor(node, parent, path);
|
|
65
|
-
// Recursively visit children
|
|
66
|
-
if (hasChildren(node)) {
|
|
67
|
-
for (let index = 0; index < node.children.length; index++) {
|
|
68
|
-
const child = node.children[index];
|
|
69
|
-
yield visitNodesAsync(child, visitor, node, [
|
|
70
|
-
...path,
|
|
71
|
-
'children',
|
|
72
|
-
index,
|
|
73
|
-
]);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
exports.visitNodesAsync = visitNodesAsync;
|
|
79
|
-
/**
|
|
80
|
-
* Transform nodes in the Structured Text tree by applying a mapping function.
|
|
81
|
-
* Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
|
|
82
|
-
*
|
|
83
|
-
* @template T - The type of nodes in the input Structured Text tree
|
|
84
|
-
* @template R - The type of nodes in the output tree
|
|
85
|
-
* @param node - The root node to start mapping from
|
|
86
|
-
* @param mapper - Synchronous function that transforms each node. Receives the node, its parent, and path
|
|
87
|
-
* @returns The transformed tree
|
|
88
|
-
*/
|
|
89
|
-
function mapNodes(node, mapper, parent = null, path = []) {
|
|
90
|
-
// Transform current node
|
|
91
|
-
const transformedNode = mapper(node, parent, path);
|
|
92
|
-
// If the original node has children, recursively transform them
|
|
93
|
-
if (hasChildren(node) &&
|
|
94
|
-
typeof transformedNode === 'object' &&
|
|
95
|
-
transformedNode !== null) {
|
|
96
|
-
const transformedChildren = node.children.map((child, index) => mapNodes(child, mapper, node, [
|
|
97
|
-
...path,
|
|
98
|
-
'children',
|
|
99
|
-
index,
|
|
100
|
-
]));
|
|
101
|
-
return Object.assign(Object.assign({}, transformedNode), { children: transformedChildren });
|
|
102
|
-
}
|
|
103
|
-
return transformedNode;
|
|
104
|
-
}
|
|
105
|
-
exports.mapNodes = mapNodes;
|
|
106
|
-
/**
|
|
107
|
-
* Transform nodes in the Structured Text tree by applying a mapping function.
|
|
108
|
-
* Creates a new tree structure with transformed nodes while preserving the Structured Text tree hierarchy.
|
|
109
|
-
*
|
|
110
|
-
* @template T - The type of nodes in the input Structured Text tree
|
|
111
|
-
* @template R - The type of nodes in the output tree
|
|
112
|
-
* @param node - The root node to start mapping from
|
|
113
|
-
* @param mapper - Asynchronous function that transforms each node. Receives the node, its parent, and path
|
|
114
|
-
* @returns Promise that resolves to the transformed tree
|
|
115
|
-
*/
|
|
116
|
-
function mapNodesAsync(node, mapper, parent = null, path = []) {
|
|
117
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
// Transform current node
|
|
119
|
-
const transformedNode = yield mapper(node, parent, path);
|
|
120
|
-
// If the original node has children, recursively transform them
|
|
121
|
-
if (hasChildren(node) &&
|
|
122
|
-
typeof transformedNode === 'object' &&
|
|
123
|
-
transformedNode !== null) {
|
|
124
|
-
const transformedChildren = yield Promise.all(node.children.map((child, index) => mapNodesAsync(child, mapper, node, [
|
|
125
|
-
...path,
|
|
126
|
-
'children',
|
|
127
|
-
index,
|
|
128
|
-
])));
|
|
129
|
-
return Object.assign(Object.assign({}, transformedNode), { children: transformedChildren });
|
|
130
|
-
}
|
|
131
|
-
return transformedNode;
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
exports.mapNodesAsync = mapNodesAsync;
|
|
135
|
-
/**
|
|
136
|
-
* Find all nodes that match the predicate function using depth-first search.
|
|
137
|
-
* Returns an array containing all matching nodes along with their paths through the Structured Text tree.
|
|
138
|
-
*
|
|
139
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
140
|
-
* @param node - The root node to start searching from
|
|
141
|
-
* @param predicate - Synchronous function that tests each node. Should return true for desired nodes
|
|
142
|
-
* @returns Array of objects, each containing a matching node and its path
|
|
143
|
-
*/
|
|
144
|
-
function findAllNodes(node, predicate, parent = null, path = []) {
|
|
145
|
-
const results = [];
|
|
146
|
-
visitNodes(node, (currentNode, currentParent, currentPath) => {
|
|
147
|
-
if (predicate(currentNode, currentParent, currentPath)) {
|
|
148
|
-
results.push({ node: currentNode, path: currentPath });
|
|
149
|
-
}
|
|
150
|
-
}, parent, path);
|
|
151
|
-
return results;
|
|
152
|
-
}
|
|
153
|
-
exports.findAllNodes = findAllNodes;
|
|
154
|
-
/**
|
|
155
|
-
* Find all nodes that match the predicate function using depth-first search.
|
|
156
|
-
* Returns an array containing all matching nodes along with their paths through the Structured Text tree.
|
|
157
|
-
*
|
|
158
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
159
|
-
* @param node - The root node to start searching from
|
|
160
|
-
* @param predicate - Asynchronous function that tests each node. Should return true for desired nodes
|
|
161
|
-
* @returns Promise that resolves to an array of objects, each containing a matching node and its path
|
|
162
|
-
*/
|
|
163
|
-
function findAllNodesAsync(node, predicate, parent = null, path = []) {
|
|
164
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
const results = [];
|
|
166
|
-
yield visitNodesAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
if (yield predicate(currentNode, currentParent, currentPath)) {
|
|
168
|
-
results.push({ node: currentNode, path: currentPath });
|
|
169
|
-
}
|
|
170
|
-
}), parent, path);
|
|
171
|
-
return results;
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
exports.findAllNodesAsync = findAllNodesAsync;
|
|
175
|
-
/**
|
|
176
|
-
* Filter nodes in the Structured Text tree, removing those that don't match the predicate.
|
|
177
|
-
* Creates a new tree structure containing only nodes that pass the predicate test.
|
|
178
|
-
* Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
|
|
179
|
-
*
|
|
180
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
181
|
-
* @param node - The root node to start filtering from
|
|
182
|
-
* @param predicate - Synchronous function that tests each node. Nodes returning false are removed
|
|
183
|
-
* @returns The filtered tree, or null if root node is filtered out
|
|
184
|
-
*/
|
|
185
|
-
function filterNodes(node, predicate, parent = null, path = []) {
|
|
186
|
-
// If current node doesn't match predicate, return null
|
|
187
|
-
if (!predicate(node, parent, path)) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
// If node has no children, return it as-is
|
|
191
|
-
if (!hasChildren(node)) {
|
|
192
|
-
return node;
|
|
193
|
-
}
|
|
194
|
-
// Filter children recursively
|
|
195
|
-
const childrenResults = node.children.map((child, index) => filterNodes(child, predicate, node, [
|
|
196
|
-
...path,
|
|
197
|
-
'children',
|
|
198
|
-
index,
|
|
199
|
-
]));
|
|
200
|
-
const filteredChildren = childrenResults.filter((child) => child !== null);
|
|
201
|
-
return Object.assign(Object.assign({}, node), { children: filteredChildren });
|
|
202
|
-
}
|
|
203
|
-
exports.filterNodes = filterNodes;
|
|
204
|
-
/**
|
|
205
|
-
* Filter nodes in the Structured Text tree, removing those that don't match the predicate.
|
|
206
|
-
* Creates a new tree structure containing only nodes that pass the predicate test.
|
|
207
|
-
* Maintains the Structured Text tree hierarchy - if a parent node is kept, its structure is preserved.
|
|
208
|
-
*
|
|
209
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
210
|
-
* @param node - The root node to start filtering from
|
|
211
|
-
* @param predicate - Asynchronous function that tests each node. Nodes returning false are removed
|
|
212
|
-
* @returns Promise that resolves to the filtered tree, or null if root node is filtered out
|
|
213
|
-
*/
|
|
214
|
-
function filterNodesAsync(node, predicate, parent = null, path = []) {
|
|
215
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
-
// If current node doesn't match predicate, return null
|
|
217
|
-
if (!(yield predicate(node, parent, path))) {
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
// If node has no children, return it as-is
|
|
221
|
-
if (!hasChildren(node)) {
|
|
222
|
-
return node;
|
|
223
|
-
}
|
|
224
|
-
// Filter children recursively
|
|
225
|
-
const childrenResults = yield Promise.all(node.children.map((child, index) => filterNodesAsync(child, predicate, node, [
|
|
226
|
-
...path,
|
|
227
|
-
'children',
|
|
228
|
-
index,
|
|
229
|
-
])));
|
|
230
|
-
const filteredChildren = childrenResults.filter((child) => child !== null);
|
|
231
|
-
return Object.assign(Object.assign({}, node), { children: filteredChildren });
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
exports.filterNodesAsync = filterNodesAsync;
|
|
235
|
-
/**
|
|
236
|
-
* Reduce the Structured Text tree to a single value by applying a reducer function to each node.
|
|
237
|
-
* Uses pre-order traversal (parent is processed before its children).
|
|
238
|
-
* The reducer function is called for each node with the current accumulator value.
|
|
239
|
-
*
|
|
240
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
241
|
-
* @template R - The type of the accumulated result
|
|
242
|
-
* @param node - The root node to start reducing from
|
|
243
|
-
* @param reducer - Synchronous function that processes each node and updates the accumulator
|
|
244
|
-
* @param initialValue - The initial value for the accumulator
|
|
245
|
-
* @returns The final accumulated value
|
|
246
|
-
*/
|
|
247
|
-
function reduceNodes(node, reducer, initialValue, parent = null, path = []) {
|
|
248
|
-
let accumulator = initialValue;
|
|
249
|
-
visitNodes(node, (currentNode, currentParent, currentPath) => {
|
|
250
|
-
accumulator = reducer(accumulator, currentNode, currentParent, currentPath);
|
|
251
|
-
}, parent, path);
|
|
252
|
-
return accumulator;
|
|
253
|
-
}
|
|
254
|
-
exports.reduceNodes = reduceNodes;
|
|
255
|
-
/**
|
|
256
|
-
* Reduce the Structured Text tree to a single value by applying a reducer function to each node.
|
|
257
|
-
* Uses pre-order traversal (parent is processed before its children).
|
|
258
|
-
* The reducer function is called for each node with the current accumulator value.
|
|
259
|
-
*
|
|
260
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
261
|
-
* @template R - The type of the accumulated result
|
|
262
|
-
* @param node - The root node to start reducing from
|
|
263
|
-
* @param reducer - Asynchronous function that processes each node and updates the accumulator
|
|
264
|
-
* @param initialValue - The initial value for the accumulator
|
|
265
|
-
* @returns Promise that resolves to the final accumulated value
|
|
266
|
-
*/
|
|
267
|
-
function reduceNodesAsync(node, reducer, initialValue, parent = null, path = []) {
|
|
268
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
-
let accumulator = initialValue;
|
|
270
|
-
yield visitNodesAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
|
|
271
|
-
accumulator = yield reducer(accumulator, currentNode, currentParent, currentPath);
|
|
272
|
-
}), parent, path);
|
|
273
|
-
return accumulator;
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
exports.reduceNodesAsync = reduceNodesAsync;
|
|
277
|
-
/**
|
|
278
|
-
* Check if any node in the Structured Text tree matches the predicate function.
|
|
279
|
-
* Returns true as soon as the first matching node is found (short-circuit evaluation).
|
|
280
|
-
*
|
|
281
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
282
|
-
* @param node - The root node to start searching from
|
|
283
|
-
* @param predicate - Synchronous function that tests each node. Should return true for matching nodes
|
|
284
|
-
* @returns True if any node matches, false otherwise
|
|
285
|
-
*/
|
|
286
|
-
function someNode(node, predicate, parent = null, path = []) {
|
|
287
|
-
// Check current node
|
|
288
|
-
if (predicate(node, parent, path)) {
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
// Recursively check children
|
|
292
|
-
if (hasChildren(node)) {
|
|
293
|
-
for (let index = 0; index < node.children.length; index++) {
|
|
294
|
-
const child = node.children[index];
|
|
295
|
-
if (someNode(child, predicate, node, [
|
|
296
|
-
...path,
|
|
297
|
-
'children',
|
|
298
|
-
index,
|
|
299
|
-
])) {
|
|
300
|
-
return true;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
exports.someNode = someNode;
|
|
307
|
-
/**
|
|
308
|
-
* Check if any node in the Structured Text tree matches the predicate function.
|
|
309
|
-
* Returns true as soon as the first matching node is found (short-circuit evaluation).
|
|
310
|
-
*
|
|
311
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
312
|
-
* @param node - The root node to start searching from
|
|
313
|
-
* @param predicate - Asynchronous function that tests each node. Should return true for matching nodes
|
|
314
|
-
* @returns Promise that resolves to true if any node matches, false otherwise
|
|
315
|
-
*/
|
|
316
|
-
function someNodeAsync(node, predicate, parent = null, path = []) {
|
|
317
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
318
|
-
// Check current node
|
|
319
|
-
if (yield predicate(node, parent, path)) {
|
|
320
|
-
return true;
|
|
321
|
-
}
|
|
322
|
-
// Recursively check children
|
|
323
|
-
if (hasChildren(node)) {
|
|
324
|
-
for (let index = 0; index < node.children.length; index++) {
|
|
325
|
-
const child = node.children[index];
|
|
326
|
-
if (yield someNodeAsync(child, predicate, node, [
|
|
327
|
-
...path,
|
|
328
|
-
'children',
|
|
329
|
-
index,
|
|
330
|
-
])) {
|
|
331
|
-
return true;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return false;
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
exports.someNodeAsync = someNodeAsync;
|
|
339
|
-
/**
|
|
340
|
-
* Check if every node in the Structured Text tree matches the predicate function.
|
|
341
|
-
* Returns false as soon as the first non-matching node is found (short-circuit evaluation).
|
|
342
|
-
*
|
|
343
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
344
|
-
* @param node - The root node to start testing from
|
|
345
|
-
* @param predicate - Synchronous function that tests each node. Should return true for valid nodes
|
|
346
|
-
* @returns True if all nodes match, false otherwise
|
|
347
|
-
*/
|
|
348
|
-
function everyNode(node, predicate, parent = null, path = []) {
|
|
349
|
-
return !someNode(node, (currentNode, currentParent, currentPath) => {
|
|
350
|
-
return !predicate(currentNode, currentParent, currentPath);
|
|
351
|
-
}, parent, path);
|
|
352
|
-
}
|
|
353
|
-
exports.everyNode = everyNode;
|
|
354
|
-
/**
|
|
355
|
-
* Check if every node in the Structured Text tree matches the predicate function.
|
|
356
|
-
* Returns false as soon as the first non-matching node is found (short-circuit evaluation).
|
|
357
|
-
*
|
|
358
|
-
* @template T - The type of nodes in the Structured Text tree
|
|
359
|
-
* @param node - The root node to start testing from
|
|
360
|
-
* @param predicate - Asynchronous function that tests each node. Should return true for valid nodes
|
|
361
|
-
* @returns Promise that resolves to true if all nodes match, false otherwise
|
|
362
|
-
*/
|
|
363
|
-
function everyNodeAsync(node, predicate, parent = null, path = []) {
|
|
364
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
365
|
-
return !(yield someNodeAsync(node, (currentNode, currentParent, currentPath) => __awaiter(this, void 0, void 0, function* () {
|
|
366
|
-
return !(yield predicate(currentNode, currentParent, currentPath));
|
|
367
|
-
}), parent, path));
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
exports.everyNodeAsync = everyNodeAsync;
|
|
371
|
-
//# sourceMappingURL=structuredText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"structuredText.js","sourceRoot":"","sources":["../../../src/utilities/structuredText.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAqDH;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa;IAChC,OAAO,CACL,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,UAAU,IAAI,IAAI;QAClB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,UAAU,CACxB,IAAO,EACP,OAA+B,EAC/B,SAAmC,IAAI,EACvC,OAAiB,EAAE;IAEnB,qBAAqB;IACrB,OAAO,CAAC,IAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAEjD,6BAA6B;IAC7B,IAAI,WAAW,CAAC,IAAI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AmC,IAAI,EACvC,OAAiB,EAAE;;QAEnB,OAAO,CAAC,CAAC,MAAM,aAAa,CAC1B,IAAI,EACJ,CACE,WAA8B,EAC9B,aAAuC,EACvC,WAAqB,EACrB,EAAE;YACF,OAAO,CAAC,CAAC,MAAM,SAAS,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;QACrE,CAAC,CAAA,EACD,MAAM,EACN,IAAI,CACL,CAAC,CAAC;IACL,CAAC;CAAA;AAlBD,wCAkBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaTypes.js","sourceRoot":"","sources":["../../../src/generated/SchemaTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleSchemaTypes.js","sourceRoot":"","sources":["../../../src/generated/SimpleSchemaTypes.ts"],"names":[],"mappings":""}
|