@uniformdev/next-app-router 20.72.2-alpha.3 → 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 +78 -16
- package/dist/component.mjs +79 -17
- package/dist/handler.js +209 -150
- package/dist/handler.mjs +209 -150
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +250 -52
- package/dist/index.js +251 -52
- package/dist/index.mjs +250 -52
- package/dist/middleware.js +200 -163
- package/dist/middleware.mjs +200 -163
- package/package.json +8 -8
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,11 +991,11 @@ var LinebreakRichTextNode = () => {
|
|
|
929
991
|
};
|
|
930
992
|
|
|
931
993
|
// src/components/nodes/LinkRichTextNode.tsx
|
|
932
|
-
import {
|
|
994
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
933
995
|
import React4 from "react";
|
|
934
996
|
var LinkRichTextNode = ({ children, node }) => {
|
|
935
997
|
const { link } = node;
|
|
936
|
-
return /* @__PURE__ */ React4.createElement("a", {
|
|
998
|
+
return /* @__PURE__ */ React4.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
937
999
|
};
|
|
938
1000
|
|
|
939
1001
|
// src/components/nodes/ListItemRichTextNode.tsx
|