@websolutespa/payload-plugin-bowl 1.7.7 → 1.7.8

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 (3) hide show
  1. package/CHANGELOG.md +231 -225
  2. package/dist/index.js +12 -4
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,225 +1,231 @@
1
- # @websolutespa/payload-plugin-bowl
2
-
3
- ## 1.7.7
4
-
5
- ### Patch Changes
6
-
7
- - Added: isomorphic-fetch
8
- - Updating: dependencies
9
- - Updated dependencies
10
- - @websolutespa/bom-core@1.7.3
11
-
12
- ## 1.7.6
13
-
14
- ### Patch Changes
15
-
16
- - Added: beforeDuplicateCollectionHook
17
- - Fixing: decorateNav\_ link href issue
18
-
19
- ## 1.7.5
20
-
21
- ### Patch Changes
22
-
23
- - Modified: Label collection title -> text
24
-
25
- ## 1.7.4
26
-
27
- ### Patch Changes
28
-
29
- - Fixing: findRoute redirects
30
-
31
- ## 1.7.3
32
-
33
- ### Patch Changes
34
-
35
- - Added: WhereService, StaticService, localize decorator
36
- - Modified: withCollection, withStaticCollection, withAction, CollectionService, PageService
37
-
38
- ## 1.7.2
39
-
40
- ### Patch Changes
41
-
42
- - Fixing: setMixerContext
43
-
44
- ## 1.7.1
45
-
46
- ### Patch Changes
47
-
48
- - Fixing: MenuService & CategoryTree
49
-
50
- ## 1.7.0
51
-
52
- ### Minor Changes
53
-
54
- - 28e86bd: Modified: IPage, Store services & decorators
55
- - Updated dependencies [28e86bd]
56
- - @websolutespa/bom-core@1.7.0
57
-
58
- ## 1.6.0
59
-
60
- ### Minor Changes
61
-
62
- - 6707ca2: Upgrading Payload 2.11.2
63
-
64
- ### Patch Changes
65
-
66
- - f664993: Added: useLivePreview
67
- - Updated dependencies [6cbf4cb]
68
- - @websolutespa/bom-core@0.6.7
69
-
70
- ## 1.3.6
71
-
72
- ### Patch Changes
73
-
74
- - Fixing: afterPageReadHook
75
-
76
- ## 1.3.5
77
-
78
- ### Patch Changes
79
-
80
- - Added: afterPageReadHook, MixerContext, getGlobalItems
81
- - Modified: getCollectionItems, getCollectionItem
82
-
83
- ## 1.3.4
84
-
85
- ### Patch Changes
86
-
87
- - Added: user roles and user actions
88
- - Added: main menu sortByGroup
89
-
90
- ## 1.3.3
91
-
92
- ### Patch Changes
93
-
94
- - Fixing: PageService decorators
95
-
96
- ## 1.3.2
97
-
98
- ### Patch Changes
99
-
100
- - 8776e50b: Modified: PageService decorators
101
-
102
- ## 1.3.1
103
-
104
- ### Patch Changes
105
-
106
- - Added: configuration option plugins
107
-
108
- ## 1.3.0
109
-
110
- ### Minor Changes
111
-
112
- - c7a99a2b: Added tests
113
-
114
- ### Patch Changes
115
-
116
- - dad63747: Added defaultMarket, defaultLocale
117
- - 11b63e3b: Fixed test config
118
- - c7a99a2b: Fixed collection bulk patch handler
119
- - Updated dependencies [dad63747]
120
- - @websolutespa/bom-core@0.6.1
121
-
122
- ## 1.2.0
123
-
124
- ### Minor Changes
125
-
126
- - Added: MenuItem extra
127
-
128
- ## 1.1.0
129
-
130
- ### Minor Changes
131
-
132
- - Updating: dependencies
133
-
134
- ## 1.0.6
135
-
136
- ### Patch Changes
137
-
138
- - Fixing: validateHexColor import
139
-
140
- ## 1.0.5
141
-
142
- ### Patch Changes
143
-
144
- - Fixing: check redirects by pattern
145
-
146
- ## 1.0.4
147
-
148
- ### Patch Changes
149
-
150
- - Fixing: storeGet endpoint locale
151
-
152
- ## 1.0.3
153
-
154
- ### Patch Changes
155
-
156
- - Modified: withPage preview, getApiUrl
157
-
158
- ## 1.0.2
159
-
160
- ### Patch Changes
161
-
162
- - Added: duration to withStaticCollection
163
- - Fixing: eachField
164
-
165
- ## 1.0.1
166
-
167
- ### Minor Changes
168
-
169
- - Added: CategoryTree
170
- - Fixing: sass
171
-
172
- ## 0.5.0
173
-
174
- ### Minor Changes
175
-
176
- - Modified routes, added redirects
177
-
178
- ## 0.4.0
179
-
180
- ### Minor Changes
181
-
182
- - Removed: external dependency @websolutespa/payload-plugin-localization
183
-
184
- ## 0.3.2
185
-
186
- ### Patch Changes
187
-
188
- - Fixing: avoid categories circular reference
189
-
190
- ## 0.3.1
191
-
192
- ### Patch Changes
193
-
194
- - Modified: ILocalizable
195
-
196
- ## 0.3.0
197
-
198
- ### Minor Changes
199
-
200
- - Added: splat routes
201
-
202
- ## 0.2.0
203
-
204
- ### Minor Changes
205
-
206
- - Added: menu, @websolutespa/bom-core
207
-
208
- ## 0.1.1
209
-
210
- ### Patch Changes
211
-
212
- - Modified: route service
213
- - Added: white label
214
-
215
- ## 0.1.0
216
-
217
- ### Minor Changes
218
-
219
- - mock refactor
220
-
221
- ## 0.0.1
222
-
223
- ### Patch Changes
224
-
225
- - Added: first release
1
+ # @websolutespa/payload-plugin-bowl
2
+
3
+ ## 1.7.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixing: withStaticCollection.getCollection fetch
8
+
9
+ ## 1.7.7
10
+
11
+ ### Patch Changes
12
+
13
+ - Added: isomorphic-fetch
14
+ - Updating: dependencies
15
+ - Updated dependencies
16
+ - @websolutespa/bom-core@1.7.3
17
+
18
+ ## 1.7.6
19
+
20
+ ### Patch Changes
21
+
22
+ - Added: beforeDuplicateCollectionHook
23
+ - Fixing: decorateNav\_ link href issue
24
+
25
+ ## 1.7.5
26
+
27
+ ### Patch Changes
28
+
29
+ - Modified: Label collection title -> text
30
+
31
+ ## 1.7.4
32
+
33
+ ### Patch Changes
34
+
35
+ - Fixing: findRoute redirects
36
+
37
+ ## 1.7.3
38
+
39
+ ### Patch Changes
40
+
41
+ - Added: WhereService, StaticService, localize decorator
42
+ - Modified: withCollection, withStaticCollection, withAction, CollectionService, PageService
43
+
44
+ ## 1.7.2
45
+
46
+ ### Patch Changes
47
+
48
+ - Fixing: setMixerContext
49
+
50
+ ## 1.7.1
51
+
52
+ ### Patch Changes
53
+
54
+ - Fixing: MenuService & CategoryTree
55
+
56
+ ## 1.7.0
57
+
58
+ ### Minor Changes
59
+
60
+ - 28e86bd: Modified: IPage, Store services & decorators
61
+ - Updated dependencies [28e86bd]
62
+ - @websolutespa/bom-core@1.7.0
63
+
64
+ ## 1.6.0
65
+
66
+ ### Minor Changes
67
+
68
+ - 6707ca2: Upgrading Payload 2.11.2
69
+
70
+ ### Patch Changes
71
+
72
+ - f664993: Added: useLivePreview
73
+ - Updated dependencies [6cbf4cb]
74
+ - @websolutespa/bom-core@0.6.7
75
+
76
+ ## 1.3.6
77
+
78
+ ### Patch Changes
79
+
80
+ - Fixing: afterPageReadHook
81
+
82
+ ## 1.3.5
83
+
84
+ ### Patch Changes
85
+
86
+ - Added: afterPageReadHook, MixerContext, getGlobalItems
87
+ - Modified: getCollectionItems, getCollectionItem
88
+
89
+ ## 1.3.4
90
+
91
+ ### Patch Changes
92
+
93
+ - Added: user roles and user actions
94
+ - Added: main menu sortByGroup
95
+
96
+ ## 1.3.3
97
+
98
+ ### Patch Changes
99
+
100
+ - Fixing: PageService decorators
101
+
102
+ ## 1.3.2
103
+
104
+ ### Patch Changes
105
+
106
+ - 8776e50b: Modified: PageService decorators
107
+
108
+ ## 1.3.1
109
+
110
+ ### Patch Changes
111
+
112
+ - Added: configuration option plugins
113
+
114
+ ## 1.3.0
115
+
116
+ ### Minor Changes
117
+
118
+ - c7a99a2b: Added tests
119
+
120
+ ### Patch Changes
121
+
122
+ - dad63747: Added defaultMarket, defaultLocale
123
+ - 11b63e3b: Fixed test config
124
+ - c7a99a2b: Fixed collection bulk patch handler
125
+ - Updated dependencies [dad63747]
126
+ - @websolutespa/bom-core@0.6.1
127
+
128
+ ## 1.2.0
129
+
130
+ ### Minor Changes
131
+
132
+ - Added: MenuItem extra
133
+
134
+ ## 1.1.0
135
+
136
+ ### Minor Changes
137
+
138
+ - Updating: dependencies
139
+
140
+ ## 1.0.6
141
+
142
+ ### Patch Changes
143
+
144
+ - Fixing: validateHexColor import
145
+
146
+ ## 1.0.5
147
+
148
+ ### Patch Changes
149
+
150
+ - Fixing: check redirects by pattern
151
+
152
+ ## 1.0.4
153
+
154
+ ### Patch Changes
155
+
156
+ - Fixing: storeGet endpoint locale
157
+
158
+ ## 1.0.3
159
+
160
+ ### Patch Changes
161
+
162
+ - Modified: withPage preview, getApiUrl
163
+
164
+ ## 1.0.2
165
+
166
+ ### Patch Changes
167
+
168
+ - Added: duration to withStaticCollection
169
+ - Fixing: eachField
170
+
171
+ ## 1.0.1
172
+
173
+ ### Minor Changes
174
+
175
+ - Added: CategoryTree
176
+ - Fixing: sass
177
+
178
+ ## 0.5.0
179
+
180
+ ### Minor Changes
181
+
182
+ - Modified routes, added redirects
183
+
184
+ ## 0.4.0
185
+
186
+ ### Minor Changes
187
+
188
+ - Removed: external dependency @websolutespa/payload-plugin-localization
189
+
190
+ ## 0.3.2
191
+
192
+ ### Patch Changes
193
+
194
+ - Fixing: avoid categories circular reference
195
+
196
+ ## 0.3.1
197
+
198
+ ### Patch Changes
199
+
200
+ - Modified: ILocalizable
201
+
202
+ ## 0.3.0
203
+
204
+ ### Minor Changes
205
+
206
+ - Added: splat routes
207
+
208
+ ## 0.2.0
209
+
210
+ ### Minor Changes
211
+
212
+ - Added: menu, @websolutespa/bom-core
213
+
214
+ ## 0.1.1
215
+
216
+ ### Patch Changes
217
+
218
+ - Modified: route service
219
+ - Added: white label
220
+
221
+ ## 0.1.0
222
+
223
+ ### Minor Changes
224
+
225
+ - mock refactor
226
+
227
+ ## 0.0.1
228
+
229
+ ### Patch Changes
230
+
231
+ - Added: first release
package/dist/index.js CHANGED
@@ -5315,8 +5315,7 @@ var withAction = /* @__PURE__ */ __name((config) => {
5315
5315
  name: "endUser",
5316
5316
  label: "End user",
5317
5317
  type: "relationship",
5318
- relationTo: options.slug.endUsers,
5319
- required: true
5318
+ relationTo: options.slug.endUsers
5320
5319
  }
5321
5320
  ];
5322
5321
  if (!actionConfig.endpoints) {
@@ -6204,8 +6203,17 @@ var import_isomorphic_fetch = require("isomorphic-fetch");
6204
6203
  var ID = 0;
6205
6204
  var CACHE_3 = {};
6206
6205
  async function getCollection(url) {
6207
- const response = await fetch(url, { method: "GET" }).then((response2) => response2.json());
6208
- const items = response.data.items;
6206
+ let items = [];
6207
+ try {
6208
+ const httpResponse = await fetch(url, { method: "GET" });
6209
+ if (!httpResponse.ok) {
6210
+ throw httpResponse;
6211
+ }
6212
+ const response = await httpResponse.json();
6213
+ items = response.items;
6214
+ } catch (error) {
6215
+ console.error("withStaticCollection.getCollection.error", error);
6216
+ }
6209
6217
  return items;
6210
6218
  }
6211
6219
  __name(getCollection, "getCollection");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/payload-plugin-bowl",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "Bowl PayloadCms plugin of the BOM Repository",
5
5
  "keywords": [
6
6
  "payload",