@cratis/showrunner.notes 0.0.0-stage → 1.15.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 (250) hide show
  1. package/Availability/NotesAvailability.ts +59 -0
  2. package/Availability/index.ts +4 -0
  3. package/Contracts/Components/PickedComponent.ts +43 -0
  4. package/Contracts/Components/index.ts +4 -0
  5. package/Contracts/Context/NoteContext.ts +58 -0
  6. package/Contracts/Context/NoteDialog.ts +25 -0
  7. package/Contracts/Context/NoteScreen.ts +30 -0
  8. package/Contracts/Context/index.ts +6 -0
  9. package/Contracts/Giving/NoteKind.ts +14 -0
  10. package/Contracts/Giving/index.ts +4 -0
  11. package/Contracts/Reporting/SliceLocation.ts +30 -0
  12. package/Contracts/Reporting/index.ts +4 -0
  13. package/Giving/GiveNoteOnComponent/GiveNoteOnComponent.ts +146 -0
  14. package/Giving/GiveNoteOnComponent/index.ts +4 -0
  15. package/Giving/GiveNoteOnContext/GiveNoteOnContext.ts +126 -0
  16. package/Giving/GiveNoteOnContext/index.ts +4 -0
  17. package/Giving/GiveNoteOnScreen/GiveNoteOnScreen.ts +126 -0
  18. package/Giving/GiveNoteOnScreen/index.ts +4 -0
  19. package/Giving/GiveNoteOnSlices/GiveNoteOnSlices.ts +145 -0
  20. package/Giving/GiveNoteOnSlices/index.ts +4 -0
  21. package/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.ts +164 -0
  22. package/Giving/SuggestComponentPropertyChange/index.ts +4 -0
  23. package/Listing/MyNote.ts +303 -0
  24. package/Listing/NoteStatus.ts +15 -0
  25. package/Listing/NoteTarget.ts +14 -0
  26. package/Listing/SuggestedPropertyChange.ts +30 -0
  27. package/Listing/index.ts +7 -0
  28. package/README.md +86 -2
  29. package/Withdrawing/WithdrawNote/WithdrawNote.ts +61 -0
  30. package/Withdrawing/WithdrawNote/index.ts +4 -0
  31. package/dist/cjs/Availability/NotesAvailability.d.ts +21 -0
  32. package/dist/cjs/Availability/NotesAvailability.d.ts.map +1 -0
  33. package/dist/cjs/Availability/NotesAvailability.js +66 -0
  34. package/dist/cjs/Availability/NotesAvailability.js.map +1 -0
  35. package/dist/cjs/Availability/index.d.ts +2 -0
  36. package/dist/cjs/Availability/index.d.ts.map +1 -0
  37. package/dist/cjs/Contracts/Components/PickedComponent.d.ts +9 -0
  38. package/dist/cjs/Contracts/Components/PickedComponent.d.ts.map +1 -0
  39. package/dist/cjs/Contracts/Components/PickedComponent.js +65 -0
  40. package/dist/cjs/Contracts/Components/PickedComponent.js.map +1 -0
  41. package/dist/cjs/Contracts/Components/index.d.ts +2 -0
  42. package/dist/cjs/Contracts/Components/index.d.ts.map +1 -0
  43. package/dist/cjs/Contracts/Context/NoteContext.d.ts +14 -0
  44. package/dist/cjs/Contracts/Context/NoteContext.d.ts.map +1 -0
  45. package/dist/cjs/Contracts/Context/NoteContext.js +81 -0
  46. package/dist/cjs/Contracts/Context/NoteContext.js.map +1 -0
  47. package/dist/cjs/Contracts/Context/NoteDialog.d.ts +6 -0
  48. package/dist/cjs/Contracts/Context/NoteDialog.d.ts.map +1 -0
  49. package/dist/cjs/Contracts/Context/NoteDialog.js +44 -0
  50. package/dist/cjs/Contracts/Context/NoteDialog.js.map +1 -0
  51. package/dist/cjs/Contracts/Context/NoteScreen.d.ts +6 -0
  52. package/dist/cjs/Contracts/Context/NoteScreen.d.ts.map +1 -0
  53. package/dist/cjs/Contracts/Context/NoteScreen.js +50 -0
  54. package/dist/cjs/Contracts/Context/NoteScreen.js.map +1 -0
  55. package/dist/cjs/Contracts/Context/index.d.ts +4 -0
  56. package/dist/cjs/Contracts/Context/index.d.ts.map +1 -0
  57. package/dist/cjs/Contracts/Giving/NoteKind.d.ts +7 -0
  58. package/dist/cjs/Contracts/Giving/NoteKind.d.ts.map +1 -0
  59. package/dist/cjs/Contracts/Giving/NoteKind.js +18 -0
  60. package/dist/cjs/Contracts/Giving/NoteKind.js.map +1 -0
  61. package/dist/cjs/Contracts/Giving/index.d.ts +2 -0
  62. package/dist/cjs/Contracts/Giving/index.d.ts.map +1 -0
  63. package/dist/cjs/Contracts/Reporting/SliceLocation.d.ts +6 -0
  64. package/dist/cjs/Contracts/Reporting/SliceLocation.d.ts.map +1 -0
  65. package/dist/cjs/Contracts/Reporting/SliceLocation.js +50 -0
  66. package/dist/cjs/Contracts/Reporting/SliceLocation.js.map +1 -0
  67. package/dist/cjs/Contracts/Reporting/index.d.ts +2 -0
  68. package/dist/cjs/Contracts/Reporting/index.d.ts.map +1 -0
  69. package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts +40 -0
  70. package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts.map +1 -0
  71. package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js +101 -0
  72. package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js.map +1 -0
  73. package/dist/cjs/Giving/GiveNoteOnComponent/index.d.ts +2 -0
  74. package/dist/cjs/Giving/GiveNoteOnComponent/index.d.ts.map +1 -0
  75. package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts +36 -0
  76. package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts.map +1 -0
  77. package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.js +88 -0
  78. package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.js.map +1 -0
  79. package/dist/cjs/Giving/GiveNoteOnContext/index.d.ts +2 -0
  80. package/dist/cjs/Giving/GiveNoteOnContext/index.d.ts.map +1 -0
  81. package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts +36 -0
  82. package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts.map +1 -0
  83. package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js +88 -0
  84. package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js.map +1 -0
  85. package/dist/cjs/Giving/GiveNoteOnScreen/index.d.ts +2 -0
  86. package/dist/cjs/Giving/GiveNoteOnScreen/index.d.ts.map +1 -0
  87. package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts +40 -0
  88. package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts.map +1 -0
  89. package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js +100 -0
  90. package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js.map +1 -0
  91. package/dist/cjs/Giving/GiveNoteOnSlices/index.d.ts +2 -0
  92. package/dist/cjs/Giving/GiveNoteOnSlices/index.d.ts.map +1 -0
  93. package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts +42 -0
  94. package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts.map +1 -0
  95. package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js +113 -0
  96. package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js.map +1 -0
  97. package/dist/cjs/Giving/SuggestComponentPropertyChange/index.d.ts +2 -0
  98. package/dist/cjs/Giving/SuggestComponentPropertyChange/index.d.ts.map +1 -0
  99. package/dist/cjs/Listing/MyNote.d.ts +111 -0
  100. package/dist/cjs/Listing/MyNote.d.ts.map +1 -0
  101. package/dist/cjs/Listing/MyNote.js +315 -0
  102. package/dist/cjs/Listing/MyNote.js.map +1 -0
  103. package/dist/cjs/Listing/NoteStatus.d.ts +8 -0
  104. package/dist/cjs/Listing/NoteStatus.d.ts.map +1 -0
  105. package/dist/cjs/Listing/NoteStatus.js +19 -0
  106. package/dist/cjs/Listing/NoteStatus.js.map +1 -0
  107. package/dist/cjs/Listing/NoteTarget.d.ts +7 -0
  108. package/dist/cjs/Listing/NoteTarget.d.ts.map +1 -0
  109. package/dist/cjs/Listing/NoteTarget.js +18 -0
  110. package/dist/cjs/Listing/NoteTarget.js.map +1 -0
  111. package/dist/cjs/Listing/SuggestedPropertyChange.d.ts +6 -0
  112. package/dist/cjs/Listing/SuggestedPropertyChange.d.ts.map +1 -0
  113. package/dist/cjs/Listing/SuggestedPropertyChange.js +50 -0
  114. package/dist/cjs/Listing/SuggestedPropertyChange.js.map +1 -0
  115. package/dist/cjs/Listing/index.d.ts +5 -0
  116. package/dist/cjs/Listing/index.d.ts.map +1 -0
  117. package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.d.ts +21 -0
  118. package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.d.ts.map +1 -0
  119. package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.js +44 -0
  120. package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.js.map +1 -0
  121. package/dist/cjs/Withdrawing/WithdrawNote/index.d.ts +2 -0
  122. package/dist/cjs/Withdrawing/WithdrawNote/index.d.ts.map +1 -0
  123. package/dist/cjs/index.d.ts +13 -0
  124. package/dist/cjs/index.d.ts.map +1 -0
  125. package/dist/cjs/index.js +47 -0
  126. package/dist/cjs/index.js.map +1 -0
  127. package/dist/cjs/package.json +3 -0
  128. package/dist/esm/Availability/NotesAvailability.d.ts +21 -0
  129. package/dist/esm/Availability/NotesAvailability.d.ts.map +1 -0
  130. package/dist/esm/Availability/NotesAvailability.js +63 -0
  131. package/dist/esm/Availability/NotesAvailability.js.map +1 -0
  132. package/dist/esm/Availability/index.d.ts +2 -0
  133. package/dist/esm/Availability/index.d.ts.map +1 -0
  134. package/dist/esm/Availability/index.js +2 -0
  135. package/dist/esm/Availability/index.js.map +1 -0
  136. package/dist/esm/Contracts/Components/PickedComponent.d.ts +9 -0
  137. package/dist/esm/Contracts/Components/PickedComponent.d.ts.map +1 -0
  138. package/dist/esm/Contracts/Components/PickedComponent.js +63 -0
  139. package/dist/esm/Contracts/Components/PickedComponent.js.map +1 -0
  140. package/dist/esm/Contracts/Components/index.d.ts +2 -0
  141. package/dist/esm/Contracts/Components/index.d.ts.map +1 -0
  142. package/dist/esm/Contracts/Components/index.js +2 -0
  143. package/dist/esm/Contracts/Components/index.js.map +1 -0
  144. package/dist/esm/Contracts/Context/NoteContext.d.ts +14 -0
  145. package/dist/esm/Contracts/Context/NoteContext.d.ts.map +1 -0
  146. package/dist/esm/Contracts/Context/NoteContext.js +79 -0
  147. package/dist/esm/Contracts/Context/NoteContext.js.map +1 -0
  148. package/dist/esm/Contracts/Context/NoteDialog.d.ts +6 -0
  149. package/dist/esm/Contracts/Context/NoteDialog.d.ts.map +1 -0
  150. package/dist/esm/Contracts/Context/NoteDialog.js +42 -0
  151. package/dist/esm/Contracts/Context/NoteDialog.js.map +1 -0
  152. package/dist/esm/Contracts/Context/NoteScreen.d.ts +6 -0
  153. package/dist/esm/Contracts/Context/NoteScreen.d.ts.map +1 -0
  154. package/dist/esm/Contracts/Context/NoteScreen.js +48 -0
  155. package/dist/esm/Contracts/Context/NoteScreen.js.map +1 -0
  156. package/dist/esm/Contracts/Context/index.d.ts +4 -0
  157. package/dist/esm/Contracts/Context/index.d.ts.map +1 -0
  158. package/dist/esm/Contracts/Context/index.js +4 -0
  159. package/dist/esm/Contracts/Context/index.js.map +1 -0
  160. package/dist/esm/Contracts/Giving/NoteKind.d.ts +7 -0
  161. package/dist/esm/Contracts/Giving/NoteKind.d.ts.map +1 -0
  162. package/dist/esm/Contracts/Giving/NoteKind.js +16 -0
  163. package/dist/esm/Contracts/Giving/NoteKind.js.map +1 -0
  164. package/dist/esm/Contracts/Giving/index.d.ts +2 -0
  165. package/dist/esm/Contracts/Giving/index.d.ts.map +1 -0
  166. package/dist/esm/Contracts/Giving/index.js +2 -0
  167. package/dist/esm/Contracts/Giving/index.js.map +1 -0
  168. package/dist/esm/Contracts/Reporting/SliceLocation.d.ts +6 -0
  169. package/dist/esm/Contracts/Reporting/SliceLocation.d.ts.map +1 -0
  170. package/dist/esm/Contracts/Reporting/SliceLocation.js +48 -0
  171. package/dist/esm/Contracts/Reporting/SliceLocation.js.map +1 -0
  172. package/dist/esm/Contracts/Reporting/index.d.ts +2 -0
  173. package/dist/esm/Contracts/Reporting/index.d.ts.map +1 -0
  174. package/dist/esm/Contracts/Reporting/index.js +2 -0
  175. package/dist/esm/Contracts/Reporting/index.js.map +1 -0
  176. package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts +40 -0
  177. package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts.map +1 -0
  178. package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js +98 -0
  179. package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js.map +1 -0
  180. package/dist/esm/Giving/GiveNoteOnComponent/index.d.ts +2 -0
  181. package/dist/esm/Giving/GiveNoteOnComponent/index.d.ts.map +1 -0
  182. package/dist/esm/Giving/GiveNoteOnComponent/index.js +2 -0
  183. package/dist/esm/Giving/GiveNoteOnComponent/index.js.map +1 -0
  184. package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts +36 -0
  185. package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts.map +1 -0
  186. package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.js +85 -0
  187. package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.js.map +1 -0
  188. package/dist/esm/Giving/GiveNoteOnContext/index.d.ts +2 -0
  189. package/dist/esm/Giving/GiveNoteOnContext/index.d.ts.map +1 -0
  190. package/dist/esm/Giving/GiveNoteOnContext/index.js +2 -0
  191. package/dist/esm/Giving/GiveNoteOnContext/index.js.map +1 -0
  192. package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts +36 -0
  193. package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts.map +1 -0
  194. package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js +85 -0
  195. package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js.map +1 -0
  196. package/dist/esm/Giving/GiveNoteOnScreen/index.d.ts +2 -0
  197. package/dist/esm/Giving/GiveNoteOnScreen/index.d.ts.map +1 -0
  198. package/dist/esm/Giving/GiveNoteOnScreen/index.js +2 -0
  199. package/dist/esm/Giving/GiveNoteOnScreen/index.js.map +1 -0
  200. package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts +40 -0
  201. package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts.map +1 -0
  202. package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js +97 -0
  203. package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js.map +1 -0
  204. package/dist/esm/Giving/GiveNoteOnSlices/index.d.ts +2 -0
  205. package/dist/esm/Giving/GiveNoteOnSlices/index.d.ts.map +1 -0
  206. package/dist/esm/Giving/GiveNoteOnSlices/index.js +2 -0
  207. package/dist/esm/Giving/GiveNoteOnSlices/index.js.map +1 -0
  208. package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts +42 -0
  209. package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts.map +1 -0
  210. package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js +110 -0
  211. package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js.map +1 -0
  212. package/dist/esm/Giving/SuggestComponentPropertyChange/index.d.ts +2 -0
  213. package/dist/esm/Giving/SuggestComponentPropertyChange/index.d.ts.map +1 -0
  214. package/dist/esm/Giving/SuggestComponentPropertyChange/index.js +2 -0
  215. package/dist/esm/Giving/SuggestComponentPropertyChange/index.js.map +1 -0
  216. package/dist/esm/Listing/MyNote.d.ts +111 -0
  217. package/dist/esm/Listing/MyNote.d.ts.map +1 -0
  218. package/dist/esm/Listing/MyNote.js +312 -0
  219. package/dist/esm/Listing/MyNote.js.map +1 -0
  220. package/dist/esm/Listing/NoteStatus.d.ts +8 -0
  221. package/dist/esm/Listing/NoteStatus.d.ts.map +1 -0
  222. package/dist/esm/Listing/NoteStatus.js +17 -0
  223. package/dist/esm/Listing/NoteStatus.js.map +1 -0
  224. package/dist/esm/Listing/NoteTarget.d.ts +7 -0
  225. package/dist/esm/Listing/NoteTarget.d.ts.map +1 -0
  226. package/dist/esm/Listing/NoteTarget.js +16 -0
  227. package/dist/esm/Listing/NoteTarget.js.map +1 -0
  228. package/dist/esm/Listing/SuggestedPropertyChange.d.ts +6 -0
  229. package/dist/esm/Listing/SuggestedPropertyChange.d.ts.map +1 -0
  230. package/dist/esm/Listing/SuggestedPropertyChange.js +48 -0
  231. package/dist/esm/Listing/SuggestedPropertyChange.js.map +1 -0
  232. package/dist/esm/Listing/index.d.ts +5 -0
  233. package/dist/esm/Listing/index.d.ts.map +1 -0
  234. package/dist/esm/Listing/index.js +5 -0
  235. package/dist/esm/Listing/index.js.map +1 -0
  236. package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.d.ts +21 -0
  237. package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.d.ts.map +1 -0
  238. package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.js +42 -0
  239. package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.js.map +1 -0
  240. package/dist/esm/Withdrawing/WithdrawNote/index.d.ts +2 -0
  241. package/dist/esm/Withdrawing/WithdrawNote/index.d.ts.map +1 -0
  242. package/dist/esm/Withdrawing/WithdrawNote/index.js +2 -0
  243. package/dist/esm/Withdrawing/WithdrawNote/index.js.map +1 -0
  244. package/dist/esm/index.d.ts +13 -0
  245. package/dist/esm/index.d.ts.map +1 -0
  246. package/dist/esm/index.js +18 -0
  247. package/dist/esm/index.js.map +1 -0
  248. package/dist/esm/package.json +3 -0
  249. package/index.ts +15 -0
  250. package/package.json +69 -4
@@ -0,0 +1,36 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { ClearCommandValues, SetCommandValues } from '@cratis/arc.react/commands';
3
+ import { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { NoteContext } from '../../Contracts/Context/NoteContext';
5
+ import { NoteKind } from '../../Contracts/Giving/NoteKind';
6
+ import { Guid } from '@cratis/fundamentals';
7
+ export interface IGiveNoteOnScreen {
8
+ context?: NoteContext;
9
+ kind?: NoteKind;
10
+ noteId?: Guid;
11
+ text?: string;
12
+ }
13
+ export declare class GiveNoteOnScreenValidator extends CommandValidator<IGiveNoteOnScreen> {
14
+ constructor();
15
+ }
16
+ export declare class GiveNoteOnScreen extends Command<IGiveNoteOnScreen> implements IGiveNoteOnScreen {
17
+ #private;
18
+ static readonly sliceLocation: ArcSliceLocation;
19
+ readonly route: string;
20
+ readonly validation: CommandValidator;
21
+ readonly treatWarningsAsErrors: boolean;
22
+ readonly roles: string[];
23
+ readonly propertyDescriptors: PropertyDescriptor[];
24
+ constructor();
25
+ get requestParameters(): string[];
26
+ get context(): NoteContext;
27
+ set context(value: NoteContext);
28
+ get kind(): NoteKind;
29
+ set kind(value: NoteKind);
30
+ get noteId(): Guid;
31
+ set noteId(value: Guid);
32
+ get text(): string;
33
+ set text(value: string);
34
+ static use(initialValues?: IGiveNoteOnScreen): [GiveNoteOnScreen, SetCommandValues<IGiveNoteOnScreen>, ClearCommandValues];
35
+ }
36
+ //# sourceMappingURL=GiveNoteOnScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiveNoteOnScreen.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnScreen/GiveNoteOnScreen.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAc,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,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AE,kBAAkB,CAAC;CAG7H"}
@@ -0,0 +1,85 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { useCommand } from '@cratis/arc.react/commands';
3
+ import { SliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { NoteContext } from '../../Contracts/Context/NoteContext.js';
5
+ import { Guid } from '@cratis/fundamentals';
6
+
7
+ // Copyright (c) Cratis. All rights reserved.
8
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
+ // **DO NOT EDIT** - This file is an automatically generated file.
10
+ // @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnScreen.GiveNoteOnScreen. Time: 2026-11-01T11:55:12.6707473Z. Hash: 5895C65951697575A860A5815C6574C6765026C35F2CB1D5D70586CE3E0694D9
11
+ class GiveNoteOnScreenValidator extends CommandValidator {
12
+ constructor(){
13
+ super();
14
+ this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
15
+ this.ruleFor((c)=>c.text).notEmpty().withMessage('Write your note.');
16
+ this.ruleFor((c)=>c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');
17
+ }
18
+ }
19
+ /**
20
+ * The user picked the screen itself as the subject of a note, as opposed to the context the screen happens to be in. Who gives it is taken from the signed-in identity, never from the request.
21
+ */ class GiveNoteOnScreen extends Command {
22
+ static sliceLocation = new SliceLocation('', 'Giving', 'GiveNoteOnScreen');
23
+ route = '/api/giving/give-note-on-screen';
24
+ validation = new GiveNoteOnScreenValidator();
25
+ treatWarningsAsErrors = false;
26
+ roles = [];
27
+ propertyDescriptors = [
28
+ new PropertyDescriptor('context', NoteContext, false),
29
+ new PropertyDescriptor('kind', Number, false),
30
+ new PropertyDescriptor('noteId', Guid, false),
31
+ new PropertyDescriptor('text', String, false)
32
+ ];
33
+ #context;
34
+ #kind;
35
+ #noteId;
36
+ #text;
37
+ constructor(){
38
+ super(Object, false);
39
+ }
40
+ get requestParameters() {
41
+ return [];
42
+ }
43
+ /**
44
+ * What the user is looking at; its screen is the subject.
45
+ */ get context() {
46
+ return this.#context;
47
+ }
48
+ set context(value) {
49
+ this.#context = value;
50
+ this.propertyChanged('context');
51
+ }
52
+ /**
53
+ * What kind of feedback it is.
54
+ */ get kind() {
55
+ return this.#kind;
56
+ }
57
+ set kind(value) {
58
+ this.#kind = value;
59
+ this.propertyChanged('kind');
60
+ }
61
+ /**
62
+ * The id of the new note, chosen by the caller so a retried command does not give a second note.
63
+ */ get noteId() {
64
+ return this.#noteId;
65
+ }
66
+ set noteId(value) {
67
+ this.#noteId = value;
68
+ this.propertyChanged('noteId');
69
+ }
70
+ /**
71
+ * What the user writes.
72
+ */ get text() {
73
+ return this.#text;
74
+ }
75
+ set text(value) {
76
+ this.#text = value;
77
+ this.propertyChanged('text');
78
+ }
79
+ static use(initialValues) {
80
+ return useCommand(GiveNoteOnScreen, initialValues);
81
+ }
82
+ }
83
+
84
+ export { GiveNoteOnScreen, GiveNoteOnScreenValidator };
85
+ //# sourceMappingURL=GiveNoteOnScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiveNoteOnScreen.js","sources":["../../../../Giving/GiveNoteOnScreen/GiveNoteOnScreen.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnScreen.GiveNoteOnScreen. Time: 2026-11-01T11:55:12.6707473Z. Hash: 5895C65951697575A860A5815C6574C6765026C35F2CB1D5D70586CE3E0694D9\nimport { Command, CommandValidator } from '@cratis/arc/commands';\nimport { ClearCommandValues, SetCommandValues, useCommand } from '@cratis/arc.react/commands';\nimport { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';\nimport { NoteContext } from '../../Contracts/Context/NoteContext';\nimport { NoteKind } from '../../Contracts/Giving/NoteKind';\nimport { Guid } from '@cratis/fundamentals';\n\n/**\n * The user picked the screen itself as the subject of a note, as opposed to the context the screen happens to be in. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport interface IGiveNoteOnScreen {\n\n /**\n * What the user is looking at; its screen is the subject.\n */\n context?: NoteContext;\n\n /**\n * What kind of feedback it is.\n */\n kind?: NoteKind;\n\n /**\n * The id of the new note, chosen by the caller so a retried command does not give a second note.\n */\n noteId?: Guid;\n\n /**\n * What the user writes.\n */\n text?: string;\n}\n\nexport class GiveNoteOnScreenValidator extends CommandValidator<IGiveNoteOnScreen> {\n constructor() {\n super();\n this.ruleFor(c => c.context).notNull().withMessage('A note needs to know what you were looking at.');\n this.ruleFor(c => c.text).notEmpty().withMessage('Write your note.');\n this.ruleFor(c => c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');\n }\n}\n\n/**\n * The user picked the screen itself as the subject of a note, as opposed to the context the screen happens to be in. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport class GiveNoteOnScreen extends Command<IGiveNoteOnScreen> implements IGiveNoteOnScreen {\n static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Giving', 'GiveNoteOnScreen');\n readonly route: string = '/api/giving/give-note-on-screen';\n readonly validation: CommandValidator = new GiveNoteOnScreenValidator();\n readonly treatWarningsAsErrors: boolean = false;\n readonly roles: string[] = [];\n readonly propertyDescriptors: PropertyDescriptor[] = [\n new PropertyDescriptor('context', NoteContext, false),\n new PropertyDescriptor('kind', Number, false),\n new PropertyDescriptor('noteId', Guid, false),\n new PropertyDescriptor('text', String, false),\n ];\n\n #context!: NoteContext;\n #kind!: NoteKind;\n #noteId!: Guid;\n #text!: string;\n\n constructor() {\n super(Object, false);\n }\n\n get requestParameters(): string[] {\n return [\n ];\n }\n\n /**\n * What the user is looking at; its screen is the subject.\n */\n get context(): NoteContext {\n return this.#context;\n }\n\n set context(value: NoteContext) {\n this.#context = value;\n this.propertyChanged('context');\n }\n /**\n * What kind of feedback it is.\n */\n get kind(): NoteKind {\n return this.#kind;\n }\n\n set kind(value: NoteKind) {\n this.#kind = value;\n this.propertyChanged('kind');\n }\n /**\n * The id of the new note, chosen by the caller so a retried command does not give a second note.\n */\n get noteId(): Guid {\n return this.#noteId;\n }\n\n set noteId(value: Guid) {\n this.#noteId = value;\n this.propertyChanged('noteId');\n }\n /**\n * What the user writes.\n */\n get text(): string {\n return this.#text;\n }\n\n set text(value: string) {\n this.#text = value;\n this.propertyChanged('text');\n }\n\n static use(initialValues?: IGiveNoteOnScreen): [GiveNoteOnScreen, SetCommandValues<IGiveNoteOnScreen>, ClearCommandValues] {\n return useCommand<GiveNoteOnScreen, IGiveNoteOnScreen>(GiveNoteOnScreen, initialValues);\n }\n}\n"],"names":["GiveNoteOnScreenValidator","CommandValidator","ruleFor","c","context","notNull","withMessage","text","notEmpty","maxLength","GiveNoteOnScreen","Command","sliceLocation","ArcSliceLocation","route","validation","treatWarningsAsErrors","roles","propertyDescriptors","PropertyDescriptor","NoteContext","Number","Guid","String","Object","requestParameters","value","propertyChanged","kind","noteId","use","initialValues","useCommand"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAkCO,MAAMA,yBAAAA,SAAkCC,gBAAAA,CAAAA;IAC3C,WAAA,EAAc;QACV,KAAK,EAAA;QACL,IAAI,CAACC,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEC,OAAO,CAAA,CAAEC,OAAO,EAAA,CAAGC,WAAW,CAAC,gDAAA,CAAA;QACnD,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEI,IAAI,CAAA,CAAEC,QAAQ,EAAA,CAAGF,WAAW,CAAC,kBAAA,CAAA;AACjD,QAAA,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEI,IAAI,CAAA,CAAEE,SAAS,CAAC,IAAA,CAAA,CAAMH,WAAW,CAAC,uCAAA,CAAA;AAC1D,IAAA;AACJ;AAEA;;IAGO,MAAMI,gBAAAA,SAAyBC,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O,IAAI,CAAC,OAAO;AACvB,IAAA;IAEA,IAAIA,MAAAA,CAAOH,KAAW,EAAE;QACpB,IAAI,CAAC,OAAO,GAAGA,KAAAA;QACf,IAAI,CAACC,eAAe,CAAC,QAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIpB,IAAAA,GAAe;QACf,OAAO,IAAI,CAAC,KAAK;AACrB,IAAA;IAEA,IAAIA,IAAAA,CAAKmB,KAAa,EAAE;QACpB,IAAI,CAAC,KAAK,GAAGA,KAAAA;QACb,IAAI,CAACC,eAAe,CAAC,MAAA,CAAA;AACzB,IAAA;IAEA,OAAOG,GAAAA,CAAIC,aAAiC,EAA+E;AACvH,QAAA,OAAOC,WAAgDtB,gBAAAA,EAAkBqB,aAAAA,CAAAA;AAC7E,IAAA;AACJ;;"}
@@ -0,0 +1,2 @@
1
+ export * from './GiveNoteOnScreen';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnScreen/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './GiveNoteOnScreen';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnScreen/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { ClearCommandValues, SetCommandValues } from '@cratis/arc.react/commands';
3
+ import { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { NoteContext } from '../../Contracts/Context/NoteContext';
5
+ import { NoteKind } from '../../Contracts/Giving/NoteKind';
6
+ import { SliceLocation } from '../../Contracts/Reporting/SliceLocation';
7
+ import { Guid } from '@cratis/fundamentals';
8
+ export interface IGiveNoteOnSlices {
9
+ context?: NoteContext;
10
+ kind?: NoteKind;
11
+ noteId?: Guid;
12
+ slices?: SliceLocation[];
13
+ text?: string;
14
+ }
15
+ export declare class GiveNoteOnSlicesValidator extends CommandValidator<IGiveNoteOnSlices> {
16
+ constructor();
17
+ }
18
+ export declare class GiveNoteOnSlices extends Command<IGiveNoteOnSlices> implements IGiveNoteOnSlices {
19
+ #private;
20
+ static readonly sliceLocation: ArcSliceLocation;
21
+ readonly route: string;
22
+ readonly validation: CommandValidator;
23
+ readonly treatWarningsAsErrors: boolean;
24
+ readonly roles: string[];
25
+ readonly propertyDescriptors: PropertyDescriptor[];
26
+ constructor();
27
+ get requestParameters(): string[];
28
+ get context(): NoteContext;
29
+ set context(value: NoteContext);
30
+ get kind(): NoteKind;
31
+ set kind(value: NoteKind);
32
+ get noteId(): Guid;
33
+ set noteId(value: Guid);
34
+ get slices(): SliceLocation[];
35
+ set slices(value: SliceLocation[]);
36
+ get text(): string;
37
+ set text(value: string);
38
+ static use(initialValues?: IGiveNoteOnSlices): [GiveNoteOnSlices, SetCommandValues<IGiveNoteOnSlices>, ClearCommandValues];
39
+ }
40
+ //# sourceMappingURL=GiveNoteOnSlices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiveNoteOnSlices.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnSlices/GiveNoteOnSlices.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAc,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,C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,aAAa,CAAC,EAAE,iBAAiB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CAG7H"}
@@ -0,0 +1,97 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { useCommand } from '@cratis/arc.react/commands';
3
+ import { SliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { NoteContext } from '../../Contracts/Context/NoteContext.js';
5
+ import { SliceLocation as SliceLocation$1 } from '../../Contracts/Reporting/SliceLocation.js';
6
+ import { Guid } from '@cratis/fundamentals';
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ // **DO NOT EDIT** - This file is an automatically generated file.
11
+ // @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnSlices.GiveNoteOnSlices. Time: 2026-11-01T11:55:12.6707473Z. Hash: 381D70328152C05B79679400BC7A4138C7D19582BF2635CC3A6B39553A105A06
12
+ class GiveNoteOnSlicesValidator extends CommandValidator {
13
+ constructor(){
14
+ super();
15
+ this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
16
+ this.ruleFor((c)=>c.text).notEmpty().withMessage('Write your note.');
17
+ this.ruleFor((c)=>c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');
18
+ }
19
+ }
20
+ /**
21
+ * The user explicitly picked one or more slices as the subject of a note. Who gives it is taken from the signed-in identity, never from the request.
22
+ */ class GiveNoteOnSlices extends Command {
23
+ static sliceLocation = new SliceLocation('', 'Giving', 'GiveNoteOnSlices');
24
+ route = '/api/giving/give-note-on-slices';
25
+ validation = new GiveNoteOnSlicesValidator();
26
+ treatWarningsAsErrors = false;
27
+ roles = [];
28
+ propertyDescriptors = [
29
+ new PropertyDescriptor('context', NoteContext, false),
30
+ new PropertyDescriptor('kind', Number, false),
31
+ new PropertyDescriptor('noteId', Guid, false),
32
+ new PropertyDescriptor('slices', SliceLocation$1, false),
33
+ new PropertyDescriptor('text', String, false)
34
+ ];
35
+ #context;
36
+ #kind;
37
+ #noteId;
38
+ #slices;
39
+ #text;
40
+ constructor(){
41
+ super(Object, false);
42
+ }
43
+ get requestParameters() {
44
+ return [];
45
+ }
46
+ /**
47
+ * What the user is looking at.
48
+ */ get context() {
49
+ return this.#context;
50
+ }
51
+ set context(value) {
52
+ this.#context = value;
53
+ this.propertyChanged('context');
54
+ }
55
+ /**
56
+ * What kind of feedback it is.
57
+ */ get kind() {
58
+ return this.#kind;
59
+ }
60
+ set kind(value) {
61
+ this.#kind = value;
62
+ this.propertyChanged('kind');
63
+ }
64
+ /**
65
+ * The id of the new note, chosen by the caller so a retried command does not give a second note.
66
+ */ get noteId() {
67
+ return this.#noteId;
68
+ }
69
+ set noteId(value) {
70
+ this.#noteId = value;
71
+ this.propertyChanged('noteId');
72
+ }
73
+ /**
74
+ * The slices the user picked; at least one.
75
+ */ get slices() {
76
+ return this.#slices;
77
+ }
78
+ set slices(value) {
79
+ this.#slices = value;
80
+ this.propertyChanged('slices');
81
+ }
82
+ /**
83
+ * What the user writes.
84
+ */ get text() {
85
+ return this.#text;
86
+ }
87
+ set text(value) {
88
+ this.#text = value;
89
+ this.propertyChanged('text');
90
+ }
91
+ static use(initialValues) {
92
+ return useCommand(GiveNoteOnSlices, initialValues);
93
+ }
94
+ }
95
+
96
+ export { GiveNoteOnSlices, GiveNoteOnSlicesValidator };
97
+ //# sourceMappingURL=GiveNoteOnSlices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiveNoteOnSlices.js","sources":["../../../../Giving/GiveNoteOnSlices/GiveNoteOnSlices.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnSlices.GiveNoteOnSlices. Time: 2026-11-01T11:55:12.6707473Z. Hash: 381D70328152C05B79679400BC7A4138C7D19582BF2635CC3A6B39553A105A06\nimport { Command, CommandValidator } from '@cratis/arc/commands';\nimport { ClearCommandValues, SetCommandValues, useCommand } from '@cratis/arc.react/commands';\nimport { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';\nimport { NoteContext } from '../../Contracts/Context/NoteContext';\nimport { NoteKind } from '../../Contracts/Giving/NoteKind';\nimport { SliceLocation } from '../../Contracts/Reporting/SliceLocation';\nimport { Guid } from '@cratis/fundamentals';\n\n/**\n * The user explicitly picked one or more slices as the subject of a note. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport interface IGiveNoteOnSlices {\n\n /**\n * What the user is looking at.\n */\n context?: NoteContext;\n\n /**\n * What kind of feedback it is.\n */\n kind?: NoteKind;\n\n /**\n * The id of the new note, chosen by the caller so a retried command does not give a second note.\n */\n noteId?: Guid;\n\n /**\n * The slices the user picked; at least one.\n */\n slices?: SliceLocation[];\n\n /**\n * What the user writes.\n */\n text?: string;\n}\n\nexport class GiveNoteOnSlicesValidator extends CommandValidator<IGiveNoteOnSlices> {\n constructor() {\n super();\n this.ruleFor(c => c.context).notNull().withMessage('A note needs to know what you were looking at.');\n this.ruleFor(c => c.text).notEmpty().withMessage('Write your note.');\n this.ruleFor(c => c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');\n }\n}\n\n/**\n * The user explicitly picked one or more slices as the subject of a note. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport class GiveNoteOnSlices extends Command<IGiveNoteOnSlices> implements IGiveNoteOnSlices {\n static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Giving', 'GiveNoteOnSlices');\n readonly route: string = '/api/giving/give-note-on-slices';\n readonly validation: CommandValidator = new GiveNoteOnSlicesValidator();\n readonly treatWarningsAsErrors: boolean = false;\n readonly roles: string[] = [];\n readonly propertyDescriptors: PropertyDescriptor[] = [\n new PropertyDescriptor('context', NoteContext, false),\n new PropertyDescriptor('kind', Number, false),\n new PropertyDescriptor('noteId', Guid, false),\n new PropertyDescriptor('slices', SliceLocation, false),\n new PropertyDescriptor('text', String, false),\n ];\n\n #context!: NoteContext;\n #kind!: NoteKind;\n #noteId!: Guid;\n #slices!: SliceLocation[];\n #text!: string;\n\n constructor() {\n super(Object, false);\n }\n\n get requestParameters(): string[] {\n return [\n ];\n }\n\n /**\n * What the user is looking at.\n */\n get context(): NoteContext {\n return this.#context;\n }\n\n set context(value: NoteContext) {\n this.#context = value;\n this.propertyChanged('context');\n }\n /**\n * What kind of feedback it is.\n */\n get kind(): NoteKind {\n return this.#kind;\n }\n\n set kind(value: NoteKind) {\n this.#kind = value;\n this.propertyChanged('kind');\n }\n /**\n * The id of the new note, chosen by the caller so a retried command does not give a second note.\n */\n get noteId(): Guid {\n return this.#noteId;\n }\n\n set noteId(value: Guid) {\n this.#noteId = value;\n this.propertyChanged('noteId');\n }\n /**\n * The slices the user picked; at least one.\n */\n get slices(): SliceLocation[] {\n return this.#slices;\n }\n\n set slices(value: SliceLocation[]) {\n this.#slices = value;\n this.propertyChanged('slices');\n }\n /**\n * What the user writes.\n */\n get text(): string {\n return this.#text;\n }\n\n set text(value: string) {\n this.#text = value;\n this.propertyChanged('text');\n }\n\n static use(initialValues?: IGiveNoteOnSlices): [GiveNoteOnSlices, SetCommandValues<IGiveNoteOnSlices>, ClearCommandValues] {\n return useCommand<GiveNoteOnSlices, IGiveNoteOnSlices>(GiveNoteOnSlices, initialValues);\n }\n}\n"],"names":["GiveNoteOnSlicesValidator","CommandValidator","ruleFor","c","context","notNull","withMessage","text","notEmpty","maxLength","GiveNoteOnSlices","Command","sliceLocation","ArcSliceLocation","route","validation","treatWarningsAsErrors","roles","propertyDescriptors","PropertyDescriptor","NoteContext","Number","Guid","SliceLocation","String","Object","requestParameters","value","propertyChanged","kind","noteId","slices","use","initialValues","useCommand"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AAwCO,MAAMA,yBAAAA,SAAkCC,gBAAAA,C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,OAAOC,WAAgDxB,gBAAAA,EAAkBuB,aAAAA,CAAAA;AAC7E,IAAA;AACJ;;"}
@@ -0,0 +1,2 @@
1
+ export * from './GiveNoteOnSlices';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnSlices/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './GiveNoteOnSlices';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnSlices/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { ClearCommandValues, SetCommandValues } from '@cratis/arc.react/commands';
3
+ import { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { PickedComponent } from '../../Contracts/Components/PickedComponent';
5
+ import { NoteContext } from '../../Contracts/Context/NoteContext';
6
+ import { Guid } from '@cratis/fundamentals';
7
+ export interface ISuggestComponentPropertyChange {
8
+ component?: PickedComponent;
9
+ context?: NoteContext;
10
+ currentValue?: string;
11
+ noteId?: Guid;
12
+ property?: string;
13
+ suggestedValue?: string;
14
+ }
15
+ export declare class SuggestComponentPropertyChangeValidator extends CommandValidator<ISuggestComponentPropertyChange> {
16
+ constructor();
17
+ }
18
+ export declare class SuggestComponentPropertyChange extends Command<ISuggestComponentPropertyChange> implements ISuggestComponentPropertyChange {
19
+ #private;
20
+ static readonly sliceLocation: ArcSliceLocation;
21
+ readonly route: string;
22
+ readonly validation: CommandValidator;
23
+ readonly treatWarningsAsErrors: boolean;
24
+ readonly roles: string[];
25
+ readonly propertyDescriptors: PropertyDescriptor[];
26
+ constructor();
27
+ get requestParameters(): string[];
28
+ get component(): PickedComponent;
29
+ set component(value: PickedComponent);
30
+ get context(): NoteContext;
31
+ set context(value: NoteContext);
32
+ get currentValue(): string;
33
+ set currentValue(value: string);
34
+ get noteId(): Guid;
35
+ set noteId(value: Guid);
36
+ get property(): string;
37
+ set property(value: string);
38
+ get suggestedValue(): string;
39
+ set suggestedValue(value: string);
40
+ static use(initialValues?: ISuggestComponentPropertyChange): [SuggestComponentPropertyChange, SetCommandValues<ISuggestComponentPropertyChange>, ClearCommandValues];
41
+ }
42
+ //# sourceMappingURL=SuggestComponentPropertyChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestComponentPropertyChange.d.ts","sourceRoot":"","sources":["../../../../Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAc,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,MAAM,WAAW,+BAA+B;IAK5C,SAAS,CAAC,EAAE,eAAe,CAAC;IAK5B,OAAO,CAAC,EAAE,WAAW,CAAC;IAKtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,MAAM,CAAC,EAAE,IAAI,CAAC;IAKd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,uCAAwC,SAAQ,gBAAgB,CAAC,+BAA+B,CAAC;;CAS7G;AAKD,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,+BAA+B,CAAE,YAAW,+BAA+B;;IACnI,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAwE;IACvH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAmD;IACzE,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAiD;IACtF,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,CAOhD;;IAaF,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAGhC;IAKD,IAAI,SAAS,IAAI,eAAe,CAE/B;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,eAAe,EAGnC;IAID,IAAI,OAAO,IAAI,WAAW,CAEzB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAG7B;IAID,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAG7B;IAID,IAAI,MAAM,IAAI,IAAI,CAEjB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,IAAI,EAGrB;IAID,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGzB;IAID,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAG/B;IAED,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,+BAA+B,GAAG,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,+BAA+B,CAAC,EAAE,kBAAkB,CAAC;CAGvK"}
@@ -0,0 +1,110 @@
1
+ import { Command, CommandValidator } from '@cratis/arc/commands';
2
+ import { useCommand } from '@cratis/arc.react/commands';
3
+ import { SliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
4
+ import { PickedComponent } from '../../Contracts/Components/PickedComponent.js';
5
+ import { NoteContext } from '../../Contracts/Context/NoteContext.js';
6
+ import { Guid } from '@cratis/fundamentals';
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ // **DO NOT EDIT** - This file is an automatically generated file.
11
+ // @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.SuggestComponentPropertyChange.SuggestComponentPropertyChange. Time: 2026-11-01T11:55:12.6707473Z. Hash: 6C7D0524C92397ABC562D8899CC17DDFA41C162C4EA857CB8299EE032524934C
12
+ class SuggestComponentPropertyChangeValidator extends CommandValidator {
13
+ constructor(){
14
+ super();
15
+ this.ruleFor((c)=>c.component).notNull().withMessage('Pick a component.');
16
+ this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
17
+ this.ruleFor((c)=>c.currentValue).maxLength(1000).withMessage('Keep the current value within 1000 characters.');
18
+ this.ruleFor((c)=>c.property).notEmpty().withMessage('Name the property you suggest changing.');
19
+ this.ruleFor((c)=>c.suggestedValue).maxLength(1000).withMessage('Keep the suggested value within 1000 characters.');
20
+ }
21
+ }
22
+ /**
23
+ * The user changed a presentation property of a component in the picker. There is one command per property; the suggestions of one picking session share the note id, which is also the note id of the text they may write about the component. Who suggests it is taken from the signed-in identity, never from the request.
24
+ */ class SuggestComponentPropertyChange extends Command {
25
+ static sliceLocation = new SliceLocation('', 'Giving', 'SuggestComponentPropertyChange');
26
+ route = '/api/giving/suggest-component-property-change';
27
+ validation = new SuggestComponentPropertyChangeValidator();
28
+ treatWarningsAsErrors = false;
29
+ roles = [];
30
+ propertyDescriptors = [
31
+ new PropertyDescriptor('component', PickedComponent, false),
32
+ new PropertyDescriptor('context', NoteContext, false),
33
+ new PropertyDescriptor('currentValue', String, false),
34
+ new PropertyDescriptor('noteId', Guid, false),
35
+ new PropertyDescriptor('property', String, false),
36
+ new PropertyDescriptor('suggestedValue', String, false)
37
+ ];
38
+ #component;
39
+ #context;
40
+ #currentValue;
41
+ #noteId;
42
+ #property;
43
+ #suggestedValue;
44
+ constructor(){
45
+ super(Object, false);
46
+ }
47
+ get requestParameters() {
48
+ return [];
49
+ }
50
+ /**
51
+ * The component the user picked.
52
+ */ get component() {
53
+ return this.#component;
54
+ }
55
+ set component(value) {
56
+ this.#component = value;
57
+ this.propertyChanged('component');
58
+ }
59
+ /**
60
+ * What the user is looking at.
61
+ */ get context() {
62
+ return this.#context;
63
+ }
64
+ set context(value) {
65
+ this.#context = value;
66
+ this.propertyChanged('context');
67
+ }
68
+ /**
69
+ * The value the property has.
70
+ */ get currentValue() {
71
+ return this.#currentValue;
72
+ }
73
+ set currentValue(value) {
74
+ this.#currentValue = value;
75
+ this.propertyChanged('currentValue');
76
+ }
77
+ /**
78
+ * The id of the picking session's note: new, or the one the session's earlier suggestions were made on.
79
+ */ get noteId() {
80
+ return this.#noteId;
81
+ }
82
+ set noteId(value) {
83
+ this.#noteId = value;
84
+ this.propertyChanged('noteId');
85
+ }
86
+ /**
87
+ * The property the user changed.
88
+ */ get property() {
89
+ return this.#property;
90
+ }
91
+ set property(value) {
92
+ this.#property = value;
93
+ this.propertyChanged('property');
94
+ }
95
+ /**
96
+ * The value the user suggests.
97
+ */ get suggestedValue() {
98
+ return this.#suggestedValue;
99
+ }
100
+ set suggestedValue(value) {
101
+ this.#suggestedValue = value;
102
+ this.propertyChanged('suggestedValue');
103
+ }
104
+ static use(initialValues) {
105
+ return useCommand(SuggestComponentPropertyChange, initialValues);
106
+ }
107
+ }
108
+
109
+ export { SuggestComponentPropertyChange, SuggestComponentPropertyChangeValidator };
110
+ //# sourceMappingURL=SuggestComponentPropertyChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestComponentPropertyChange.js","sources":["../../../../Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.SuggestComponentPropertyChange.SuggestComponentPropertyChange. Time: 2026-11-01T11:55:12.6707473Z. Hash: 6C7D0524C92397ABC562D8899CC17DDFA41C162C4EA857CB8299EE032524934C\nimport { Command, CommandValidator } from '@cratis/arc/commands';\nimport { ClearCommandValues, SetCommandValues, useCommand } from '@cratis/arc.react/commands';\nimport { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';\nimport { PickedComponent } from '../../Contracts/Components/PickedComponent';\nimport { NoteContext } from '../../Contracts/Context/NoteContext';\nimport { Guid } from '@cratis/fundamentals';\n\n/**\n * The user changed a presentation property of a component in the picker. There is one command per property; the suggestions of one picking session share the note id, which is also the note id of the text they may write about the component. Who suggests it is taken from the signed-in identity, never from the request.\n */\nexport interface ISuggestComponentPropertyChange {\n\n /**\n * The component the user picked.\n */\n component?: PickedComponent;\n\n /**\n * What the user is looking at.\n */\n context?: NoteContext;\n\n /**\n * The value the property has.\n */\n currentValue?: string;\n\n /**\n * The id of the picking session's note: new, or the one the session's earlier suggestions were made on.\n */\n noteId?: Guid;\n\n /**\n * The property the user changed.\n */\n property?: string;\n\n /**\n * The value the user suggests.\n */\n suggestedValue?: string;\n}\n\nexport class SuggestComponentPropertyChangeValidator extends CommandValidator<ISuggestComponentPropertyChange> {\n constructor() {\n super();\n this.ruleFor(c => c.component).notNull().withMessage('Pick a component.');\n this.ruleFor(c => c.context).notNull().withMessage('A note needs to know what you were looking at.');\n this.ruleFor(c => c.currentValue).maxLength(1000).withMessage('Keep the current value within 1000 characters.');\n this.ruleFor(c => c.property).notEmpty().withMessage('Name the property you suggest changing.');\n this.ruleFor(c => c.suggestedValue).maxLength(1000).withMessage('Keep the suggested value within 1000 characters.');\n }\n}\n\n/**\n * The user changed a presentation property of a component in the picker. There is one command per property; the suggestions of one picking session share the note id, which is also the note id of the text they may write about the component. Who suggests it is taken from the signed-in identity, never from the request.\n */\nexport class SuggestComponentPropertyChange extends Command<ISuggestComponentPropertyChange> implements ISuggestComponentPropertyChange {\n static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Giving', 'SuggestComponentPropertyChange');\n readonly route: string = '/api/giving/suggest-component-property-change';\n readonly validation: CommandValidator = new SuggestComponentPropertyChangeValidator();\n readonly treatWarningsAsErrors: boolean = false;\n readonly roles: string[] = [];\n readonly propertyDescriptors: PropertyDescriptor[] = [\n new PropertyDescriptor('component', PickedComponent, false),\n new PropertyDescriptor('context', NoteContext, false),\n new PropertyDescriptor('currentValue', String, false),\n new PropertyDescriptor('noteId', Guid, false),\n new PropertyDescriptor('property', String, false),\n new PropertyDescriptor('suggestedValue', String, false),\n ];\n\n #component!: PickedComponent;\n #context!: NoteContext;\n #currentValue!: string;\n #noteId!: Guid;\n #property!: string;\n #suggestedValue!: string;\n\n constructor() {\n super(Object, false);\n }\n\n get requestParameters(): string[] {\n return [\n ];\n }\n\n /**\n * The component the user picked.\n */\n get component(): PickedComponent {\n return this.#component;\n }\n\n set component(value: PickedComponent) {\n this.#component = value;\n this.propertyChanged('component');\n }\n /**\n * What the user is looking at.\n */\n get context(): NoteContext {\n return this.#context;\n }\n\n set context(value: NoteContext) {\n this.#context = value;\n this.propertyChanged('context');\n }\n /**\n * The value the property has.\n */\n get currentValue(): string {\n return this.#currentValue;\n }\n\n set currentValue(value: string) {\n this.#currentValue = value;\n this.propertyChanged('currentValue');\n }\n /**\n * The id of the picking session's note: new, or the one the session's earlier suggestions were made on.\n */\n get noteId(): Guid {\n return this.#noteId;\n }\n\n set noteId(value: Guid) {\n this.#noteId = value;\n this.propertyChanged('noteId');\n }\n /**\n * The property the user changed.\n */\n get property(): string {\n return this.#property;\n }\n\n set property(value: string) {\n this.#property = value;\n this.propertyChanged('property');\n }\n /**\n * The value the user suggests.\n */\n get suggestedValue(): string {\n return this.#suggestedValue;\n }\n\n set suggestedValue(value: string) {\n this.#suggestedValue = value;\n this.propertyChanged('suggestedValue');\n }\n\n static use(initialValues?: ISuggestComponentPropertyChange): [SuggestComponentPropertyChange, SetCommandValues<ISuggestComponentPropertyChange>, ClearCommandValues] {\n return useCommand<SuggestComponentPropertyChange, ISuggestComponentPropertyChange>(SuggestComponentPropertyChange, initialValues);\n }\n}\n"],"names":["SuggestComponentPropertyChangeValidator","CommandValidator","ruleFor","c","component","notNull","withMessage","context","currentValue","maxLength","property","notEmpty","suggestedValue","SuggestComponentPropertyChange","Command","sliceLocation","ArcSliceLocation","route","validation","treatWarningsAsErrors","roles","propertyDescriptors","PropertyDescriptor","PickedComponent","NoteContext","String","Guid","Object","requestParameters","value","propertyChanged","noteId","use","initialValues","useCommand"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AA4CO,MAAMA,uCAAAA,SAAgDC,gBAAAA,CAAAA;IACzD,WAAA,EAAc;QACV,KAAK,EAAA;QACL,IAAI,CAACC,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEC,SAAS,CAAA,CAAEC,OAAO,EAAA,CAAGC,WAAW,CAAC,mBAAA,CAAA;QACrD,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEI,OAAO,CAAA,CAAEF,OAAO,EAAA,CAAGC,WAAW,CAAC,gDAAA,CAAA;AACnD,QAAA,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEK,YAAY,CAAA,CAAEC,SAAS,CAAC,IAAA,CAAA,CAAMH,WAAW,CAAC,gDAAA,CAAA;QAC9D,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAEO,QAAQ,CAAA,CAAEC,QAAQ,EAAA,CAAGL,WAAW,CAAC,yCAAA,CAAA;AACrD,QAAA,IAAI,CAACJ,OAAO,CAACC,CAAAA,CAAAA,GAAKA,CAAAA,CAAES,cAAc,CAAA,CAAEH,SAAS,CAAC,IAAA,CAAA,CAAMH,WAAW,CAAC,kDAAA,CAAA;AACpE,IAAA;AACJ;AAEA;;IAGO,MAAMO,8BAAAA,SAAuCC,OAAAA,CAAAA;AAChD,IAAA,O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EAAE;QAC5B,IAAI,CAAC,QAAQ,GAAGA,KAAAA;QAChB,IAAI,CAACC,eAAe,CAAC,SAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAItB,YAAAA,GAAuB;QACvB,OAAO,IAAI,CAAC,aAAa;AAC7B,IAAA;IAEA,IAAIA,YAAAA,CAAaqB,KAAa,EAAE;QAC5B,IAAI,CAAC,aAAa,GAAGA,KAAAA;QACrB,IAAI,CAACC,eAAe,CAAC,cAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIC,MAAAA,GAAe;QACf,OAAO,IAAI,CAAC,OAAO;AACvB,IAAA;IAEA,IAAIA,MAAAA,CAAOF,KAAW,EAAE;QACpB,IAAI,CAAC,OAAO,GAAGA,KAAAA;QACf,IAAI,CAACC,eAAe,CAAC,QAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIpB,QAAAA,GAAmB;QACnB,OAAO,IAAI,CAAC,SAAS;AACzB,IAAA;IAEA,IAAIA,QAAAA,CAASmB,KAAa,EAAE;QACxB,IAAI,CAAC,SAAS,GAAGA,KAAAA;QACjB,IAAI,CAACC,eAAe,CAAC,UAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIlB,cAAAA,GAAyB;QACzB,OAAO,IAAI,CAAC,eAAe;AAC/B,IAAA;IAEA,IAAIA,cAAAA,CAAeiB,KAAa,EAAE;QAC9B,IAAI,CAAC,eAAe,GAAGA,KAAAA;QACvB,IAAI,CAACC,eAAe,CAAC,gBAAA,CAAA;AACzB,IAAA;IAEA,OAAOE,GAAAA,CAAIC,aAA+C,EAA2G;AACjK,QAAA,OAAOC,WAA4ErB,8BAAAA,EAAgCoB,aAAAA,CAAAA;AACvH,IAAA;AACJ;;"}
@@ -0,0 +1,2 @@
1
+ export * from './SuggestComponentPropertyChange';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Giving/SuggestComponentPropertyChange/index.ts"],"names":[],"mappings":"AAGA,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './SuggestComponentPropertyChange';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Giving/SuggestComponentPropertyChange/index.ts"],"names":[],"mappings":"AAGA,cAAc,kCAAkC,CAAC"}