@uniformdev/next-app-router 20.72.2 → 20.72.3-alpha.14
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/cache.js +95 -23
- package/dist/cache.mjs +95 -23
- package/dist/component.js +92 -30
- package/dist/component.mjs +78 -16
- package/dist/handler.js +182 -155
- package/dist/handler.mjs +182 -155
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +223 -57
- package/dist/index.js +224 -57
- package/dist/index.mjs +223 -57
- package/dist/middleware.js +200 -163
- package/dist/middleware.mjs +200 -163
- package/package.json +8 -8
package/dist/component.js
CHANGED
|
@@ -674,6 +674,10 @@ function projectionToQuery(spec) {
|
|
|
674
674
|
}
|
|
675
675
|
return out;
|
|
676
676
|
}
|
|
677
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
678
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
679
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
680
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
677
681
|
var _contentTypesUrl;
|
|
678
682
|
var _entriesUrl;
|
|
679
683
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -780,14 +784,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
780
784
|
constructor(options) {
|
|
781
785
|
super(options);
|
|
782
786
|
}
|
|
783
|
-
/** Fetches
|
|
784
|
-
async
|
|
787
|
+
/** Fetches a list of DataTypes for a project */
|
|
788
|
+
async list(options) {
|
|
785
789
|
const { projectId } = this.options;
|
|
786
790
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
787
791
|
return await this.apiClient(fetchUri);
|
|
788
792
|
}
|
|
793
|
+
/** @deprecated Use {@link list} instead. */
|
|
794
|
+
async get(options) {
|
|
795
|
+
return this.list(options);
|
|
796
|
+
}
|
|
789
797
|
/** Updates or creates (based on id) a DataType */
|
|
790
|
-
async
|
|
798
|
+
async save(body) {
|
|
791
799
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
792
800
|
await this.apiClient(fetchUri, {
|
|
793
801
|
method: "PUT",
|
|
@@ -795,6 +803,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
795
803
|
expectNoContent: true
|
|
796
804
|
});
|
|
797
805
|
}
|
|
806
|
+
/** @deprecated Use {@link save} instead. */
|
|
807
|
+
async upsert(body) {
|
|
808
|
+
return this.save(body);
|
|
809
|
+
}
|
|
798
810
|
/** Deletes a DataType */
|
|
799
811
|
async remove(body) {
|
|
800
812
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -807,10 +819,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
807
819
|
};
|
|
808
820
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
809
821
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
810
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
811
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
812
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
813
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
814
822
|
var _baseUrl;
|
|
815
823
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
816
824
|
constructor(options) {
|
|
@@ -853,6 +861,48 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
|
|
|
853
861
|
_baseUrl = /* @__PURE__ */ new WeakMap();
|
|
854
862
|
__privateAdd2(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
|
|
855
863
|
var _url22;
|
|
864
|
+
var _NotificationsClient = class _NotificationsClient2 extends ApiClient {
|
|
865
|
+
constructor(options) {
|
|
866
|
+
super(options);
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Lists notifications for the current user.
|
|
870
|
+
*
|
|
871
|
+
* @deprecated This API is experimental and may change without notice.
|
|
872
|
+
*/
|
|
873
|
+
async list(options) {
|
|
874
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22), options);
|
|
875
|
+
return await this.apiClient(fetchUri);
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Creates a notification for one or more recipients.
|
|
879
|
+
*
|
|
880
|
+
* @deprecated This API is experimental and may change without notice.
|
|
881
|
+
*/
|
|
882
|
+
async create(body) {
|
|
883
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22));
|
|
884
|
+
return await this.apiClient(fetchUri, {
|
|
885
|
+
method: "POST",
|
|
886
|
+
body: JSON.stringify(body)
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Updates the read state of the current user's notifications.
|
|
891
|
+
*
|
|
892
|
+
* @deprecated This API is experimental and may change without notice.
|
|
893
|
+
*/
|
|
894
|
+
async setReadState(body) {
|
|
895
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22));
|
|
896
|
+
await this.apiClient(fetchUri, {
|
|
897
|
+
method: "PATCH",
|
|
898
|
+
body: JSON.stringify(body),
|
|
899
|
+
expectNoContent: true
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
_url22 = /* @__PURE__ */ new WeakMap();
|
|
904
|
+
__privateAdd2(_NotificationsClient, _url22, "/api/v1/notifications");
|
|
905
|
+
var _url32;
|
|
856
906
|
var _projectsUrl;
|
|
857
907
|
var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
858
908
|
constructor(options) {
|
|
@@ -860,7 +910,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
860
910
|
}
|
|
861
911
|
/** Fetches single Project */
|
|
862
912
|
async get(options) {
|
|
863
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
913
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32), { ...options });
|
|
864
914
|
return await this.apiClient(fetchUri);
|
|
865
915
|
}
|
|
866
916
|
/**
|
|
@@ -868,42 +918,54 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
868
918
|
* When teamId is provided, returns a single team with its projects.
|
|
869
919
|
* When omitted, returns all accessible teams and their projects.
|
|
870
920
|
*/
|
|
871
|
-
async
|
|
921
|
+
async list(options) {
|
|
872
922
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
873
923
|
return await this.apiClient(fetchUri);
|
|
874
924
|
}
|
|
925
|
+
/** @deprecated Use {@link list} instead. */
|
|
926
|
+
async getProjects(options) {
|
|
927
|
+
return this.list(options);
|
|
928
|
+
}
|
|
875
929
|
/** Updates or creates (based on id) a Project */
|
|
876
|
-
async
|
|
877
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
930
|
+
async save(body) {
|
|
931
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32));
|
|
878
932
|
return await this.apiClient(fetchUri, {
|
|
879
933
|
method: "PUT",
|
|
880
934
|
body: JSON.stringify({ ...body })
|
|
881
935
|
});
|
|
882
936
|
}
|
|
937
|
+
/** @deprecated Use {@link save} instead. */
|
|
938
|
+
async upsert(body) {
|
|
939
|
+
return this.save(body);
|
|
940
|
+
}
|
|
883
941
|
/** Deletes a Project */
|
|
884
|
-
async
|
|
885
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
942
|
+
async remove(body) {
|
|
943
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32));
|
|
886
944
|
await this.apiClient(fetchUri, {
|
|
887
945
|
method: "DELETE",
|
|
888
946
|
body: JSON.stringify({ ...body }),
|
|
889
947
|
expectNoContent: true
|
|
890
948
|
});
|
|
891
949
|
}
|
|
950
|
+
/** @deprecated Use {@link remove} instead. */
|
|
951
|
+
async delete(body) {
|
|
952
|
+
return this.remove(body);
|
|
953
|
+
}
|
|
892
954
|
};
|
|
893
|
-
|
|
955
|
+
_url32 = /* @__PURE__ */ new WeakMap();
|
|
894
956
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
895
|
-
__privateAdd2(_ProjectClient,
|
|
957
|
+
__privateAdd2(_ProjectClient, _url32, "/api/v1/project");
|
|
896
958
|
__privateAdd2(_ProjectClient, _projectsUrl, "/api/v1/projects");
|
|
897
959
|
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
|
898
960
|
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
|
899
961
|
var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
|
900
962
|
|
|
901
963
|
// src/components/UniformRichText.tsx
|
|
902
|
-
var
|
|
964
|
+
var import_richtext6 = require("@uniformdev/richtext");
|
|
903
965
|
var import_react12 = __toESM(require("react"));
|
|
904
966
|
|
|
905
967
|
// src/components/UniformRichTextNode.tsx
|
|
906
|
-
var
|
|
968
|
+
var import_richtext5 = require("@uniformdev/richtext");
|
|
907
969
|
var import_react11 = __toESM(require("react"));
|
|
908
970
|
|
|
909
971
|
// src/components/nodes/AssetRichTextNode.tsx
|
|
@@ -941,11 +1003,11 @@ var LinebreakRichTextNode = () => {
|
|
|
941
1003
|
};
|
|
942
1004
|
|
|
943
1005
|
// src/components/nodes/LinkRichTextNode.tsx
|
|
944
|
-
var
|
|
1006
|
+
var import_richtext = require("@uniformdev/richtext");
|
|
945
1007
|
var import_react4 = __toESM(require("react"));
|
|
946
1008
|
var LinkRichTextNode = ({ children, node }) => {
|
|
947
1009
|
const { link } = node;
|
|
948
|
-
return /* @__PURE__ */ import_react4.default.createElement("a", { ...(0,
|
|
1010
|
+
return /* @__PURE__ */ import_react4.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
|
|
949
1011
|
};
|
|
950
1012
|
|
|
951
1013
|
// src/components/nodes/ListItemRichTextNode.tsx
|
|
@@ -964,26 +1026,26 @@ var ListRichTextNode = ({ children, node }) => {
|
|
|
964
1026
|
};
|
|
965
1027
|
|
|
966
1028
|
// src/components/nodes/ParagraphRichTextNode.tsx
|
|
967
|
-
var
|
|
1029
|
+
var import_richtext2 = require("@uniformdev/richtext");
|
|
968
1030
|
var import_react7 = __toESM(require("react"));
|
|
969
1031
|
var ParagraphRichTextNode = ({ children, node }) => {
|
|
970
1032
|
const { format, direction } = node;
|
|
971
1033
|
return /* @__PURE__ */ import_react7.default.createElement(
|
|
972
1034
|
"p",
|
|
973
1035
|
{
|
|
974
|
-
dir: (0,
|
|
975
|
-
style: (0,
|
|
1036
|
+
dir: (0, import_richtext2.isPureDirection)(direction) ? direction : void 0,
|
|
1037
|
+
style: (0, import_richtext2.isPureTextAlign)(format) ? { textAlign: format } : void 0
|
|
976
1038
|
},
|
|
977
1039
|
children
|
|
978
1040
|
);
|
|
979
1041
|
};
|
|
980
1042
|
|
|
981
1043
|
// src/components/nodes/TableCellRichTextNode.tsx
|
|
982
|
-
var
|
|
1044
|
+
var import_richtext3 = require("@uniformdev/richtext");
|
|
983
1045
|
var import_react8 = __toESM(require("react"));
|
|
984
1046
|
var TableCellRichTextNode = ({ children, node }) => {
|
|
985
1047
|
const { headerState } = node;
|
|
986
|
-
const TableCellTag = (0,
|
|
1048
|
+
const TableCellTag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
|
|
987
1049
|
return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
|
|
988
1050
|
};
|
|
989
1051
|
|
|
@@ -994,18 +1056,18 @@ var TabRichTextNode = () => {
|
|
|
994
1056
|
};
|
|
995
1057
|
|
|
996
1058
|
// src/components/nodes/TextRichTextNode.tsx
|
|
997
|
-
var
|
|
1059
|
+
var import_richtext4 = require("@uniformdev/richtext");
|
|
998
1060
|
var import_react10 = __toESM(require("react"));
|
|
999
1061
|
var TextRichTextNode = ({ node }) => {
|
|
1000
1062
|
const { text, format } = node;
|
|
1001
|
-
const tags = (0,
|
|
1063
|
+
const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
|
|
1002
1064
|
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react10.default.createElement(Tag, null, children), text) : text);
|
|
1003
1065
|
};
|
|
1004
1066
|
|
|
1005
1067
|
// src/components/UniformRichTextNode.tsx
|
|
1006
1068
|
function UniformRichTextNode({ node, ...props }) {
|
|
1007
1069
|
var _a;
|
|
1008
|
-
if (!(0,
|
|
1070
|
+
if (!(0, import_richtext5.isRichTextNode)(node)) return null;
|
|
1009
1071
|
let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
|
|
1010
1072
|
if (typeof NodeRenderer === "undefined") {
|
|
1011
1073
|
NodeRenderer = resolveRichTextDefaultRenderer(node);
|
|
@@ -1059,8 +1121,8 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
|
|
|
1059
1121
|
}
|
|
1060
1122
|
const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameter.parameterId }) : placeholder;
|
|
1061
1123
|
const value = parameter.value;
|
|
1062
|
-
if (!value || !(0,
|
|
1063
|
-
if (!isContextualEditing && (0,
|
|
1124
|
+
if (!value || !(0, import_richtext6.isRichTextValue)(value)) return null;
|
|
1125
|
+
if (!isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
|
|
1064
1126
|
return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(
|
|
1065
1127
|
Tag,
|
|
1066
1128
|
{
|
|
@@ -1072,7 +1134,7 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
|
|
|
1072
1134
|
[ATTRIBUTE_PARAMETER_TYPE]: "richText"
|
|
1073
1135
|
} : {}
|
|
1074
1136
|
},
|
|
1075
|
-
(0,
|
|
1137
|
+
(0, import_richtext6.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react12.default.createElement("p", null, /* @__PURE__ */ import_react12.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
|
|
1076
1138
|
);
|
|
1077
1139
|
});
|
|
1078
1140
|
|
package/dist/component.mjs
CHANGED
|
@@ -659,6 +659,10 @@ function projectionToQuery(spec) {
|
|
|
659
659
|
}
|
|
660
660
|
return out;
|
|
661
661
|
}
|
|
662
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
663
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
664
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
665
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
662
666
|
var _contentTypesUrl;
|
|
663
667
|
var _entriesUrl;
|
|
664
668
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -765,14 +769,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
765
769
|
constructor(options) {
|
|
766
770
|
super(options);
|
|
767
771
|
}
|
|
768
|
-
/** Fetches
|
|
769
|
-
async
|
|
772
|
+
/** Fetches a list of DataTypes for a project */
|
|
773
|
+
async list(options) {
|
|
770
774
|
const { projectId } = this.options;
|
|
771
775
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
772
776
|
return await this.apiClient(fetchUri);
|
|
773
777
|
}
|
|
778
|
+
/** @deprecated Use {@link list} instead. */
|
|
779
|
+
async get(options) {
|
|
780
|
+
return this.list(options);
|
|
781
|
+
}
|
|
774
782
|
/** Updates or creates (based on id) a DataType */
|
|
775
|
-
async
|
|
783
|
+
async save(body) {
|
|
776
784
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
777
785
|
await this.apiClient(fetchUri, {
|
|
778
786
|
method: "PUT",
|
|
@@ -780,6 +788,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
780
788
|
expectNoContent: true
|
|
781
789
|
});
|
|
782
790
|
}
|
|
791
|
+
/** @deprecated Use {@link save} instead. */
|
|
792
|
+
async upsert(body) {
|
|
793
|
+
return this.save(body);
|
|
794
|
+
}
|
|
783
795
|
/** Deletes a DataType */
|
|
784
796
|
async remove(body) {
|
|
785
797
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -792,10 +804,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
792
804
|
};
|
|
793
805
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
794
806
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
795
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
796
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
797
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
798
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
799
807
|
var _baseUrl;
|
|
800
808
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
801
809
|
constructor(options) {
|
|
@@ -838,6 +846,48 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
|
|
|
838
846
|
_baseUrl = /* @__PURE__ */ new WeakMap();
|
|
839
847
|
__privateAdd2(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
|
|
840
848
|
var _url22;
|
|
849
|
+
var _NotificationsClient = class _NotificationsClient2 extends ApiClient {
|
|
850
|
+
constructor(options) {
|
|
851
|
+
super(options);
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Lists notifications for the current user.
|
|
855
|
+
*
|
|
856
|
+
* @deprecated This API is experimental and may change without notice.
|
|
857
|
+
*/
|
|
858
|
+
async list(options) {
|
|
859
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22), options);
|
|
860
|
+
return await this.apiClient(fetchUri);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Creates a notification for one or more recipients.
|
|
864
|
+
*
|
|
865
|
+
* @deprecated This API is experimental and may change without notice.
|
|
866
|
+
*/
|
|
867
|
+
async create(body) {
|
|
868
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22));
|
|
869
|
+
return await this.apiClient(fetchUri, {
|
|
870
|
+
method: "POST",
|
|
871
|
+
body: JSON.stringify(body)
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Updates the read state of the current user's notifications.
|
|
876
|
+
*
|
|
877
|
+
* @deprecated This API is experimental and may change without notice.
|
|
878
|
+
*/
|
|
879
|
+
async setReadState(body) {
|
|
880
|
+
const fetchUri = this.createUrl(__privateGet2(_NotificationsClient2, _url22));
|
|
881
|
+
await this.apiClient(fetchUri, {
|
|
882
|
+
method: "PATCH",
|
|
883
|
+
body: JSON.stringify(body),
|
|
884
|
+
expectNoContent: true
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
_url22 = /* @__PURE__ */ new WeakMap();
|
|
889
|
+
__privateAdd2(_NotificationsClient, _url22, "/api/v1/notifications");
|
|
890
|
+
var _url32;
|
|
841
891
|
var _projectsUrl;
|
|
842
892
|
var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
843
893
|
constructor(options) {
|
|
@@ -845,7 +895,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
845
895
|
}
|
|
846
896
|
/** Fetches single Project */
|
|
847
897
|
async get(options) {
|
|
848
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
898
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32), { ...options });
|
|
849
899
|
return await this.apiClient(fetchUri);
|
|
850
900
|
}
|
|
851
901
|
/**
|
|
@@ -853,31 +903,43 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
853
903
|
* When teamId is provided, returns a single team with its projects.
|
|
854
904
|
* When omitted, returns all accessible teams and their projects.
|
|
855
905
|
*/
|
|
856
|
-
async
|
|
906
|
+
async list(options) {
|
|
857
907
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
858
908
|
return await this.apiClient(fetchUri);
|
|
859
909
|
}
|
|
910
|
+
/** @deprecated Use {@link list} instead. */
|
|
911
|
+
async getProjects(options) {
|
|
912
|
+
return this.list(options);
|
|
913
|
+
}
|
|
860
914
|
/** Updates or creates (based on id) a Project */
|
|
861
|
-
async
|
|
862
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
915
|
+
async save(body) {
|
|
916
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32));
|
|
863
917
|
return await this.apiClient(fetchUri, {
|
|
864
918
|
method: "PUT",
|
|
865
919
|
body: JSON.stringify({ ...body })
|
|
866
920
|
});
|
|
867
921
|
}
|
|
922
|
+
/** @deprecated Use {@link save} instead. */
|
|
923
|
+
async upsert(body) {
|
|
924
|
+
return this.save(body);
|
|
925
|
+
}
|
|
868
926
|
/** Deletes a Project */
|
|
869
|
-
async
|
|
870
|
-
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2,
|
|
927
|
+
async remove(body) {
|
|
928
|
+
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url32));
|
|
871
929
|
await this.apiClient(fetchUri, {
|
|
872
930
|
method: "DELETE",
|
|
873
931
|
body: JSON.stringify({ ...body }),
|
|
874
932
|
expectNoContent: true
|
|
875
933
|
});
|
|
876
934
|
}
|
|
935
|
+
/** @deprecated Use {@link remove} instead. */
|
|
936
|
+
async delete(body) {
|
|
937
|
+
return this.remove(body);
|
|
938
|
+
}
|
|
877
939
|
};
|
|
878
|
-
|
|
940
|
+
_url32 = /* @__PURE__ */ new WeakMap();
|
|
879
941
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
880
|
-
__privateAdd2(_ProjectClient,
|
|
942
|
+
__privateAdd2(_ProjectClient, _url32, "/api/v1/project");
|
|
881
943
|
__privateAdd2(_ProjectClient, _projectsUrl, "/api/v1/projects");
|
|
882
944
|
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
|
883
945
|
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
|
@@ -929,7 +991,7 @@ var LinebreakRichTextNode = () => {
|
|
|
929
991
|
};
|
|
930
992
|
|
|
931
993
|
// src/components/nodes/LinkRichTextNode.tsx
|
|
932
|
-
import { linkParamValueToAnchorProps } from "@uniformdev/
|
|
994
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
933
995
|
import React4 from "react";
|
|
934
996
|
var LinkRichTextNode = ({ children, node }) => {
|
|
935
997
|
const { link } = node;
|