@experium/findy-form 1.2.57 → 1.2.60

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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experium/findy-form",
3
- "version": "1.2.57",
3
+ "version": "1.2.60",
4
4
  "main": "./lib/index.js",
5
5
  "homepage": "https://experium.github.io/findy-form",
6
6
  "repository": "https://github.com/experium/findy-form",
@@ -22,7 +22,7 @@
22
22
  "qs": "^6.9.4",
23
23
  "ramda": "^0.27.1",
24
24
  "rc-checkbox": "^2.3.2",
25
- "rc-select": "^12.1.6",
25
+ "rc-select": "^14.0.5",
26
26
  "rc-tree-select": "^4.1.2",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2",
@@ -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 id={name} className={`jobot-forms__formDateSelect ${styles.formDateSelect}`} ref={this.selectContainer}>
148
- { showDay &&
149
- <Masked
150
- id={`${name}-day`}
151
- className={styles.formInput}
152
- value={day}
153
- onChange={this.onChangeDay}
154
- onBlur={this.onBlurDay}
155
- mask={DAY_MASK}
156
- placeholderChar={'\u2000'}
157
- placeholder={t('placeholders.datePicker.day')}
158
- keepCharPositions={false}
159
- disabled={disabled}
160
- guide />
161
- }
162
- { showMonth &&
163
- <Select
164
- id={`${name}-month`}
165
- disabled={disabled}
166
- value={month || undefined}
167
- onChange={this.onChangeMonth}
168
- options={options}
169
- placeholder={t('placeholders.datePicker.month')}
170
- prefixCls='jobot-forms-rc-select'
171
- className='jobot-forms-month-select'
172
- getPopupContainer={() => this.selectContainer.current}
173
- />
174
- }
175
- { showYear &&
176
- <Masked
177
- id={`${name}-year`}
178
- disabled={disabled}
179
- className={styles.formInput}
180
- value={year}
181
- onChange={this.onChangeYear}
182
- onBlur={this.onBlurYear}
183
- mask={YEAR_MASK}
184
- placeholderChar={'\u2000'}
185
- placeholder={t('placeholders.datePicker.year')}
186
- keepCharPositions={false}
187
- guide />
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>