@flarehr/apollo-workplace-policies 0.1.810 → 0.1.812

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 (43) hide show
  1. package/README.md +8 -0
  2. package/dist/App.jsx +32 -0
  3. package/dist/BackendService.jsx +84 -0
  4. package/dist/Common/Assets.jsx +88 -0
  5. package/dist/Common/EventNotificationService.jsx +13 -0
  6. package/dist/Common/PreactCustomElement.jsx +11 -0
  7. package/dist/Common/ReactPdf.jsx +93 -0
  8. package/dist/Common/Tailwind.jsx +6 -0
  9. package/dist/Components/MainPage.jsx +38 -0
  10. package/dist/Components/PdfDocument.jsx +15 -0
  11. package/dist/Components/PolicyCard.jsx +19 -0
  12. package/dist/Components/ReviewPolicyPage.jsx +7 -0
  13. package/dist/Components/UnableToLoadPdf.jsx +5 -0
  14. package/dist/Types.jsx +208 -0
  15. package/dist/WorkplacePolicies.Api.Shared/AdminApiModels.jsx +78 -0
  16. package/dist/WorkplacePolicies.Api.Shared/BackendApiModels.jsx +213 -0
  17. package/dist/WorkplacePolicies.Api.Shared/Common.jsx +113 -0
  18. package/dist/WorkplacePolicies.Api.Shared/ExternalApiModels.jsx +92 -0
  19. package/dist/WorkplacePolicies.Domain/Audit.jsx +113 -0
  20. package/dist/WorkplacePolicies.Domain/Core.jsx +367 -0
  21. package/dist/WorkplacePolicies.Domain/JwtPayload.jsx +67 -0
  22. package/dist/WorkplacePolicies.Domain/Policy/CommandHandler.jsx +184 -0
  23. package/dist/WorkplacePolicies.Domain/Policy/Policy.jsx +483 -0
  24. package/dist/WorkplacePolicies.Domain/PolicyReview/CommandHandler.jsx +54 -0
  25. package/dist/WorkplacePolicies.Domain/PolicyReview/PolicyReview.jsx +250 -0
  26. package/dist/WorkplacePolicies.Domain/PolicyReviewConfig/CommandHandler.jsx +85 -0
  27. package/dist/WorkplacePolicies.Domain/PolicyReviewConfig/PolicyReviewConfig.jsx +115 -0
  28. package/dist/WorkplacePolicies.Domain/Shared.jsx +76 -0
  29. package/package.json +1 -1
  30. package/dist/assets/check-a011ef96.svg +0 -11
  31. package/dist/assets/chevron-left-415016d1.svg +0 -3
  32. package/dist/assets/chevron-right-2de1bd87.svg +0 -3
  33. package/dist/assets/download-1856c0b5.svg +0 -3
  34. package/dist/assets/file-no-access-68674cf8.svg +0 -9
  35. package/dist/assets/folder-xmark-819e5e60.svg +0 -3
  36. package/dist/assets/launch-bd615c2a.svg +0 -3
  37. package/dist/assets/loader-00de789e.svg +0 -6
  38. package/dist/assets/menu-93ff0f08.svg +0 -3
  39. package/dist/assets/minus-5d7353d0.svg +0 -3
  40. package/dist/assets/pdf.worker.min-feabdf30.js +0 -22
  41. package/dist/assets/plus-d22c349b.svg +0 -3
  42. package/dist/index.html +0 -42
  43. package/dist/workplace-policies.js +0 -9
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # Getting Started
2
+
3
+ ```bash
4
+ npm i
5
+ npm start
6
+ ```
7
+
8
+ Obtain an autodev Workflows access token (e.g. from Partner App) and add it to `index.html`.
package/dist/App.jsx ADDED
@@ -0,0 +1,32 @@
1
+ import { Union } from "./fable_modules/fable-library.4.0.4/Types.js";
2
+ import { union_type, option_type, class_type } from "./fable_modules/fable-library.4.0.4/Reflection.js";
3
+ import { BackendService_$ctor_Z384F8060 } from "./BackendService.jsx";
4
+ import { register } from "./Common/PreactCustomElement.jsx";
5
+
6
+ export class PdfModuleStatus extends Union {
7
+ constructor(tag, fields) {
8
+ super();
9
+ this.tag = tag;
10
+ this.fields = fields;
11
+ }
12
+ cases() {
13
+ return ["Loading", "Loaded"];
14
+ }
15
+ }
16
+
17
+ export function PdfModuleStatus$reflection() {
18
+ return union_type("WorkplacePolicies.UI.App.PdfModuleStatus", [], PdfModuleStatus, () => [[], [["Item", option_type(class_type("WorkplacePolicies.UI.Common.ReactPdf.IReactPdf"))]]]);
19
+ }
20
+
21
+ export function Component(props) {
22
+ let patternInput;
23
+ const backendService = BackendService_$ctor_Z384F8060(props.backendUrl, props.accessToken);
24
+ throw 1;
25
+ let patternInput_1;
26
+ throw 1;
27
+ throw 1;
28
+ throw 1;
29
+ }
30
+
31
+ register(Component, "apollo-workplace-policies-app");
32
+
@@ -0,0 +1,84 @@
1
+ import { Union } from "./fable_modules/fable-library.4.0.4/Types.js";
2
+ import { CommandRequest, InitResponseError$reflection, InitResponse$reflection } from "./WorkplacePolicies.Api.Shared/BackendApiModels.jsx";
3
+ import { class_type, union_type } from "./fable_modules/fable-library.4.0.4/Reflection.js";
4
+ import { singleton } from "./fable_modules/fable-library.4.0.4/AsyncBuilder.js";
5
+ import { FSharpResult$2 } from "./fable_modules/fable-library.4.0.4/Choice.js";
6
+
7
+ export class GetInitStateResult extends Union {
8
+ constructor(tag, fields) {
9
+ super();
10
+ this.tag = tag;
11
+ this.fields = fields;
12
+ }
13
+ cases() {
14
+ return ["Success", "Failure"];
15
+ }
16
+ }
17
+
18
+ export function GetInitStateResult$reflection() {
19
+ return union_type("WorkplacePolicies.UI.GetInitStateResult", [], GetInitStateResult, () => [[["Item", InitResponse$reflection()]], [["Item", InitResponseError$reflection()]]]);
20
+ }
21
+
22
+ export class BackendService {
23
+ constructor(backendUrl, accessToken) {
24
+ }
25
+ }
26
+
27
+ export function BackendService$reflection() {
28
+ return class_type("WorkplacePolicies.UI.BackendService", void 0, BackendService);
29
+ }
30
+
31
+ export function BackendService_$ctor_Z384F8060(backendUrl, accessToken) {
32
+ return new BackendService(backendUrl, accessToken);
33
+ }
34
+
35
+ export function BackendService__GetInitState(_) {
36
+ return singleton.Delay(() => singleton.Bind((() => {
37
+ throw 1;
38
+ })()((() => {
39
+ throw 1;
40
+ })()((() => {
41
+ throw 1;
42
+ })()((() => {
43
+ throw 1;
44
+ })()))), (_arg) => {
45
+ let json, json_2;
46
+ return ((() => {
47
+ throw 1;
48
+ })() === 200) ? singleton.Return((() => {
49
+ throw 1;
50
+ })()((json = (() => {
51
+ throw 1;
52
+ })(), (() => {
53
+ throw 1;
54
+ })()))) : singleton.Return((() => {
55
+ throw 1;
56
+ })()((json_2 = (() => {
57
+ throw 1;
58
+ })(), (() => {
59
+ throw 1;
60
+ })())));
61
+ }));
62
+ }
63
+
64
+ export function BackendService__SendCommand_Z3B2D738(_, cmd) {
65
+ return singleton.Delay(() => {
66
+ const payload = new CommandRequest(cmd);
67
+ return singleton.Bind((() => {
68
+ throw 1;
69
+ })()((() => {
70
+ throw 1;
71
+ })()((() => {
72
+ throw 1;
73
+ })()((() => {
74
+ throw 1;
75
+ })()((() => {
76
+ throw 1;
77
+ })()((() => {
78
+ throw 1;
79
+ })()))))), (_arg) => (((() => {
80
+ throw 1;
81
+ })() === 200) ? singleton.Return(new FSharpResult$2(0, [void 0])) : singleton.Return(new FSharpResult$2(1, ["Command request error"]))));
82
+ });
83
+ }
84
+
@@ -0,0 +1,88 @@
1
+ import { Union } from "../fable_modules/fable-library.4.0.4/Types.js";
2
+ import { union_type, string_type, int32_type } from "../fable_modules/fable-library.4.0.4/Reflection.js";
3
+
4
+ export class Prop extends Union {
5
+ constructor(tag, fields) {
6
+ super();
7
+ this.tag = tag;
8
+ this.fields = fields;
9
+ }
10
+ cases() {
11
+ return ["Height", "Width", "ClassName"];
12
+ }
13
+ }
14
+
15
+ export function Prop$reflection() {
16
+ return union_type("WorkplacePolicies.UI.Common.Assets.Svg.Prop", [], Prop, () => [[["Item", int32_type]], [["Item", int32_type]], [["Item", string_type]]]);
17
+ }
18
+
19
+ function importSvg(svg, props) {
20
+ throw 1;
21
+ }
22
+
23
+ export function check(props) {
24
+ return importSvg((() => {
25
+ throw 1;
26
+ })(), props);
27
+ }
28
+
29
+ export function chevronLeft(props) {
30
+ return importSvg((() => {
31
+ throw 1;
32
+ })(), props);
33
+ }
34
+
35
+ export function chevronRight(props) {
36
+ return importSvg((() => {
37
+ throw 1;
38
+ })(), props);
39
+ }
40
+
41
+ export function download(props) {
42
+ return importSvg((() => {
43
+ throw 1;
44
+ })(), props);
45
+ }
46
+
47
+ export function fileNoAccess(props) {
48
+ return importSvg((() => {
49
+ throw 1;
50
+ })(), props);
51
+ }
52
+
53
+ export function folderXmark(props) {
54
+ return importSvg((() => {
55
+ throw 1;
56
+ })(), props);
57
+ }
58
+
59
+ export function launch(props) {
60
+ return importSvg((() => {
61
+ throw 1;
62
+ })(), props);
63
+ }
64
+
65
+ export function loader(props) {
66
+ return importSvg((() => {
67
+ throw 1;
68
+ })(), props);
69
+ }
70
+
71
+ export function menu(props) {
72
+ return importSvg((() => {
73
+ throw 1;
74
+ })(), props);
75
+ }
76
+
77
+ export function minus(props) {
78
+ return importSvg((() => {
79
+ throw 1;
80
+ })(), props);
81
+ }
82
+
83
+ export function plus(props) {
84
+ return importSvg((() => {
85
+ throw 1;
86
+ })(), props);
87
+ }
88
+
@@ -0,0 +1,13 @@
1
+
2
+ function createCustomEvent(name, options) {
3
+ throw 1;
4
+ }
5
+
6
+ export function notifyCompletion(webComponent) {
7
+ (() => {
8
+ throw 1;
9
+ })()(createCustomEvent("step-completion", {
10
+ bubbles: true,
11
+ }));
12
+ }
13
+
@@ -0,0 +1,11 @@
1
+
2
+ function registerInternal(input_, input__1, input__2, input__3) {
3
+ throw 1;
4
+ }
5
+
6
+ export function register(reactComponent, tagName) {
7
+ registerInternal(reactComponent, tagName, void 0, {
8
+ shadow: true,
9
+ });
10
+ }
11
+
@@ -0,0 +1,93 @@
1
+ import { startImmediate } from "../fable_modules/fable-library.4.0.4/Async.js";
2
+ import { singleton } from "../fable_modules/fable-library.4.0.4/AsyncBuilder.js";
3
+ import { Union, toString } from "../fable_modules/fable-library.4.0.4/Types.js";
4
+ import { float64_type, union_type, obj_type, lambda_type, unit_type, anonRecord_type, int32_type, string_type } from "../fable_modules/fable-library.4.0.4/Reflection.js";
5
+
6
+ const reactPdf = (() => {
7
+ throw 1;
8
+ })();
9
+
10
+ function createURL(url) {
11
+ throw 1;
12
+ }
13
+
14
+ export function startImport(onSuccessHandler, onErrorHandler) {
15
+ startImmediate(singleton.Delay(() => singleton.TryWith(singleton.Delay(() => singleton.Bind((() => {
16
+ throw 1;
17
+ })()(reactPdf), (_arg) => {
18
+ throw 1;
19
+ onSuccessHandler(_arg);
20
+ return singleton.Zero();
21
+ })), (_arg_1) => {
22
+ onErrorHandler();
23
+ return singleton.Zero();
24
+ })));
25
+ }
26
+
27
+ const PdfCss_textLayer = toString((() => {
28
+ throw 1;
29
+ })());
30
+
31
+ const PdfCss_annotationLayer = toString((() => {
32
+ throw 1;
33
+ })());
34
+
35
+ export const PdfCss_all = PdfCss_textLayer + PdfCss_annotationLayer;
36
+
37
+ export class Document_Prop extends Union {
38
+ constructor(tag, fields) {
39
+ super();
40
+ this.tag = tag;
41
+ this.fields = fields;
42
+ }
43
+ cases() {
44
+ return ["File", "OnLoadSuccess", "ClassName", "OnItemClick", "Children"];
45
+ }
46
+ }
47
+
48
+ export function Document_Prop$reflection() {
49
+ return union_type("WorkplacePolicies.UI.Common.ReactPdf.Document.Prop", [], Document_Prop, () => [[["Item", string_type]], [["Item", lambda_type(anonRecord_type(["numPages", int32_type]), unit_type)]], [["Item", string_type]], [["Item", lambda_type(anonRecord_type(["pageNumber", int32_type]), unit_type)]], [["Item", obj_type]]]);
50
+ }
51
+
52
+ export function Document_Component(reactPdf_1, props) {
53
+ throw 1;
54
+ }
55
+
56
+ export class Page_Prop extends Union {
57
+ constructor(tag, fields) {
58
+ super();
59
+ this.tag = tag;
60
+ this.fields = fields;
61
+ }
62
+ cases() {
63
+ return ["PageNumber", "Width"];
64
+ }
65
+ }
66
+
67
+ export function Page_Prop$reflection() {
68
+ return union_type("WorkplacePolicies.UI.Common.ReactPdf.Page.Prop", [], Page_Prop, () => [[["Item", int32_type]], [["Item", float64_type]]]);
69
+ }
70
+
71
+ export function Page_Component(reactPdf_1, props) {
72
+ throw 1;
73
+ }
74
+
75
+ export class Thumbnail_Prop extends Union {
76
+ constructor(tag, fields) {
77
+ super();
78
+ this.tag = tag;
79
+ this.fields = fields;
80
+ }
81
+ cases() {
82
+ return ["Key", "PageNumber", "Width"];
83
+ }
84
+ }
85
+
86
+ export function Thumbnail_Prop$reflection() {
87
+ return union_type("WorkplacePolicies.UI.Common.ReactPdf.Thumbnail.Prop", [], Thumbnail_Prop, () => [[["Item", string_type]], [["Item", int32_type]], [["Item", float64_type]]]);
88
+ }
89
+
90
+ export function Thumbnail_Component(reactPdf_1, props) {
91
+ throw 1;
92
+ }
93
+
@@ -0,0 +1,6 @@
1
+ import { toString } from "../fable_modules/fable-library.4.0.4/Types.js";
2
+
3
+ export const css = toString((() => {
4
+ throw 1;
5
+ })());
6
+
@@ -0,0 +1,38 @@
1
+ import { ofArray, forAll } from "../fable_modules/fable-library.4.0.4/List.js";
2
+ import { equals } from "../fable_modules/fable-library.4.0.4/Util.js";
3
+ import { PolicyReviewItemStatusDto } from "../WorkplacePolicies.Api.Shared/BackendApiModels.jsx";
4
+
5
+ function canContinue(policyReviewItemList) {
6
+ return forAll((item) => equals(item.Status, new PolicyReviewItemStatusDto(2, [])), policyReviewItemList);
7
+ }
8
+
9
+ function title(text) {
10
+ throw 1;
11
+ }
12
+
13
+ function container(children) {
14
+ throw 1;
15
+ }
16
+
17
+ export function noPoliciesConfigured(dispatch) {
18
+ return container(ofArray([(() => {
19
+ throw 1;
20
+ })(), title("No statements available"), (() => {
21
+ throw 1;
22
+ })(), (() => {
23
+ throw 1;
24
+ })()]));
25
+ }
26
+
27
+ export function Component(policyReviewItemList, continueStatus, dispatch) {
28
+ return container(ofArray([title("Employment information statements"), (() => {
29
+ throw 1;
30
+ })(), (() => {
31
+ throw 1;
32
+ })(), (() => {
33
+ throw 1;
34
+ })(), (() => {
35
+ throw 1;
36
+ })()]));
37
+ }
38
+
@@ -0,0 +1,15 @@
1
+
2
+ export function Component(reactPdf, file) {
3
+ let patternInput;
4
+ throw 1;
5
+ let patternInput_1;
6
+ throw 1;
7
+ let patternInput_2;
8
+ throw 1;
9
+ let patternInput_3;
10
+ throw 1;
11
+ let containerRef;
12
+ throw 1;
13
+ throw 1;
14
+ }
15
+
@@ -0,0 +1,19 @@
1
+ import { equals } from "../fable_modules/fable-library.4.0.4/Util.js";
2
+ import { PolicyReviewItemStatusDto } from "../WorkplacePolicies.Api.Shared/BackendApiModels.jsx";
3
+
4
+ function getKey(policyIdentifier) {
5
+ if (policyIdentifier.PolicyType.tag === 1) {
6
+ return `${policyIdentifier.PolicyId}-C`;
7
+ }
8
+ else {
9
+ return `${policyIdentifier.PolicyId}-I`;
10
+ }
11
+ }
12
+
13
+ export function Component(dispatch, item) {
14
+ let patternInput;
15
+ throw 1;
16
+ const isAccepted = equals(item.Status, new PolicyReviewItemStatusDto(2, []));
17
+ throw 1;
18
+ }
19
+
@@ -0,0 +1,7 @@
1
+
2
+ export function Component(policyReviewItem, acceptPolicyStatus, reactPdf, dispatch) {
3
+ let patternInput;
4
+ throw 1;
5
+ throw 1;
6
+ }
7
+
@@ -0,0 +1,5 @@
1
+
2
+ export function Component(file) {
3
+ throw 1;
4
+ }
5
+
package/dist/Types.jsx ADDED
@@ -0,0 +1,208 @@
1
+ import { Record, Union } from "./fable_modules/fable-library.4.0.4/Types.js";
2
+ import { unit_type, string_type, record_type, obj_type, list_type, union_type } from "./fable_modules/fable-library.4.0.4/Reflection.js";
3
+ import { PolicyReviewItemDto, PolicyReviewItemStatusDto, PolicyReviewItemStatusDto__ToNextStatus_468E0CC, CommandTypeDto, PolicyReviewItemDto$reflection } from "./WorkplacePolicies.Api.Shared/BackendApiModels.jsx";
4
+ import { GetInitStateResult$reflection } from "./BackendService.jsx";
5
+ import { FSharpResult$2 } from "./fable_modules/fable-library.4.0.4/Choice.js";
6
+ import { map, empty } from "./fable_modules/fable-library.4.0.4/List.js";
7
+ import { equals } from "./fable_modules/fable-library.4.0.4/Util.js";
8
+ import { notifyCompletion } from "./Common/EventNotificationService.jsx";
9
+
10
+ export class AsyncOperationStatus$1 extends Union {
11
+ constructor(tag, fields) {
12
+ super();
13
+ this.tag = tag;
14
+ this.fields = fields;
15
+ }
16
+ cases() {
17
+ return ["Requested", "Finished"];
18
+ }
19
+ }
20
+
21
+ export function AsyncOperationStatus$1$reflection(gen0) {
22
+ return union_type("WorkplacePolicies.UI.Types.AsyncOperationStatus`1", [gen0], AsyncOperationStatus$1, () => [[], [["Item", gen0]]]);
23
+ }
24
+
25
+ export class Page extends Union {
26
+ constructor(tag, fields) {
27
+ super();
28
+ this.tag = tag;
29
+ this.fields = fields;
30
+ }
31
+ cases() {
32
+ return ["Main", "ReviewPolicy"];
33
+ }
34
+ }
35
+
36
+ export function Page$reflection() {
37
+ return union_type("WorkplacePolicies.UI.Types.Page", [], Page, () => [[], [["Item", PolicyReviewItemDto$reflection()]]]);
38
+ }
39
+
40
+ export class State extends Record {
41
+ constructor(Page, ReviewItemList, GetInitStateStatus, PresentPoliciesStatus, OpenPolicyStatus, AcceptPolicyStatus, ContinueStatus) {
42
+ super();
43
+ this.Page = Page;
44
+ this.ReviewItemList = ReviewItemList;
45
+ this.GetInitStateStatus = GetInitStateStatus;
46
+ this.PresentPoliciesStatus = PresentPoliciesStatus;
47
+ this.OpenPolicyStatus = OpenPolicyStatus;
48
+ this.AcceptPolicyStatus = AcceptPolicyStatus;
49
+ this.ContinueStatus = ContinueStatus;
50
+ }
51
+ }
52
+
53
+ export function State$reflection() {
54
+ return record_type("WorkplacePolicies.UI.Types.State", [], State, () => [["Page", Page$reflection()], ["ReviewItemList", list_type(PolicyReviewItemDto$reflection())], ["GetInitStateStatus", obj_type], ["PresentPoliciesStatus", obj_type], ["OpenPolicyStatus", obj_type], ["AcceptPolicyStatus", obj_type], ["ContinueStatus", obj_type]]);
55
+ }
56
+
57
+ export class Msg extends Union {
58
+ constructor(tag, fields) {
59
+ super();
60
+ this.tag = tag;
61
+ this.fields = fields;
62
+ }
63
+ cases() {
64
+ return ["FetchReviewItemList", "NavigatePage", "PresentPolicies", "OpenPolicy", "AcceptPolicy", "Continue", "NotifyCompletion"];
65
+ }
66
+ }
67
+
68
+ export function Msg$reflection() {
69
+ return union_type("WorkplacePolicies.UI.Types.Msg", [], Msg, () => [[["Item", AsyncOperationStatus$1$reflection(union_type("Microsoft.FSharp.Core.FSharpResult`2", [GetInitStateResult$reflection(), string_type], FSharpResult$2, () => [[["ResultValue", GetInitStateResult$reflection()]], [["ErrorValue", string_type]]]))]], [["Item", Page$reflection()]], [["Item1", list_type(PolicyReviewItemDto$reflection())], ["Item2", AsyncOperationStatus$1$reflection(union_type("Microsoft.FSharp.Core.FSharpResult`2", [unit_type, string_type], FSharpResult$2, () => [[["ResultValue", unit_type]], [["ErrorValue", string_type]]]))]], [["Item1", PolicyReviewItemDto$reflection()], ["Item2", AsyncOperationStatus$1$reflection(union_type("Microsoft.FSharp.Core.FSharpResult`2", [unit_type, string_type], FSharpResult$2, () => [[["ResultValue", unit_type]], [["ErrorValue", string_type]]]))]], [["Item1", PolicyReviewItemDto$reflection()], ["Item2", AsyncOperationStatus$1$reflection(union_type("Microsoft.FSharp.Core.FSharpResult`2", [unit_type, string_type], FSharpResult$2, () => [[["ResultValue", unit_type]], [["ErrorValue", string_type]]]))]], [["Item1", list_type(PolicyReviewItemDto$reflection())], ["Item2", AsyncOperationStatus$1$reflection(union_type("Microsoft.FSharp.Core.FSharpResult`2", [unit_type, string_type], FSharpResult$2, () => [[["ResultValue", unit_type]], [["ErrorValue", string_type]]]))]], []]);
70
+ }
71
+
72
+ export function StateModule_init() {
73
+ return [new State(new Page(0, []), empty(), (() => {
74
+ throw 1;
75
+ })(), (() => {
76
+ throw 1;
77
+ })(), (() => {
78
+ throw 1;
79
+ })(), (() => {
80
+ throw 1;
81
+ })(), (() => {
82
+ throw 1;
83
+ })()), (() => {
84
+ throw 1;
85
+ })()];
86
+ }
87
+
88
+ export function StateModule_update(backendService, msg, state) {
89
+ let matchValue, item_2, GetInitStateStatus_1;
90
+ if (msg.tag === 1) {
91
+ return [new State(msg.fields[0], state.ReviewItemList, state.GetInitStateStatus, state.PresentPoliciesStatus, state.OpenPolicyStatus, (() => {
92
+ throw 1;
93
+ })(), state.ContinueStatus), (msg.fields[0].tag === 1) ? (() => {
94
+ throw 1;
95
+ })() : (() => {
96
+ throw 1;
97
+ })()];
98
+ }
99
+ else if (msg.tag === 2) {
100
+ if (msg.fields[1].tag === 1) {
101
+ return [new State(state.Page, state.ReviewItemList, state.GetInitStateStatus, (() => {
102
+ throw 1;
103
+ })(), state.OpenPolicyStatus, state.AcceptPolicyStatus, state.ContinueStatus), (() => {
104
+ throw 1;
105
+ })()];
106
+ }
107
+ else {
108
+ const payload = new CommandTypeDto(0, [{
109
+ PolicyIdentifierList: map((p_1) => p_1.Policy.Identifier, msg.fields[0]),
110
+ }]);
111
+ return [new State(state.Page, state.ReviewItemList, state.GetInitStateStatus, (() => {
112
+ throw 1;
113
+ })(), state.OpenPolicyStatus, state.AcceptPolicyStatus, state.ContinueStatus), (() => {
114
+ throw 1;
115
+ })()];
116
+ }
117
+ }
118
+ else if (msg.tag === 3) {
119
+ if (msg.fields[1].tag === 1) {
120
+ return [new State(state.Page, map((item) => {
121
+ if (equals(msg.fields[0].Policy.Identifier, item.Policy.Identifier)) {
122
+ return new PolicyReviewItemDto(item.Policy, PolicyReviewItemStatusDto__ToNextStatus_468E0CC(item.Status, new PolicyReviewItemStatusDto(1, [])));
123
+ }
124
+ else {
125
+ return item;
126
+ }
127
+ }, state.ReviewItemList), state.GetInitStateStatus, state.PresentPoliciesStatus, (() => {
128
+ throw 1;
129
+ })(), state.AcceptPolicyStatus, state.ContinueStatus), (() => {
130
+ throw 1;
131
+ })()];
132
+ }
133
+ else {
134
+ return [new State(state.Page, state.ReviewItemList, state.GetInitStateStatus, state.PresentPoliciesStatus, (() => {
135
+ throw 1;
136
+ })(), state.AcceptPolicyStatus, state.ContinueStatus), (() => {
137
+ throw 1;
138
+ })()];
139
+ }
140
+ }
141
+ else if (msg.tag === 4) {
142
+ if (msg.fields[1].tag === 1) {
143
+ const reviewItemList_2 = map((item_1) => {
144
+ if (equals(msg.fields[0].Policy.Identifier, item_1.Policy.Identifier)) {
145
+ return new PolicyReviewItemDto(item_1.Policy, PolicyReviewItemStatusDto__ToNextStatus_468E0CC(item_1.Status, new PolicyReviewItemStatusDto(2, [])));
146
+ }
147
+ else {
148
+ return item_1;
149
+ }
150
+ }, state.ReviewItemList);
151
+ return [new State((matchValue = state.Page, (matchValue.tag === 1) ? ((item_2 = matchValue.fields[0], new Page(1, [new PolicyReviewItemDto(item_2.Policy, PolicyReviewItemStatusDto__ToNextStatus_468E0CC(item_2.Status, new PolicyReviewItemStatusDto(2, [])))]))) : (new Page(0, []))), reviewItemList_2, state.GetInitStateStatus, state.PresentPoliciesStatus, state.OpenPolicyStatus, (() => {
152
+ throw 1;
153
+ })(), state.ContinueStatus), (msg.fields[1].fields[0].tag === 0) ? (() => {
154
+ throw 1;
155
+ })() : (() => {
156
+ throw 1;
157
+ })()];
158
+ }
159
+ else {
160
+ return [new State(state.Page, state.ReviewItemList, state.GetInitStateStatus, state.PresentPoliciesStatus, state.OpenPolicyStatus, (() => {
161
+ throw 1;
162
+ })(), state.ContinueStatus), (() => {
163
+ throw 1;
164
+ })()];
165
+ }
166
+ }
167
+ else if (msg.tag === 5) {
168
+ if (msg.fields[1].tag === 1) {
169
+ return [new State(state.Page, state.ReviewItemList, state.GetInitStateStatus, state.PresentPoliciesStatus, state.OpenPolicyStatus, state.AcceptPolicyStatus, (() => {
170
+ throw 1;
171
+ })()), (() => {
172
+ throw 1;
173
+ })()];
174
+ }
175
+ else {
176
+ throw 1;
177
+ }
178
+ }
179
+ else if (msg.tag === 6) {
180
+ notifyCompletion((() => {
181
+ throw 1;
182
+ })());
183
+ return [state, (() => {
184
+ throw 1;
185
+ })()];
186
+ }
187
+ else if (msg.fields[0].tag === 1) {
188
+ const patternInput = (msg.fields[0].fields[0].tag === 1) ? [void 0, (() => {
189
+ throw 1;
190
+ })()] : ((msg.fields[0].fields[0].fields[0].tag === 1) ? [void 0, (() => {
191
+ throw 1;
192
+ })()] : [msg.fields[0].fields[0].fields[0].fields[0].PolicyReviewList, (() => {
193
+ throw 1;
194
+ })()]);
195
+ const reviewItemList = patternInput[0];
196
+ return [(GetInitStateStatus_1 = (() => {
197
+ throw 1;
198
+ })(), new State(state.Page, (reviewItemList == null) ? state.ReviewItemList : reviewItemList, GetInitStateStatus_1, state.PresentPoliciesStatus, state.OpenPolicyStatus, state.AcceptPolicyStatus, state.ContinueStatus)), patternInput[1]];
199
+ }
200
+ else {
201
+ return [new State(state.Page, state.ReviewItemList, (() => {
202
+ throw 1;
203
+ })(), state.PresentPoliciesStatus, state.OpenPolicyStatus, state.AcceptPolicyStatus, state.ContinueStatus), (() => {
204
+ throw 1;
205
+ })()];
206
+ }
207
+ }
208
+