@webiny/api-headless-cms 0.0.0-unstable.de38392959 → 0.0.0-unstable.e0bfc55d5a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (806) hide show
  1. package/constants.d.ts +18 -6
  2. package/constants.js +29 -16
  3. package/constants.js.map +1 -1
  4. package/context.d.ts +1 -1
  5. package/context.js +61 -32
  6. package/context.js.map +1 -1
  7. package/crud/AccessControl/AccessControl.d.ts +98 -0
  8. package/crud/AccessControl/AccessControl.js +542 -0
  9. package/crud/AccessControl/AccessControl.js.map +1 -0
  10. package/crud/AccessControl/README.md +47 -0
  11. package/crud/AccessControl/groups-own.png +0 -0
  12. package/crud/AccessControl/models-own.png +0 -0
  13. package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +4 -0
  14. package/crud/contentEntry/abstractions/IDeleteEntry.js +7 -0
  15. package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -0
  16. package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +4 -0
  17. package/crud/contentEntry/abstractions/IDeleteEntryOperation.js +7 -0
  18. package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -0
  19. package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +4 -0
  20. package/crud/contentEntry/abstractions/IGetEntriesByIds.js +7 -0
  21. package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -0
  22. package/crud/contentEntry/abstractions/IGetEntry.d.ts +4 -0
  23. package/crud/contentEntry/abstractions/IGetEntry.js +7 -0
  24. package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -0
  25. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +4 -0
  26. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js +7 -0
  27. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -0
  28. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +4 -0
  29. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js +7 -0
  30. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -0
  31. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +4 -0
  32. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js +7 -0
  33. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -0
  34. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +4 -0
  35. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js +7 -0
  36. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -0
  37. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +4 -0
  38. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js +7 -0
  39. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -0
  40. package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +4 -0
  41. package/crud/contentEntry/abstractions/IGetRevisionById.js +7 -0
  42. package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -0
  43. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +4 -0
  44. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js +7 -0
  45. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -0
  46. package/crud/contentEntry/abstractions/IListEntries.d.ts +4 -0
  47. package/crud/contentEntry/abstractions/IListEntries.js +7 -0
  48. package/crud/contentEntry/abstractions/IListEntries.js.map +1 -0
  49. package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +4 -0
  50. package/crud/contentEntry/abstractions/IListEntriesOperation.js +7 -0
  51. package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -0
  52. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +4 -0
  53. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js +7 -0
  54. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -0
  55. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +4 -0
  56. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js +7 -0
  57. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -0
  58. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +4 -0
  59. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js +7 -0
  60. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -0
  61. package/crud/contentEntry/abstractions/index.d.ts +16 -0
  62. package/crud/contentEntry/abstractions/index.js +183 -0
  63. package/crud/contentEntry/abstractions/index.js.map +1 -0
  64. package/crud/contentEntry/afterDelete.d.ts +6 -2
  65. package/crud/contentEntry/afterDelete.js +15 -1
  66. package/crud/contentEntry/afterDelete.js.map +1 -1
  67. package/crud/contentEntry/beforeCreate.d.ts +2 -2
  68. package/crud/contentEntry/beforeCreate.js.map +1 -1
  69. package/crud/contentEntry/beforeUpdate.d.ts +2 -2
  70. package/crud/contentEntry/beforeUpdate.js.map +1 -1
  71. package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +8 -8
  72. package/crud/contentEntry/entryDataFactories/createEntryData.js +30 -4
  73. package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
  74. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +8 -6
  75. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +54 -11
  76. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
  77. package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +5 -5
  78. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +22 -20
  79. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
  80. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +3 -3
  81. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +18 -16
  82. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
  83. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +5 -5
  84. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +10 -8
  85. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
  86. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +5 -5
  87. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +8 -0
  88. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
  89. package/crud/contentEntry/entryDataFactories/index.js.map +1 -1
  90. package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.d.ts +1 -1
  91. package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
  92. package/crud/contentEntry/entryDataFactories/statuses.js +3 -6
  93. package/crud/contentEntry/entryDataFactories/statuses.js.map +1 -1
  94. package/crud/contentEntry/entryDataValidation.d.ts +2 -2
  95. package/crud/contentEntry/entryDataValidation.js.map +1 -1
  96. package/crud/contentEntry/markLockedFields.d.ts +1 -1
  97. package/crud/contentEntry/markLockedFields.js.map +1 -1
  98. package/crud/contentEntry/referenceFieldsMapping.d.ts +1 -1
  99. package/crud/contentEntry/referenceFieldsMapping.js +10 -10
  100. package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
  101. package/crud/contentEntry/searchableFields.d.ts +2 -2
  102. package/crud/contentEntry/searchableFields.js.map +1 -1
  103. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +10 -0
  104. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js +58 -0
  105. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -0
  106. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +7 -0
  107. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js +17 -0
  108. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -0
  109. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +9 -0
  110. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js +45 -0
  111. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -0
  112. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +9 -0
  113. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js +22 -0
  114. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -0
  115. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +10 -0
  116. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js +33 -0
  117. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -0
  118. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +7 -0
  119. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js +17 -0
  120. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -0
  121. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +9 -0
  122. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js +45 -0
  123. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -0
  124. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +6 -0
  125. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js +21 -0
  126. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -0
  127. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +9 -0
  128. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js +54 -0
  129. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -0
  130. package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +28 -0
  131. package/crud/contentEntry/useCases/DeleteEntry/index.js +42 -0
  132. package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -0
  133. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +9 -0
  134. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +21 -0
  135. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -0
  136. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +7 -0
  137. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js +18 -0
  138. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -0
  139. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +9 -0
  140. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js +28 -0
  141. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -0
  142. package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +13 -0
  143. package/crud/contentEntry/useCases/GetEntriesByIds/index.js +20 -0
  144. package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -0
  145. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +9 -0
  146. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +21 -0
  147. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -0
  148. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +7 -0
  149. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js +18 -0
  150. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -0
  151. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +9 -0
  152. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js +28 -0
  153. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -0
  154. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +13 -0
  155. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +20 -0
  156. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -0
  157. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +9 -0
  158. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +22 -0
  159. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -0
  160. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +7 -0
  161. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js +21 -0
  162. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -0
  163. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +7 -0
  164. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js +21 -0
  165. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -0
  166. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +15 -0
  167. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +22 -0
  168. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -0
  169. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +9 -0
  170. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +22 -0
  171. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -0
  172. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +7 -0
  173. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js +21 -0
  174. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -0
  175. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +11 -0
  176. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +18 -0
  177. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -0
  178. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +9 -0
  179. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +21 -0
  180. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -0
  181. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +7 -0
  182. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js +18 -0
  183. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -0
  184. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +9 -0
  185. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js +28 -0
  186. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -0
  187. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +13 -0
  188. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +20 -0
  189. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -0
  190. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +9 -0
  191. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +22 -0
  192. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -0
  193. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +7 -0
  194. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js +21 -0
  195. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -0
  196. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +11 -0
  197. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +18 -0
  198. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -0
  199. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +9 -0
  200. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +22 -0
  201. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -0
  202. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +7 -0
  203. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js +21 -0
  204. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -0
  205. package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +11 -0
  206. package/crud/contentEntry/useCases/GetRevisionById/index.js +18 -0
  207. package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -0
  208. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +9 -0
  209. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +21 -0
  210. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -0
  211. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +7 -0
  212. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js +18 -0
  213. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -0
  214. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +13 -0
  215. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +18 -0
  216. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -0
  217. package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +7 -0
  218. package/crud/contentEntry/useCases/ListEntries/GetEntry.js +29 -0
  219. package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -0
  220. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +11 -0
  221. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js +38 -0
  222. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -0
  223. package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +7 -0
  224. package/crud/contentEntry/useCases/ListEntries/ListEntries.js +62 -0
  225. package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -0
  226. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +14 -0
  227. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +24 -0
  228. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -0
  229. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +7 -0
  230. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js +24 -0
  231. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -0
  232. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +7 -0
  233. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js +25 -0
  234. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -0
  235. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +7 -0
  236. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js +24 -0
  237. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -0
  238. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +7 -0
  239. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js +24 -0
  240. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -0
  241. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +9 -0
  242. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js +22 -0
  243. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -0
  244. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +8 -0
  245. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js +27 -0
  246. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -0
  247. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +8 -0
  248. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js +26 -0
  249. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -0
  250. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +7 -0
  251. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js +36 -0
  252. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -0
  253. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +11 -0
  254. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js +41 -0
  255. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -0
  256. package/crud/contentEntry/useCases/ListEntries/index.d.ts +26 -0
  257. package/crud/contentEntry/useCases/ListEntries/index.js +61 -0
  258. package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -0
  259. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +10 -0
  260. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js +37 -0
  261. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -0
  262. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +9 -0
  263. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +19 -0
  264. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -0
  265. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +9 -0
  266. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js +42 -0
  267. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -0
  268. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +9 -0
  269. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js +22 -0
  270. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -0
  271. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +9 -0
  272. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js +53 -0
  273. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -0
  274. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +25 -0
  275. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +24 -0
  276. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -0
  277. package/crud/contentEntry/useCases/index.d.ts +11 -0
  278. package/crud/contentEntry/useCases/index.js +128 -0
  279. package/crud/contentEntry/useCases/index.js.map +1 -0
  280. package/crud/contentEntry.crud.d.ts +6 -8
  281. package/crud/contentEntry.crud.js +304 -357
  282. package/crud/contentEntry.crud.js.map +1 -1
  283. package/crud/contentModel/beforeCreate.d.ts +2 -2
  284. package/crud/contentModel/beforeCreate.js.map +1 -1
  285. package/crud/contentModel/beforeDelete.d.ts +3 -5
  286. package/crud/contentModel/beforeDelete.js +49 -15
  287. package/crud/contentModel/beforeDelete.js.map +1 -1
  288. package/crud/contentModel/beforeUpdate.d.ts +2 -2
  289. package/crud/contentModel/beforeUpdate.js.map +1 -1
  290. package/crud/contentModel/compatibility/modelApiName.d.ts +1 -1
  291. package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
  292. package/crud/contentModel/contentModelManagerFactory.d.ts +2 -2
  293. package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
  294. package/crud/contentModel/createFieldStorageId.d.ts +1 -1
  295. package/crud/contentModel/createFieldStorageId.js.map +1 -1
  296. package/crud/contentModel/defaultFields.d.ts +1 -1
  297. package/crud/contentModel/defaultFields.js.map +1 -1
  298. package/crud/contentModel/ensureTypeTag.d.ts +1 -1
  299. package/crud/contentModel/ensureTypeTag.js.map +1 -1
  300. package/crud/contentModel/fields/descriptionField.d.ts +6 -2
  301. package/crud/contentModel/fields/descriptionField.js +14 -28
  302. package/crud/contentModel/fields/descriptionField.js.map +1 -1
  303. package/crud/contentModel/fields/getApplicableFieldById.d.ts +2 -0
  304. package/crud/contentModel/fields/getApplicableFieldById.js +15 -0
  305. package/crud/contentModel/fields/getApplicableFieldById.js.map +1 -0
  306. package/crud/contentModel/fields/imageField.d.ts +2 -2
  307. package/crud/contentModel/fields/imageField.js +9 -28
  308. package/crud/contentModel/fields/imageField.js.map +1 -1
  309. package/crud/contentModel/fields/titleField.d.ts +6 -2
  310. package/crud/contentModel/fields/titleField.js +14 -43
  311. package/crud/contentModel/fields/titleField.js.map +1 -1
  312. package/crud/contentModel/listModelsFromDatabase.d.ts +3 -3
  313. package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
  314. package/crud/contentModel/validate/endingAllowed.d.ts +1 -1
  315. package/crud/contentModel/validate/endingAllowed.js.map +1 -1
  316. package/crud/contentModel/validate/isModelEndingAllowed.js +1 -2
  317. package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -1
  318. package/crud/contentModel/validate/modelId.d.ts +1 -1
  319. package/crud/contentModel/validate/modelId.js.map +1 -1
  320. package/crud/contentModel/validate/pluralApiName.d.ts +1 -1
  321. package/crud/contentModel/validate/pluralApiName.js.map +1 -1
  322. package/crud/contentModel/validate/singularApiName.d.ts +1 -1
  323. package/crud/contentModel/validate/singularApiName.js.map +1 -1
  324. package/crud/contentModel/validateModel.d.ts +1 -1
  325. package/crud/contentModel/validateModel.js.map +1 -1
  326. package/crud/contentModel/validateModelFields.d.ts +1 -1
  327. package/crud/contentModel/validateModelFields.js +1 -1
  328. package/crud/contentModel/validateModelFields.js.map +1 -1
  329. package/crud/contentModel/validateStorageId.d.ts +1 -0
  330. package/crud/contentModel/validateStorageId.js +19 -0
  331. package/crud/contentModel/validateStorageId.js.map +1 -0
  332. package/crud/contentModel/validation.d.ts +197 -176
  333. package/crud/contentModel/validation.js +5 -5
  334. package/crud/contentModel/validation.js.map +1 -1
  335. package/crud/contentModel.crud.d.ts +6 -6
  336. package/crud/contentModel.crud.js +76 -37
  337. package/crud/contentModel.crud.js.map +1 -1
  338. package/crud/contentModelGroup/beforeCreate.d.ts +3 -3
  339. package/crud/contentModelGroup/beforeCreate.js.map +1 -1
  340. package/crud/contentModelGroup/beforeDelete.d.ts +3 -3
  341. package/crud/contentModelGroup/beforeDelete.js.map +1 -1
  342. package/crud/contentModelGroup/beforeUpdate.d.ts +3 -3
  343. package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
  344. package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +1 -1
  345. package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
  346. package/crud/contentModelGroup/validation.d.ts +1 -1
  347. package/crud/contentModelGroup/validation.js.map +1 -1
  348. package/crud/contentModelGroup.crud.d.ts +6 -6
  349. package/crud/contentModelGroup.crud.js +17 -28
  350. package/crud/contentModelGroup.crud.js.map +1 -1
  351. package/crud/system.crud.d.ts +4 -4
  352. package/crud/system.crud.js +10 -0
  353. package/crud/system.crud.js.map +1 -1
  354. package/export/crud/exporting.d.ts +2 -2
  355. package/export/crud/exporting.js.map +1 -1
  356. package/export/crud/importing.d.ts +2 -2
  357. package/export/crud/importing.js.map +1 -1
  358. package/export/crud/imports/importData.d.ts +2 -2
  359. package/export/crud/imports/importData.js.map +1 -1
  360. package/export/crud/imports/importGroups.d.ts +2 -2
  361. package/export/crud/imports/importGroups.js.map +1 -1
  362. package/export/crud/imports/importModels.d.ts +2 -2
  363. package/export/crud/imports/importModels.js.map +1 -1
  364. package/export/crud/imports/validateGroups.d.ts +2 -2
  365. package/export/crud/imports/validateGroups.js.map +1 -1
  366. package/export/crud/imports/validateInput.d.ts +2 -2
  367. package/export/crud/imports/validateInput.js.map +1 -1
  368. package/export/crud/imports/validateModels.d.ts +2 -2
  369. package/export/crud/imports/validateModels.js.map +1 -1
  370. package/export/crud/index.d.ts +1 -1
  371. package/export/crud/index.js.map +1 -1
  372. package/export/crud/sanitize.d.ts +3 -3
  373. package/export/crud/sanitize.js +2 -1
  374. package/export/crud/sanitize.js.map +1 -1
  375. package/export/graphql/index.d.ts +1 -1
  376. package/export/graphql/index.js +1 -1
  377. package/export/graphql/index.js.map +1 -1
  378. package/export/index.js.map +1 -1
  379. package/export/types.d.ts +5 -5
  380. package/export/types.js +1 -2
  381. package/export/types.js.map +1 -1
  382. package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +5 -3
  383. package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
  384. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +3 -2
  385. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +23 -65
  386. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
  387. package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +3 -2
  388. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +2 -2
  389. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
  390. package/fieldConverters/index.d.ts +3 -0
  391. package/fieldConverters/index.js +4 -0
  392. package/fieldConverters/index.js.map +1 -1
  393. package/graphql/buildSchemaPlugins.d.ts +3 -3
  394. package/graphql/buildSchemaPlugins.js.map +1 -1
  395. package/graphql/checkEndpointAccess.d.ts +1 -1
  396. package/graphql/checkEndpointAccess.js.map +1 -1
  397. package/graphql/createExecutableSchema.d.ts +2 -2
  398. package/graphql/createExecutableSchema.js +14 -7
  399. package/graphql/createExecutableSchema.js.map +1 -1
  400. package/graphql/createRequestBody.d.ts +1 -1
  401. package/graphql/createRequestBody.js.map +1 -1
  402. package/graphql/formatErrorPayload.js.map +1 -1
  403. package/graphql/generateSchema.d.ts +2 -2
  404. package/graphql/generateSchema.js +6 -1
  405. package/graphql/generateSchema.js.map +1 -1
  406. package/graphql/getSchema/generateCacheId.d.ts +10 -0
  407. package/graphql/getSchema/generateCacheId.js +17 -0
  408. package/graphql/getSchema/generateCacheId.js.map +1 -0
  409. package/graphql/getSchema/generateCacheKey.d.ts +10 -0
  410. package/graphql/getSchema/generateCacheKey.js +34 -0
  411. package/graphql/getSchema/generateCacheKey.js.map +1 -0
  412. package/graphql/getSchema.d.ts +4 -4
  413. package/graphql/getSchema.js +13 -50
  414. package/graphql/getSchema.js.map +1 -1
  415. package/graphql/graphQLHandlerFactory.d.ts +2 -2
  416. package/graphql/graphQLHandlerFactory.js.map +1 -1
  417. package/graphql/handleRequest.d.ts +2 -2
  418. package/graphql/handleRequest.js +8 -1
  419. package/graphql/handleRequest.js.map +1 -1
  420. package/graphql/index.d.ts +4 -3
  421. package/graphql/index.js +1 -1
  422. package/graphql/index.js.map +1 -1
  423. package/graphql/scalars/RevisionId.d.ts +2 -0
  424. package/graphql/scalars/RevisionId.js +26 -0
  425. package/graphql/scalars/RevisionId.js.map +1 -0
  426. package/graphql/scalars/RevisionIdScalarPlugin.d.ts +2 -0
  427. package/graphql/scalars/RevisionIdScalarPlugin.js +18 -0
  428. package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -0
  429. package/graphql/schema/baseContentSchema.d.ts +3 -3
  430. package/graphql/schema/baseContentSchema.js +1 -7
  431. package/graphql/schema/baseContentSchema.js.map +1 -1
  432. package/graphql/schema/baseSchema.js +12 -5
  433. package/graphql/schema/baseSchema.js.map +1 -1
  434. package/graphql/schema/contentEntries.d.ts +3 -3
  435. package/graphql/schema/contentEntries.js +3 -4
  436. package/graphql/schema/contentEntries.js.map +1 -1
  437. package/graphql/schema/contentModelGroups.d.ts +3 -3
  438. package/graphql/schema/contentModelGroups.js +1 -1
  439. package/graphql/schema/contentModelGroups.js.map +1 -1
  440. package/graphql/schema/contentModels.d.ts +4 -5
  441. package/graphql/schema/contentModels.js +21 -5
  442. package/graphql/schema/contentModels.js.map +1 -1
  443. package/graphql/schema/createFieldResolvers.d.ts +2 -2
  444. package/graphql/schema/createFieldResolvers.js +1 -3
  445. package/graphql/schema/createFieldResolvers.js.map +1 -1
  446. package/graphql/schema/createFieldTypePluginRecords.d.ts +2 -2
  447. package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
  448. package/graphql/schema/createManageResolvers.d.ts +1 -2
  449. package/graphql/schema/createManageResolvers.js +24 -49
  450. package/graphql/schema/createManageResolvers.js.map +1 -1
  451. package/graphql/schema/createManageSDL.d.ts +2 -2
  452. package/graphql/schema/createManageSDL.js +14 -5
  453. package/graphql/schema/createManageSDL.js.map +1 -1
  454. package/graphql/schema/createPreviewResolvers.d.ts +1 -2
  455. package/graphql/schema/createPreviewResolvers.js +4 -7
  456. package/graphql/schema/createPreviewResolvers.js.map +1 -1
  457. package/graphql/schema/createReadResolvers.d.ts +1 -2
  458. package/graphql/schema/createReadResolvers.js +4 -7
  459. package/graphql/schema/createReadResolvers.js.map +1 -1
  460. package/graphql/schema/createReadSDL.d.ts +2 -2
  461. package/graphql/schema/createReadSDL.js +6 -7
  462. package/graphql/schema/createReadSDL.js.map +1 -1
  463. package/graphql/schema/createSingularResolvers.d.ts +12 -0
  464. package/graphql/schema/createSingularResolvers.js +56 -0
  465. package/graphql/schema/createSingularResolvers.js.map +1 -0
  466. package/graphql/schema/createSingularSDL.d.ts +12 -0
  467. package/graphql/schema/createSingularSDL.js +95 -0
  468. package/graphql/schema/createSingularSDL.js.map +1 -0
  469. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.d.ts +7 -0
  470. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js +59 -0
  471. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -0
  472. package/graphql/schema/resolvers/manage/resolveCreate.d.ts +2 -2
  473. package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
  474. package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +2 -2
  475. package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
  476. package/graphql/schema/resolvers/manage/resolveDelete.d.ts +2 -2
  477. package/graphql/schema/resolvers/manage/resolveDelete.js +2 -1
  478. package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
  479. package/graphql/schema/resolvers/manage/resolveDeleteMultiple.d.ts +2 -2
  480. package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
  481. package/graphql/schema/resolvers/manage/resolveGet.d.ts +2 -2
  482. package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
  483. package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +2 -2
  484. package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
  485. package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +2 -2
  486. package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
  487. package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +2 -2
  488. package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
  489. package/graphql/schema/resolvers/manage/resolveList.d.ts +2 -2
  490. package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
  491. package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +4 -0
  492. package/graphql/schema/resolvers/manage/resolveListDeleted.js +20 -0
  493. package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -0
  494. package/graphql/schema/resolvers/manage/resolveMove.d.ts +2 -2
  495. package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
  496. package/graphql/schema/resolvers/manage/resolvePublish.d.ts +2 -2
  497. package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
  498. package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +2 -2
  499. package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
  500. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +7 -0
  501. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js +20 -0
  502. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -0
  503. package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +2 -2
  504. package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
  505. package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +2 -2
  506. package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
  507. package/graphql/schema/resolvers/manage/resolveValidate.d.ts +2 -2
  508. package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
  509. package/graphql/schema/resolvers/preview/resolveGet.d.ts +2 -2
  510. package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
  511. package/graphql/schema/resolvers/preview/resolveList.d.ts +2 -2
  512. package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
  513. package/graphql/schema/resolvers/read/resolveGet.d.ts +2 -2
  514. package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
  515. package/graphql/schema/resolvers/read/resolveList.d.ts +2 -2
  516. package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
  517. package/graphql/schema/resolvers/singular/resolveGet.d.ts +7 -0
  518. package/graphql/schema/resolvers/singular/resolveGet.js +21 -0
  519. package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -0
  520. package/graphql/schema/resolvers/singular/resolveUpdate.d.ts +8 -0
  521. package/graphql/schema/resolvers/singular/resolveUpdate.js +21 -0
  522. package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -0
  523. package/graphql/schema/schemaPlugins.d.ts +3 -3
  524. package/graphql/schema/schemaPlugins.js +32 -11
  525. package/graphql/schema/schemaPlugins.js.map +1 -1
  526. package/graphql/system.d.ts +1 -1
  527. package/graphql/system.js +2 -1
  528. package/graphql/system.js.map +1 -1
  529. package/graphqlFields/boolean.d.ts +1 -1
  530. package/graphqlFields/boolean.js.map +1 -1
  531. package/graphqlFields/datetime.d.ts +1 -1
  532. package/graphqlFields/datetime.js.map +1 -1
  533. package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
  534. package/graphqlFields/dynamicZone/dynamicZoneField.js +62 -8
  535. package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
  536. package/graphqlFields/dynamicZone/index.d.ts +0 -1
  537. package/graphqlFields/dynamicZone/index.js +0 -7
  538. package/graphqlFields/dynamicZone/index.js.map +1 -1
  539. package/graphqlFields/file.d.ts +1 -1
  540. package/graphqlFields/file.js.map +1 -1
  541. package/graphqlFields/helpers.d.ts +1 -1
  542. package/graphqlFields/helpers.js.map +1 -1
  543. package/graphqlFields/index.d.ts +1 -1
  544. package/graphqlFields/index.js +2 -1
  545. package/graphqlFields/index.js.map +1 -1
  546. package/graphqlFields/json.d.ts +1 -1
  547. package/graphqlFields/json.js.map +1 -1
  548. package/graphqlFields/longText.d.ts +1 -1
  549. package/graphqlFields/longText.js.map +1 -1
  550. package/graphqlFields/number.d.ts +1 -1
  551. package/graphqlFields/number.js.map +1 -1
  552. package/graphqlFields/object.d.ts +2 -2
  553. package/graphqlFields/object.js +14 -0
  554. package/graphqlFields/object.js.map +1 -1
  555. package/graphqlFields/ref.d.ts +1 -1
  556. package/graphqlFields/ref.js +1 -1
  557. package/graphqlFields/ref.js.map +1 -1
  558. package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +2 -2
  559. package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
  560. package/graphqlFields/richText/richTextResolver.d.ts +2 -2
  561. package/graphqlFields/richText/richTextResolver.js +4 -19
  562. package/graphqlFields/richText/richTextResolver.js.map +1 -1
  563. package/graphqlFields/richText.d.ts +1 -1
  564. package/graphqlFields/richText.js.map +1 -1
  565. package/graphqlFields/searchableJson.d.ts +2 -0
  566. package/graphqlFields/searchableJson.js +60 -0
  567. package/graphqlFields/searchableJson.js.map +1 -0
  568. package/graphqlFields/text.d.ts +1 -1
  569. package/graphqlFields/text.js.map +1 -1
  570. package/htmlRenderer/LexicalRenderer.d.ts +1 -1
  571. package/htmlRenderer/LexicalRenderer.js.map +1 -1
  572. package/htmlRenderer/createLexicalHTMLRenderer.js +1 -1
  573. package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
  574. package/index.d.ts +13 -7
  575. package/index.js +67 -7
  576. package/index.js.map +1 -1
  577. package/modelManager/DefaultCmsModelManager.d.ts +11 -10
  578. package/modelManager/DefaultCmsModelManager.js +16 -13
  579. package/modelManager/DefaultCmsModelManager.js.map +1 -1
  580. package/modelManager/SingletonModelManager.d.ts +12 -0
  581. package/modelManager/SingletonModelManager.js +48 -0
  582. package/modelManager/SingletonModelManager.js.map +1 -0
  583. package/modelManager/index.d.ts +2 -1
  584. package/modelManager/index.js +16 -1
  585. package/modelManager/index.js.map +1 -1
  586. package/package.json +37 -38
  587. package/parameters/context.js.map +1 -1
  588. package/parameters/header.js.map +1 -1
  589. package/parameters/index.js.map +1 -1
  590. package/parameters/manual.d.ts +2 -1
  591. package/parameters/manual.js.map +1 -1
  592. package/parameters/path.js.map +1 -1
  593. package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +9 -0
  594. package/plugins/{CmsGraphQLSchemaPlugin.js → CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js} +5 -1
  595. package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -0
  596. package/plugins/CmsGraphQLSchemaPlugin/index.d.ts +1 -0
  597. package/plugins/CmsGraphQLSchemaPlugin/index.js +18 -0
  598. package/plugins/CmsGraphQLSchemaPlugin/index.js.map +1 -0
  599. package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +1 -1
  600. package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
  601. package/plugins/CmsGroupPlugin.d.ts +9 -1
  602. package/plugins/CmsGroupPlugin.js +17 -1
  603. package/plugins/CmsGroupPlugin.js.map +1 -1
  604. package/plugins/CmsModelFieldConverterPlugin.d.ts +5 -2
  605. package/plugins/CmsModelFieldConverterPlugin.js +4 -0
  606. package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
  607. package/plugins/CmsModelPlugin.d.ts +30 -10
  608. package/plugins/CmsModelPlugin.js +101 -19
  609. package/plugins/CmsModelPlugin.js.map +1 -1
  610. package/plugins/CmsParametersPlugin.d.ts +3 -3
  611. package/plugins/CmsParametersPlugin.js.map +1 -1
  612. package/plugins/CmsRichTextRendererPlugin.d.ts +6 -6
  613. package/plugins/CmsRichTextRendererPlugin.js.map +1 -1
  614. package/plugins/StorageOperationsCmsModelPlugin.d.ts +1 -1
  615. package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
  616. package/plugins/StorageTransformPlugin.d.ts +6 -2
  617. package/plugins/StorageTransformPlugin.js +9 -1
  618. package/plugins/StorageTransformPlugin.js.map +1 -1
  619. package/plugins/index.js.map +1 -1
  620. package/storage/date.d.ts +3 -0
  621. package/storage/date.js +119 -0
  622. package/storage/date.js.map +1 -0
  623. package/storage/default.js.map +1 -1
  624. package/storage/dynamicZone.d.ts +2 -0
  625. package/storage/dynamicZone.js +157 -0
  626. package/storage/dynamicZone.js.map +1 -0
  627. package/storage/index.js +7 -1
  628. package/storage/index.js.map +1 -1
  629. package/storage/json.js +34 -5
  630. package/storage/json.js.map +1 -1
  631. package/storage/object.js +16 -12
  632. package/storage/object.js.map +1 -1
  633. package/types/context.d.ts +146 -0
  634. package/types/context.js +7 -0
  635. package/types/context.js.map +1 -0
  636. package/types/fields/dynamicZoneField.d.ts +23 -0
  637. package/types/fields/dynamicZoneField.js +7 -0
  638. package/types/fields/dynamicZoneField.js.map +1 -0
  639. package/types/fields/objectField.d.ts +13 -0
  640. package/types/fields/objectField.js +7 -0
  641. package/types/fields/objectField.js.map +1 -0
  642. package/types/identity.d.ts +19 -0
  643. package/types/identity.js +7 -0
  644. package/types/identity.js.map +1 -0
  645. package/types/index.d.ts +10 -0
  646. package/types/index.js +117 -0
  647. package/types/index.js.map +1 -0
  648. package/types/model.d.ts +199 -0
  649. package/types/model.js +7 -0
  650. package/types/model.js.map +1 -0
  651. package/types/modelAst.d.ts +39 -0
  652. package/types/modelAst.js +7 -0
  653. package/types/modelAst.js.map +1 -0
  654. package/types/modelField.d.ts +330 -0
  655. package/types/modelField.js +7 -0
  656. package/types/modelField.js.map +1 -0
  657. package/types/modelGroup.d.ts +77 -0
  658. package/types/modelGroup.js +7 -0
  659. package/types/modelGroup.js.map +1 -0
  660. package/types/plugins.d.ts +365 -0
  661. package/types/plugins.js +7 -0
  662. package/types/plugins.js.map +1 -0
  663. package/{types.d.ts → types/types.d.ts} +295 -1215
  664. package/{types.js → types/types.js} +18 -119
  665. package/types/types.js.map +1 -0
  666. package/utils/RichTextRenderer.d.ts +10 -0
  667. package/utils/RichTextRenderer.js +33 -0
  668. package/utils/RichTextRenderer.js.map +1 -0
  669. package/utils/caching/Cache.d.ts +5 -2
  670. package/utils/caching/Cache.js +4 -7
  671. package/utils/caching/Cache.js.map +1 -1
  672. package/utils/caching/CacheKey.d.ts +2 -1
  673. package/utils/caching/CacheKey.js +5 -17
  674. package/utils/caching/CacheKey.js.map +1 -1
  675. package/utils/caching/index.js.map +1 -1
  676. package/utils/caching/types.d.ts +3 -1
  677. package/utils/caching/types.js +7 -0
  678. package/utils/caching/types.js.map +1 -1
  679. package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +13 -0
  680. package/utils/contentEntryTraverser/ContentEntryTraverser.js +97 -0
  681. package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -0
  682. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +6 -0
  683. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +23 -0
  684. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -0
  685. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +7 -0
  686. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +22 -0
  687. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -0
  688. package/utils/contentModelAst/CmsModelToAstConverter.d.ts +11 -0
  689. package/utils/contentModelAst/CmsModelToAstConverter.js +28 -0
  690. package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -0
  691. package/utils/contentModelAst/index.d.ts +3 -0
  692. package/utils/contentModelAst/index.js +40 -0
  693. package/utils/contentModelAst/index.js.map +1 -0
  694. package/utils/converters/Converter.d.ts +3 -3
  695. package/utils/converters/Converter.js.map +1 -1
  696. package/utils/converters/ConverterCollection.d.ts +2 -2
  697. package/utils/converters/ConverterCollection.js.map +1 -1
  698. package/utils/converters/valueKeyStorageConverter.d.ts +3 -3
  699. package/utils/converters/valueKeyStorageConverter.js.map +1 -1
  700. package/utils/createModelField.d.ts +7 -0
  701. package/utils/createModelField.js +51 -0
  702. package/utils/createModelField.js.map +1 -0
  703. package/utils/createTypeFromFields.d.ts +1 -1
  704. package/utils/createTypeFromFields.js.map +1 -1
  705. package/utils/createTypeName.js.map +1 -1
  706. package/utils/date.js.map +1 -1
  707. package/utils/entryStorage.d.ts +13 -1
  708. package/utils/entryStorage.js +37 -3
  709. package/utils/entryStorage.js.map +1 -1
  710. package/utils/filterAsync.js.map +1 -1
  711. package/utils/getBaseFieldType.d.ts +1 -1
  712. package/utils/getBaseFieldType.js.map +1 -1
  713. package/utils/getEntryDescription.d.ts +1 -1
  714. package/utils/getEntryDescription.js.map +1 -1
  715. package/utils/getEntryImage.d.ts +1 -1
  716. package/utils/getEntryImage.js.map +1 -1
  717. package/utils/getEntryTitle.d.ts +1 -1
  718. package/utils/getEntryTitle.js.map +1 -1
  719. package/utils/getSchemaFromFieldPlugins.d.ts +6 -6
  720. package/utils/getSchemaFromFieldPlugins.js +5 -4
  721. package/utils/getSchemaFromFieldPlugins.js.map +1 -1
  722. package/utils/identity.d.ts +1 -1
  723. package/utils/identity.js.map +1 -1
  724. package/utils/incrementEntryIdVersion.js.map +1 -1
  725. package/utils/index.d.ts +1 -0
  726. package/utils/index.js +11 -0
  727. package/utils/index.js.map +1 -1
  728. package/utils/isHeadlessCmsReady.d.ts +2 -0
  729. package/utils/isHeadlessCmsReady.js +23 -0
  730. package/utils/isHeadlessCmsReady.js.map +1 -0
  731. package/utils/modelFieldTraverser/ModelFieldTraverser.d.ts +16 -0
  732. package/utils/modelFieldTraverser/ModelFieldTraverser.js +41 -0
  733. package/utils/modelFieldTraverser/ModelFieldTraverser.js.map +1 -0
  734. package/utils/modelFieldTraverser/index.d.ts +1 -0
  735. package/utils/modelFieldTraverser/index.js +18 -0
  736. package/utils/modelFieldTraverser/index.js.map +1 -0
  737. package/utils/renderFields.d.ts +1 -1
  738. package/utils/renderFields.js +2 -0
  739. package/utils/renderFields.js.map +1 -1
  740. package/utils/renderGetFilterFields.d.ts +1 -1
  741. package/utils/renderGetFilterFields.js.map +1 -1
  742. package/utils/renderInputFields.d.ts +1 -1
  743. package/utils/renderInputFields.js.map +1 -1
  744. package/utils/renderListFilterFields.d.ts +1 -1
  745. package/utils/renderListFilterFields.js.map +1 -1
  746. package/utils/renderSortEnum.d.ts +2 -2
  747. package/utils/renderSortEnum.js.map +1 -1
  748. package/utils/toSlug.js.map +1 -1
  749. package/validators/dateGte.d.ts +1 -1
  750. package/validators/dateGte.js.map +1 -1
  751. package/validators/dateLte.d.ts +1 -1
  752. package/validators/dateLte.js.map +1 -1
  753. package/validators/gte.d.ts +1 -1
  754. package/validators/gte.js.map +1 -1
  755. package/validators/in.d.ts +1 -1
  756. package/validators/in.js.map +1 -1
  757. package/validators/index.js.map +1 -1
  758. package/validators/lte.d.ts +1 -1
  759. package/validators/lte.js.map +1 -1
  760. package/validators/maxLength.d.ts +1 -1
  761. package/validators/maxLength.js.map +1 -1
  762. package/validators/minLength.d.ts +1 -1
  763. package/validators/minLength.js.map +1 -1
  764. package/validators/pattern.d.ts +1 -1
  765. package/validators/pattern.js.map +1 -1
  766. package/validators/patternPlugins/email.d.ts +1 -1
  767. package/validators/patternPlugins/email.js +1 -1
  768. package/validators/patternPlugins/email.js.map +1 -1
  769. package/validators/patternPlugins/index.d.ts +1 -1
  770. package/validators/patternPlugins/index.js.map +1 -1
  771. package/validators/patternPlugins/lowerCase.d.ts +1 -1
  772. package/validators/patternPlugins/lowerCase.js.map +1 -1
  773. package/validators/patternPlugins/lowerCaseSpace.d.ts +1 -1
  774. package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
  775. package/validators/patternPlugins/upperCase.d.ts +1 -1
  776. package/validators/patternPlugins/upperCase.js.map +1 -1
  777. package/validators/patternPlugins/upperCaseSpace.d.ts +1 -1
  778. package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
  779. package/validators/patternPlugins/url.d.ts +1 -1
  780. package/validators/patternPlugins/url.js.map +1 -1
  781. package/validators/required.d.ts +1 -1
  782. package/validators/required.js.map +1 -1
  783. package/validators/timeGte.d.ts +1 -1
  784. package/validators/timeGte.js.map +1 -1
  785. package/validators/timeLte.d.ts +1 -1
  786. package/validators/timeLte.js.map +1 -1
  787. package/validators/unique.d.ts +1 -1
  788. package/validators/unique.js.map +1 -1
  789. package/graphqlFields/dynamicZone/dynamicZoneStorage.d.ts +0 -3
  790. package/graphqlFields/dynamicZone/dynamicZoneStorage.js +0 -111
  791. package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +0 -1
  792. package/plugins/CmsGraphQLSchemaPlugin.d.ts +0 -5
  793. package/plugins/CmsGraphQLSchemaPlugin.js.map +0 -1
  794. package/types.js.map +0 -1
  795. package/utils/access.d.ts +0 -9
  796. package/utils/access.js +0 -26
  797. package/utils/access.js.map +0 -1
  798. package/utils/permissions/EntriesPermissions.d.ts +0 -4
  799. package/utils/permissions/EntriesPermissions.js +0 -11
  800. package/utils/permissions/EntriesPermissions.js.map +0 -1
  801. package/utils/permissions/ModelGroupsPermissions.d.ts +0 -9
  802. package/utils/permissions/ModelGroupsPermissions.js +0 -50
  803. package/utils/permissions/ModelGroupsPermissions.js.map +0 -1
  804. package/utils/permissions/ModelsPermissions.d.ts +0 -22
  805. package/utils/permissions/ModelsPermissions.js +0 -90
  806. package/utils/permissions/ModelsPermissions.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { CmsFieldTypePlugins, CmsModel, CmsModelField } from "../types";
2
- import { CmsGraphQLSchemaSorterPlugin } from "../plugins/CmsGraphQLSchemaSorterPlugin";
1
+ import type { CmsFieldTypePlugins, CmsModel, CmsModelField } from "../types";
2
+ import type { CmsGraphQLSchemaSorterPlugin } from "../plugins/CmsGraphQLSchemaSorterPlugin";
3
3
  interface RenderSortEnumParams {
4
4
  model: CmsModel;
5
5
  fields: CmsModelField[];
@@ -1 +1 @@
1
- {"version":3,"names":["_getBaseFieldType","require","_constants","renderSortEnum","model","fields","fieldTypePlugins","sorterPlugins","sorters","ENTRY_META_FIELDS","filter","isDateTimeEntryMetaField","map","field","flat","plugin","getBaseFieldType","createSorters","result","isSortable","push","fieldId","join","reduce","createSorter","exports"],"sources":["renderSortEnum.ts"],"sourcesContent":["import { CmsFieldTypePlugins, CmsModel, CmsModelField } from \"~/types\";\nimport { getBaseFieldType } from \"~/utils/getBaseFieldType\";\nimport { CmsGraphQLSchemaSorterPlugin } from \"~/plugins/CmsGraphQLSchemaSorterPlugin\";\nimport { ENTRY_META_FIELDS, isDateTimeEntryMetaField } from \"~/constants\";\n\ninterface RenderSortEnumParams {\n model: CmsModel;\n fields: CmsModelField[];\n fieldTypePlugins: CmsFieldTypePlugins;\n sorterPlugins?: CmsGraphQLSchemaSorterPlugin[];\n}\n\ninterface RenderSortEnum {\n (params: RenderSortEnumParams): string;\n}\n\nexport const renderSortEnum: RenderSortEnum = ({\n model,\n fields,\n fieldTypePlugins,\n sorterPlugins\n}): string => {\n let sorters: string[] = [\n `id_ASC`,\n `id_DESC`,\n\n ...ENTRY_META_FIELDS.filter(isDateTimeEntryMetaField)\n .map(field => [`${field}_ASC`, `${field}_DESC`])\n .flat()\n ];\n\n for (const field of fields) {\n const plugin = fieldTypePlugins[getBaseFieldType(field)];\n if (!plugin) {\n continue;\n } else if (plugin.createSorters) {\n const result = plugin.createSorters({\n model,\n field,\n sorters\n });\n if (result) {\n sorters = result;\n continue;\n }\n }\n if (!plugin.isSortable) {\n continue;\n }\n sorters.push(`${field.fieldId}_ASC`);\n sorters.push(`${field.fieldId}_DESC`);\n }\n if (!sorterPlugins) {\n return sorters.join(\"\\n\");\n }\n\n return sorterPlugins\n .reduce((result, plugin) => {\n return plugin.createSorter({\n model,\n sorters: result\n });\n }, sorters)\n .join(\"\\n\");\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAaO,MAAME,cAA8B,GAAGA,CAAC;EAC3CC,KAAK;EACLC,MAAM;EACNC,gBAAgB;EAChBC;AACJ,CAAC,KAAa;EACV,IAAIC,OAAiB,GAAG,CACnB,QAAO,EACP,SAAQ,EAET,GAAGC,4BAAiB,CAACC,MAAM,CAACC,mCAAwB,CAAC,CAChDC,GAAG,CAACC,KAAK,IAAI,CAAE,GAAEA,KAAM,MAAK,EAAG,GAAEA,KAAM,OAAM,CAAC,CAAC,CAC/CC,IAAI,CAAC,CAAC,CACd;EAED,KAAK,MAAMD,KAAK,IAAIR,MAAM,EAAE;IACxB,MAAMU,MAAM,GAAGT,gBAAgB,CAAC,IAAAU,kCAAgB,EAACH,KAAK,CAAC,CAAC;IACxD,IAAI,CAACE,MAAM,EAAE;MACT;IACJ,CAAC,MAAM,IAAIA,MAAM,CAACE,aAAa,EAAE;MAC7B,MAAMC,MAAM,GAAGH,MAAM,CAACE,aAAa,CAAC;QAChCb,KAAK;QACLS,KAAK;QACLL;MACJ,CAAC,CAAC;MACF,IAAIU,MAAM,EAAE;QACRV,OAAO,GAAGU,MAAM;QAChB;MACJ;IACJ;IACA,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;MACpB;IACJ;IACAX,OAAO,CAACY,IAAI,CAAE,GAAEP,KAAK,CAACQ,OAAQ,MAAK,CAAC;IACpCb,OAAO,CAACY,IAAI,CAAE,GAAEP,KAAK,CAACQ,OAAQ,OAAM,CAAC;EACzC;EACA,IAAI,CAACd,aAAa,EAAE;IAChB,OAAOC,OAAO,CAACc,IAAI,CAAC,IAAI,CAAC;EAC7B;EAEA,OAAOf,aAAa,CACfgB,MAAM,CAAC,CAACL,MAAM,EAAEH,MAAM,KAAK;IACxB,OAAOA,MAAM,CAACS,YAAY,CAAC;MACvBpB,KAAK;MACLI,OAAO,EAAEU;IACb,CAAC,CAAC;EACN,CAAC,EAAEV,OAAO,CAAC,CACVc,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAACG,OAAA,CAAAtB,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_getBaseFieldType","require","_constants","renderSortEnum","model","fields","fieldTypePlugins","sorterPlugins","sorters","ENTRY_META_FIELDS","filter","isDateTimeEntryMetaField","map","field","flat","plugin","getBaseFieldType","createSorters","result","isSortable","push","fieldId","join","reduce","createSorter","exports"],"sources":["renderSortEnum.ts"],"sourcesContent":["import type { CmsFieldTypePlugins, CmsModel, CmsModelField } from \"~/types\";\nimport { getBaseFieldType } from \"~/utils/getBaseFieldType\";\nimport type { CmsGraphQLSchemaSorterPlugin } from \"~/plugins/CmsGraphQLSchemaSorterPlugin\";\nimport { ENTRY_META_FIELDS, isDateTimeEntryMetaField } from \"~/constants\";\n\ninterface RenderSortEnumParams {\n model: CmsModel;\n fields: CmsModelField[];\n fieldTypePlugins: CmsFieldTypePlugins;\n sorterPlugins?: CmsGraphQLSchemaSorterPlugin[];\n}\n\ninterface RenderSortEnum {\n (params: RenderSortEnumParams): string;\n}\n\nexport const renderSortEnum: RenderSortEnum = ({\n model,\n fields,\n fieldTypePlugins,\n sorterPlugins\n}): string => {\n let sorters: string[] = [\n `id_ASC`,\n `id_DESC`,\n\n ...ENTRY_META_FIELDS.filter(isDateTimeEntryMetaField)\n .map(field => [`${field}_ASC`, `${field}_DESC`])\n .flat()\n ];\n\n for (const field of fields) {\n const plugin = fieldTypePlugins[getBaseFieldType(field)];\n if (!plugin) {\n continue;\n } else if (plugin.createSorters) {\n const result = plugin.createSorters({\n model,\n field,\n sorters\n });\n if (result) {\n sorters = result;\n continue;\n }\n }\n if (!plugin.isSortable) {\n continue;\n }\n sorters.push(`${field.fieldId}_ASC`);\n sorters.push(`${field.fieldId}_DESC`);\n }\n if (!sorterPlugins) {\n return sorters.join(\"\\n\");\n }\n\n return sorterPlugins\n .reduce((result, plugin) => {\n return plugin.createSorter({\n model,\n sorters: result\n });\n }, sorters)\n .join(\"\\n\");\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAaO,MAAME,cAA8B,GAAGA,CAAC;EAC3CC,KAAK;EACLC,MAAM;EACNC,gBAAgB;EAChBC;AACJ,CAAC,KAAa;EACV,IAAIC,OAAiB,GAAG,CACpB,QAAQ,EACR,SAAS,EAET,GAAGC,4BAAiB,CAACC,MAAM,CAACC,mCAAwB,CAAC,CAChDC,GAAG,CAACC,KAAK,IAAI,CAAC,GAAGA,KAAK,MAAM,EAAE,GAAGA,KAAK,OAAO,CAAC,CAAC,CAC/CC,IAAI,CAAC,CAAC,CACd;EAED,KAAK,MAAMD,KAAK,IAAIR,MAAM,EAAE;IACxB,MAAMU,MAAM,GAAGT,gBAAgB,CAAC,IAAAU,kCAAgB,EAACH,KAAK,CAAC,CAAC;IACxD,IAAI,CAACE,MAAM,EAAE;MACT;IACJ,CAAC,MAAM,IAAIA,MAAM,CAACE,aAAa,EAAE;MAC7B,MAAMC,MAAM,GAAGH,MAAM,CAACE,aAAa,CAAC;QAChCb,KAAK;QACLS,KAAK;QACLL;MACJ,CAAC,CAAC;MACF,IAAIU,MAAM,EAAE;QACRV,OAAO,GAAGU,MAAM;QAChB;MACJ;IACJ;IACA,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;MACpB;IACJ;IACAX,OAAO,CAACY,IAAI,CAAC,GAAGP,KAAK,CAACQ,OAAO,MAAM,CAAC;IACpCb,OAAO,CAACY,IAAI,CAAC,GAAGP,KAAK,CAACQ,OAAO,OAAO,CAAC;EACzC;EACA,IAAI,CAACd,aAAa,EAAE;IAChB,OAAOC,OAAO,CAACc,IAAI,CAAC,IAAI,CAAC;EAC7B;EAEA,OAAOf,aAAa,CACfgB,MAAM,CAAC,CAACL,MAAM,EAAEH,MAAM,KAAK;IACxB,OAAOA,MAAM,CAACS,YAAY,CAAC;MACvBpB,KAAK;MACLI,OAAO,EAAEU;IACb,CAAC,CAAC;EACN,CAAC,EAAEV,OAAO,CAAC,CACVc,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAACG,OAAA,CAAAtB,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_slugify","_interopRequireDefault","require","toSlug","text","slugify","replacement","lower","remove","exports"],"sources":["toSlug.ts"],"sourcesContent":["import slugify from \"slugify\";\n\nexport const toSlug = (text: string): string => {\n return slugify(text, {\n replacement: \"-\",\n lower: true,\n remove: /[*#\\?<>_\\{\\}\\[\\]+~.()'\"!:;@]/g\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,MAAM,GAAIC,IAAY,IAAa;EAC5C,OAAO,IAAAC,gBAAO,EAACD,IAAI,EAAE;IACjBE,WAAW,EAAE,GAAG;IAChBC,KAAK,EAAE,IAAI;IACXC,MAAM,EAAE;EACZ,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAN,MAAA,GAAAA,MAAA"}
1
+ {"version":3,"names":["_slugify","_interopRequireDefault","require","toSlug","text","slugify","replacement","lower","remove","exports"],"sources":["toSlug.ts"],"sourcesContent":["import slugify from \"slugify\";\n\nexport const toSlug = (text: string): string => {\n return slugify(text, {\n replacement: \"-\",\n lower: true,\n remove: /[*#\\?<>_\\{\\}\\[\\]+~.()'\"!:;@]/g\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,MAAM,GAAIC,IAAY,IAAa;EAC5C,OAAO,IAAAC,gBAAO,EAACD,IAAI,EAAE;IACjBE,WAAW,EAAE,GAAG;IAChBC,KAAK,EAAE,IAAI;IACXC,MAAM,EAAE;EACZ,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAN,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { CmsModelFieldValidatorPlugin } from "../types";
1
+ import type { CmsModelFieldValidatorPlugin } from "../types";
2
2
  export declare const createDateGteValidator: () => CmsModelFieldValidatorPlugin;
@@ -1 +1 @@
1
- {"version":3,"names":["_validation","require","createDateGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","exports"],"sources":["dateGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createDateGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-gte\",\n validator: {\n name: \"dateGte\",\n async validate({ value, validator }) {\n const { value: gteValue, type } = validator.settings || {};\n if (typeof gteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateGte:${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,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,EAAG,WAAUC,QAAS,EAAC,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOH,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAG,WAAUC,QAAS,EAAC,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"}
1
+ {"version":3,"names":["_validation","require","createDateGteValidator","type","name","validator","validate","value","gteValue","settings","validation","then","v","catch","exports"],"sources":["dateGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types\";\n\nexport const createDateGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-gte\",\n validator: {\n name: \"dateGte\",\n async validate({ value, validator }) {\n const { value: gteValue, type } = validator.settings || {};\n if (typeof gteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateGte:${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,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,2 +1,2 @@
1
- import { CmsModelFieldValidatorPlugin } from "../types";
1
+ import type { CmsModelFieldValidatorPlugin } from "../types";
2
2
  export declare const createDateLteValidator: () => CmsModelFieldValidatorPlugin;
@@ -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,EAAG,WAAUC,QAAS,EAAC,CAAC,CACtCG,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOH,sBAAU,CACZJ,QAAQ,CAACC,KAAK,EAAG,WAAUC,QAAS,EAAC,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"}
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":[]}
@@ -1,2 +1,2 @@
1
- import { CmsModelFieldValidatorPlugin } from "../types";
1
+ import type { CmsModelFieldValidatorPlugin } from "../types";
2
2
  export declare const createGteValidator: () => CmsModelFieldValidatorPlugin;
@@ -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,EAAG,OAAMC,QAAS,EAAC,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"}
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":[]}
@@ -1,2 +1,2 @@
1
- import { CmsModelFieldValidatorPlugin } from "../types";
1
+ import type { CmsModelFieldValidatorPlugin } from "../types";
2
2
  export declare const createInValidator: () => CmsModelFieldValidatorPlugin;
@@ -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,EAAG,MAAKC,MAAM,CAACK,IAAI,CAAC,GAAG,CAAE,EAAC,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"}
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":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_gte","require","_in","_lte","_maxLength","_minLength","_pattern","_required","_patternPlugins","_dateLte","_dateGte","_timeLte","_timeGte","_unique","createValidators","createGteValidator","createInValidator","createLteValidator","createMaxLengthValidator","createMinLengthValidator","createPatternValidator","createRequiredValidator","createPatternValidatorPlugins","createDateLteValidator","createDateGteValidator","createTimeLteValidator","createTimeGteValidator","createUniqueValidator","exports"],"sources":["index.ts"],"sourcesContent":["import { createGteValidator } from \"./gte\";\nimport { createInValidator } from \"./in\";\nimport { createLteValidator } from \"./lte\";\nimport { createMaxLengthValidator } from \"./maxLength\";\nimport { createMinLengthValidator } from \"./minLength\";\nimport { createPatternValidator } from \"./pattern\";\nimport { createRequiredValidator } from \"./required\";\nimport { createPatternValidatorPlugins } from \"./patternPlugins\";\nimport { createDateLteValidator } from \"./dateLte\";\nimport { createDateGteValidator } from \"./dateGte\";\nimport { createTimeLteValidator } from \"./timeLte\";\nimport { createTimeGteValidator } from \"./timeGte\";\nimport { createUniqueValidator } from \"./unique\";\n\nexport const createValidators = () => [\n createGteValidator(),\n createInValidator(),\n createLteValidator(),\n createMaxLengthValidator(),\n createMinLengthValidator(),\n createPatternValidator(),\n createRequiredValidator(),\n createPatternValidatorPlugins(),\n createDateLteValidator(),\n createDateGteValidator(),\n createTimeLteValidator(),\n createTimeGteValidator(),\n createUniqueValidator()\n];\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAEO,MAAMa,gBAAgB,GAAGA,CAAA,KAAM,CAClC,IAAAC,uBAAkB,EAAC,CAAC,EACpB,IAAAC,qBAAiB,EAAC,CAAC,EACnB,IAAAC,uBAAkB,EAAC,CAAC,EACpB,IAAAC,mCAAwB,EAAC,CAAC,EAC1B,IAAAC,mCAAwB,EAAC,CAAC,EAC1B,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,iCAAuB,EAAC,CAAC,EACzB,IAAAC,6CAA6B,EAAC,CAAC,EAC/B,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,6BAAqB,EAAC,CAAC,CAC1B;AAACC,OAAA,CAAAd,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"names":["_gte","require","_in","_lte","_maxLength","_minLength","_pattern","_required","_patternPlugins","_dateLte","_dateGte","_timeLte","_timeGte","_unique","createValidators","createGteValidator","createInValidator","createLteValidator","createMaxLengthValidator","createMinLengthValidator","createPatternValidator","createRequiredValidator","createPatternValidatorPlugins","createDateLteValidator","createDateGteValidator","createTimeLteValidator","createTimeGteValidator","createUniqueValidator","exports"],"sources":["index.ts"],"sourcesContent":["import { createGteValidator } from \"./gte\";\nimport { createInValidator } from \"./in\";\nimport { createLteValidator } from \"./lte\";\nimport { createMaxLengthValidator } from \"./maxLength\";\nimport { createMinLengthValidator } from \"./minLength\";\nimport { createPatternValidator } from \"./pattern\";\nimport { createRequiredValidator } from \"./required\";\nimport { createPatternValidatorPlugins } from \"./patternPlugins\";\nimport { createDateLteValidator } from \"./dateLte\";\nimport { createDateGteValidator } from \"./dateGte\";\nimport { createTimeLteValidator } from \"./timeLte\";\nimport { createTimeGteValidator } from \"./timeGte\";\nimport { createUniqueValidator } from \"./unique\";\n\nexport const createValidators = () => [\n createGteValidator(),\n createInValidator(),\n createLteValidator(),\n createMaxLengthValidator(),\n createMinLengthValidator(),\n createPatternValidator(),\n createRequiredValidator(),\n createPatternValidatorPlugins(),\n createDateLteValidator(),\n createDateGteValidator(),\n createTimeLteValidator(),\n createTimeGteValidator(),\n createUniqueValidator()\n];\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAEO,MAAMa,gBAAgB,GAAGA,CAAA,KAAM,CAClC,IAAAC,uBAAkB,EAAC,CAAC,EACpB,IAAAC,qBAAiB,EAAC,CAAC,EACnB,IAAAC,uBAAkB,EAAC,CAAC,EACpB,IAAAC,mCAAwB,EAAC,CAAC,EAC1B,IAAAC,mCAAwB,EAAC,CAAC,EAC1B,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,iCAAuB,EAAC,CAAC,EACzB,IAAAC,6CAA6B,EAAC,CAAC,EAC/B,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,+BAAsB,EAAC,CAAC,EACxB,IAAAC,6BAAqB,EAAC,CAAC,CAC1B;AAACC,OAAA,CAAAd,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { CmsModelFieldValidatorPlugin } from "../types";
1
+ import type { CmsModelFieldValidatorPlugin } from "../types";
2
2
  export declare const createLteValidator: () => CmsModelFieldValidatorPlugin;
@@ -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,EAAG,OAAMC,QAAS,EAAC,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"}
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,EAAG,aAAYC,cAAe,EAAC,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"}
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,EAAG,aAAYC,cAAe,EAAC,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"}
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":[]}
@@ -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"}
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;
@@ -10,7 +10,7 @@ const createEmailPatternValidator = () => {
10
10
  name: "cms-model-field-validator-pattern-email",
11
11
  pattern: {
12
12
  name: "email",
13
- regex: `^\\w[\\w.-]*@([\\w-]+\\.)+[\\w-]+$`,
13
+ regex: `^\\w[\\+\\w.-]*@([\\w-]+\\.)+[\\w-]+$`,
14
14
  flags: "i"
15
15
  }
16
16
  };
@@ -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,EAAG,oCAAmC;MAC3CC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,2BAAA,GAAAA,2BAAA"}
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"}
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,EAAG,YAAW;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA"}
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,EAAG,eAAc;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA"}
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,EAAG,YAAW;MACnBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,+BAAA,GAAAA,+BAAA"}
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,EAAG,eAAc;MACtBC,KAAK,EAAE;IACX;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAN,oCAAA,GAAAA,oCAAA"}
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"}
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":[]}
@@ -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"}
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":[]}
@@ -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,EAAG,WAAUC,QAAS,EAAC,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"}
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":[]}
@@ -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,EAAG,WAAUC,QAAS,EAAC,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"}
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":[]}
@@ -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.
@@ -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"}
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":[]}
@@ -1,3 +0,0 @@
1
- import { CmsModelDynamicZoneField } from "../../types";
2
- import { StorageTransformPlugin } from "../../plugins";
3
- export declare const createDynamicZoneStorageTransform: () => StorageTransformPlugin<any, any, CmsModelDynamicZoneField>;
@@ -1,111 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createDynamicZoneStorageTransform = void 0;
7
- var _plugins = require("../../plugins");
8
- function valueWithTemplateId(value, {
9
- id,
10
- gqlTypeName
11
- }) {
12
- return {
13
- [gqlTypeName]: {
14
- ...value[gqlTypeName],
15
- _templateId: id
16
- }
17
- };
18
- }
19
- const convertToStorage = (value, templates) => {
20
- // Only one key is allowed in the input object.
21
- const inputType = Object.keys(value)[0];
22
- const template = templates.find(tpl => tpl.gqlTypeName === inputType);
23
- if (template) {
24
- return {
25
- ...value[inputType],
26
- _templateId: template.id
27
- };
28
- }
29
- /**
30
- * There is a possibility that the value is already in the storage format, so there is no need to transform it again.
31
- * We are going to check:
32
- * 1. value is an object
33
- * 2. it contains a _templateId key
34
- * 3. the key is a valid template id - at this point we know it is already converted
35
- */
36
- if (!value || typeof value !== "object") {
37
- return undefined;
38
- } else if (!value._templateId) {
39
- return undefined;
40
- }
41
- const tpl = templates.find(tpl => tpl.id === value._templateId);
42
- return tpl ? value : undefined;
43
- };
44
- const convertFromStorage = (value, templates) => {
45
- const template = templates.find(tpl => value._templateId === tpl.id);
46
- if (template) {
47
- // We keep the `_templateId` property, to simplify further processing.
48
- return {
49
- [template.gqlTypeName]: value
50
- };
51
- }
52
-
53
- /**
54
- * When the `value` is in the original input format (during GraphQL mutations), `_templateId` will not be present
55
- * in the `value` object (because this internal property is added by `toStorage` storage transform method, and since
56
- * we simply return the input from the CRUD methods, this property will be missing).
57
- * For that reason, we need to run some extra logic, to acquire the `_templateId`.
58
- */
59
-
60
- if (!value || typeof value !== "object") {
61
- return undefined;
62
- }
63
-
64
- /**
65
- * `value` object must have exactly one none-empty key.
66
- */
67
- const keys = Object.keys(value);
68
- if (keys.length !== 1 || !keys[0]) {
69
- return undefined;
70
- }
71
-
72
- /**
73
- * Find a template that matches the first (and only) key of the `value` object by template's `gqlTypeName`.
74
- */
75
- const tpl = templates.find(tpl => tpl.gqlTypeName === keys[0]);
76
- return tpl ? valueWithTemplateId(value, tpl) : undefined;
77
- };
78
- const createDynamicZoneStorageTransform = () => {
79
- return new _plugins.StorageTransformPlugin({
80
- fieldType: "dynamicZone",
81
- fromStorage: async ({
82
- value,
83
- field
84
- }) => {
85
- if (!value) {
86
- return null;
87
- }
88
- const templates = field.settings.templates;
89
- if (Array.isArray(value) && field.multipleValues) {
90
- return value.map(value => convertFromStorage(value, templates)).filter(Boolean);
91
- }
92
- return convertFromStorage(value, templates);
93
- },
94
- toStorage: async ({
95
- value,
96
- field
97
- }) => {
98
- if (!value) {
99
- return value;
100
- }
101
- const templates = field.settings.templates;
102
- if (Array.isArray(value) && field.multipleValues) {
103
- return value.map(value => convertToStorage(value, templates)).filter(Boolean);
104
- }
105
- return convertToStorage(value, templates);
106
- }
107
- });
108
- };
109
- exports.createDynamicZoneStorageTransform = createDynamicZoneStorageTransform;
110
-
111
- //# sourceMappingURL=dynamicZoneStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_plugins","require","valueWithTemplateId","value","id","gqlTypeName","_templateId","convertToStorage","templates","inputType","Object","keys","template","find","tpl","undefined","convertFromStorage","length","createDynamicZoneStorageTransform","StorageTransformPlugin","fieldType","fromStorage","field","settings","Array","isArray","multipleValues","map","filter","Boolean","toStorage","exports"],"sources":["dynamicZoneStorage.ts"],"sourcesContent":["import { CmsDynamicZoneTemplate, CmsModelDynamicZoneField } from \"~/types\";\nimport { StorageTransformPlugin } from \"~/plugins\";\n\nfunction valueWithTemplateId(\n value: Record<string, any>,\n { id, gqlTypeName }: CmsDynamicZoneTemplate\n) {\n return { [gqlTypeName]: { ...value[gqlTypeName], _templateId: id } };\n}\n\nconst convertToStorage = (value: Record<string, any>, templates: CmsDynamicZoneTemplate[]) => {\n // Only one key is allowed in the input object.\n const inputType = Object.keys(value)[0];\n const template = templates.find(tpl => tpl.gqlTypeName === inputType);\n if (template) {\n return { ...value[inputType], _templateId: template.id };\n }\n /**\n * There is a possibility that the value is already in the storage format, so there is no need to transform it again.\n * We are going to check:\n * 1. value is an object\n * 2. it contains a _templateId key\n * 3. the key is a valid template id - at this point we know it is already converted\n */\n if (!value || typeof value !== \"object\") {\n return undefined;\n } else if (!value._templateId) {\n return undefined;\n }\n const tpl = templates.find(tpl => tpl.id === value._templateId);\n return tpl ? value : undefined;\n};\n\ninterface TemplateValueFromStorage {\n _templateId: string;\n [key: string]: any;\n}\n\nconst convertFromStorage = (\n value: TemplateValueFromStorage,\n templates: CmsDynamicZoneTemplate[]\n) => {\n const template = templates.find(tpl => value._templateId === tpl.id);\n\n if (template) {\n // We keep the `_templateId` property, to simplify further processing.\n return { [template.gqlTypeName]: value };\n }\n\n /**\n * When the `value` is in the original input format (during GraphQL mutations), `_templateId` will not be present\n * in the `value` object (because this internal property is added by `toStorage` storage transform method, and since\n * we simply return the input from the CRUD methods, this property will be missing).\n * For that reason, we need to run some extra logic, to acquire the `_templateId`.\n */\n\n if (!value || typeof value !== \"object\") {\n return undefined;\n }\n\n /**\n * `value` object must have exactly one none-empty key.\n */\n const keys = Object.keys(value);\n if (keys.length !== 1 || !keys[0]) {\n return undefined;\n }\n\n /**\n * Find a template that matches the first (and only) key of the `value` object by template's `gqlTypeName`.\n */\n const tpl = templates.find(tpl => tpl.gqlTypeName === keys[0]);\n return tpl ? valueWithTemplateId(value, tpl) : undefined;\n};\n\nexport const createDynamicZoneStorageTransform = () => {\n return new StorageTransformPlugin<any, any, CmsModelDynamicZoneField>({\n fieldType: \"dynamicZone\",\n fromStorage: async ({ value, field }) => {\n if (!value) {\n return null;\n }\n\n const templates = field.settings.templates;\n\n if (Array.isArray(value) && field.multipleValues) {\n return value.map(value => convertFromStorage(value, templates)).filter(Boolean);\n }\n\n return convertFromStorage(value, templates);\n },\n toStorage: async ({ value, field }) => {\n if (!value) {\n return value;\n }\n\n const templates = field.settings.templates;\n\n if (Array.isArray(value) && field.multipleValues) {\n return value.map(value => convertToStorage(value, templates)).filter(Boolean);\n }\n\n return convertToStorage(value, templates);\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,SAASC,mBAAmBA,CACxBC,KAA0B,EAC1B;EAAEC,EAAE;EAAEC;AAAoC,CAAC,EAC7C;EACE,OAAO;IAAE,CAACA,WAAW,GAAG;MAAE,GAAGF,KAAK,CAACE,WAAW,CAAC;MAAEC,WAAW,EAAEF;IAAG;EAAE,CAAC;AACxE;AAEA,MAAMG,gBAAgB,GAAGA,CAACJ,KAA0B,EAAEK,SAAmC,KAAK;EAC1F;EACA,MAAMC,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACR,KAAK,CAAC,CAAC,CAAC,CAAC;EACvC,MAAMS,QAAQ,GAAGJ,SAAS,CAACK,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACT,WAAW,KAAKI,SAAS,CAAC;EACrE,IAAIG,QAAQ,EAAE;IACV,OAAO;MAAE,GAAGT,KAAK,CAACM,SAAS,CAAC;MAAEH,WAAW,EAAEM,QAAQ,CAACR;IAAG,CAAC;EAC5D;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,IAAI,CAACD,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACrC,OAAOY,SAAS;EACpB,CAAC,MAAM,IAAI,CAACZ,KAAK,CAACG,WAAW,EAAE;IAC3B,OAAOS,SAAS;EACpB;EACA,MAAMD,GAAG,GAAGN,SAAS,CAACK,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACV,EAAE,KAAKD,KAAK,CAACG,WAAW,CAAC;EAC/D,OAAOQ,GAAG,GAAGX,KAAK,GAAGY,SAAS;AAClC,CAAC;AAOD,MAAMC,kBAAkB,GAAGA,CACvBb,KAA+B,EAC/BK,SAAmC,KAClC;EACD,MAAMI,QAAQ,GAAGJ,SAAS,CAACK,IAAI,CAACC,GAAG,IAAIX,KAAK,CAACG,WAAW,KAAKQ,GAAG,CAACV,EAAE,CAAC;EAEpE,IAAIQ,QAAQ,EAAE;IACV;IACA,OAAO;MAAE,CAACA,QAAQ,CAACP,WAAW,GAAGF;IAAM,CAAC;EAC5C;;EAEA;AACJ;AACA;AACA;AACA;AACA;;EAEI,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACrC,OAAOY,SAAS;EACpB;;EAEA;AACJ;AACA;EACI,MAAMJ,IAAI,GAAGD,MAAM,CAACC,IAAI,CAACR,KAAK,CAAC;EAC/B,IAAIQ,IAAI,CAACM,MAAM,KAAK,CAAC,IAAI,CAACN,IAAI,CAAC,CAAC,CAAC,EAAE;IAC/B,OAAOI,SAAS;EACpB;;EAEA;AACJ;AACA;EACI,MAAMD,GAAG,GAAGN,SAAS,CAACK,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACT,WAAW,KAAKM,IAAI,CAAC,CAAC,CAAC,CAAC;EAC9D,OAAOG,GAAG,GAAGZ,mBAAmB,CAACC,KAAK,EAAEW,GAAG,CAAC,GAAGC,SAAS;AAC5D,CAAC;AAEM,MAAMG,iCAAiC,GAAGA,CAAA,KAAM;EACnD,OAAO,IAAIC,+BAAsB,CAAqC;IAClEC,SAAS,EAAE,aAAa;IACxBC,WAAW,EAAE,MAAAA,CAAO;MAAElB,KAAK;MAAEmB;IAAM,CAAC,KAAK;MACrC,IAAI,CAACnB,KAAK,EAAE;QACR,OAAO,IAAI;MACf;MAEA,MAAMK,SAAS,GAAGc,KAAK,CAACC,QAAQ,CAACf,SAAS;MAE1C,IAAIgB,KAAK,CAACC,OAAO,CAACtB,KAAK,CAAC,IAAImB,KAAK,CAACI,cAAc,EAAE;QAC9C,OAAOvB,KAAK,CAACwB,GAAG,CAACxB,KAAK,IAAIa,kBAAkB,CAACb,KAAK,EAAEK,SAAS,CAAC,CAAC,CAACoB,MAAM,CAACC,OAAO,CAAC;MACnF;MAEA,OAAOb,kBAAkB,CAACb,KAAK,EAAEK,SAAS,CAAC;IAC/C,CAAC;IACDsB,SAAS,EAAE,MAAAA,CAAO;MAAE3B,KAAK;MAAEmB;IAAM,CAAC,KAAK;MACnC,IAAI,CAACnB,KAAK,EAAE;QACR,OAAOA,KAAK;MAChB;MAEA,MAAMK,SAAS,GAAGc,KAAK,CAACC,QAAQ,CAACf,SAAS;MAE1C,IAAIgB,KAAK,CAACC,OAAO,CAACtB,KAAK,CAAC,IAAImB,KAAK,CAACI,cAAc,EAAE;QAC9C,OAAOvB,KAAK,CAACwB,GAAG,CAACxB,KAAK,IAAII,gBAAgB,CAACJ,KAAK,EAAEK,SAAS,CAAC,CAAC,CAACoB,MAAM,CAACC,OAAO,CAAC;MACjF;MAEA,OAAOtB,gBAAgB,CAACJ,KAAK,EAAEK,SAAS,CAAC;IAC7C;EACJ,CAAC,CAAC;AACN,CAAC;AAACuB,OAAA,CAAAb,iCAAA,GAAAA,iCAAA"}
@@ -1,5 +0,0 @@
1
- import { GraphQLSchemaPlugin } from "@webiny/handler-graphql";
2
- import { CmsContext } from "../types";
3
- export declare class CmsGraphQLSchemaPlugin<T = CmsContext> extends GraphQLSchemaPlugin<T> {
4
- static type: string;
5
- }
@@ -1 +0,0 @@
1
- {"version":3,"names":["_handlerGraphql","require","CmsGraphQLSchemaPlugin","GraphQLSchemaPlugin","type","exports"],"sources":["CmsGraphQLSchemaPlugin.ts"],"sourcesContent":["import { GraphQLSchemaPlugin } from \"@webiny/handler-graphql\";\nimport { CmsContext } from \"~/types\";\n\nexport class CmsGraphQLSchemaPlugin<T = CmsContext> extends GraphQLSchemaPlugin<T> {\n public static override type = \"cms.graphql.schema\";\n}\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,SAAyBC,mCAAmB,CAAI;EAC/E,OAAuBC,IAAI,GAAG,oBAAoB;AACtD;AAACC,OAAA,CAAAH,sBAAA,GAAAA,sBAAA"}