@antscorp/antsomi-ui 1.3.5-beta.259 → 1.3.5-beta.260
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.
|
@@ -23,7 +23,6 @@ var _a, _b, _c, _d, _e;
|
|
|
23
23
|
// Libraries
|
|
24
24
|
import React, { useState, useEffect, useMemo } from 'react';
|
|
25
25
|
import styled, { css } from 'styled-components';
|
|
26
|
-
import { getI18n } from 'react-i18next';
|
|
27
26
|
import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
28
27
|
import { AutoComplete, Input } from 'antd';
|
|
29
28
|
import get from 'lodash/get';
|
|
@@ -138,8 +137,7 @@ export const ModalSelect = props => {
|
|
|
138
137
|
// Props
|
|
139
138
|
const { isModalVisible, handleOk, handleCancel, valueType, customerMetadata, visitorMetadata, eventMetadata, boFieldOptions, businessObject, defaultIsBo, onError, } = props;
|
|
140
139
|
// Translations
|
|
141
|
-
const { t } = i18nInstance;
|
|
142
|
-
const i18n = getI18n();
|
|
140
|
+
const { t, language } = i18nInstance;
|
|
143
141
|
// States
|
|
144
142
|
const [, setOpenTreeSelect] = useState(false);
|
|
145
143
|
const [metaData, setMetaData] = useState({
|
|
@@ -434,13 +432,10 @@ export const ModalSelect = props => {
|
|
|
434
432
|
React.createElement(Select, { showSearch: true, placeholder: "Select an item", defaultValue: EVENT.value, value: tempValueType || undefined, onChange: v => setTempValueType(v), options: Object.values(VALUE_TYPE).map(({ value, label }) => ({ value, label })) }),
|
|
435
433
|
[CUSTOMER.value, VISITOR.value].includes(tempValueType || '') ? (React.createElement(React.Fragment, null,
|
|
436
434
|
React.createElement(Text, { style: { textAlign: 'left' } }, t(translations.dynamicContent.modal.label.attribute).toString()),
|
|
437
|
-
React.createElement(Select, { status: boAttrErrorMessage ? 'error' : '', errorMsg: boAttrErrorMessage, showSearch: true, placeholder: "Select an item", options: (_b = buildOptionAttrArchive((dynamicContentAttributes || {})[tempValueType], currentMetaData.item_property_name || undefined)) === null || _b === void 0 ? void 0 : _b.map(attribute => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
label: get(attribute, `label.${(_a = i18n.language) === null || _a === void 0 ? void 0 : _a.toUpperCase()}`, attribute.defaultLabel),
|
|
442
|
-
});
|
|
443
|
-
}), value: currentMetaData.item_property_name || undefined, onChange: onChangeDynamicContentAttr }))) : (React.createElement(React.Fragment, null,
|
|
435
|
+
React.createElement(Select, { status: boAttrErrorMessage ? 'error' : '', errorMsg: boAttrErrorMessage, showSearch: true, placeholder: "Select an item", options: (_b = buildOptionAttrArchive((dynamicContentAttributes || {})[tempValueType], currentMetaData.item_property_name || undefined)) === null || _b === void 0 ? void 0 : _b.map(attribute => ({
|
|
436
|
+
value: attribute.value,
|
|
437
|
+
label: get(attribute, `label.${language === null || language === void 0 ? void 0 : language.toUpperCase()}`, attribute.defaultLabel),
|
|
438
|
+
})), value: currentMetaData.item_property_name || undefined, onChange: onChangeDynamicContentAttr }))) : (React.createElement(React.Fragment, null,
|
|
444
439
|
React.createElement(Text, { style: { textAlign: 'left' } }, t(translations.selectEvent.title).toString()),
|
|
445
440
|
React.createElement(Select, { showSearch: true, placeholder: "Select an item", value: currentMetaData.event_tracking_name || undefined, loading: loading.isLoadingEvent, onChange: v => onChangeEvent(v), options: listEvent.map(event => ({ value: event.value, label: event.label })) }),
|
|
446
441
|
React.createElement(Text, { style: { textAlign: 'left' } }, t(translations.inAnySourceOf.title).toString()),
|
|
@@ -13,7 +13,7 @@ export const FilterBlockWrapper = styled.div `
|
|
|
13
13
|
`;
|
|
14
14
|
export const RowCondition = styled.div `
|
|
15
15
|
display: grid;
|
|
16
|
-
align-items:
|
|
16
|
+
align-items: flex-end;
|
|
17
17
|
// 3 first items = 84%;
|
|
18
18
|
grid-template-columns: 34% 22% 28% 7% auto;
|
|
19
19
|
grid-column-gap: 20px;
|