cluedin-widget
Version:
91 lines (73 loc) • 4.6 kB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
/***/ 2310:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
;
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var uxi_Widget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(40);
/* harmony import */ var uxi_Widget__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(uxi_Widget__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _containers_lists_ConfigurationListContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(412);
/* harmony import */ var _containers_quickViews_ConfigurationQuickViewContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(860);
/* harmony import */ var _integration_components_composites_IntegrationNameWithLogo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(116);
/* harmony import */ var _user_components_containers_lists_UserListContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(226);
/* harmony import */ var _core_components_Hocs_withAccessMany__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(858);
/* harmony import */ var _Hocs_withAllConfigurations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(409);
var convertFromViewModel = function convertFromViewModel() {
var configurations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var configureGrouped = lodash_groupBy__WEBPACK_IMPORTED_MODULE_1___default()(configurations, function (c) {
return c.ProviderId;
});
return Object.keys(configureGrouped || []).map(function (providerId) {
return {
id: providerId,
title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_integration_components_composites_IntegrationNameWithLogo__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
integration: configureGrouped[providerId][0]
}),
children: (configureGrouped[providerId] || []).map(function (config) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
style: {
padding: '4px 12px',
flex: 1
}
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], {
id: "module-configuration-accountName",
defaultMessage: "Account Name: "
}), config.AccountDisplay || config.Id);
})
};
});
};
var ConfigurationListWithAccessMany = Object(_core_components_Hocs_withAccessMany__WEBPACK_IMPORTED_MODULE_8__[/* withAccessMany */ "a"])({
from: {
entityType: 'configuration',
List: _containers_lists_ConfigurationListContainer__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"],
selectionLoader: _Hocs_withAllConfigurations__WEBPACK_IMPORTED_MODULE_9__[/* withAllConfigurations */ "a"],
toSelectionViewModel: convertFromViewModel
},
to: {
entityType: 'user',
List: _user_components_containers_lists_UserListContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]
}
}, function (fromSelected, toSelected) {
return {
configurationsIds: fromSelected,
userIds: toSelected
};
});
var AllConfigurationPage = function AllConfigurationPage() {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_containers_quickViews_ConfigurationQuickViewContainer__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(uxi_Widget__WEBPACK_IMPORTED_MODULE_3__["Widget"], {
style: {
background: '#fff'
},
title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], {
id: "module-configuration-allConfigurationTitle"
})
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ConfigurationListWithAccessMany, null)));
};
/* harmony default export */ __webpack_exports__["default"] = (AllConfigurationPage);
/***/ })
}]);