dataSecurity.js 35 KB

12345678
  1. /*!
  2. * Licensed Materials - Property of IBM
  3. * IBM Cognos Products: Modeling UI
  4. * (C) Copyright IBM Corp. 2020
  5. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. */
  7. (window.caModellingPerspective=window.caModellingPerspective||[]).push([[17],{1006:function(e,t,r){"use strict";r.d(t,"h",function(){return a}),r.d(t,"e",function(){return n}),r.d(t,"c",function(){return i}),r.d(t,"g",function(){return o}),r.d(t,"b",function(){return c}),r.d(t,"f",function(){return s}),r.d(t,"a",function(){return l}),r.d(t,"d",function(){return u});var a="traverse",n="namespace",i="group",o="role",c="folder",s="namespaceFolder",l="account",u="loading"},1202:function(e,t,r){"use strict";r.d(t,"a",function(){return b});var a,n,i,o=r(1203),c=r.n(o),s=r(1),l=r.n(s),u=r(16),p=r(3),d=r(271),m=r(2),f=r(868);function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}var b=Object(u.observer)((i=n=function(e){function t(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.item,r=e.isSelectable,a=e.className,n=e.children,i=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,["item","isSelectable","className","children"]),o=r(t);return l.a.createElement(p.ListItem,y({className:a},i,{key:Object(f.d)(t)}),l.a.createElement(p.FlexItem,{grow:!0,gutter:[0,1]},l.a.createElement(p.Tooltip,{title:Object(f.a)(t)||Object(m.getString)("unknown"),orient:"right"},l.a.createElement(d.a,{label:Object(f.c)(t),iconId:t.data&&Object(f.b)(t.data.type)}))),o&&l.a.createElement(p.FlexItem,null,n))},t}(s.Component),n.ItemCheckbox=function(e){var t=c()(e,"checked","onChange");return l.a.createElement(p.Checkbox,t)},n.ItemButton=function(e){var t=c()(e,"icon","onClick","className","variant");return l.a.createElement(p.Button,t)},n.defaultProps={isSelectable:function(){return!0}},a=i))||a},1203:function(e,t,r){var a=r(1397),n=r(518)(function(e,t){return null==e?{}:a(e,t)});e.exports=n},1388:function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return y});var a,n=r(1),i=r.n(n),o=r(16),c=r(3),s=r(25),l=r(2),u=r(10),p=r(5),d=r(44),m=r(1389),f=r(1403);var y=Object(d.a)(u.g,{initializer:function(e,t){return new f.a({context:e},t.querySubject,t.securityFilter,t.module)}})(a=Object(p.e)(function(e){return{dataSecurityStore:e,saveSecurityFilter:e.saveSecurityFilter,getNamespaces:e.getNamespaces,getNamespacesBasedOnCmPath:e.getNamespacesBasedOnCmPath}})(a=Object(o.observer)(a=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._focusRef=function(e){e&&e.focus&&e.focus()},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props,t=e.getNamespaces;(0,e.getNamespacesBasedOnCmPath)(e.dataSecurityStore.securityObject.cmSearchPath||[]),t()},r.render=function(){var e=this.props,t=e.onClose,r=e.saveSecurityFilter,a=e.dataSecurityStore,n=e.dataSecurityStore,o=n.title,u=n.isValid;return i.a.createElement(c.Dialog,{"data-tid":Object(s.a)("dataSecurityDialog"),width:"800px",onClose:function(){return t()}},i.a.createElement(c.Dialog.Header,{"data-tid":Object(s.a)("dataSecurityDialog","header")},o),i.a.createElement(c.Dialog.Body,null,i.a.createElement(m.a,null)),i.a.createElement(c.Dialog.Footer,null,i.a.createElement(c.Dialog.Button,{primary:!0,"data-tid":Object(s.a)("dataSecurityDialog","ok"),label:Object(l.getString)("ok"),disabled:!u,onClick:function(){r(a),t(!0)}}),i.a.createElement(c.Dialog.Button,{"data-tid":Object(s.a)("dataSecurityDialog","cancel"),label:Object(l.getString)("cancel"),onClick:function(){return t()}})))},t}(n.Component))||a)||a)||a},1389:function(e,t,r){"use strict";r.d(t,"a",function(){return N});var a,n=r(215),i=r.n(n),o=r(771),c=r.n(o),s=r(54),l=r.n(s),u=r(16),p=r(1),d=r.n(p),m=r(3),f=r(158),y=r.n(f),b=r(118),g=r.n(b),h=r(5),v=r(999),_=r(25),O=r(2),S=r(271),j=(r(1390),r(868));r(1394);var N=Object(h.e)(function(e){return{dataSecurityStore:e,openUserGroupDialog:e.openUserGroupDialog}})(a=Object(u.observer)(a=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._inputId=l()("__securityFilter_label_"),t._openUserGroupView=function(){t.props.openUserGroupDialog()},t}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.dataSecurityStore,r=e.dataSecurityStore,a=r.label,n=r.querySubject,o=r.selectedNamespaces,s=i()(o);return d.a.createElement(m.FlexLayout,{className:"ba-mui-security-filter",direction:"column",height:"500px"},d.a.createElement(m.FlexItem,{gutter:[0,0,2,0]},d.a.createElement(m.FlexLayout,{direction:"row",alignItems:"center"},d.a.createElement(m.FlexItem,{gutter:[0,2,0,0]},d.a.createElement(m.Label,{htmlFor:this._inputId,label:Object(O.getString)("definitionName")})),d.a.createElement(m.FlexItem,{grow:!0},d.a.createElement(m.TextInput,{id:this._inputId,fullWidth:!0,value:a,onChange:function(e){return t.label=e}})))),d.a.createElement(m.FlexItem,{grow:!0},d.a.createElement(m.FlexLayout,{className:"overview-panel",direction:"column",height:"100%"},d.a.createElement(m.FlexItem,{height:"100%"},d.a.createElement(m.FlexLayout,{fullHeight:!0,justifyContent:"space-around"},d.a.createElement(m.FlexItem,{height:"100%",className:"user-group",width:"40%",gutter:[1,2]},d.a.createElement(m.FlexLayout,{fullHeight:!0,direction:"column"},d.a.createElement(m.FlexItem,{gutter:[0,0,1,0]},d.a.createElement(m.FlexLayout,{maxHeight:"32px"},d.a.createElement(m.FlexItem,{className:"user-group-header",alignSelf:"center",grow:!0},Object(O.getString)("usersAndGroups")),d.a.createElement(m.FlexItem,null,d.a.createElement(m.Button,{"data-tid":Object(_.a)("dataSecurityView",s?"add":"edit"),"aria-label":s?Object(O.getString)("addUsersAndGroups"):Object(O.getString)("editUsersAndGroups"),variant:"icon",intent:"primary",icon:s?y.a.id:g.a.id,onClick:this._openUserGroupView}))),d.a.createElement(m.Separator,{hMargin:0})),d.a.createElement(m.FlexItem,{grow:!0,overflow:"auto"},c()(o).map(function(e){return d.a.createElement(m.Container,{gutter:[1,0]},d.a.createElement(m.Tooltip,{title:Object(j.a)(e)||Object(O.getString)("unknown"),orient:"right"},d.a.createElement(S.a,{label:Object(j.c)(e),iconId:Object(j.b)(e.data.type)})))})))),d.a.createElement(m.FlexItem,{height:"100%",className:"filter",gutter:[1,2],width:"60%"},d.a.createElement(m.FlexLayout,{fullHeight:!0,direction:"column"},d.a.createElement(m.FlexItem,{gutter:[0,0,1,0]},d.a.createElement(m.FlexLayout,{maxHeight:"32px"},d.a.createElement(m.FlexItem,{className:"filter-header",alignSelf:"center",gutter:[1,0],grow:!0},Object(O.getString)("filters"))),d.a.createElement(m.Separator,{hMargin:0})),d.a.createElement(m.FlexItem,{grow:!0,overflow:"auto"},d.a.createElement(h.b,{store:t.propertiesStore},d.a.createElement(v.a,{moserObjects:[n]}))))))))))},t}(p.Component))||a)||a},1390:function(e,t,r){var a=r(1391);"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0};r(36)(a,n);a.locals&&(e.exports=a.locals)},1391:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".ba-mui-security-filter .overview-panel .filter .filter-header,.ba-mui-security-filter .overview-panel .user-group .user-group-header{font-size:1rem;font-weight:700;color:#343334}.ba-mui-security-filter .overview-panel{border:1px solid #eaeaea}.ba-mui-security-filter .overview-panel .user-group{background-color:#eaeaea}",""])},1392:function(e,t,r){"undefined"!=typeof self&&self,e.exports=function(e){return webpackJsonPBaGraphics([1104],{"3865314c5959606874d4":function(t,r){t.exports=e},"3aa0c6be0ec4a07f48b9":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("3865314c5959606874d4"),n=(r.n(a),r("84111451a5fa20cc406a"));t.default=n.a},"84111451a5fa20cc406a":function(e,t,r){"use strict";var a=r("9689a9c94ae38b47fa2c"),n=r.n(a),i=r("9ce58a7deea14f49ef01"),o=r.n(i),c=new n.a({id:"hat_16_v7",use:"hat_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="hat_16_v7"><path d="M14.5 11H13V8c0-2.8-2.2-5-5-5S3 5.2 3 8v3H1.5c-.3 0-.5.2-.5.5s.2.5.5.5h13c.3 0 .5-.2.5-.5s-.2-.5-.5-.5zM8 4c2.2 0 4 1.8 4 4v1H4V8c0-2.2 1.8-4 4-4zm-4 7v-1h8v1H4z" /></symbol>'});o.a.add(c),t.a=c}},["3aa0c6be0ec4a07f48b9"])}(r(15))},1393:function(e,t,r){"undefined"!=typeof self&&self,e.exports=function(e){return webpackJsonPBaGraphics([104],{"30409a2572f8578a933a":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("3865314c5959606874d4"),n=(r.n(a),r("d18bd6e7038ef7c98457"));t.default=n.a},"3865314c5959606874d4":function(t,r){t.exports=e},d18bd6e7038ef7c98457:function(e,t,r){"use strict";var a=r("9689a9c94ae38b47fa2c"),n=r.n(a),i=r("9ce58a7deea14f49ef01"),o=r.n(i),c=new n.a({id:"user_16_v7",use:"user_16_v7-usage",viewBox:"0 0 16 16",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="user_16_v7"><path d="M8 2c1.4 0 2.5 1.1 2.5 2.5S9.4 7 8 7 5.5 5.9 5.5 4.5 6.6 2 8 2m0-1C6.1 1 4.5 2.6 4.5 4.5S6.1 8 8 8s3.5-1.6 3.5-3.5S9.9 1 8 1zm5 14h-1v-2.5c0-1.4-1.1-2.5-2.5-2.5h-3C5.1 10 4 11.1 4 12.5V15H3v-2.5C3 10.6 4.6 9 6.5 9h3c1.9 0 3.5 1.6 3.5 3.5V15z" /><path style="fill:none" d="M0 0h16v16H0z" /></symbol>'});o.a.add(c),t.a=c}},["30409a2572f8578a933a"])}(r(15))},1394:function(e,t,r){"use strict";var a,n,i,o=r(16),c=r(1),s=r.n(c),l=r(3),u=r(19),p=r(2),d=r(25),m=r(5),f=r(44),y=r(10),b=r(1395);Object(f.a)(y.G)(a=Object(m.e)(function(e){return{isLoadingNamespaces:e.isLoadingNamespaces,isValid:e.isValidUserGroupSelection,title:e.userGroupHeader,getNamespaces:e.getNamespaces,finishUserGroupDialog:e.finishUserGroupDialog,resetSelectedNamespaceBuffer:e.resetSelectedNamespaceBuffer,resetSearchedItems:e.resetSearchedItems}})(a=Object(o.observer)((i=n=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._tid=function(e){return Object(d.a)("UserGroupDialog",e)},t._onSave=function(){var e=t.props,r=e.onClose,a=e.resetSelectedNamespaceBuffer,n=e.resetSearchedItems;(0,e.finishUserGroupDialog)(e.securityFilter),r(),a(),n()},t}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.onClose,r=e.isLoadingNamespaces,a=e.isValid,n=e.title;return s.a.createElement(l.Dialog,{width:"800px",onClose:t,"data-tid":this._tid()},s.a.createElement(l.Dialog.Header,null,s.a.createElement(l.TruncatedText,{value:n,"data-tid":this._tid("title")})),s.a.createElement(l.Dialog.Body,null,s.a.createElement(l.Container,{height:"560px"},r?s.a.createElement(u.ProgressPanelMessage,{variant:"circle",size:"large"}):s.a.createElement(b.a,null))),s.a.createElement(l.Dialog.Footer,null,s.a.createElement(l.Dialog.Button,{primary:!0,label:Object(p.getString)("ok"),onClick:this._onSave,disabled:!a,"data-tid":this._tid("ok")}),s.a.createElement(l.Dialog.Button,{label:Object(p.getString)("cancel"),onClick:t,"data-tid":this._tid("cancel")})))},t}(c.Component),n.defaultProps={data:[]},a=i))||a)||a)},1395:function(e,t,r){"use strict";r.d(t,"a",function(){return s});var a=r(1),n=r.n(a),i=r(3),o=r(1396),c=r(1398),s=(r(1401),function(){return n.a.createElement(i.FlexLayout,{className:"ba-mui-security-filter__user-group",direction:"column",justifyContent:"center",fullHeight:!0},n.a.createElement(i.FlexItem,{height:"100%",gutter:[0,1]},n.a.createElement(i.FlexLayout,{justifyContent:"space-around",fullHeight:!0},n.a.createElement(i.FlexItem,{width:"50%"},n.a.createElement(c.a,null)),n.a.createElement(i.HSpacer,null),n.a.createElement(i.FlexItem,{width:"50%"},n.a.createElement(o.a,null)))))})},1396:function(e,t,r){"use strict";r.d(t,"a",function(){return f});var a,n=r(1),i=r.n(n),o=r(16),c=r(3),s=r(69),l=r.n(s),u=r(5),p=r(2),d=r(1202);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}var f=Object(u.e)(function(e){return{selectedList:e.selectedList,getNamespaceItems:e.getNamespaceItems,setSelectedNamespacesBuffer:e.setSelectedNamespacesBuffer,setSelectedListFilter:e.setSelectedListFilter}})(a=Object(o.observer)(a=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._itemRenderer=function(e,r){var a=t.props,n=a.selectedList,o=a.setSelectedNamespacesBuffer,c=n[e];return i.a.createElement(d.a,m({className:"selected-list-item"},r,{item:c}),i.a.createElement(d.a.ItemButton,{className:"selected-list__remove-btn",icon:l.a.id,variant:"inline",onClick:function(){return o(c,!1)}}))},t}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.setSelectedListFilter,r=e.selectedList;return i.a.createElement(c.FlexLayout,{className:"selected-list-view",direction:"column",fullHeight:!0},i.a.createElement(c.FlexItem,{className:"selected-list__title"},Object(p.getString)("selectedUsersAndGroups")),i.a.createElement(c.FlexLayout,{className:"selected-list__body",direction:"column",fullHeight:!0},i.a.createElement(c.FlexItem,null,i.a.createElement(c.SearchInput,{fullWidth:!0,placeholder:Object(p.getString)("find"),onChange:t})),i.a.createElement(c.FlexItem,{grow:!0},i.a.createElement(c.List,{length:r.length,itemRenderer:this._itemRenderer}))))},t}(n.Component))||a)||a},1397:function(e,t,r){var a=r(1007),n=r(511);e.exports=function(e,t){return a(e,t,function(t,r){return n(e,r)})}},1398:function(e,t,r){"use strict";r.d(t,"a",function(){return g});var a,n=r(1),i=r.n(n),o=r(16),c=r(3),s=r(270),l=r.n(s),u=r(19),p=r(5),d=r(2),m=r(1399),f=r(1400),y=r(1006);var b=function(){return i.a.createElement(c.FlexLayout,{alignItems:"center",direction:"column",fullHeight:!0,justifyContent:"center",className:"selection-tree__empty-msg"},i.a.createElement(c.SVGIcon,{className:"selection-tree__empty-msg-icon",icon:l.a,height:128,width:128}),i.a.createElement(c.FlexItem,{className:"selection-tree__empty-msg-body",textAlign:"center"},Object(d.getString)("noSearchResults")))},g=Object(p.e)(function(e){return{namespaces:e.namespaces,isLoadingNamespaceByFilter:e.isLoadingNamespaceByFilter,isChecked:e.isChecked,searchedNamespaceItems:e.searchedNamespaceItems,isSearchedNamespacesEmpty:e.isSearchedNamespacesEmpty,getNamespaceItems:e.getNamespaceItems,setSelectedNamespacesBuffer:e.setSelectedNamespacesBuffer,setNamespaceSearchTerm:e.setNamespaceSearchTerm,getNamespacesByFilter:e.getNamespacesByFilter}})(a=Object(o.observer)(a=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._isSelectable=function(e){return e.data&&e.data.type!==y.e},t._onExpand=function(e,r,a){var n=r[0];a&&n&&t.props.getNamespaceItems(n)},t}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props,t=e.setSelectedNamespacesBuffer,r=e.isChecked,a=e.searchedNamespaceItems,n=e.isLoadingNamespaceByFilter,o=e.setNamespaceSearchTerm,s=e.getNamespacesByFilter,l=e.namespaces,p=e.isSearchedNamespacesEmpty,y=null;return y=a&&!n?p?i.a.createElement(b,null):i.a.createElement(f.a,{data:a,onSelect:t,isSelected:r,isSelectable:this._isSelectable}):n?i.a.createElement(u.ProgressPanelMessage,{variant:"circle",size:"large"}):i.a.createElement(m.a,{data:l||[],onSelect:t,isSelected:r,onExpand:this._onExpand,isSelectable:this._isSelectable}),i.a.createElement(c.FlexLayout,{className:"selection-tree-view",direction:"column",fullHeight:!0},i.a.createElement(c.FlexItem,{className:"selection-tree__title"},Object(d.getString)("availableUsersAndGroups")),i.a.createElement(c.FlexItem,{grow:!0},i.a.createElement(c.FlexLayout,{className:"selection-tree__body",direction:"column",fullHeight:!0},i.a.createElement(c.FlexItem,null,i.a.createElement(c.FlexLayout,null,i.a.createElement(c.FlexItem,{grow:!0},i.a.createElement(c.SearchInput,{fullWidth:!0,placeholder:Object(d.getString)("find"),onChange:o,onKeyDown:function(e){return 13===e.keyCode&&s()}})))),i.a.createElement(c.FlexItem,{grow:!0},y))))},t}(n.Component))||a)||a},1399:function(e,t,r){"use strict";r.d(t,"a",function(){return b});var a=r(1203),n=r.n(a),i=r(117),o=r.n(i),c=r(1),s=r.n(c),l=r(3),u=r(773),p=r(271),d=r(2),m=r(868),f=r(1006);function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}var b=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this)._getHasChildren=function(e){return e&&e.data&&e.data.hasChildren&&e.data.type!==f.a&&Object(m.e)(e)},t._getId=function(e){return Object(m.d)(e)},t._getChildren=function(e){var t=e.data;if(t&&t.hasChildren&&Object(m.e)(e))return e.children&&e.children.length?e.children:[{isLoadingNode:!0}]},t._isVisible=function(e,t){return!!(t&&t.data&&t.data.defaultName&&-1!==t.data.defaultName.toLowerCase().indexOf(e.trim().toLowerCase()))},t._itemRenderer=function(e,r){var a=n()(t.props,"onSelect","isSelectable","isSelected","isDisabled","isIndeterminate"),i={label:Object(d.getString)("loadingData"),iconId:Object(m.b)(f.d)};return e.data&&(i={label:Object(m.c)(e),iconId:Object(m.b)(e.data.type)}),s.a.createElement(u.a,y({},r,a),s.a.createElement(p.a,i))},t}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t.prototype.render=function(){var e=this.props.data,t=o()(this.props,"onSelect","isSelectable","isSelected","isDisabled","isIndeterminate","data");return s.a.createElement(l.Tree,y({},t,{fullHeight:!0,getId:this._getId,getChildren:this._getChildren,itemRenderer:this._itemRenderer,isVisible:this._isVisible,getHasChildren:this._getHasChildren,data:e&&e.slice()}))},t}(c.Component)},1400:function(e,t,r){"use strict";r.d(t,"a",function(){return m});var a,n,i=r(1),o=r.n(i),c=r(16),s=r(3),l=r(1202);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var d=Object(c.observer)(a=function(e){function t(){return e.apply(this,arguments)||this}return p(t,e),t.prototype.render=function(){var e=this.props,t=e.isSelected,r=e.onSelect,a=e.item,n=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,["isSelected","onSelect","item"]);return o.a.createElement(l.a,u({},n,{item:a}),o.a.createElement(l.a.ItemCheckbox,{checked:t(a),onChange:function(e){return r(a,e)}}))},t}(i.Component))||a,m=Object(c.observer)(n=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];return(t=e.call.apply(e,[this].concat(a))||this)._itemRenderer=function(e,r){var a=t.props,n=a.isSelected,i=a.onSelect,c=a.data;return o.a.createElement(d,u({},r,{isSelected:n,onSelect:i,item:c[e]}))},t}return p(t,e),t.prototype.render=function(){var e=this.props.data;return o.a.createElement(s.List,{length:e.length,itemRenderer:this._itemRenderer})},t}(i.Component))||n},1401:function(e,t,r){var a=r(1402);"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0};r(36)(a,n);a.locals&&(e.exports=a.locals)},1402:function(e,t,r){(e.exports=r(32)(void 0)).push([e.i,".ba-mui-security-filter__user-group .selected-list-view .selected-list__title,.ba-mui-security-filter__user-group .selection-tree-view .selection-tree__title{font-size:1rem;font-weight:700;color:#343334;padding-bottom:8px}.ba-mui-security-filter__user-group .selected-list__body .selected-list-item .selected-list__remove-btn{opacity:0;display:inline-block;transition:opacity 0s}.ba-mui-security-filter__user-group .selected-list__body .selected-list-item.is-focus .selected-list__remove-btn,.ba-mui-security-filter__user-group .selected-list__body .selected-list-item:hover .selected-list__remove-btn{opacity:1}.ba-mui-security-filter__user-group .selection-tree__empty-msg-body{font-size:1rem;line-height:1rem;font-weight:700;padding-bottom:8px}.ba-mui-security-filter__user-group .selected-list__body,.ba-mui-security-filter__user-group .selection-tree__body{border:1px solid #eaeaea}.ba-mui-security-filter__user-group .selection-tree__body .selection-tree__empty-msg-icon{fill:#00baa1}",""])},1403:function(e,t,r){"use strict";r.d(t,"a",function(){return J});var a,n,i,o,c,s,l,u,p,d,m,f,y,b,g,h,v,_=r(141),O=r.n(_),S=r(215),j=r.n(S),N=r(1404),w=r.n(N),E=r(771),F=r.n(E),x=r(0),I=r.n(x),C=r(6),L=r(5),P=r(4),B=r(8),D=r(9),k=r(1009),G=r(2),z=r(1405),H=r(1406),U=r(1407),V=r(1408),T=r(10),q=r(868);function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function M(e,t,r,a){r&&Object.defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(a):void 0})}function R(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function K(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e,t,r,a,n){var i={};return Object.keys(a).forEach(function(e){i[e]=a[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce(function(r,a){return a(e,t,r)||r},i),n&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(n):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}var W=function(e,t){void 0===t&&(t=[]);var r={data:e,children:t};return Object(q.d)(r),r},J=(a=C.observable.ref,n=C.observable.shallow,i=C.observable.ref,o=function(e){function t(t,r,a,n){var i;if(M(i=e.apply(this,arguments)||this,"_querySubject",c,K(i)),M(i,"_securityFilter",s,K(i)),M(i,"_label",l,K(i)),M(i,"isLoadingNamespaces",u,K(i)),M(i,"isLoadingNamespaceItems",p,K(i)),M(i,"isLoadingNamespaceByFilter",d,K(i)),M(i,"isLoadingNamespacesBasedOnCmPath",m,K(i)),M(i,"namespaces",f,K(i)),M(i,"selectedNamespacesBuffer",y,K(i)),M(i,"selectedNamespaces",b,K(i)),M(i,"selectedListFilter",g,K(i)),M(i,"namespaceSearchTerm",h,K(i)),M(i,"searchedNamespaceItems",v,K(i)),i.module=void 0,i._originalQuerySubject=void 0,i._originalSecurityFilter=void 0,i._isCreate=void 0,i.isChecked=function(e){return!!i.selectedNamespacesBuffer[Object(q.d)(e)]},i.module=n,i._originalQuerySubject=r,i._originalSecurityFilter=a,i._isCreate=!(null!=i._originalSecurityFilter),a)i._securityFilter=Object(P.moserClone)(a);else{var o=I.a.createObjectFactory(),_=o.createSecurityFilter(),O=o.createSecurityFilterSecurityObject();_.setSecurityObject(O),i._securityFilter=_}return i.label=i._isCreate?Object(G.getString)("newEmployeeGroup"):i._securityFilter.getLabel(),i._querySubject=Object(P.moserClone)(r),Object(B.removeItems)(i._querySubject.getFilter()),(Object(B.getObjectProperty)(i._securityFilter,D.K)||[]).forEach(function(e){var t=I.a.createObjectFactory().createFilter();t.setIdentifier(e.identifier),t.setExpression(e.expression),t.setLabel(e.label),Object(B.setObjectProperty)(t,D.K,[e]),i._querySubject.addFilter(Object(P.moserObjectMobxWrapper)(t))}),i}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var r=t.prototype;return r.provideContext=function(){var e=this;return{getModule:function(){return e.module}}},r.findNamespace=function(e){for(var t=this.namespaces.slice();t.length;){var r=t.shift();if(Object(q.d)(r)===e)return r;t.push.apply(t,r.children||[])}return null},r._isCreateNew=function(){return null!=!this._originalSecurityFilter},r.saveSecurityFilter=function(){Object(B.removeObjectProperty)(this._securityFilter,D.K),Object(B.setObjectProperty)(this._securityFilter,D.K,this.filterProperties),this._securityFilter.setExpression(this.expression);var e=I.a.createObjectFactory().createSecurityFilterSecurityObject();return w()(this.selectedNamespaces,function(t){var r=t.data;e.addCmSearchPath(r.searchPath)}),this._securityFilter.setSecurityObject(e),this._isCreate?(this._originalQuerySubject.addSecurityFilter(this._securityFilter),I.a.ModuleUtils.generateObjectId(this._originalQuerySubject,this._securityFilter)):Object.assign(this._originalSecurityFilter,this._securityFilter),this._originalQuerySubject},r.openUserGroupDialog=function(){this.provider.openDialog(T.G,{store:this}),this.selectedNamespacesBuffer=A({},this.selectedNamespaces)},r.setSelectedNamespacesBuffer=function(e,t){var r=A({},this.selectedNamespacesBuffer),a=Object(q.d)(e);t?r[a]=e:delete r[a],this.selectedNamespacesBuffer=r},r.resetSelectedNamespaceBuffer=function(){this.selectedNamespacesBuffer={}},r.resetSearchedItems=function(){this.searchedNamespaceItems=null},r.finishUserGroupDialog=function(){this.selectedNamespaces=A({},this.selectedNamespacesBuffer)},r.setSelectedListFilter=function(e){this.selectedListFilter=e},r.setNamespaceSearchTerm=function(e){e||(this.searchedNamespaceItems=null),this.namespaceSearchTerm=e},r.getNamespacesBasedOnCmPath=function(e){var t=this;this.isLoadingNamespacesBasedOnCmPath=!0;var r=O()(e,function(e){return Object(z.a)(t.context,{cmPath:e})}).filter(function(e){return e});return Promise.all(r).then(function(e){t.action(function(){var r={};e.forEach(function(e){var t=e.data[0],a=W(t),n=Object(q.d)(a);r[n]=a}),t.selectedNamespaces=r,t.isLoadingNamespacesBasedOnCmPath=!1})},function(){t.action(function(){t.isLoadingNamespacesBasedOnCmPath=!1})})},r.getNamespacesByFilter=function(){var e=this;this.isLoadingNamespaceByFilter=!0;var t=O()(this.namespaces,function(t){if(Object(q.e)(t))return Object(V.a)(e.context,{namespaceId:t.data.id,filter:e.namespaceSearchTerm.trim()})}).filter(function(e){return e});return Promise.all(t).then(function(t){e.action(function(){var r=[];t.forEach(function(e){var t=e.data;r.push.apply(r,t.map(function(e){return W(e)}))}),e.searchedNamespaceItems=r,e.isLoadingNamespaceByFilter=!1})},function(){e.action(function(){e.isLoadingNamespaceByFilter=!1})})},r.getNamespaces=function(){var e=this;return this.isLoadingNamespaces=!0,Object(H.a)(this.context).then(function(t){var r=t.data;e.action(function(){var t=[];r.forEach(function(e){t.push(W(e))}),e.namespaces=t,e.isLoadingNamespaces=!1})},function(){e.action(function(){e.isLoadingNamespaces=!1})})},r.getNamespaceItems=function(e){var t=this;return this.isLoadingNamespaceItems=!0,Object(U.a)(this.context,{namespaceId:e.data.id}).then(function(r){var a=r.data;return t.action(function(){var r=[];a.forEach(function(e){r.push(W(e))}),e.children=r,t.isLoadingNamespaceItems=!1})},function(){t.action(function(){t.isLoadingNamespaceItems=!1})})},function(e,t,r){t&&R(e.prototype,t),r&&R(e,r)}(t,[{key:"propertiesStore",get:function(){var e=this;return new k.default({getSelection:function(){return[e.querySubject]}})}},{key:"selectedList",get:function(){var e=this;return F()(this.selectedNamespacesBuffer).filter(function(t){var r=t.data;return!e.selectedListFilter||-1!==r.defaultName.trim().toLowerCase().indexOf(e.selectedListFilter.trim().toLowerCase())})}},{key:"securityFilter",get:function(){return this._securityFilter}},{key:"querySubject",get:function(){return this._querySubject}},{key:"label",set:function(e){this._label=e,this._securityFilter.setLabel(e)},get:function(){return this._label}},{key:"userGroupHeader",get:function(){return j()(this.selectedNamespacesBuffer)?Object(G.getString)("addUsersAndGroups"):Object(G.getString)("editUsersAndGroups")}},{key:"title",get:function(){return Object(G.getString)("setDataSecurity")+" - "+this._querySubject.getLabel()}},{key:"expression",get:function(){return this.querySubject.getFilter().map(function(e){return e.getExpression()}).filter(function(e){return e.trim().length}).map(function(e){return"("+e+")"}).join(" AND ")}},{key:"securityObject",get:function(){return this._securityFilter.getSecurityObject()}},{key:"isSearchedNamespacesEmpty",get:function(){return this.searchedNamespaceItems&&0===this.searchedNamespaceItems.length}},{key:"isValid",get:function(){return this.label.trim()&&this.expression.trim()&&this.securityObject&&!j()(this.selectedNamespaces)}},{key:"isValidUserGroupSelection",get:function(){return!j()(this.selectedNamespacesBuffer)}},{key:"filterProperties",get:function(){return(this.querySubject.basicGetFilter()||[]).map(function(e){return A({},Object(B.getObjectProperty)(e,D.K)[0],{identifier:e.getIdentifier(),expression:e.getExpression(),label:e.getLabel()})})}}]),t}(L.a),c=Q(o.prototype,"_querySubject",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),s=Q(o.prototype,"_securityFilter",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),l=Q(o.prototype,"_label",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),u=Q(o.prototype,"isLoadingNamespaces",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),p=Q(o.prototype,"isLoadingNamespaceItems",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),d=Q(o.prototype,"isLoadingNamespaceByFilter",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),m=Q(o.prototype,"isLoadingNamespacesBasedOnCmPath",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),f=Q(o.prototype,"namespaces",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),y=Q(o.prototype,"selectedNamespacesBuffer",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),b=Q(o.prototype,"selectedNamespaces",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g=Q(o.prototype,"selectedListFilter",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),h=Q(o.prototype,"namespaceSearchTerm",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=Q(o.prototype,"searchedNamespaceItems",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Q(o.prototype,"propertiesStore",[L.k],Object.getOwnPropertyDescriptor(o.prototype,"propertiesStore"),o.prototype),Q(o.prototype,"selectedList",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"selectedList"),o.prototype),Q(o.prototype,"securityFilter",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"securityFilter"),o.prototype),Q(o.prototype,"querySubject",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"querySubject"),o.prototype),Q(o.prototype,"label",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"label"),o.prototype),Q(o.prototype,"userGroupHeader",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"userGroupHeader"),o.prototype),Q(o.prototype,"title",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"title"),o.prototype),Q(o.prototype,"expression",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"expression"),o.prototype),Q(o.prototype,"securityObject",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"securityObject"),o.prototype),Q(o.prototype,"isSearchedNamespacesEmpty",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"isSearchedNamespacesEmpty"),o.prototype),Q(o.prototype,"isValid",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"isValid"),o.prototype),Q(o.prototype,"isValidUserGroupSelection",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"isValidUserGroupSelection"),o.prototype),Q(o.prototype,"filterProperties",[C.computed],Object.getOwnPropertyDescriptor(o.prototype,"filterProperties"),o.prototype),Q(o.prototype,"saveSecurityFilter",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"saveSecurityFilter"),o.prototype),Q(o.prototype,"openUserGroupDialog",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"openUserGroupDialog"),o.prototype),Q(o.prototype,"setSelectedNamespacesBuffer",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"setSelectedNamespacesBuffer"),o.prototype),Q(o.prototype,"resetSelectedNamespaceBuffer",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"resetSelectedNamespaceBuffer"),o.prototype),Q(o.prototype,"resetSearchedItems",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"resetSearchedItems"),o.prototype),Q(o.prototype,"finishUserGroupDialog",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"finishUserGroupDialog"),o.prototype),Q(o.prototype,"setSelectedListFilter",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"setSelectedListFilter"),o.prototype),Q(o.prototype,"setNamespaceSearchTerm",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"setNamespaceSearchTerm"),o.prototype),Q(o.prototype,"getNamespacesBasedOnCmPath",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"getNamespacesBasedOnCmPath"),o.prototype),Q(o.prototype,"getNamespacesByFilter",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"getNamespacesByFilter"),o.prototype),Q(o.prototype,"getNamespaces",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"getNamespaces"),o.prototype),Q(o.prototype,"getNamespaceItems",[L.c],Object.getOwnPropertyDescriptor(o.prototype,"getNamespaceItems"),o.prototype),o)},1404:function(e,t,r){var a=r(219),n=r(520);e.exports=function(e,t){return e&&a(e,n(t))}},1405:function(e,t,r){"use strict";var a=r(18);t.a=function(e,t){var r=t.cmPath;return e.ajaxService({url:a.m,method:"GET",data:{searchPath:r,fields:"*"}})}},1406:function(e,t,r){"use strict";var a=r(18);t.a=function(e){return e.ajaxService({url:a.j,method:"GET",data:{_:Date.now()}})}},1407:function(e,t,r){"use strict";var a=r(18);t.a=function(e,t){var r=t.namespaceId;return e.ajaxService({url:a.j+"/"+r+"/items",method:"GET",data:{_:Date.now(),sorting:"defaultName|asc",page:"0|0"}})}},1408:function(e,t,r){"use strict";var a=r(18);t.a=function(e,t){var r=t.namespaceId,n=t.filter;return e.ajaxService({url:a.j+"/"+r+"/search",method:"GET",data:{types:"namespace,namespaceFolder,account,role,group",method:"contains",fields:"*",filter:n}}).catch(function(e){if(e.data)return e;throw e})}},698:function(e,t,r){"use strict";r.r(t);var a=r(1388);t.default={"containers/DataSecurityDialog":a}},868:function(e,t,r){"use strict";r.d(t,"b",function(){return b}),r.d(t,"e",function(){return g}),r.d(t,"a",function(){return h}),r.d(t,"c",function(){return v}),r.d(t,"d",function(){return O});var a,n=r(123),i=r.n(n),o=r(1392),c=r.n(o),s=r(88),l=r.n(s),u=r(1393),p=r.n(u),d=r(221),m=r.n(d),f=r(1006),y=((a={})[f.c]=i.a,a[f.g]=c.a,a[f.b]=l.a,a[f.f]=l.a,a[f.a]=p.a,a[f.e]={id:"common-namespace"},a[f.d]=m.a,a),b=function(e){return y[e].id},g=function(e){return e.data.hasChildren&&e.data.permissions.includes(f.h)},h=function(e){return e.data.ancestors.reduce(function(e,t){return e+"/"+t.defaultName},"")},v=function(e){var t=e.data,r=t.defaultName,a=t.userName;return r+" "+(a?"("+a+")":"")},_="__uniqueNamespaceId",O=function(e){return!e[_]&&e.data&&(e[_]=e.data.id),e[_]}}}]);
  8. //# sourceMappingURL=dataSecurity.js.map