@fluid-app/portal-sdk 0.1.219 → 0.1.220

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.
Files changed (59) hide show
  1. package/dist/{AppDownloadScreen-CZ0EOIZ5.mjs → AppDownloadScreen-Bhix461K.mjs} +1 -1
  2. package/dist/{AppDownloadScreen-CZ0EOIZ5.mjs.map → AppDownloadScreen-Bhix461K.mjs.map} +1 -1
  3. package/dist/{AppDownloadScreen-CBoC31wL.cjs → AppDownloadScreen-DwBzuPcF.cjs} +1 -1
  4. package/dist/{AppDownloadScreen-CBoC31wL.cjs.map → AppDownloadScreen-DwBzuPcF.cjs.map} +1 -1
  5. package/dist/{MySiteScreen-CyzM9hX3.mjs → MySiteScreen-BAPWqDfm.mjs} +2 -3
  6. package/dist/{MySiteScreen-CyzM9hX3.mjs.map → MySiteScreen-BAPWqDfm.mjs.map} +1 -1
  7. package/dist/{MySiteScreen-DPQ66oRs.cjs → MySiteScreen-CEX1qxdj.cjs} +2 -3
  8. package/dist/{MySiteScreen-DxLcG3-S.cjs → MySiteScreen-DaNlmVSi.cjs} +15 -16
  9. package/dist/{MySiteScreen-DxLcG3-S.cjs.map → MySiteScreen-DaNlmVSi.cjs.map} +1 -1
  10. package/dist/{PortalProductsApiProvider-CE71zDj9.mjs → PortalProductsApiProvider-BwIRudl_.mjs} +1 -1
  11. package/dist/{PortalProductsApiProvider-CE71zDj9.mjs.map → PortalProductsApiProvider-BwIRudl_.mjs.map} +1 -1
  12. package/dist/{PortalProductsApiProvider-Ca1oeTtJ.cjs → PortalProductsApiProvider-CRaocswH.cjs} +1 -1
  13. package/dist/{PortalProductsApiProvider-Ca1oeTtJ.cjs.map → PortalProductsApiProvider-CRaocswH.cjs.map} +1 -1
  14. package/dist/{ShareablesScreen-YlMqyP-B.cjs → ShareablesScreen-CqvPzH1v.cjs} +3 -5
  15. package/dist/{PortalContentApiProvider-x81DXmOR.mjs → ShareablesScreen-DV2nikzp.mjs} +188 -38
  16. package/dist/ShareablesScreen-DV2nikzp.mjs.map +1 -0
  17. package/dist/{PortalContentApiProvider-DXnplIOD.cjs → ShareablesScreen-DwnMBftJ.cjs} +185 -75
  18. package/dist/ShareablesScreen-DwnMBftJ.cjs.map +1 -0
  19. package/dist/{ShopScreen-BOjri6Dm.cjs → ShopScreen-C-Ki6fuh.cjs} +2 -2
  20. package/dist/{ShopScreen-B4afB5sE.mjs → ShopScreen-C2K1C2tt.mjs} +2 -2
  21. package/dist/{ShopScreen-B4afB5sE.mjs.map → ShopScreen-C2K1C2tt.mjs.map} +1 -1
  22. package/dist/{ShopScreen-Untg6XBY.cjs → ShopScreen-smzNn37E.cjs} +2 -2
  23. package/dist/{ShopScreen-Untg6XBY.cjs.map → ShopScreen-smzNn37E.cjs.map} +1 -1
  24. package/dist/{UpgradeScreen-BdY0rCoF.cjs → UpgradeScreen-CNXQ1hcP.cjs} +1 -1
  25. package/dist/{UpgradeScreen-Dau5Elx4.mjs → UpgradeScreen-ChLiVSf7.mjs} +1 -1
  26. package/dist/{UpgradeScreen-Dau5Elx4.mjs.map → UpgradeScreen-ChLiVSf7.mjs.map} +1 -1
  27. package/dist/{UpgradeScreen-DrBa2uzD.cjs → UpgradeScreen-DMJUK4dl.cjs} +1 -1
  28. package/dist/{UpgradeScreen-DrBa2uzD.cjs.map → UpgradeScreen-DMJUK4dl.cjs.map} +1 -1
  29. package/dist/{dist-DWs3-WOI.cjs → dist-Bxa9x0H9.cjs} +218 -1
  30. package/dist/{dist-DWs3-WOI.cjs.map → dist-Bxa9x0H9.cjs.map} +1 -1
  31. package/dist/index.cjs +17 -46
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +1 -20
  34. package/dist/index.d.cts.map +1 -1
  35. package/dist/index.d.mts +1 -20
  36. package/dist/index.d.mts.map +1 -1
  37. package/dist/index.mjs +18 -45
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/{sortable.esm-CJLSD-Ce.mjs → sortable.esm-fSGrAZU2.mjs} +141 -2
  40. package/dist/sortable.esm-fSGrAZU2.mjs.map +1 -0
  41. package/package.json +12 -12
  42. package/dist/PortalContentApiProvider-DXnplIOD.cjs.map +0 -1
  43. package/dist/PortalContentApiProvider-x81DXmOR.mjs.map +0 -1
  44. package/dist/ProductsScreen-3yjIMjYY.cjs +0 -15
  45. package/dist/ProductsScreen-BVyLOe2K.mjs +0 -13
  46. package/dist/ProductsScreen-R0MfWYZJ.cjs +0 -103
  47. package/dist/ProductsScreen-R0MfWYZJ.cjs.map +0 -1
  48. package/dist/ProductsScreen-z9hXfFeJ.mjs +0 -91
  49. package/dist/ProductsScreen-z9hXfFeJ.mjs.map +0 -1
  50. package/dist/ShareablesScreen-Co_gFZva.cjs +0 -200
  51. package/dist/ShareablesScreen-Co_gFZva.cjs.map +0 -1
  52. package/dist/ShareablesScreen-DpwFh0ky.mjs +0 -15
  53. package/dist/ShareablesScreen-tkaf9R5N.mjs +0 -188
  54. package/dist/ShareablesScreen-tkaf9R5N.mjs.map +0 -1
  55. package/dist/sortable.esm-CJLSD-Ce.mjs.map +0 -1
  56. package/dist/use-mysite-portal-D29HLD1z.mjs +0 -142
  57. package/dist/use-mysite-portal-D29HLD1z.mjs.map +0 -1
  58. package/dist/use-mysite-portal-DxNQ3uTi.cjs +0 -220
  59. package/dist/use-mysite-portal-DxNQ3uTi.cjs.map +0 -1
@@ -1,4 +1,143 @@
1
1
  const require_chunk = require("./chunk-9hOWP6kD.cjs");
2
+ const require_mysite_api_context = require("./mysite-api-context-CilZcDS4.cjs");
3
+ let _tanstack_react_query = require("@tanstack/react-query");
4
+ //#region ../../mysite/ui/src/portal/hooks/use-mysite-portal.ts
5
+ const PORTAL_MYSITE_KEYS = {
6
+ profile: () => ["portal-mysite", "profile"],
7
+ links: () => ["portal-mysite", "links"],
8
+ favorites: () => ["portal-mysite", "favorites"],
9
+ themes: () => ["portal-mysite", "themes"]
10
+ };
11
+ function usePortalMySiteProfile() {
12
+ const api = require_mysite_api_context.useMySiteApi();
13
+ return (0, _tanstack_react_query.useQuery)({
14
+ queryKey: PORTAL_MYSITE_KEYS.profile(),
15
+ queryFn: () => api.fetchProfile()
16
+ });
17
+ }
18
+ function usePortalUpdateProfile(options) {
19
+ const api = require_mysite_api_context.useMySiteApi();
20
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
21
+ return (0, _tanstack_react_query.useMutation)({
22
+ mutationFn: (body) => api.updateProfile(body),
23
+ onSuccess: (data) => {
24
+ queryClient.setQueryData(PORTAL_MYSITE_KEYS.profile(), data);
25
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.profile() });
26
+ options?.onSuccess?.();
27
+ }
28
+ });
29
+ }
30
+ function usePortalUpdateSettings(options) {
31
+ const api = require_mysite_api_context.useMySiteApi();
32
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
33
+ return (0, _tanstack_react_query.useMutation)({
34
+ mutationFn: (body) => api.updateSettings(body),
35
+ onSuccess: () => {
36
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.profile() });
37
+ options?.onSuccess?.();
38
+ }
39
+ });
40
+ }
41
+ function usePortalLinks() {
42
+ const api = require_mysite_api_context.useMySiteApi();
43
+ return (0, _tanstack_react_query.useQuery)({
44
+ queryKey: PORTAL_MYSITE_KEYS.links(),
45
+ queryFn: () => api.listLinks()
46
+ });
47
+ }
48
+ function usePortalCreateLink() {
49
+ const api = require_mysite_api_context.useMySiteApi();
50
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
51
+ return (0, _tanstack_react_query.useMutation)({
52
+ mutationFn: (body) => api.createLink(body),
53
+ onSuccess: () => {
54
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.links() });
55
+ }
56
+ });
57
+ }
58
+ function usePortalUpdateLink() {
59
+ const api = require_mysite_api_context.useMySiteApi();
60
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
61
+ return (0, _tanstack_react_query.useMutation)({
62
+ mutationFn: ({ linkId, body }) => api.updateLink(linkId, body),
63
+ onSuccess: () => {
64
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.links() });
65
+ }
66
+ });
67
+ }
68
+ function usePortalDeleteLink() {
69
+ const api = require_mysite_api_context.useMySiteApi();
70
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
71
+ return (0, _tanstack_react_query.useMutation)({
72
+ mutationFn: (linkId) => api.deleteLink(linkId),
73
+ onSuccess: () => {
74
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.links() });
75
+ }
76
+ });
77
+ }
78
+ function usePortalReorderLinks() {
79
+ const api = require_mysite_api_context.useMySiteApi();
80
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
81
+ return (0, _tanstack_react_query.useMutation)({
82
+ mutationFn: ({ orderedIds }) => api.reorderLinks(orderedIds),
83
+ onMutate: async ({ optimisticItems }) => {
84
+ await queryClient.cancelQueries({ queryKey: PORTAL_MYSITE_KEYS.links() });
85
+ const previousData = queryClient.getQueryData(PORTAL_MYSITE_KEYS.links());
86
+ queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), optimisticItems);
87
+ return { previousData };
88
+ },
89
+ onError: (_err, _vars, context) => {
90
+ if (context?.previousData) queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), context.previousData);
91
+ },
92
+ onSettled: () => {
93
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.links() });
94
+ }
95
+ });
96
+ }
97
+ function usePortalFavorites() {
98
+ const api = require_mysite_api_context.useMySiteApi();
99
+ return (0, _tanstack_react_query.useQuery)({
100
+ queryKey: PORTAL_MYSITE_KEYS.favorites(),
101
+ queryFn: () => api.listFavorites()
102
+ });
103
+ }
104
+ function usePortalDeleteFavorite() {
105
+ const api = require_mysite_api_context.useMySiteApi();
106
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
107
+ return (0, _tanstack_react_query.useMutation)({
108
+ mutationFn: (favoriteId) => api.deleteFavorite(favoriteId),
109
+ onSuccess: () => {
110
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.favorites() });
111
+ }
112
+ });
113
+ }
114
+ function usePortalReorderFavorites() {
115
+ const api = require_mysite_api_context.useMySiteApi();
116
+ const queryClient = (0, _tanstack_react_query.useQueryClient)();
117
+ return (0, _tanstack_react_query.useMutation)({
118
+ mutationFn: ({ orderedIds }) => api.reorderFavorites(orderedIds),
119
+ onMutate: async ({ optimisticItems }) => {
120
+ await queryClient.cancelQueries({ queryKey: PORTAL_MYSITE_KEYS.favorites() });
121
+ const previousData = queryClient.getQueryData(PORTAL_MYSITE_KEYS.favorites());
122
+ queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), optimisticItems);
123
+ return { previousData };
124
+ },
125
+ onError: (_err, _vars, context) => {
126
+ if (context?.previousData) queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), context.previousData);
127
+ },
128
+ onSettled: () => {
129
+ queryClient.invalidateQueries({ queryKey: PORTAL_MYSITE_KEYS.favorites() });
130
+ }
131
+ });
132
+ }
133
+ function usePortalMySiteThemes() {
134
+ const api = require_mysite_api_context.useMySiteApi();
135
+ return (0, _tanstack_react_query.useQuery)({
136
+ queryKey: PORTAL_MYSITE_KEYS.themes(),
137
+ queryFn: () => api.listThemes()
138
+ });
139
+ }
140
+ //#endregion
2
141
  //#region ../../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.cjs.production.min.js
3
142
  var require_utilities_cjs_production_min = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
4
143
  Object.defineProperty(exports, "__esModule", { value: !0 });
@@ -5998,6 +6137,12 @@ var require_dist = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
5998
6137
  else module.exports = require_sortable_cjs_development();
5999
6138
  }));
6000
6139
  //#endregion
6140
+ Object.defineProperty(exports, "PORTAL_MYSITE_KEYS", {
6141
+ enumerable: true,
6142
+ get: function() {
6143
+ return PORTAL_MYSITE_KEYS;
6144
+ }
6145
+ });
6001
6146
  Object.defineProperty(exports, "require_dist", {
6002
6147
  enumerable: true,
6003
6148
  get: function() {
@@ -6016,5 +6161,77 @@ Object.defineProperty(exports, "require_dist$2", {
6016
6161
  return require_dist$3;
6017
6162
  }
6018
6163
  });
6164
+ Object.defineProperty(exports, "usePortalCreateLink", {
6165
+ enumerable: true,
6166
+ get: function() {
6167
+ return usePortalCreateLink;
6168
+ }
6169
+ });
6170
+ Object.defineProperty(exports, "usePortalDeleteFavorite", {
6171
+ enumerable: true,
6172
+ get: function() {
6173
+ return usePortalDeleteFavorite;
6174
+ }
6175
+ });
6176
+ Object.defineProperty(exports, "usePortalDeleteLink", {
6177
+ enumerable: true,
6178
+ get: function() {
6179
+ return usePortalDeleteLink;
6180
+ }
6181
+ });
6182
+ Object.defineProperty(exports, "usePortalFavorites", {
6183
+ enumerable: true,
6184
+ get: function() {
6185
+ return usePortalFavorites;
6186
+ }
6187
+ });
6188
+ Object.defineProperty(exports, "usePortalLinks", {
6189
+ enumerable: true,
6190
+ get: function() {
6191
+ return usePortalLinks;
6192
+ }
6193
+ });
6194
+ Object.defineProperty(exports, "usePortalMySiteProfile", {
6195
+ enumerable: true,
6196
+ get: function() {
6197
+ return usePortalMySiteProfile;
6198
+ }
6199
+ });
6200
+ Object.defineProperty(exports, "usePortalMySiteThemes", {
6201
+ enumerable: true,
6202
+ get: function() {
6203
+ return usePortalMySiteThemes;
6204
+ }
6205
+ });
6206
+ Object.defineProperty(exports, "usePortalReorderFavorites", {
6207
+ enumerable: true,
6208
+ get: function() {
6209
+ return usePortalReorderFavorites;
6210
+ }
6211
+ });
6212
+ Object.defineProperty(exports, "usePortalReorderLinks", {
6213
+ enumerable: true,
6214
+ get: function() {
6215
+ return usePortalReorderLinks;
6216
+ }
6217
+ });
6218
+ Object.defineProperty(exports, "usePortalUpdateLink", {
6219
+ enumerable: true,
6220
+ get: function() {
6221
+ return usePortalUpdateLink;
6222
+ }
6223
+ });
6224
+ Object.defineProperty(exports, "usePortalUpdateProfile", {
6225
+ enumerable: true,
6226
+ get: function() {
6227
+ return usePortalUpdateProfile;
6228
+ }
6229
+ });
6230
+ Object.defineProperty(exports, "usePortalUpdateSettings", {
6231
+ enumerable: true,
6232
+ get: function() {
6233
+ return usePortalUpdateSettings;
6234
+ }
6235
+ });
6019
6236
 
6020
- //# sourceMappingURL=dist-DWs3-WOI.cjs.map
6237
+ //# sourceMappingURL=dist-Bxa9x0H9.cjs.map