document-model 1.0.16 → 1.0.17
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/dist/browser/document/schema/zod.d.ts +24 -0
- package/dist/browser/document/types.d.ts +8 -7
- package/dist/browser/document/utils/base.d.ts +4 -4
- package/dist/browser/document-model/gen/object.d.ts +1 -1
- package/dist/browser/document-model/gen/schema/types.d.ts +12 -5
- package/dist/browser/document-model/gen/schema/zod.d.ts +20 -1
- package/dist/browser/document-model/index.d.ts +3 -3
- package/dist/browser/document-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +2 -2
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/index-01030c3f.js +22 -0
- package/dist/{node/internal/index-0e7af6c6.js → browser/internal/index-2aee8ea9.js} +1 -1
- package/dist/browser/internal/{index-37753e74.js → index-5f1909ad.js} +513 -435
- package/dist/{node/internal/index-124bda95.js → browser/internal/index-a1282d5c.js} +1 -1
- package/dist/browser/internal/object-24df9d92.js +6 -0
- package/dist/browser/internal/{object-17aee7a9.js → object-7e8eaff4.js} +377 -365
- package/dist/node/document/schema/zod.d.ts +24 -0
- package/dist/node/document/types.d.ts +8 -7
- package/dist/node/document/utils/base.d.ts +4 -4
- package/dist/node/document-model/gen/object.d.ts +1 -1
- package/dist/node/document-model/gen/schema/types.d.ts +12 -5
- package/dist/node/document-model/gen/schema/zod.d.ts +20 -1
- package/dist/node/document-model/index.d.ts +3 -3
- package/dist/node/document-model.cjs +1 -1
- package/dist/node/document-model.js +2 -2
- package/dist/node/document.cjs +1 -1
- package/dist/node/document.js +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-9037f83a.js → index-0db636da.js} +513 -435
- package/dist/{browser/internal/index-f5587600.js → node/internal/index-2d4783d9.js} +1 -1
- package/dist/{browser/internal/index-9b4d67fc.js → node/internal/index-5ef0c6b0.js} +1 -1
- package/dist/node/internal/index-cddc9dfd.js +22 -0
- package/dist/node/internal/object-21f3d2ee.js +1 -0
- package/dist/node/internal/{object-f7cd4777.js → object-c32ea0a0.js} +154 -142
- package/package.json +1 -1
- package/dist/browser/internal/index-a5150e7e.js +0 -22
- package/dist/browser/internal/object-28a1a8bf.js +0 -6
- package/dist/node/internal/index-417115f1.js +0 -22
- package/dist/node/internal/object-f3dd289e.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var dt = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { c as
|
|
2
|
+
var ut = (t, e, o) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var le = (t, e, o) => (ut(t, typeof e != "symbol" ? e + "" : e, o), o);
|
|
4
|
+
import { c as mt, i as Et, a as ht, b as Ot, s as gt, d as St, l as bt, e as ft, f as s, B as l, g as _t, h as It } from "./object-c32ea0a0.js";
|
|
5
5
|
import "json-stringify-deterministic";
|
|
6
6
|
import "immer";
|
|
7
7
|
import "crypto";
|
|
@@ -12,7 +12,7 @@ import "jszip";
|
|
|
12
12
|
import { z as r } from "zod";
|
|
13
13
|
const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
14
|
__proto__: null
|
|
15
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
15
|
+
}, Symbol.toStringTag, { value: "Module" })), ce = {
|
|
16
16
|
id: "powerhouse/document-model",
|
|
17
17
|
name: "DocumentModel",
|
|
18
18
|
extension: "phdm",
|
|
@@ -539,8 +539,9 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
539
539
|
}
|
|
540
540
|
],
|
|
541
541
|
state: {
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
global: {
|
|
543
|
+
schema: "",
|
|
544
|
+
initialValue: `{
|
|
544
545
|
"id": "",
|
|
545
546
|
"name": "",
|
|
546
547
|
"extension": "",
|
|
@@ -562,11 +563,17 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
562
563
|
}
|
|
563
564
|
]
|
|
564
565
|
}`,
|
|
565
|
-
|
|
566
|
+
examples: []
|
|
567
|
+
},
|
|
568
|
+
local: {
|
|
569
|
+
schema: "",
|
|
570
|
+
initialValue: "{}",
|
|
571
|
+
examples: []
|
|
572
|
+
}
|
|
566
573
|
}
|
|
567
574
|
}
|
|
568
575
|
]
|
|
569
|
-
}, de = (t) => t != null,
|
|
576
|
+
}, de = (t) => t != null, Rt = r.any().refine((t) => de(t));
|
|
570
577
|
function f() {
|
|
571
578
|
return r.object({
|
|
572
579
|
__typename: r.literal("AddChangeLogItemInput").optional(),
|
|
@@ -599,7 +606,7 @@ function T() {
|
|
|
599
606
|
operationId: r.string()
|
|
600
607
|
});
|
|
601
608
|
}
|
|
602
|
-
function
|
|
609
|
+
function R() {
|
|
603
610
|
return r.object({
|
|
604
611
|
description: r.string().nullish(),
|
|
605
612
|
id: r.string(),
|
|
@@ -611,21 +618,22 @@ function b() {
|
|
|
611
618
|
scope: r.literal("local").or(r.literal("global")).nullish()
|
|
612
619
|
});
|
|
613
620
|
}
|
|
614
|
-
function
|
|
621
|
+
function A() {
|
|
615
622
|
return r.object({
|
|
623
|
+
scope: r.string(),
|
|
616
624
|
example: r.string(),
|
|
617
625
|
id: r.string(),
|
|
618
626
|
insertBefore: r.string().nullish()
|
|
619
627
|
});
|
|
620
628
|
}
|
|
621
|
-
function
|
|
629
|
+
function ue() {
|
|
622
630
|
return r.object({
|
|
623
631
|
__typename: r.literal("Author").optional(),
|
|
624
632
|
name: r.string(),
|
|
625
633
|
website: r.string().nullable()
|
|
626
634
|
});
|
|
627
635
|
}
|
|
628
|
-
function
|
|
636
|
+
function x() {
|
|
629
637
|
return r.object({
|
|
630
638
|
__typename: r.literal("CodeExample").optional(),
|
|
631
639
|
id: r.string(),
|
|
@@ -638,11 +646,6 @@ function D() {
|
|
|
638
646
|
id: r.string()
|
|
639
647
|
});
|
|
640
648
|
}
|
|
641
|
-
function x() {
|
|
642
|
-
return r.object({
|
|
643
|
-
id: r.string()
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
649
|
function M() {
|
|
647
650
|
return r.object({
|
|
648
651
|
id: r.string()
|
|
@@ -663,16 +666,21 @@ function P() {
|
|
|
663
666
|
id: r.string()
|
|
664
667
|
});
|
|
665
668
|
}
|
|
666
|
-
function
|
|
669
|
+
function j() {
|
|
670
|
+
return r.object({
|
|
671
|
+
scope: r.string(),
|
|
672
|
+
id: r.string()
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
function At() {
|
|
667
676
|
return r.union([
|
|
668
677
|
f(),
|
|
669
678
|
_(),
|
|
670
679
|
I(),
|
|
671
680
|
T(),
|
|
672
|
-
b(),
|
|
673
681
|
R(),
|
|
682
|
+
A(),
|
|
674
683
|
D(),
|
|
675
|
-
x(),
|
|
676
684
|
M(),
|
|
677
685
|
N(),
|
|
678
686
|
L(),
|
|
@@ -682,15 +690,15 @@ function Rt() {
|
|
|
682
690
|
k(),
|
|
683
691
|
y(),
|
|
684
692
|
w(),
|
|
685
|
-
U(),
|
|
686
693
|
v(),
|
|
694
|
+
U(),
|
|
695
|
+
V(),
|
|
687
696
|
F(),
|
|
688
697
|
H(),
|
|
689
|
-
V(),
|
|
690
698
|
X(),
|
|
691
699
|
G(),
|
|
692
|
-
W(),
|
|
693
700
|
$(),
|
|
701
|
+
W(),
|
|
694
702
|
z(),
|
|
695
703
|
B(),
|
|
696
704
|
q(),
|
|
@@ -705,50 +713,51 @@ function Rt() {
|
|
|
705
713
|
oe(),
|
|
706
714
|
ne(),
|
|
707
715
|
ie(),
|
|
708
|
-
se()
|
|
716
|
+
se(),
|
|
717
|
+
ae()
|
|
709
718
|
]);
|
|
710
719
|
}
|
|
711
|
-
function
|
|
720
|
+
function xt() {
|
|
712
721
|
return r.object({
|
|
713
722
|
__typename: r.literal("DocumentModelState").optional(),
|
|
714
|
-
author:
|
|
723
|
+
author: ue(),
|
|
715
724
|
description: r.string(),
|
|
716
725
|
extension: r.string(),
|
|
717
726
|
id: r.string(),
|
|
718
727
|
name: r.string(),
|
|
719
|
-
specifications: r.array(
|
|
728
|
+
specifications: r.array(me())
|
|
720
729
|
});
|
|
721
730
|
}
|
|
722
|
-
function
|
|
731
|
+
function me() {
|
|
723
732
|
return r.object({
|
|
724
733
|
__typename: r.literal("DocumentSpecification").optional(),
|
|
725
734
|
changeLog: r.array(r.string()),
|
|
726
|
-
modules: r.array(
|
|
727
|
-
state:
|
|
735
|
+
modules: r.array(Ee()),
|
|
736
|
+
state: Se(),
|
|
728
737
|
version: r.number()
|
|
729
738
|
});
|
|
730
739
|
}
|
|
731
|
-
function
|
|
740
|
+
function Ee() {
|
|
732
741
|
return r.object({
|
|
733
742
|
__typename: r.literal("Module").optional(),
|
|
734
743
|
description: r.string().nullable(),
|
|
735
744
|
id: r.string(),
|
|
736
745
|
name: r.string(),
|
|
737
|
-
operations: r.array(
|
|
746
|
+
operations: r.array(he())
|
|
738
747
|
});
|
|
739
748
|
}
|
|
740
|
-
function
|
|
749
|
+
function C() {
|
|
741
750
|
return r.object({
|
|
742
751
|
newModuleId: r.string(),
|
|
743
752
|
operationId: r.string()
|
|
744
753
|
});
|
|
745
754
|
}
|
|
746
|
-
function
|
|
755
|
+
function he() {
|
|
747
756
|
return r.object({
|
|
748
757
|
__typename: r.literal("Operation").optional(),
|
|
749
758
|
description: r.string().nullable(),
|
|
750
|
-
errors: r.array(
|
|
751
|
-
examples: r.array(
|
|
759
|
+
errors: r.array(Oe()),
|
|
760
|
+
examples: r.array(x()),
|
|
752
761
|
id: r.string(),
|
|
753
762
|
name: r.string().nullable(),
|
|
754
763
|
reducer: r.string().nullable(),
|
|
@@ -757,7 +766,7 @@ function Ee() {
|
|
|
757
766
|
scope: r.literal("local").or(r.literal("global"))
|
|
758
767
|
});
|
|
759
768
|
}
|
|
760
|
-
function
|
|
769
|
+
function Oe() {
|
|
761
770
|
return r.object({
|
|
762
771
|
__typename: r.literal("OperationError").optional(),
|
|
763
772
|
code: r.string().nullable(),
|
|
@@ -767,24 +776,24 @@ function he() {
|
|
|
767
776
|
template: r.string().nullable()
|
|
768
777
|
});
|
|
769
778
|
}
|
|
770
|
-
function
|
|
779
|
+
function k() {
|
|
771
780
|
return r.object({
|
|
772
781
|
__typename: r.literal("ReorderChangeLogItemsInput").optional(),
|
|
773
782
|
order: r.array(r.string())
|
|
774
783
|
});
|
|
775
784
|
}
|
|
776
|
-
function
|
|
785
|
+
function y() {
|
|
777
786
|
return r.object({
|
|
778
787
|
moduleId: r.string(),
|
|
779
788
|
order: r.array(r.string())
|
|
780
789
|
});
|
|
781
790
|
}
|
|
782
|
-
function
|
|
791
|
+
function w() {
|
|
783
792
|
return r.object({
|
|
784
793
|
order: r.array(r.string())
|
|
785
794
|
});
|
|
786
795
|
}
|
|
787
|
-
function
|
|
796
|
+
function v() {
|
|
788
797
|
return r.object({
|
|
789
798
|
operationId: r.string(),
|
|
790
799
|
order: r.array(r.string())
|
|
@@ -796,8 +805,9 @@ function U() {
|
|
|
796
805
|
order: r.array(r.string())
|
|
797
806
|
});
|
|
798
807
|
}
|
|
799
|
-
function
|
|
808
|
+
function V() {
|
|
800
809
|
return r.object({
|
|
810
|
+
scope: r.string(),
|
|
801
811
|
order: r.array(r.string())
|
|
802
812
|
});
|
|
803
813
|
}
|
|
@@ -811,17 +821,18 @@ function H() {
|
|
|
811
821
|
authorWebsite: r.string()
|
|
812
822
|
});
|
|
813
823
|
}
|
|
814
|
-
function
|
|
824
|
+
function X() {
|
|
815
825
|
return r.object({
|
|
826
|
+
scope: r.string(),
|
|
816
827
|
initialValue: r.string()
|
|
817
828
|
});
|
|
818
829
|
}
|
|
819
|
-
function
|
|
830
|
+
function G() {
|
|
820
831
|
return r.object({
|
|
821
832
|
description: r.string()
|
|
822
833
|
});
|
|
823
834
|
}
|
|
824
|
-
function
|
|
835
|
+
function $() {
|
|
825
836
|
return r.object({
|
|
826
837
|
extension: r.string()
|
|
827
838
|
});
|
|
@@ -831,111 +842,119 @@ function W() {
|
|
|
831
842
|
id: r.string()
|
|
832
843
|
});
|
|
833
844
|
}
|
|
834
|
-
function
|
|
845
|
+
function z() {
|
|
835
846
|
return r.object({
|
|
836
847
|
name: r.string()
|
|
837
848
|
});
|
|
838
849
|
}
|
|
839
|
-
function
|
|
850
|
+
function B() {
|
|
840
851
|
return r.object({
|
|
841
852
|
description: r.string().nullish(),
|
|
842
853
|
id: r.string()
|
|
843
854
|
});
|
|
844
855
|
}
|
|
845
|
-
function
|
|
856
|
+
function q() {
|
|
846
857
|
return r.object({
|
|
847
858
|
id: r.string(),
|
|
848
859
|
name: r.string().nullish()
|
|
849
860
|
});
|
|
850
861
|
}
|
|
851
|
-
function
|
|
862
|
+
function J() {
|
|
852
863
|
return r.object({
|
|
853
864
|
description: r.string().nullish(),
|
|
854
865
|
id: r.string()
|
|
855
866
|
});
|
|
856
867
|
}
|
|
857
|
-
function
|
|
868
|
+
function K() {
|
|
858
869
|
return r.object({
|
|
859
870
|
errorCode: r.string().nullish(),
|
|
860
871
|
id: r.string()
|
|
861
872
|
});
|
|
862
873
|
}
|
|
863
|
-
function
|
|
874
|
+
function Q() {
|
|
864
875
|
return r.object({
|
|
865
876
|
errorDescription: r.string().nullish(),
|
|
866
877
|
id: r.string()
|
|
867
878
|
});
|
|
868
879
|
}
|
|
869
|
-
function
|
|
880
|
+
function Y() {
|
|
870
881
|
return r.object({
|
|
871
882
|
errorName: r.string().nullish(),
|
|
872
883
|
id: r.string()
|
|
873
884
|
});
|
|
874
885
|
}
|
|
875
|
-
function
|
|
886
|
+
function Z() {
|
|
876
887
|
return r.object({
|
|
877
888
|
errorTemplate: r.string().nullish(),
|
|
878
889
|
id: r.string()
|
|
879
890
|
});
|
|
880
891
|
}
|
|
881
|
-
function
|
|
892
|
+
function ee() {
|
|
882
893
|
return r.object({
|
|
883
894
|
id: r.string(),
|
|
884
895
|
name: r.string().nullish()
|
|
885
896
|
});
|
|
886
897
|
}
|
|
887
|
-
function
|
|
898
|
+
function ge() {
|
|
888
899
|
return r.object({
|
|
889
900
|
id: r.string(),
|
|
890
901
|
scope: r.literal("global").or(r.literal("local"))
|
|
891
902
|
});
|
|
892
903
|
}
|
|
893
|
-
function
|
|
904
|
+
function te() {
|
|
894
905
|
return r.object({
|
|
895
906
|
id: r.string(),
|
|
896
907
|
reducer: r.string().nullish()
|
|
897
908
|
});
|
|
898
909
|
}
|
|
899
|
-
function
|
|
910
|
+
function re() {
|
|
900
911
|
return r.object({
|
|
901
912
|
id: r.string(),
|
|
902
913
|
schema: r.string().nullish()
|
|
903
914
|
});
|
|
904
915
|
}
|
|
905
|
-
function
|
|
916
|
+
function oe() {
|
|
906
917
|
return r.object({
|
|
907
918
|
id: r.string(),
|
|
908
919
|
template: r.string().nullish()
|
|
909
920
|
});
|
|
910
921
|
}
|
|
911
|
-
function
|
|
922
|
+
function ne() {
|
|
912
923
|
return r.object({
|
|
924
|
+
scope: r.string(),
|
|
913
925
|
schema: r.string()
|
|
914
926
|
});
|
|
915
927
|
}
|
|
916
|
-
function
|
|
928
|
+
function b() {
|
|
917
929
|
return r.object({
|
|
918
930
|
__typename: r.literal("State").optional(),
|
|
919
|
-
examples: r.array(
|
|
931
|
+
examples: r.array(x()),
|
|
920
932
|
initialValue: r.string(),
|
|
921
933
|
schema: r.string()
|
|
922
934
|
});
|
|
923
935
|
}
|
|
924
|
-
function
|
|
936
|
+
function Se() {
|
|
937
|
+
return r.object({
|
|
938
|
+
global: b(),
|
|
939
|
+
local: b()
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
function ie() {
|
|
925
943
|
return r.object({
|
|
926
944
|
__typename: r.literal("UpdateChangeLogItemInput").optional(),
|
|
927
945
|
id: r.string(),
|
|
928
946
|
newContent: r.string()
|
|
929
947
|
});
|
|
930
948
|
}
|
|
931
|
-
function
|
|
949
|
+
function se() {
|
|
932
950
|
return r.object({
|
|
933
951
|
example: r.string(),
|
|
934
952
|
id: r.string()
|
|
935
953
|
});
|
|
936
954
|
}
|
|
937
|
-
function
|
|
955
|
+
function ae() {
|
|
938
956
|
return r.object({
|
|
957
|
+
scope: r.string(),
|
|
939
958
|
id: r.string(),
|
|
940
959
|
newExample: r.string()
|
|
941
960
|
});
|
|
@@ -946,56 +965,57 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
946
965
|
AddModuleInputSchema: _,
|
|
947
966
|
AddOperationErrorInputSchema: I,
|
|
948
967
|
AddOperationExampleInputSchema: T,
|
|
949
|
-
AddOperationInputSchema:
|
|
950
|
-
AddStateExampleInputSchema:
|
|
951
|
-
AuthorSchema:
|
|
952
|
-
CodeExampleSchema:
|
|
968
|
+
AddOperationInputSchema: R,
|
|
969
|
+
AddStateExampleInputSchema: A,
|
|
970
|
+
AuthorSchema: ue,
|
|
971
|
+
CodeExampleSchema: x,
|
|
953
972
|
DeleteChangeLogItemInputSchema: D,
|
|
954
|
-
DeleteModuleInputSchema:
|
|
955
|
-
DeleteOperationErrorInputSchema:
|
|
956
|
-
DeleteOperationExampleInputSchema:
|
|
957
|
-
DeleteOperationInputSchema:
|
|
958
|
-
DeleteStateExampleInputSchema:
|
|
959
|
-
DocumentModelInputSchema:
|
|
960
|
-
DocumentModelStateSchema:
|
|
961
|
-
DocumentSpecificationSchema:
|
|
962
|
-
ModuleSchema:
|
|
963
|
-
MoveOperationInputSchema:
|
|
964
|
-
OperationErrorSchema:
|
|
965
|
-
OperationSchema:
|
|
966
|
-
ReorderChangeLogItemsInputSchema:
|
|
967
|
-
ReorderModuleOperationsInputSchema:
|
|
968
|
-
ReorderModulesInputSchema:
|
|
969
|
-
ReorderOperationErrorsInputSchema:
|
|
973
|
+
DeleteModuleInputSchema: M,
|
|
974
|
+
DeleteOperationErrorInputSchema: N,
|
|
975
|
+
DeleteOperationExampleInputSchema: L,
|
|
976
|
+
DeleteOperationInputSchema: P,
|
|
977
|
+
DeleteStateExampleInputSchema: j,
|
|
978
|
+
DocumentModelInputSchema: At,
|
|
979
|
+
DocumentModelStateSchema: xt,
|
|
980
|
+
DocumentSpecificationSchema: me,
|
|
981
|
+
ModuleSchema: Ee,
|
|
982
|
+
MoveOperationInputSchema: C,
|
|
983
|
+
OperationErrorSchema: Oe,
|
|
984
|
+
OperationSchema: he,
|
|
985
|
+
ReorderChangeLogItemsInputSchema: k,
|
|
986
|
+
ReorderModuleOperationsInputSchema: y,
|
|
987
|
+
ReorderModulesInputSchema: w,
|
|
988
|
+
ReorderOperationErrorsInputSchema: v,
|
|
970
989
|
ReorderOperationExamplesInputSchema: U,
|
|
971
|
-
ReorderStateExamplesInputSchema:
|
|
990
|
+
ReorderStateExamplesInputSchema: V,
|
|
991
|
+
ScopeStateSchema: Se,
|
|
972
992
|
SetAuthorNameInputSchema: F,
|
|
973
993
|
SetAuthorWebsiteInputSchema: H,
|
|
974
|
-
SetInitialStateInputSchema:
|
|
975
|
-
SetModelDescriptionInputSchema:
|
|
976
|
-
SetModelExtensionInputSchema:
|
|
994
|
+
SetInitialStateInputSchema: X,
|
|
995
|
+
SetModelDescriptionInputSchema: G,
|
|
996
|
+
SetModelExtensionInputSchema: $,
|
|
977
997
|
SetModelIdInputSchema: W,
|
|
978
|
-
SetModelNameInputSchema:
|
|
979
|
-
SetModuleDescriptionInputSchema:
|
|
980
|
-
SetModuleNameInputSchema:
|
|
981
|
-
SetOperationDescriptionInputSchema:
|
|
982
|
-
SetOperationErrorCodeInputSchema:
|
|
983
|
-
SetOperationErrorDescriptionInputSchema:
|
|
984
|
-
SetOperationErrorNameInputSchema:
|
|
985
|
-
SetOperationErrorTemplateInputSchema:
|
|
986
|
-
SetOperationNameInputSchema:
|
|
987
|
-
SetOperationReducerInputSchema:
|
|
988
|
-
SetOperationSchemaInputSchema:
|
|
989
|
-
SetOperationScopeInputSchema:
|
|
990
|
-
SetOperationTemplateInputSchema:
|
|
991
|
-
SetStateSchemaInputSchema:
|
|
992
|
-
StateSchema:
|
|
993
|
-
UpdateChangeLogItemInputSchema:
|
|
994
|
-
UpdateOperationExampleInputSchema:
|
|
995
|
-
UpdateStateExampleInputSchema:
|
|
996
|
-
definedNonNullAnySchema:
|
|
998
|
+
SetModelNameInputSchema: z,
|
|
999
|
+
SetModuleDescriptionInputSchema: B,
|
|
1000
|
+
SetModuleNameInputSchema: q,
|
|
1001
|
+
SetOperationDescriptionInputSchema: J,
|
|
1002
|
+
SetOperationErrorCodeInputSchema: K,
|
|
1003
|
+
SetOperationErrorDescriptionInputSchema: Q,
|
|
1004
|
+
SetOperationErrorNameInputSchema: Y,
|
|
1005
|
+
SetOperationErrorTemplateInputSchema: Z,
|
|
1006
|
+
SetOperationNameInputSchema: ee,
|
|
1007
|
+
SetOperationReducerInputSchema: te,
|
|
1008
|
+
SetOperationSchemaInputSchema: re,
|
|
1009
|
+
SetOperationScopeInputSchema: ge,
|
|
1010
|
+
SetOperationTemplateInputSchema: oe,
|
|
1011
|
+
SetStateSchemaInputSchema: ne,
|
|
1012
|
+
StateSchema: b,
|
|
1013
|
+
UpdateChangeLogItemInputSchema: ie,
|
|
1014
|
+
UpdateOperationExampleInputSchema: se,
|
|
1015
|
+
UpdateStateExampleInputSchema: ae,
|
|
1016
|
+
definedNonNullAnySchema: Rt,
|
|
997
1017
|
isDefinedNonNullAny: de
|
|
998
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1018
|
+
}, Symbol.toStringTag, { value: "Module" })), d = {
|
|
999
1019
|
setModelNameOperation(t, e) {
|
|
1000
1020
|
t.name = e.input.name;
|
|
1001
1021
|
},
|
|
@@ -1030,9 +1050,9 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1030
1050
|
releaseNewVersionOperation(t, e) {
|
|
1031
1051
|
throw new Error('Reducer "releaseNewVersionOperation" not yet implemented');
|
|
1032
1052
|
}
|
|
1033
|
-
},
|
|
1053
|
+
}, Mt = (t) => {
|
|
1034
1054
|
const e = {};
|
|
1035
|
-
return t.forEach((
|
|
1055
|
+
return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
|
|
1036
1056
|
}, h = {
|
|
1037
1057
|
addModuleOperation(t, e) {
|
|
1038
1058
|
t.specifications[t.specifications.length - 1].modules.push({
|
|
@@ -1043,33 +1063,33 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1043
1063
|
});
|
|
1044
1064
|
},
|
|
1045
1065
|
setModuleNameOperation(t, e) {
|
|
1046
|
-
const
|
|
1047
|
-
for (let
|
|
1048
|
-
|
|
1066
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1067
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1068
|
+
o.modules[n].id === e.input.id && (o.modules[n].name = e.input.name || "");
|
|
1049
1069
|
},
|
|
1050
1070
|
setModuleDescriptionOperation(t, e) {
|
|
1051
|
-
const
|
|
1052
|
-
for (let
|
|
1053
|
-
|
|
1071
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1072
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1073
|
+
o.modules[n].id === e.input.id && (o.modules[n].description = e.input.description || "");
|
|
1054
1074
|
},
|
|
1055
1075
|
deleteModuleOperation(t, e) {
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
(
|
|
1076
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1077
|
+
o.modules = o.modules.filter(
|
|
1078
|
+
(n) => n.id != e.input.id
|
|
1059
1079
|
);
|
|
1060
1080
|
},
|
|
1061
1081
|
reorderModulesOperation(t, e) {
|
|
1062
|
-
t.specifications[t.specifications.length - 1].modules.sort(
|
|
1082
|
+
t.specifications[t.specifications.length - 1].modules.sort(Mt(e.input.order));
|
|
1063
1083
|
}
|
|
1064
|
-
},
|
|
1084
|
+
}, Nt = (t) => {
|
|
1065
1085
|
const e = {};
|
|
1066
|
-
return t.forEach((
|
|
1067
|
-
},
|
|
1086
|
+
return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
|
|
1087
|
+
}, c = {
|
|
1068
1088
|
addOperationErrorOperation(t, e) {
|
|
1069
|
-
const
|
|
1070
|
-
for (let
|
|
1071
|
-
for (let i = 0; i <
|
|
1072
|
-
|
|
1089
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1090
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1091
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1092
|
+
o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.push({
|
|
1073
1093
|
id: e.input.id,
|
|
1074
1094
|
name: e.input.errorName || "",
|
|
1075
1095
|
code: e.input.errorCode || "",
|
|
@@ -1078,91 +1098,91 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1078
1098
|
});
|
|
1079
1099
|
},
|
|
1080
1100
|
setOperationErrorCodeOperation(t, e) {
|
|
1081
|
-
const
|
|
1082
|
-
for (let
|
|
1083
|
-
for (let i = 0; i <
|
|
1084
|
-
for (let a = 0; a <
|
|
1085
|
-
|
|
1101
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1102
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1103
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1104
|
+
for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
|
|
1105
|
+
o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].code = e.input.errorCode || "");
|
|
1086
1106
|
},
|
|
1087
1107
|
setOperationErrorNameOperation(t, e) {
|
|
1088
|
-
const
|
|
1089
|
-
for (let
|
|
1090
|
-
for (let i = 0; i <
|
|
1091
|
-
for (let a = 0; a <
|
|
1092
|
-
|
|
1108
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1109
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1110
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1111
|
+
for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
|
|
1112
|
+
o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].name = e.input.errorName || "");
|
|
1093
1113
|
},
|
|
1094
1114
|
setOperationErrorDescriptionOperation(t, e) {
|
|
1095
|
-
const
|
|
1096
|
-
for (let
|
|
1097
|
-
for (let i = 0; i <
|
|
1098
|
-
for (let a = 0; a <
|
|
1099
|
-
|
|
1115
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1116
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1117
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1118
|
+
for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
|
|
1119
|
+
o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].description = e.input.errorDescription || "");
|
|
1100
1120
|
},
|
|
1101
1121
|
setOperationErrorTemplateOperation(t, e) {
|
|
1102
|
-
const
|
|
1103
|
-
for (let
|
|
1104
|
-
for (let i = 0; i <
|
|
1105
|
-
for (let a = 0; a <
|
|
1106
|
-
|
|
1122
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1123
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1124
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1125
|
+
for (let a = 0; a < o.modules[n].operations[i].errors.length; a++)
|
|
1126
|
+
o.modules[n].operations[i].errors[a].id == e.input.id && (o.modules[n].operations[i].errors[a].template = e.input.errorTemplate || "");
|
|
1107
1127
|
},
|
|
1108
1128
|
deleteOperationErrorOperation(t, e) {
|
|
1109
|
-
const
|
|
1110
|
-
for (let
|
|
1111
|
-
for (let i = 0; i <
|
|
1112
|
-
|
|
1129
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1130
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1131
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1132
|
+
o.modules[n].operations[i].errors = o.modules[n].operations[i].errors.filter((a) => a.id != e.input.id);
|
|
1113
1133
|
},
|
|
1114
1134
|
reorderOperationErrorsOperation(t, e) {
|
|
1115
|
-
const
|
|
1116
|
-
for (let
|
|
1117
|
-
for (let i = 0; i <
|
|
1118
|
-
|
|
1119
|
-
|
|
1135
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1136
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1137
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1138
|
+
o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.sort(
|
|
1139
|
+
Nt(e.input.order)
|
|
1120
1140
|
);
|
|
1121
1141
|
}
|
|
1122
|
-
},
|
|
1142
|
+
}, Lt = (t) => {
|
|
1123
1143
|
const e = {};
|
|
1124
|
-
return t.forEach((
|
|
1144
|
+
return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
|
|
1125
1145
|
}, S = {
|
|
1126
1146
|
addOperationExampleOperation(t, e) {
|
|
1127
|
-
const
|
|
1128
|
-
for (let
|
|
1129
|
-
for (let i = 0; i <
|
|
1130
|
-
|
|
1147
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1148
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1149
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1150
|
+
o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.push({
|
|
1131
1151
|
id: e.input.id,
|
|
1132
1152
|
value: e.input.example
|
|
1133
1153
|
});
|
|
1134
1154
|
},
|
|
1135
1155
|
updateOperationExampleOperation(t, e) {
|
|
1136
|
-
const
|
|
1137
|
-
for (let
|
|
1138
|
-
for (let i = 0; i <
|
|
1139
|
-
for (let a = 0; a <
|
|
1140
|
-
|
|
1156
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1157
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1158
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1159
|
+
for (let a = 0; a < o.modules[n].operations[i].examples.length; a++)
|
|
1160
|
+
o.modules[n].operations[i].examples[a].id == e.input.id && (o.modules[n].operations[i].examples[a].value = e.input.example);
|
|
1141
1161
|
},
|
|
1142
1162
|
deleteOperationExampleOperation(t, e) {
|
|
1143
|
-
const
|
|
1144
|
-
for (let
|
|
1145
|
-
for (let i = 0; i <
|
|
1146
|
-
|
|
1163
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1164
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1165
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1166
|
+
o.modules[n].operations[i].examples = o.modules[n].operations[i].examples.filter(
|
|
1147
1167
|
(a) => a.id != e.input.id
|
|
1148
1168
|
);
|
|
1149
1169
|
},
|
|
1150
1170
|
reorderOperationExamplesOperation(t, e) {
|
|
1151
|
-
const
|
|
1152
|
-
for (let
|
|
1153
|
-
for (let i = 0; i <
|
|
1154
|
-
|
|
1155
|
-
|
|
1171
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1172
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1173
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1174
|
+
o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.sort(
|
|
1175
|
+
Lt(e.input.order)
|
|
1156
1176
|
);
|
|
1157
1177
|
}
|
|
1158
|
-
},
|
|
1178
|
+
}, Pt = (t) => {
|
|
1159
1179
|
const e = {};
|
|
1160
|
-
return t.forEach((
|
|
1180
|
+
return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
|
|
1161
1181
|
}, p = {
|
|
1162
1182
|
addOperationOperation(t, e) {
|
|
1163
|
-
const
|
|
1164
|
-
for (let
|
|
1165
|
-
|
|
1183
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1184
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1185
|
+
o.modules[n].id == e.input.moduleId && o.modules[n].operations.push({
|
|
1166
1186
|
id: e.input.id,
|
|
1167
1187
|
name: e.input.name,
|
|
1168
1188
|
description: e.input.description || "",
|
|
@@ -1175,253 +1195,304 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1175
1195
|
});
|
|
1176
1196
|
},
|
|
1177
1197
|
setOperationNameOperation(t, e) {
|
|
1178
|
-
const
|
|
1179
|
-
for (let
|
|
1180
|
-
for (let i = 0; i <
|
|
1181
|
-
|
|
1198
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1199
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1200
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1201
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].name = e.input.name || "");
|
|
1182
1202
|
},
|
|
1183
1203
|
setOperationScopeOperation(t, e) {
|
|
1184
|
-
const
|
|
1185
|
-
for (let
|
|
1186
|
-
for (let i = 0; i <
|
|
1187
|
-
|
|
1204
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1205
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1206
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1207
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].scope = e.input.scope || "global");
|
|
1188
1208
|
},
|
|
1189
1209
|
setOperationSchemaOperation(t, e) {
|
|
1190
|
-
const
|
|
1191
|
-
for (let
|
|
1192
|
-
for (let i = 0; i <
|
|
1193
|
-
|
|
1210
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1211
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1212
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1213
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].schema = e.input.schema || "");
|
|
1194
1214
|
},
|
|
1195
1215
|
setOperationDescriptionOperation(t, e) {
|
|
1196
|
-
const
|
|
1197
|
-
for (let
|
|
1198
|
-
for (let i = 0; i <
|
|
1199
|
-
|
|
1216
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1217
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1218
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1219
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].description = e.input.description || "");
|
|
1200
1220
|
},
|
|
1201
1221
|
setOperationTemplateOperation(t, e) {
|
|
1202
|
-
const
|
|
1203
|
-
for (let
|
|
1204
|
-
for (let i = 0; i <
|
|
1205
|
-
|
|
1222
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1223
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1224
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1225
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].template = e.input.template || "");
|
|
1206
1226
|
},
|
|
1207
1227
|
setOperationReducerOperation(t, e) {
|
|
1208
|
-
const
|
|
1209
|
-
for (let
|
|
1210
|
-
for (let i = 0; i <
|
|
1211
|
-
|
|
1228
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1229
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1230
|
+
for (let i = 0; i < o.modules[n].operations.length; i++)
|
|
1231
|
+
o.modules[n].operations[i].id == e.input.id && (o.modules[n].operations[i].reducer = e.input.reducer || "");
|
|
1212
1232
|
},
|
|
1213
1233
|
moveOperationOperation(t, e) {
|
|
1214
|
-
const
|
|
1215
|
-
for (let i = 0; i <
|
|
1216
|
-
|
|
1217
|
-
for (let i = 0; i <
|
|
1218
|
-
|
|
1234
|
+
const o = [], n = t.specifications[t.specifications.length - 1];
|
|
1235
|
+
for (let i = 0; i < n.modules.length; i++)
|
|
1236
|
+
n.modules[i].operations = n.modules[i].operations.filter((a) => a.id == e.input.operationId ? (o.push(a), !1) : !0);
|
|
1237
|
+
for (let i = 0; i < n.modules.length; i++)
|
|
1238
|
+
n.modules[i].id == e.input.newModuleId && n.modules[i].operations.push(...o);
|
|
1219
1239
|
},
|
|
1220
1240
|
deleteOperationOperation(t, e) {
|
|
1221
|
-
const
|
|
1222
|
-
for (let
|
|
1223
|
-
|
|
1241
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1242
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1243
|
+
o.modules[n].operations = o.modules[n].operations.filter((i) => i.id != e.input.id);
|
|
1224
1244
|
},
|
|
1225
1245
|
reorderModuleOperationsOperation(t, e) {
|
|
1226
|
-
const
|
|
1227
|
-
for (let
|
|
1228
|
-
|
|
1229
|
-
|
|
1246
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1247
|
+
for (let n = 0; n < o.modules.length; n++)
|
|
1248
|
+
o.modules[n].id == e.input.moduleId && o.modules[n].operations.sort(
|
|
1249
|
+
Pt(e.input.order)
|
|
1230
1250
|
);
|
|
1231
1251
|
}
|
|
1232
|
-
},
|
|
1252
|
+
}, jt = (t) => {
|
|
1233
1253
|
const e = {};
|
|
1234
|
-
return t.forEach((
|
|
1254
|
+
return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
|
|
1235
1255
|
}, u = {
|
|
1236
1256
|
setStateSchemaOperation(t, e) {
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1257
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1258
|
+
if (Object.keys(o.state).includes(e.input.scope))
|
|
1259
|
+
o.state[e.input.scope].schema = e.input.schema;
|
|
1260
|
+
else
|
|
1261
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1239
1262
|
},
|
|
1240
1263
|
setInitialStateOperation(t, e) {
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1264
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1265
|
+
if (Object.keys(o.state).includes(e.input.scope))
|
|
1266
|
+
o.state[e.input.scope].initialValue = e.input.initialValue;
|
|
1267
|
+
else
|
|
1268
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1243
1269
|
},
|
|
1244
1270
|
addStateExampleOperation(t, e) {
|
|
1245
|
-
t.specifications[t.specifications.length - 1]
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1271
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1272
|
+
if (Object.keys(o.state).includes(e.input.scope))
|
|
1273
|
+
o.state[e.input.scope].examples.push({
|
|
1274
|
+
id: e.input.id,
|
|
1275
|
+
value: e.input.example
|
|
1276
|
+
});
|
|
1277
|
+
else
|
|
1278
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1249
1279
|
},
|
|
1250
1280
|
updateStateExampleOperation(t, e) {
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1253
|
-
|
|
1281
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1282
|
+
if (!Object.keys(o.state).includes(e.input.scope))
|
|
1283
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1284
|
+
const n = o.state[e.input.scope].examples;
|
|
1285
|
+
for (let i = 0; i < n.length; i++)
|
|
1286
|
+
n[i].id == e.input.id && (n[i].value = e.input.newExample);
|
|
1254
1287
|
},
|
|
1255
1288
|
deleteStateExampleOperation(t, e) {
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
(
|
|
1259
|
-
|
|
1289
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1290
|
+
if (Object.keys(o.state).includes(e.input.scope))
|
|
1291
|
+
o.state[e.input.scope].examples = o.state[e.input.scope].examples.filter((n) => n.id != e.input.id);
|
|
1292
|
+
else
|
|
1293
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1260
1294
|
},
|
|
1261
1295
|
reorderStateExamplesOperation(t, e) {
|
|
1262
|
-
t.specifications[t.specifications.length - 1]
|
|
1296
|
+
const o = t.specifications[t.specifications.length - 1];
|
|
1297
|
+
if (Object.keys(o.state).includes(e.input.scope))
|
|
1298
|
+
o.state[e.input.scope].examples.sort(jt(e.input.order));
|
|
1299
|
+
else
|
|
1300
|
+
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1263
1301
|
}
|
|
1264
|
-
},
|
|
1265
|
-
if (
|
|
1302
|
+
}, Ct = (t, e) => {
|
|
1303
|
+
if (Et(e))
|
|
1266
1304
|
return t;
|
|
1267
1305
|
switch (e.type) {
|
|
1268
1306
|
case "SET_MODEL_NAME":
|
|
1269
|
-
|
|
1307
|
+
z().parse(e.input), d.setModelNameOperation(t.global, e);
|
|
1270
1308
|
break;
|
|
1271
1309
|
case "SET_MODEL_ID":
|
|
1272
|
-
W().parse(e.input),
|
|
1310
|
+
W().parse(e.input), d.setModelIdOperation(t.global, e);
|
|
1273
1311
|
break;
|
|
1274
1312
|
case "SET_MODEL_EXTENSION":
|
|
1275
|
-
|
|
1313
|
+
$().parse(e.input), d.setModelExtensionOperation(t.global, e);
|
|
1276
1314
|
break;
|
|
1277
1315
|
case "SET_MODEL_DESCRIPTION":
|
|
1278
|
-
|
|
1316
|
+
G().parse(e.input), d.setModelDescriptionOperation(t.global, e);
|
|
1279
1317
|
break;
|
|
1280
1318
|
case "SET_AUTHOR_NAME":
|
|
1281
|
-
F().parse(e.input),
|
|
1319
|
+
F().parse(e.input), d.setAuthorNameOperation(t.global, e);
|
|
1282
1320
|
break;
|
|
1283
1321
|
case "SET_AUTHOR_WEBSITE":
|
|
1284
|
-
H().parse(e.input),
|
|
1322
|
+
H().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
|
|
1285
1323
|
break;
|
|
1286
1324
|
case "ADD_CHANGE_LOG_ITEM":
|
|
1287
|
-
f().parse(e.input), E.addChangeLogItemOperation(t, e);
|
|
1325
|
+
f().parse(e.input), E.addChangeLogItemOperation(t.global, e);
|
|
1288
1326
|
break;
|
|
1289
1327
|
case "UPDATE_CHANGE_LOG_ITEM":
|
|
1290
|
-
|
|
1328
|
+
ie().parse(e.input), E.updateChangeLogItemOperation(
|
|
1329
|
+
t.global,
|
|
1330
|
+
e
|
|
1331
|
+
);
|
|
1291
1332
|
break;
|
|
1292
1333
|
case "DELETE_CHANGE_LOG_ITEM":
|
|
1293
|
-
D().parse(e.input), E.deleteChangeLogItemOperation(
|
|
1334
|
+
D().parse(e.input), E.deleteChangeLogItemOperation(
|
|
1335
|
+
t.global,
|
|
1336
|
+
e
|
|
1337
|
+
);
|
|
1294
1338
|
break;
|
|
1295
1339
|
case "REORDER_CHANGE_LOG_ITEMS":
|
|
1296
|
-
|
|
1340
|
+
k().parse(e.input), E.reorderChangeLogItemsOperation(
|
|
1341
|
+
t.global,
|
|
1342
|
+
e
|
|
1343
|
+
);
|
|
1297
1344
|
break;
|
|
1298
1345
|
case "RELEASE_NEW_VERSION":
|
|
1299
1346
|
if (Object.keys(e.input).length > 0)
|
|
1300
1347
|
throw new Error(
|
|
1301
1348
|
"Expected empty input for action RELEASE_NEW_VERSION"
|
|
1302
1349
|
);
|
|
1303
|
-
E.releaseNewVersionOperation(t, e);
|
|
1350
|
+
E.releaseNewVersionOperation(t.global, e);
|
|
1304
1351
|
break;
|
|
1305
1352
|
case "ADD_MODULE":
|
|
1306
|
-
_().parse(e.input), h.addModuleOperation(t, e);
|
|
1353
|
+
_().parse(e.input), h.addModuleOperation(t.global, e);
|
|
1307
1354
|
break;
|
|
1308
1355
|
case "SET_MODULE_NAME":
|
|
1309
|
-
|
|
1356
|
+
q().parse(e.input), h.setModuleNameOperation(t.global, e);
|
|
1310
1357
|
break;
|
|
1311
1358
|
case "SET_MODULE_DESCRIPTION":
|
|
1312
|
-
|
|
1359
|
+
B().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
|
|
1313
1360
|
break;
|
|
1314
1361
|
case "DELETE_MODULE":
|
|
1315
|
-
|
|
1362
|
+
M().parse(e.input), h.deleteModuleOperation(t.global, e);
|
|
1316
1363
|
break;
|
|
1317
1364
|
case "REORDER_MODULES":
|
|
1318
|
-
|
|
1365
|
+
w().parse(e.input), h.reorderModulesOperation(t.global, e);
|
|
1319
1366
|
break;
|
|
1320
1367
|
case "ADD_OPERATION_ERROR":
|
|
1321
|
-
I().parse(e.input),
|
|
1368
|
+
I().parse(e.input), c.addOperationErrorOperation(
|
|
1369
|
+
t.global,
|
|
1370
|
+
e
|
|
1371
|
+
);
|
|
1322
1372
|
break;
|
|
1323
1373
|
case "SET_OPERATION_ERROR_CODE":
|
|
1324
|
-
|
|
1374
|
+
K().parse(e.input), c.setOperationErrorCodeOperation(
|
|
1375
|
+
t.global,
|
|
1376
|
+
e
|
|
1377
|
+
);
|
|
1325
1378
|
break;
|
|
1326
1379
|
case "SET_OPERATION_ERROR_NAME":
|
|
1327
|
-
|
|
1380
|
+
Y().parse(e.input), c.setOperationErrorNameOperation(
|
|
1381
|
+
t.global,
|
|
1382
|
+
e
|
|
1383
|
+
);
|
|
1328
1384
|
break;
|
|
1329
1385
|
case "SET_OPERATION_ERROR_DESCRIPTION":
|
|
1330
|
-
|
|
1331
|
-
t,
|
|
1386
|
+
Q().parse(e.input), c.setOperationErrorDescriptionOperation(
|
|
1387
|
+
t.global,
|
|
1332
1388
|
e
|
|
1333
1389
|
);
|
|
1334
1390
|
break;
|
|
1335
1391
|
case "SET_OPERATION_ERROR_TEMPLATE":
|
|
1336
|
-
|
|
1337
|
-
t,
|
|
1392
|
+
Z().parse(e.input), c.setOperationErrorTemplateOperation(
|
|
1393
|
+
t.global,
|
|
1338
1394
|
e
|
|
1339
1395
|
);
|
|
1340
1396
|
break;
|
|
1341
1397
|
case "DELETE_OPERATION_ERROR":
|
|
1342
|
-
|
|
1398
|
+
N().parse(e.input), c.deleteOperationErrorOperation(
|
|
1399
|
+
t.global,
|
|
1400
|
+
e
|
|
1401
|
+
);
|
|
1343
1402
|
break;
|
|
1344
1403
|
case "REORDER_OPERATION_ERRORS":
|
|
1345
|
-
|
|
1346
|
-
t,
|
|
1404
|
+
v().parse(e.input), c.reorderOperationErrorsOperation(
|
|
1405
|
+
t.global,
|
|
1347
1406
|
e
|
|
1348
1407
|
);
|
|
1349
1408
|
break;
|
|
1350
1409
|
case "ADD_OPERATION_EXAMPLE":
|
|
1351
|
-
T().parse(e.input), S.addOperationExampleOperation(
|
|
1410
|
+
T().parse(e.input), S.addOperationExampleOperation(
|
|
1411
|
+
t.global,
|
|
1412
|
+
e
|
|
1413
|
+
);
|
|
1352
1414
|
break;
|
|
1353
1415
|
case "UPDATE_OPERATION_EXAMPLE":
|
|
1354
|
-
|
|
1355
|
-
t,
|
|
1416
|
+
se().parse(e.input), S.updateOperationExampleOperation(
|
|
1417
|
+
t.global,
|
|
1356
1418
|
e
|
|
1357
1419
|
);
|
|
1358
1420
|
break;
|
|
1359
1421
|
case "DELETE_OPERATION_EXAMPLE":
|
|
1360
|
-
|
|
1361
|
-
t,
|
|
1422
|
+
L().parse(e.input), S.deleteOperationExampleOperation(
|
|
1423
|
+
t.global,
|
|
1362
1424
|
e
|
|
1363
1425
|
);
|
|
1364
1426
|
break;
|
|
1365
1427
|
case "REORDER_OPERATION_EXAMPLES":
|
|
1366
1428
|
U().parse(e.input), S.reorderOperationExamplesOperation(
|
|
1367
|
-
t,
|
|
1429
|
+
t.global,
|
|
1368
1430
|
e
|
|
1369
1431
|
);
|
|
1370
1432
|
break;
|
|
1371
1433
|
case "ADD_OPERATION":
|
|
1372
|
-
|
|
1434
|
+
R().parse(e.input), p.addOperationOperation(t.global, e);
|
|
1373
1435
|
break;
|
|
1374
1436
|
case "SET_OPERATION_NAME":
|
|
1375
|
-
|
|
1437
|
+
ee().parse(e.input), p.setOperationNameOperation(t.global, e);
|
|
1376
1438
|
break;
|
|
1377
1439
|
case "SET_OPERATION_SCOPE":
|
|
1378
|
-
|
|
1440
|
+
ge().parse(e.input), p.setOperationScopeOperation(t.global, e);
|
|
1379
1441
|
break;
|
|
1380
1442
|
case "SET_OPERATION_SCHEMA":
|
|
1381
|
-
|
|
1443
|
+
re().parse(e.input), p.setOperationSchemaOperation(t.global, e);
|
|
1382
1444
|
break;
|
|
1383
1445
|
case "SET_OPERATION_DESCRIPTION":
|
|
1384
|
-
|
|
1446
|
+
J().parse(e.input), p.setOperationDescriptionOperation(
|
|
1447
|
+
t.global,
|
|
1448
|
+
e
|
|
1449
|
+
);
|
|
1385
1450
|
break;
|
|
1386
1451
|
case "SET_OPERATION_TEMPLATE":
|
|
1387
|
-
|
|
1452
|
+
oe().parse(e.input), p.setOperationTemplateOperation(
|
|
1453
|
+
t.global,
|
|
1454
|
+
e
|
|
1455
|
+
);
|
|
1388
1456
|
break;
|
|
1389
1457
|
case "SET_OPERATION_REDUCER":
|
|
1390
|
-
|
|
1458
|
+
te().parse(e.input), p.setOperationReducerOperation(t.global, e);
|
|
1391
1459
|
break;
|
|
1392
1460
|
case "MOVE_OPERATION":
|
|
1393
|
-
|
|
1461
|
+
C().parse(e.input), p.moveOperationOperation(t.global, e);
|
|
1394
1462
|
break;
|
|
1395
1463
|
case "DELETE_OPERATION":
|
|
1396
|
-
|
|
1464
|
+
P().parse(e.input), p.deleteOperationOperation(t.global, e);
|
|
1397
1465
|
break;
|
|
1398
1466
|
case "REORDER_MODULE_OPERATIONS":
|
|
1399
|
-
|
|
1467
|
+
y().parse(e.input), p.reorderModuleOperationsOperation(
|
|
1468
|
+
t.global,
|
|
1469
|
+
e
|
|
1470
|
+
);
|
|
1400
1471
|
break;
|
|
1401
1472
|
case "SET_STATE_SCHEMA":
|
|
1402
|
-
|
|
1473
|
+
ne().parse(e.input), u.setStateSchemaOperation(t.global, e);
|
|
1403
1474
|
break;
|
|
1404
1475
|
case "SET_INITIAL_STATE":
|
|
1405
|
-
|
|
1476
|
+
X().parse(e.input), u.setInitialStateOperation(t.global, e);
|
|
1406
1477
|
break;
|
|
1407
1478
|
case "ADD_STATE_EXAMPLE":
|
|
1408
|
-
|
|
1479
|
+
A().parse(e.input), u.addStateExampleOperation(t.global, e);
|
|
1409
1480
|
break;
|
|
1410
1481
|
case "UPDATE_STATE_EXAMPLE":
|
|
1411
|
-
|
|
1482
|
+
ae().parse(e.input), u.updateStateExampleOperation(t.global, e);
|
|
1412
1483
|
break;
|
|
1413
1484
|
case "DELETE_STATE_EXAMPLE":
|
|
1414
|
-
|
|
1485
|
+
j().parse(e.input), u.deleteStateExampleOperation(t.global, e);
|
|
1415
1486
|
break;
|
|
1416
1487
|
case "REORDER_STATE_EXAMPLES":
|
|
1417
|
-
|
|
1488
|
+
V().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
|
|
1418
1489
|
break;
|
|
1419
1490
|
default:
|
|
1420
1491
|
return t;
|
|
1421
1492
|
}
|
|
1422
|
-
}, g =
|
|
1423
|
-
|
|
1424
|
-
),
|
|
1493
|
+
}, g = mt(
|
|
1494
|
+
Ct
|
|
1495
|
+
), kt = {
|
|
1425
1496
|
id: "",
|
|
1426
1497
|
name: "",
|
|
1427
1498
|
extension: "",
|
|
@@ -1435,9 +1506,16 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1435
1506
|
version: 1,
|
|
1436
1507
|
changeLog: [],
|
|
1437
1508
|
state: {
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1509
|
+
global: {
|
|
1510
|
+
schema: "",
|
|
1511
|
+
initialValue: "",
|
|
1512
|
+
examples: []
|
|
1513
|
+
},
|
|
1514
|
+
local: {
|
|
1515
|
+
schema: "",
|
|
1516
|
+
initialValue: "",
|
|
1517
|
+
examples: []
|
|
1518
|
+
}
|
|
1441
1519
|
},
|
|
1442
1520
|
modules: []
|
|
1443
1521
|
}
|
|
@@ -1445,33 +1523,33 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1445
1523
|
}, O = {
|
|
1446
1524
|
fileExtension: "phdm",
|
|
1447
1525
|
createState(t) {
|
|
1448
|
-
return { ...
|
|
1526
|
+
return { global: { ...kt, ...t }, local: {} };
|
|
1449
1527
|
},
|
|
1450
1528
|
createExtendedState(t) {
|
|
1451
|
-
return
|
|
1529
|
+
return ht(
|
|
1452
1530
|
{ ...t, documentType: "powerhouse/document-model" },
|
|
1453
1531
|
O.createState
|
|
1454
1532
|
);
|
|
1455
1533
|
},
|
|
1456
1534
|
createDocument(t) {
|
|
1457
|
-
return
|
|
1535
|
+
return Ot(
|
|
1458
1536
|
O.createExtendedState(t),
|
|
1459
1537
|
O.createState
|
|
1460
1538
|
);
|
|
1461
1539
|
},
|
|
1462
|
-
saveToFile(t, e,
|
|
1463
|
-
return
|
|
1540
|
+
saveToFile(t, e, o) {
|
|
1541
|
+
return gt(t, e, "phdm", o);
|
|
1464
1542
|
},
|
|
1465
1543
|
saveToFileHandle(t, e) {
|
|
1466
|
-
return
|
|
1544
|
+
return St(t, e);
|
|
1467
1545
|
},
|
|
1468
1546
|
loadFromFile(t) {
|
|
1469
|
-
return
|
|
1547
|
+
return bt(t, g);
|
|
1470
1548
|
},
|
|
1471
1549
|
loadFromInput(t) {
|
|
1472
1550
|
return ft(t, g);
|
|
1473
1551
|
}
|
|
1474
|
-
},
|
|
1552
|
+
}, be = (t) => s(
|
|
1475
1553
|
"SET_MODEL_NAME",
|
|
1476
1554
|
{ ...t }
|
|
1477
1555
|
), fe = (t) => s(
|
|
@@ -1486,13 +1564,13 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1486
1564
|
), Te = (t) => s(
|
|
1487
1565
|
"SET_AUTHOR_NAME",
|
|
1488
1566
|
{ ...t }
|
|
1489
|
-
),
|
|
1567
|
+
), Re = (t) => s(
|
|
1490
1568
|
"SET_AUTHOR_WEBSITE",
|
|
1491
1569
|
{ ...t }
|
|
1492
1570
|
);
|
|
1493
|
-
class
|
|
1571
|
+
class yt extends l {
|
|
1494
1572
|
setModelName(e) {
|
|
1495
|
-
return this.dispatch(
|
|
1573
|
+
return this.dispatch(be(e));
|
|
1496
1574
|
}
|
|
1497
1575
|
setModelId(e) {
|
|
1498
1576
|
return this.dispatch(fe(e));
|
|
@@ -1507,85 +1585,85 @@ class kt extends l {
|
|
|
1507
1585
|
return this.dispatch(Te(e));
|
|
1508
1586
|
}
|
|
1509
1587
|
setAuthorWebsite(e) {
|
|
1510
|
-
return this.dispatch(
|
|
1588
|
+
return this.dispatch(Re(e));
|
|
1511
1589
|
}
|
|
1512
1590
|
}
|
|
1513
|
-
const
|
|
1591
|
+
const Ae = (t) => s(
|
|
1514
1592
|
"ADD_CHANGE_LOG_ITEM",
|
|
1515
1593
|
{ ...t }
|
|
1516
|
-
),
|
|
1594
|
+
), xe = (t) => s(
|
|
1517
1595
|
"UPDATE_CHANGE_LOG_ITEM",
|
|
1518
1596
|
{ ...t }
|
|
1519
1597
|
), De = (t) => s(
|
|
1520
1598
|
"DELETE_CHANGE_LOG_ITEM",
|
|
1521
1599
|
{ ...t }
|
|
1522
|
-
),
|
|
1600
|
+
), Me = (t) => s(
|
|
1523
1601
|
"REORDER_CHANGE_LOG_ITEMS",
|
|
1524
1602
|
{ ...t }
|
|
1525
|
-
),
|
|
1526
|
-
class
|
|
1603
|
+
), Ne = () => s("RELEASE_NEW_VERSION");
|
|
1604
|
+
class wt extends l {
|
|
1527
1605
|
addChangeLogItem(e) {
|
|
1528
|
-
return this.dispatch(
|
|
1606
|
+
return this.dispatch(Ae(e));
|
|
1529
1607
|
}
|
|
1530
1608
|
updateChangeLogItem(e) {
|
|
1531
|
-
return this.dispatch(
|
|
1609
|
+
return this.dispatch(xe(e));
|
|
1532
1610
|
}
|
|
1533
1611
|
deleteChangeLogItem(e) {
|
|
1534
1612
|
return this.dispatch(De(e));
|
|
1535
1613
|
}
|
|
1536
1614
|
reorderChangeLogItems(e) {
|
|
1537
|
-
return this.dispatch(
|
|
1615
|
+
return this.dispatch(Me(e));
|
|
1538
1616
|
}
|
|
1539
1617
|
releaseNewVersion() {
|
|
1540
|
-
return this.dispatch(
|
|
1618
|
+
return this.dispatch(Ne());
|
|
1541
1619
|
}
|
|
1542
1620
|
}
|
|
1543
|
-
const
|
|
1621
|
+
const Le = (t) => s(
|
|
1544
1622
|
"ADD_MODULE",
|
|
1545
1623
|
{ ...t }
|
|
1546
|
-
),
|
|
1624
|
+
), Pe = (t) => s(
|
|
1547
1625
|
"SET_MODULE_NAME",
|
|
1548
1626
|
{ ...t }
|
|
1549
|
-
),
|
|
1627
|
+
), je = (t) => s(
|
|
1550
1628
|
"SET_MODULE_DESCRIPTION",
|
|
1551
1629
|
{ ...t }
|
|
1552
|
-
),
|
|
1630
|
+
), Ce = (t) => s(
|
|
1553
1631
|
"DELETE_MODULE",
|
|
1554
1632
|
{ ...t }
|
|
1555
|
-
),
|
|
1633
|
+
), ke = (t) => s(
|
|
1556
1634
|
"REORDER_MODULES",
|
|
1557
1635
|
{ ...t }
|
|
1558
1636
|
);
|
|
1559
|
-
class
|
|
1637
|
+
class vt extends l {
|
|
1560
1638
|
addModule(e) {
|
|
1561
|
-
return this.dispatch(
|
|
1639
|
+
return this.dispatch(Le(e));
|
|
1562
1640
|
}
|
|
1563
1641
|
setModuleName(e) {
|
|
1564
|
-
return this.dispatch(
|
|
1642
|
+
return this.dispatch(Pe(e));
|
|
1565
1643
|
}
|
|
1566
1644
|
setModuleDescription(e) {
|
|
1567
|
-
return this.dispatch(
|
|
1645
|
+
return this.dispatch(je(e));
|
|
1568
1646
|
}
|
|
1569
1647
|
deleteModule(e) {
|
|
1570
|
-
return this.dispatch(
|
|
1648
|
+
return this.dispatch(Ce(e));
|
|
1571
1649
|
}
|
|
1572
1650
|
reorderModules(e) {
|
|
1573
|
-
return this.dispatch(
|
|
1651
|
+
return this.dispatch(ke(e));
|
|
1574
1652
|
}
|
|
1575
1653
|
}
|
|
1576
|
-
const
|
|
1654
|
+
const ye = (t) => s(
|
|
1577
1655
|
"ADD_OPERATION_ERROR",
|
|
1578
1656
|
{ ...t }
|
|
1579
|
-
),
|
|
1657
|
+
), we = (t) => s(
|
|
1580
1658
|
"SET_OPERATION_ERROR_CODE",
|
|
1581
1659
|
{ ...t }
|
|
1582
|
-
),
|
|
1660
|
+
), ve = (t) => s(
|
|
1583
1661
|
"SET_OPERATION_ERROR_NAME",
|
|
1584
1662
|
{ ...t }
|
|
1585
1663
|
), Ue = (t) => s(
|
|
1586
1664
|
"SET_OPERATION_ERROR_DESCRIPTION",
|
|
1587
1665
|
{ ...t }
|
|
1588
|
-
),
|
|
1666
|
+
), Ve = (t) => s(
|
|
1589
1667
|
"SET_OPERATION_ERROR_TEMPLATE",
|
|
1590
1668
|
{ ...t }
|
|
1591
1669
|
), Fe = (t) => s(
|
|
@@ -1597,19 +1675,19 @@ const ke = (t) => s(
|
|
|
1597
1675
|
);
|
|
1598
1676
|
class Ut extends l {
|
|
1599
1677
|
addOperationError(e) {
|
|
1600
|
-
return this.dispatch(
|
|
1678
|
+
return this.dispatch(ye(e));
|
|
1601
1679
|
}
|
|
1602
1680
|
setOperationErrorCode(e) {
|
|
1603
|
-
return this.dispatch(
|
|
1681
|
+
return this.dispatch(we(e));
|
|
1604
1682
|
}
|
|
1605
1683
|
setOperationErrorName(e) {
|
|
1606
|
-
return this.dispatch(
|
|
1684
|
+
return this.dispatch(ve(e));
|
|
1607
1685
|
}
|
|
1608
1686
|
setOperationErrorDescription(e) {
|
|
1609
1687
|
return this.dispatch(Ue(e));
|
|
1610
1688
|
}
|
|
1611
1689
|
setOperationErrorTemplate(e) {
|
|
1612
|
-
return this.dispatch(
|
|
1690
|
+
return this.dispatch(Ve(e));
|
|
1613
1691
|
}
|
|
1614
1692
|
deleteOperationError(e) {
|
|
1615
1693
|
return this.dispatch(Fe(e));
|
|
@@ -1618,230 +1696,230 @@ class Ut extends l {
|
|
|
1618
1696
|
return this.dispatch(He(e));
|
|
1619
1697
|
}
|
|
1620
1698
|
}
|
|
1621
|
-
const
|
|
1699
|
+
const Xe = (t) => s(
|
|
1622
1700
|
"ADD_OPERATION_EXAMPLE",
|
|
1623
1701
|
{ ...t }
|
|
1624
|
-
),
|
|
1702
|
+
), Ge = (t) => s(
|
|
1625
1703
|
"UPDATE_OPERATION_EXAMPLE",
|
|
1626
1704
|
{ ...t }
|
|
1627
|
-
),
|
|
1705
|
+
), $e = (t) => s(
|
|
1628
1706
|
"DELETE_OPERATION_EXAMPLE",
|
|
1629
1707
|
{ ...t }
|
|
1630
1708
|
), We = (t) => s(
|
|
1631
1709
|
"REORDER_OPERATION_EXAMPLES",
|
|
1632
1710
|
{ ...t }
|
|
1633
1711
|
);
|
|
1634
|
-
class
|
|
1712
|
+
class Vt extends l {
|
|
1635
1713
|
addOperationExample(e) {
|
|
1636
|
-
return this.dispatch(
|
|
1714
|
+
return this.dispatch(Xe(e));
|
|
1637
1715
|
}
|
|
1638
1716
|
updateOperationExample(e) {
|
|
1639
|
-
return this.dispatch(
|
|
1717
|
+
return this.dispatch(Ge(e));
|
|
1640
1718
|
}
|
|
1641
1719
|
deleteOperationExample(e) {
|
|
1642
|
-
return this.dispatch(
|
|
1720
|
+
return this.dispatch($e(e));
|
|
1643
1721
|
}
|
|
1644
1722
|
reorderOperationExamples(e) {
|
|
1645
1723
|
return this.dispatch(We(e));
|
|
1646
1724
|
}
|
|
1647
1725
|
}
|
|
1648
|
-
const
|
|
1726
|
+
const ze = (t) => s(
|
|
1649
1727
|
"ADD_OPERATION",
|
|
1650
1728
|
{ ...t }
|
|
1651
|
-
),
|
|
1729
|
+
), Be = (t) => s(
|
|
1652
1730
|
"SET_OPERATION_NAME",
|
|
1653
1731
|
{ ...t }
|
|
1654
|
-
),
|
|
1732
|
+
), qe = (t) => s(
|
|
1655
1733
|
"SET_OPERATION_SCOPE",
|
|
1656
1734
|
{ ...t }
|
|
1657
|
-
),
|
|
1735
|
+
), Je = (t) => s(
|
|
1658
1736
|
"SET_OPERATION_SCHEMA",
|
|
1659
1737
|
{ ...t }
|
|
1660
|
-
),
|
|
1738
|
+
), Ke = (t) => s(
|
|
1661
1739
|
"SET_OPERATION_DESCRIPTION",
|
|
1662
1740
|
{ ...t }
|
|
1663
|
-
),
|
|
1741
|
+
), Qe = (t) => s(
|
|
1664
1742
|
"SET_OPERATION_TEMPLATE",
|
|
1665
1743
|
{ ...t }
|
|
1666
|
-
),
|
|
1744
|
+
), Ye = (t) => s(
|
|
1667
1745
|
"SET_OPERATION_REDUCER",
|
|
1668
1746
|
{ ...t }
|
|
1669
|
-
),
|
|
1747
|
+
), Ze = (t) => s(
|
|
1670
1748
|
"MOVE_OPERATION",
|
|
1671
1749
|
{ ...t }
|
|
1672
|
-
),
|
|
1750
|
+
), et = (t) => s(
|
|
1673
1751
|
"DELETE_OPERATION",
|
|
1674
1752
|
{ ...t }
|
|
1675
|
-
),
|
|
1753
|
+
), tt = (t) => s(
|
|
1676
1754
|
"REORDER_MODULE_OPERATIONS",
|
|
1677
1755
|
{ ...t }
|
|
1678
1756
|
);
|
|
1679
1757
|
class Ft extends l {
|
|
1680
1758
|
addOperation(e) {
|
|
1681
|
-
return this.dispatch(
|
|
1759
|
+
return this.dispatch(ze(e));
|
|
1682
1760
|
}
|
|
1683
1761
|
setOperationName(e) {
|
|
1684
|
-
return this.dispatch(
|
|
1762
|
+
return this.dispatch(Be(e));
|
|
1685
1763
|
}
|
|
1686
1764
|
setOperationScope(e) {
|
|
1687
|
-
return this.dispatch(
|
|
1765
|
+
return this.dispatch(qe(e));
|
|
1688
1766
|
}
|
|
1689
1767
|
setOperationSchema(e) {
|
|
1690
|
-
return this.dispatch(
|
|
1768
|
+
return this.dispatch(Je(e));
|
|
1691
1769
|
}
|
|
1692
1770
|
setOperationDescription(e) {
|
|
1693
|
-
return this.dispatch(
|
|
1771
|
+
return this.dispatch(Ke(e));
|
|
1694
1772
|
}
|
|
1695
1773
|
setOperationTemplate(e) {
|
|
1696
|
-
return this.dispatch(
|
|
1774
|
+
return this.dispatch(Qe(e));
|
|
1697
1775
|
}
|
|
1698
1776
|
setOperationReducer(e) {
|
|
1699
|
-
return this.dispatch(
|
|
1777
|
+
return this.dispatch(Ye(e));
|
|
1700
1778
|
}
|
|
1701
1779
|
moveOperation(e) {
|
|
1702
|
-
return this.dispatch(
|
|
1780
|
+
return this.dispatch(Ze(e));
|
|
1703
1781
|
}
|
|
1704
1782
|
deleteOperation(e) {
|
|
1705
|
-
return this.dispatch(
|
|
1783
|
+
return this.dispatch(et(e));
|
|
1706
1784
|
}
|
|
1707
1785
|
reorderModuleOperations(e) {
|
|
1708
|
-
return this.dispatch(
|
|
1786
|
+
return this.dispatch(tt(e));
|
|
1709
1787
|
}
|
|
1710
1788
|
}
|
|
1711
|
-
const
|
|
1789
|
+
const rt = (t) => s(
|
|
1712
1790
|
"SET_STATE_SCHEMA",
|
|
1713
1791
|
{ ...t }
|
|
1714
|
-
),
|
|
1792
|
+
), ot = (t) => s(
|
|
1715
1793
|
"SET_INITIAL_STATE",
|
|
1716
1794
|
{ ...t }
|
|
1717
|
-
),
|
|
1795
|
+
), nt = (t) => s(
|
|
1718
1796
|
"ADD_STATE_EXAMPLE",
|
|
1719
1797
|
{ ...t }
|
|
1720
|
-
),
|
|
1798
|
+
), it = (t) => s(
|
|
1721
1799
|
"UPDATE_STATE_EXAMPLE",
|
|
1722
1800
|
{ ...t }
|
|
1723
|
-
),
|
|
1801
|
+
), st = (t) => s(
|
|
1724
1802
|
"DELETE_STATE_EXAMPLE",
|
|
1725
1803
|
{ ...t }
|
|
1726
|
-
),
|
|
1804
|
+
), at = (t) => s(
|
|
1727
1805
|
"REORDER_STATE_EXAMPLES",
|
|
1728
1806
|
{ ...t }
|
|
1729
1807
|
);
|
|
1730
1808
|
class Ht extends l {
|
|
1731
1809
|
setStateSchema(e) {
|
|
1732
|
-
return this.dispatch(
|
|
1810
|
+
return this.dispatch(rt(e));
|
|
1733
1811
|
}
|
|
1734
1812
|
setInitialState(e) {
|
|
1735
|
-
return this.dispatch(
|
|
1813
|
+
return this.dispatch(ot(e));
|
|
1736
1814
|
}
|
|
1737
1815
|
addStateExample(e) {
|
|
1738
|
-
return this.dispatch(
|
|
1816
|
+
return this.dispatch(nt(e));
|
|
1739
1817
|
}
|
|
1740
1818
|
updateStateExample(e) {
|
|
1741
|
-
return this.dispatch(
|
|
1819
|
+
return this.dispatch(it(e));
|
|
1742
1820
|
}
|
|
1743
1821
|
deleteStateExample(e) {
|
|
1744
|
-
return this.dispatch(
|
|
1822
|
+
return this.dispatch(st(e));
|
|
1745
1823
|
}
|
|
1746
1824
|
reorderStateExamples(e) {
|
|
1747
|
-
return this.dispatch(
|
|
1825
|
+
return this.dispatch(at(e));
|
|
1748
1826
|
}
|
|
1749
1827
|
}
|
|
1750
1828
|
var m;
|
|
1751
|
-
let
|
|
1752
|
-
constructor(e,
|
|
1753
|
-
super(g, O.createDocument(e),
|
|
1829
|
+
let pe = (m = class extends l {
|
|
1830
|
+
constructor(e, o) {
|
|
1831
|
+
super(g, O.createDocument(e), o);
|
|
1754
1832
|
}
|
|
1755
|
-
saveToFile(e,
|
|
1756
|
-
return super.saveToFile(e, m.fileExtension,
|
|
1833
|
+
saveToFile(e, o) {
|
|
1834
|
+
return super.saveToFile(e, m.fileExtension, o);
|
|
1757
1835
|
}
|
|
1758
1836
|
loadFromFile(e) {
|
|
1759
1837
|
return super.loadFromFile(e);
|
|
1760
1838
|
}
|
|
1761
1839
|
static async fromFile(e) {
|
|
1762
|
-
const
|
|
1763
|
-
return await
|
|
1840
|
+
const o = new this();
|
|
1841
|
+
return await o.loadFromFile(e), o;
|
|
1764
1842
|
}
|
|
1765
|
-
},
|
|
1766
|
-
_t(
|
|
1767
|
-
kt,
|
|
1843
|
+
}, le(m, "fileExtension", "phdm"), m);
|
|
1844
|
+
_t(pe, [
|
|
1768
1845
|
yt,
|
|
1769
1846
|
wt,
|
|
1770
|
-
Ut,
|
|
1771
1847
|
vt,
|
|
1848
|
+
Ut,
|
|
1849
|
+
Vt,
|
|
1772
1850
|
Ft,
|
|
1773
1851
|
Ht
|
|
1774
1852
|
]);
|
|
1775
|
-
const
|
|
1853
|
+
const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1776
1854
|
__proto__: null,
|
|
1777
|
-
addChangeLogItem:
|
|
1778
|
-
addModule:
|
|
1779
|
-
addOperation:
|
|
1780
|
-
addOperationError:
|
|
1781
|
-
addOperationExample:
|
|
1782
|
-
addStateExample:
|
|
1855
|
+
addChangeLogItem: Ae,
|
|
1856
|
+
addModule: Le,
|
|
1857
|
+
addOperation: ze,
|
|
1858
|
+
addOperationError: ye,
|
|
1859
|
+
addOperationExample: Xe,
|
|
1860
|
+
addStateExample: nt,
|
|
1783
1861
|
deleteChangeLogItem: De,
|
|
1784
|
-
deleteModule:
|
|
1785
|
-
deleteOperation:
|
|
1862
|
+
deleteModule: Ce,
|
|
1863
|
+
deleteOperation: et,
|
|
1786
1864
|
deleteOperationError: Fe,
|
|
1787
|
-
deleteOperationExample:
|
|
1788
|
-
deleteStateExample:
|
|
1789
|
-
moveOperation:
|
|
1790
|
-
releaseNewVersion:
|
|
1791
|
-
reorderChangeLogItems:
|
|
1792
|
-
reorderModuleOperations:
|
|
1793
|
-
reorderModules:
|
|
1865
|
+
deleteOperationExample: $e,
|
|
1866
|
+
deleteStateExample: st,
|
|
1867
|
+
moveOperation: Ze,
|
|
1868
|
+
releaseNewVersion: Ne,
|
|
1869
|
+
reorderChangeLogItems: Me,
|
|
1870
|
+
reorderModuleOperations: tt,
|
|
1871
|
+
reorderModules: ke,
|
|
1794
1872
|
reorderOperationErrors: He,
|
|
1795
1873
|
reorderOperationExamples: We,
|
|
1796
|
-
reorderStateExamples:
|
|
1874
|
+
reorderStateExamples: at,
|
|
1797
1875
|
setAuthorName: Te,
|
|
1798
|
-
setAuthorWebsite:
|
|
1799
|
-
setInitialState:
|
|
1876
|
+
setAuthorWebsite: Re,
|
|
1877
|
+
setInitialState: ot,
|
|
1800
1878
|
setModelDescription: Ie,
|
|
1801
1879
|
setModelExtension: _e,
|
|
1802
1880
|
setModelId: fe,
|
|
1803
|
-
setModelName:
|
|
1804
|
-
setModuleDescription:
|
|
1805
|
-
setModuleName:
|
|
1806
|
-
setOperationDescription:
|
|
1807
|
-
setOperationErrorCode:
|
|
1881
|
+
setModelName: be,
|
|
1882
|
+
setModuleDescription: je,
|
|
1883
|
+
setModuleName: Pe,
|
|
1884
|
+
setOperationDescription: Ke,
|
|
1885
|
+
setOperationErrorCode: we,
|
|
1808
1886
|
setOperationErrorDescription: Ue,
|
|
1809
|
-
setOperationErrorName:
|
|
1810
|
-
setOperationErrorTemplate:
|
|
1811
|
-
setOperationName:
|
|
1812
|
-
setOperationReducer:
|
|
1813
|
-
setOperationSchema:
|
|
1814
|
-
setOperationScope:
|
|
1815
|
-
setOperationTemplate:
|
|
1816
|
-
setStateSchema:
|
|
1817
|
-
updateChangeLogItem:
|
|
1818
|
-
updateOperationExample:
|
|
1819
|
-
updateStateExample:
|
|
1820
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1821
|
-
Document:
|
|
1887
|
+
setOperationErrorName: ve,
|
|
1888
|
+
setOperationErrorTemplate: Ve,
|
|
1889
|
+
setOperationName: Be,
|
|
1890
|
+
setOperationReducer: Ye,
|
|
1891
|
+
setOperationSchema: Je,
|
|
1892
|
+
setOperationScope: qe,
|
|
1893
|
+
setOperationTemplate: Qe,
|
|
1894
|
+
setStateSchema: rt,
|
|
1895
|
+
updateChangeLogItem: xe,
|
|
1896
|
+
updateOperationExample: Ge,
|
|
1897
|
+
updateStateExample: it
|
|
1898
|
+
}, Symbol.toStringTag, { value: "Module" })), pt = pe, lt = { ...O, ...Tt }, ct = { ...It, ...Xt }, Gt = {
|
|
1899
|
+
Document: pt,
|
|
1822
1900
|
reducer: g,
|
|
1823
|
-
actions:
|
|
1824
|
-
utils:
|
|
1825
|
-
documentModel:
|
|
1826
|
-
},
|
|
1901
|
+
actions: ct,
|
|
1902
|
+
utils: lt,
|
|
1903
|
+
documentModel: ce
|
|
1904
|
+
}, er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1827
1905
|
__proto__: null,
|
|
1828
|
-
Document:
|
|
1829
|
-
DocumentModel:
|
|
1830
|
-
actions:
|
|
1831
|
-
documentModel:
|
|
1832
|
-
module:
|
|
1906
|
+
Document: pt,
|
|
1907
|
+
DocumentModel: pe,
|
|
1908
|
+
actions: ct,
|
|
1909
|
+
documentModel: ce,
|
|
1910
|
+
module: Gt,
|
|
1833
1911
|
reducer: g,
|
|
1834
|
-
utils:
|
|
1912
|
+
utils: lt,
|
|
1835
1913
|
z: Dt
|
|
1836
1914
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1837
1915
|
export {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1916
|
+
er as D,
|
|
1917
|
+
pe as a,
|
|
1918
|
+
pt as b,
|
|
1919
|
+
ct as c,
|
|
1920
|
+
ce as d,
|
|
1921
|
+
Gt as m,
|
|
1844
1922
|
g as r,
|
|
1845
|
-
|
|
1923
|
+
lt as u,
|
|
1846
1924
|
Dt as z
|
|
1847
1925
|
};
|