@webiny/app-record-locking 6.4.12-beta.4 → 6.5.0-beta.0

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 (251) hide show
  1. package/RecordLockingModule.d.ts +2 -0
  2. package/RecordLockingModule.js +74 -0
  3. package/RecordLockingModule.js.map +1 -0
  4. package/{components/SecurityPermissions.js → SecurityPermissions.js} +1 -1
  5. package/SecurityPermissions.js.map +1 -0
  6. package/features/acquireLock/AcquireLockGateway.d.ts +12 -0
  7. package/features/acquireLock/AcquireLockGateway.js +43 -0
  8. package/features/acquireLock/AcquireLockGateway.js.map +1 -0
  9. package/features/acquireLock/AcquireLockUseCase.d.ts +10 -0
  10. package/features/acquireLock/AcquireLockUseCase.js +18 -0
  11. package/features/acquireLock/AcquireLockUseCase.js.map +1 -0
  12. package/features/acquireLock/abstractions.d.ts +19 -0
  13. package/features/acquireLock/abstractions.js +6 -0
  14. package/features/acquireLock/abstractions.js.map +1 -0
  15. package/features/acquireLock/feature.d.ts +3 -0
  16. package/features/acquireLock/feature.js +19 -0
  17. package/features/acquireLock/feature.js.map +1 -0
  18. package/features/checkLockStatus/CheckLockStatusGateway.d.ts +12 -0
  19. package/features/checkLockStatus/CheckLockStatusGateway.js +43 -0
  20. package/features/checkLockStatus/CheckLockStatusGateway.js.map +1 -0
  21. package/features/checkLockStatus/CheckLockStatusUseCase.d.ts +10 -0
  22. package/features/checkLockStatus/CheckLockStatusUseCase.js +18 -0
  23. package/features/checkLockStatus/CheckLockStatusUseCase.js.map +1 -0
  24. package/features/checkLockStatus/abstractions.d.ts +19 -0
  25. package/features/checkLockStatus/abstractions.js +6 -0
  26. package/features/checkLockStatus/abstractions.js.map +1 -0
  27. package/features/checkLockStatus/feature.d.ts +3 -0
  28. package/features/checkLockStatus/feature.js +19 -0
  29. package/features/checkLockStatus/feature.js.map +1 -0
  30. package/features/feature.d.ts +1 -0
  31. package/features/feature.js +19 -0
  32. package/features/feature.js.map +1 -0
  33. package/features/forceUnlock/ForceUnlockGateway.d.ts +12 -0
  34. package/features/forceUnlock/ForceUnlockGateway.js +44 -0
  35. package/features/forceUnlock/ForceUnlockGateway.js.map +1 -0
  36. package/features/forceUnlock/ForceUnlockUseCase.d.ts +10 -0
  37. package/features/forceUnlock/ForceUnlockUseCase.js +18 -0
  38. package/features/forceUnlock/ForceUnlockUseCase.js.map +1 -0
  39. package/features/forceUnlock/abstractions.d.ts +19 -0
  40. package/features/forceUnlock/abstractions.js +6 -0
  41. package/features/forceUnlock/abstractions.js.map +1 -0
  42. package/features/forceUnlock/feature.d.ts +3 -0
  43. package/features/forceUnlock/feature.js +19 -0
  44. package/features/forceUnlock/feature.js.map +1 -0
  45. package/{domain/graphql/fields.js → features/graphqlFields.js} +1 -1
  46. package/features/graphqlFields.js.map +1 -0
  47. package/features/listLockRecords/ListLockRecordsGateway.d.ts +12 -0
  48. package/features/listLockRecords/ListLockRecordsGateway.js +48 -0
  49. package/features/listLockRecords/ListLockRecordsGateway.js.map +1 -0
  50. package/features/listLockRecords/ListLockRecordsUseCase.d.ts +10 -0
  51. package/features/listLockRecords/ListLockRecordsUseCase.js +18 -0
  52. package/features/listLockRecords/ListLockRecordsUseCase.js.map +1 -0
  53. package/features/listLockRecords/abstractions.d.ts +22 -0
  54. package/features/listLockRecords/abstractions.js +6 -0
  55. package/features/listLockRecords/abstractions.js.map +1 -0
  56. package/features/listLockRecords/feature.d.ts +3 -0
  57. package/features/listLockRecords/feature.js +19 -0
  58. package/features/listLockRecords/feature.js.map +1 -0
  59. package/features/permissions/abstractions.d.ts +1 -1
  60. package/features/permissions/abstractions.js +1 -1
  61. package/features/permissions/abstractions.js.map +1 -1
  62. package/features/permissions/feature.d.ts +1 -1
  63. package/features/permissions/feature.js +1 -1
  64. package/features/permissions/feature.js.map +1 -1
  65. package/features/releaseLock/ReleaseLockGateway.d.ts +12 -0
  66. package/features/releaseLock/ReleaseLockGateway.js +44 -0
  67. package/features/releaseLock/ReleaseLockGateway.js.map +1 -0
  68. package/features/releaseLock/ReleaseLockUseCase.d.ts +10 -0
  69. package/features/releaseLock/ReleaseLockUseCase.js +18 -0
  70. package/features/releaseLock/ReleaseLockUseCase.js.map +1 -0
  71. package/features/releaseLock/abstractions.d.ts +19 -0
  72. package/features/releaseLock/abstractions.js +6 -0
  73. package/features/releaseLock/abstractions.js.map +1 -0
  74. package/features/releaseLock/feature.d.ts +3 -0
  75. package/features/releaseLock/feature.js +19 -0
  76. package/features/releaseLock/feature.js.map +1 -0
  77. package/index.d.ts +0 -5
  78. package/index.js +12 -13
  79. package/index.js.map +1 -1
  80. package/package.json +13 -17
  81. package/permissions/permissionsSchema.js.map +1 -0
  82. package/presentation/entryLocking/ContentEntryFormPresenterDecorator.d.ts +23 -0
  83. package/presentation/entryLocking/ContentEntryFormPresenterDecorator.js +64 -0
  84. package/presentation/entryLocking/ContentEntryFormPresenterDecorator.js.map +1 -0
  85. package/presentation/entryLocking/RecordLockingPresenter.d.ts +32 -0
  86. package/presentation/entryLocking/RecordLockingPresenter.js +164 -0
  87. package/presentation/entryLocking/RecordLockingPresenter.js.map +1 -0
  88. package/presentation/entryLocking/SingleEntryContentDecorator.d.ts +2 -0
  89. package/presentation/entryLocking/SingleEntryContentDecorator.js +72 -0
  90. package/presentation/entryLocking/SingleEntryContentDecorator.js.map +1 -0
  91. package/presentation/entryLocking/SingleEntryPresenterDecorator.d.ts +15 -0
  92. package/presentation/entryLocking/SingleEntryPresenterDecorator.js +40 -0
  93. package/presentation/entryLocking/SingleEntryPresenterDecorator.js.map +1 -0
  94. package/presentation/entryLocking/abstractions.d.ts +26 -0
  95. package/presentation/entryLocking/abstractions.js +5 -0
  96. package/presentation/entryLocking/abstractions.js.map +1 -0
  97. package/presentation/entryLocking/components/ForceUnlockButton.d.ts +11 -0
  98. package/presentation/entryLocking/components/ForceUnlockButton.js +37 -0
  99. package/presentation/entryLocking/components/ForceUnlockButton.js.map +1 -0
  100. package/presentation/entryLocking/components/LockedEntryOverlay.d.ts +10 -0
  101. package/presentation/entryLocking/components/LockedEntryOverlay.js +52 -0
  102. package/presentation/entryLocking/components/LockedEntryOverlay.js.map +1 -0
  103. package/presentation/entryLocking/components/RecordLockingGuard.d.ts +12 -0
  104. package/presentation/entryLocking/components/RecordLockingGuard.js +74 -0
  105. package/presentation/entryLocking/components/RecordLockingGuard.js.map +1 -0
  106. package/presentation/entryLocking/feature.d.ts +3 -0
  107. package/presentation/entryLocking/feature.js +21 -0
  108. package/presentation/entryLocking/feature.js.map +1 -0
  109. package/presentation/listLocking/ContentEntriesPresenterDecorator.d.ts +24 -0
  110. package/presentation/listLocking/ContentEntriesPresenterDecorator.js +67 -0
  111. package/presentation/listLocking/ContentEntriesPresenterDecorator.js.map +1 -0
  112. package/presentation/listLocking/ListLockRecordsPresenter.d.ts +17 -0
  113. package/presentation/listLocking/ListLockRecordsPresenter.js +52 -0
  114. package/presentation/listLocking/ListLockRecordsPresenter.js.map +1 -0
  115. package/presentation/listLocking/abstractions.d.ts +16 -0
  116. package/presentation/listLocking/abstractions.js +5 -0
  117. package/presentation/listLocking/abstractions.js.map +1 -0
  118. package/presentation/listLocking/components/ListLockRecordsSync.d.ts +3 -0
  119. package/presentation/listLocking/components/ListLockRecordsSync.js +26 -0
  120. package/presentation/listLocking/components/ListLockRecordsSync.js.map +1 -0
  121. package/presentation/listLocking/components/LockIndicatorCell.d.ts +2 -0
  122. package/presentation/listLocking/components/LockIndicatorCell.js +39 -0
  123. package/presentation/listLocking/components/LockIndicatorCell.js.map +1 -0
  124. package/presentation/listLocking/feature.d.ts +3 -0
  125. package/presentation/listLocking/feature.js +19 -0
  126. package/presentation/listLocking/feature.js.map +1 -0
  127. package/types.d.ts +1 -62
  128. package/components/HeadlessCmsActionsAcoCell.d.ts +0 -2
  129. package/components/HeadlessCmsActionsAcoCell.js +0 -38
  130. package/components/HeadlessCmsActionsAcoCell.js.map +0 -1
  131. package/components/HeadlessCmsContentEntry/ContentEntryGuard.d.ts +0 -9
  132. package/components/HeadlessCmsContentEntry/ContentEntryGuard.js +0 -34
  133. package/components/HeadlessCmsContentEntry/ContentEntryGuard.js.map +0 -1
  134. package/components/HeadlessCmsContentEntry/ContentEntryLocker.d.ts +0 -18
  135. package/components/HeadlessCmsContentEntry/ContentEntryLocker.js +0 -80
  136. package/components/HeadlessCmsContentEntry/ContentEntryLocker.js.map +0 -1
  137. package/components/HeadlessCmsContentEntry/HeadlessCmsContentEntry.d.ts +0 -2
  138. package/components/HeadlessCmsContentEntry/HeadlessCmsContentEntry.js +0 -44
  139. package/components/HeadlessCmsContentEntry/HeadlessCmsContentEntry.js.map +0 -1
  140. package/components/HeadlessCmsContentEntry/index.d.ts +0 -1
  141. package/components/HeadlessCmsContentEntry/index.js +0 -1
  142. package/components/LockedRecord/LockedRecord.d.ts +0 -6
  143. package/components/LockedRecord/LockedRecord.js +0 -54
  144. package/components/LockedRecord/LockedRecord.js.map +0 -1
  145. package/components/LockedRecord/LockedRecordForceUnlock.d.ts +0 -9
  146. package/components/LockedRecord/LockedRecordForceUnlock.js +0 -57
  147. package/components/LockedRecord/LockedRecordForceUnlock.js.map +0 -1
  148. package/components/LockedRecord/index.d.ts +0 -1
  149. package/components/LockedRecord/index.js +0 -1
  150. package/components/RecordLockingProvider.d.ts +0 -7
  151. package/components/RecordLockingProvider.js +0 -111
  152. package/components/RecordLockingProvider.js.map +0 -1
  153. package/components/SecurityPermissions.js.map +0 -1
  154. package/components/decorators/UseContentEntriesListHookDecorator.d.ts +0 -1
  155. package/components/decorators/UseContentEntriesListHookDecorator.js +0 -23
  156. package/components/decorators/UseContentEntriesListHookDecorator.js.map +0 -1
  157. package/components/decorators/UseRecordsDecorator.d.ts +0 -8
  158. package/components/decorators/UseRecordsDecorator.js +0 -16
  159. package/components/decorators/UseRecordsDecorator.js.map +0 -1
  160. package/components/decorators/UseSaveEntryDecorator.d.ts +0 -1
  161. package/components/decorators/UseSaveEntryDecorator.js +0 -41
  162. package/components/decorators/UseSaveEntryDecorator.js.map +0 -1
  163. package/domain/RecordLocking.d.ts +0 -28
  164. package/domain/RecordLocking.js +0 -259
  165. package/domain/RecordLocking.js.map +0 -1
  166. package/domain/RecordLockingClient.d.ts +0 -12
  167. package/domain/RecordLockingClient.js +0 -20
  168. package/domain/RecordLockingClient.js.map +0 -1
  169. package/domain/RecordLockingGetLockRecord.d.ts +0 -11
  170. package/domain/RecordLockingGetLockRecord.js +0 -19
  171. package/domain/RecordLockingGetLockRecord.js.map +0 -1
  172. package/domain/RecordLockingGetLockedEntryLockRecord.d.ts +0 -11
  173. package/domain/RecordLockingGetLockedEntryLockRecord.js +0 -18
  174. package/domain/RecordLockingGetLockedEntryLockRecord.js.map +0 -1
  175. package/domain/RecordLockingIsEntryLocked.d.ts +0 -11
  176. package/domain/RecordLockingIsEntryLocked.js +0 -20
  177. package/domain/RecordLockingIsEntryLocked.js.map +0 -1
  178. package/domain/RecordLockingListLockRecords.d.ts +0 -12
  179. package/domain/RecordLockingListLockRecords.js +0 -25
  180. package/domain/RecordLockingListLockRecords.js.map +0 -1
  181. package/domain/RecordLockingLockEntry.d.ts +0 -11
  182. package/domain/RecordLockingLockEntry.js +0 -12
  183. package/domain/RecordLockingLockEntry.js.map +0 -1
  184. package/domain/RecordLockingUnlockEntry.d.ts +0 -11
  185. package/domain/RecordLockingUnlockEntry.js +0 -18
  186. package/domain/RecordLockingUnlockEntry.js.map +0 -1
  187. package/domain/RecordLockingUpdateEntryLock.d.ts +0 -11
  188. package/domain/RecordLockingUpdateEntryLock.js +0 -18
  189. package/domain/RecordLockingUpdateEntryLock.js.map +0 -1
  190. package/domain/abstractions/IRecordLocking.d.ts +0 -25
  191. package/domain/abstractions/IRecordLocking.js +0 -0
  192. package/domain/abstractions/IRecordLockingClient.d.ts +0 -6
  193. package/domain/abstractions/IRecordLockingClient.js +0 -0
  194. package/domain/abstractions/IRecordLockingGetLockRecord.d.ts +0 -12
  195. package/domain/abstractions/IRecordLockingGetLockRecord.js +0 -0
  196. package/domain/abstractions/IRecordLockingGetLockedEntryLockRecord.d.ts +0 -12
  197. package/domain/abstractions/IRecordLockingGetLockedEntryLockRecord.js +0 -0
  198. package/domain/abstractions/IRecordLockingIsEntryLocked.d.ts +0 -8
  199. package/domain/abstractions/IRecordLockingIsEntryLocked.js +0 -0
  200. package/domain/abstractions/IRecordLockingListLockRecords.d.ts +0 -19
  201. package/domain/abstractions/IRecordLockingListLockRecords.js +0 -0
  202. package/domain/abstractions/IRecordLockingLockEntry.d.ts +0 -12
  203. package/domain/abstractions/IRecordLockingLockEntry.js +0 -0
  204. package/domain/abstractions/IRecordLockingUnlockEntry.d.ts +0 -13
  205. package/domain/abstractions/IRecordLockingUnlockEntry.js +0 -0
  206. package/domain/abstractions/IRecordLockingUpdateEntryLock.d.ts +0 -12
  207. package/domain/abstractions/IRecordLockingUpdateEntryLock.js +0 -0
  208. package/domain/graphql/fields.js.map +0 -1
  209. package/domain/graphql/getLockRecord.d.ts +0 -12
  210. package/domain/graphql/getLockRecord.js +0 -19
  211. package/domain/graphql/getLockRecord.js.map +0 -1
  212. package/domain/graphql/getLockedEntryLockRecord.d.ts +0 -12
  213. package/domain/graphql/getLockedEntryLockRecord.js +0 -19
  214. package/domain/graphql/getLockedEntryLockRecord.js.map +0 -1
  215. package/domain/graphql/isEntryLocked.d.ts +0 -12
  216. package/domain/graphql/isEntryLocked.js +0 -17
  217. package/domain/graphql/isEntryLocked.js.map +0 -1
  218. package/domain/graphql/listLockRecords.d.ts +0 -17
  219. package/domain/graphql/listLockRecords.js +0 -25
  220. package/domain/graphql/listLockRecords.js.map +0 -1
  221. package/domain/graphql/lockEntry.d.ts +0 -12
  222. package/domain/graphql/lockEntry.js +0 -19
  223. package/domain/graphql/lockEntry.js.map +0 -1
  224. package/domain/graphql/unlockEntry.d.ts +0 -12
  225. package/domain/graphql/unlockEntry.js +0 -19
  226. package/domain/graphql/unlockEntry.js.map +0 -1
  227. package/domain/graphql/updateEntryLock.d.ts +0 -12
  228. package/domain/graphql/updateEntryLock.js +0 -19
  229. package/domain/graphql/updateEntryLock.js.map +0 -1
  230. package/domain/permissionsSchema.js.map +0 -1
  231. package/domain/utils/createRecordLockingClient.d.ts +0 -3
  232. package/domain/utils/createRecordLockingClient.js +0 -11
  233. package/domain/utils/createRecordLockingClient.js.map +0 -1
  234. package/domain/utils/createRecordLockingError.d.ts +0 -6
  235. package/domain/utils/createRecordLockingError.js +0 -15
  236. package/domain/utils/createRecordLockingError.js.map +0 -1
  237. package/hooks/index.d.ts +0 -2
  238. package/hooks/index.js +0 -2
  239. package/hooks/usePermission.d.ts +0 -3
  240. package/hooks/usePermission.js +0 -19
  241. package/hooks/usePermission.js.map +0 -1
  242. package/hooks/useRecordLocking.d.ts +0 -2
  243. package/hooks/useRecordLocking.js +0 -11
  244. package/hooks/useRecordLocking.js.map +0 -1
  245. package/utils/createCacheKey.d.ts +0 -3
  246. package/utils/createCacheKey.js +0 -14
  247. package/utils/createCacheKey.js.map +0 -1
  248. /package/{components/SecurityPermissions.d.ts → SecurityPermissions.d.ts} +0 -0
  249. /package/{domain/graphql/fields.d.ts → features/graphqlFields.d.ts} +0 -0
  250. /package/{domain → permissions}/permissionsSchema.d.ts +0 -0
  251. /package/{domain → permissions}/permissionsSchema.js +0 -0
@@ -1,11 +0,0 @@
1
- import { WebinyError } from "@webiny/error";
2
- import { useContext } from "react";
3
- import { RecordLockingContext } from "../components/RecordLockingProvider.js";
4
- const useRecordLocking = ()=>{
5
- const context = useContext(RecordLockingContext);
6
- if (!context) throw new WebinyError("useRecordLocking must be used within a RecordLockingProvider.");
7
- return context;
8
- };
9
- export { useRecordLocking };
10
-
11
- //# sourceMappingURL=useRecordLocking.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks/useRecordLocking.js","sources":["../../src/hooks/useRecordLocking.ts"],"sourcesContent":["import { WebinyError } from \"@webiny/error\";\nimport { useContext } from \"react\";\nimport { RecordLockingContext } from \"~/components/RecordLockingProvider.js\";\nimport type { IRecordLockingContext, IPossiblyRecordLockingRecord } from \"~/types.js\";\n\nexport const useRecordLocking = <\n T extends IPossiblyRecordLockingRecord = IPossiblyRecordLockingRecord\n>() => {\n const context = useContext(RecordLockingContext);\n if (!context) {\n throw new WebinyError(\"useRecordLocking must be used within a RecordLockingProvider.\");\n }\n return context as IRecordLockingContext<T>;\n};\n"],"names":["useRecordLocking","context","useContext","RecordLockingContext","WebinyError"],"mappings":";;;AAKO,MAAMA,mBAAmB;IAG5B,MAAMC,UAAUC,WAAWC;IAC3B,IAAI,CAACF,SACD,MAAM,IAAIG,YAAY;IAE1B,OAAOH;AACX"}
@@ -1,3 +0,0 @@
1
- import type { GenericRecord } from "@webiny/app/types.js";
2
- export type ICreateCacheKeyInput = string | GenericRecord | ICreateCacheKeyInput[];
3
- export declare const createCacheKey: (input: ICreateCacheKeyInput) => Promise<string>;
@@ -1,14 +0,0 @@
1
- import { sha1 } from "crypto-hash";
2
- const createKey = (input)=>{
3
- if ("string" == typeof input) return input;
4
- return JSON.stringify(input);
5
- };
6
- const createCacheKey = (input)=>{
7
- const key = createKey(input);
8
- return sha1(key, {
9
- outputFormat: "hex"
10
- });
11
- };
12
- export { createCacheKey };
13
-
14
- //# sourceMappingURL=createCacheKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils/createCacheKey.js","sources":["../../src/utils/createCacheKey.ts"],"sourcesContent":["import type { GenericRecord } from \"@webiny/app/types.js\";\nimport { sha1 } from \"crypto-hash\";\n\nexport type ICreateCacheKeyInput = string | GenericRecord | ICreateCacheKeyInput[];\n\nconst createKey = (input: ICreateCacheKeyInput): string => {\n if (typeof input === \"string\") {\n return input;\n }\n return JSON.stringify(input);\n};\n\nexport const createCacheKey = (input: ICreateCacheKeyInput): Promise<string> => {\n const key = createKey(input);\n\n return sha1(key, {\n outputFormat: \"hex\"\n });\n};\n"],"names":["createKey","input","JSON","createCacheKey","key","sha1"],"mappings":";AAKA,MAAMA,YAAY,CAACC;IACf,IAAI,AAAiB,YAAjB,OAAOA,OACP,OAAOA;IAEX,OAAOC,KAAK,SAAS,CAACD;AAC1B;AAEO,MAAME,iBAAiB,CAACF;IAC3B,MAAMG,MAAMJ,UAAUC;IAEtB,OAAOI,KAAKD,KAAK;QACb,cAAc;IAClB;AACJ"}
File without changes
File without changes