jamespot-front-business 1.1.49 → 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 CHANGED
@@ -1359,7 +1359,7 @@ const fetchPads = toolkit.createAsyncThunk('magicPad/fetchPads', (params, { extr
1359
1359
  return (yield extra.jApi.article.list({
1360
1360
  type: 'magicpad',
1361
1361
  limit: state.limit,
1362
- format: 'raw-list',
1362
+ format: 'raw-view',
1363
1363
  page,
1364
1364
  query,
1365
1365
  orders,
@@ -1939,11 +1939,42 @@ const UserCurrent = {
1939
1939
  utils: { isAdmin, isLogged },
1940
1940
  };
1941
1941
 
1942
- const widgetApiDefinition = {
1943
- label: 'WIDGET_Api',
1944
- description: 'WIDGET_Api_Description',
1945
- name: 'widget-api',
1946
- img: '/img/fast-intranet/widget-text.png',
1942
+ function uniqid() {
1943
+ let id = '';
1944
+ for (let index = 0; index < 16; index++) {
1945
+ id += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
1946
+ }
1947
+ return id;
1948
+ }
1949
+
1950
+ const WIDGET_ARTICLE_TITLE = 'widget-article-title';
1951
+ const WIDGET_ARTICLE_TEXT = 'widget-article-text';
1952
+ const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
1953
+ const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
1954
+ const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
1955
+ const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
1956
+ const WIDGET_CHECK_LIST = 'widget-check-list';
1957
+ const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
1958
+ const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
1959
+
1960
+ var WIDGETS = /*#__PURE__*/Object.freeze({
1961
+ __proto__: null,
1962
+ WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
1963
+ WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
1964
+ WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
1965
+ WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
1966
+ WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
1967
+ WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
1968
+ WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
1969
+ WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
1970
+ WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
1971
+ });
1972
+
1973
+ const widgetArticleTextDefinition = {
1974
+ label: 'WIDGET_Text',
1975
+ description: 'WIDGET_Text_Description',
1976
+ name: 'widget-article-text',
1977
+ img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
1947
1978
  available: true,
1948
1979
  panel: {
1949
1980
  useWrapper: false,
@@ -1951,51 +1982,42 @@ const widgetApiDefinition = {
1951
1982
  useWidgets: false,
1952
1983
  },
1953
1984
  };
1954
- const widgetApiContent = {
1955
- url: '',
1985
+ const widgetArticleTextContent = {
1986
+ text: '',
1956
1987
  };
1957
1988
 
1958
- const widgetArticleAttachmentDefinition = {
1959
- label: 'WIDGET_Article_Attachment',
1960
- description: 'WIDGET_Article_Attachment_Description',
1961
- name: 'widget-article-attachment',
1962
- img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
1989
+ const widgetArticleTitleDefinition = {
1990
+ label: 'WIDGET_Title',
1991
+ description: 'WIDGET_Title_Description',
1992
+ name: 'widget-article-title',
1993
+ img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
1963
1994
  available: true,
1964
1995
  panel: {
1965
- useWrapper: true,
1996
+ useWrapper: false,
1966
1997
  useEditor: true,
1967
1998
  useWidgets: false,
1968
1999
  },
1969
2000
  };
1970
- const widgetArticleAttachmentContent = {
1971
- files: [],
2001
+ const widgetArticleTitleContent = {
2002
+ text: '',
2003
+ heading: 'h1',
2004
+ backgroundColor: 'transparent',
1972
2005
  };
1973
2006
 
1974
- const widgetArticleButtonDefinition = {
1975
- label: 'WIDGET_Button',
1976
- description: 'WIDGET_Button_Description',
1977
- name: 'widget-article-button',
1978
- img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
2007
+ const widgetArticleAttachmentDefinition = {
2008
+ label: 'WIDGET_Article_Attachment',
2009
+ description: 'WIDGET_Article_Attachment_Description',
2010
+ name: 'widget-article-attachment',
2011
+ img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
1979
2012
  available: true,
1980
2013
  panel: {
1981
- useWrapper: false,
2014
+ useWrapper: true,
1982
2015
  useEditor: true,
1983
2016
  useWidgets: false,
1984
2017
  },
1985
2018
  };
1986
- const widgetArticleButtonContent = {
1987
- text: '',
1988
- openingType: 'link',
1989
- openingTypeLink: {
1990
- url: '',
1991
- target: '_blank',
1992
- },
1993
- variant: 'contained',
1994
- fontSize: '14',
1995
- color: '#fff',
1996
- backgroundColor: '#4dbf96',
1997
- buttonSize: 'lg',
1998
- borderRadius: '4',
2019
+ const widgetArticleAttachmentContent = {
2020
+ files: [],
1999
2021
  };
2000
2022
 
2001
2023
  const widgetArticleGalleryDefinition = {
@@ -2030,11 +2052,11 @@ const widgetArticleImageDefinition = {
2030
2052
  };
2031
2053
  const widgetArticleImageContent = {};
2032
2054
 
2033
- const widgetArticleSliderDefinition = {
2034
- label: 'WIDGET_Slider',
2035
- description: 'WIDGET_Slider_Description',
2036
- name: 'widget-article-slider',
2037
- img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
2055
+ const widgetArticleButtonDefinition = {
2056
+ label: 'WIDGET_Button',
2057
+ description: 'WIDGET_Button_Description',
2058
+ name: 'widget-article-button',
2059
+ img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
2038
2060
  available: true,
2039
2061
  panel: {
2040
2062
  useWrapper: false,
@@ -2042,19 +2064,26 @@ const widgetArticleSliderDefinition = {
2042
2064
  useWidgets: false,
2043
2065
  },
2044
2066
  };
2045
- const widgetArticleSliderContent = {
2046
- slides: [],
2047
- maxWidth: 800,
2048
- loop: false,
2049
- useDots: true,
2050
- startAt: 0,
2067
+ const widgetArticleButtonContent = {
2068
+ text: '',
2069
+ openingType: 'link',
2070
+ openingTypeLink: {
2071
+ url: '',
2072
+ target: '_blank',
2073
+ },
2074
+ variant: 'contained',
2075
+ fontSize: '14',
2076
+ color: '#fff',
2077
+ backgroundColor: '#4dbf96',
2078
+ buttonSize: 'lg',
2079
+ borderRadius: '4',
2051
2080
  };
2052
2081
 
2053
- const widgetArticleTextDefinition = {
2054
- label: 'WIDGET_Text',
2055
- description: 'WIDGET_Text_Description',
2056
- name: 'widget-article-text',
2057
- img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
2082
+ const widgetApiDefinition = {
2083
+ label: 'WIDGET_Api',
2084
+ description: 'WIDGET_Api_Description',
2085
+ name: 'widget-api',
2086
+ img: '/img/fast-intranet/widget-text.png',
2058
2087
  available: true,
2059
2088
  panel: {
2060
2089
  useWrapper: false,
@@ -2062,17 +2091,15 @@ const widgetArticleTextDefinition = {
2062
2091
  useWidgets: false,
2063
2092
  },
2064
2093
  };
2065
- const widgetArticleTextContent = {
2066
- fontSize: '18',
2067
- lineHeight: '1.6',
2068
- text: '',
2094
+ const widgetApiContent = {
2095
+ url: '',
2069
2096
  };
2070
2097
 
2071
- const widgetArticleTitleDefinition = {
2072
- label: 'WIDGET_Title',
2073
- description: 'WIDGET_Title_Description',
2074
- name: 'widget-article-title',
2075
- img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
2098
+ const widgetArticleSliderDefinition = {
2099
+ label: 'WIDGET_Slider',
2100
+ description: 'WIDGET_Slider_Description',
2101
+ name: 'widget-article-slider',
2102
+ img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
2076
2103
  available: true,
2077
2104
  panel: {
2078
2105
  useWrapper: false,
@@ -2080,35 +2107,14 @@ const widgetArticleTitleDefinition = {
2080
2107
  useWidgets: false,
2081
2108
  },
2082
2109
  };
2083
- const widgetArticleTitleContent = {
2084
- text: '',
2085
- heading: 'h1',
2086
- backgroundColor: 'transparent',
2110
+ const widgetArticleSliderContent = {
2111
+ slides: [],
2112
+ maxWidth: 800,
2113
+ loop: false,
2114
+ useDots: true,
2115
+ startAt: 0,
2087
2116
  };
2088
2117
 
2089
- const WIDGET_ARTICLE_TITLE = 'widget-article-title';
2090
- const WIDGET_ARTICLE_TEXT = 'widget-article-text';
2091
- const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
2092
- const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
2093
- const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
2094
- const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
2095
- const WIDGET_CHECK_LIST = 'widget-check-list';
2096
- const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
2097
- const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
2098
-
2099
- var WIDGETS = /*#__PURE__*/Object.freeze({
2100
- __proto__: null,
2101
- WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
2102
- WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
2103
- WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
2104
- WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
2105
- WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
2106
- WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
2107
- WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
2108
- WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
2109
- WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
2110
- });
2111
-
2112
2118
  const widgetCheckListDefinition = {
2113
2119
  label: WIDGET_CHECK_LIST_LABEL,
2114
2120
  description: WIDGET_CHECK_LIST_DESCRIPTION,
@@ -2116,7 +2122,7 @@ const widgetCheckListDefinition = {
2116
2122
  img: '/img/fast-intranet/widget-check-list.png',
2117
2123
  available: true,
2118
2124
  panel: {
2119
- useWrapper: false,
2125
+ useWrapper: true,
2120
2126
  useEditor: true,
2121
2127
  useWidgets: false,
2122
2128
  },
@@ -2125,12 +2131,29 @@ const widgetCheckListContent = {
2125
2131
  arr: [],
2126
2132
  };
2127
2133
 
2128
- function uniqid() {
2129
- let id = '';
2130
- for (let index = 0; index < 16; index++) {
2131
- id += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
2134
+ function widgetDefinition(name) {
2135
+ switch (name) {
2136
+ default:
2137
+ return widgetArticleGalleryDefinition;
2138
+ case 'widget-article-gallery':
2139
+ return widgetArticleGalleryDefinition;
2140
+ case 'widget-article-attachment':
2141
+ return widgetArticleAttachmentDefinition;
2142
+ case 'widget-article-slider':
2143
+ return widgetArticleSliderDefinition;
2144
+ case 'widget-article-text':
2145
+ return widgetArticleTextDefinition;
2146
+ case 'widget-article-title':
2147
+ return widgetArticleTitleDefinition;
2148
+ case 'widget-article-image':
2149
+ return widgetArticleImageDefinition;
2150
+ case 'widget-api':
2151
+ return widgetApiDefinition;
2152
+ case 'widget-article-button':
2153
+ return widgetArticleButtonDefinition;
2154
+ case 'widget-check-list':
2155
+ return widgetCheckListDefinition;
2132
2156
  }
2133
- return id;
2134
2157
  }
2135
2158
 
2136
2159
  function widgetFactory(name) {
@@ -2170,31 +2193,6 @@ function content(name) {
2170
2193
  }
2171
2194
  }
2172
2195
 
2173
- function widgetDefinition(name) {
2174
- switch (name) {
2175
- default:
2176
- return widgetArticleGalleryDefinition;
2177
- case 'widget-article-gallery':
2178
- return widgetArticleGalleryDefinition;
2179
- case 'widget-article-attachment':
2180
- return widgetArticleAttachmentDefinition;
2181
- case 'widget-article-slider':
2182
- return widgetArticleSliderDefinition;
2183
- case 'widget-article-text':
2184
- return widgetArticleTextDefinition;
2185
- case 'widget-article-title':
2186
- return widgetArticleTitleDefinition;
2187
- case 'widget-article-image':
2188
- return widgetArticleImageDefinition;
2189
- case 'widget-api':
2190
- return widgetApiDefinition;
2191
- case 'widget-article-button':
2192
- return widgetArticleButtonDefinition;
2193
- case 'widget-check-list':
2194
- return widgetCheckListDefinition;
2195
- }
2196
- }
2197
-
2198
2196
  const MODE_EDIT = 'edit';
2199
2197
  const MODE_VIEW = 'view';
2200
2198
  const initialState$3 = {
@@ -2206,6 +2204,7 @@ const initialState$3 = {
2206
2204
  editableMap: {},
2207
2205
  currentEditableIndex: -1,
2208
2206
  currentEditableWidgetId: undefined,
2207
+ widgetObject: {},
2209
2208
  };
2210
2209
  const widgetsSlice = toolkit.createSlice({
2211
2210
  name: 'widgets',
@@ -2216,6 +2215,10 @@ const widgetsSlice = toolkit.createSlice({
2216
2215
  state.ids[uniqid] = widget;
2217
2216
  state.states[uniqid] = { busy: false, initialized: false, loading: false, mounted: false, hover: false, empty: true };
2218
2217
  },
2218
+ registerWidgetObject: (state, action) => {
2219
+ const { uniqid, object } = action.payload;
2220
+ state.widgetObject[uniqid] = object;
2221
+ },
2219
2222
  updateWidget: (state, action) => {
2220
2223
  const { uniqid } = action.payload;
2221
2224
  const wrapper = Object.assign({}, state.ids[uniqid]);
@@ -2332,6 +2335,7 @@ const selectWidgets = (state) => state.widgets.ids;
2332
2335
  const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) === null || _a === void 0 ? void 0 : _a.widget.content; };
2333
2336
  const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2334
2337
  const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2338
+ const selectWidgetObject = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObject[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2335
2339
  const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
2336
2340
  const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
2337
2341
  const Widget = {
@@ -2350,6 +2354,7 @@ const Widget = {
2350
2354
  selectWidgetState,
2351
2355
  selectWidgetContent,
2352
2356
  selectModal,
2357
+ selectWidgetObject,
2353
2358
  },
2354
2359
  };
2355
2360