@webiny/api-headless-cms 6.0.0-alpha.0 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants.d.ts +1 -1
- package/constants.js.map +1 -1
- package/context.d.ts +1 -1
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +2 -2
- package/crud/AccessControl/AccessControl.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetEntry.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IListEntries.d.ts +1 -1
- package/crud/contentEntry/abstractions/IListEntries.js.map +1 -1
- package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -1
- package/crud/contentEntry/afterDelete.d.ts +2 -2
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.d.ts +2 -2
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.d.ts +2 -2
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +2 -2
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.d.ts +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.d.ts +1 -1
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.d.ts +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +2 -2
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +5 -5
- package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +7 -5
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +7 -2
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +6 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +4 -4
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +12 -5
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +9 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +4 -4
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.d.ts +6 -4
- package/crud/contentEntry/useCases/ListEntries/index.js +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +7 -5
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +4 -2
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +2 -2
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +7 -5
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +5 -5
- package/crud/contentEntry.crud.js +16 -3
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +2 -2
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +2 -2
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +2 -2
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.d.ts +1 -1
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
- package/crud/contentModel/contentModelManagerFactory.d.ts +1 -1
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.d.ts +1 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.d.ts +1 -1
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/ensureTypeTag.d.ts +1 -1
- package/crud/contentModel/ensureTypeTag.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.d.ts +1 -1
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/getApplicableFieldById.d.ts +1 -1
- package/crud/contentModel/fields/getApplicableFieldById.js.map +1 -1
- package/crud/contentModel/fields/imageField.d.ts +1 -1
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.d.ts +1 -1
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/listModelsFromDatabase.d.ts +3 -3
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.d.ts +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/modelId.d.ts +1 -1
- package/crud/contentModel/validate/modelId.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.d.ts +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.d.ts +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validateModel.d.ts +1 -1
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +1 -1
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel.crud.d.ts +5 -5
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +3 -3
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.d.ts +3 -3
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.d.ts +3 -3
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
- package/crud/contentModelGroup.crud.d.ts +5 -5
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.d.ts +4 -4
- package/crud/system.crud.js +10 -0
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.d.ts +2 -2
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.d.ts +2 -2
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importData.d.ts +2 -2
- package/export/crud/imports/importData.js.map +1 -1
- package/export/crud/imports/importGroups.d.ts +2 -2
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.d.ts +2 -2
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/crud/imports/validateGroups.d.ts +2 -2
- package/export/crud/imports/validateGroups.js.map +1 -1
- package/export/crud/imports/validateInput.d.ts +2 -2
- package/export/crud/imports/validateInput.js.map +1 -1
- package/export/crud/imports/validateModels.d.ts +2 -2
- package/export/crud/imports/validateModels.js.map +1 -1
- package/export/crud/index.d.ts +1 -1
- package/export/crud/index.js.map +1 -1
- package/export/crud/sanitize.d.ts +2 -2
- package/export/crud/sanitize.js.map +1 -1
- package/export/graphql/index.d.ts +1 -1
- package/export/graphql/index.js.map +1 -1
- package/export/types.d.ts +1 -1
- package/export/types.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +2 -2
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +1 -1
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +1 -1
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.d.ts +1 -1
- package/graphql/createRequestBody.js.map +1 -1
- package/graphql/generateSchema.d.ts +2 -2
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema/generateCacheId.d.ts +3 -3
- package/graphql/getSchema/generateCacheId.js.map +1 -1
- package/graphql/getSchema/generateCacheKey.d.ts +1 -1
- package/graphql/getSchema/generateCacheKey.js.map +1 -1
- package/graphql/getSchema.d.ts +4 -4
- package/graphql/getSchema.js.map +1 -1
- package/graphql/graphQLHandlerFactory.d.ts +1 -1
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.d.ts +2 -2
- package/graphql/handleRequest.js.map +1 -1
- package/graphql/index.d.ts +2 -2
- package/graphql/index.js.map +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.d.ts +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +2 -2
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.d.ts +2 -2
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +2 -2
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +2 -2
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +2 -2
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +2 -2
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +2 -2
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +2 -2
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/createSingularSDL.d.ts +1 -1
- package/graphql/schema/createSingularSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.d.ts +1 -1
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.d.ts +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +1 -1
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.d.ts +1 -1
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.d.ts +1 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.d.ts +1 -1
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/file.d.ts +1 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.d.ts +1 -1
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.d.ts +1 -1
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.d.ts +1 -1
- package/graphqlFields/json.js.map +1 -1
- package/graphqlFields/longText.d.ts +1 -1
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.d.ts +1 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.d.ts +1 -1
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.d.ts +1 -1
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
- package/graphqlFields/richText/richTextResolver.d.ts +2 -2
- package/graphqlFields/richText/richTextResolver.js.map +1 -1
- package/graphqlFields/richText.d.ts +1 -1
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/searchableJson.d.ts +1 -1
- package/graphqlFields/searchableJson.js +5 -0
- package/graphqlFields/searchableJson.js.map +1 -1
- package/graphqlFields/text.d.ts +1 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.d.ts +1 -1
- package/htmlRenderer/LexicalRenderer.js.map +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js.map +1 -1
- package/modelManager/SingletonModelManager.d.ts +1 -1
- package/modelManager/SingletonModelManager.js.map +1 -1
- package/modelManager/index.d.ts +1 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +21 -21
- package/parameters/header.js.map +1 -1
- package/parameters/manual.d.ts +2 -1
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +3 -2
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +1 -1
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.d.ts +2 -2
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +1 -1
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.d.ts +1 -1
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
- package/plugins/StorageTransformPlugin.d.ts +2 -2
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/storage/date.d.ts +1 -1
- package/storage/date.js.map +1 -1
- package/storage/dynamicZone.js.map +1 -1
- package/storage/json.js +34 -5
- package/storage/json.js.map +1 -1
- package/storage/object.js.map +1 -1
- package/types/context.d.ts +7 -7
- package/types/context.js.map +1 -1
- package/types/fields/dynamicZoneField.d.ts +1 -1
- package/types/fields/dynamicZoneField.js.map +1 -1
- package/types/fields/objectField.d.ts +1 -1
- package/types/fields/objectField.js.map +1 -1
- package/types/model.d.ts +3 -3
- package/types/model.js.map +1 -1
- package/types/modelAst.d.ts +1 -1
- package/types/modelAst.js.map +1 -1
- package/types/modelField.d.ts +2 -2
- package/types/modelField.js.map +1 -1
- package/types/modelGroup.d.ts +1 -1
- package/types/modelGroup.js.map +1 -1
- package/types/plugins.d.ts +6 -6
- package/types/plugins.js.map +1 -1
- package/types/types.d.ts +19 -19
- package/types/types.js.map +1 -1
- package/utils/RichTextRenderer.d.ts +2 -2
- package/utils/RichTextRenderer.js.map +1 -1
- package/utils/caching/Cache.d.ts +1 -1
- package/utils/caching/Cache.js.map +1 -1
- package/utils/caching/CacheKey.d.ts +2 -2
- package/utils/caching/CacheKey.js.map +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -1
- package/utils/contentModelAst/CmsModelToAstConverter.d.ts +1 -1
- package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -1
- package/utils/converters/Converter.d.ts +3 -3
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.d.ts +2 -2
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +3 -3
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createModelField.d.ts +1 -1
- package/utils/createModelField.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -1
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/entryStorage.d.ts +8 -1
- package/utils/entryStorage.js +37 -4
- package/utils/entryStorage.js.map +1 -1
- package/utils/getBaseFieldType.d.ts +1 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.d.ts +1 -1
- package/utils/getEntryDescription.js.map +1 -1
- package/utils/getEntryImage.d.ts +1 -1
- package/utils/getEntryImage.js.map +1 -1
- package/utils/getEntryTitle.d.ts +1 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -4
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.d.ts +1 -1
- package/utils/identity.js.map +1 -1
- package/utils/isHeadlessCmsReady.d.ts +1 -1
- package/utils/isHeadlessCmsReady.js.map +1 -1
- package/utils/modelFieldTraverser/ModelFieldTraverser.d.ts +1 -1
- package/utils/modelFieldTraverser/ModelFieldTraverser.js.map +1 -1
- package/utils/renderFields.d.ts +1 -1
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +1 -1
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +1 -1
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +1 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +2 -2
- package/utils/renderSortEnum.js.map +1 -1
- package/validators/dateGte.d.ts +1 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.d.ts +1 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.d.ts +1 -1
- package/validators/gte.js.map +1 -1
- package/validators/in.d.ts +1 -1
- package/validators/in.js.map +1 -1
- package/validators/lte.d.ts +1 -1
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.d.ts +1 -1
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.d.ts +1 -1
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.d.ts +1 -1
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.d.ts +1 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.d.ts +1 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.d.ts +1 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.d.ts +1 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.d.ts +1 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.d.ts +1 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.d.ts +1 -1
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.d.ts +1 -1
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.d.ts +1 -1
- package/validators/unique.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createDateLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","exports"],"sources":["dateLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createDateLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-lte\",\n validator: {\n name: \"dateLte\",\n async validate({ value, validator }) {\n const { value: lteValue, type } = validator.settings || {};\n if (typeof lteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOO,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOH,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createDateLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","exports"],"sources":["dateLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createDateLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-lte\",\n validator: {\n name: \"dateLte\",\n async validate({ value, validator }) {\n const { value: lteValue, type } = validator.settings || {};\n if (typeof lteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOO,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOH,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
package/validators/gte.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createGteValidator: () => CmsModelFieldValidatorPlugin;
|
package/validators/gte.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["gte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createGteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-gte\",\n validator: {\n name: \"gte\",\n validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue !== \"undefined\") {\n return validation\n .validate(value, `gte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["gte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createGteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-gte\",\n validator: {\n name: \"gte\",\n validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue !== \"undefined\") {\n return validation\n .validate(value, `gte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/validators/in.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createInValidator: () => CmsModelFieldValidatorPlugin;
|
package/validators/in.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createInValidator","type","name","validator","validate","value","values","settings","Array","isArray","validation","join","then","v","catch","Promise","resolve","exports"],"sources":["in.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createInValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-in\",\n validator: {\n name: \"in\",\n validate({ value, validator }) {\n const values = validator.settings?.values;\n if (Array.isArray(values)) {\n return validation\n .validate(value, `in:${values.join(\":\")}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,iBAAiB,GAAGA,CAAA,KAAoC;EACjE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,8BAA8B;IACpCC,SAAS,EAAE;MACPD,IAAI,EAAE,IAAI;MACVE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,MAAM,GAAGH,SAAS,CAACI,QAAQ,EAAED,MAAM;QACzC,IAAIE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EAAE;UACvB,OAAOI,sBAAU,CACZN,QAAQ,CAACC,KAAK,EAAE,MAAMC,MAAM,CAACK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CACzCC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAjB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createInValidator","type","name","validator","validate","value","values","settings","Array","isArray","validation","join","then","v","catch","Promise","resolve","exports"],"sources":["in.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createInValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-in\",\n validator: {\n name: \"in\",\n validate({ value, validator }) {\n const values = validator.settings?.values;\n if (Array.isArray(values)) {\n return validation\n .validate(value, `in:${values.join(\":\")}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,iBAAiB,GAAGA,CAAA,KAAoC;EACjE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,8BAA8B;IACpCC,SAAS,EAAE;MACPD,IAAI,EAAE,IAAI;MACVE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,MAAM,GAAGH,SAAS,CAACI,QAAQ,EAAED,MAAM;QACzC,IAAIE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EAAE;UACvB,OAAOI,sBAAU,CACZN,QAAQ,CAACC,KAAK,EAAE,MAAMC,MAAM,CAACK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CACzCC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAjB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/validators/lte.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createLteValidator: () => CmsModelFieldValidatorPlugin;
|
package/validators/lte.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["lte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createLteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-lte\",\n validator: {\n name: \"lte\",\n validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue !== \"undefined\") {\n return validation\n .validate(value, `lte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["lte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createLteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-lte\",\n validator: {\n name: \"lte\",\n validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue !== \"undefined\") {\n return validation\n .validate(value, `lte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createMaxLengthValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createMaxLengthValidator","type","name","validator","validate","value","maxLengthValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["maxLength.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createMaxLengthValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-max-length\",\n validator: {\n name: \"maxLength\",\n validate({ value, validator }) {\n const maxLengthValue = validator.settings?.value;\n if (typeof maxLengthValue !== \"undefined\") {\n return validation\n .validate(value, `maxLength:${maxLengthValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,wBAAwB,GAAGA,CAAA,KAAoC;EACxE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,sCAAsC;IAC5CC,SAAS,EAAE;MACPD,IAAI,EAAE,WAAW;MACjBE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,cAAc,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAChD,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;UACvC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,aAAaC,cAAc,EAAE,CAAC,CAC9CG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createMaxLengthValidator","type","name","validator","validate","value","maxLengthValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["maxLength.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createMaxLengthValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-max-length\",\n validator: {\n name: \"maxLength\",\n validate({ value, validator }) {\n const maxLengthValue = validator.settings?.value;\n if (typeof maxLengthValue !== \"undefined\") {\n return validation\n .validate(value, `maxLength:${maxLengthValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,wBAAwB,GAAGA,CAAA,KAAoC;EACxE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,sCAAsC;IAC5CC,SAAS,EAAE;MACPD,IAAI,EAAE,WAAW;MACjBE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,cAAc,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAChD,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;UACvC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,aAAaC,cAAc,EAAE,CAAC,CAC9CG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createMinLengthValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createMinLengthValidator","type","name","validator","validate","value","minLengthValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["minLength.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createMinLengthValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-min-length\",\n validator: {\n name: \"minLength\",\n validate({ value, validator }) {\n const minLengthValue = validator.settings?.value;\n if (typeof minLengthValue !== \"undefined\") {\n return validation\n .validate(value, `minLength:${minLengthValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,wBAAwB,GAAGA,CAAA,KAAoC;EACxE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,sCAAsC;IAC5CC,SAAS,EAAE;MACPD,IAAI,EAAE,WAAW;MACjBE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,cAAc,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAChD,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;UACvC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,aAAaC,cAAc,EAAE,CAAC,CAC9CG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createMinLengthValidator","type","name","validator","validate","value","minLengthValue","settings","validation","then","v","catch","Promise","resolve","exports"],"sources":["minLength.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createMinLengthValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-min-length\",\n validator: {\n name: \"minLength\",\n validate({ value, validator }) {\n const minLengthValue = validator.settings?.value;\n if (typeof minLengthValue !== \"undefined\") {\n return validation\n .validate(value, `minLength:${minLengthValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,wBAAwB,GAAGA,CAAA,KAAoC;EACxE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,sCAAsC;IAC5CC,SAAS,EAAE;MACPD,IAAI,EAAE,WAAW;MACjBE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,cAAc,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAChD,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;UACvC,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,aAAaC,cAAc,EAAE,CAAC,CAC9CG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAd,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
package/validators/pattern.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createPatternValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createPatternValidator","type","name","validator","validate","value","context","settings","pattern","preset","patternPlugin","plugins","byType","find","item","RegExp","regex","flags","test","exports"],"sources":["pattern.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin, CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createPatternValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-pattern\",\n validator: {\n name: \"pattern\",\n async validate({ value, validator, context }) {\n if (!value) {\n return true;\n }\n\n const { settings } = validator;\n\n let pattern;\n if (settings?.preset === \"custom\") {\n pattern = settings;\n } else {\n const patternPlugin = context.plugins\n .byType<CmsModelFieldPatternValidatorPlugin>(\n \"cms-model-field-validator-pattern\"\n )\n .find(item => item.pattern.name === settings?.preset);\n\n if (patternPlugin) {\n pattern = patternPlugin.pattern;\n }\n }\n\n if (!pattern) {\n return true;\n }\n\n return new RegExp(pattern.regex, pattern.flags).test(value);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,sBAAsB,GAAGA,CAAA,KAAoC;EACtE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,mCAAmC;IACzCC,SAAS,EAAE;MACPD,IAAI,EAAE,SAAS;MACf,MAAME,QAAQA,CAAC;QAAEC,KAAK;QAAEF,SAAS;QAAEG;MAAQ,CAAC,EAAE;QAC1C,IAAI,CAACD,KAAK,EAAE;UACR,OAAO,IAAI;QACf;QAEA,MAAM;UAAEE;QAAS,CAAC,GAAGJ,SAAS;QAE9B,IAAIK,OAAO;QACX,IAAID,QAAQ,EAAEE,MAAM,KAAK,QAAQ,EAAE;UAC/BD,OAAO,GAAGD,QAAQ;QACtB,CAAC,MAAM;UACH,MAAMG,aAAa,GAAGJ,OAAO,CAACK,OAAO,CAChCC,MAAM,CACH,mCACJ,CAAC,CACAC,IAAI,CAACC,IAAI,IAAIA,IAAI,CAACN,OAAO,CAACN,IAAI,KAAKK,QAAQ,EAAEE,MAAM,CAAC;UAEzD,IAAIC,aAAa,EAAE;YACfF,OAAO,GAAGE,aAAa,CAACF,OAAO;UACnC;QACJ;QAEA,IAAI,CAACA,OAAO,EAAE;UACV,OAAO,IAAI;QACf;QAEA,OAAO,IAAIO,MAAM,CAACP,OAAO,CAACQ,KAAK,EAAER,OAAO,CAACS,KAAK,CAAC,CAACC,IAAI,CAACb,KAAK,CAAC;MAC/D;IACJ;EACJ,CAAC;AACL,CAAC;AAACc,OAAA,CAAAnB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createPatternValidator","type","name","validator","validate","value","context","settings","pattern","preset","patternPlugin","plugins","byType","find","item","RegExp","regex","flags","test","exports"],"sources":["pattern.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin, CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createPatternValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-pattern\",\n validator: {\n name: \"pattern\",\n async validate({ value, validator, context }) {\n if (!value) {\n return true;\n }\n\n const { settings } = validator;\n\n let pattern;\n if (settings?.preset === \"custom\") {\n pattern = settings;\n } else {\n const patternPlugin = context.plugins\n .byType<CmsModelFieldPatternValidatorPlugin>(\n \"cms-model-field-validator-pattern\"\n )\n .find(item => item.pattern.name === settings?.preset);\n\n if (patternPlugin) {\n pattern = patternPlugin.pattern;\n }\n }\n\n if (!pattern) {\n return true;\n }\n\n return new RegExp(pattern.regex, pattern.flags).test(value);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,sBAAsB,GAAGA,CAAA,KAAoC;EACtE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,mCAAmC;IACzCC,SAAS,EAAE;MACPD,IAAI,EAAE,SAAS;MACf,MAAME,QAAQA,CAAC;QAAEC,KAAK;QAAEF,SAAS;QAAEG;MAAQ,CAAC,EAAE;QAC1C,IAAI,CAACD,KAAK,EAAE;UACR,OAAO,IAAI;QACf;QAEA,MAAM;UAAEE;QAAS,CAAC,GAAGJ,SAAS;QAE9B,IAAIK,OAAO;QACX,IAAID,QAAQ,EAAEE,MAAM,KAAK,QAAQ,EAAE;UAC/BD,OAAO,GAAGD,QAAQ;QACtB,CAAC,MAAM;UACH,MAAMG,aAAa,GAAGJ,OAAO,CAACK,OAAO,CAChCC,MAAM,CACH,mCACJ,CAAC,CACAC,IAAI,CAACC,IAAI,IAAIA,IAAI,CAACN,OAAO,CAACN,IAAI,KAAKK,QAAQ,EAAEE,MAAM,CAAC;UAEzD,IAAIC,aAAa,EAAE;YACfF,OAAO,GAAGE,aAAa,CAACF,OAAO;UACnC;QACJ;QAEA,IAAI,CAACA,OAAO,EAAE;UACV,OAAO,IAAI;QACf;QAEA,OAAO,IAAIO,MAAM,CAACP,OAAO,CAACQ,KAAK,EAAER,OAAO,CAACS,KAAK,CAAC,CAACC,IAAI,CAACb,KAAK,CAAC;MAC/D;IACJ;EACJ,CAAC;AACL,CAAC;AAACc,OAAA,CAAAnB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createEmailPatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEmailPatternValidator","type","name","pattern","regex","flags","exports"],"sources":["email.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createEmailPatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-email\",\n pattern: {\n name: \"email\",\n regex: `^\\\\w[\\\\+\\\\w.-]*@([\\\\w-]+\\\\.)+[\\\\w-]+$`,\n flags: \"i\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,2BAA2B,GAAGA,CAAA,KAA2C;EAClF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,yCAAyC;IAC/CC,OAAO,EAAE;MACLD,IAAI,EAAE,OAAO;MACbE,KAAK,EAAE,uCAAuC;MAC9CC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createEmailPatternValidator","type","name","pattern","regex","flags","exports"],"sources":["email.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createEmailPatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-email\",\n pattern: {\n name: \"email\",\n regex: `^\\\\w[\\\\+\\\\w.-]*@([\\\\w-]+\\\\.)+[\\\\w-]+$`,\n flags: \"i\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,2BAA2B,GAAGA,CAAA,KAA2C;EAClF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,yCAAyC;IAC/CC,OAAO,EAAE;MACLD,IAAI,EAAE,OAAO;MACbE,KAAK,EAAE,uCAAuC;MAC9CC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createPatternValidatorPlugins: () => CmsModelFieldPatternValidatorPlugin[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_email","require","_url","_lowerCase","_upperCase","_lowerCaseSpace","_upperCaseSpace","createPatternValidatorPlugins","createEmailPatternValidator","createUrlPatternValidator","createLowerCasePatternValidator","createUpperCasePatternValidator","createLowerCaseSpacePatternValidator","createUpperCaseSpacePatternValidator","exports"],"sources":["index.ts"],"sourcesContent":["import { createEmailPatternValidator } from \"./email\";\nimport { createUrlPatternValidator } from \"./url\";\nimport { createLowerCasePatternValidator } from \"./lowerCase\";\nimport { createUpperCasePatternValidator } from \"./upperCase\";\nimport { createLowerCaseSpacePatternValidator } from \"./lowerCaseSpace\";\nimport { createUpperCaseSpacePatternValidator } from \"./upperCaseSpace\";\nimport { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createPatternValidatorPlugins = (): CmsModelFieldPatternValidatorPlugin[] => {\n return [\n createEmailPatternValidator(),\n createUrlPatternValidator(),\n createLowerCasePatternValidator(),\n createUpperCasePatternValidator(),\n createLowerCaseSpacePatternValidator(),\n createUpperCaseSpacePatternValidator()\n ];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAGO,MAAMM,6BAA6B,GAAGA,CAAA,KAA6C;EACtF,OAAO,CACH,IAAAC,kCAA2B,EAAC,CAAC,EAC7B,IAAAC,8BAAyB,EAAC,CAAC,EAC3B,IAAAC,0CAA+B,EAAC,CAAC,EACjC,IAAAC,0CAA+B,EAAC,CAAC,EACjC,IAAAC,oDAAoC,EAAC,CAAC,EACtC,IAAAC,oDAAoC,EAAC,CAAC,CACzC;AACL,CAAC;AAACC,OAAA,CAAAP,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_email","require","_url","_lowerCase","_upperCase","_lowerCaseSpace","_upperCaseSpace","createPatternValidatorPlugins","createEmailPatternValidator","createUrlPatternValidator","createLowerCasePatternValidator","createUpperCasePatternValidator","createLowerCaseSpacePatternValidator","createUpperCaseSpacePatternValidator","exports"],"sources":["index.ts"],"sourcesContent":["import { createEmailPatternValidator } from \"./email\";\nimport { createUrlPatternValidator } from \"./url\";\nimport { createLowerCasePatternValidator } from \"./lowerCase\";\nimport { createUpperCasePatternValidator } from \"./upperCase\";\nimport { createLowerCaseSpacePatternValidator } from \"./lowerCaseSpace\";\nimport { createUpperCaseSpacePatternValidator } from \"./upperCaseSpace\";\nimport type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createPatternValidatorPlugins = (): CmsModelFieldPatternValidatorPlugin[] => {\n return [\n createEmailPatternValidator(),\n createUrlPatternValidator(),\n createLowerCasePatternValidator(),\n createUpperCasePatternValidator(),\n createLowerCaseSpacePatternValidator(),\n createUpperCaseSpacePatternValidator()\n ];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAGO,MAAMM,6BAA6B,GAAGA,CAAA,KAA6C;EACtF,OAAO,CACH,IAAAC,kCAA2B,EAAC,CAAC,EAC7B,IAAAC,8BAAyB,EAAC,CAAC,EAC3B,IAAAC,0CAA+B,EAAC,CAAC,EACjC,IAAAC,0CAA+B,EAAC,CAAC,EACjC,IAAAC,oDAAoC,EAAC,CAAC,EACtC,IAAAC,oDAAoC,EAAC,CAAC,CACzC;AACL,CAAC;AAACC,OAAA,CAAAP,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createLowerCasePatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createLowerCasePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["lowerCase.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createLowerCasePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-lower-case\",\n pattern: {\n name: \"lowerCase\",\n regex: `^([a-z]*)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,+BAA+B,GAAGA,CAAA,KAA2C;EACtF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,8CAA8C;IACpDC,OAAO,EAAE;MACLD,IAAI,EAAE,WAAW;MACjBE,KAAK,EAAE,YAAY;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createLowerCasePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["lowerCase.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createLowerCasePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-lower-case\",\n pattern: {\n name: \"lowerCase\",\n regex: `^([a-z]*)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,+BAA+B,GAAGA,CAAA,KAA2C;EACtF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,8CAA8C;IACpDC,OAAO,EAAE;MACLD,IAAI,EAAE,WAAW;MACjBE,KAAK,EAAE,YAAY;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createLowerCaseSpacePatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createLowerCaseSpacePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["lowerCaseSpace.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createLowerCaseSpacePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-lower-case-space\",\n pattern: {\n name: \"lowerCaseSpace\",\n regex: `^([a-z\\\\s]+)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,oCAAoC,GAAGA,CAAA,KAA2C;EAC3F,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,oDAAoD;IAC1DC,OAAO,EAAE;MACLD,IAAI,EAAE,gBAAgB;MACtBE,KAAK,EAAE,eAAe;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createLowerCaseSpacePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["lowerCaseSpace.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createLowerCaseSpacePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-lower-case-space\",\n pattern: {\n name: \"lowerCaseSpace\",\n regex: `^([a-z\\\\s]+)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,oCAAoC,GAAGA,CAAA,KAA2C;EAC3F,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,oDAAoD;IAC1DC,OAAO,EAAE;MACLD,IAAI,EAAE,gBAAgB;MACtBE,KAAK,EAAE,eAAe;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createUpperCasePatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createUpperCasePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["upperCase.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUpperCasePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-upper-case\",\n pattern: {\n name: \"upperCase\",\n regex: `^([A-Z]*)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,+BAA+B,GAAGA,CAAA,KAA2C;EACtF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,8CAA8C;IACpDC,OAAO,EAAE;MACLD,IAAI,EAAE,WAAW;MACjBE,KAAK,EAAE,YAAY;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createUpperCasePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["upperCase.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUpperCasePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-upper-case\",\n pattern: {\n name: \"upperCase\",\n regex: `^([A-Z]*)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,+BAA+B,GAAGA,CAAA,KAA2C;EACtF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,8CAA8C;IACpDC,OAAO,EAAE;MACLD,IAAI,EAAE,WAAW;MACjBE,KAAK,EAAE,YAAY;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createUpperCaseSpacePatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createUpperCaseSpacePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["upperCaseSpace.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUpperCaseSpacePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-upper-case-space\",\n pattern: {\n name: \"upperCaseSpace\",\n regex: `^([A-Z\\\\s]+)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,oCAAoC,GAAGA,CAAA,KAA2C;EAC3F,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,oDAAoD;IAC1DC,OAAO,EAAE;MACLD,IAAI,EAAE,gBAAgB;MACtBE,KAAK,EAAE,eAAe;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createUpperCaseSpacePatternValidator","type","name","pattern","regex","flags","exports"],"sources":["upperCaseSpace.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUpperCaseSpacePatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-upper-case-space\",\n pattern: {\n name: \"upperCaseSpace\",\n regex: `^([A-Z\\\\s]+)$`,\n flags: \"\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,oCAAoC,GAAGA,CAAA,KAA2C;EAC3F,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,oDAAoD;IAC1DC,OAAO,EAAE;MACLD,IAAI,EAAE,gBAAgB;MACtBE,KAAK,EAAE,eAAe;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
1
|
+
import type { CmsModelFieldPatternValidatorPlugin } from "../../types";
|
|
2
2
|
export declare const createUrlPatternValidator: () => CmsModelFieldPatternValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createUrlPatternValidator","type","name","pattern","regex","flags","exports"],"sources":["url.ts"],"sourcesContent":["import { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUrlPatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-url\",\n pattern: {\n name: \"url\",\n regex: \"^(ftp|http|https):\\\\/\\\\/(\\\\w+:{0,1}\\\\w*@)?(\\\\S+)(:[0-9]+)?(\\\\/|\\\\/([\\\\w#!:.?+=&%@!\\\\-\\\\/]))?$\",\n flags: \"i\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,yBAAyB,GAAGA,CAAA,KAA2C;EAChF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,uCAAuC;IAC7CC,OAAO,EAAE;MACLD,IAAI,EAAE,KAAK;MACXE,KAAK,EAAE,+FAA+F;MACtGC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createUrlPatternValidator","type","name","pattern","regex","flags","exports"],"sources":["url.ts"],"sourcesContent":["import type { CmsModelFieldPatternValidatorPlugin } from \"~/types\";\n\nexport const createUrlPatternValidator = (): CmsModelFieldPatternValidatorPlugin => {\n return {\n type: \"cms-model-field-validator-pattern\",\n name: \"cms-model-field-validator-pattern-url\",\n pattern: {\n name: \"url\",\n regex: \"^(ftp|http|https):\\\\/\\\\/(\\\\w+:{0,1}\\\\w*@)?(\\\\S+)(:[0-9]+)?(\\\\/|\\\\/([\\\\w#!:.?+=&%@!\\\\-\\\\/]))?$\",\n flags: \"i\"\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,yBAAyB,GAAGA,CAAA,KAA2C;EAChF,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,uCAAuC;IAC7CC,OAAO,EAAE;MACLD,IAAI,EAAE,KAAK;MACXE,KAAK,EAAE,+FAA+F;MACtGC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
package/validators/required.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createRequiredValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createRequiredValidator","type","name","validator","validate","value","validation","then","v","catch","exports"],"sources":["required.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createRequiredValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-required\",\n validator: {\n name: \"required\",\n validate({ value }) {\n return validation\n .validate(value, \"required\")\n .then(v => v === true)\n .catch(() => false);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,uBAAuB,GAAGA,CAAA,KAAoC;EACvE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,oCAAoC;IAC1CC,SAAS,EAAE;MACPD,IAAI,EAAE,UAAU;MAChBE,QAAQA,CAAC;QAAEC;MAAM,CAAC,EAAE;QAChB,OAAOC,sBAAU,CACZF,QAAQ,CAACC,KAAK,EAAE,UAAU,CAAC,CAC3BE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAV,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createRequiredValidator","type","name","validator","validate","value","validation","then","v","catch","exports"],"sources":["required.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createRequiredValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-required\",\n validator: {\n name: \"required\",\n validate({ value }) {\n return validation\n .validate(value, \"required\")\n .then(v => v === true)\n .catch(() => false);\n }\n }\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,uBAAuB,GAAGA,CAAA,KAAoC;EACvE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,oCAAoC;IAC1CC,SAAS,EAAE;MACPD,IAAI,EAAE,UAAU;MAChBE,QAAQA,CAAC;QAAEC;MAAM,CAAC,EAAE;QAChB,OAAOC,sBAAU,CACZF,QAAQ,CAACC,KAAK,EAAE,UAAU,CAAC,CAC3BE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;IACJ;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAV,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/validators/timeGte.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createTimeGteValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createTimeGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","exports"],"sources":["timeGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createTimeGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-time-gte\",\n validator: {\n name: \"timeGte\",\n async validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue === \"undefined\") {\n return true;\n }\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;MAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf;MACA,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createTimeGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","exports"],"sources":["timeGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createTimeGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-time-gte\",\n validator: {\n name: \"timeGte\",\n async validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue === \"undefined\") {\n return true;\n }\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;MAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf;MACA,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
package/validators/timeLte.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
export declare const createTimeLteValidator: () => CmsModelFieldValidatorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_validation","require","createTimeLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","exports"],"sources":["timeLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createTimeLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-time-lte\",\n validator: {\n name: \"timeLte\",\n async validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue === \"undefined\") {\n return true;\n }\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;MAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf;MACA,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_validation","require","createTimeLteValidator","type","name","validator","validate","value","lteValue","settings","validation","then","v","catch","exports"],"sources":["timeLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createTimeLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-time-lte\",\n validator: {\n name: \"timeLte\",\n async validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue === \"undefined\") {\n return true;\n }\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;MAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf;MACA,OAAOE,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC;AAACC,OAAA,CAAAZ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
package/validators/unique.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CmsModelFieldValidatorPlugin } from "../types";
|
|
1
|
+
import type { CmsModelFieldValidatorPlugin } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* Validation if the field value is unique.
|
|
4
4
|
* Be aware of using this in DynamoDB only environment as all records will be loaded to check for the unique value.
|
package/validators/unique.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","createUniqueValidator","type","name","validator","validate","field","value","initialValue","context","model","entry","manager","cms","getEntryManager","trim","items","listLatest","where","entryId_not","entryId","undefined","fieldId","limit","length","ex","WebinyError","error","exports"],"sources":["unique.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\n/**\n * Validation if the field value is unique.\n * Be aware of using this in DynamoDB only environment as all records will be loaded to check for the unique value.\n */\nexport const createUniqueValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-unique\",\n validator: {\n name: \"unique\",\n validate: async ({ field, value: initialValue, context, model, entry }) => {\n const manager = await context.cms.getEntryManager(model);\n /**\n * If there is no value passed, we are assuming that user does not want any value to be validated.\n * If user needs something to passed into a unique field, they must add \"required\" validator.\n */\n const value = (initialValue || \"\").trim();\n if (!value) {\n return true;\n }\n try {\n const [items] = await manager.listLatest({\n where: {\n entryId_not: entry ? entry.entryId : undefined,\n [field.fieldId]: value\n },\n limit: 1\n });\n return items.length === 0;\n } catch (ex) {\n throw new WebinyError(\n \"Error while checking if the field value is unique.\",\n \"UNIQUE_CHECK_ERROR\",\n {\n error: ex,\n field,\n value,\n model\n }\n );\n }\n }\n }\n };\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAGA,CAAA,KAAoC;EACrE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,kCAAkC;IACxCC,SAAS,EAAE;MACPD,IAAI,EAAE,QAAQ;MACdE,QAAQ,EAAE,MAAAA,CAAO;QAAEC,KAAK;QAAEC,KAAK,EAAEC,YAAY;QAAEC,OAAO;QAAEC,KAAK;QAAEC;MAAM,CAAC,KAAK;QACvE,MAAMC,OAAO,GAAG,MAAMH,OAAO,CAACI,GAAG,CAACC,eAAe,CAACJ,KAAK,CAAC;QACxD;AAChB;AACA;AACA;QACgB,MAAMH,KAAK,GAAG,CAACC,YAAY,IAAI,EAAE,EAAEO,IAAI,CAAC,CAAC;QACzC,IAAI,CAACR,KAAK,EAAE;UACR,OAAO,IAAI;QACf;QACA,IAAI;UACA,MAAM,CAACS,KAAK,CAAC,GAAG,MAAMJ,OAAO,CAACK,UAAU,CAAC;YACrCC,KAAK,EAAE;cACHC,WAAW,EAAER,KAAK,GAAGA,KAAK,CAACS,OAAO,GAAGC,SAAS;cAC9C,CAACf,KAAK,CAACgB,OAAO,GAAGf;YACrB,CAAC;YACDgB,KAAK,EAAE;UACX,CAAC,CAAC;UACF,OAAOP,KAAK,CAACQ,MAAM,KAAK,CAAC;QAC7B,CAAC,CAAC,OAAOC,EAAE,EAAE;UACT,MAAM,IAAIC,cAAW,CACjB,oDAAoD,EACpD,oBAAoB,EACpB;YACIC,KAAK,EAAEF,EAAE;YACTnB,KAAK;YACLC,KAAK;YACLG;UACJ,CACJ,CAAC;QACL;MACJ;IACJ;EACJ,CAAC;AACL,CAAC;AAACkB,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","createUniqueValidator","type","name","validator","validate","field","value","initialValue","context","model","entry","manager","cms","getEntryManager","trim","items","listLatest","where","entryId_not","entryId","undefined","fieldId","limit","length","ex","WebinyError","error","exports"],"sources":["unique.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\n/**\n * Validation if the field value is unique.\n * Be aware of using this in DynamoDB only environment as all records will be loaded to check for the unique value.\n */\nexport const createUniqueValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-unique\",\n validator: {\n name: \"unique\",\n validate: async ({ field, value: initialValue, context, model, entry }) => {\n const manager = await context.cms.getEntryManager(model);\n /**\n * If there is no value passed, we are assuming that user does not want any value to be validated.\n * If user needs something to passed into a unique field, they must add \"required\" validator.\n */\n const value = (initialValue || \"\").trim();\n if (!value) {\n return true;\n }\n try {\n const [items] = await manager.listLatest({\n where: {\n entryId_not: entry ? entry.entryId : undefined,\n [field.fieldId]: value\n },\n limit: 1\n });\n return items.length === 0;\n } catch (ex) {\n throw new WebinyError(\n \"Error while checking if the field value is unique.\",\n \"UNIQUE_CHECK_ERROR\",\n {\n error: ex,\n field,\n value,\n model\n }\n );\n }\n }\n }\n };\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAGA,CAAA,KAAoC;EACrE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,kCAAkC;IACxCC,SAAS,EAAE;MACPD,IAAI,EAAE,QAAQ;MACdE,QAAQ,EAAE,MAAAA,CAAO;QAAEC,KAAK;QAAEC,KAAK,EAAEC,YAAY;QAAEC,OAAO;QAAEC,KAAK;QAAEC;MAAM,CAAC,KAAK;QACvE,MAAMC,OAAO,GAAG,MAAMH,OAAO,CAACI,GAAG,CAACC,eAAe,CAACJ,KAAK,CAAC;QACxD;AAChB;AACA;AACA;QACgB,MAAMH,KAAK,GAAG,CAACC,YAAY,IAAI,EAAE,EAAEO,IAAI,CAAC,CAAC;QACzC,IAAI,CAACR,KAAK,EAAE;UACR,OAAO,IAAI;QACf;QACA,IAAI;UACA,MAAM,CAACS,KAAK,CAAC,GAAG,MAAMJ,OAAO,CAACK,UAAU,CAAC;YACrCC,KAAK,EAAE;cACHC,WAAW,EAAER,KAAK,GAAGA,KAAK,CAACS,OAAO,GAAGC,SAAS;cAC9C,CAACf,KAAK,CAACgB,OAAO,GAAGf;YACrB,CAAC;YACDgB,KAAK,EAAE;UACX,CAAC,CAAC;UACF,OAAOP,KAAK,CAACQ,MAAM,KAAK,CAAC;QAC7B,CAAC,CAAC,OAAOC,EAAE,EAAE;UACT,MAAM,IAAIC,cAAW,CACjB,oDAAoD,EACpD,oBAAoB,EACpB;YACIC,KAAK,EAAEF,EAAE;YACTnB,KAAK;YACLC,KAAK;YACLG;UACJ,CACJ,CAAC;QACL;MACJ;IACJ;EACJ,CAAC;AACL,CAAC;AAACkB,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|