jamespot-front-business 1.1.50 → 1.1.52
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 +192 -117
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +190 -118
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +165 -4
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -1387,6 +1387,9 @@ const initialState$b = {
|
|
|
1387
1387
|
folders: [],
|
|
1388
1388
|
unclassifiedFiles: { list: [], page: 0, totalPages: 0 },
|
|
1389
1389
|
mediaLibraryAccess: false,
|
|
1390
|
+
stats: null,
|
|
1391
|
+
foldersStats: { loading: false, pager: null },
|
|
1392
|
+
filesStats: { loading: false, pager: null },
|
|
1390
1393
|
};
|
|
1391
1394
|
const mediaLibrarySlice = createSlice({
|
|
1392
1395
|
name: 'mediaLibrary',
|
|
@@ -1442,6 +1445,38 @@ const mediaLibrarySlice = createSlice({
|
|
|
1442
1445
|
.addCase(fetchMediaLibraryConfig.pending, (state) => {
|
|
1443
1446
|
state.loading = 'pending';
|
|
1444
1447
|
state.mediaLibraryAccess = false;
|
|
1448
|
+
})
|
|
1449
|
+
.addCase(fetchMediaLibraryStats.fulfilled, (state, action) => {
|
|
1450
|
+
var _a;
|
|
1451
|
+
state.loading = 'idle';
|
|
1452
|
+
state.stats = Object.assign({}, (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result);
|
|
1453
|
+
})
|
|
1454
|
+
.addCase(fetchMediaLibraryStats.rejected, (state) => {
|
|
1455
|
+
state.loading = 'idle';
|
|
1456
|
+
state.stats = null;
|
|
1457
|
+
})
|
|
1458
|
+
.addCase(fetchMediaLibraryStats.pending, (state) => {
|
|
1459
|
+
state.loading = 'pending';
|
|
1460
|
+
})
|
|
1461
|
+
.addCase(fetchMediaLibraryFoldersStats.fulfilled, (state, action) => {
|
|
1462
|
+
var _a;
|
|
1463
|
+
state.foldersStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
|
|
1464
|
+
})
|
|
1465
|
+
.addCase(fetchMediaLibraryFoldersStats.rejected, (state) => {
|
|
1466
|
+
state.foldersStats = { loading: false, pager: null };
|
|
1467
|
+
})
|
|
1468
|
+
.addCase(fetchMediaLibraryFoldersStats.pending, (state) => {
|
|
1469
|
+
state.foldersStats.loading = true;
|
|
1470
|
+
})
|
|
1471
|
+
.addCase(fetchMediaLibraryFilesStats.fulfilled, (state, action) => {
|
|
1472
|
+
var _a;
|
|
1473
|
+
state.filesStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
|
|
1474
|
+
})
|
|
1475
|
+
.addCase(fetchMediaLibraryFilesStats.rejected, (state) => {
|
|
1476
|
+
state.filesStats = { loading: false, pager: null };
|
|
1477
|
+
})
|
|
1478
|
+
.addCase(fetchMediaLibraryFilesStats.pending, (state) => {
|
|
1479
|
+
state.filesStats.loading = true;
|
|
1445
1480
|
});
|
|
1446
1481
|
},
|
|
1447
1482
|
});
|
|
@@ -1481,12 +1516,42 @@ const fetchMediaLibraryConfig = createAsyncThunk('MediaLibrary/fetchMediaLibrary
|
|
|
1481
1516
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
|
|
1482
1517
|
}
|
|
1483
1518
|
}));
|
|
1519
|
+
const fetchMediaLibraryFoldersStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFoldersStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1520
|
+
try {
|
|
1521
|
+
return yield extra.jApi.mediaLibrary.getFoldersStatsList(filters, orders, page);
|
|
1522
|
+
}
|
|
1523
|
+
catch (error) {
|
|
1524
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1525
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary folders stats' });
|
|
1526
|
+
}
|
|
1527
|
+
}));
|
|
1528
|
+
const fetchMediaLibraryFilesStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFilesStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1529
|
+
try {
|
|
1530
|
+
return yield extra.jApi.mediaLibrary.getFilesStatsList(filters, orders, page);
|
|
1531
|
+
}
|
|
1532
|
+
catch (error) {
|
|
1533
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1534
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
|
|
1535
|
+
}
|
|
1536
|
+
}));
|
|
1537
|
+
const fetchMediaLibraryStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', ({ filters }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1538
|
+
try {
|
|
1539
|
+
return yield extra.jApi.mediaLibrary.getStats(filters);
|
|
1540
|
+
}
|
|
1541
|
+
catch (error) {
|
|
1542
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1543
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary stats' });
|
|
1544
|
+
}
|
|
1545
|
+
}));
|
|
1484
1546
|
const selectMediaLibrary = (state) => state.mediaLibrary;
|
|
1547
|
+
const selectMediaLibraryStats = (state) => state.mediaLibrary.stats;
|
|
1548
|
+
const selectMediaLibraryFoldersStats = (state) => state.mediaLibrary.foldersStats;
|
|
1549
|
+
const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
|
|
1485
1550
|
const mediaLibraryReducer = mediaLibrarySlice.reducer;
|
|
1486
1551
|
const MediaLibrary = {
|
|
1487
1552
|
slice: mediaLibrarySlice,
|
|
1488
|
-
actions: { fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchMediaLibraryConfig },
|
|
1489
|
-
selectors: { selectMediaLibrary }
|
|
1553
|
+
actions: { fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchMediaLibraryConfig, fetchMediaLibraryStats, fetchMediaLibraryFilesStats, fetchMediaLibraryFoldersStats },
|
|
1554
|
+
selectors: { selectMediaLibrary, selectMediaLibraryStats, selectMediaLibraryFoldersStats, selectMediaLibraryFilesStats }
|
|
1490
1555
|
};
|
|
1491
1556
|
|
|
1492
1557
|
const adapter = createEntityAdapter({
|
|
@@ -1931,11 +1996,42 @@ const UserCurrent = {
|
|
|
1931
1996
|
utils: { isAdmin, isLogged },
|
|
1932
1997
|
};
|
|
1933
1998
|
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1999
|
+
function uniqid() {
|
|
2000
|
+
let id = '';
|
|
2001
|
+
for (let index = 0; index < 16; index++) {
|
|
2002
|
+
id += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
2003
|
+
}
|
|
2004
|
+
return id;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
const WIDGET_ARTICLE_TITLE = 'widget-article-title';
|
|
2008
|
+
const WIDGET_ARTICLE_TEXT = 'widget-article-text';
|
|
2009
|
+
const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
|
|
2010
|
+
const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
|
|
2011
|
+
const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
|
|
2012
|
+
const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
|
|
2013
|
+
const WIDGET_CHECK_LIST = 'widget-check-list';
|
|
2014
|
+
const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
|
|
2015
|
+
const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
|
|
2016
|
+
|
|
2017
|
+
var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
2018
|
+
__proto__: null,
|
|
2019
|
+
WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
|
|
2020
|
+
WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
|
|
2021
|
+
WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
|
|
2022
|
+
WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
|
|
2023
|
+
WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
|
|
2024
|
+
WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
|
|
2025
|
+
WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
|
|
2026
|
+
WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
|
|
2027
|
+
WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
|
|
2028
|
+
});
|
|
2029
|
+
|
|
2030
|
+
const widgetArticleTextDefinition = {
|
|
2031
|
+
label: 'WIDGET_Text',
|
|
2032
|
+
description: 'WIDGET_Text_Description',
|
|
2033
|
+
name: 'widget-article-text',
|
|
2034
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
|
|
1939
2035
|
available: true,
|
|
1940
2036
|
panel: {
|
|
1941
2037
|
useWrapper: false,
|
|
@@ -1943,51 +2039,42 @@ const widgetApiDefinition = {
|
|
|
1943
2039
|
useWidgets: false,
|
|
1944
2040
|
},
|
|
1945
2041
|
};
|
|
1946
|
-
const
|
|
1947
|
-
|
|
2042
|
+
const widgetArticleTextContent = {
|
|
2043
|
+
text: '',
|
|
1948
2044
|
};
|
|
1949
2045
|
|
|
1950
|
-
const
|
|
1951
|
-
label: '
|
|
1952
|
-
description: '
|
|
1953
|
-
name: 'widget-article-
|
|
1954
|
-
img: '/img/article-widget-thumbnail/
|
|
2046
|
+
const widgetArticleTitleDefinition = {
|
|
2047
|
+
label: 'WIDGET_Title',
|
|
2048
|
+
description: 'WIDGET_Title_Description',
|
|
2049
|
+
name: 'widget-article-title',
|
|
2050
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
|
|
1955
2051
|
available: true,
|
|
1956
2052
|
panel: {
|
|
1957
|
-
useWrapper:
|
|
2053
|
+
useWrapper: false,
|
|
1958
2054
|
useEditor: true,
|
|
1959
2055
|
useWidgets: false,
|
|
1960
2056
|
},
|
|
1961
2057
|
};
|
|
1962
|
-
const
|
|
1963
|
-
|
|
2058
|
+
const widgetArticleTitleContent = {
|
|
2059
|
+
text: '',
|
|
2060
|
+
heading: 'h1',
|
|
2061
|
+
backgroundColor: 'transparent',
|
|
1964
2062
|
};
|
|
1965
2063
|
|
|
1966
|
-
const
|
|
1967
|
-
label: '
|
|
1968
|
-
description: '
|
|
1969
|
-
name: 'widget-article-
|
|
1970
|
-
img: '/img/article-widget-thumbnail/
|
|
2064
|
+
const widgetArticleAttachmentDefinition = {
|
|
2065
|
+
label: 'WIDGET_Article_Attachment',
|
|
2066
|
+
description: 'WIDGET_Article_Attachment_Description',
|
|
2067
|
+
name: 'widget-article-attachment',
|
|
2068
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
1971
2069
|
available: true,
|
|
1972
2070
|
panel: {
|
|
1973
|
-
useWrapper:
|
|
2071
|
+
useWrapper: true,
|
|
1974
2072
|
useEditor: true,
|
|
1975
2073
|
useWidgets: false,
|
|
1976
2074
|
},
|
|
1977
2075
|
};
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
openingType: 'link',
|
|
1981
|
-
openingTypeLink: {
|
|
1982
|
-
url: '',
|
|
1983
|
-
target: '_blank',
|
|
1984
|
-
},
|
|
1985
|
-
variant: 'contained',
|
|
1986
|
-
fontSize: '14',
|
|
1987
|
-
color: '#fff',
|
|
1988
|
-
backgroundColor: '#4dbf96',
|
|
1989
|
-
buttonSize: 'lg',
|
|
1990
|
-
borderRadius: '4',
|
|
2076
|
+
const widgetArticleAttachmentContent = {
|
|
2077
|
+
files: [],
|
|
1991
2078
|
};
|
|
1992
2079
|
|
|
1993
2080
|
const widgetArticleGalleryDefinition = {
|
|
@@ -2022,11 +2109,11 @@ const widgetArticleImageDefinition = {
|
|
|
2022
2109
|
};
|
|
2023
2110
|
const widgetArticleImageContent = {};
|
|
2024
2111
|
|
|
2025
|
-
const
|
|
2026
|
-
label: '
|
|
2027
|
-
description: '
|
|
2028
|
-
name: 'widget-article-
|
|
2029
|
-
img: '/img/article-widget-thumbnail/
|
|
2112
|
+
const widgetArticleButtonDefinition = {
|
|
2113
|
+
label: 'WIDGET_Button',
|
|
2114
|
+
description: 'WIDGET_Button_Description',
|
|
2115
|
+
name: 'widget-article-button',
|
|
2116
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
2030
2117
|
available: true,
|
|
2031
2118
|
panel: {
|
|
2032
2119
|
useWrapper: false,
|
|
@@ -2034,19 +2121,26 @@ const widgetArticleSliderDefinition = {
|
|
|
2034
2121
|
useWidgets: false,
|
|
2035
2122
|
},
|
|
2036
2123
|
};
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2124
|
+
const widgetArticleButtonContent = {
|
|
2125
|
+
text: '',
|
|
2126
|
+
openingType: 'link',
|
|
2127
|
+
openingTypeLink: {
|
|
2128
|
+
url: '',
|
|
2129
|
+
target: '_blank',
|
|
2130
|
+
},
|
|
2131
|
+
variant: 'contained',
|
|
2132
|
+
fontSize: '14',
|
|
2133
|
+
color: '#fff',
|
|
2134
|
+
backgroundColor: '#4dbf96',
|
|
2135
|
+
buttonSize: 'lg',
|
|
2136
|
+
borderRadius: '4',
|
|
2043
2137
|
};
|
|
2044
2138
|
|
|
2045
|
-
const
|
|
2046
|
-
label: '
|
|
2047
|
-
description: '
|
|
2048
|
-
name: 'widget-
|
|
2049
|
-
img: '/img/
|
|
2139
|
+
const widgetApiDefinition = {
|
|
2140
|
+
label: 'WIDGET_Api',
|
|
2141
|
+
description: 'WIDGET_Api_Description',
|
|
2142
|
+
name: 'widget-api',
|
|
2143
|
+
img: '/img/fast-intranet/widget-text.png',
|
|
2050
2144
|
available: true,
|
|
2051
2145
|
panel: {
|
|
2052
2146
|
useWrapper: false,
|
|
@@ -2054,15 +2148,15 @@ const widgetArticleTextDefinition = {
|
|
|
2054
2148
|
useWidgets: false,
|
|
2055
2149
|
},
|
|
2056
2150
|
};
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2151
|
+
const widgetApiContent = {
|
|
2152
|
+
url: '',
|
|
2059
2153
|
};
|
|
2060
2154
|
|
|
2061
|
-
const
|
|
2062
|
-
label: '
|
|
2063
|
-
description: '
|
|
2064
|
-
name: 'widget-article-
|
|
2065
|
-
img: '/img/article-widget-thumbnail/
|
|
2155
|
+
const widgetArticleSliderDefinition = {
|
|
2156
|
+
label: 'WIDGET_Slider',
|
|
2157
|
+
description: 'WIDGET_Slider_Description',
|
|
2158
|
+
name: 'widget-article-slider',
|
|
2159
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
2066
2160
|
available: true,
|
|
2067
2161
|
panel: {
|
|
2068
2162
|
useWrapper: false,
|
|
@@ -2070,35 +2164,14 @@ const widgetArticleTitleDefinition = {
|
|
|
2070
2164
|
useWidgets: false,
|
|
2071
2165
|
},
|
|
2072
2166
|
};
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2167
|
+
const widgetArticleSliderContent = {
|
|
2168
|
+
slides: [],
|
|
2169
|
+
maxWidth: 800,
|
|
2170
|
+
loop: false,
|
|
2171
|
+
useDots: true,
|
|
2172
|
+
startAt: 0,
|
|
2077
2173
|
};
|
|
2078
2174
|
|
|
2079
|
-
const WIDGET_ARTICLE_TITLE = 'widget-article-title';
|
|
2080
|
-
const WIDGET_ARTICLE_TEXT = 'widget-article-text';
|
|
2081
|
-
const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
|
|
2082
|
-
const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
|
|
2083
|
-
const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
|
|
2084
|
-
const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
|
|
2085
|
-
const WIDGET_CHECK_LIST = 'widget-check-list';
|
|
2086
|
-
const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
|
|
2087
|
-
const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
|
|
2088
|
-
|
|
2089
|
-
var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
2090
|
-
__proto__: null,
|
|
2091
|
-
WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
|
|
2092
|
-
WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
|
|
2093
|
-
WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
|
|
2094
|
-
WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
|
|
2095
|
-
WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
|
|
2096
|
-
WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
|
|
2097
|
-
WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
|
|
2098
|
-
WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
|
|
2099
|
-
WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
|
|
2100
|
-
});
|
|
2101
|
-
|
|
2102
2175
|
const widgetCheckListDefinition = {
|
|
2103
2176
|
label: WIDGET_CHECK_LIST_LABEL,
|
|
2104
2177
|
description: WIDGET_CHECK_LIST_DESCRIPTION,
|
|
@@ -2106,7 +2179,7 @@ const widgetCheckListDefinition = {
|
|
|
2106
2179
|
img: '/img/fast-intranet/widget-check-list.png',
|
|
2107
2180
|
available: true,
|
|
2108
2181
|
panel: {
|
|
2109
|
-
useWrapper:
|
|
2182
|
+
useWrapper: true,
|
|
2110
2183
|
useEditor: true,
|
|
2111
2184
|
useWidgets: false,
|
|
2112
2185
|
},
|
|
@@ -2115,12 +2188,29 @@ const widgetCheckListContent = {
|
|
|
2115
2188
|
arr: [],
|
|
2116
2189
|
};
|
|
2117
2190
|
|
|
2118
|
-
function
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2191
|
+
function widgetDefinition(name) {
|
|
2192
|
+
switch (name) {
|
|
2193
|
+
default:
|
|
2194
|
+
return widgetArticleGalleryDefinition;
|
|
2195
|
+
case 'widget-article-gallery':
|
|
2196
|
+
return widgetArticleGalleryDefinition;
|
|
2197
|
+
case 'widget-article-attachment':
|
|
2198
|
+
return widgetArticleAttachmentDefinition;
|
|
2199
|
+
case 'widget-article-slider':
|
|
2200
|
+
return widgetArticleSliderDefinition;
|
|
2201
|
+
case 'widget-article-text':
|
|
2202
|
+
return widgetArticleTextDefinition;
|
|
2203
|
+
case 'widget-article-title':
|
|
2204
|
+
return widgetArticleTitleDefinition;
|
|
2205
|
+
case 'widget-article-image':
|
|
2206
|
+
return widgetArticleImageDefinition;
|
|
2207
|
+
case 'widget-api':
|
|
2208
|
+
return widgetApiDefinition;
|
|
2209
|
+
case 'widget-article-button':
|
|
2210
|
+
return widgetArticleButtonDefinition;
|
|
2211
|
+
case 'widget-check-list':
|
|
2212
|
+
return widgetCheckListDefinition;
|
|
2122
2213
|
}
|
|
2123
|
-
return id;
|
|
2124
2214
|
}
|
|
2125
2215
|
|
|
2126
2216
|
function widgetFactory(name) {
|
|
@@ -2160,31 +2250,6 @@ function content(name) {
|
|
|
2160
2250
|
}
|
|
2161
2251
|
}
|
|
2162
2252
|
|
|
2163
|
-
function widgetDefinition(name) {
|
|
2164
|
-
switch (name) {
|
|
2165
|
-
default:
|
|
2166
|
-
return widgetArticleGalleryDefinition;
|
|
2167
|
-
case 'widget-article-gallery':
|
|
2168
|
-
return widgetArticleGalleryDefinition;
|
|
2169
|
-
case 'widget-article-attachment':
|
|
2170
|
-
return widgetArticleAttachmentDefinition;
|
|
2171
|
-
case 'widget-article-slider':
|
|
2172
|
-
return widgetArticleSliderDefinition;
|
|
2173
|
-
case 'widget-article-text':
|
|
2174
|
-
return widgetArticleTextDefinition;
|
|
2175
|
-
case 'widget-article-title':
|
|
2176
|
-
return widgetArticleTitleDefinition;
|
|
2177
|
-
case 'widget-article-image':
|
|
2178
|
-
return widgetArticleImageDefinition;
|
|
2179
|
-
case 'widget-api':
|
|
2180
|
-
return widgetApiDefinition;
|
|
2181
|
-
case 'widget-article-button':
|
|
2182
|
-
return widgetArticleButtonDefinition;
|
|
2183
|
-
case 'widget-check-list':
|
|
2184
|
-
return widgetCheckListDefinition;
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
2253
|
const MODE_EDIT = 'edit';
|
|
2189
2254
|
const MODE_VIEW = 'view';
|
|
2190
2255
|
const initialState$3 = {
|
|
@@ -2196,6 +2261,7 @@ const initialState$3 = {
|
|
|
2196
2261
|
editableMap: {},
|
|
2197
2262
|
currentEditableIndex: -1,
|
|
2198
2263
|
currentEditableWidgetId: undefined,
|
|
2264
|
+
widgetObject: {},
|
|
2199
2265
|
};
|
|
2200
2266
|
const widgetsSlice = createSlice({
|
|
2201
2267
|
name: 'widgets',
|
|
@@ -2206,6 +2272,10 @@ const widgetsSlice = createSlice({
|
|
|
2206
2272
|
state.ids[uniqid] = widget;
|
|
2207
2273
|
state.states[uniqid] = { busy: false, initialized: false, loading: false, mounted: false, hover: false, empty: true };
|
|
2208
2274
|
},
|
|
2275
|
+
registerWidgetObject: (state, action) => {
|
|
2276
|
+
const { uniqid, object } = action.payload;
|
|
2277
|
+
state.widgetObject[uniqid] = object;
|
|
2278
|
+
},
|
|
2209
2279
|
updateWidget: (state, action) => {
|
|
2210
2280
|
const { uniqid } = action.payload;
|
|
2211
2281
|
const wrapper = Object.assign({}, state.ids[uniqid]);
|
|
@@ -2322,6 +2392,7 @@ const selectWidgets = (state) => state.widgets.ids;
|
|
|
2322
2392
|
const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) === null || _a === void 0 ? void 0 : _a.widget.content; };
|
|
2323
2393
|
const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2324
2394
|
const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2395
|
+
const selectWidgetObject = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObject[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2325
2396
|
const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
|
|
2326
2397
|
const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
|
|
2327
2398
|
const Widget = {
|
|
@@ -2340,6 +2411,7 @@ const Widget = {
|
|
|
2340
2411
|
selectWidgetState,
|
|
2341
2412
|
selectWidgetContent,
|
|
2342
2413
|
selectModal,
|
|
2414
|
+
selectWidgetObject,
|
|
2343
2415
|
},
|
|
2344
2416
|
};
|
|
2345
2417
|
|
|
@@ -3790,5 +3862,5 @@ const studio = {
|
|
|
3790
3862
|
},
|
|
3791
3863
|
};
|
|
3792
3864
|
|
|
3793
|
-
export { APP_STATUS_TYPE, AUDIENCE, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormUniqueList, Application, AssetReservation, Bookmark, Comment, ExtraAppFieldsItemViews, Faq, Hook, MODE_EDIT, MODE_VIEW, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, StatusType$1 as StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, animationsReducer, animationsSlice, deleteCurrentAnimation, fetchCurrentAnimation, fetchCurrentAnimationApp, fetchMediaLibraryConfig, fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchPads, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveCurrentAnimation, slice, studio, toggleAnimationIsActive, updateWidgetContent, viewsList };
|
|
3865
|
+
export { APP_STATUS_TYPE, AUDIENCE, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormUniqueList, Application, AssetReservation, Bookmark, Comment, ExtraAppFieldsItemViews, Faq, Hook, MODE_EDIT, MODE_VIEW, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, StatusType$1 as StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, animationsReducer, animationsSlice, deleteCurrentAnimation, fetchCurrentAnimation, fetchCurrentAnimationApp, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveCurrentAnimation, slice, studio, toggleAnimationIsActive, updateWidgetContent, viewsList };
|
|
3794
3866
|
//# sourceMappingURL=esm.js.map
|