jamespot-front-business 1.1.50 → 1.1.51
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 +122 -115
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +122 -115
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +17 -3
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -1931,11 +1931,42 @@ const UserCurrent = {
|
|
|
1931
1931
|
utils: { isAdmin, isLogged },
|
|
1932
1932
|
};
|
|
1933
1933
|
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1934
|
+
function uniqid() {
|
|
1935
|
+
let id = '';
|
|
1936
|
+
for (let index = 0; index < 16; index++) {
|
|
1937
|
+
id += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
1938
|
+
}
|
|
1939
|
+
return id;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
const WIDGET_ARTICLE_TITLE = 'widget-article-title';
|
|
1943
|
+
const WIDGET_ARTICLE_TEXT = 'widget-article-text';
|
|
1944
|
+
const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
|
|
1945
|
+
const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
|
|
1946
|
+
const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
|
|
1947
|
+
const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
|
|
1948
|
+
const WIDGET_CHECK_LIST = 'widget-check-list';
|
|
1949
|
+
const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
|
|
1950
|
+
const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
|
|
1951
|
+
|
|
1952
|
+
var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
1953
|
+
__proto__: null,
|
|
1954
|
+
WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
|
|
1955
|
+
WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
|
|
1956
|
+
WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
|
|
1957
|
+
WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
|
|
1958
|
+
WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
|
|
1959
|
+
WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
|
|
1960
|
+
WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
|
|
1961
|
+
WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
|
|
1962
|
+
WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
|
|
1963
|
+
});
|
|
1964
|
+
|
|
1965
|
+
const widgetArticleTextDefinition = {
|
|
1966
|
+
label: 'WIDGET_Text',
|
|
1967
|
+
description: 'WIDGET_Text_Description',
|
|
1968
|
+
name: 'widget-article-text',
|
|
1969
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
|
|
1939
1970
|
available: true,
|
|
1940
1971
|
panel: {
|
|
1941
1972
|
useWrapper: false,
|
|
@@ -1943,51 +1974,42 @@ const widgetApiDefinition = {
|
|
|
1943
1974
|
useWidgets: false,
|
|
1944
1975
|
},
|
|
1945
1976
|
};
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1977
|
+
const widgetArticleTextContent = {
|
|
1978
|
+
text: '',
|
|
1948
1979
|
};
|
|
1949
1980
|
|
|
1950
|
-
const
|
|
1951
|
-
label: '
|
|
1952
|
-
description: '
|
|
1953
|
-
name: 'widget-article-
|
|
1954
|
-
img: '/img/article-widget-thumbnail/
|
|
1981
|
+
const widgetArticleTitleDefinition = {
|
|
1982
|
+
label: 'WIDGET_Title',
|
|
1983
|
+
description: 'WIDGET_Title_Description',
|
|
1984
|
+
name: 'widget-article-title',
|
|
1985
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
|
|
1955
1986
|
available: true,
|
|
1956
1987
|
panel: {
|
|
1957
|
-
useWrapper:
|
|
1988
|
+
useWrapper: false,
|
|
1958
1989
|
useEditor: true,
|
|
1959
1990
|
useWidgets: false,
|
|
1960
1991
|
},
|
|
1961
1992
|
};
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1993
|
+
const widgetArticleTitleContent = {
|
|
1994
|
+
text: '',
|
|
1995
|
+
heading: 'h1',
|
|
1996
|
+
backgroundColor: 'transparent',
|
|
1964
1997
|
};
|
|
1965
1998
|
|
|
1966
|
-
const
|
|
1967
|
-
label: '
|
|
1968
|
-
description: '
|
|
1969
|
-
name: 'widget-article-
|
|
1970
|
-
img: '/img/article-widget-thumbnail/
|
|
1999
|
+
const widgetArticleAttachmentDefinition = {
|
|
2000
|
+
label: 'WIDGET_Article_Attachment',
|
|
2001
|
+
description: 'WIDGET_Article_Attachment_Description',
|
|
2002
|
+
name: 'widget-article-attachment',
|
|
2003
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
1971
2004
|
available: true,
|
|
1972
2005
|
panel: {
|
|
1973
|
-
useWrapper:
|
|
2006
|
+
useWrapper: true,
|
|
1974
2007
|
useEditor: true,
|
|
1975
2008
|
useWidgets: false,
|
|
1976
2009
|
},
|
|
1977
2010
|
};
|
|
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',
|
|
2011
|
+
const widgetArticleAttachmentContent = {
|
|
2012
|
+
files: [],
|
|
1991
2013
|
};
|
|
1992
2014
|
|
|
1993
2015
|
const widgetArticleGalleryDefinition = {
|
|
@@ -2022,11 +2044,11 @@ const widgetArticleImageDefinition = {
|
|
|
2022
2044
|
};
|
|
2023
2045
|
const widgetArticleImageContent = {};
|
|
2024
2046
|
|
|
2025
|
-
const
|
|
2026
|
-
label: '
|
|
2027
|
-
description: '
|
|
2028
|
-
name: 'widget-article-
|
|
2029
|
-
img: '/img/article-widget-thumbnail/
|
|
2047
|
+
const widgetArticleButtonDefinition = {
|
|
2048
|
+
label: 'WIDGET_Button',
|
|
2049
|
+
description: 'WIDGET_Button_Description',
|
|
2050
|
+
name: 'widget-article-button',
|
|
2051
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
2030
2052
|
available: true,
|
|
2031
2053
|
panel: {
|
|
2032
2054
|
useWrapper: false,
|
|
@@ -2034,19 +2056,26 @@ const widgetArticleSliderDefinition = {
|
|
|
2034
2056
|
useWidgets: false,
|
|
2035
2057
|
},
|
|
2036
2058
|
};
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2059
|
+
const widgetArticleButtonContent = {
|
|
2060
|
+
text: '',
|
|
2061
|
+
openingType: 'link',
|
|
2062
|
+
openingTypeLink: {
|
|
2063
|
+
url: '',
|
|
2064
|
+
target: '_blank',
|
|
2065
|
+
},
|
|
2066
|
+
variant: 'contained',
|
|
2067
|
+
fontSize: '14',
|
|
2068
|
+
color: '#fff',
|
|
2069
|
+
backgroundColor: '#4dbf96',
|
|
2070
|
+
buttonSize: 'lg',
|
|
2071
|
+
borderRadius: '4',
|
|
2043
2072
|
};
|
|
2044
2073
|
|
|
2045
|
-
const
|
|
2046
|
-
label: '
|
|
2047
|
-
description: '
|
|
2048
|
-
name: 'widget-
|
|
2049
|
-
img: '/img/
|
|
2074
|
+
const widgetApiDefinition = {
|
|
2075
|
+
label: 'WIDGET_Api',
|
|
2076
|
+
description: 'WIDGET_Api_Description',
|
|
2077
|
+
name: 'widget-api',
|
|
2078
|
+
img: '/img/fast-intranet/widget-text.png',
|
|
2050
2079
|
available: true,
|
|
2051
2080
|
panel: {
|
|
2052
2081
|
useWrapper: false,
|
|
@@ -2054,15 +2083,15 @@ const widgetArticleTextDefinition = {
|
|
|
2054
2083
|
useWidgets: false,
|
|
2055
2084
|
},
|
|
2056
2085
|
};
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2086
|
+
const widgetApiContent = {
|
|
2087
|
+
url: '',
|
|
2059
2088
|
};
|
|
2060
2089
|
|
|
2061
|
-
const
|
|
2062
|
-
label: '
|
|
2063
|
-
description: '
|
|
2064
|
-
name: 'widget-article-
|
|
2065
|
-
img: '/img/article-widget-thumbnail/
|
|
2090
|
+
const widgetArticleSliderDefinition = {
|
|
2091
|
+
label: 'WIDGET_Slider',
|
|
2092
|
+
description: 'WIDGET_Slider_Description',
|
|
2093
|
+
name: 'widget-article-slider',
|
|
2094
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
2066
2095
|
available: true,
|
|
2067
2096
|
panel: {
|
|
2068
2097
|
useWrapper: false,
|
|
@@ -2070,35 +2099,14 @@ const widgetArticleTitleDefinition = {
|
|
|
2070
2099
|
useWidgets: false,
|
|
2071
2100
|
},
|
|
2072
2101
|
};
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2102
|
+
const widgetArticleSliderContent = {
|
|
2103
|
+
slides: [],
|
|
2104
|
+
maxWidth: 800,
|
|
2105
|
+
loop: false,
|
|
2106
|
+
useDots: true,
|
|
2107
|
+
startAt: 0,
|
|
2077
2108
|
};
|
|
2078
2109
|
|
|
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
2110
|
const widgetCheckListDefinition = {
|
|
2103
2111
|
label: WIDGET_CHECK_LIST_LABEL,
|
|
2104
2112
|
description: WIDGET_CHECK_LIST_DESCRIPTION,
|
|
@@ -2106,7 +2114,7 @@ const widgetCheckListDefinition = {
|
|
|
2106
2114
|
img: '/img/fast-intranet/widget-check-list.png',
|
|
2107
2115
|
available: true,
|
|
2108
2116
|
panel: {
|
|
2109
|
-
useWrapper:
|
|
2117
|
+
useWrapper: true,
|
|
2110
2118
|
useEditor: true,
|
|
2111
2119
|
useWidgets: false,
|
|
2112
2120
|
},
|
|
@@ -2115,12 +2123,29 @@ const widgetCheckListContent = {
|
|
|
2115
2123
|
arr: [],
|
|
2116
2124
|
};
|
|
2117
2125
|
|
|
2118
|
-
function
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2126
|
+
function widgetDefinition(name) {
|
|
2127
|
+
switch (name) {
|
|
2128
|
+
default:
|
|
2129
|
+
return widgetArticleGalleryDefinition;
|
|
2130
|
+
case 'widget-article-gallery':
|
|
2131
|
+
return widgetArticleGalleryDefinition;
|
|
2132
|
+
case 'widget-article-attachment':
|
|
2133
|
+
return widgetArticleAttachmentDefinition;
|
|
2134
|
+
case 'widget-article-slider':
|
|
2135
|
+
return widgetArticleSliderDefinition;
|
|
2136
|
+
case 'widget-article-text':
|
|
2137
|
+
return widgetArticleTextDefinition;
|
|
2138
|
+
case 'widget-article-title':
|
|
2139
|
+
return widgetArticleTitleDefinition;
|
|
2140
|
+
case 'widget-article-image':
|
|
2141
|
+
return widgetArticleImageDefinition;
|
|
2142
|
+
case 'widget-api':
|
|
2143
|
+
return widgetApiDefinition;
|
|
2144
|
+
case 'widget-article-button':
|
|
2145
|
+
return widgetArticleButtonDefinition;
|
|
2146
|
+
case 'widget-check-list':
|
|
2147
|
+
return widgetCheckListDefinition;
|
|
2122
2148
|
}
|
|
2123
|
-
return id;
|
|
2124
2149
|
}
|
|
2125
2150
|
|
|
2126
2151
|
function widgetFactory(name) {
|
|
@@ -2160,31 +2185,6 @@ function content(name) {
|
|
|
2160
2185
|
}
|
|
2161
2186
|
}
|
|
2162
2187
|
|
|
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
2188
|
const MODE_EDIT = 'edit';
|
|
2189
2189
|
const MODE_VIEW = 'view';
|
|
2190
2190
|
const initialState$3 = {
|
|
@@ -2196,6 +2196,7 @@ const initialState$3 = {
|
|
|
2196
2196
|
editableMap: {},
|
|
2197
2197
|
currentEditableIndex: -1,
|
|
2198
2198
|
currentEditableWidgetId: undefined,
|
|
2199
|
+
widgetObject: {},
|
|
2199
2200
|
};
|
|
2200
2201
|
const widgetsSlice = createSlice({
|
|
2201
2202
|
name: 'widgets',
|
|
@@ -2206,6 +2207,10 @@ const widgetsSlice = createSlice({
|
|
|
2206
2207
|
state.ids[uniqid] = widget;
|
|
2207
2208
|
state.states[uniqid] = { busy: false, initialized: false, loading: false, mounted: false, hover: false, empty: true };
|
|
2208
2209
|
},
|
|
2210
|
+
registerWidgetObject: (state, action) => {
|
|
2211
|
+
const { uniqid, object } = action.payload;
|
|
2212
|
+
state.widgetObject[uniqid] = object;
|
|
2213
|
+
},
|
|
2209
2214
|
updateWidget: (state, action) => {
|
|
2210
2215
|
const { uniqid } = action.payload;
|
|
2211
2216
|
const wrapper = Object.assign({}, state.ids[uniqid]);
|
|
@@ -2322,6 +2327,7 @@ const selectWidgets = (state) => state.widgets.ids;
|
|
|
2322
2327
|
const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) === null || _a === void 0 ? void 0 : _a.widget.content; };
|
|
2323
2328
|
const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2324
2329
|
const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2330
|
+
const selectWidgetObject = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObject[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2325
2331
|
const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
|
|
2326
2332
|
const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
|
|
2327
2333
|
const Widget = {
|
|
@@ -2340,6 +2346,7 @@ const Widget = {
|
|
|
2340
2346
|
selectWidgetState,
|
|
2341
2347
|
selectWidgetContent,
|
|
2342
2348
|
selectModal,
|
|
2349
|
+
selectWidgetObject,
|
|
2343
2350
|
},
|
|
2344
2351
|
};
|
|
2345
2352
|
|