@osimatic/helpers-js 1.1.27 → 1.1.29

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/CHANGELOG CHANGED
@@ -63,3 +63,6 @@ UrlAndQueryString.getPath() -> UrlAndQueryString.getHostAndPath()
63
63
 
64
64
  1.1.27
65
65
  var serviceCountry = 'XX' -> TelephoneNumber.setLocalCountryCode('XX')
66
+
67
+ 1.1.28
68
+ ImportFromCsv.initModal() -> ImportFromCsv.initForm()
@@ -1,12 +1,12 @@
1
1
 
2
2
  class ImportFromCsv {
3
3
 
4
- static initModal(modal, importColumns, requestImportData, specificDescDiv, additionalFormField) {
5
- modal.find('.modal-body').empty().append($('.import_form_base').clone().removeClass('import_form_base hide'));
4
+ static initForm(div, importColumns, requestImportData, specificDescDiv, additionalFormField) {
5
+ div.empty().append($('.import_form_base').clone().removeClass('import_form_base hide'));
6
6
 
7
- let formUpload = modal.find('.form_upload');
8
- let formMatching = modal.find('.form_matching');
9
- let divResult = modal.find('.csv_result');
7
+ let formUpload = div.find('.form_upload');
8
+ let formMatching = div.find('.form_matching');
9
+ let divResult = div.find('.csv_result');
10
10
 
11
11
  function resetUi() {
12
12
  formMatching.addClass('hide');
@@ -15,11 +15,11 @@ class ImportFromCsv {
15
15
  }
16
16
 
17
17
  if (typeof specificDescDiv != 'undefined' && specificDescDiv != null) {
18
- modal.find('.specific_desc').append(specificDescDiv);
18
+ div.find('.specific_desc').append(specificDescDiv);
19
19
  }
20
20
 
21
21
  if (typeof additionalFormField != 'undefined' && additionalFormField != null) {
22
- modal.find('.import_matching_select_content').after(additionalFormField);
22
+ div.find('.import_matching_select_content').after(additionalFormField);
23
23
  }
24
24
 
25
25
  formUpload.find('button[type="submit"]').click(function(event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/revolut.js ADDED
@@ -0,0 +1,23 @@
1
+ const RevolutCheckout = require('@revolut/checkout');
2
+
3
+ class Revolut {
4
+ constructor() {
5
+ this.mode = 'prod';
6
+ }
7
+
8
+ static setMode(mode) {
9
+ this.mode = mode;
10
+ }
11
+
12
+ static displayPaymentPopup(orderId, onSuccess, onError, onCancel) {
13
+ RevolutCheckout.default(orderId, this.mode).then((instance) => {
14
+ instance.payWithPopup({
15
+ onSuccess,
16
+ onError,
17
+ onCancel
18
+ });
19
+ });
20
+ }
21
+ }
22
+
23
+ module.exports = { Revolut };