@experium/findy-form 1.2.58 → 1.2.61
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/app.js +1 -1
- package/lib/components/formComponents/DateSelect.js +4 -3
- package/lib/components/formComponents/Money.js +9 -9
- package/lib/utils/validation.js +1 -1
- package/package.json +1 -1
- package/src/components/formComponents/DateSelect.js +44 -42
- package/src/components/formComponents/Money.js +8 -1
- package/src/utils/validation.js +1 -1
|
@@ -238,9 +238,10 @@ var DateSelect = /*#__PURE__*/function (_Component) {
|
|
|
238
238
|
returnObjects: true
|
|
239
239
|
});
|
|
240
240
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
|
-
id: name,
|
|
242
|
-
className: "jobot-forms__formDateSelect ".concat(styles.formDateSelect),
|
|
243
241
|
ref: this.selectContainer
|
|
242
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
|
+
id: name,
|
|
244
|
+
className: "jobot-forms__formDateSelect ".concat(styles.formDateSelect)
|
|
244
245
|
}, showDay && /*#__PURE__*/_react["default"].createElement(_reactTextMask["default"], {
|
|
245
246
|
id: "".concat(name, "-day"),
|
|
246
247
|
className: styles.formInput,
|
|
@@ -277,7 +278,7 @@ var DateSelect = /*#__PURE__*/function (_Component) {
|
|
|
277
278
|
placeholder: t('placeholders.datePicker.year'),
|
|
278
279
|
keepCharPositions: false,
|
|
279
280
|
guide: true
|
|
280
|
-
}));
|
|
281
|
+
})));
|
|
281
282
|
}
|
|
282
283
|
}]);
|
|
283
284
|
return DateSelect;
|
|
@@ -90,16 +90,11 @@ var Money = /*#__PURE__*/function (_Component) {
|
|
|
90
90
|
|
|
91
91
|
var _super = _createSuper(Money);
|
|
92
92
|
|
|
93
|
-
function Money() {
|
|
93
|
+
function Money(props) {
|
|
94
94
|
var _this;
|
|
95
95
|
|
|
96
96
|
(0, _classCallCheck2["default"])(this, Money);
|
|
97
|
-
|
|
98
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
99
|
-
args[_key] = arguments[_key];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
97
|
+
_this = _super.call(this, props);
|
|
103
98
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getOptions", function () {
|
|
104
99
|
var _this$props = _this.props,
|
|
105
100
|
settings = _this$props.settings,
|
|
@@ -151,6 +146,7 @@ var Money = /*#__PURE__*/function (_Component) {
|
|
|
151
146
|
onChange(value);
|
|
152
147
|
};
|
|
153
148
|
});
|
|
149
|
+
_this.selectContainer = /*#__PURE__*/_react["default"].createRef();
|
|
154
150
|
return _this;
|
|
155
151
|
}
|
|
156
152
|
|
|
@@ -197,7 +193,8 @@ var Money = /*#__PURE__*/function (_Component) {
|
|
|
197
193
|
placeholder: null
|
|
198
194
|
});
|
|
199
195
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
200
|
-
className: styles.currencyField
|
|
196
|
+
className: styles.currencyField,
|
|
197
|
+
ref: this.selectContainer
|
|
201
198
|
}, /*#__PURE__*/_react["default"].createElement(_reactFinalForm.Field, {
|
|
202
199
|
key: "".concat(name, "-").concat(singleCurrency),
|
|
203
200
|
name: "".concat(name, ".currency"),
|
|
@@ -215,7 +212,10 @@ var Money = /*#__PURE__*/function (_Component) {
|
|
|
215
212
|
onChange: _this2.onChangeCurrency(onChange),
|
|
216
213
|
notFoundContent: t('noOptionsMessage'),
|
|
217
214
|
placeholder: t('placeholders.salaryCurrency'),
|
|
218
|
-
prefixCls: "jobot-forms-rc-select"
|
|
215
|
+
prefixCls: "jobot-forms-rc-select",
|
|
216
|
+
getPopupContainer: function getPopupContainer() {
|
|
217
|
+
return _this2.selectContainer.current;
|
|
218
|
+
}
|
|
219
219
|
});
|
|
220
220
|
})));
|
|
221
221
|
}
|
package/lib/utils/validation.js
CHANGED
package/package.json
CHANGED
|
@@ -144,48 +144,50 @@ class DateSelect extends Component {
|
|
|
144
144
|
const { day, month, year } = this.state;
|
|
145
145
|
const options = t('MONTHS', { returnObjects: true });
|
|
146
146
|
|
|
147
|
-
return <div
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
147
|
+
return <div ref={this.selectContainer}>
|
|
148
|
+
<div id={name} className={`jobot-forms__formDateSelect ${styles.formDateSelect}`}>
|
|
149
|
+
{ showDay &&
|
|
150
|
+
<Masked
|
|
151
|
+
id={`${name}-day`}
|
|
152
|
+
className={styles.formInput}
|
|
153
|
+
value={day}
|
|
154
|
+
onChange={this.onChangeDay}
|
|
155
|
+
onBlur={this.onBlurDay}
|
|
156
|
+
mask={DAY_MASK}
|
|
157
|
+
placeholderChar={'\u2000'}
|
|
158
|
+
placeholder={t('placeholders.datePicker.day')}
|
|
159
|
+
keepCharPositions={false}
|
|
160
|
+
disabled={disabled}
|
|
161
|
+
guide />
|
|
162
|
+
}
|
|
163
|
+
{ showMonth &&
|
|
164
|
+
<Select
|
|
165
|
+
id={`${name}-month`}
|
|
166
|
+
disabled={disabled}
|
|
167
|
+
value={month || undefined}
|
|
168
|
+
onChange={this.onChangeMonth}
|
|
169
|
+
options={options}
|
|
170
|
+
placeholder={t('placeholders.datePicker.month')}
|
|
171
|
+
prefixCls='jobot-forms-rc-select'
|
|
172
|
+
className='jobot-forms-month-select'
|
|
173
|
+
getPopupContainer={() => this.selectContainer.current}
|
|
174
|
+
/>
|
|
175
|
+
}
|
|
176
|
+
{ showYear &&
|
|
177
|
+
<Masked
|
|
178
|
+
id={`${name}-year`}
|
|
179
|
+
disabled={disabled}
|
|
180
|
+
className={styles.formInput}
|
|
181
|
+
value={year}
|
|
182
|
+
onChange={this.onChangeYear}
|
|
183
|
+
onBlur={this.onBlurYear}
|
|
184
|
+
mask={YEAR_MASK}
|
|
185
|
+
placeholderChar={'\u2000'}
|
|
186
|
+
placeholder={t('placeholders.datePicker.year')}
|
|
187
|
+
keepCharPositions={false}
|
|
188
|
+
guide />
|
|
189
|
+
}
|
|
190
|
+
</div>
|
|
189
191
|
</div>;
|
|
190
192
|
}
|
|
191
193
|
}
|
|
@@ -16,6 +16,12 @@ const customStyle = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
class Money extends Component {
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
|
|
22
|
+
this.selectContainer = React.createRef();
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
componentDidMount() {
|
|
20
26
|
const { getDictionary } = this.props;
|
|
21
27
|
const urlParams = `?pagination=${encodeURI('{"offset": 0,"limit": 0 }')}`;
|
|
@@ -90,7 +96,7 @@ class Money extends Component {
|
|
|
90
96
|
)}
|
|
91
97
|
</Field>
|
|
92
98
|
</div>
|
|
93
|
-
<div className={styles.currencyField}>
|
|
99
|
+
<div className={styles.currencyField} ref={this.selectContainer}>
|
|
94
100
|
<Field
|
|
95
101
|
key={`${name}-${singleCurrency}`}
|
|
96
102
|
name={`${name}.currency`}
|
|
@@ -107,6 +113,7 @@ class Money extends Component {
|
|
|
107
113
|
notFoundContent={t('noOptionsMessage')}
|
|
108
114
|
placeholder={t('placeholders.salaryCurrency')}
|
|
109
115
|
prefixCls='jobot-forms-rc-select'
|
|
116
|
+
getPopupContainer={() => this.selectContainer.current}
|
|
110
117
|
/>
|
|
111
118
|
)}
|
|
112
119
|
</Field>
|