{"_id":"@aliasghar.ahmed/wc-share-lib","_rev":"3-449bb79cc85cb7a1711c47fe039545be","name":"@aliasghar.ahmed/wc-share-lib","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@aliasghar.ahmed/wc-share-lib","version":"0.0.1","description":"This web component was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.\\\r wc-share-lib is a wrapper around share library to host it in a non-angular application.","main":"karma.conf.js","dependencies":{"@aliasghar.ahmed/share-lib":"^1.0.0","@angular/cdk":"^11.0.0","@angular/common":"~11.0.2","@angular/core":"^11.0.2","@angular/elements":"^11.0.5","@angular/forms":"~11.0.2","@angular/router":"~11.0.2"},"_id":"@aliasghar.ahmed/wc-share-lib@0.0.1","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-wauSnl3jjgbEgiZVoZhDVoUi5wUsCNiD1yvr2D+HcqwjRteaab0O6OQN0zkqxwvnzsP/U7vB43s1Eaznpq806A==","shasum":"cf8dc8b0b2d52287823a74668218f34f251a1168","tarball":"https://registry.npmjs.org/@aliasghar.ahmed/wc-share-lib/-/wc-share-lib-0.0.1.tgz","fileCount":3,"unpackedSize":784987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFNd7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrt5A/6AkgB4chFwYUIxgKyfnQmHbPOVADYJmzqrwbZoBWhNqM3WLmX\r\n89BHBLAao7jHdRH1IkSVlrZR9uWxKeHvkqWfXgaa16V9WRPuTZChMHs19MYL\r\nmLXvUx3ncpeK2moH799074ya2RvN9Rs4B0GanMmyA2vWwZf1Tt+ITkavo63f\r\n8v0OsEsiRbF5rSiGmPF01Jl7e4ARQJ2be+jxZLXuin+WuC4thg1v2OcQJGN6\r\n8n+K6OmzJvye+yKByL75mfcYugBpgjMNooQSqVlkzigqo4MNN5MiNxhLNvkx\r\nwaPkpTZjU7TI3sjvs4FqRFS+ya+BVqUpNzSpNIm7gcrCsZfhrBRthtNCaJZk\r\nAD35HP5YHQz0lSTYnoKQkCyzE71gdNVJcbOfERqPlt8T0k2ImCc9OJ32rqI4\r\nHkxN9sMJ/IF+S8vJIhW5KjrZ0CspMWJadGZgsX7+OWwAXrvaeV/7qT9eI7uW\r\nM83dNQI+c4/N1DbjhzCV7QHAg5AvznVbpNQkAY/bMNwALNHkHghP9leZjj30\r\n/80Av/Ad6HSWw7zKwXs3+68Drt6ZH1j2pW22+t47mUmpmMsB8JNO0DgFYdBu\r\nhAfWNJOvop2XlZOoNlF0mttcyGmEeuhOnwIHsjMzPSScnwY8R5OT5LKWUk5/\r\nDLrk/usmj/XmQa/rDvKq0tjjkDG5/Zq7n3I=\r\n=Gt9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHU63yDGVTWqkatvoIkE4jSh/7tenB2zZ8wc0mOG6xmsAiAdgUJJyu0/YuM0UFaleVPQ5TaCSnUAIBK1eCHztHRkuw=="}]},"_npmUser":{"name":"aliasghar.ahmed","email":"aliasghar.ahmed@iriworldwide.com"},"directories":{},"maintainers":[{"name":"aliasghar.ahmed","email":"aliasghar.ahmed@iriworldwide.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wc-share-lib_0.0.1_1645533050979_0.6429552279879587"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-22T12:30:50.978Z","0.0.1":"2022-02-22T12:30:51.301Z","modified":"2022-04-04T12:53:32.259Z"},"maintainers":[{"name":"aliasghar.ahmed","email":"aliasghar.ahmed@iriworldwide.com"}],"description":"This web component was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.\\\r wc-share-lib is a wrapper around share library to host it in a non-angular application.","readme":"# wc-share-lib\r\nThis web component was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.\\\r\nwc-share-lib is a wrapper around share library to host it in a non-angular application.  \r\n\r\nTo install share library web component on your local system, you need the following:\r\n- Node.js\r\n- npm package manager\r\n\r\n### Installation\r\n`npm install @aliasghar.ahmed/wc-share-lib` . If there is conflict in peer dependencies please use --force while installation `npm install @aliasghar.ahmed/wc-share-lib --force`\r\n\r\n# Dependencies\r\nThis web component has the following dev dependencies. These will be installed along with wc-share-lib package and need not be installed explicitly.\r\n\r\n- \"@aliasghar.ahmed/share-lib\": \"^1.0.0\",\r\n- \"@angular/cdk\": \"^11.0.0\",\r\n- \"@angular/common\": \"~11.0.2\",\r\n- \"@angular/core\": \"^11.0.2\",\r\n- \"@angular/elements\": \"^11.0.5\",\r\n- \"@angular/router\": \"~11.0.2\",\r\n- \"@angular/forms\": \"~11.0.2\"\r\n\r\n## Example usage\r\nTo enable the share-lib web component import \"wc-share-lib.js\" in your index.html.\r\n```\r\n<script type=\"module\" src=\"/node_modules/@aliasghar.ahmed/wc-share-lib/wc-share-lib.js\"></script>\r\n```\r\nLoad web component element using the following code and assign an ID e.g. \"share-wrapper\". This ID will be used to pass the input data to share library \r\n```\r\n<lib-share-dialog id=\"share-wrapper\"> </lib-share-dialog> \r\n```\r\nConfigure the share-lib using \"shareOptions\" input and get the response using \"onShareComplete\" eventlistner.\r\nRefer to the Input/output table below for more details. \r\n```\r\n    const element = document.getElementById('share-wrapper');\r\n    element.shareOptions = shareOptions;// Refer the Json structure below, for shareOptions definition.\r\n    element.addEventListener('onShareComplete', (e) => \r\n    {console.log(e.detail)}); // Refer the output table below, for more detials\r\n    element.addEventListener('onShareClose', (e) => \r\n    {console.log(e.detail)}); \r\n```\r\n\r\n### Input Json structure for share library.\r\n```js\r\nconst shareOptions = {\r\n      objectId: '', // Can be empty now. For future customizations component can use this property\r\n      objectType: '',  // Can be empty now. For future customizations component can use this property\r\n      shareData: {\r\n        hideEditOption: false, // boolean to hide edit checkbox\r\n        disableUserSelection: false, // boolean to disable user selection\r\n        parentClass: 'web-share-dialog', // custom class to handle css by hosting app\r\n        readGroups: [1024], // Existing share details of the object, list of groups with only Read access\r\n        editGroups: [], // Existing share details of the object, list of groups with write access, leave it empty if not applicable\r\n        readUsers: ['zp8k4'], // Existing share details of the object, list of users with only Read access\r\n        editUsers: [], // Existing share details of the object, list of users with write access, leave it empty if not applicable\r\n        readUsersDetails: [{\"userId\":\"zp8k4\",\"mobileNumber\":\"0015999\",\"avatar\":\"zp8k4_1644232363000.png\",\"emailId\":\"Abhishek.Singh@infores.com\",\"groups\":[1221],\"clientId\":0,\"allowChangePassword\":true,\"fName\":\"Abhishek\",\"lName\":\"Singh\",\"passwordExpiryDt\":0}], // Existing share details of the object, details of the  list of users with read access\r\n        editUsersDetails: [], // Existing share details of the object, details of the  list of users with write access\r\n        showTeams: true, // boolean to show teams\r\n        serviceUrl: LD_SERVICE_URL // LD Service URL (https://advantageqa2.iriworldwide.com/ld_engg)\r\n      }\r\n    }\r\n```\r\n\r\n### Inputs\r\n\r\n| Name                    | Description \r\n| ----------------------- | ---------------------------------------------------------------------------------------|  \r\n| shareOptions         | This is a JSON provided to the share library.All the JSON properties are explained above. \r\n\r\n### Outputs\r\n\r\n| Name                                 | Function Name     | Description \r\n| ------------------------------------ | ----------------- | -------------------------------------------------------------------------|\r\n| onShareComplete                      |  onShare          | This function will emit json object(shared data) when user clicks on share button in the popup\r\n| onShareClose                         |  onClose          | This function will emit the closure event of popup basically when user clicks on 'X' or 'Cancel' in the popup.","readmeFilename":"README.md"}