@experium/findy-form 1.2.59 → 1.3.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/.gitlab-ci.yml ADDED
@@ -0,0 +1,54 @@
1
+ variables:
2
+ DOCKER_TLS_CERTDIR: "/certs"
3
+ NODE_OPTIONS: '--max_old_space_size=4072'
4
+
5
+ image: node:14.15-stretch
6
+
7
+ cache: &global_cache
8
+ key:
9
+ files:
10
+ - yarn.lock
11
+ paths:
12
+ - node_modules/
13
+ - .yarn
14
+ policy: pull
15
+
16
+ stages:
17
+ - install
18
+ - build
19
+ - publish
20
+
21
+ install:
22
+ tags:
23
+ - runner2
24
+ stage: install
25
+ script:
26
+ - yarn install --frozen-lockfile
27
+ cache:
28
+ <<: *global_cache
29
+ policy: pull-push
30
+
31
+ build:
32
+ tags:
33
+ - runner2
34
+ stage: build
35
+ script:
36
+ - yarn package
37
+ artifacts:
38
+ paths:
39
+ - lib/
40
+
41
+ publish:
42
+ tags:
43
+ - runner2
44
+ stage: publish
45
+ before_script:
46
+ - git config user.email "webdev@experium.ru"
47
+ - git config user.name "Experium"
48
+ - npm set //registry.npmjs.org/:_authToken $NPM_API_TOKEN
49
+ script:
50
+ - npm version 1.3.$CI_PIPELINE_IID && npm publish
51
+ dependencies:
52
+ - build
53
+ only:
54
+ - master
@@ -49,8 +49,6 @@ var _i18n = require("../../utils/i18n");
49
49
 
50
50
  var _withFieldWrapper = _interopRequireDefault(require("../hocs/withFieldWrapper"));
51
51
 
52
- var _Select = require("./Select");
53
-
54
52
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
55
53
 
56
54
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -434,7 +432,6 @@ var Select = /*#__PURE__*/function (_Component) {
434
432
  onChange: this.onChange,
435
433
  mode: multiple ? 'multiple' : 'single',
436
434
  showSearch: options.length > 10,
437
- filterSort: _Select.sorterByLabel,
438
435
  optionFilterProp: "label",
439
436
  notFoundContent: t('noOptionsMessage'),
440
437
  placeholder: placeholder,
@@ -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
  }
@@ -247,7 +247,6 @@ var Select = /*#__PURE__*/function (_Component) {
247
247
  value: (this.allowUserValue() && this.state.other ? this.getUserValueQuestion().value : value) || undefined,
248
248
  onChange: this.onChange,
249
249
  showSearch: options.length > 10,
250
- filterSort: sorterByLabel,
251
250
  optionFilterProp: "label",
252
251
  placeholder: placeholder,
253
252
  notFoundContent: t('noOptionsMessage'),
@@ -140,7 +140,7 @@ var rules = {
140
140
  return true;
141
141
  }
142
142
 
143
- return value.length > minLength;
143
+ return value.length >= minLength;
144
144
  }
145
145
  });
146
146
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experium/findy-form",
3
- "version": "1.2.59",
3
+ "version": "1.3.1",
4
4
  "main": "./lib/index.js",
5
5
  "homepage": "https://experium.github.io/findy-form",
6
6
  "repository": "https://github.com/experium/findy-form",
@@ -10,7 +10,6 @@ import styles from '../../styles/index.module.css';
10
10
  import { CompanyDictionaryContext } from '../../context/CompanyDictionary';
11
11
  import { translateOptionLabel } from '../../utils/i18n';
12
12
  import withFieldWrapper from '../hocs/withFieldWrapper';
13
- import { sorterByLabel } from './Select';
14
13
 
15
14
  class Select extends Component {
16
15
  constructor(props) {
@@ -273,7 +272,6 @@ class Select extends Component {
273
272
  onChange={this.onChange}
274
273
  mode={multiple ? 'multiple' : 'single'}
275
274
  showSearch={options.length > 10}
276
- filterSort={sorterByLabel}
277
275
  optionFilterProp='label'
278
276
  notFoundContent={t('noOptionsMessage')}
279
277
  placeholder={placeholder}
@@ -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>
@@ -157,7 +157,6 @@ class Select extends Component {
157
157
  value={(this.allowUserValue() && this.state.other ? this.getUserValueQuestion().value : value) || undefined}
158
158
  onChange={this.onChange}
159
159
  showSearch={options.length > 10}
160
- filterSort={sorterByLabel}
161
160
  optionFilterProp='label'
162
161
  placeholder={placeholder}
163
162
  notFoundContent={t('noOptionsMessage')}
@@ -103,7 +103,7 @@ const rules = {
103
103
  return true;
104
104
  }
105
105
 
106
- return value.length > minLength;
106
+ return value.length >= minLength;
107
107
  }
108
108
  }),
109
109
  phone: field => yup.string().nullable().test({
package/dist/404.html DELETED
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>App</title>
6
- <script type="text/javascript">
7
- var segmentCount = 1;
8
-
9
- var l = window.location;
10
- l.replace(
11
- l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
12
- l.pathname.split('/').slice(0, 1 + segmentCount).join('/') + '/?p=/' +
13
- l.pathname.slice(1).split('/').slice(segmentCount).join('/').replace(/&/g, '~and~') +
14
- (l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
15
- l.hash
16
- );
17
-
18
- </script>
19
- </head>
20
- <body>
21
- </body>
22
- </html>