document-model 1.0.22 → 1.0.23
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-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +4 -4
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/{index-k0_xGFJa.js → index-8aac3662.js} +400 -398
- package/dist/browser/internal/index-8fceb2dc.js +1 -0
- package/dist/browser/internal/index-cd28e4ab.js +22 -0
- package/dist/browser/internal/index-e127ba7e.js +36 -0
- package/dist/browser/internal/{object-wtPuW7QY.js → object-67d1240b.js} +409 -359
- package/dist/browser/internal/object-ba4e810d.js +6 -0
- package/dist/browser/src/document/actions/creators.d.ts +3 -2
- package/dist/browser/src/document/actions/types.d.ts +1 -1
- package/dist/browser/src/document/object.d.ts +58 -2
- package/dist/browser/src/document/reducer.d.ts +2 -2
- package/dist/browser/src/document/schema/types.d.ts +9 -3
- package/dist/browser/src/document/signal.d.ts +7 -1
- package/dist/browser/src/document/types.d.ts +12 -1
- package/dist/browser/src/document/utils/base.d.ts +15 -2
- package/dist/browser/src/document-model/gen/header/object.d.ts +7 -6
- package/dist/browser/src/document-model/gen/module/object.d.ts +6 -5
- package/dist/browser/src/document-model/gen/operation/object.d.ts +11 -10
- package/dist/browser/src/document-model/gen/operation-error/object.d.ts +8 -7
- package/dist/browser/src/document-model/gen/operation-example/object.d.ts +5 -4
- package/dist/browser/src/document-model/gen/reducer.d.ts +2 -0
- package/dist/browser/src/document-model/gen/state/object.d.ts +7 -6
- package/dist/browser/src/document-model/gen/versioning/object.d.ts +6 -5
- package/dist/browser/src/document-model/index.d.ts +2 -1
- package/dist/browser/test/document/skip-operations.test.d.ts +1 -0
- package/dist/browser/test/document-model/skip-operations.test.d.ts +1 -0
- package/dist/browser/test/helpers.d.ts +5 -2
- 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 +4 -4
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/index-ac24dd92.js +36 -0
- package/dist/node/internal/index-c75a9c7a.js +1 -0
- package/dist/node/internal/{index-vqhz-N10.js → index-e9f12d45.js} +400 -398
- package/dist/node/internal/index-f04f94a6.js +22 -0
- package/dist/node/internal/object-10b89c54.js +1 -0
- package/dist/node/internal/{object-yzJ3jRpE.js → object-cb276649.js} +317 -267
- package/dist/node/src/document/actions/creators.d.ts +3 -2
- package/dist/node/src/document/actions/types.d.ts +1 -1
- package/dist/node/src/document/object.d.ts +58 -2
- package/dist/node/src/document/reducer.d.ts +2 -2
- package/dist/node/src/document/schema/types.d.ts +9 -3
- package/dist/node/src/document/signal.d.ts +7 -1
- package/dist/node/src/document/types.d.ts +12 -1
- package/dist/node/src/document/utils/base.d.ts +15 -2
- package/dist/node/src/document-model/gen/header/object.d.ts +7 -6
- package/dist/node/src/document-model/gen/module/object.d.ts +6 -5
- package/dist/node/src/document-model/gen/operation/object.d.ts +11 -10
- package/dist/node/src/document-model/gen/operation-error/object.d.ts +8 -7
- package/dist/node/src/document-model/gen/operation-example/object.d.ts +5 -4
- package/dist/node/src/document-model/gen/reducer.d.ts +2 -0
- package/dist/node/src/document-model/gen/state/object.d.ts +7 -6
- package/dist/node/src/document-model/gen/versioning/object.d.ts +6 -5
- package/dist/node/src/document-model/index.d.ts +2 -1
- package/dist/node/test/document/skip-operations.test.d.ts +1 -0
- package/dist/node/test/document-model/skip-operations.test.d.ts +1 -0
- package/dist/node/test/helpers.d.ts +5 -2
- package/package.json +1 -1
- package/dist/browser/internal/index-BGvdUwMj.js +0 -1
- package/dist/browser/internal/index-ZaSXpgfR.js +0 -22
- package/dist/browser/internal/index-vHDbgY8i.js +0 -34
- package/dist/browser/internal/object-fIfH8K9b.js +0 -6
- package/dist/node/internal/index-3_D7m254.js +0 -34
- package/dist/node/internal/index-ffEJwj4v.js +0 -22
- package/dist/node/internal/index-frYzO4l6.js +0 -1
- package/dist/node/internal/object-Vf10stKL.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ut = Object.defineProperty;
|
|
2
|
-
var mt = (t, e,
|
|
3
|
-
var ce = (t, e,
|
|
4
|
-
import { c as Et, i as ht, a as Ot, b as gt, s as St, d as bt, l as ft, e as _t, f as s, B as l, g as It, h as Tt } from "./object-
|
|
2
|
+
var mt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var ce = (t, e, r) => (mt(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { c as Et, i as ht, a as Ot, b as gt, s as St, d as bt, l as ft, e as _t, f as s, B as l, g as It, h as Tt } from "./object-cb276649.js";
|
|
5
5
|
import "json-stringify-deterministic";
|
|
6
6
|
import "immer";
|
|
7
7
|
import "jszip";
|
|
@@ -9,7 +9,7 @@ import "crypto";
|
|
|
9
9
|
import "fs";
|
|
10
10
|
import "https";
|
|
11
11
|
import "path";
|
|
12
|
-
import { z as
|
|
12
|
+
import { z as o } from "zod";
|
|
13
13
|
const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
14
|
__proto__: null
|
|
15
15
|
}, Symbol.toStringTag, { value: "Module" })), de = {
|
|
@@ -573,110 +573,110 @@ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
]
|
|
576
|
-
}, ue = (t) => t != null, At =
|
|
576
|
+
}, ue = (t) => t != null, At = o.any().refine((t) => ue(t));
|
|
577
577
|
function _() {
|
|
578
|
-
return
|
|
579
|
-
__typename:
|
|
580
|
-
content:
|
|
581
|
-
id:
|
|
582
|
-
insertBefore:
|
|
578
|
+
return o.object({
|
|
579
|
+
__typename: o.literal("AddChangeLogItemInput").optional(),
|
|
580
|
+
content: o.string(),
|
|
581
|
+
id: o.string(),
|
|
582
|
+
insertBefore: o.string().nullable()
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
585
|
function I() {
|
|
586
|
-
return
|
|
587
|
-
description:
|
|
588
|
-
id:
|
|
589
|
-
name:
|
|
586
|
+
return o.object({
|
|
587
|
+
description: o.string().nullish(),
|
|
588
|
+
id: o.string(),
|
|
589
|
+
name: o.string()
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
592
|
function T() {
|
|
593
|
-
return
|
|
594
|
-
errorCode:
|
|
595
|
-
errorDescription:
|
|
596
|
-
errorName:
|
|
597
|
-
errorTemplate:
|
|
598
|
-
id:
|
|
599
|
-
operationId:
|
|
593
|
+
return o.object({
|
|
594
|
+
errorCode: o.string().nullish(),
|
|
595
|
+
errorDescription: o.string().nullish(),
|
|
596
|
+
errorName: o.string().nullish(),
|
|
597
|
+
errorTemplate: o.string().nullish(),
|
|
598
|
+
id: o.string(),
|
|
599
|
+
operationId: o.string()
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
function R() {
|
|
603
|
-
return
|
|
604
|
-
example:
|
|
605
|
-
id:
|
|
606
|
-
operationId:
|
|
603
|
+
return o.object({
|
|
604
|
+
example: o.string(),
|
|
605
|
+
id: o.string(),
|
|
606
|
+
operationId: o.string()
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
function A() {
|
|
610
|
-
return
|
|
611
|
-
description:
|
|
612
|
-
id:
|
|
613
|
-
moduleId:
|
|
614
|
-
name:
|
|
615
|
-
reducer:
|
|
616
|
-
schema:
|
|
617
|
-
template:
|
|
610
|
+
return o.object({
|
|
611
|
+
description: o.string().nullish(),
|
|
612
|
+
id: o.string(),
|
|
613
|
+
moduleId: o.string(),
|
|
614
|
+
name: o.string(),
|
|
615
|
+
reducer: o.string().nullish(),
|
|
616
|
+
schema: o.string().nullish(),
|
|
617
|
+
template: o.string().nullish(),
|
|
618
618
|
scope: b().nullish()
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
function x() {
|
|
622
|
-
return
|
|
623
|
-
scope:
|
|
624
|
-
example:
|
|
625
|
-
id:
|
|
626
|
-
insertBefore:
|
|
622
|
+
return o.object({
|
|
623
|
+
scope: o.string(),
|
|
624
|
+
example: o.string(),
|
|
625
|
+
id: o.string(),
|
|
626
|
+
insertBefore: o.string().nullish()
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
629
|
function me() {
|
|
630
|
-
return
|
|
631
|
-
__typename:
|
|
632
|
-
name:
|
|
633
|
-
website:
|
|
630
|
+
return o.object({
|
|
631
|
+
__typename: o.literal("Author").optional(),
|
|
632
|
+
name: o.string(),
|
|
633
|
+
website: o.string().nullable()
|
|
634
634
|
});
|
|
635
635
|
}
|
|
636
636
|
function D() {
|
|
637
|
-
return
|
|
638
|
-
__typename:
|
|
639
|
-
id:
|
|
640
|
-
value:
|
|
637
|
+
return o.object({
|
|
638
|
+
__typename: o.literal("CodeExample").optional(),
|
|
639
|
+
id: o.string(),
|
|
640
|
+
value: o.string()
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
function M() {
|
|
644
|
-
return
|
|
645
|
-
__typename:
|
|
646
|
-
id:
|
|
644
|
+
return o.object({
|
|
645
|
+
__typename: o.literal("DeleteChangeLogItemInput").optional(),
|
|
646
|
+
id: o.string()
|
|
647
647
|
});
|
|
648
648
|
}
|
|
649
649
|
function N() {
|
|
650
|
-
return
|
|
651
|
-
id:
|
|
650
|
+
return o.object({
|
|
651
|
+
id: o.string()
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
654
|
function L() {
|
|
655
|
-
return
|
|
656
|
-
id:
|
|
655
|
+
return o.object({
|
|
656
|
+
id: o.string()
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
function P() {
|
|
660
|
-
return
|
|
661
|
-
id:
|
|
660
|
+
return o.object({
|
|
661
|
+
id: o.string()
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
function j() {
|
|
665
|
-
return
|
|
666
|
-
id:
|
|
665
|
+
return o.object({
|
|
666
|
+
id: o.string()
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
669
|
function C() {
|
|
670
|
-
return
|
|
671
|
-
scope:
|
|
672
|
-
id:
|
|
670
|
+
return o.object({
|
|
671
|
+
scope: o.string(),
|
|
672
|
+
id: o.string()
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
675
|
function b() {
|
|
676
|
-
return
|
|
676
|
+
return o.literal("global").or(o.literal("local"));
|
|
677
677
|
}
|
|
678
678
|
function xt() {
|
|
679
|
-
return
|
|
679
|
+
return o.union([
|
|
680
680
|
_(),
|
|
681
681
|
I(),
|
|
682
682
|
T(),
|
|
@@ -721,245 +721,245 @@ function xt() {
|
|
|
721
721
|
]);
|
|
722
722
|
}
|
|
723
723
|
function Dt() {
|
|
724
|
-
return
|
|
725
|
-
__typename:
|
|
724
|
+
return o.object({
|
|
725
|
+
__typename: o.literal("DocumentModelState").optional(),
|
|
726
726
|
author: me(),
|
|
727
|
-
description:
|
|
728
|
-
extension:
|
|
729
|
-
id:
|
|
730
|
-
name:
|
|
731
|
-
specifications:
|
|
727
|
+
description: o.string(),
|
|
728
|
+
extension: o.string(),
|
|
729
|
+
id: o.string(),
|
|
730
|
+
name: o.string(),
|
|
731
|
+
specifications: o.array(Ee())
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
734
|
function Ee() {
|
|
735
|
-
return
|
|
736
|
-
__typename:
|
|
737
|
-
changeLog:
|
|
738
|
-
modules:
|
|
735
|
+
return o.object({
|
|
736
|
+
__typename: o.literal("DocumentSpecification").optional(),
|
|
737
|
+
changeLog: o.array(o.string()),
|
|
738
|
+
modules: o.array(he()),
|
|
739
739
|
state: be(),
|
|
740
|
-
version:
|
|
740
|
+
version: o.number()
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
743
|
function he() {
|
|
744
|
-
return
|
|
745
|
-
__typename:
|
|
746
|
-
description:
|
|
747
|
-
id:
|
|
748
|
-
name:
|
|
749
|
-
operations:
|
|
744
|
+
return o.object({
|
|
745
|
+
__typename: o.literal("Module").optional(),
|
|
746
|
+
description: o.string().nullable(),
|
|
747
|
+
id: o.string(),
|
|
748
|
+
name: o.string(),
|
|
749
|
+
operations: o.array(Oe())
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
function k() {
|
|
753
|
-
return
|
|
754
|
-
newModuleId:
|
|
755
|
-
operationId:
|
|
753
|
+
return o.object({
|
|
754
|
+
newModuleId: o.string(),
|
|
755
|
+
operationId: o.string()
|
|
756
756
|
});
|
|
757
757
|
}
|
|
758
758
|
function Oe() {
|
|
759
|
-
return
|
|
760
|
-
__typename:
|
|
761
|
-
description:
|
|
762
|
-
errors:
|
|
763
|
-
examples:
|
|
764
|
-
id:
|
|
765
|
-
name:
|
|
766
|
-
reducer:
|
|
767
|
-
schema:
|
|
768
|
-
template:
|
|
759
|
+
return o.object({
|
|
760
|
+
__typename: o.literal("Operation").optional(),
|
|
761
|
+
description: o.string().nullable(),
|
|
762
|
+
errors: o.array(ge()),
|
|
763
|
+
examples: o.array(D()),
|
|
764
|
+
id: o.string(),
|
|
765
|
+
name: o.string().nullable(),
|
|
766
|
+
reducer: o.string().nullable(),
|
|
767
|
+
schema: o.string().nullable(),
|
|
768
|
+
template: o.string().nullable(),
|
|
769
769
|
scope: b()
|
|
770
770
|
});
|
|
771
771
|
}
|
|
772
772
|
function ge() {
|
|
773
|
-
return
|
|
774
|
-
__typename:
|
|
775
|
-
code:
|
|
776
|
-
description:
|
|
777
|
-
id:
|
|
778
|
-
name:
|
|
779
|
-
template:
|
|
773
|
+
return o.object({
|
|
774
|
+
__typename: o.literal("OperationError").optional(),
|
|
775
|
+
code: o.string().nullable(),
|
|
776
|
+
description: o.string().nullable(),
|
|
777
|
+
id: o.string(),
|
|
778
|
+
name: o.string().nullable(),
|
|
779
|
+
template: o.string().nullable()
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
function y() {
|
|
783
|
-
return
|
|
784
|
-
__typename:
|
|
785
|
-
order:
|
|
783
|
+
return o.object({
|
|
784
|
+
__typename: o.literal("ReorderChangeLogItemsInput").optional(),
|
|
785
|
+
order: o.array(o.string())
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
function w() {
|
|
789
|
-
return
|
|
790
|
-
moduleId:
|
|
791
|
-
order:
|
|
789
|
+
return o.object({
|
|
790
|
+
moduleId: o.string(),
|
|
791
|
+
order: o.array(o.string())
|
|
792
792
|
});
|
|
793
793
|
}
|
|
794
794
|
function v() {
|
|
795
|
-
return
|
|
796
|
-
order:
|
|
795
|
+
return o.object({
|
|
796
|
+
order: o.array(o.string())
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
function U() {
|
|
800
|
-
return
|
|
801
|
-
operationId:
|
|
802
|
-
order:
|
|
800
|
+
return o.object({
|
|
801
|
+
operationId: o.string(),
|
|
802
|
+
order: o.array(o.string())
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
function V() {
|
|
806
|
-
return
|
|
807
|
-
operationId:
|
|
808
|
-
order:
|
|
806
|
+
return o.object({
|
|
807
|
+
operationId: o.string(),
|
|
808
|
+
order: o.array(o.string())
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
811
|
function F() {
|
|
812
|
-
return
|
|
813
|
-
scope:
|
|
814
|
-
order:
|
|
812
|
+
return o.object({
|
|
813
|
+
scope: o.string(),
|
|
814
|
+
order: o.array(o.string())
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
817
|
function H() {
|
|
818
|
-
return
|
|
819
|
-
authorName:
|
|
818
|
+
return o.object({
|
|
819
|
+
authorName: o.string()
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
822
|
function X() {
|
|
823
|
-
return
|
|
824
|
-
authorWebsite:
|
|
823
|
+
return o.object({
|
|
824
|
+
authorWebsite: o.string()
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
827
|
function G() {
|
|
828
|
-
return
|
|
829
|
-
scope:
|
|
830
|
-
initialValue:
|
|
828
|
+
return o.object({
|
|
829
|
+
scope: o.string(),
|
|
830
|
+
initialValue: o.string()
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
833
|
function $() {
|
|
834
|
-
return
|
|
835
|
-
description:
|
|
834
|
+
return o.object({
|
|
835
|
+
description: o.string()
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
function W() {
|
|
839
|
-
return
|
|
840
|
-
extension:
|
|
839
|
+
return o.object({
|
|
840
|
+
extension: o.string()
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
843
|
function z() {
|
|
844
|
-
return
|
|
845
|
-
id:
|
|
844
|
+
return o.object({
|
|
845
|
+
id: o.string()
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
function B() {
|
|
849
|
-
return
|
|
850
|
-
name:
|
|
849
|
+
return o.object({
|
|
850
|
+
name: o.string()
|
|
851
851
|
});
|
|
852
852
|
}
|
|
853
853
|
function q() {
|
|
854
|
-
return
|
|
855
|
-
description:
|
|
856
|
-
id:
|
|
854
|
+
return o.object({
|
|
855
|
+
description: o.string().nullish(),
|
|
856
|
+
id: o.string()
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
859
|
function J() {
|
|
860
|
-
return
|
|
861
|
-
id:
|
|
862
|
-
name:
|
|
860
|
+
return o.object({
|
|
861
|
+
id: o.string(),
|
|
862
|
+
name: o.string().nullish()
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
function K() {
|
|
866
|
-
return
|
|
867
|
-
description:
|
|
868
|
-
id:
|
|
866
|
+
return o.object({
|
|
867
|
+
description: o.string().nullish(),
|
|
868
|
+
id: o.string()
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
871
|
function Q() {
|
|
872
|
-
return
|
|
873
|
-
errorCode:
|
|
874
|
-
id:
|
|
872
|
+
return o.object({
|
|
873
|
+
errorCode: o.string().nullish(),
|
|
874
|
+
id: o.string()
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
function Y() {
|
|
878
|
-
return
|
|
879
|
-
errorDescription:
|
|
880
|
-
id:
|
|
878
|
+
return o.object({
|
|
879
|
+
errorDescription: o.string().nullish(),
|
|
880
|
+
id: o.string()
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
function Z() {
|
|
884
|
-
return
|
|
885
|
-
errorName:
|
|
886
|
-
id:
|
|
884
|
+
return o.object({
|
|
885
|
+
errorName: o.string().nullish(),
|
|
886
|
+
id: o.string()
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
function ee() {
|
|
890
|
-
return
|
|
891
|
-
errorTemplate:
|
|
892
|
-
id:
|
|
890
|
+
return o.object({
|
|
891
|
+
errorTemplate: o.string().nullish(),
|
|
892
|
+
id: o.string()
|
|
893
893
|
});
|
|
894
894
|
}
|
|
895
895
|
function te() {
|
|
896
|
-
return
|
|
897
|
-
id:
|
|
898
|
-
name:
|
|
896
|
+
return o.object({
|
|
897
|
+
id: o.string(),
|
|
898
|
+
name: o.string().nullish()
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
901
|
function Se() {
|
|
902
|
-
return
|
|
903
|
-
id:
|
|
902
|
+
return o.object({
|
|
903
|
+
id: o.string(),
|
|
904
904
|
scope: b()
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
function re() {
|
|
908
|
-
return
|
|
909
|
-
id:
|
|
910
|
-
reducer:
|
|
908
|
+
return o.object({
|
|
909
|
+
id: o.string(),
|
|
910
|
+
reducer: o.string().nullish()
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
913
|
function oe() {
|
|
914
|
-
return
|
|
915
|
-
id:
|
|
916
|
-
schema:
|
|
914
|
+
return o.object({
|
|
915
|
+
id: o.string(),
|
|
916
|
+
schema: o.string().nullish()
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
function ne() {
|
|
920
|
-
return
|
|
921
|
-
id:
|
|
922
|
-
template:
|
|
920
|
+
return o.object({
|
|
921
|
+
id: o.string(),
|
|
922
|
+
template: o.string().nullish()
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
function ie() {
|
|
926
|
-
return
|
|
927
|
-
scope:
|
|
928
|
-
schema:
|
|
926
|
+
return o.object({
|
|
927
|
+
scope: o.string(),
|
|
928
|
+
schema: o.string()
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
function f() {
|
|
932
|
-
return
|
|
933
|
-
__typename:
|
|
934
|
-
examples:
|
|
935
|
-
initialValue:
|
|
936
|
-
schema:
|
|
932
|
+
return o.object({
|
|
933
|
+
__typename: o.literal("State").optional(),
|
|
934
|
+
examples: o.array(D()),
|
|
935
|
+
initialValue: o.string(),
|
|
936
|
+
schema: o.string()
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
939
|
function be() {
|
|
940
|
-
return
|
|
940
|
+
return o.object({
|
|
941
941
|
global: f(),
|
|
942
942
|
local: f()
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
945
|
function se() {
|
|
946
|
-
return
|
|
947
|
-
__typename:
|
|
948
|
-
id:
|
|
949
|
-
newContent:
|
|
946
|
+
return o.object({
|
|
947
|
+
__typename: o.literal("UpdateChangeLogItemInput").optional(),
|
|
948
|
+
id: o.string(),
|
|
949
|
+
newContent: o.string()
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
function ae() {
|
|
953
|
-
return
|
|
954
|
-
example:
|
|
955
|
-
id:
|
|
953
|
+
return o.object({
|
|
954
|
+
example: o.string(),
|
|
955
|
+
id: o.string()
|
|
956
956
|
});
|
|
957
957
|
}
|
|
958
958
|
function pe() {
|
|
959
|
-
return
|
|
960
|
-
scope:
|
|
961
|
-
id:
|
|
962
|
-
newExample:
|
|
959
|
+
return o.object({
|
|
960
|
+
scope: o.string(),
|
|
961
|
+
id: o.string(),
|
|
962
|
+
newExample: o.string()
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
965
|
const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1056,7 +1056,7 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1056
1056
|
}
|
|
1057
1057
|
}, Nt = (t) => {
|
|
1058
1058
|
const e = {};
|
|
1059
|
-
return t.forEach((
|
|
1059
|
+
return t.forEach((r, n) => e[r] = n), (r, n) => (e[n.id] || 999999) - (e[r.id] || 999999);
|
|
1060
1060
|
}, h = {
|
|
1061
1061
|
addModuleOperation(t, e) {
|
|
1062
1062
|
t.specifications[t.specifications.length - 1].modules.push({
|
|
@@ -1067,18 +1067,18 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1067
1067
|
});
|
|
1068
1068
|
},
|
|
1069
1069
|
setModuleNameOperation(t, e) {
|
|
1070
|
-
const
|
|
1071
|
-
for (let n = 0; n <
|
|
1072
|
-
|
|
1070
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1071
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1072
|
+
r.modules[n].id === e.input.id && (r.modules[n].name = e.input.name || "");
|
|
1073
1073
|
},
|
|
1074
1074
|
setModuleDescriptionOperation(t, e) {
|
|
1075
|
-
const
|
|
1076
|
-
for (let n = 0; n <
|
|
1077
|
-
|
|
1075
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1076
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1077
|
+
r.modules[n].id === e.input.id && (r.modules[n].description = e.input.description || "");
|
|
1078
1078
|
},
|
|
1079
1079
|
deleteModuleOperation(t, e) {
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1080
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1081
|
+
r.modules = r.modules.filter(
|
|
1082
1082
|
(n) => n.id != e.input.id
|
|
1083
1083
|
);
|
|
1084
1084
|
},
|
|
@@ -1087,13 +1087,13 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1087
1087
|
}
|
|
1088
1088
|
}, Lt = (t) => {
|
|
1089
1089
|
const e = {};
|
|
1090
|
-
return t.forEach((
|
|
1090
|
+
return t.forEach((r, n) => e[r] = n), (r, n) => (e[n.id] || 999999) - (e[r.id] || 999999);
|
|
1091
1091
|
}, c = {
|
|
1092
1092
|
addOperationErrorOperation(t, e) {
|
|
1093
|
-
const
|
|
1094
|
-
for (let n = 0; n <
|
|
1095
|
-
for (let i = 0; i <
|
|
1096
|
-
|
|
1093
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1094
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1095
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1096
|
+
r.modules[n].operations[i].id == e.input.operationId && r.modules[n].operations[i].errors.push({
|
|
1097
1097
|
id: e.input.id,
|
|
1098
1098
|
name: e.input.errorName || "",
|
|
1099
1099
|
code: e.input.errorCode || "",
|
|
@@ -1102,91 +1102,91 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1102
1102
|
});
|
|
1103
1103
|
},
|
|
1104
1104
|
setOperationErrorCodeOperation(t, e) {
|
|
1105
|
-
const
|
|
1106
|
-
for (let n = 0; n <
|
|
1107
|
-
for (let i = 0; i <
|
|
1108
|
-
for (let a = 0; a <
|
|
1109
|
-
|
|
1105
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1106
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1107
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1108
|
+
for (let a = 0; a < r.modules[n].operations[i].errors.length; a++)
|
|
1109
|
+
r.modules[n].operations[i].errors[a].id == e.input.id && (r.modules[n].operations[i].errors[a].code = e.input.errorCode || "");
|
|
1110
1110
|
},
|
|
1111
1111
|
setOperationErrorNameOperation(t, e) {
|
|
1112
|
-
const
|
|
1113
|
-
for (let n = 0; n <
|
|
1114
|
-
for (let i = 0; i <
|
|
1115
|
-
for (let a = 0; a <
|
|
1116
|
-
|
|
1112
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1113
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1114
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1115
|
+
for (let a = 0; a < r.modules[n].operations[i].errors.length; a++)
|
|
1116
|
+
r.modules[n].operations[i].errors[a].id == e.input.id && (r.modules[n].operations[i].errors[a].name = e.input.errorName || "");
|
|
1117
1117
|
},
|
|
1118
1118
|
setOperationErrorDescriptionOperation(t, e) {
|
|
1119
|
-
const
|
|
1120
|
-
for (let n = 0; n <
|
|
1121
|
-
for (let i = 0; i <
|
|
1122
|
-
for (let a = 0; a <
|
|
1123
|
-
|
|
1119
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1120
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1121
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1122
|
+
for (let a = 0; a < r.modules[n].operations[i].errors.length; a++)
|
|
1123
|
+
r.modules[n].operations[i].errors[a].id == e.input.id && (r.modules[n].operations[i].errors[a].description = e.input.errorDescription || "");
|
|
1124
1124
|
},
|
|
1125
1125
|
setOperationErrorTemplateOperation(t, e) {
|
|
1126
|
-
const
|
|
1127
|
-
for (let n = 0; n <
|
|
1128
|
-
for (let i = 0; i <
|
|
1129
|
-
for (let a = 0; a <
|
|
1130
|
-
|
|
1126
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1127
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1128
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1129
|
+
for (let a = 0; a < r.modules[n].operations[i].errors.length; a++)
|
|
1130
|
+
r.modules[n].operations[i].errors[a].id == e.input.id && (r.modules[n].operations[i].errors[a].template = e.input.errorTemplate || "");
|
|
1131
1131
|
},
|
|
1132
1132
|
deleteOperationErrorOperation(t, e) {
|
|
1133
|
-
const
|
|
1134
|
-
for (let n = 0; n <
|
|
1135
|
-
for (let i = 0; i <
|
|
1136
|
-
|
|
1133
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1134
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1135
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1136
|
+
r.modules[n].operations[i].errors = r.modules[n].operations[i].errors.filter((a) => a.id != e.input.id);
|
|
1137
1137
|
},
|
|
1138
1138
|
reorderOperationErrorsOperation(t, e) {
|
|
1139
|
-
const
|
|
1140
|
-
for (let n = 0; n <
|
|
1141
|
-
for (let i = 0; i <
|
|
1142
|
-
|
|
1139
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1140
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1141
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1142
|
+
r.modules[n].operations[i].id == e.input.operationId && r.modules[n].operations[i].errors.sort(
|
|
1143
1143
|
Lt(e.input.order)
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
1146
|
}, Pt = (t) => {
|
|
1147
1147
|
const e = {};
|
|
1148
|
-
return t.forEach((
|
|
1148
|
+
return t.forEach((r, n) => e[r] = n), (r, n) => (e[n.id] || 999999) - (e[r.id] || 999999);
|
|
1149
1149
|
}, S = {
|
|
1150
1150
|
addOperationExampleOperation(t, e) {
|
|
1151
|
-
const
|
|
1152
|
-
for (let n = 0; n <
|
|
1153
|
-
for (let i = 0; i <
|
|
1154
|
-
|
|
1151
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1152
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1153
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1154
|
+
r.modules[n].operations[i].id == e.input.operationId && r.modules[n].operations[i].examples.push({
|
|
1155
1155
|
id: e.input.id,
|
|
1156
1156
|
value: e.input.example
|
|
1157
1157
|
});
|
|
1158
1158
|
},
|
|
1159
1159
|
updateOperationExampleOperation(t, e) {
|
|
1160
|
-
const
|
|
1161
|
-
for (let n = 0; n <
|
|
1162
|
-
for (let i = 0; i <
|
|
1163
|
-
for (let a = 0; a <
|
|
1164
|
-
|
|
1160
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1161
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1162
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1163
|
+
for (let a = 0; a < r.modules[n].operations[i].examples.length; a++)
|
|
1164
|
+
r.modules[n].operations[i].examples[a].id == e.input.id && (r.modules[n].operations[i].examples[a].value = e.input.example);
|
|
1165
1165
|
},
|
|
1166
1166
|
deleteOperationExampleOperation(t, e) {
|
|
1167
|
-
const
|
|
1168
|
-
for (let n = 0; n <
|
|
1169
|
-
for (let i = 0; i <
|
|
1170
|
-
|
|
1167
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1168
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1169
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1170
|
+
r.modules[n].operations[i].examples = r.modules[n].operations[i].examples.filter(
|
|
1171
1171
|
(a) => a.id != e.input.id
|
|
1172
1172
|
);
|
|
1173
1173
|
},
|
|
1174
1174
|
reorderOperationExamplesOperation(t, e) {
|
|
1175
|
-
const
|
|
1176
|
-
for (let n = 0; n <
|
|
1177
|
-
for (let i = 0; i <
|
|
1178
|
-
|
|
1175
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1176
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1177
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1178
|
+
r.modules[n].operations[i].id == e.input.operationId && r.modules[n].operations[i].examples.sort(
|
|
1179
1179
|
Pt(e.input.order)
|
|
1180
1180
|
);
|
|
1181
1181
|
}
|
|
1182
1182
|
}, jt = (t) => {
|
|
1183
1183
|
const e = {};
|
|
1184
|
-
return t.forEach((
|
|
1184
|
+
return t.forEach((r, n) => e[r] = n), (r, n) => (e[n.id] || 999999) - (e[r.id] || 999999);
|
|
1185
1185
|
}, p = {
|
|
1186
1186
|
addOperationOperation(t, e) {
|
|
1187
|
-
const
|
|
1188
|
-
for (let n = 0; n <
|
|
1189
|
-
|
|
1187
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1188
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1189
|
+
r.modules[n].id == e.input.moduleId && r.modules[n].operations.push({
|
|
1190
1190
|
id: e.input.id,
|
|
1191
1191
|
name: e.input.name,
|
|
1192
1192
|
description: e.input.description || "",
|
|
@@ -1199,82 +1199,82 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1199
1199
|
});
|
|
1200
1200
|
},
|
|
1201
1201
|
setOperationNameOperation(t, e) {
|
|
1202
|
-
const
|
|
1203
|
-
for (let n = 0; n <
|
|
1204
|
-
for (let i = 0; i <
|
|
1205
|
-
|
|
1202
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1203
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1204
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1205
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].name = e.input.name || "");
|
|
1206
1206
|
},
|
|
1207
1207
|
setOperationScopeOperation(t, e) {
|
|
1208
|
-
const
|
|
1209
|
-
for (let n = 0; n <
|
|
1210
|
-
for (let i = 0; i <
|
|
1211
|
-
|
|
1208
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1209
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1210
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1211
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].scope = e.input.scope || "global");
|
|
1212
1212
|
},
|
|
1213
1213
|
setOperationSchemaOperation(t, e) {
|
|
1214
|
-
const
|
|
1215
|
-
for (let n = 0; n <
|
|
1216
|
-
for (let i = 0; i <
|
|
1217
|
-
|
|
1214
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1215
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1216
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1217
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].schema = e.input.schema || "");
|
|
1218
1218
|
},
|
|
1219
1219
|
setOperationDescriptionOperation(t, e) {
|
|
1220
|
-
const
|
|
1221
|
-
for (let n = 0; n <
|
|
1222
|
-
for (let i = 0; i <
|
|
1223
|
-
|
|
1220
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1221
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1222
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1223
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].description = e.input.description || "");
|
|
1224
1224
|
},
|
|
1225
1225
|
setOperationTemplateOperation(t, e) {
|
|
1226
|
-
const
|
|
1227
|
-
for (let n = 0; n <
|
|
1228
|
-
for (let i = 0; i <
|
|
1229
|
-
|
|
1226
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1227
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1228
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1229
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].template = e.input.template || "");
|
|
1230
1230
|
},
|
|
1231
1231
|
setOperationReducerOperation(t, e) {
|
|
1232
|
-
const
|
|
1233
|
-
for (let n = 0; n <
|
|
1234
|
-
for (let i = 0; i <
|
|
1235
|
-
|
|
1232
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1233
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1234
|
+
for (let i = 0; i < r.modules[n].operations.length; i++)
|
|
1235
|
+
r.modules[n].operations[i].id == e.input.id && (r.modules[n].operations[i].reducer = e.input.reducer || "");
|
|
1236
1236
|
},
|
|
1237
1237
|
moveOperationOperation(t, e) {
|
|
1238
|
-
const
|
|
1238
|
+
const r = [], n = t.specifications[t.specifications.length - 1];
|
|
1239
1239
|
for (let i = 0; i < n.modules.length; i++)
|
|
1240
|
-
n.modules[i].operations = n.modules[i].operations.filter((a) => a.id == e.input.operationId ? (
|
|
1240
|
+
n.modules[i].operations = n.modules[i].operations.filter((a) => a.id == e.input.operationId ? (r.push(a), !1) : !0);
|
|
1241
1241
|
for (let i = 0; i < n.modules.length; i++)
|
|
1242
|
-
n.modules[i].id == e.input.newModuleId && n.modules[i].operations.push(...
|
|
1242
|
+
n.modules[i].id == e.input.newModuleId && n.modules[i].operations.push(...r);
|
|
1243
1243
|
},
|
|
1244
1244
|
deleteOperationOperation(t, e) {
|
|
1245
|
-
const
|
|
1246
|
-
for (let n = 0; n <
|
|
1247
|
-
|
|
1245
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1246
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1247
|
+
r.modules[n].operations = r.modules[n].operations.filter((i) => i.id != e.input.id);
|
|
1248
1248
|
},
|
|
1249
1249
|
reorderModuleOperationsOperation(t, e) {
|
|
1250
|
-
const
|
|
1251
|
-
for (let n = 0; n <
|
|
1252
|
-
|
|
1250
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1251
|
+
for (let n = 0; n < r.modules.length; n++)
|
|
1252
|
+
r.modules[n].id == e.input.moduleId && r.modules[n].operations.sort(
|
|
1253
1253
|
jt(e.input.order)
|
|
1254
1254
|
);
|
|
1255
1255
|
}
|
|
1256
1256
|
}, Ct = (t) => {
|
|
1257
1257
|
const e = {};
|
|
1258
|
-
return t.forEach((
|
|
1258
|
+
return t.forEach((r, n) => e[r] = n), (r, n) => (e[n.id] || 999999) - (e[r.id] || 999999);
|
|
1259
1259
|
}, u = {
|
|
1260
1260
|
setStateSchemaOperation(t, e) {
|
|
1261
|
-
const
|
|
1262
|
-
if (Object.keys(
|
|
1263
|
-
|
|
1261
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1262
|
+
if (Object.keys(r.state).includes(e.input.scope))
|
|
1263
|
+
r.state[e.input.scope].schema = e.input.schema;
|
|
1264
1264
|
else
|
|
1265
1265
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1266
1266
|
},
|
|
1267
1267
|
setInitialStateOperation(t, e) {
|
|
1268
|
-
const
|
|
1269
|
-
if (Object.keys(
|
|
1270
|
-
|
|
1268
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1269
|
+
if (Object.keys(r.state).includes(e.input.scope))
|
|
1270
|
+
r.state[e.input.scope].initialValue = e.input.initialValue;
|
|
1271
1271
|
else
|
|
1272
1272
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1273
1273
|
},
|
|
1274
1274
|
addStateExampleOperation(t, e) {
|
|
1275
|
-
const
|
|
1276
|
-
if (Object.keys(
|
|
1277
|
-
|
|
1275
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1276
|
+
if (Object.keys(r.state).includes(e.input.scope))
|
|
1277
|
+
r.state[e.input.scope].examples.push({
|
|
1278
1278
|
id: e.input.id,
|
|
1279
1279
|
value: e.input.example
|
|
1280
1280
|
});
|
|
@@ -1282,24 +1282,24 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1282
1282
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1283
1283
|
},
|
|
1284
1284
|
updateStateExampleOperation(t, e) {
|
|
1285
|
-
const
|
|
1286
|
-
if (!Object.keys(
|
|
1285
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1286
|
+
if (!Object.keys(r.state).includes(e.input.scope))
|
|
1287
1287
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1288
|
-
const n =
|
|
1288
|
+
const n = r.state[e.input.scope].examples;
|
|
1289
1289
|
for (let i = 0; i < n.length; i++)
|
|
1290
1290
|
n[i].id == e.input.id && (n[i].value = e.input.newExample);
|
|
1291
1291
|
},
|
|
1292
1292
|
deleteStateExampleOperation(t, e) {
|
|
1293
|
-
const
|
|
1294
|
-
if (Object.keys(
|
|
1295
|
-
|
|
1293
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1294
|
+
if (Object.keys(r.state).includes(e.input.scope))
|
|
1295
|
+
r.state[e.input.scope].examples = r.state[e.input.scope].examples.filter((n) => n.id != e.input.id);
|
|
1296
1296
|
else
|
|
1297
1297
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1298
1298
|
},
|
|
1299
1299
|
reorderStateExamplesOperation(t, e) {
|
|
1300
|
-
const
|
|
1301
|
-
if (Object.keys(
|
|
1302
|
-
|
|
1300
|
+
const r = t.specifications[t.specifications.length - 1];
|
|
1301
|
+
if (Object.keys(r.state).includes(e.input.scope))
|
|
1302
|
+
r.state[e.input.scope].examples.sort(Ct(e.input.order));
|
|
1303
1303
|
else
|
|
1304
1304
|
throw new Error(`Invalid scope: ${e.input.scope}`);
|
|
1305
1305
|
}
|
|
@@ -1542,8 +1542,8 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1542
1542
|
O.createState
|
|
1543
1543
|
);
|
|
1544
1544
|
},
|
|
1545
|
-
saveToFile(t, e,
|
|
1546
|
-
return St(t, e, "phdm",
|
|
1545
|
+
saveToFile(t, e, r) {
|
|
1546
|
+
return St(t, e, "phdm", r);
|
|
1547
1547
|
},
|
|
1548
1548
|
saveToFileHandle(t, e) {
|
|
1549
1549
|
return bt(t, e);
|
|
@@ -1574,23 +1574,23 @@ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1574
1574
|
{ ...t }
|
|
1575
1575
|
);
|
|
1576
1576
|
class vt extends l {
|
|
1577
|
-
setModelName(e) {
|
|
1578
|
-
return this.dispatch(fe(e));
|
|
1577
|
+
setModelName(e, r) {
|
|
1578
|
+
return this.dispatch(fe(e), r);
|
|
1579
1579
|
}
|
|
1580
|
-
setModelId(e) {
|
|
1581
|
-
return this.dispatch(_e(e));
|
|
1580
|
+
setModelId(e, r) {
|
|
1581
|
+
return this.dispatch(_e(e), r);
|
|
1582
1582
|
}
|
|
1583
|
-
setModelExtension(e) {
|
|
1584
|
-
return this.dispatch(Ie(e));
|
|
1583
|
+
setModelExtension(e, r) {
|
|
1584
|
+
return this.dispatch(Ie(e), r);
|
|
1585
1585
|
}
|
|
1586
|
-
setModelDescription(e) {
|
|
1587
|
-
return this.dispatch(Te(e));
|
|
1586
|
+
setModelDescription(e, r) {
|
|
1587
|
+
return this.dispatch(Te(e), r);
|
|
1588
1588
|
}
|
|
1589
|
-
setAuthorName(e) {
|
|
1590
|
-
return this.dispatch(Re(e));
|
|
1589
|
+
setAuthorName(e, r) {
|
|
1590
|
+
return this.dispatch(Re(e), r);
|
|
1591
1591
|
}
|
|
1592
|
-
setAuthorWebsite(e) {
|
|
1593
|
-
return this.dispatch(Ae(e));
|
|
1592
|
+
setAuthorWebsite(e, r) {
|
|
1593
|
+
return this.dispatch(Ae(e), r);
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
1596
1596
|
const xe = (t) => s(
|
|
@@ -1605,22 +1605,24 @@ const xe = (t) => s(
|
|
|
1605
1605
|
), Ne = (t) => s(
|
|
1606
1606
|
"REORDER_CHANGE_LOG_ITEMS",
|
|
1607
1607
|
{ ...t }
|
|
1608
|
-
), Le = () => s(
|
|
1608
|
+
), Le = () => s(
|
|
1609
|
+
"RELEASE_NEW_VERSION"
|
|
1610
|
+
);
|
|
1609
1611
|
class Ut extends l {
|
|
1610
|
-
addChangeLogItem(e) {
|
|
1611
|
-
return this.dispatch(xe(e));
|
|
1612
|
+
addChangeLogItem(e, r) {
|
|
1613
|
+
return this.dispatch(xe(e), r);
|
|
1612
1614
|
}
|
|
1613
|
-
updateChangeLogItem(e) {
|
|
1614
|
-
return this.dispatch(De(e));
|
|
1615
|
+
updateChangeLogItem(e, r) {
|
|
1616
|
+
return this.dispatch(De(e), r);
|
|
1615
1617
|
}
|
|
1616
|
-
deleteChangeLogItem(e) {
|
|
1617
|
-
return this.dispatch(Me(e));
|
|
1618
|
+
deleteChangeLogItem(e, r) {
|
|
1619
|
+
return this.dispatch(Me(e), r);
|
|
1618
1620
|
}
|
|
1619
|
-
reorderChangeLogItems(e) {
|
|
1620
|
-
return this.dispatch(Ne(e));
|
|
1621
|
+
reorderChangeLogItems(e, r) {
|
|
1622
|
+
return this.dispatch(Ne(e), r);
|
|
1621
1623
|
}
|
|
1622
|
-
releaseNewVersion() {
|
|
1623
|
-
return this.dispatch(Le());
|
|
1624
|
+
releaseNewVersion(e) {
|
|
1625
|
+
return this.dispatch(Le(), e);
|
|
1624
1626
|
}
|
|
1625
1627
|
}
|
|
1626
1628
|
const Pe = (t) => s(
|
|
@@ -1640,20 +1642,20 @@ const Pe = (t) => s(
|
|
|
1640
1642
|
{ ...t }
|
|
1641
1643
|
);
|
|
1642
1644
|
class Vt extends l {
|
|
1643
|
-
addModule(e) {
|
|
1644
|
-
return this.dispatch(Pe(e));
|
|
1645
|
+
addModule(e, r) {
|
|
1646
|
+
return this.dispatch(Pe(e), r);
|
|
1645
1647
|
}
|
|
1646
|
-
setModuleName(e) {
|
|
1647
|
-
return this.dispatch(je(e));
|
|
1648
|
+
setModuleName(e, r) {
|
|
1649
|
+
return this.dispatch(je(e), r);
|
|
1648
1650
|
}
|
|
1649
|
-
setModuleDescription(e) {
|
|
1650
|
-
return this.dispatch(Ce(e));
|
|
1651
|
+
setModuleDescription(e, r) {
|
|
1652
|
+
return this.dispatch(Ce(e), r);
|
|
1651
1653
|
}
|
|
1652
|
-
deleteModule(e) {
|
|
1653
|
-
return this.dispatch(ke(e));
|
|
1654
|
+
deleteModule(e, r) {
|
|
1655
|
+
return this.dispatch(ke(e), r);
|
|
1654
1656
|
}
|
|
1655
|
-
reorderModules(e) {
|
|
1656
|
-
return this.dispatch(ye(e));
|
|
1657
|
+
reorderModules(e, r) {
|
|
1658
|
+
return this.dispatch(ye(e), r);
|
|
1657
1659
|
}
|
|
1658
1660
|
}
|
|
1659
1661
|
const we = (t) => s(
|
|
@@ -1679,26 +1681,26 @@ const we = (t) => s(
|
|
|
1679
1681
|
{ ...t }
|
|
1680
1682
|
);
|
|
1681
1683
|
class Ft extends l {
|
|
1682
|
-
addOperationError(e) {
|
|
1683
|
-
return this.dispatch(we(e));
|
|
1684
|
+
addOperationError(e, r) {
|
|
1685
|
+
return this.dispatch(we(e), r);
|
|
1684
1686
|
}
|
|
1685
|
-
setOperationErrorCode(e) {
|
|
1686
|
-
return this.dispatch(ve(e));
|
|
1687
|
+
setOperationErrorCode(e, r) {
|
|
1688
|
+
return this.dispatch(ve(e), r);
|
|
1687
1689
|
}
|
|
1688
|
-
setOperationErrorName(e) {
|
|
1689
|
-
return this.dispatch(Ue(e));
|
|
1690
|
+
setOperationErrorName(e, r) {
|
|
1691
|
+
return this.dispatch(Ue(e), r);
|
|
1690
1692
|
}
|
|
1691
|
-
setOperationErrorDescription(e) {
|
|
1692
|
-
return this.dispatch(Ve(e));
|
|
1693
|
+
setOperationErrorDescription(e, r) {
|
|
1694
|
+
return this.dispatch(Ve(e), r);
|
|
1693
1695
|
}
|
|
1694
|
-
setOperationErrorTemplate(e) {
|
|
1695
|
-
return this.dispatch(Fe(e));
|
|
1696
|
+
setOperationErrorTemplate(e, r) {
|
|
1697
|
+
return this.dispatch(Fe(e), r);
|
|
1696
1698
|
}
|
|
1697
|
-
deleteOperationError(e) {
|
|
1698
|
-
return this.dispatch(He(e));
|
|
1699
|
+
deleteOperationError(e, r) {
|
|
1700
|
+
return this.dispatch(He(e), r);
|
|
1699
1701
|
}
|
|
1700
|
-
reorderOperationErrors(e) {
|
|
1701
|
-
return this.dispatch(Xe(e));
|
|
1702
|
+
reorderOperationErrors(e, r) {
|
|
1703
|
+
return this.dispatch(Xe(e), r);
|
|
1702
1704
|
}
|
|
1703
1705
|
}
|
|
1704
1706
|
const Ge = (t) => s(
|
|
@@ -1715,17 +1717,17 @@ const Ge = (t) => s(
|
|
|
1715
1717
|
{ ...t }
|
|
1716
1718
|
);
|
|
1717
1719
|
class Ht extends l {
|
|
1718
|
-
addOperationExample(e) {
|
|
1719
|
-
return this.dispatch(Ge(e));
|
|
1720
|
+
addOperationExample(e, r) {
|
|
1721
|
+
return this.dispatch(Ge(e), r);
|
|
1720
1722
|
}
|
|
1721
|
-
updateOperationExample(e) {
|
|
1722
|
-
return this.dispatch($e(e));
|
|
1723
|
+
updateOperationExample(e, r) {
|
|
1724
|
+
return this.dispatch($e(e), r);
|
|
1723
1725
|
}
|
|
1724
|
-
deleteOperationExample(e) {
|
|
1725
|
-
return this.dispatch(We(e));
|
|
1726
|
+
deleteOperationExample(e, r) {
|
|
1727
|
+
return this.dispatch(We(e), r);
|
|
1726
1728
|
}
|
|
1727
|
-
reorderOperationExamples(e) {
|
|
1728
|
-
return this.dispatch(ze(e));
|
|
1729
|
+
reorderOperationExamples(e, r) {
|
|
1730
|
+
return this.dispatch(ze(e), r);
|
|
1729
1731
|
}
|
|
1730
1732
|
}
|
|
1731
1733
|
const Be = (t) => s(
|
|
@@ -1760,35 +1762,35 @@ const Be = (t) => s(
|
|
|
1760
1762
|
{ ...t }
|
|
1761
1763
|
);
|
|
1762
1764
|
class Xt extends l {
|
|
1763
|
-
addOperation(e) {
|
|
1764
|
-
return this.dispatch(Be(e));
|
|
1765
|
+
addOperation(e, r) {
|
|
1766
|
+
return this.dispatch(Be(e), r);
|
|
1765
1767
|
}
|
|
1766
|
-
setOperationName(e) {
|
|
1767
|
-
return this.dispatch(qe(e));
|
|
1768
|
+
setOperationName(e, r) {
|
|
1769
|
+
return this.dispatch(qe(e), r);
|
|
1768
1770
|
}
|
|
1769
|
-
setOperationScope(e) {
|
|
1770
|
-
return this.dispatch(Je(e));
|
|
1771
|
+
setOperationScope(e, r) {
|
|
1772
|
+
return this.dispatch(Je(e), r);
|
|
1771
1773
|
}
|
|
1772
|
-
setOperationSchema(e) {
|
|
1773
|
-
return this.dispatch(Ke(e));
|
|
1774
|
+
setOperationSchema(e, r) {
|
|
1775
|
+
return this.dispatch(Ke(e), r);
|
|
1774
1776
|
}
|
|
1775
|
-
setOperationDescription(e) {
|
|
1776
|
-
return this.dispatch(Qe(e));
|
|
1777
|
+
setOperationDescription(e, r) {
|
|
1778
|
+
return this.dispatch(Qe(e), r);
|
|
1777
1779
|
}
|
|
1778
|
-
setOperationTemplate(e) {
|
|
1779
|
-
return this.dispatch(Ye(e));
|
|
1780
|
+
setOperationTemplate(e, r) {
|
|
1781
|
+
return this.dispatch(Ye(e), r);
|
|
1780
1782
|
}
|
|
1781
|
-
setOperationReducer(e) {
|
|
1782
|
-
return this.dispatch(Ze(e));
|
|
1783
|
+
setOperationReducer(e, r) {
|
|
1784
|
+
return this.dispatch(Ze(e), r);
|
|
1783
1785
|
}
|
|
1784
|
-
moveOperation(e) {
|
|
1785
|
-
return this.dispatch(et(e));
|
|
1786
|
+
moveOperation(e, r) {
|
|
1787
|
+
return this.dispatch(et(e), r);
|
|
1786
1788
|
}
|
|
1787
|
-
deleteOperation(e) {
|
|
1788
|
-
return this.dispatch(tt(e));
|
|
1789
|
+
deleteOperation(e, r) {
|
|
1790
|
+
return this.dispatch(tt(e), r);
|
|
1789
1791
|
}
|
|
1790
|
-
reorderModuleOperations(e) {
|
|
1791
|
-
return this.dispatch(rt(e));
|
|
1792
|
+
reorderModuleOperations(e, r) {
|
|
1793
|
+
return this.dispatch(rt(e), r);
|
|
1792
1794
|
}
|
|
1793
1795
|
}
|
|
1794
1796
|
const ot = (t) => s(
|
|
@@ -1811,39 +1813,39 @@ const ot = (t) => s(
|
|
|
1811
1813
|
{ ...t }
|
|
1812
1814
|
);
|
|
1813
1815
|
class Gt extends l {
|
|
1814
|
-
setStateSchema(e) {
|
|
1815
|
-
return this.dispatch(ot(e));
|
|
1816
|
+
setStateSchema(e, r) {
|
|
1817
|
+
return this.dispatch(ot(e), r);
|
|
1816
1818
|
}
|
|
1817
|
-
setInitialState(e) {
|
|
1818
|
-
return this.dispatch(nt(e));
|
|
1819
|
+
setInitialState(e, r) {
|
|
1820
|
+
return this.dispatch(nt(e), r);
|
|
1819
1821
|
}
|
|
1820
|
-
addStateExample(e) {
|
|
1821
|
-
return this.dispatch(it(e));
|
|
1822
|
+
addStateExample(e, r) {
|
|
1823
|
+
return this.dispatch(it(e), r);
|
|
1822
1824
|
}
|
|
1823
|
-
updateStateExample(e) {
|
|
1824
|
-
return this.dispatch(st(e));
|
|
1825
|
+
updateStateExample(e, r) {
|
|
1826
|
+
return this.dispatch(st(e), r);
|
|
1825
1827
|
}
|
|
1826
|
-
deleteStateExample(e) {
|
|
1827
|
-
return this.dispatch(at(e));
|
|
1828
|
+
deleteStateExample(e, r) {
|
|
1829
|
+
return this.dispatch(at(e), r);
|
|
1828
1830
|
}
|
|
1829
|
-
reorderStateExamples(e) {
|
|
1830
|
-
return this.dispatch(pt(e));
|
|
1831
|
+
reorderStateExamples(e, r) {
|
|
1832
|
+
return this.dispatch(pt(e), r);
|
|
1831
1833
|
}
|
|
1832
1834
|
}
|
|
1833
1835
|
var m;
|
|
1834
1836
|
let le = (m = class extends l {
|
|
1835
|
-
constructor(e,
|
|
1836
|
-
super(g, O.createDocument(e),
|
|
1837
|
+
constructor(e, r) {
|
|
1838
|
+
super(g, O.createDocument(e), r);
|
|
1837
1839
|
}
|
|
1838
|
-
saveToFile(e,
|
|
1839
|
-
return super.saveToFile(e, m.fileExtension,
|
|
1840
|
+
saveToFile(e, r) {
|
|
1841
|
+
return super.saveToFile(e, m.fileExtension, r);
|
|
1840
1842
|
}
|
|
1841
1843
|
loadFromFile(e) {
|
|
1842
1844
|
return super.loadFromFile(e);
|
|
1843
1845
|
}
|
|
1844
1846
|
static async fromFile(e) {
|
|
1845
|
-
const
|
|
1846
|
-
return await
|
|
1847
|
+
const r = new this();
|
|
1848
|
+
return await r.loadFromFile(e), r;
|
|
1847
1849
|
}
|
|
1848
1850
|
}, ce(m, "fileExtension", "phdm"), m);
|
|
1849
1851
|
It(le, [
|