{"id":24562576,"url":"https://github.com/humanbrainproject/angular-hbp-collaboratory","last_synced_at":"2025-04-19T17:42:56.435Z","repository":{"id":58243742,"uuid":"49420967","full_name":"HumanBrainProject/angular-hbp-collaboratory","owner":"HumanBrainProject","description":"AngularJS services to interface with HBP Collaboratory","archived":false,"fork":false,"pushed_at":"2019-11-01T13:08:48.000Z","size":2688,"stargazers_count":2,"open_issues_count":5,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-12T22:48:03.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://humanbrainproject.github.io/angular-hbp-collaboratory/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HumanBrainProject.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-11T11:14:40.000Z","updated_at":"2019-09-12T13:22:35.000Z","dependencies_parsed_at":"2022-08-31T01:01:54.261Z","dependency_job_id":null,"html_url":"https://github.com/HumanBrainProject/angular-hbp-collaboratory","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanBrainProject%2Fangular-hbp-collaboratory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanBrainProject%2Fangular-hbp-collaboratory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanBrainProject%2Fangular-hbp-collaboratory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanBrainProject%2Fangular-hbp-collaboratory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HumanBrainProject","download_url":"https://codeload.github.com/HumanBrainProject/angular-hbp-collaboratory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249751630,"owners_count":21320349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-23T09:16:26.189Z","updated_at":"2025-04-19T17:42:56.409Z","avatar_url":"https://github.com/HumanBrainProject.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://travis-ci.org/HumanBrainProject/angular-hbp-collaboratory.svg?branch=master\n   :target: https://travis-ci.org/HumanBrainProject/angular-hbp-collaboratory\n\nangular-hbp-collaboratory is a collection of AngularJS module to\ndevelop applications for the HBP Collaboratory.\n\nInstall Using Bower\n===================\n\n.. code-block:: bash\n\n   bower install angular-hbp-collaboratory\n\n\n- `angular-hbp-collaboratory.js` provides all the needed AngularJS module\n- `angular-hbp-collaboratory.css` provides styles for the visual components\n\nAlternatively you can rely on `src/angular-hbp-collaboratory/main.scss` if you\nplan to use Sass in your project.\n\n\nContributing\n============\n\nDependencies:\n\nThis project use NodeJS and NPM to test, lint and generating the final library.\n\nBower, Gulp and ESLint should be installed globally:\n\n.. code-block:: bash\n\n   npm install -g bower gulp eslint jsdoc\n\n\nInstall:\n\n.. code-block:: bash\n\n   git clone git@github.com:HumanBrainProject/angular-hbp-collaboratory.git\n   cd angular-hbp-collaboratory\n   nvm install # optional\n   nvm use # optional\n   npm install\n   bower install\n\n\nRebuilding hbp-angular-collaboratory.js file:\n\n.. code-block:: bash\n\n   gulp js\n\n\nInstall this pre-commit hook to ensure your code is green before a committing:\n\n.. code-block:: bash\n\n   cp .git-pre-commit .git/hooks/pre-commit\n\n\nRunning tests on code change:\n\n.. code-block:: bash\n\n   gulp watch\n\n\nMigration from angular-hbp-common\n---------------------------------\n\nHere is a quick (and incomplete) checklist of refactoring to operate to your\nproject if you want to migrate from angular-hbp-common to this cleaner library::\n\nService Refactoring\n~~~~~~~~~~~~~~~~~~~\n\nFirst, rely on the services from angular-hbp-collaboratory. For this, you need\nto depends on the ``hbpCollaboratoryCore`` module.\n\n.. code-block::\n\n    // before\n    angular.module('myModule', ['hbpCommon', 'bbpDocumentClient']);\n\n    // after\n    angular.module('myModule', [\n      'hbpCollaboratoryCore',\n      'hbpCommon',\n      'bbpDocumentClient'\n    ]);\n\nIf you use bower to install, it will ask you to resolve a conflict about the\nangular-bootstrap version. Stick to the angular-hbp-common declaration at\nthis point. At this point, your code should still work, that will let you\nprogressively refactor to use the new library instead of the old one::\n\n   Add dependency 'hbpCollaboratory'\n   hbpErrorService -\u003e clbError                    (from clb-error module)\n   hbpUtil.ferr -\u003e clbError.rejectHttpError       (from clb-error module)\n   hbpUtil.paginatedResultSet -\u003e clbResultSet.get (from clb-rest module)\n   hbpIdentityUserDirectory -\u003e clbUser            (from clb-identity module)\n   hbpCollabStore -\u003e clbCollab                    (from clb-collab module)\n   hbpCollabStore.context -\u003e clbContext           (from clb-collab module)\n   hbpCollaboratoryNavStore -\u003e clbCollabNav       (from clb-collab module)\n   hbpCollaboratoryAppStore -\u003e clbCollabApp       (from clb-collab module)\n   hbpEntityStore -\u003e clbStorage                   (from clb-storage module)\n   hbpFileStore -\u003e clbStorage                     (from clb-storage module)\n   hbpProjectStore -\u003e clbStorage                  (from clb-storage module)\n   hbpConfigStore -\u003e Manually refactor to clbCtxData (from clb-ctx-data)\n     The service now use JSON as data format and the method signature\n     changed from method(config) to method(ctx, data)\n\nIn fact, ``hbpCollaboratoryCore`` is a shell module that will require many\nsub-modules as an easy way to migrate and import everything.\nIt would be even better if your application require only the needed sub-modules\nas indicated by the refactoring list above.\n\nOnce the refactoring of module is done, there is the refactoring of methods::\n\n   clbStorage.getEntityByContext(ctx) -\u003e clbStorage.getEntity({ctx: ctx})\n   clbStorage.get( -\u003e clbStorage.getEntity(\n   clbStorage.getChildren now return a ResultSet like other services\n\nclbUser.isHbpMember is no more because the accreditation multiply. You should\ninstead make a call like:\n\n   clbUser.isHbpMember() -\u003e clbUser.isGroupMember(['hbp-member']);\n\nAt this point, your javascript code should rely only on\n``angular-hbp-collaboratory``, with the exception of the UI. Your application\nshould work as previously. If you were not using any directive from the\nbeforementioned module, you are done and you can remove the old module import,\nas well as their reference in ``bower.json``\n\n.. code-block:: javascript\n\n     // If there is no UI components in use\n\n     // before\n     angular.module('myModule', [\n       'hbpCollaboratoryCore',\n       'hbpCommon',\n       'bbpDocumentClient'\n     ]);\n\n     // after\n     angular.module('myModule', [ // some of the following:\n       'clb-app',\n       'clb-automator',\n       'clb-collab',\n       'clb-env',\n       'clb-error',\n       'clb-identity',\n       'clb-rest',\n       'clb-storage',\n       'clb-stream'\n     ]);\n\n\nIf your code is using some of the directive from angular-hbp-common or\nangular-hbp-document-client, you need to refactor them as well before being\nable to cut the old dependencies.\n\n\nUI Refactoring\n~~~~~~~~~~~~~~\n\nUI Bootstrap has been upgraded to the next major version and the components are\nnow prefixed. This means you cannot use the UI part of angular-hbp-common with\nangular-hbp-collaboratory. At this point, you should entirely remove\nangular-hbp-common from your dependencies and require the UI package from\nangular-hbp-collaboratory.\n\n.. code-block:: javascript\n\n  // before\n  angular.module('myModule', [\n    'hbpCollaboratoryCore',\n    'hbpCommon',\n    'bbpDocumentClient'\n  ]);\n\n  // after\n  angular.module('myModule', [\n    'hbpCollaboratoryCore',\n    'hbpCollaboratoryUI',\n  ]);\n\n\nYou now need to run ``bower update`` and resolve the conflict on ``angular-bootsrap``\nby choosing the version in ``angular-hbp-collaboratory``.\n\nIf your code is using directives from this library, please refer to the angular-bootstrap\n_`Migration Guide \u003chttps://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes\u003e`.\nTo find if and where your code is using such directives, you can run the following command\nin your source code folder:\n\n.. code-block:: bash\n\n  grep -ro '\u003caccordion\\|\u003caccordion-group\\|\u003caccordion-heading\\|\u003caccordionConfig\\|\u003calert\\|\u003cbtn-checkbox\\|\u003cbtn-radio\\|\u003cbuttonConfig\\|\u003ccarousel\\|\u003cslide\\|collapse\\|\u003cdateParser\\|\u003cdatepicker\\|\u003cdatepicker-popup\\|\u003cdaypicker\\|\u003cmonthpicker\\|\u003cyearpicker\\|\u003cdatepickerConfig\\|\u003cdatepickerPopupConfig\\|dropdown=\\|dropdown-toggle=\\|dropdown-menu=\\|\u003ckeyboard-nav\\|\u003cdropdownService\\|\u003c$modal\\|\u003c$modalInstance\\|\u003c$modalStack\\|\u003cmodal-transclude\\|\u003cpagination\\|\u003cpager\\|\u003cpagerConfig\\|\u003cpaginationConfig\\|popover=\\|popover-template=\\|popover-html=\\|$position\\|\u003cprogressbar\\|\u003cbar\\|\u003cprogress\\|\u003cprogressConfig\\|\u003crating\\|\u003cratingConfig\\|\u003ctabset\\|\u003ctab\\|\u003ctab-heading\\|timepicker\\|timepickerConfig\\|tooltip=\\|tooltip-template=\\|tooltip-html=\\|$tooltip\\|typeahead\\|typeahead-match\\|typeaheadHighlightFilter\\|typeaheadParser' .\n\nYou can also use the directives provided by this package.\nPlease be sure to check the change in the directive attributes prefix as well.::\n\n   hbp-file-browser -\u003e clb-ui-storage (root -\u003e clb-root, entity -\u003e clb-entity)\n   hbp-error-message -\u003e clb-error-message (hbp-promise -\u003e clb-promise, hbp-message -\u003e clb-message)\n   hbp-usercard -\u003e clb-usercard (hbp-user -\u003e clb-user, hbp-template -\u003e clb-template)\n   hbp-loading -\u003e clb-loading (hbp-promise -\u003e clb-promise, hbp-message -\u003e clb-message)\n   hbp-perform-action -\u003e clb-perform-action\n\nIf you wrote a usercard custom template (using ``hbp-template`` attribute), you should update the following css classes\nand probably update the template to conform to the new html structure::\n\n   hbp-usercard -\u003e clb-usercard\n   hbp-usercard-pix -\u003e clb-usercard-pix\n   hbp-user-avatar -\u003e clb-user-avatar\n   hbp-usercard-header -\u003e clb-usercard-header\n   hbp-usercard-institution -\u003e clb-usercard-institution\n   hbp-usercard-contact -\u003e clb-usercard-contact\n   hbp-usercard-contact-item -\u003e clb-usercard-contact-item\n\n``hbpDialogFactory`` has been removed, with the exception of ``hbpDialogFactory.error`` and ``hbpDialogFactory.confirm`` which\nare now respectively ``clbErrorDialog.open`` (module ``clb-ui-error``) and ``clbConfirm.open`` (module ``clb-ui-dialog``).\nThese two refactoring will have you covered::\n\n   hbpDialogFactory -\u003e clbErrorDialog and/or clbConfirm\n   hbpDialogFactory.error -\u003e clbErrorDialog.open\n   hbpDialogFactory.confirm -\u003e clbConfirm.open\n\nIf you were using other methods from hbpDialogFactory (e.g.: ``.alert()``),\nyou need to rewrite them using angular-bootstrap ``$uibModal`` (read the\n_`documentation \u003chttps://angular-ui.github.io/bootstrap/#/modal\u003e`)\n\nSince usage of ``hbp-generated-icon`` has been deprecated for anything but users\nwithout avatars, it has been replaced by a new directive called ``clb-user-avatar``\navailable in the module clb-ui-identity.\nIt displays either a generated icon or the user profile picture. This new\ncomponent is also easier to customize using pure css.\n\nAt the end of the process, your application should only load ``angular-hbp-collaboratory``\n\n.. code-block:: javascript\n\n    angular.module('myModule', [\n    // some of the following:\n      'clb-app',\n      'clb-automator',\n      'clb-collab',\n      'clb-env',\n      'clb-error',\n      'clb-identity',\n      'clb-rest',\n      'clb-storage',\n      'clb-stream',\n      'clb-ui-error',\n      'clb-ui-storage',\n      'clb-ui-form',\n      'clb-ui-loading',\n      'clb-stream'\n    ]);\n\n\nAuth Refactoring\n~~~~~~~~~~~~~~~~\n\nThis module contains clbAuth and clbAuthHttp service to manage authentication.\nclbAuth provide a login() and a logout() method. To use them, just drop\nany reference to bbpOidcClient and bbpOidcSession from your code and use instead\n``clbAuth.login()`` and ``clbAuth.logout()`` method.\n\nThe injection of the Authorization header is no more automatic to avoid leakage\nof the token. It is part of every service library from ``angular-hbp-collaboratory``.\nCheck in every place you are using ``$http`` Angular module. If the call require\nthe token to be injected, add it by using ``clbAuthHttp`` service instead of\n``$http``.\n\n\n\nLICENSE\n=======\n\nMIT\n\nRead the project LICENSE file.\n\nAcknowledgement\n===============\n\nThis open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270 and No. 785907 (Human Brain Project SGA1 and SGA2).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanbrainproject%2Fangular-hbp-collaboratory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanbrainproject%2Fangular-hbp-collaboratory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanbrainproject%2Fangular-hbp-collaboratory/lists"}