jamespot-front-business 1.2.13 → 1.2.15
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 +20 -2
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +20 -2
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +124 -2
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -3278,6 +3278,7 @@ const initialState$3 = {
|
|
|
3278
3278
|
widgetChipCount: {},
|
|
3279
3279
|
flushedWidgets: [],
|
|
3280
3280
|
rtObjectStack: [],
|
|
3281
|
+
widgetContext: {},
|
|
3281
3282
|
};
|
|
3282
3283
|
const IS_EMPTY = [
|
|
3283
3284
|
WidgetsName.ArticleTitle,
|
|
@@ -3292,7 +3293,7 @@ const widgetsSlice = createSlice({
|
|
|
3292
3293
|
initialState: initialState$3,
|
|
3293
3294
|
reducers: {
|
|
3294
3295
|
registerWidget: (state, action) => {
|
|
3295
|
-
const { uniqid, widget } = action.payload;
|
|
3296
|
+
const { uniqid, widget, context } = action.payload;
|
|
3296
3297
|
state.ids[uniqid] = widget;
|
|
3297
3298
|
state.states[uniqid] = {
|
|
3298
3299
|
busy: false,
|
|
@@ -3303,6 +3304,7 @@ const widgetsSlice = createSlice({
|
|
|
3303
3304
|
empty: IS_EMPTY.includes(widget.widget.name),
|
|
3304
3305
|
locked: false,
|
|
3305
3306
|
};
|
|
3307
|
+
state.widgetContext[uniqid] = context;
|
|
3306
3308
|
},
|
|
3307
3309
|
registerWidgetObject: (state, action) => {
|
|
3308
3310
|
const { uniqid, object } = action.payload;
|
|
@@ -3349,6 +3351,13 @@ const widgetsSlice = createSlice({
|
|
|
3349
3351
|
const { uniqid } = action.payload;
|
|
3350
3352
|
delete state.ids[uniqid];
|
|
3351
3353
|
delete state.states[uniqid];
|
|
3354
|
+
delete state.widgetContext[uniqid];
|
|
3355
|
+
delete state.widgetObject[uniqid];
|
|
3356
|
+
delete state.widgetObjectRights[uniqid];
|
|
3357
|
+
delete state.widgetAuthor[uniqid];
|
|
3358
|
+
delete state.widgetChipCount[uniqid];
|
|
3359
|
+
delete state.widgetWrapperStyle[uniqid];
|
|
3360
|
+
delete state.widgetTitleStyle[uniqid];
|
|
3352
3361
|
state.flushedWidgets.push(uniqid);
|
|
3353
3362
|
},
|
|
3354
3363
|
flushAllWidget: (state) => {
|
|
@@ -3534,6 +3543,7 @@ const selectWidgetObjectUri = (state, uniqid) => {
|
|
|
3534
3543
|
return undefined;
|
|
3535
3544
|
};
|
|
3536
3545
|
const selectWidgetObjectRights = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObjectRights[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3546
|
+
const selectWidgetContext = (state, uniqid) => { var _a; return (_a = state.widgets.widgetContext[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3537
3547
|
const selectWidgetAuthor = (state, uniqid) => { var _a; return (_a = state.widgets.widgetAuthor[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3538
3548
|
const selectWidgetChipCount = (state, uniqid) => { var _a; return (_a = state.widgets.widgetChipCount[uniqid]) !== null && _a !== void 0 ? _a : 0; };
|
|
3539
3549
|
const selectWidgetWrapperStyle = (state, uniqid) => { var _a; return (_a = state.widgets.widgetWrapperStyle[uniqid]) !== null && _a !== void 0 ? _a : {}; };
|
|
@@ -3563,6 +3573,7 @@ const Widget = {
|
|
|
3563
3573
|
selectWidgetObjectRights,
|
|
3564
3574
|
selectAllWidgetRTObject,
|
|
3565
3575
|
selectFlushedWidgets,
|
|
3576
|
+
selectWidgetContext,
|
|
3566
3577
|
selectWidgetLevel,
|
|
3567
3578
|
selectWidgetWrapperStyle,
|
|
3568
3579
|
selectWidgetTitleStyle,
|
|
@@ -4690,7 +4701,7 @@ function renderDisplays(studioApp) {
|
|
|
4690
4701
|
Object.entries(studioApp.views).forEach(([viewName, viewContent]) => {
|
|
4691
4702
|
if (Object.prototype.hasOwnProperty.call(internal2XmlView, viewName)) {
|
|
4692
4703
|
const viewField = Object.entries(viewContent)
|
|
4693
|
-
.filter((a) => a[1].isUsed)
|
|
4704
|
+
.filter((a) => a[1].isUsed && (viewName !== 'view' || a[0] !== 'title'))
|
|
4694
4705
|
.sort((a, b) => a[1].pos - b[1].pos);
|
|
4695
4706
|
toRet += `<display view="${internal2XmlView[viewName]}${viewName === 'view' && studioApp.manifest.displayContentLegacyTable ? 'Disabled' : ''}" mode="${viewName === 'view' ? 'view' : 'form'}">
|
|
4696
4707
|
${viewField.map(([fieldId, view]) => renderDisplayAttr(fieldId, view)).join('')}
|
|
@@ -4993,6 +5004,10 @@ function populateFieldsAndViews(app, appS, state) {
|
|
|
4993
5004
|
function buildView(appS, registeredFields, displayName, displayValue, tables, state) {
|
|
4994
5005
|
const newName = installedToV2ViewNames[displayName];
|
|
4995
5006
|
appS.views[newName] = {};
|
|
5007
|
+
if (newName === 'view') {
|
|
5008
|
+
const [localFieldIdTitle, localFieldTitle] = getTitleToView({ fixedValue: undefined, ref: 'title' });
|
|
5009
|
+
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
5010
|
+
}
|
|
4996
5011
|
displayValue.composants.forEach((viewComponent, index) => {
|
|
4997
5012
|
let field = undefined;
|
|
4998
5013
|
if (viewComponent.name && ignoredFields.includes(viewComponent.name)) {
|
|
@@ -5002,6 +5017,9 @@ function buildView(appS, registeredFields, displayName, displayValue, tables, st
|
|
|
5002
5017
|
if (fieldIdx === -1 && fixedInfo) {
|
|
5003
5018
|
switch (fixedInfo.ref) {
|
|
5004
5019
|
case 'title':
|
|
5020
|
+
if (newName === 'view') {
|
|
5021
|
+
break;
|
|
5022
|
+
}
|
|
5005
5023
|
const [localFieldIdTitle, localFieldTitle] = getTitleToView(fixedInfo);
|
|
5006
5024
|
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
5007
5025
|
break;
|