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/esm.js CHANGED
@@ -1351,7 +1351,7 @@ const fetchPads = createAsyncThunk('magicPad/fetchPads', (params, { extra, rejec
1351
1351
  return (yield extra.jApi.article.list({
1352
1352
  type: 'magicpad',
1353
1353
  limit: state.limit,
1354
- format: 'raw-list',
1354
+ format: 'raw-view',
1355
1355
  page,
1356
1356
  query,
1357
1357
  orders,
@@ -1931,11 +1931,42 @@ const UserCurrent = {
1931
1931
  utils: { isAdmin, isLogged },
1932
1932
  };
1933
1933
 
1934
- const widgetApiDefinition = {
1935
- label: 'WIDGET_Api',
1936
- description: 'WIDGET_Api_Description',
1937
- name: 'widget-api',
1938
- img: '/img/fast-intranet/widget-text.png',
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 widgetApiContent = {
1947
- url: '',
1977
+ const widgetArticleTextContent = {
1978
+ text: '',
1948
1979
  };
1949
1980
 
1950
- const widgetArticleAttachmentDefinition = {
1951
- label: 'WIDGET_Article_Attachment',
1952
- description: 'WIDGET_Article_Attachment_Description',
1953
- name: 'widget-article-attachment',
1954
- img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
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: true,
1988
+ useWrapper: false,
1958
1989
  useEditor: true,
1959
1990
  useWidgets: false,
1960
1991
  },
1961
1992
  };
1962
- const widgetArticleAttachmentContent = {
1963
- files: [],
1993
+ const widgetArticleTitleContent = {
1994
+ text: '',
1995
+ heading: 'h1',
1996
+ backgroundColor: 'transparent',
1964
1997
  };
1965
1998
 
1966
- const widgetArticleButtonDefinition = {
1967
- label: 'WIDGET_Button',
1968
- description: 'WIDGET_Button_Description',
1969
- name: 'widget-article-button',
1970
- img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
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: false,
2006
+ useWrapper: true,
1974
2007
  useEditor: true,
1975
2008
  useWidgets: false,
1976
2009
  },
1977
2010
  };
1978
- const widgetArticleButtonContent = {
1979
- text: '',
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 widgetArticleSliderDefinition = {
2026
- label: 'WIDGET_Slider',
2027
- description: 'WIDGET_Slider_Description',
2028
- name: 'widget-article-slider',
2029
- img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
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 widgetArticleSliderContent = {
2038
- slides: [],
2039
- maxWidth: 800,
2040
- loop: false,
2041
- useDots: true,
2042
- startAt: 0,
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 widgetArticleTextDefinition = {
2046
- label: 'WIDGET_Text',
2047
- description: 'WIDGET_Text_Description',
2048
- name: 'widget-article-text',
2049
- img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
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,17 +2083,15 @@ const widgetArticleTextDefinition = {
2054
2083
  useWidgets: false,
2055
2084
  },
2056
2085
  };
2057
- const widgetArticleTextContent = {
2058
- fontSize: '18',
2059
- lineHeight: '1.6',
2060
- text: '',
2086
+ const widgetApiContent = {
2087
+ url: '',
2061
2088
  };
2062
2089
 
2063
- const widgetArticleTitleDefinition = {
2064
- label: 'WIDGET_Title',
2065
- description: 'WIDGET_Title_Description',
2066
- name: 'widget-article-title',
2067
- img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
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',
2068
2095
  available: true,
2069
2096
  panel: {
2070
2097
  useWrapper: false,
@@ -2072,35 +2099,14 @@ const widgetArticleTitleDefinition = {
2072
2099
  useWidgets: false,
2073
2100
  },
2074
2101
  };
2075
- const widgetArticleTitleContent = {
2076
- text: '',
2077
- heading: 'h1',
2078
- backgroundColor: 'transparent',
2102
+ const widgetArticleSliderContent = {
2103
+ slides: [],
2104
+ maxWidth: 800,
2105
+ loop: false,
2106
+ useDots: true,
2107
+ startAt: 0,
2079
2108
  };
2080
2109
 
2081
- const WIDGET_ARTICLE_TITLE = 'widget-article-title';
2082
- const WIDGET_ARTICLE_TEXT = 'widget-article-text';
2083
- const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
2084
- const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
2085
- const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
2086
- const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
2087
- const WIDGET_CHECK_LIST = 'widget-check-list';
2088
- const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
2089
- const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
2090
-
2091
- var WIDGETS = /*#__PURE__*/Object.freeze({
2092
- __proto__: null,
2093
- WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
2094
- WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
2095
- WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
2096
- WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
2097
- WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
2098
- WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
2099
- WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
2100
- WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
2101
- WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
2102
- });
2103
-
2104
2110
  const widgetCheckListDefinition = {
2105
2111
  label: WIDGET_CHECK_LIST_LABEL,
2106
2112
  description: WIDGET_CHECK_LIST_DESCRIPTION,
@@ -2108,7 +2114,7 @@ const widgetCheckListDefinition = {
2108
2114
  img: '/img/fast-intranet/widget-check-list.png',
2109
2115
  available: true,
2110
2116
  panel: {
2111
- useWrapper: false,
2117
+ useWrapper: true,
2112
2118
  useEditor: true,
2113
2119
  useWidgets: false,
2114
2120
  },
@@ -2117,12 +2123,29 @@ const widgetCheckListContent = {
2117
2123
  arr: [],
2118
2124
  };
2119
2125
 
2120
- function uniqid() {
2121
- let id = '';
2122
- for (let index = 0; index < 16; index++) {
2123
- id += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
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;
2124
2148
  }
2125
- return id;
2126
2149
  }
2127
2150
 
2128
2151
  function widgetFactory(name) {
@@ -2162,31 +2185,6 @@ function content(name) {
2162
2185
  }
2163
2186
  }
2164
2187
 
2165
- function widgetDefinition(name) {
2166
- switch (name) {
2167
- default:
2168
- return widgetArticleGalleryDefinition;
2169
- case 'widget-article-gallery':
2170
- return widgetArticleGalleryDefinition;
2171
- case 'widget-article-attachment':
2172
- return widgetArticleAttachmentDefinition;
2173
- case 'widget-article-slider':
2174
- return widgetArticleSliderDefinition;
2175
- case 'widget-article-text':
2176
- return widgetArticleTextDefinition;
2177
- case 'widget-article-title':
2178
- return widgetArticleTitleDefinition;
2179
- case 'widget-article-image':
2180
- return widgetArticleImageDefinition;
2181
- case 'widget-api':
2182
- return widgetApiDefinition;
2183
- case 'widget-article-button':
2184
- return widgetArticleButtonDefinition;
2185
- case 'widget-check-list':
2186
- return widgetCheckListDefinition;
2187
- }
2188
- }
2189
-
2190
2188
  const MODE_EDIT = 'edit';
2191
2189
  const MODE_VIEW = 'view';
2192
2190
  const initialState$3 = {
@@ -2198,6 +2196,7 @@ const initialState$3 = {
2198
2196
  editableMap: {},
2199
2197
  currentEditableIndex: -1,
2200
2198
  currentEditableWidgetId: undefined,
2199
+ widgetObject: {},
2201
2200
  };
2202
2201
  const widgetsSlice = createSlice({
2203
2202
  name: 'widgets',
@@ -2208,6 +2207,10 @@ const widgetsSlice = createSlice({
2208
2207
  state.ids[uniqid] = widget;
2209
2208
  state.states[uniqid] = { busy: false, initialized: false, loading: false, mounted: false, hover: false, empty: true };
2210
2209
  },
2210
+ registerWidgetObject: (state, action) => {
2211
+ const { uniqid, object } = action.payload;
2212
+ state.widgetObject[uniqid] = object;
2213
+ },
2211
2214
  updateWidget: (state, action) => {
2212
2215
  const { uniqid } = action.payload;
2213
2216
  const wrapper = Object.assign({}, state.ids[uniqid]);
@@ -2324,6 +2327,7 @@ const selectWidgets = (state) => state.widgets.ids;
2324
2327
  const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) === null || _a === void 0 ? void 0 : _a.widget.content; };
2325
2328
  const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2326
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; };
2327
2331
  const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
2328
2332
  const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
2329
2333
  const Widget = {
@@ -2342,6 +2346,7 @@ const Widget = {
2342
2346
  selectWidgetState,
2343
2347
  selectWidgetContent,
2344
2348
  selectModal,
2349
+ selectWidgetObject,
2345
2350
  },
2346
2351
  };
2347
2352