jamespot-front-business 1.1.76 → 1.1.78
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 +153 -62
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +153 -62
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +493 -138
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -2175,6 +2175,9 @@ const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
|
|
|
2175
2175
|
const WIDGET_CHECK_LIST = 'widget-check-list';
|
|
2176
2176
|
const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
|
|
2177
2177
|
const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
|
|
2178
|
+
const WIDGET_QUICK_SURVEY = 'widget-quick-survey';
|
|
2179
|
+
const WIDGET_QUICK_SURVEY_LABEL = 'WIDGET_Quick_Survey';
|
|
2180
|
+
const WIDGET_QUICK_SURVEY_DESCRIPTION = 'WIDGET_Quick_Survey_Text';
|
|
2178
2181
|
|
|
2179
2182
|
var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
2180
2183
|
__proto__: null,
|
|
@@ -2186,30 +2189,33 @@ var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
|
2186
2189
|
WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
|
|
2187
2190
|
WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
|
|
2188
2191
|
WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
|
|
2189
|
-
WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
|
|
2192
|
+
WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION,
|
|
2193
|
+
WIDGET_QUICK_SURVEY: WIDGET_QUICK_SURVEY,
|
|
2194
|
+
WIDGET_QUICK_SURVEY_LABEL: WIDGET_QUICK_SURVEY_LABEL,
|
|
2195
|
+
WIDGET_QUICK_SURVEY_DESCRIPTION: WIDGET_QUICK_SURVEY_DESCRIPTION
|
|
2190
2196
|
});
|
|
2191
2197
|
|
|
2192
|
-
const
|
|
2193
|
-
label: '
|
|
2194
|
-
description: '
|
|
2195
|
-
name: jamespot.WidgetsName.
|
|
2196
|
-
img: '/img/article-widget-thumbnail/
|
|
2198
|
+
const widgetArticleAttachmentDefinition = {
|
|
2199
|
+
label: 'WIDGET_Article_Attachment',
|
|
2200
|
+
description: 'WIDGET_Article_Attachment_Description',
|
|
2201
|
+
name: jamespot.WidgetsName.ArticleAttachment,
|
|
2202
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
2197
2203
|
available: true,
|
|
2198
2204
|
panel: {
|
|
2199
|
-
useWrapper:
|
|
2205
|
+
useWrapper: true,
|
|
2200
2206
|
useEditor: true,
|
|
2201
2207
|
useWidgets: false,
|
|
2202
2208
|
},
|
|
2203
2209
|
};
|
|
2204
|
-
const
|
|
2205
|
-
|
|
2210
|
+
const widgetArticleAttachmentContent = {
|
|
2211
|
+
files: [],
|
|
2206
2212
|
};
|
|
2207
2213
|
|
|
2208
|
-
const
|
|
2209
|
-
label: '
|
|
2210
|
-
description: '
|
|
2211
|
-
name: jamespot.WidgetsName.
|
|
2212
|
-
img: '/img/article-widget-thumbnail/
|
|
2214
|
+
const widgetArticleButtonDefinition = {
|
|
2215
|
+
label: 'WIDGET_Button',
|
|
2216
|
+
description: 'WIDGET_Button_Description',
|
|
2217
|
+
name: jamespot.WidgetsName.ArticleButton,
|
|
2218
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
2213
2219
|
available: true,
|
|
2214
2220
|
panel: {
|
|
2215
2221
|
useWrapper: false,
|
|
@@ -2217,26 +2223,19 @@ const widgetArticleTitleDefinition = {
|
|
|
2217
2223
|
useWidgets: false,
|
|
2218
2224
|
},
|
|
2219
2225
|
};
|
|
2220
|
-
const
|
|
2226
|
+
const widgetArticleButtonContent = {
|
|
2221
2227
|
text: '',
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
const widgetArticleAttachmentDefinition = {
|
|
2227
|
-
label: 'WIDGET_Article_Attachment',
|
|
2228
|
-
description: 'WIDGET_Article_Attachment_Description',
|
|
2229
|
-
name: jamespot.WidgetsName.ArticleAttachment,
|
|
2230
|
-
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
2231
|
-
available: true,
|
|
2232
|
-
panel: {
|
|
2233
|
-
useWrapper: true,
|
|
2234
|
-
useEditor: true,
|
|
2235
|
-
useWidgets: false,
|
|
2228
|
+
openingType: 'link',
|
|
2229
|
+
openingTypeLink: {
|
|
2230
|
+
url: '',
|
|
2231
|
+
target: '_blank',
|
|
2236
2232
|
},
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2233
|
+
variant: 'contained',
|
|
2234
|
+
fontSize: '14',
|
|
2235
|
+
color: '#fff',
|
|
2236
|
+
backgroundColor: '#4dbf96',
|
|
2237
|
+
buttonSize: 'lg',
|
|
2238
|
+
borderRadius: '4',
|
|
2240
2239
|
};
|
|
2241
2240
|
|
|
2242
2241
|
const widgetArticleGalleryDefinition = {
|
|
@@ -2271,33 +2270,6 @@ const widgetArticleImageDefinition = {
|
|
|
2271
2270
|
};
|
|
2272
2271
|
const widgetArticleImageContent = {};
|
|
2273
2272
|
|
|
2274
|
-
const widgetArticleButtonDefinition = {
|
|
2275
|
-
label: 'WIDGET_Button',
|
|
2276
|
-
description: 'WIDGET_Button_Description',
|
|
2277
|
-
name: jamespot.WidgetsName.ArticleButton,
|
|
2278
|
-
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
2279
|
-
available: true,
|
|
2280
|
-
panel: {
|
|
2281
|
-
useWrapper: false,
|
|
2282
|
-
useEditor: true,
|
|
2283
|
-
useWidgets: false,
|
|
2284
|
-
},
|
|
2285
|
-
};
|
|
2286
|
-
const widgetArticleButtonContent = {
|
|
2287
|
-
text: '',
|
|
2288
|
-
openingType: 'link',
|
|
2289
|
-
openingTypeLink: {
|
|
2290
|
-
url: '',
|
|
2291
|
-
target: '_blank',
|
|
2292
|
-
},
|
|
2293
|
-
variant: 'contained',
|
|
2294
|
-
fontSize: '14',
|
|
2295
|
-
color: '#fff',
|
|
2296
|
-
backgroundColor: '#4dbf96',
|
|
2297
|
-
buttonSize: 'lg',
|
|
2298
|
-
borderRadius: '4',
|
|
2299
|
-
};
|
|
2300
|
-
|
|
2301
2273
|
const widgetArticleSliderDefinition = {
|
|
2302
2274
|
label: 'WIDGET_Slider',
|
|
2303
2275
|
description: 'WIDGET_Slider_Description',
|
|
@@ -2318,6 +2290,40 @@ const widgetArticleSliderContent = {
|
|
|
2318
2290
|
startAt: 0,
|
|
2319
2291
|
};
|
|
2320
2292
|
|
|
2293
|
+
const widgetArticleTextDefinition = {
|
|
2294
|
+
label: 'WIDGET_Text',
|
|
2295
|
+
description: 'WIDGET_Text_Description',
|
|
2296
|
+
name: jamespot.WidgetsName.ArticleText,
|
|
2297
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
|
|
2298
|
+
available: true,
|
|
2299
|
+
panel: {
|
|
2300
|
+
useWrapper: false,
|
|
2301
|
+
useEditor: true,
|
|
2302
|
+
useWidgets: false,
|
|
2303
|
+
},
|
|
2304
|
+
};
|
|
2305
|
+
const widgetArticleTextContent = {
|
|
2306
|
+
text: '',
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
const widgetArticleTitleDefinition = {
|
|
2310
|
+
label: 'WIDGET_Title',
|
|
2311
|
+
description: 'WIDGET_Title_Description',
|
|
2312
|
+
name: jamespot.WidgetsName.ArticleTitle,
|
|
2313
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
|
|
2314
|
+
available: true,
|
|
2315
|
+
panel: {
|
|
2316
|
+
useWrapper: false,
|
|
2317
|
+
useEditor: true,
|
|
2318
|
+
useWidgets: false,
|
|
2319
|
+
},
|
|
2320
|
+
};
|
|
2321
|
+
const widgetArticleTitleContent = {
|
|
2322
|
+
text: '',
|
|
2323
|
+
heading: 'h1',
|
|
2324
|
+
backgroundColor: 'transparent',
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2321
2327
|
const widgetCheckListDefinition = {
|
|
2322
2328
|
label: WIDGET_CHECK_LIST_LABEL,
|
|
2323
2329
|
description: WIDGET_CHECK_LIST_DESCRIPTION,
|
|
@@ -2395,6 +2401,28 @@ const widgetPresenceContent = {
|
|
|
2395
2401
|
limitValue: 100,
|
|
2396
2402
|
};
|
|
2397
2403
|
|
|
2404
|
+
const widgetQuickSurveyDefinition = {
|
|
2405
|
+
label: WIDGET_QUICK_SURVEY_LABEL,
|
|
2406
|
+
description: WIDGET_QUICK_SURVEY_DESCRIPTION,
|
|
2407
|
+
name: jamespot.WidgetsName.QuickSurvey,
|
|
2408
|
+
img: '/img/fast-intranet/widget-check-list.png',
|
|
2409
|
+
available: true,
|
|
2410
|
+
panel: {
|
|
2411
|
+
useWrapper: true,
|
|
2412
|
+
useEditor: true,
|
|
2413
|
+
useWidgets: false,
|
|
2414
|
+
},
|
|
2415
|
+
};
|
|
2416
|
+
const widgetQuickSurveyContent = {
|
|
2417
|
+
arr: [],
|
|
2418
|
+
open: false,
|
|
2419
|
+
multi: false,
|
|
2420
|
+
closing: false,
|
|
2421
|
+
isClosed: false,
|
|
2422
|
+
showResult: false,
|
|
2423
|
+
isNotDisabled: false,
|
|
2424
|
+
};
|
|
2425
|
+
|
|
2398
2426
|
function widgetDefinition(name) {
|
|
2399
2427
|
switch (name) {
|
|
2400
2428
|
default:
|
|
@@ -2421,6 +2449,8 @@ function widgetDefinition(name) {
|
|
|
2421
2449
|
return widgetArticleButtonDefinition;
|
|
2422
2450
|
case 'widget-check-list':
|
|
2423
2451
|
return widgetCheckListDefinition;
|
|
2452
|
+
case 'widget-quick-survey':
|
|
2453
|
+
return widgetQuickSurveyDefinition;
|
|
2424
2454
|
}
|
|
2425
2455
|
}
|
|
2426
2456
|
|
|
@@ -2462,6 +2492,8 @@ function content(name) {
|
|
|
2462
2492
|
return Object.assign({}, widgetArticleTextContent);
|
|
2463
2493
|
case 'widget-check-list':
|
|
2464
2494
|
return Object.assign({}, widgetCheckListContent);
|
|
2495
|
+
case 'widget-quick-survey':
|
|
2496
|
+
return Object.assign({}, widgetQuickSurveyContent);
|
|
2465
2497
|
}
|
|
2466
2498
|
}
|
|
2467
2499
|
|
|
@@ -2531,8 +2563,8 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
2531
2563
|
}
|
|
2532
2564
|
},
|
|
2533
2565
|
registerWidgetRTObject: (state, action) => {
|
|
2534
|
-
const { uniqid, object } = action.payload;
|
|
2535
|
-
state.rtObjectStack = [...state.rtObjectStack, { uniqid, object }];
|
|
2566
|
+
const { uniqid, fn, object } = action.payload;
|
|
2567
|
+
state.rtObjectStack = [...state.rtObjectStack, { uniqid, fn, object }];
|
|
2536
2568
|
},
|
|
2537
2569
|
flushWidget: (state, action) => {
|
|
2538
2570
|
const { uniqid } = action.payload;
|
|
@@ -2645,6 +2677,40 @@ const getWidgetRTHandlers = function (dispatch, uniqid) {
|
|
|
2645
2677
|
dispatch(widgetsSlice.actions.registerWidgetRTObject({
|
|
2646
2678
|
uniqid: message.data.uniqid,
|
|
2647
2679
|
object: message.data.object,
|
|
2680
|
+
fn: message.function,
|
|
2681
|
+
}));
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
};
|
|
2685
|
+
const widgetChecklistResponseHandler = function (message) {
|
|
2686
|
+
if (message.namespace === 'WIDGET' && message.function === 'check-list-response') {
|
|
2687
|
+
if (message.data && message.data.uniqid === uniqid) {
|
|
2688
|
+
dispatch(widgetsSlice.actions.registerWidgetRTObject({
|
|
2689
|
+
uniqid: message.data.uniqid,
|
|
2690
|
+
object: message.data.object,
|
|
2691
|
+
fn: message.function,
|
|
2692
|
+
}));
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
const widgetUpdateHandler = function (message) {
|
|
2697
|
+
if (message.namespace === 'WIDGET' && message.function === 'widget-update') {
|
|
2698
|
+
if (message.data && message.data.uniqid === uniqid) {
|
|
2699
|
+
dispatch(widgetsSlice.actions.registerWidgetRTObject({
|
|
2700
|
+
uniqid: message.data.uniqid,
|
|
2701
|
+
object: message.data.object,
|
|
2702
|
+
fn: message.function,
|
|
2703
|
+
}));
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
};
|
|
2707
|
+
const widgetQuickSurveyResponseHandler = function (message) {
|
|
2708
|
+
if (message.namespace === 'WIDGET' && message.function === 'widget-quick-survey-response') {
|
|
2709
|
+
if (message.data && message.data.uniqid === uniqid) {
|
|
2710
|
+
dispatch(widgetsSlice.actions.registerWidgetRTObject({
|
|
2711
|
+
uniqid: message.data.uniqid,
|
|
2712
|
+
object: message.data.object,
|
|
2713
|
+
fn: message.function,
|
|
2648
2714
|
}));
|
|
2649
2715
|
}
|
|
2650
2716
|
}
|
|
@@ -2655,6 +2721,21 @@ const getWidgetRTHandlers = function (dispatch, uniqid) {
|
|
|
2655
2721
|
function: 'widget-presence-response',
|
|
2656
2722
|
handler: widgetPresenceResponseHandler,
|
|
2657
2723
|
},
|
|
2724
|
+
{
|
|
2725
|
+
namespace: 'WIDGET',
|
|
2726
|
+
function: 'check-list-response',
|
|
2727
|
+
handler: widgetChecklistResponseHandler,
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
namespace: 'WIDGET',
|
|
2731
|
+
function: 'widget-update',
|
|
2732
|
+
handler: widgetUpdateHandler,
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
namespace: 'WIDGET',
|
|
2736
|
+
function: 'widget-quick-survey-response',
|
|
2737
|
+
handler: widgetQuickSurveyResponseHandler,
|
|
2738
|
+
},
|
|
2658
2739
|
];
|
|
2659
2740
|
};
|
|
2660
2741
|
|
|
@@ -2665,6 +2746,13 @@ const selectFlushedWidgets = (state) => state.widgets.flushedWidgets;
|
|
|
2665
2746
|
const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2666
2747
|
const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2667
2748
|
const selectWidgetObject = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObject[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2749
|
+
const selectWidgetObjectUri = (state, uniqid) => {
|
|
2750
|
+
const o = state.widgets.widgetObject[uniqid];
|
|
2751
|
+
if (o && 'uri' in o) {
|
|
2752
|
+
return o.uri;
|
|
2753
|
+
}
|
|
2754
|
+
return undefined;
|
|
2755
|
+
};
|
|
2668
2756
|
const selectWidgetObjectRights = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObjectRights[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2669
2757
|
const selectWidgetAuthor = (state, uniqid) => { var _a; return (_a = state.widgets.widgetAuthor[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
2670
2758
|
const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
|
|
@@ -2687,6 +2775,7 @@ const Widget = {
|
|
|
2687
2775
|
selectWidgetState,
|
|
2688
2776
|
selectModal,
|
|
2689
2777
|
selectWidgetObject,
|
|
2778
|
+
selectWidgetObjectUri,
|
|
2690
2779
|
selectWidgetAuthor,
|
|
2691
2780
|
selectWidgetObjectRights,
|
|
2692
2781
|
selectAllWidgetRTObject,
|
|
@@ -2702,18 +2791,20 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2702
2791
|
initialState: initialState$2,
|
|
2703
2792
|
reducers: {
|
|
2704
2793
|
registerEditor: (state, action) => {
|
|
2705
|
-
const { uniqid, name, onSave } = action.payload;
|
|
2794
|
+
const { uniqid, name, onSave, mode } = action.payload;
|
|
2706
2795
|
const ed = !onSave
|
|
2707
2796
|
? {
|
|
2708
2797
|
uniqid,
|
|
2709
2798
|
name,
|
|
2710
2799
|
position: 'right',
|
|
2800
|
+
mode: mode !== null && mode !== void 0 ? mode : 'view',
|
|
2711
2801
|
}
|
|
2712
2802
|
: {
|
|
2713
2803
|
uniqid,
|
|
2714
2804
|
name,
|
|
2715
2805
|
onSave,
|
|
2716
2806
|
position: 'right',
|
|
2807
|
+
mode: mode !== null && mode !== void 0 ? mode : 'view',
|
|
2717
2808
|
};
|
|
2718
2809
|
state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
|
|
2719
2810
|
? state.editors
|