pb-sxp-ui 1.15.8 → 1.15.9

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.
@@ -126,6 +126,23 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
126
126
  .then((res) => res.json())
127
127
  .catch((err) => Promise.reject(err));
128
128
  }, [bffDataSource, fakeUserId]);
129
+ const bffFetchAdmin = useCallback((path, options) => {
130
+ if (!bffDataSource)
131
+ return;
132
+ const url = bffDataSource.url;
133
+ if (options === null || options === void 0 ? void 0 : options.query) {
134
+ const queryString = qs.stringify(options.query);
135
+ path = `${path}?${queryString}`;
136
+ }
137
+ return window
138
+ .fetch(`${url}/admin/${path}`, {
139
+ headers: Object.assign({ 'Content-Type': 'application/json' }, bffDataSource.headers),
140
+ method: options.method,
141
+ body: JSON.stringify(options.body)
142
+ })
143
+ .then((res) => res.json())
144
+ .catch((err) => Promise.reject(err));
145
+ }, [bffDataSource]);
129
146
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
130
147
  var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
131
148
  query = Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId }));
@@ -153,7 +170,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
153
170
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
154
171
  var _v, _w, _x, _y, _z, _0;
155
172
  query.pageNum = pageNum;
156
- result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
173
+ result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
157
174
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
158
175
  return undefined;
159
176
  }
@@ -193,7 +210,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
193
210
  return Object.assign(Object.assign({}, result.data), { recList: list });
194
211
  }
195
212
  return result === null || result === void 0 ? void 0 : result.data;
196
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId]);
213
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
197
214
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
198
215
  var _1, _2, _3, _4;
199
216
  if (rtcList.length <= 0) {
@@ -12,7 +12,7 @@ const Click = createMaterial(ClickComponent, {
12
12
  },
13
13
  defaulSetting: {
14
14
  props: {
15
- content: '<p><strong><span style="font-size:14px"><span style="line-height:3">Your Cookie Preferences</span></span></strong></p><p>We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &quot;Accept all cookies&quot;. If you click on &quot;Reject all cookies&quot;, we will only use cookies necessary for the proper functioning and security of this site. To personalise on adjust your preferences at any time, click on &quot;Cookies Settings&quot; below or at the bottom of any Fendi.com webpage. For more information, read our Cookie Policy.</p><p></p>',
15
+ content: '<p><strong><span style="font-size:14px"><span style="line-height:3">Your Cookie Preferences</span></span></strong></p><p><span style="font-size:13px"><span style="line-height:1.7">We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &quot;Accept all cookies&quot;. If you click on &quot;Reject all cookies&quot;, we will only use cookies necessary for the proper functioning and security of this site. To personalise on adjust your preferences at any time, click on &quot;Cookies Settings&quot; below or at the bottom of any Fendi.com webpage. For more information, read our Cookie Policy.</span></span></p><p></p>',
16
16
  acceptButton: {
17
17
  text: 'Accept all cookies',
18
18
  style: {
@@ -12,7 +12,7 @@ const Swipe = createMaterial(SwipeComponent, {
12
12
  },
13
13
  defaulSetting: {
14
14
  props: {
15
- content: '<p><span style="font- size: 14px"><strong><span style="line - height: 3">Your Cookie Preferences</span></strong></span></p><p><span style="line- height: 1"><span style="font- size: 12px">We use cookie, including third-party cookies, to</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">ensure the proper functioning and security of</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">this site, to analyse its use, and to show you</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">personalised content.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">You can authorise the use of all cookies by</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">clicking on &#x27;Accept all cookies&#x27;. If you click on</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">&#x27;Reject all cookies&#x27;, we will only use cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">necessary for the proper functioning and </span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">security of this site. To personalise or adjust</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">your preferences at any time, click on &#x27;Cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Settings&#x27; below or at the bottom of any</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Fendi.com webpage.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">For more information, <u>read our Cookie Policy</u>.</span></span></p>'
15
+ content: '<p><strong><span style="font-size:18px"><span style="line-height:1.7">Your Cookie Preferences</span></span></strong></p><p><span style="line-height:1.7"><span style="font-size:13px">We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &#x27;Accept all cookies&#x27;. If you click on &#x27;Reject all cookies&#x27;, we will only use cookies necessary for the proper functioning and security of this site. To personalise or adjust your preferences at any time, click on &#x27;Cookies Settings&#x27; below or at the bottom of any Fendi.com webpage. For more information, <u>read our Cookie Policy</u>.</span></span></p>'
16
16
  },
17
17
  style: {
18
18
  backgroundColor: '#fff',
@@ -129,6 +129,23 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
129
129
  .then((res) => res.json())
130
130
  .catch((err) => Promise.reject(err));
131
131
  }, [bffDataSource, fakeUserId]);
132
+ const bffFetchAdmin = (0, react_1.useCallback)((path, options) => {
133
+ if (!bffDataSource)
134
+ return;
135
+ const url = bffDataSource.url;
136
+ if (options === null || options === void 0 ? void 0 : options.query) {
137
+ const queryString = qs_1.default.stringify(options.query);
138
+ path = `${path}?${queryString}`;
139
+ }
140
+ return window
141
+ .fetch(`${url}/admin/${path}`, {
142
+ headers: Object.assign({ 'Content-Type': 'application/json' }, bffDataSource.headers),
143
+ method: options.method,
144
+ body: JSON.stringify(options.body)
145
+ })
146
+ .then((res) => res.json())
147
+ .catch((err) => Promise.reject(err));
148
+ }, [bffDataSource]);
132
149
  const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
133
150
  var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
134
151
  query = Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId }));
@@ -156,7 +173,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
156
173
  const recurveRecList = (query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
157
174
  var _v, _w, _x, _y, _z, _0;
158
175
  query.pageNum = pageNum;
159
- result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
176
+ result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
160
177
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
161
178
  return undefined;
162
179
  }
@@ -196,7 +213,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
196
213
  return Object.assign(Object.assign({}, result.data), { recList: list });
197
214
  }
198
215
  return result === null || result === void 0 ? void 0 : result.data;
199
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId]);
216
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
200
217
  const loadVideos = (0, react_1.useCallback)((pageNum) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
201
218
  var _1, _2, _3, _4;
202
219
  if (rtcList.length <= 0) {
@@ -16,7 +16,7 @@ const Click = (0, create_1.createMaterial)(_1.default, {
16
16
  },
17
17
  defaulSetting: {
18
18
  props: {
19
- content: '<p><strong><span style="font-size:14px"><span style="line-height:3">Your Cookie Preferences</span></span></strong></p><p>We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &quot;Accept all cookies&quot;. If you click on &quot;Reject all cookies&quot;, we will only use cookies necessary for the proper functioning and security of this site. To personalise on adjust your preferences at any time, click on &quot;Cookies Settings&quot; below or at the bottom of any Fendi.com webpage. For more information, read our Cookie Policy.</p><p></p>',
19
+ content: '<p><strong><span style="font-size:14px"><span style="line-height:3">Your Cookie Preferences</span></span></strong></p><p><span style="font-size:13px"><span style="line-height:1.7">We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &quot;Accept all cookies&quot;. If you click on &quot;Reject all cookies&quot;, we will only use cookies necessary for the proper functioning and security of this site. To personalise on adjust your preferences at any time, click on &quot;Cookies Settings&quot; below or at the bottom of any Fendi.com webpage. For more information, read our Cookie Policy.</span></span></p><p></p>',
20
20
  acceptButton: {
21
21
  text: 'Accept all cookies',
22
22
  style: {
@@ -16,7 +16,7 @@ const Swipe = (0, create_1.createMaterial)(_1.default, {
16
16
  },
17
17
  defaulSetting: {
18
18
  props: {
19
- content: '<p><span style="font- size: 14px"><strong><span style="line - height: 3">Your Cookie Preferences</span></strong></span></p><p><span style="line- height: 1"><span style="font- size: 12px">We use cookie, including third-party cookies, to</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">ensure the proper functioning and security of</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">this site, to analyse its use, and to show you</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">personalised content.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">You can authorise the use of all cookies by</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">clicking on &#x27;Accept all cookies&#x27;. If you click on</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">&#x27;Reject all cookies&#x27;, we will only use cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">necessary for the proper functioning and </span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">security of this site. To personalise or adjust</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">your preferences at any time, click on &#x27;Cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Settings&#x27; below or at the bottom of any</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Fendi.com webpage.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">For more information, <u>read our Cookie Policy</u>.</span></span></p>'
19
+ content: '<p><strong><span style="font-size:18px"><span style="line-height:1.7">Your Cookie Preferences</span></span></strong></p><p><span style="line-height:1.7"><span style="font-size:13px">We use cookie, including third-party cookies, to ensure the proper functioning and security of this site, to analyse its use, and to show you personalised content. You can authorise the use of all cookies by clicking on &#x27;Accept all cookies&#x27;. If you click on &#x27;Reject all cookies&#x27;, we will only use cookies necessary for the proper functioning and security of this site. To personalise or adjust your preferences at any time, click on &#x27;Cookies Settings&#x27; below or at the bottom of any Fendi.com webpage. For more information, <u>read our Cookie Policy</u>.</span></span></p>'
20
20
  },
21
21
  style: {
22
22
  backgroundColor: '#fff',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.8",
3
+ "version": "1.15.9",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",