jamespot-front-business 1.2.12 → 1.2.14
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 +45 -1
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +45 -1
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +66 -20
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -2355,6 +2355,42 @@ const getModelIconSrc = (model, size) => {
|
|
|
2355
2355
|
};
|
|
2356
2356
|
return jamespot.formatImgUrl(imgProps);
|
|
2357
2357
|
};
|
|
2358
|
+
const getModelFontAwesomeIcon = (icon) => {
|
|
2359
|
+
var _a;
|
|
2360
|
+
const modelIconToFAIcon = {
|
|
2361
|
+
actionplan: 'fs-actionplan',
|
|
2362
|
+
animatedMeeting: 'fs-animated_meeting',
|
|
2363
|
+
articleWidget: 'star',
|
|
2364
|
+
album: 'images',
|
|
2365
|
+
article: 'file-lines',
|
|
2366
|
+
businessDirectory: 'building',
|
|
2367
|
+
document: 'file-arrow-down',
|
|
2368
|
+
diffgroup: 'group',
|
|
2369
|
+
event: 'calendar-days',
|
|
2370
|
+
goal: 'bullseye-arrow',
|
|
2371
|
+
idea: 'fs-idea',
|
|
2372
|
+
'intranet-page': 'fs-intranet',
|
|
2373
|
+
lab: 'flask',
|
|
2374
|
+
meeting: 'calendar-days',
|
|
2375
|
+
news: 'newspaper',
|
|
2376
|
+
poll: 'square-poll-vertical',
|
|
2377
|
+
process: 'fs-process',
|
|
2378
|
+
question: 'circle-question',
|
|
2379
|
+
search: 'block-question',
|
|
2380
|
+
surveyDate: 'calendar-check',
|
|
2381
|
+
support: 'headset',
|
|
2382
|
+
targetInfo: 'message-exclamation',
|
|
2383
|
+
task: 'list-check',
|
|
2384
|
+
tender: 'bullhorn',
|
|
2385
|
+
url: 'link',
|
|
2386
|
+
'weDoc-docx': 'file-word',
|
|
2387
|
+
'weDoc-xlsx': 'file-excel',
|
|
2388
|
+
'weDoc-pptx': 'file-powerpoint',
|
|
2389
|
+
wiki: 'fs-wiki',
|
|
2390
|
+
workgroup: 'fs-workgroup',
|
|
2391
|
+
};
|
|
2392
|
+
return `icon-${(_a = modelIconToFAIcon[icon]) !== null && _a !== void 0 ? _a : icon}`;
|
|
2393
|
+
};
|
|
2358
2394
|
const slice$2 = toolkit.createSlice({
|
|
2359
2395
|
name: 'models',
|
|
2360
2396
|
initialState: adapter$1.getInitialState(),
|
|
@@ -2367,6 +2403,7 @@ const slice$2 = toolkit.createSlice({
|
|
|
2367
2403
|
const selectors$1 = adapter$1.getSelectors((state) => state.entities.models);
|
|
2368
2404
|
const utils = {
|
|
2369
2405
|
getModelIconSrc,
|
|
2406
|
+
getModelFontAwesomeIcon,
|
|
2370
2407
|
};
|
|
2371
2408
|
const selectByIds = (state, types) => types.map((type) => state.entities.models.entities[type]).filter((model) => !!model);
|
|
2372
2409
|
const Model = {
|
|
@@ -4661,7 +4698,7 @@ function renderDisplays(studioApp) {
|
|
|
4661
4698
|
Object.entries(studioApp.views).forEach(([viewName, viewContent]) => {
|
|
4662
4699
|
if (Object.prototype.hasOwnProperty.call(internal2XmlView, viewName)) {
|
|
4663
4700
|
const viewField = Object.entries(viewContent)
|
|
4664
|
-
.filter((a) => a[1].isUsed)
|
|
4701
|
+
.filter((a) => a[1].isUsed && (viewName !== 'view' || a[0] !== 'title'))
|
|
4665
4702
|
.sort((a, b) => a[1].pos - b[1].pos);
|
|
4666
4703
|
toRet += `<display view="${internal2XmlView[viewName]}${viewName === 'view' && studioApp.manifest.displayContentLegacyTable ? 'Disabled' : ''}" mode="${viewName === 'view' ? 'view' : 'form'}">
|
|
4667
4704
|
${viewField.map(([fieldId, view]) => renderDisplayAttr(fieldId, view)).join('')}
|
|
@@ -4964,6 +5001,10 @@ function populateFieldsAndViews(app, appS, state) {
|
|
|
4964
5001
|
function buildView(appS, registeredFields, displayName, displayValue, tables, state) {
|
|
4965
5002
|
const newName = installedToV2ViewNames[displayName];
|
|
4966
5003
|
appS.views[newName] = {};
|
|
5004
|
+
if (newName === 'view') {
|
|
5005
|
+
const [localFieldIdTitle, localFieldTitle] = getTitleToView({ fixedValue: undefined, ref: 'title' });
|
|
5006
|
+
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
5007
|
+
}
|
|
4967
5008
|
displayValue.composants.forEach((viewComponent, index) => {
|
|
4968
5009
|
let field = undefined;
|
|
4969
5010
|
if (viewComponent.name && ignoredFields.includes(viewComponent.name)) {
|
|
@@ -4973,6 +5014,9 @@ function buildView(appS, registeredFields, displayName, displayValue, tables, st
|
|
|
4973
5014
|
if (fieldIdx === -1 && fixedInfo) {
|
|
4974
5015
|
switch (fixedInfo.ref) {
|
|
4975
5016
|
case 'title':
|
|
5017
|
+
if (newName === 'view') {
|
|
5018
|
+
break;
|
|
5019
|
+
}
|
|
4976
5020
|
const [localFieldIdTitle, localFieldTitle] = getTitleToView(fixedInfo);
|
|
4977
5021
|
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
4978
5022
|
break;
|