vineanova-redux-artifacts 1.119.394 → 1.119.395
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/actions/commonActions.js +39 -0
- package/dist/hooks/index.js +11 -0
- package/dist/hooks/useFetchidentitySearchRelationships.js +49 -0
- package/dist/reducers/index.js +1 -0
- package/dist/sagas/vineaNovaApi.sagas.js +848 -804
- package/dist/selectors/identitySearchRelationshipsSelector.js +57 -0
- package/dist/selectors/index.js +11 -0
- package/dist/services/apiServices.js +795 -760
- package/package.json +1 -1
- package/src/actions/commonActions.js +9 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/useFetchidentitySearchRelationships.js +53 -0
- package/src/reducers/index.js +1 -0
- package/src/sagas/vineaNovaApi.sagas.js +32 -0
- package/src/selectors/identitySearchRelationshipsSelector.js +62 -0
- package/src/selectors/index.js +1 -0
- package/src/services/apiServices.js +23 -0
|
@@ -10278,6 +10278,45 @@ var ducksActions = (0, _reduxActions.createActions)({
|
|
|
10278
10278
|
}]
|
|
10279
10279
|
}
|
|
10280
10280
|
},
|
|
10281
|
+
identitySearchRelationships: {
|
|
10282
|
+
get: {
|
|
10283
|
+
REQUEST: [function (payload) {
|
|
10284
|
+
return payload;
|
|
10285
|
+
}, function () {
|
|
10286
|
+
return {
|
|
10287
|
+
reducerName: 'identitySearchRelationships'
|
|
10288
|
+
};
|
|
10289
|
+
}],
|
|
10290
|
+
RECEIVE: [function (payload) {
|
|
10291
|
+
return payload;
|
|
10292
|
+
}, function () {
|
|
10293
|
+
return {
|
|
10294
|
+
reducerName: 'identitySearchRelationships'
|
|
10295
|
+
};
|
|
10296
|
+
}],
|
|
10297
|
+
ERROR: [function (payload) {
|
|
10298
|
+
return payload;
|
|
10299
|
+
}, function () {
|
|
10300
|
+
return {
|
|
10301
|
+
reducerName: 'identitySearchRelationships'
|
|
10302
|
+
};
|
|
10303
|
+
}],
|
|
10304
|
+
CLEARDATA: [function (payload) {
|
|
10305
|
+
return payload;
|
|
10306
|
+
}, function () {
|
|
10307
|
+
return {
|
|
10308
|
+
reducerName: 'identitySearchRelationships'
|
|
10309
|
+
};
|
|
10310
|
+
}],
|
|
10311
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10312
|
+
return payload;
|
|
10313
|
+
}, function () {
|
|
10314
|
+
return {
|
|
10315
|
+
reducerName: 'identitySearchRelationships'
|
|
10316
|
+
};
|
|
10317
|
+
}]
|
|
10318
|
+
}
|
|
10319
|
+
},
|
|
10281
10320
|
v2SearchIdentity: {
|
|
10282
10321
|
post: {
|
|
10283
10322
|
REQUEST: [function (payload) {
|
package/dist/hooks/index.js
CHANGED
|
@@ -1543,6 +1543,17 @@ Object.keys(_useFetchidentitySearchDuplicate).forEach(function (key) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
});
|
|
1545
1545
|
});
|
|
1546
|
+
var _useFetchidentitySearchRelationships = require("./useFetchidentitySearchRelationships");
|
|
1547
|
+
Object.keys(_useFetchidentitySearchRelationships).forEach(function (key) {
|
|
1548
|
+
if (key === "default" || key === "__esModule") return;
|
|
1549
|
+
if (key in exports && exports[key] === _useFetchidentitySearchRelationships[key]) return;
|
|
1550
|
+
Object.defineProperty(exports, key, {
|
|
1551
|
+
enumerable: true,
|
|
1552
|
+
get: function get() {
|
|
1553
|
+
return _useFetchidentitySearchRelationships[key];
|
|
1554
|
+
}
|
|
1555
|
+
});
|
|
1556
|
+
});
|
|
1546
1557
|
var _useFetchv2SearchIdentity = require("./useFetchv2SearchIdentity");
|
|
1547
1558
|
Object.keys(_useFetchv2SearchIdentity).forEach(function (key) {
|
|
1548
1559
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFetchIdentitySearchRelationships = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
10
|
+
var _actions = require("../actions");
|
|
11
|
+
var VineaNovaSelectors = _interopRequireWildcard(require("../selectors"));
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
var useFetchIdentitySearchRelationships = exports.useFetchIdentitySearchRelationships = function useFetchIdentitySearchRelationships(props) {
|
|
21
|
+
// selectors
|
|
22
|
+
var data = (0, _reactRedux.useSelector)(VineaNovaSelectors.getIdentitySearchRelationshipsEntityData);
|
|
23
|
+
var entity = (0, _reactRedux.useSelector)(VineaNovaSelectors.getIdentitySearchRelationshipsEntityMeta);
|
|
24
|
+
var dispatchAPI = (0, _reactRedux.useDispatch)();
|
|
25
|
+
var _props$queryParams = props.queryParams,
|
|
26
|
+
queryParams = _props$queryParams === void 0 ? {} : _props$queryParams;
|
|
27
|
+
|
|
28
|
+
// Determine if we need to fetch: not loaded, has error, or empty data
|
|
29
|
+
var shouldFetch = !(entity !== null && entity !== void 0 && entity.isLoaded) || (entity === null || entity === void 0 ? void 0 : entity.hasError) || (0, _isEmpty["default"])(entity.data);
|
|
30
|
+
(0, _react.useEffect)(function () {
|
|
31
|
+
if (shouldFetch) {
|
|
32
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.identitySearchRelationships.get.request({
|
|
33
|
+
queryParams: _objectSpread({}, queryParams)
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}, [shouldFetch, JSON.stringify(queryParams)]);
|
|
37
|
+
var useQuery = function useQuery(queryParams) {
|
|
38
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.identitySearchRelationships.get.request({
|
|
39
|
+
queryParams: _objectSpread({}, queryParams)
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
data: data,
|
|
44
|
+
useQuery: useQuery,
|
|
45
|
+
isLoading: entity === null || entity === void 0 ? void 0 : entity.isLoading,
|
|
46
|
+
hasError: entity === null || entity === void 0 ? void 0 : entity.hasError,
|
|
47
|
+
error: entity === null || entity === void 0 ? void 0 : entity.error
|
|
48
|
+
};
|
|
49
|
+
};
|
package/dist/reducers/index.js
CHANGED
|
@@ -149,6 +149,7 @@ var rootReducer = {
|
|
|
149
149
|
searchSupplyContracts: (0, _createNamedReducer["default"])('searchSupplyContracts'),
|
|
150
150
|
searchJobs: (0, _createNamedReducer["default"])('searchJobs'),
|
|
151
151
|
identitySearchDuplicate: (0, _createNamedReducer["default"])('identitySearchDuplicate'),
|
|
152
|
+
identitySearchRelationships: (0, _createNamedReducer["default"])('identitySearchRelationships'),
|
|
152
153
|
v2SearchIdentity: (0, _createNamedReducer["default"])('v2SearchIdentity'),
|
|
153
154
|
searchTrackingVineyards: (0, _createNamedReducer["default"])('searchTrackingVineyards'),
|
|
154
155
|
searchTrackingBlockVintages: (0, _createNamedReducer["default"])('searchTrackingBlockVintages'),
|