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