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/cjs.js
CHANGED
|
@@ -3286,6 +3286,7 @@ const initialState$3 = {
|
|
|
3286
3286
|
widgetChipCount: {},
|
|
3287
3287
|
flushedWidgets: [],
|
|
3288
3288
|
rtObjectStack: [],
|
|
3289
|
+
widgetContext: {},
|
|
3289
3290
|
};
|
|
3290
3291
|
const IS_EMPTY = [
|
|
3291
3292
|
jamespot.WidgetsName.ArticleTitle,
|
|
@@ -3300,7 +3301,7 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
3300
3301
|
initialState: initialState$3,
|
|
3301
3302
|
reducers: {
|
|
3302
3303
|
registerWidget: (state, action) => {
|
|
3303
|
-
const { uniqid, widget } = action.payload;
|
|
3304
|
+
const { uniqid, widget, context } = action.payload;
|
|
3304
3305
|
state.ids[uniqid] = widget;
|
|
3305
3306
|
state.states[uniqid] = {
|
|
3306
3307
|
busy: false,
|
|
@@ -3311,6 +3312,7 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
3311
3312
|
empty: IS_EMPTY.includes(widget.widget.name),
|
|
3312
3313
|
locked: false,
|
|
3313
3314
|
};
|
|
3315
|
+
state.widgetContext[uniqid] = context;
|
|
3314
3316
|
},
|
|
3315
3317
|
registerWidgetObject: (state, action) => {
|
|
3316
3318
|
const { uniqid, object } = action.payload;
|
|
@@ -3357,6 +3359,13 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
3357
3359
|
const { uniqid } = action.payload;
|
|
3358
3360
|
delete state.ids[uniqid];
|
|
3359
3361
|
delete state.states[uniqid];
|
|
3362
|
+
delete state.widgetContext[uniqid];
|
|
3363
|
+
delete state.widgetObject[uniqid];
|
|
3364
|
+
delete state.widgetObjectRights[uniqid];
|
|
3365
|
+
delete state.widgetAuthor[uniqid];
|
|
3366
|
+
delete state.widgetChipCount[uniqid];
|
|
3367
|
+
delete state.widgetWrapperStyle[uniqid];
|
|
3368
|
+
delete state.widgetTitleStyle[uniqid];
|
|
3360
3369
|
state.flushedWidgets.push(uniqid);
|
|
3361
3370
|
},
|
|
3362
3371
|
flushAllWidget: (state) => {
|
|
@@ -3542,6 +3551,7 @@ const selectWidgetObjectUri = (state, uniqid) => {
|
|
|
3542
3551
|
return undefined;
|
|
3543
3552
|
};
|
|
3544
3553
|
const selectWidgetObjectRights = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObjectRights[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3554
|
+
const selectWidgetContext = (state, uniqid) => { var _a; return (_a = state.widgets.widgetContext[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3545
3555
|
const selectWidgetAuthor = (state, uniqid) => { var _a; return (_a = state.widgets.widgetAuthor[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
3546
3556
|
const selectWidgetChipCount = (state, uniqid) => { var _a; return (_a = state.widgets.widgetChipCount[uniqid]) !== null && _a !== void 0 ? _a : 0; };
|
|
3547
3557
|
const selectWidgetWrapperStyle = (state, uniqid) => { var _a; return (_a = state.widgets.widgetWrapperStyle[uniqid]) !== null && _a !== void 0 ? _a : {}; };
|
|
@@ -3571,6 +3581,7 @@ const Widget = {
|
|
|
3571
3581
|
selectWidgetObjectRights,
|
|
3572
3582
|
selectAllWidgetRTObject,
|
|
3573
3583
|
selectFlushedWidgets,
|
|
3584
|
+
selectWidgetContext,
|
|
3574
3585
|
selectWidgetLevel,
|
|
3575
3586
|
selectWidgetWrapperStyle,
|
|
3576
3587
|
selectWidgetTitleStyle,
|
|
@@ -4698,7 +4709,7 @@ function renderDisplays(studioApp) {
|
|
|
4698
4709
|
Object.entries(studioApp.views).forEach(([viewName, viewContent]) => {
|
|
4699
4710
|
if (Object.prototype.hasOwnProperty.call(internal2XmlView, viewName)) {
|
|
4700
4711
|
const viewField = Object.entries(viewContent)
|
|
4701
|
-
.filter((a) => a[1].isUsed)
|
|
4712
|
+
.filter((a) => a[1].isUsed && (viewName !== 'view' || a[0] !== 'title'))
|
|
4702
4713
|
.sort((a, b) => a[1].pos - b[1].pos);
|
|
4703
4714
|
toRet += `<display view="${internal2XmlView[viewName]}${viewName === 'view' && studioApp.manifest.displayContentLegacyTable ? 'Disabled' : ''}" mode="${viewName === 'view' ? 'view' : 'form'}">
|
|
4704
4715
|
${viewField.map(([fieldId, view]) => renderDisplayAttr(fieldId, view)).join('')}
|
|
@@ -5001,6 +5012,10 @@ function populateFieldsAndViews(app, appS, state) {
|
|
|
5001
5012
|
function buildView(appS, registeredFields, displayName, displayValue, tables, state) {
|
|
5002
5013
|
const newName = installedToV2ViewNames[displayName];
|
|
5003
5014
|
appS.views[newName] = {};
|
|
5015
|
+
if (newName === 'view') {
|
|
5016
|
+
const [localFieldIdTitle, localFieldTitle] = getTitleToView({ fixedValue: undefined, ref: 'title' });
|
|
5017
|
+
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
5018
|
+
}
|
|
5004
5019
|
displayValue.composants.forEach((viewComponent, index) => {
|
|
5005
5020
|
let field = undefined;
|
|
5006
5021
|
if (viewComponent.name && ignoredFields.includes(viewComponent.name)) {
|
|
@@ -5010,6 +5025,9 @@ function buildView(appS, registeredFields, displayName, displayValue, tables, st
|
|
|
5010
5025
|
if (fieldIdx === -1 && fixedInfo) {
|
|
5011
5026
|
switch (fixedInfo.ref) {
|
|
5012
5027
|
case 'title':
|
|
5028
|
+
if (newName === 'view') {
|
|
5029
|
+
break;
|
|
5030
|
+
}
|
|
5013
5031
|
const [localFieldIdTitle, localFieldTitle] = getTitleToView(fixedInfo);
|
|
5014
5032
|
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
5015
5033
|
break;
|