@zohodesk/library-platform 1.1.10-exp.2 → 1.1.10-temp-1
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/es/cc/fields/field/Types.js +1 -0
- package/es/cc/fields/name/Constants.js +5 -0
- package/es/cc/fields/name/Events.js +3 -0
- package/es/cc/fields/name/Model.js +14 -0
- package/es/cc/fields/name/Properties.js +24 -0
- package/es/cc/table-connected/Properties.js +12 -0
- package/es/cc/table-list/Properties.js +2 -1
- package/es/cc/table-primary-field/Constants.js +5 -0
- package/es/cc/table-primary-field/Events.js +4 -0
- package/es/cc/table-primary-field/Properties.js +29 -0
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -13
- package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
- package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +1 -1
- package/es/library/dot/components/table-list/.DS_Store +0 -0
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +15 -15
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +1 -1
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +9 -9
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/TableColumnChooserView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/css/TableColumnChooserView.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +2 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/EventHandlersFactory.js +28 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/PrimaryField.js +12 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/primary-field/frameworks/ui/PrimaryFieldView.js +38 -0
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +9 -9
- package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +51 -0
- package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js +1 -0
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +9 -0
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +38 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +5 -5
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +12 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +19 -0
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +33 -0
- package/es/platform/data-source/http-template/fetchDependencyMappings.js +18 -0
- package/es/platform/data-source/http-template/fetchLayoutRules.js +29 -0
- package/es/platform/data-source/http-template/fetchMyForm.js +19 -0
- package/es/platform/data-source/http-template/fetchMyFormLayout.js +43 -0
- package/es/platform/data-source/http-template/fetchValidationRules.js +30 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +6 -2
- package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +11 -0
- package/es/platform/zlist/adapters/presenters/translators/ColumnTranslator.js +20 -13
- package/es/platform/zlist/adapters/presenters/translators/Row.js +3 -2
- package/es/platform/zlist/adapters/presenters/translators/RowsTranslator.js +4 -2
- package/es/platform/zlist/adapters/presenters/translators/fields/BooleanFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/CurrencyFieldTranslator.js +8 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/DateFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/DateTimeFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/DecimalFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/EmailFieldTranslator.js +6 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/FormulaFieldTranslator.js +8 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/LookUpFieldTranslator.js +6 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/NameFieldTranslator.js +52 -0
- package/es/platform/zlist/adapters/presenters/translators/fields/NumberFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/PhoneFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/SingleLineFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/URLFieldTranslator.js +7 -1
- package/es/platform/zlist/adapters/presenters/translators/fields/index.js +3 -1
- package/package.json +2 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
.wrapper {
|
|
2
|
-
max-width: 100%
|
|
2
|
+
max-width: 100%
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.gap_small {
|
|
6
|
-
gap:
|
|
6
|
+
gap: var(--zd_size4)
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.gap_xmedium {
|
|
10
|
-
gap:
|
|
10
|
+
gap: var(--zd_size6)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.gap_medium {
|
|
14
|
-
gap:
|
|
14
|
+
gap: var(--zd_size8)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.gap_large {
|
|
18
|
-
gap:
|
|
18
|
+
gap: var(--zd_size10)
|
|
19
19
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../library/custom-component";
|
|
2
|
+
import RowActionsRendererProperties from "../../../../cc/action-event-mediator/Properties";
|
|
3
|
+
import RowActionsRendererView from "./RowActionsRendererView";
|
|
4
|
+
import { ComponentRegistry } from "../../../../../../library";
|
|
5
|
+
const RowActionsRendererComponent = createCustomComponent({
|
|
6
|
+
name: 'RowActionsRenderer',
|
|
7
|
+
properties: RowActionsRendererProperties,
|
|
8
|
+
eventHandlers: {},
|
|
9
|
+
View: RowActionsRendererView
|
|
10
|
+
});
|
|
11
|
+
ComponentRegistry.register("RowActionsRenderer", RowActionsRendererComponent);
|
|
12
|
+
export default RowActionsRendererComponent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
3
|
+
import DynamicActionComponent from "../../../dynamic-component/frameworks/ui/DynamicActionComponent";
|
|
4
|
+
import { ActionViewGap } from "../../../interfaces/ActionViewModel";
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import style from "./RowActionsRenderer.module.css";
|
|
7
|
+
|
|
8
|
+
function RowActionsRendererView(_ref, ref) {
|
|
9
|
+
let {
|
|
10
|
+
state
|
|
11
|
+
} = _ref;
|
|
12
|
+
const {
|
|
13
|
+
actions,
|
|
14
|
+
gap,
|
|
15
|
+
testId
|
|
16
|
+
} = state.properties;
|
|
17
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
testId: testId,
|
|
20
|
+
customId: testId,
|
|
21
|
+
$ui_displayMode: "inline",
|
|
22
|
+
$ui_alignItems: "center",
|
|
23
|
+
$ui_className: `${style.wrapper} ${gap !== ActionViewGap.NONE ? style[`gap_${gap}`] : ''}`
|
|
24
|
+
}, actions.map((action, index) => {
|
|
25
|
+
return /*#__PURE__*/React.createElement(DynamicActionComponent, {
|
|
26
|
+
action: action,
|
|
27
|
+
key: index
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
;
|
|
33
|
+
export default RowActionsRendererView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const fetchDependencyMappings = {
|
|
2
|
+
name: 'fetchDependencyMappings',
|
|
3
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/dependencyMappings',
|
|
4
|
+
parameters: `{"layoutId":"{{layoutId}}"}`,
|
|
5
|
+
type: 'GET',
|
|
6
|
+
transformer: data => data,
|
|
7
|
+
properties: {
|
|
8
|
+
layoutId: {
|
|
9
|
+
required: true,
|
|
10
|
+
typeMetadata: {
|
|
11
|
+
schema: {
|
|
12
|
+
type: 'string'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export default fetchDependencyMappings;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Assuming GetTemplate interface is defined
|
|
2
|
+
const fetchLayoutRules = {
|
|
3
|
+
name: 'fetchLayoutRules',
|
|
4
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/layouts/{{layoutId}}/layoutRules',
|
|
5
|
+
parameters: `{"activeRulesOnly":{{activeRulesOnly}}}`,
|
|
6
|
+
type: 'GET',
|
|
7
|
+
transformer: data => data,
|
|
8
|
+
properties: {
|
|
9
|
+
layoutId: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
activeRulesOnly: {
|
|
18
|
+
required: true,
|
|
19
|
+
typeMetadata: {
|
|
20
|
+
schema: {
|
|
21
|
+
type: 'boolean'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultValue: true // Assuming true as a default if parameter is optional
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default fetchLayoutRules;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Assuming similar structure to PatchTemplate
|
|
2
|
+
const fetchMyForm = {
|
|
3
|
+
name: 'myFormFetch',
|
|
4
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/myForm',
|
|
5
|
+
parameters: `{"layoutId":"{{layoutId}}"}`,
|
|
6
|
+
type: 'GET',
|
|
7
|
+
transformer: data => data,
|
|
8
|
+
properties: {
|
|
9
|
+
layoutId: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export default fetchMyForm;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Assumed you have a GetTemplate interface similar to PatchTemplate
|
|
2
|
+
const fetchMyLayouts = {
|
|
3
|
+
name: 'myLayoutsFetch',
|
|
4
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/myLayouts',
|
|
5
|
+
parameters: `{"module":"{{module}}","departmentId":"{{departmentId}}","from":"{{from}}","limit":"{{limit}}"}`,
|
|
6
|
+
type: 'GET',
|
|
7
|
+
transformer: data => data,
|
|
8
|
+
properties: {
|
|
9
|
+
module: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
departmentId: {
|
|
18
|
+
required: true,
|
|
19
|
+
typeMetadata: {
|
|
20
|
+
schema: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
from: {
|
|
26
|
+
required: true,
|
|
27
|
+
typeMetadata: {
|
|
28
|
+
schema: {
|
|
29
|
+
type: 'string'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
limit: {
|
|
34
|
+
required: true,
|
|
35
|
+
typeMetadata: {
|
|
36
|
+
schema: {
|
|
37
|
+
type: 'string'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export default fetchMyLayouts;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Assuming GetTemplate interface is similar to PatchTemplate
|
|
2
|
+
import { transFormValidationRules } from "../utils/validation-rules/TransFormValidationRules";
|
|
3
|
+
const fetchValidationRules = {
|
|
4
|
+
name: 'fetchValidationRules',
|
|
5
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/layouts/{{layoutId}}/validationRules',
|
|
6
|
+
parameters: `{"activeRulesOnly":{{activeRulesOnly}}}`,
|
|
7
|
+
type: 'GET',
|
|
8
|
+
transformer: transFormValidationRules,
|
|
9
|
+
properties: {
|
|
10
|
+
layoutId: {
|
|
11
|
+
required: true,
|
|
12
|
+
typeMetadata: {
|
|
13
|
+
schema: {
|
|
14
|
+
type: 'string'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
activeRulesOnly: {
|
|
19
|
+
required: true,
|
|
20
|
+
typeMetadata: {
|
|
21
|
+
schema: {
|
|
22
|
+
type: 'boolean'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultValue: true // Assuming default behavior if not provided
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export default fetchValidationRules;
|
|
@@ -38,8 +38,12 @@ export default class TableTranslator {
|
|
|
38
38
|
const {
|
|
39
39
|
resizeConfig,
|
|
40
40
|
preferences,
|
|
41
|
-
keyboardControlsConfig
|
|
41
|
+
keyboardControlsConfig,
|
|
42
|
+
nameFieldsConfig
|
|
42
43
|
} = properties;
|
|
44
|
+
const {
|
|
45
|
+
modules
|
|
46
|
+
} = context;
|
|
43
47
|
context['servicePrefix'] = 'supportapi/zd'; // FIX: servicePrefix defaultValue should be available from properties
|
|
44
48
|
|
|
45
49
|
const {
|
|
@@ -108,7 +112,7 @@ export default class TableTranslator {
|
|
|
108
112
|
const modifiedWidths = calculateFieldWidths(fields, localStorageFieldWidths, preferences);
|
|
109
113
|
const recordsForDisplay = isRecordsShouldBeEmptied ? EMPTY_ARRAY : records;
|
|
110
114
|
const headersTranslator = new HeadersTranslator(fields, headerActions, context, modifiedWidths, sortBy, records, instanceName, moduleName);
|
|
111
|
-
const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
|
|
115
|
+
const rowsTranslator = new RowsTranslator(recordsForDisplay, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName, nameFieldsConfig); // const actionTranslator = new ClientActionsTranslator(clientActions, records, fields, pageContext);
|
|
112
116
|
// const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator(), actionTranslator.getTranslator()];
|
|
113
117
|
|
|
114
118
|
const translators = [headersTranslator.getTranslator(), rowsTranslator.getTranslator()];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Alignment } from "../../../../../cc/table-list/data-types/Header";
|
|
2
|
+
|
|
3
|
+
function ColumnAlignmentTranslator(type) {
|
|
4
|
+
if (type === 'Boolean') {
|
|
5
|
+
return Alignment.Center;
|
|
6
|
+
} else {
|
|
7
|
+
return Alignment.Left;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default ColumnAlignmentTranslator;
|
|
@@ -17,13 +17,15 @@ function getLookupUrlConstructions(_ref) {
|
|
|
17
17
|
return `/agent/${orgName}/${departmentName}/${lookupModuleName}/details/${value.id}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName) {
|
|
20
|
+
function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName, nameFieldsConfig) {
|
|
21
21
|
const {
|
|
22
22
|
isCustomField,
|
|
23
23
|
name,
|
|
24
24
|
type
|
|
25
25
|
} = field;
|
|
26
|
-
|
|
26
|
+
const {
|
|
27
|
+
modules
|
|
28
|
+
} = context;
|
|
27
29
|
const fieldEntry = fieldComponentMapping[name];
|
|
28
30
|
|
|
29
31
|
if (typeof fieldEntry == 'string') {
|
|
@@ -45,7 +47,11 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
45
47
|
field.uiType = fieldComponentMapping[name];
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
let nameFieldTypes = ['Text'];
|
|
51
|
+
let moduleApiKeyCheck = modules && modules.some(m => {
|
|
52
|
+
return m.apiKey === field.name;
|
|
53
|
+
});
|
|
54
|
+
const fieldTranslator = nameFieldsConfig.isEnabled && nameFieldTypes.includes(field.type) && moduleApiKeyCheck ? FieldTranslators['NameField'] : FieldTranslators[type];
|
|
49
55
|
|
|
50
56
|
if (!fieldTranslator) {
|
|
51
57
|
console.error(`Field type ${type} not supported`);
|
|
@@ -65,18 +71,19 @@ function ColumnTranslator(field, record, fieldComponentMapping, fieldActions, co
|
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
73
|
|
|
68
|
-
let finalValue = value;
|
|
69
|
-
|
|
70
|
-
if (fieldToUiValue !== undefined) {
|
|
71
|
-
finalValue = fieldToUiValue;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
finalValue = tempValue ? tempValue : finalValue;
|
|
75
74
|
const viewModel = {
|
|
76
75
|
actions,
|
|
77
|
-
...fieldTranslator(
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
...fieldTranslator({
|
|
77
|
+
field,
|
|
78
|
+
value: tempValue ? tempValue : value,
|
|
79
|
+
appendToActionPayload: {
|
|
80
|
+
recordId: record.id
|
|
81
|
+
},
|
|
82
|
+
context,
|
|
83
|
+
preferences,
|
|
84
|
+
moduleName,
|
|
85
|
+
constructUrl: nameFieldsConfig.constructUrl
|
|
86
|
+
})
|
|
80
87
|
};
|
|
81
88
|
|
|
82
89
|
if (fieldEntry && typeof fieldEntry === 'object') {
|
|
@@ -11,14 +11,15 @@ export default function RowTranslator(_ref) {
|
|
|
11
11
|
context,
|
|
12
12
|
preferences,
|
|
13
13
|
instanceName,
|
|
14
|
-
moduleName
|
|
14
|
+
moduleName,
|
|
15
|
+
nameFieldsConfig
|
|
15
16
|
} = _ref;
|
|
16
17
|
const actions = ClientActionsTranslator.transform(rowActions, instanceName, moduleName, { ...context,
|
|
17
18
|
record
|
|
18
19
|
});
|
|
19
20
|
return {
|
|
20
21
|
id: record.id,
|
|
21
|
-
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName)),
|
|
22
|
+
columns: fields.map(field => ColumnTranslator(field, record, fieldComponentMapping, fieldActions, context, preferences, instanceName, moduleName, nameFieldsConfig)),
|
|
22
23
|
rowActionLocation: {
|
|
23
24
|
type: rowActionsUiType,
|
|
24
25
|
actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RowTranslator from "./Row";
|
|
2
2
|
export default class RowsTranslator {
|
|
3
|
-
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName) {
|
|
3
|
+
constructor(records, fields, rowActions, context, preferences, fieldComponentMapping, rowActionsUiType, fieldActions, instanceName, moduleName, nameFieldsConfig) {
|
|
4
4
|
this.records = records;
|
|
5
5
|
this.fields = fields;
|
|
6
6
|
this.rowActions = rowActions;
|
|
@@ -11,6 +11,7 @@ export default class RowsTranslator {
|
|
|
11
11
|
this.fieldActions = fieldActions;
|
|
12
12
|
this.instanceName = instanceName;
|
|
13
13
|
this.moduleName = moduleName;
|
|
14
|
+
this.nameFieldsConfig = nameFieldsConfig;
|
|
14
15
|
this.pipe = this.pipe.bind(this);
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -29,7 +30,8 @@ export default class RowsTranslator {
|
|
|
29
30
|
context: this.context,
|
|
30
31
|
preferences: this.preferences,
|
|
31
32
|
instanceName: this.instanceName,
|
|
32
|
-
moduleName: this.moduleName
|
|
33
|
+
moduleName: this.moduleName,
|
|
34
|
+
nameFieldsConfig: this.nameFieldsConfig
|
|
33
35
|
}));
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import BooleanFieldModel from "../../../../../../cc/fields/boolean/Model";
|
|
3
4
|
|
|
4
|
-
const BooleanFieldTranslator =
|
|
5
|
+
const BooleanFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
2
|
import CurrencyFieldModel from "../../../../../../cc/fields/currency/Model";
|
|
3
3
|
|
|
4
|
-
const CurrencyFieldTranslator =
|
|
4
|
+
const CurrencyFieldTranslator = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
field,
|
|
7
|
+
value,
|
|
8
|
+
appendToActionPayload,
|
|
9
|
+
context,
|
|
10
|
+
preferences
|
|
11
|
+
} = _ref;
|
|
5
12
|
const {
|
|
6
13
|
uiType,
|
|
7
14
|
name
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import DateFieldModel from "../../../../../../cc/fields/date/Model";
|
|
3
4
|
|
|
4
|
-
const DateFieldTranslator =
|
|
5
|
+
const DateFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import DateTimeFieldModel from "../../../../../../cc/fields/datetime/Model";
|
|
3
4
|
|
|
4
|
-
const DateTimeFieldTranslator =
|
|
5
|
+
const DateTimeFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import DecimalFieldModel from "../../../../../../cc/fields/decimal/Model";
|
|
3
4
|
|
|
4
|
-
const DecimalFieldTranslator =
|
|
5
|
+
const DecimalFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
2
|
import EmailFieldModel from "../../../../../../cc/fields/email/Model";
|
|
3
3
|
|
|
4
|
-
const EmailFieldTranslator =
|
|
4
|
+
const EmailFieldTranslator = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
field,
|
|
7
|
+
value,
|
|
8
|
+
appendToActionPayload
|
|
9
|
+
} = _ref;
|
|
5
10
|
const {
|
|
6
11
|
uiType,
|
|
7
12
|
name
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
2
|
import FormulaFieldModel from "../../../../../../cc/fields/formula/Model";
|
|
3
3
|
|
|
4
|
-
const FormulaFieldTranslator =
|
|
4
|
+
const FormulaFieldTranslator = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
field,
|
|
7
|
+
value,
|
|
8
|
+
appendToActionPayload,
|
|
9
|
+
context,
|
|
10
|
+
preferences
|
|
11
|
+
} = _ref;
|
|
5
12
|
const {
|
|
6
13
|
uiType,
|
|
7
14
|
name
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
2
|
import LookupFieldModel from "../../../../../../cc/fields/lookup/Model";
|
|
3
3
|
|
|
4
|
-
const LookUpFieldTranslator =
|
|
4
|
+
const LookUpFieldTranslator = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
field,
|
|
7
|
+
value,
|
|
8
|
+
appendToActionPayload
|
|
9
|
+
} = _ref;
|
|
5
10
|
const {
|
|
6
11
|
uiType,
|
|
7
12
|
name
|
package/es/platform/zlist/adapters/presenters/translators/fields/MultiLineFieldTranslator.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import MultiLineFieldModel from "../../../../../../cc/fields/multi-select/Model";
|
|
3
4
|
|
|
4
|
-
const MultiLineFieldTranslator =
|
|
5
|
+
const MultiLineFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import MultiListFieldModel from "../../../../../../cc/fields/multi-select/Model";
|
|
3
4
|
import ColouredMultiListFieldModel from "../../../../../../cc/fields/coloured-multi-select/Model";
|
|
4
5
|
|
|
5
|
-
const MultiSelectFieldTranslator =
|
|
6
|
+
const MultiSelectFieldTranslator = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
field,
|
|
9
|
+
value,
|
|
10
|
+
appendToActionPayload
|
|
11
|
+
} = _ref;
|
|
6
12
|
const {
|
|
7
13
|
uiType,
|
|
8
14
|
name,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
|
+
import NameFieldModel from "../../../../../../cc/fields/name/Model";
|
|
3
|
+
|
|
4
|
+
function getNameFieldUrlConstructions(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
record,
|
|
7
|
+
context,
|
|
8
|
+
moduleName
|
|
9
|
+
} = _ref;
|
|
10
|
+
let {
|
|
11
|
+
orgName,
|
|
12
|
+
departmentName
|
|
13
|
+
} = context;
|
|
14
|
+
return `/agent/${orgName}/${departmentName}/${moduleName}/details/${record.recordId}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const NameFieldTranslator = _ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
field,
|
|
20
|
+
value,
|
|
21
|
+
appendToActionPayload,
|
|
22
|
+
context,
|
|
23
|
+
moduleName,
|
|
24
|
+
constructUrl
|
|
25
|
+
} = _ref2;
|
|
26
|
+
const {
|
|
27
|
+
uiType,
|
|
28
|
+
name
|
|
29
|
+
} = field;
|
|
30
|
+
let nameFieldValue = undefined;
|
|
31
|
+
nameFieldValue = typeof value !== 'object' ? {
|
|
32
|
+
value,
|
|
33
|
+
id: appendToActionPayload.recordId
|
|
34
|
+
} : value;
|
|
35
|
+
nameFieldValue.url = constructUrl ? constructUrl({
|
|
36
|
+
record: appendToActionPayload,
|
|
37
|
+
context,
|
|
38
|
+
moduleName
|
|
39
|
+
}) : getNameFieldUrlConstructions({
|
|
40
|
+
record: appendToActionPayload,
|
|
41
|
+
context,
|
|
42
|
+
moduleName
|
|
43
|
+
});
|
|
44
|
+
return NameFieldModel({
|
|
45
|
+
uiType: FieldTypes.PrimaryField,
|
|
46
|
+
appendToActionPayload,
|
|
47
|
+
name,
|
|
48
|
+
value: nameFieldValue
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default NameFieldTranslator;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import NumberFieldModel from "../../../../../../cc/fields/number/Model";
|
|
3
4
|
|
|
4
|
-
const NumberLineFieldTranslator =
|
|
5
|
+
const NumberLineFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
package/es/platform/zlist/adapters/presenters/translators/fields/PercentageFieldTranslator.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import PercentFieldModel from "../../../../../../cc/fields/percent/Model";
|
|
3
4
|
|
|
4
|
-
const PercentageFieldTranslator =
|
|
5
|
+
const PercentageFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import PhoneFieldModel from "../../../../../../cc/fields/phone/Model";
|
|
3
4
|
|
|
4
|
-
const PhoneFieldTranslator =
|
|
5
|
+
const PhoneFieldTranslator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
field,
|
|
8
|
+
value,
|
|
9
|
+
appendToActionPayload
|
|
10
|
+
} = _ref;
|
|
5
11
|
const {
|
|
6
12
|
uiType,
|
|
7
13
|
name
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
// import FieldModel from '@platform/zfield/entities/interfaces/FieldModel';
|
|
1
2
|
import FieldTypes from "../../../../../../cc/fields/field/Types";
|
|
2
3
|
import PickListFieldModel from "../../../../../../cc/fields/pick-list/Model";
|
|
3
4
|
import ColouredPickListFieldModel from "../../../../../../cc/fields/coloured-pick-list/Model";
|
|
4
5
|
|
|
5
|
-
const PickListFieldTranslator =
|
|
6
|
+
const PickListFieldTranslator = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
field,
|
|
9
|
+
value,
|
|
10
|
+
appendToActionPayload
|
|
11
|
+
} = _ref;
|
|
6
12
|
const {
|
|
7
13
|
uiType,
|
|
8
14
|
name,
|