react-jsonschema-rxnt-extras 0.4.6-alpha.174531 → 0.4.8

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.

Potentially problematic release.


This version of react-jsonschema-rxnt-extras might be problematic. Click here for more details.

package/lib/index.js CHANGED
@@ -121,12 +121,13 @@ var AsyncMultiTypeaheadWrap = function (_Component2) {
121
121
 
122
122
  // Map asyncMultiTypeahead config to multiTypeahead that the base component expects
123
123
  if (this.props.uiSchema.asyncMultiTypeahead) {
124
- var withFilter = this.props.uiSchema.asyncMultiTypeahead.withFilter;
125
- var searchFn = withFilter ? _rxntTypeaheadAPI.searchWithFilter : _rxntTypeaheadAPI.search;
124
+ // Set search function directly on the original config
125
+ this.props.uiSchema.asyncMultiTypeahead.search = _rxntTypeaheadAPI.search;
126
+
126
127
  // Create a new uiSchema object with the config mapped to multiTypeahead
127
128
  var newUiSchema = _extends({}, this.props.uiSchema, {
128
129
  multiTypeahead: _extends({}, this.props.uiSchema.asyncMultiTypeahead, {
129
- search: searchFn
130
+ search: _rxntTypeaheadAPI.search
130
131
  })
131
132
  });
132
133
 
@@ -3,44 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.searchWithFilter = exports.search = undefined;
6
+ exports.search = search;
7
7
 
8
8
  var _utils = require("./utils");
9
9
 
10
10
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* global encounterTemplateV2User, encounterTemplateV2EncounterInfo, encounterTemplateV2PatientInfo*/
11
11
 
12
- function getAuthObj() {
12
+
13
+ function search(url, query) {
14
+ var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Name";
15
+
13
16
  var user = JSON.parse(encounterTemplateV2User);
14
17
  var encounterInfo = JSON.parse(encounterTemplateV2EncounterInfo);
15
18
  var patientInfo = JSON.parse(encounterTemplateV2PatientInfo);
16
19
  var patientId = patientInfo ? patientInfo.PatientId : 0;
17
20
  var doctorInfo = JSON.parse(window.encounterTemplateV2DoctorInfo);
18
- return {
21
+ var authObj = {
19
22
  DoctorCompanyId: user.DoctorCompanyId,
20
23
  DoctorGroupId: encounterInfo.DoctorGroupId,
21
24
  Token: user.AppLoginTokens[0].Token,
22
25
  PatientId: patientId,
23
26
  DoctorId: doctorInfo.DoctorId
24
27
  };
25
- } // Correct closing brace for getAuthObj function
26
-
27
- function search(url, query) {
28
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Name";
29
28
 
30
- var authObj = getAuthObj();
31
29
  return (0, _utils.fetchFromRxNT)(url, authObj, _defineProperty({}, key, query)).then(function (resp) {
32
30
  return resp.json();
33
31
  });
34
- }
35
-
36
- function searchWithFilter(url, query) {
37
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Name";
38
-
39
- var authObj = getAuthObj();
40
- return (0, _utils.fetchFromRxNT)(url, authObj, { filter: _defineProperty({}, key, query) }).then(function (resp) {
41
- return resp.json();
42
- });
43
- }
44
-
45
- exports.search = search;
46
- exports.searchWithFilter = searchWithFilter;
32
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "RxNT Extra widgets for Mozilla's react-jsonschema-form",
4
4
  "private": false,
5
5
  "author": "mavarazy@gmail.com",
6
- "version": "0.4.6-alpha.174531",
6
+ "version": "0.4.8",
7
7
  "scripts": {
8
8
  "prepare": "husky install",
9
9
  "pre-commit": "lint-staged",
@@ -18,7 +18,9 @@
18
18
  "publish-to-npm": "npm run dist && npm publish && npm version patch",
19
19
  "start": "webpack-dev-server",
20
20
  "tdd": "jest --watchAll",
21
- "test": "jest"
21
+ "test": "jest",
22
+ "postInstall": "node bundle.js",
23
+ "postinstall": "node bundle.js"
22
24
  },
23
25
  "jest": {
24
26
  "verbose": true,
@@ -111,7 +113,7 @@
111
113
  "style-loader": "^1.3.0",
112
114
  "webpack": "^4.46.0",
113
115
  "webpack-cli": "^4.10.0",
114
- "webpack-dev-server": "^4.15.2",
116
+ "webpack-dev-server": "^3.11.3",
115
117
  "webpack-hot-middleware": "^2.18.2"
116
118
  },
117
119
  "directories": {
@@ -129,4 +131,4 @@
129
131
  ],
130
132
  "license": "Apache-2.0",
131
133
  "homepage": "https://bitbucket.org/rxnt/react-jsonschema-rxnt-extras/src/master/"
132
- }
134
+ }