@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.
- package/Availability/NotesAvailability.ts +59 -0
- package/Availability/index.ts +4 -0
- package/Contracts/Components/PickedComponent.ts +43 -0
- package/Contracts/Components/index.ts +4 -0
- package/Contracts/Context/NoteContext.ts +58 -0
- package/Contracts/Context/NoteDialog.ts +25 -0
- package/Contracts/Context/NoteScreen.ts +30 -0
- package/Contracts/Context/index.ts +6 -0
- package/Contracts/Giving/NoteKind.ts +14 -0
- package/Contracts/Giving/index.ts +4 -0
- package/Contracts/Reporting/SliceLocation.ts +30 -0
- package/Contracts/Reporting/index.ts +4 -0
- package/Giving/GiveNoteOnComponent/GiveNoteOnComponent.ts +146 -0
- package/Giving/GiveNoteOnComponent/index.ts +4 -0
- package/Giving/GiveNoteOnContext/GiveNoteOnContext.ts +126 -0
- package/Giving/GiveNoteOnContext/index.ts +4 -0
- package/Giving/GiveNoteOnScreen/GiveNoteOnScreen.ts +126 -0
- package/Giving/GiveNoteOnScreen/index.ts +4 -0
- package/Giving/GiveNoteOnSlices/GiveNoteOnSlices.ts +145 -0
- package/Giving/GiveNoteOnSlices/index.ts +4 -0
- package/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.ts +164 -0
- package/Giving/SuggestComponentPropertyChange/index.ts +4 -0
- package/Listing/MyNote.ts +303 -0
- package/Listing/NoteStatus.ts +15 -0
- package/Listing/NoteTarget.ts +14 -0
- package/Listing/SuggestedPropertyChange.ts +30 -0
- package/Listing/index.ts +7 -0
- package/README.md +86 -2
- package/Withdrawing/WithdrawNote/WithdrawNote.ts +61 -0
- package/Withdrawing/WithdrawNote/index.ts +4 -0
- package/dist/cjs/Availability/NotesAvailability.d.ts +21 -0
- package/dist/cjs/Availability/NotesAvailability.d.ts.map +1 -0
- package/dist/cjs/Availability/NotesAvailability.js +66 -0
- package/dist/cjs/Availability/NotesAvailability.js.map +1 -0
- package/dist/cjs/Availability/index.d.ts +2 -0
- package/dist/cjs/Availability/index.d.ts.map +1 -0
- package/dist/cjs/Contracts/Components/PickedComponent.d.ts +9 -0
- package/dist/cjs/Contracts/Components/PickedComponent.d.ts.map +1 -0
- package/dist/cjs/Contracts/Components/PickedComponent.js +65 -0
- package/dist/cjs/Contracts/Components/PickedComponent.js.map +1 -0
- package/dist/cjs/Contracts/Components/index.d.ts +2 -0
- package/dist/cjs/Contracts/Components/index.d.ts.map +1 -0
- package/dist/cjs/Contracts/Context/NoteContext.d.ts +14 -0
- package/dist/cjs/Contracts/Context/NoteContext.d.ts.map +1 -0
- package/dist/cjs/Contracts/Context/NoteContext.js +81 -0
- package/dist/cjs/Contracts/Context/NoteContext.js.map +1 -0
- package/dist/cjs/Contracts/Context/NoteDialog.d.ts +6 -0
- package/dist/cjs/Contracts/Context/NoteDialog.d.ts.map +1 -0
- package/dist/cjs/Contracts/Context/NoteDialog.js +44 -0
- package/dist/cjs/Contracts/Context/NoteDialog.js.map +1 -0
- package/dist/cjs/Contracts/Context/NoteScreen.d.ts +6 -0
- package/dist/cjs/Contracts/Context/NoteScreen.d.ts.map +1 -0
- package/dist/cjs/Contracts/Context/NoteScreen.js +50 -0
- package/dist/cjs/Contracts/Context/NoteScreen.js.map +1 -0
- package/dist/cjs/Contracts/Context/index.d.ts +4 -0
- package/dist/cjs/Contracts/Context/index.d.ts.map +1 -0
- package/dist/cjs/Contracts/Giving/NoteKind.d.ts +7 -0
- package/dist/cjs/Contracts/Giving/NoteKind.d.ts.map +1 -0
- package/dist/cjs/Contracts/Giving/NoteKind.js +18 -0
- package/dist/cjs/Contracts/Giving/NoteKind.js.map +1 -0
- package/dist/cjs/Contracts/Giving/index.d.ts +2 -0
- package/dist/cjs/Contracts/Giving/index.d.ts.map +1 -0
- package/dist/cjs/Contracts/Reporting/SliceLocation.d.ts +6 -0
- package/dist/cjs/Contracts/Reporting/SliceLocation.d.ts.map +1 -0
- package/dist/cjs/Contracts/Reporting/SliceLocation.js +50 -0
- package/dist/cjs/Contracts/Reporting/SliceLocation.js.map +1 -0
- package/dist/cjs/Contracts/Reporting/index.d.ts +2 -0
- package/dist/cjs/Contracts/Reporting/index.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts +40 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js +101 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/index.d.ts +2 -0
- package/dist/cjs/Giving/GiveNoteOnComponent/index.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts +36 -0
- package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.js +88 -0
- package/dist/cjs/Giving/GiveNoteOnContext/GiveNoteOnContext.js.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnContext/index.d.ts +2 -0
- package/dist/cjs/Giving/GiveNoteOnContext/index.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts +36 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js +88 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/index.d.ts +2 -0
- package/dist/cjs/Giving/GiveNoteOnScreen/index.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts +40 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js +100 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js.map +1 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/index.d.ts +2 -0
- package/dist/cjs/Giving/GiveNoteOnSlices/index.d.ts.map +1 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts +42 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts.map +1 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js +113 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js.map +1 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/index.d.ts +2 -0
- package/dist/cjs/Giving/SuggestComponentPropertyChange/index.d.ts.map +1 -0
- package/dist/cjs/Listing/MyNote.d.ts +111 -0
- package/dist/cjs/Listing/MyNote.d.ts.map +1 -0
- package/dist/cjs/Listing/MyNote.js +315 -0
- package/dist/cjs/Listing/MyNote.js.map +1 -0
- package/dist/cjs/Listing/NoteStatus.d.ts +8 -0
- package/dist/cjs/Listing/NoteStatus.d.ts.map +1 -0
- package/dist/cjs/Listing/NoteStatus.js +19 -0
- package/dist/cjs/Listing/NoteStatus.js.map +1 -0
- package/dist/cjs/Listing/NoteTarget.d.ts +7 -0
- package/dist/cjs/Listing/NoteTarget.d.ts.map +1 -0
- package/dist/cjs/Listing/NoteTarget.js +18 -0
- package/dist/cjs/Listing/NoteTarget.js.map +1 -0
- package/dist/cjs/Listing/SuggestedPropertyChange.d.ts +6 -0
- package/dist/cjs/Listing/SuggestedPropertyChange.d.ts.map +1 -0
- package/dist/cjs/Listing/SuggestedPropertyChange.js +50 -0
- package/dist/cjs/Listing/SuggestedPropertyChange.js.map +1 -0
- package/dist/cjs/Listing/index.d.ts +5 -0
- package/dist/cjs/Listing/index.d.ts.map +1 -0
- package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.d.ts +21 -0
- package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.d.ts.map +1 -0
- package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.js +44 -0
- package/dist/cjs/Withdrawing/WithdrawNote/WithdrawNote.js.map +1 -0
- package/dist/cjs/Withdrawing/WithdrawNote/index.d.ts +2 -0
- package/dist/cjs/Withdrawing/WithdrawNote/index.d.ts.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/Availability/NotesAvailability.d.ts +21 -0
- package/dist/esm/Availability/NotesAvailability.d.ts.map +1 -0
- package/dist/esm/Availability/NotesAvailability.js +63 -0
- package/dist/esm/Availability/NotesAvailability.js.map +1 -0
- package/dist/esm/Availability/index.d.ts +2 -0
- package/dist/esm/Availability/index.d.ts.map +1 -0
- package/dist/esm/Availability/index.js +2 -0
- package/dist/esm/Availability/index.js.map +1 -0
- package/dist/esm/Contracts/Components/PickedComponent.d.ts +9 -0
- package/dist/esm/Contracts/Components/PickedComponent.d.ts.map +1 -0
- package/dist/esm/Contracts/Components/PickedComponent.js +63 -0
- package/dist/esm/Contracts/Components/PickedComponent.js.map +1 -0
- package/dist/esm/Contracts/Components/index.d.ts +2 -0
- package/dist/esm/Contracts/Components/index.d.ts.map +1 -0
- package/dist/esm/Contracts/Components/index.js +2 -0
- package/dist/esm/Contracts/Components/index.js.map +1 -0
- package/dist/esm/Contracts/Context/NoteContext.d.ts +14 -0
- package/dist/esm/Contracts/Context/NoteContext.d.ts.map +1 -0
- package/dist/esm/Contracts/Context/NoteContext.js +79 -0
- package/dist/esm/Contracts/Context/NoteContext.js.map +1 -0
- package/dist/esm/Contracts/Context/NoteDialog.d.ts +6 -0
- package/dist/esm/Contracts/Context/NoteDialog.d.ts.map +1 -0
- package/dist/esm/Contracts/Context/NoteDialog.js +42 -0
- package/dist/esm/Contracts/Context/NoteDialog.js.map +1 -0
- package/dist/esm/Contracts/Context/NoteScreen.d.ts +6 -0
- package/dist/esm/Contracts/Context/NoteScreen.d.ts.map +1 -0
- package/dist/esm/Contracts/Context/NoteScreen.js +48 -0
- package/dist/esm/Contracts/Context/NoteScreen.js.map +1 -0
- package/dist/esm/Contracts/Context/index.d.ts +4 -0
- package/dist/esm/Contracts/Context/index.d.ts.map +1 -0
- package/dist/esm/Contracts/Context/index.js +4 -0
- package/dist/esm/Contracts/Context/index.js.map +1 -0
- package/dist/esm/Contracts/Giving/NoteKind.d.ts +7 -0
- package/dist/esm/Contracts/Giving/NoteKind.d.ts.map +1 -0
- package/dist/esm/Contracts/Giving/NoteKind.js +16 -0
- package/dist/esm/Contracts/Giving/NoteKind.js.map +1 -0
- package/dist/esm/Contracts/Giving/index.d.ts +2 -0
- package/dist/esm/Contracts/Giving/index.d.ts.map +1 -0
- package/dist/esm/Contracts/Giving/index.js +2 -0
- package/dist/esm/Contracts/Giving/index.js.map +1 -0
- package/dist/esm/Contracts/Reporting/SliceLocation.d.ts +6 -0
- package/dist/esm/Contracts/Reporting/SliceLocation.d.ts.map +1 -0
- package/dist/esm/Contracts/Reporting/SliceLocation.js +48 -0
- package/dist/esm/Contracts/Reporting/SliceLocation.js.map +1 -0
- package/dist/esm/Contracts/Reporting/index.d.ts +2 -0
- package/dist/esm/Contracts/Reporting/index.d.ts.map +1 -0
- package/dist/esm/Contracts/Reporting/index.js +2 -0
- package/dist/esm/Contracts/Reporting/index.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts +40 -0
- package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js +98 -0
- package/dist/esm/Giving/GiveNoteOnComponent/GiveNoteOnComponent.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnComponent/index.d.ts +2 -0
- package/dist/esm/Giving/GiveNoteOnComponent/index.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnComponent/index.js +2 -0
- package/dist/esm/Giving/GiveNoteOnComponent/index.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts +36 -0
- package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.js +85 -0
- package/dist/esm/Giving/GiveNoteOnContext/GiveNoteOnContext.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnContext/index.d.ts +2 -0
- package/dist/esm/Giving/GiveNoteOnContext/index.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnContext/index.js +2 -0
- package/dist/esm/Giving/GiveNoteOnContext/index.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts +36 -0
- package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js +85 -0
- package/dist/esm/Giving/GiveNoteOnScreen/GiveNoteOnScreen.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnScreen/index.d.ts +2 -0
- package/dist/esm/Giving/GiveNoteOnScreen/index.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnScreen/index.js +2 -0
- package/dist/esm/Giving/GiveNoteOnScreen/index.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts +40 -0
- package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js +97 -0
- package/dist/esm/Giving/GiveNoteOnSlices/GiveNoteOnSlices.js.map +1 -0
- package/dist/esm/Giving/GiveNoteOnSlices/index.d.ts +2 -0
- package/dist/esm/Giving/GiveNoteOnSlices/index.d.ts.map +1 -0
- package/dist/esm/Giving/GiveNoteOnSlices/index.js +2 -0
- package/dist/esm/Giving/GiveNoteOnSlices/index.js.map +1 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts +42 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts.map +1 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js +110 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.js.map +1 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/index.d.ts +2 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/index.d.ts.map +1 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/index.js +2 -0
- package/dist/esm/Giving/SuggestComponentPropertyChange/index.js.map +1 -0
- package/dist/esm/Listing/MyNote.d.ts +111 -0
- package/dist/esm/Listing/MyNote.d.ts.map +1 -0
- package/dist/esm/Listing/MyNote.js +312 -0
- package/dist/esm/Listing/MyNote.js.map +1 -0
- package/dist/esm/Listing/NoteStatus.d.ts +8 -0
- package/dist/esm/Listing/NoteStatus.d.ts.map +1 -0
- package/dist/esm/Listing/NoteStatus.js +17 -0
- package/dist/esm/Listing/NoteStatus.js.map +1 -0
- package/dist/esm/Listing/NoteTarget.d.ts +7 -0
- package/dist/esm/Listing/NoteTarget.d.ts.map +1 -0
- package/dist/esm/Listing/NoteTarget.js +16 -0
- package/dist/esm/Listing/NoteTarget.js.map +1 -0
- package/dist/esm/Listing/SuggestedPropertyChange.d.ts +6 -0
- package/dist/esm/Listing/SuggestedPropertyChange.d.ts.map +1 -0
- package/dist/esm/Listing/SuggestedPropertyChange.js +48 -0
- package/dist/esm/Listing/SuggestedPropertyChange.js.map +1 -0
- package/dist/esm/Listing/index.d.ts +5 -0
- package/dist/esm/Listing/index.d.ts.map +1 -0
- package/dist/esm/Listing/index.js +5 -0
- package/dist/esm/Listing/index.js.map +1 -0
- package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.d.ts +21 -0
- package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.d.ts.map +1 -0
- package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.js +42 -0
- package/dist/esm/Withdrawing/WithdrawNote/WithdrawNote.js.map +1 -0
- package/dist/esm/Withdrawing/WithdrawNote/index.d.ts +2 -0
- package/dist/esm/Withdrawing/WithdrawNote/index.d.ts.map +1 -0
- package/dist/esm/Withdrawing/WithdrawNote/index.js +2 -0
- package/dist/esm/Withdrawing/WithdrawNote/index.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/index.ts +15 -0
- 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 IGiveNoteOnContext {
|
|
8
|
+
context?: NoteContext;
|
|
9
|
+
kind?: NoteKind;
|
|
10
|
+
noteId?: Guid;
|
|
11
|
+
text?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class GiveNoteOnContextValidator extends CommandValidator<IGiveNoteOnContext> {
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare class GiveNoteOnContext extends Command<IGiveNoteOnContext> implements IGiveNoteOnContext {
|
|
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?: IGiveNoteOnContext): [GiveNoteOnContext, SetCommandValues<IGiveNoteOnContext>, ClearCommandValues];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=GiveNoteOnContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiveNoteOnContext.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnContext/GiveNoteOnContext.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,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,MAAM,WAAW,kBAAkB;IAK/B,OAAO,CAAC,EAAE,WAAW,CAAC;IAKtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAKhB,MAAM,CAAC,EAAE,IAAI,CAAC;IAKd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,0BAA2B,SAAQ,gBAAgB,CAAC,kBAAkB,CAAC;;CAOnF;AAKD,qBAAa,iBAAkB,SAAQ,OAAO,CAAC,kBAAkB,CAAE,YAAW,kBAAkB;;IAC5F,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAA2D;IAC1G,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAsC;IAC5D,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAoC;IACzE,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,CAKhD;;IAWF,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAGhC;IAKD,IAAI,OAAO,IAAI,WAAW,CAEzB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAG7B;IAID,IAAI,IAAI,IAAI,QAAQ,CAEnB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,QAAQ,EAGvB;IAID,IAAI,MAAM,IAAI,IAAI,CAEjB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,IAAI,EAGrB;IAID,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAGrB;IAED,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,kBAAkB,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CAGhI"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commands = require('@cratis/arc/commands');
|
|
4
|
+
var commands$1 = require('@cratis/arc.react/commands');
|
|
5
|
+
var reflection = require('@cratis/arc/reflection');
|
|
6
|
+
var NoteContext = require('../../Contracts/Context/NoteContext.js');
|
|
7
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
8
|
+
|
|
9
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
10
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
11
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
12
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnContext.GiveNoteOnContext. Time: 2026-11-01T11:55:12.6707473Z. Hash: E16E92B294B3749B22A6EE3710E363A25997107CB34220EBC09AF9CE22B3EB6A
|
|
13
|
+
class GiveNoteOnContextValidator extends commands.CommandValidator {
|
|
14
|
+
constructor(){
|
|
15
|
+
super();
|
|
16
|
+
this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
|
|
17
|
+
this.ruleFor((c)=>c.text).notEmpty().withMessage('Write your note.');
|
|
18
|
+
this.ruleFor((c)=>c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The user gives feedback about what is on screen now: the default action of the feedback button. Who gives it is taken from the signed-in identity, never from the request.
|
|
23
|
+
*/ class GiveNoteOnContext extends commands.Command {
|
|
24
|
+
static sliceLocation = new reflection.SliceLocation('', 'Giving', 'GiveNoteOnContext');
|
|
25
|
+
route = '/api/giving/give-note-on-context';
|
|
26
|
+
validation = new GiveNoteOnContextValidator();
|
|
27
|
+
treatWarningsAsErrors = false;
|
|
28
|
+
roles = [];
|
|
29
|
+
propertyDescriptors = [
|
|
30
|
+
new reflection.PropertyDescriptor('context', NoteContext.NoteContext, false),
|
|
31
|
+
new reflection.PropertyDescriptor('kind', Number, false),
|
|
32
|
+
new reflection.PropertyDescriptor('noteId', fundamentals.Guid, false),
|
|
33
|
+
new reflection.PropertyDescriptor('text', String, false)
|
|
34
|
+
];
|
|
35
|
+
#context;
|
|
36
|
+
#kind;
|
|
37
|
+
#noteId;
|
|
38
|
+
#text;
|
|
39
|
+
constructor(){
|
|
40
|
+
super(Object, false);
|
|
41
|
+
}
|
|
42
|
+
get requestParameters() {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* What the user is looking at.
|
|
47
|
+
*/ get context() {
|
|
48
|
+
return this.#context;
|
|
49
|
+
}
|
|
50
|
+
set context(value) {
|
|
51
|
+
this.#context = value;
|
|
52
|
+
this.propertyChanged('context');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What kind of feedback it is.
|
|
56
|
+
*/ get kind() {
|
|
57
|
+
return this.#kind;
|
|
58
|
+
}
|
|
59
|
+
set kind(value) {
|
|
60
|
+
this.#kind = value;
|
|
61
|
+
this.propertyChanged('kind');
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The id of the new note, chosen by the caller so a retried command does not give a second note.
|
|
65
|
+
*/ get noteId() {
|
|
66
|
+
return this.#noteId;
|
|
67
|
+
}
|
|
68
|
+
set noteId(value) {
|
|
69
|
+
this.#noteId = value;
|
|
70
|
+
this.propertyChanged('noteId');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* What the user writes.
|
|
74
|
+
*/ get text() {
|
|
75
|
+
return this.#text;
|
|
76
|
+
}
|
|
77
|
+
set text(value) {
|
|
78
|
+
this.#text = value;
|
|
79
|
+
this.propertyChanged('text');
|
|
80
|
+
}
|
|
81
|
+
static use(initialValues) {
|
|
82
|
+
return commands$1.useCommand(GiveNoteOnContext, initialValues);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.GiveNoteOnContext = GiveNoteOnContext;
|
|
87
|
+
exports.GiveNoteOnContextValidator = GiveNoteOnContextValidator;
|
|
88
|
+
//# sourceMappingURL=GiveNoteOnContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiveNoteOnContext.js","sources":["../../../../Giving/GiveNoteOnContext/GiveNoteOnContext.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.GiveNoteOnContext.GiveNoteOnContext. Time: 2026-11-01T11:55:12.6707473Z. Hash: E16E92B294B3749B22A6EE3710E363A25997107CB34220EBC09AF9CE22B3EB6A\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 gives feedback about what is on screen now: the default action of the feedback button. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport interface IGiveNoteOnContext {\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 * What the user writes.\n */\n text?: string;\n}\n\nexport class GiveNoteOnContextValidator extends CommandValidator<IGiveNoteOnContext> {\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 gives feedback about what is on screen now: the default action of the feedback button. Who gives it is taken from the signed-in identity, never from the request.\n */\nexport class GiveNoteOnContext extends Command<IGiveNoteOnContext> implements IGiveNoteOnContext {\n static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Giving', 'GiveNoteOnContext');\n readonly route: string = '/api/giving/give-note-on-context';\n readonly validation: CommandValidator = new GiveNoteOnContextValidator();\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.\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?: IGiveNoteOnContext): [GiveNoteOnContext, SetCommandValues<IGiveNoteOnContext>, ClearCommandValues] {\n return useCommand<GiveNoteOnContext, IGiveNoteOnContext>(GiveNoteOnContext, initialValues);\n }\n}\n"],"names":["GiveNoteOnContextValidator","CommandValidator","ruleFor","c","context","notNull","withMessage","text","notEmpty","maxLength","GiveNoteOnContext","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,0BAAAA,SAAmCC,yBAAAA,CAAAA;IAC5C,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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;QAChB,IAAI,CAACC,eAAe,CAAC,SAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIC,IAAAA,GAAiB;QACjB,OAAO,IAAI,CAAC,KAAK;AACrB,IAAA;IAEA,IAAIA,IAAAA,CAAKF,KAAe,EAAE;QACtB,IAAI,CAAC,KAAK,GAAGA,KAAAA;QACb,IAAI,CAACC,eAAe,CAAC,MAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIE,MAAAA,GAAe;QACf,OAAO,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,aAAkC,EAAiF;AAC1H,QAAA,OAAOC,sBAAkDtB,iBAAAA,EAAmBqB,aAAAA,CAAAA;AAChF,IAAA;AACJ;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Giving/GiveNoteOnContext/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC"}
|
|
@@ -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;A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AAM,EAGrB;IAED,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CAG7H"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commands = require('@cratis/arc/commands');
|
|
4
|
+
var commands$1 = require('@cratis/arc.react/commands');
|
|
5
|
+
var reflection = require('@cratis/arc/reflection');
|
|
6
|
+
var NoteContext = require('../../Contracts/Context/NoteContext.js');
|
|
7
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
8
|
+
|
|
9
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
10
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
11
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
12
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnScreen.GiveNoteOnScreen. Time: 2026-11-01T11:55:12.6707473Z. Hash: 5895C65951697575A860A5815C6574C6765026C35F2CB1D5D70586CE3E0694D9
|
|
13
|
+
class GiveNoteOnScreenValidator extends commands.CommandValidator {
|
|
14
|
+
constructor(){
|
|
15
|
+
super();
|
|
16
|
+
this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
|
|
17
|
+
this.ruleFor((c)=>c.text).notEmpty().withMessage('Write your note.');
|
|
18
|
+
this.ruleFor((c)=>c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/ class GiveNoteOnScreen extends commands.Command {
|
|
24
|
+
static sliceLocation = new reflection.SliceLocation('', 'Giving', 'GiveNoteOnScreen');
|
|
25
|
+
route = '/api/giving/give-note-on-screen';
|
|
26
|
+
validation = new GiveNoteOnScreenValidator();
|
|
27
|
+
treatWarningsAsErrors = false;
|
|
28
|
+
roles = [];
|
|
29
|
+
propertyDescriptors = [
|
|
30
|
+
new reflection.PropertyDescriptor('context', NoteContext.NoteContext, false),
|
|
31
|
+
new reflection.PropertyDescriptor('kind', Number, false),
|
|
32
|
+
new reflection.PropertyDescriptor('noteId', fundamentals.Guid, false),
|
|
33
|
+
new reflection.PropertyDescriptor('text', String, false)
|
|
34
|
+
];
|
|
35
|
+
#context;
|
|
36
|
+
#kind;
|
|
37
|
+
#noteId;
|
|
38
|
+
#text;
|
|
39
|
+
constructor(){
|
|
40
|
+
super(Object, false);
|
|
41
|
+
}
|
|
42
|
+
get requestParameters() {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* What the user is looking at; its screen is the subject.
|
|
47
|
+
*/ get context() {
|
|
48
|
+
return this.#context;
|
|
49
|
+
}
|
|
50
|
+
set context(value) {
|
|
51
|
+
this.#context = value;
|
|
52
|
+
this.propertyChanged('context');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What kind of feedback it is.
|
|
56
|
+
*/ get kind() {
|
|
57
|
+
return this.#kind;
|
|
58
|
+
}
|
|
59
|
+
set kind(value) {
|
|
60
|
+
this.#kind = value;
|
|
61
|
+
this.propertyChanged('kind');
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The id of the new note, chosen by the caller so a retried command does not give a second note.
|
|
65
|
+
*/ get noteId() {
|
|
66
|
+
return this.#noteId;
|
|
67
|
+
}
|
|
68
|
+
set noteId(value) {
|
|
69
|
+
this.#noteId = value;
|
|
70
|
+
this.propertyChanged('noteId');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* What the user writes.
|
|
74
|
+
*/ get text() {
|
|
75
|
+
return this.#text;
|
|
76
|
+
}
|
|
77
|
+
set text(value) {
|
|
78
|
+
this.#text = value;
|
|
79
|
+
this.propertyChanged('text');
|
|
80
|
+
}
|
|
81
|
+
static use(initialValues) {
|
|
82
|
+
return commands$1.useCommand(GiveNoteOnScreen, initialValues);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.GiveNoteOnScreen = GiveNoteOnScreen;
|
|
87
|
+
exports.GiveNoteOnScreenValidator = GiveNoteOnScreenValidator;
|
|
88
|
+
//# 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,yBAAAA,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,gBAAAA,CAAAA;AAClC,IAAA,OAAgBC,aAAAA,GAAkC,IAAIC,wBAAAA,CAAiB,EAAA,EAAI,UAAU,kBAAA,CAAA;AAC5EC,IAAAA,KAAAA,GAAgB,iCAAA;AAChBC,IAAAA,UAAAA,GAA+B,IAAIf,yBAAAA,EAAAA;AACnCgB,IAAAA,qBAAAA,GAAiC,KAAA;AACjCC,IAAAA,KAAAA,GAAkB,EAAE;IACpBC,mBAAAA,GAA4C;QACjD,IAAIC,6BAAAA,CAAmB,WAAWC,uBAAAA,EAAa,KAAA,CAAA;QAC/C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AAA,CAAA;AACzB,IAAA;IAEA,OAAOG,GAAAA,CAAIC,aAAiC,EAA+E;AACvH,QAAA,OAAOC,sBAAgDtB,gBAAAA,EAAkBqB,aAAAA,CAAAA;AAC7E,IAAA;AACJ;;;"}
|
|
@@ -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,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,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,MAAM,WAAW,iBAAiB;IAK9B,OAAO,CAAC,EAAE,WAAW,CAAC;IAKtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAKhB,MAAM,CAAC,EAAE,IAAI,CAAC;IAKd,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IAKzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,yBAA0B,SAAQ,gBAAgB,CAAC,iBAAiB,CAAC;;CAOjF;AAKD,qBAAa,gBAAiB,SAAQ,OAAO,CAAC,iBAAiB,CAAE,YAAW,iBAAiB;;IACzF,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAA0D;IACzG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAqC;IAC3D,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAmC;IACxE,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,CAMhD;;IAYF,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAGhC;IAKD,IAAI,OAAO,IAAI,WAAW,CAEzB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAG7B;IAID,IAAI,IAAI,IAAI,QAAQ,CAEnB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,QAAQ,EAGvB;IAID,IAAI,MAAM,IAAI,IAAI,CAEjB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,IAAI,EAGrB;IAID,IAAI,MAAM,IAAI,aAAa,EAAE,CAE5B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,EAGhC;IAID,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAGrB;IAED,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CAG7H"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commands = require('@cratis/arc/commands');
|
|
4
|
+
var commands$1 = require('@cratis/arc.react/commands');
|
|
5
|
+
var reflection = require('@cratis/arc/reflection');
|
|
6
|
+
var NoteContext = require('../../Contracts/Context/NoteContext.js');
|
|
7
|
+
var SliceLocation = require('../../Contracts/Reporting/SliceLocation.js');
|
|
8
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
9
|
+
|
|
10
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
11
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
12
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
13
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Notes.Giving.GiveNoteOnSlices.GiveNoteOnSlices. Time: 2026-11-01T11:55:12.6707473Z. Hash: 381D70328152C05B79679400BC7A4138C7D19582BF2635CC3A6B39553A105A06
|
|
14
|
+
class GiveNoteOnSlicesValidator extends commands.CommandValidator {
|
|
15
|
+
constructor(){
|
|
16
|
+
super();
|
|
17
|
+
this.ruleFor((c)=>c.context).notNull().withMessage('A note needs to know what you were looking at.');
|
|
18
|
+
this.ruleFor((c)=>c.text).notEmpty().withMessage('Write your note.');
|
|
19
|
+
this.ruleFor((c)=>c.text).maxLength(4000).withMessage('Keep the note within 4000 characters.');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 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.
|
|
24
|
+
*/ class GiveNoteOnSlices extends commands.Command {
|
|
25
|
+
static sliceLocation = new reflection.SliceLocation('', 'Giving', 'GiveNoteOnSlices');
|
|
26
|
+
route = '/api/giving/give-note-on-slices';
|
|
27
|
+
validation = new GiveNoteOnSlicesValidator();
|
|
28
|
+
treatWarningsAsErrors = false;
|
|
29
|
+
roles = [];
|
|
30
|
+
propertyDescriptors = [
|
|
31
|
+
new reflection.PropertyDescriptor('context', NoteContext.NoteContext, false),
|
|
32
|
+
new reflection.PropertyDescriptor('kind', Number, false),
|
|
33
|
+
new reflection.PropertyDescriptor('noteId', fundamentals.Guid, false),
|
|
34
|
+
new reflection.PropertyDescriptor('slices', SliceLocation.SliceLocation, false),
|
|
35
|
+
new reflection.PropertyDescriptor('text', String, false)
|
|
36
|
+
];
|
|
37
|
+
#context;
|
|
38
|
+
#kind;
|
|
39
|
+
#noteId;
|
|
40
|
+
#slices;
|
|
41
|
+
#text;
|
|
42
|
+
constructor(){
|
|
43
|
+
super(Object, false);
|
|
44
|
+
}
|
|
45
|
+
get requestParameters() {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* What the user is looking at.
|
|
50
|
+
*/ get context() {
|
|
51
|
+
return this.#context;
|
|
52
|
+
}
|
|
53
|
+
set context(value) {
|
|
54
|
+
this.#context = value;
|
|
55
|
+
this.propertyChanged('context');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What kind of feedback it is.
|
|
59
|
+
*/ get kind() {
|
|
60
|
+
return this.#kind;
|
|
61
|
+
}
|
|
62
|
+
set kind(value) {
|
|
63
|
+
this.#kind = value;
|
|
64
|
+
this.propertyChanged('kind');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The id of the new note, chosen by the caller so a retried command does not give a second note.
|
|
68
|
+
*/ get noteId() {
|
|
69
|
+
return this.#noteId;
|
|
70
|
+
}
|
|
71
|
+
set noteId(value) {
|
|
72
|
+
this.#noteId = value;
|
|
73
|
+
this.propertyChanged('noteId');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The slices the user picked; at least one.
|
|
77
|
+
*/ get slices() {
|
|
78
|
+
return this.#slices;
|
|
79
|
+
}
|
|
80
|
+
set slices(value) {
|
|
81
|
+
this.#slices = value;
|
|
82
|
+
this.propertyChanged('slices');
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* What the user writes.
|
|
86
|
+
*/ get text() {
|
|
87
|
+
return this.#text;
|
|
88
|
+
}
|
|
89
|
+
set text(value) {
|
|
90
|
+
this.#text = value;
|
|
91
|
+
this.propertyChanged('text');
|
|
92
|
+
}
|
|
93
|
+
static use(initialValues) {
|
|
94
|
+
return commands$1.useCommand(GiveNoteOnSlices, initialValues);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
exports.GiveNoteOnSlices = GiveNoteOnSlices;
|
|
99
|
+
exports.GiveNoteOnSlicesValidator = GiveNoteOnSlicesValidator;
|
|
100
|
+
//# 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,yBAAAA,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,gBAAAA,CAAAA;AAClC,IAAA,OAAgBC,aAAAA,GAAkC,IAAIC,wBAAAA,CAAiB,EAAA,EAAI,UAAU,kBAAA,CAAA;AAC5EC,IAAAA,KAAAA,GAAgB,iCAAA;AAChBC,IAAAA,UAAAA,GAA+B,IAAIf,yBAA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AGA,KAAAA;QACf,IAAI,CAACC,eAAe,CAAC,QAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIG,MAAAA,GAA0B;QAC1B,OAAO,IAAI,CAAC,OAAO;AACvB,IAAA;IAEA,IAAIA,MAAAA,CAAOJ,KAAsB,EAAE;QAC/B,IAAI,CAAC,OAAO,GAAGA,KAAAA;QACf,IAAI,CAACC,eAAe,CAAC,QAAA,CAAA;AACzB,IAAA;AACA;;AAEC,QACD,IAAIrB,IAAAA,GAAe;QACf,OAAO,IAAI,CAAC,KAAK;AACrB,IAAA;IAEA,IAAIA,IAAAA,CAAKoB,KAAa,EAAE;QACpB,IAAI,CAAC,KAAK,GAAGA,KAAAA;QACb,IAAI,CAACC,eAAe,CAAC,MAAA,CAAA;AACzB,IAAA;IAEA,OAAOI,GAAAA,CAAIC,aAAiC,EAA+E;AACvH,QAAA,OAAOC,sBAAgDxB,gBAAAA,EAAkBuB,aAAAA,CAAAA;AAC7E,IAAA;AACJ;;;"}
|
|
@@ -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,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
|
package/dist/cjs/Giving/SuggestComponentPropertyChange/SuggestComponentPropertyChange.d.ts.map
ADDED
|
@@ -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,E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