jamespot-front-business 1.2.43 → 1.2.45
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/cjs.js +45 -13
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +45 -14
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +155 -1952
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -3,6 +3,25 @@ import { combineReducers as combineReducers$1 } from 'redux';
|
|
|
3
3
|
import jamespot, { jEnsure, Format, formatImgUrl, UserLevel, WidgetsName, StudioApplicationStatus } from 'jamespot-user-api';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
|
|
6
|
+
const getArticleRTHandlers = function (listener) {
|
|
7
|
+
const addArticleHandler = function (message) {
|
|
8
|
+
if (message.namespace === 'JAMESPOT' && message.function === 'article-create') {
|
|
9
|
+
listener(message.object);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
namespace: 'JAMESPOT',
|
|
15
|
+
function: 'article-create',
|
|
16
|
+
handler: addArticleHandler,
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Article = {
|
|
22
|
+
getArticleRTHandlers,
|
|
23
|
+
};
|
|
24
|
+
|
|
6
25
|
const isAbortError = (error) => {
|
|
7
26
|
return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
|
|
8
27
|
};
|
|
@@ -538,11 +557,12 @@ const initialState$o = {
|
|
|
538
557
|
const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset', async (_, { extra }) => {
|
|
539
558
|
const filterSpec = {
|
|
540
559
|
type: 'bookableAsset',
|
|
541
|
-
format: 'raw-list',
|
|
542
560
|
limit: 50,
|
|
543
561
|
public: true,
|
|
544
562
|
};
|
|
545
|
-
return await extra.jApi.article.list(filterSpec
|
|
563
|
+
return await extra.jApi.article.list(filterSpec, {
|
|
564
|
+
format: 'raw-list',
|
|
565
|
+
});
|
|
546
566
|
});
|
|
547
567
|
const BookableAssetSlice = createSlice({
|
|
548
568
|
name: 'bookableAsset',
|
|
@@ -1405,7 +1425,7 @@ const saveExtraBot = createAsyncThunk('extraBot/save', async ({ extraBot }, { ex
|
|
|
1405
1425
|
user = (await extra.jApi.extraBot.updateBot(res.uri)).result;
|
|
1406
1426
|
}
|
|
1407
1427
|
else {
|
|
1408
|
-
res = (await extra.jApi.article.create({ ...data }, Format.VIEW)).result[0];
|
|
1428
|
+
res = (await extra.jApi.article.create({ ...data }, { format: Format.VIEW })).result[0];
|
|
1409
1429
|
if (!res) {
|
|
1410
1430
|
throw new Error('ExtraBot configuration creation failed');
|
|
1411
1431
|
}
|
|
@@ -1707,10 +1727,13 @@ const fetchJLandMaps = createAsyncThunk('/fetchMaps', async ({ jlandUrlBase, ret
|
|
|
1707
1727
|
return await new Promise((resolve, reject) => {
|
|
1708
1728
|
const config = {
|
|
1709
1729
|
type: 'jlandmap',
|
|
1710
|
-
format: 'raw-list',
|
|
1711
|
-
formatExtend: ['licenses'],
|
|
1712
1730
|
};
|
|
1713
|
-
const mapsPromise = retrieveAllMaps
|
|
1731
|
+
const mapsPromise = retrieveAllMaps
|
|
1732
|
+
? jApi.jland.getAllMapsAsAdmin()
|
|
1733
|
+
: jApi.article.list(config, {
|
|
1734
|
+
format: 'raw-list',
|
|
1735
|
+
formatExtension: ['licenses'],
|
|
1736
|
+
});
|
|
1714
1737
|
mapsPromise
|
|
1715
1738
|
.then((mapsResp) => {
|
|
1716
1739
|
const maps = mapsResp.result.data;
|
|
@@ -1946,13 +1969,18 @@ const createMap = createAsyncThunk('mapCreate/create', async ({ map, jlandUrlBas
|
|
|
1946
1969
|
const jApi = extra.jApi;
|
|
1947
1970
|
return await new Promise((resolve, reject) => {
|
|
1948
1971
|
jApi.article
|
|
1949
|
-
.create(payload,
|
|
1972
|
+
.create(payload, {
|
|
1973
|
+
format: 'raw-list',
|
|
1974
|
+
formatExtension: ['licenses'],
|
|
1975
|
+
})
|
|
1950
1976
|
.then(async (response) => {
|
|
1951
1977
|
if (response.error) {
|
|
1952
1978
|
reject({ error: 1, errorMsg: response.errorMsg });
|
|
1953
1979
|
return;
|
|
1954
1980
|
}
|
|
1955
|
-
const createdMap = response.result[0]
|
|
1981
|
+
const createdMap = response.result[0]
|
|
1982
|
+
? { ...response.result[0], urlToJland: undefined }
|
|
1983
|
+
: undefined;
|
|
1956
1984
|
if (map.assignLicense && createdMap !== undefined) {
|
|
1957
1985
|
const hostname = await jApi.network.getHostname();
|
|
1958
1986
|
createdMap.urlToJland = buildUrlToJland(createdMap, hostname, jlandUrlBase);
|
|
@@ -2105,11 +2133,12 @@ const fetchPads = createAsyncThunk('magicPad/fetchPads', async (params, { extra,
|
|
|
2105
2133
|
return (await extra.jApi.article.list({
|
|
2106
2134
|
type: 'magicpad',
|
|
2107
2135
|
limit: state.limit,
|
|
2108
|
-
format: 'raw-view',
|
|
2109
2136
|
page,
|
|
2110
2137
|
query,
|
|
2111
2138
|
orders,
|
|
2112
2139
|
filters,
|
|
2140
|
+
}, {
|
|
2141
|
+
format: 'raw-view',
|
|
2113
2142
|
})).result;
|
|
2114
2143
|
}
|
|
2115
2144
|
catch (error) {
|
|
@@ -2240,11 +2269,12 @@ const mediaLibrarySlice = createSlice({
|
|
|
2240
2269
|
const fetchMediaLibraryFolders = createAsyncThunk('MediaLibrary/fetchMediaLibraryFolders', async (_, { extra, rejectWithValue, dispatch }) => {
|
|
2241
2270
|
const args = {
|
|
2242
2271
|
type: MediaLibraryAppConst.typeMediaLibraryFolder,
|
|
2243
|
-
format: 'raw-little',
|
|
2244
2272
|
limit: 10,
|
|
2245
2273
|
};
|
|
2246
2274
|
try {
|
|
2247
|
-
return await extra.jApi.article.list(args
|
|
2275
|
+
return await extra.jApi.article.list(args, {
|
|
2276
|
+
format: 'raw-list',
|
|
2277
|
+
});
|
|
2248
2278
|
}
|
|
2249
2279
|
catch (error) {
|
|
2250
2280
|
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
@@ -2721,12 +2751,13 @@ const fetchChannels = createAsyncThunk('/fetchChannels', async (page, { extra })
|
|
|
2721
2751
|
return await new Promise((resolve, reject) => {
|
|
2722
2752
|
const config = {
|
|
2723
2753
|
type: 'tvDisplayChannel',
|
|
2724
|
-
format: 'raw-list',
|
|
2725
2754
|
page: askedPage,
|
|
2726
2755
|
orders: [{ name: 'id', sort: 'DESC' }],
|
|
2727
2756
|
};
|
|
2728
2757
|
jApi.article
|
|
2729
|
-
.list(config
|
|
2758
|
+
.list(config, {
|
|
2759
|
+
format: 'raw-list',
|
|
2760
|
+
})
|
|
2730
2761
|
.then((channelsResp) => {
|
|
2731
2762
|
resolve(channelsResp.result);
|
|
2732
2763
|
})
|
|
@@ -6295,5 +6326,5 @@ const studio = {
|
|
|
6295
6326
|
},
|
|
6296
6327
|
};
|
|
6297
6328
|
|
|
6298
|
-
export { APP_STATUS_TYPE, AUDIENCE, AdminLogs, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormPrimaryListValues, AppFormUniqueList, AppFormUniqueListCheck, Application, AssetReservation, Bookmark, Comment, ContentReport, Description, Element, ExtraAppFieldsItemName, ExtraAppFieldsItemViews, ExtraBot, Faq, Hook, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, SocialActions, StatusType$1 as StatusType, TVDisplay, TeamWork, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, adminLogsReducer, adminLogsSlice, animationsReducer, animationsSlice, contentReportSlice, extraBotSlice, fetchExtraBotListAll, fetchExtraBotListMines, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, fetchReports, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveExtraBot, selectExtraBotListAll, selectExtraBotListMines, slice$1 as slice, studio, teamWorkSlice, teamworkReducer, toggleExtraBotActivation, updateListBotProperty, updateStatus, updateWidgetContent, viewsList };
|
|
6329
|
+
export { APP_STATUS_TYPE, AUDIENCE, AdminLogs, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormPrimaryListValues, AppFormUniqueList, AppFormUniqueListCheck, Application, Article, AssetReservation, Bookmark, Comment, ContentReport, Description, Element, ExtraAppFieldsItemName, ExtraAppFieldsItemViews, ExtraBot, Faq, Hook, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, SocialActions, StatusType$1 as StatusType, TVDisplay, TeamWork, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, adminLogsReducer, adminLogsSlice, animationsReducer, animationsSlice, contentReportSlice, extraBotSlice, fetchExtraBotListAll, fetchExtraBotListMines, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, fetchReports, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveExtraBot, selectExtraBotListAll, selectExtraBotListMines, slice$1 as slice, studio, teamWorkSlice, teamworkReducer, toggleExtraBotActivation, updateListBotProperty, updateStatus, updateWidgetContent, viewsList };
|
|
6299
6330
|
//# sourceMappingURL=esm.js.map
|