├── .github └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── blockchain-explorer ├── README.md ├── connection-profile │ ├── config.json │ ├── explorer-connection-profile-template.json │ └── gen-connection-profile.sh ├── createdb.sh ├── explorerconfig.json ├── hyperledger-explorer-cfn.yaml └── hyperledger-explorer-rds.sh ├── images ├── AmazonManagedBlockchain.png └── MultimemberNetwork.png ├── new-member ├── README.md ├── create-config-update.sh └── s3-handler.sh ├── ngo-chaincode ├── README-local.md ├── README.md ├── src │ ├── ngo.js │ └── package.json ├── test-chaincode-aws.sh └── test-chaincode-local.sh ├── ngo-events ├── Architecture Diagram.png ├── README.md ├── chaincode │ └── src │ │ └── ngo.js ├── listener │ └── src │ │ ├── .dockerignore │ │ ├── .gitignore │ │ ├── Dockerfile │ │ ├── chaincodelistener.js │ │ ├── config.js │ │ ├── connection-profile-template.yaml │ │ ├── index.js │ │ ├── logging.js │ │ ├── package.json │ │ ├── queue.js │ │ ├── setupChannel.js │ │ └── setupFabricClient.js ├── scripts │ ├── createFabricUser.sh │ ├── deployHandler.sh │ ├── deployImage.sh │ ├── deployListener.sh │ ├── deployPrivateSubnet.sh │ └── gen-connection-profile.sh └── templates │ ├── ecrImage.yaml │ ├── eventHandler.yaml │ ├── eventListener.yaml │ └── privateSubnet.yaml ├── ngo-fabric ├── README-events.md ├── README-no-event.md ├── README.md ├── amb.sh ├── amb.yaml ├── cli │ ├── 1-fabric-network.sh │ ├── 3a-client-node-setup.sh │ ├── 3b-client-node-setup.sh │ ├── 5-fabric-peer.sh │ └── README-CLI.md ├── configtx.yaml ├── docker-compose-cli.yaml ├── fabric-client-node.yaml ├── templates │ └── exports-template.sh └── vpc-client-node.sh ├── ngo-identity ├── Blockchain Identity Components.png ├── Blockchain Identity Sequence Diagram.png ├── README.md ├── chaincode │ └── src │ │ ├── ngo.js │ │ └── package.json ├── scripts │ ├── createCognitoUsers.sh │ ├── createFabricUsers.sh │ └── deployCognitoAPIGatewayRoutes.sh └── templates │ └── cognito-apigateway-routes-template.yaml ├── ngo-lambda ├── .gitignore ├── Lambda API AMB Workshop Diagram.png ├── README.md ├── connection-profile-template.yaml ├── createFabricUser.sh ├── createLambda.sh ├── gen-connection-profile.sh ├── lambda-api-template.yaml └── src │ ├── .gitignore │ ├── certs │ └── .gitignore │ ├── config.js │ ├── index.js │ ├── invoke.js │ ├── logging.js │ ├── package.json │ ├── query.js │ ├── queryEvents.js │ ├── setupChannel.js │ └── setupFabricClient.js ├── ngo-rest-api ├── README.md ├── Troubleshooting.md ├── app.js ├── blocklistener.js ├── config.json ├── connection-profile │ ├── client-org1.yaml │ ├── gen-connection-profile-local.sh │ ├── gen-connection-profile.sh │ ├── ngo-connection-profile-byfn.yaml │ ├── ngo-connection-profile-sample.yaml │ └── ngo-connection-profile-template.yaml ├── connection.js ├── invoke.js ├── ngo-load-testapi.sh ├── ngo-load-workshop.sh ├── package-lock.json ├── package.json ├── query.js └── start.sh └── ngo-ui ├── README.md ├── angular.json ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── models │ │ ├── donation.model.ts │ │ ├── donor.model.ts │ │ ├── index.ts │ │ ├── ngo.model.ts │ │ └── project.model.ts │ ├── services │ │ ├── blockchain.service.ts │ │ ├── dashboard.service.ts │ │ ├── donate.service.ts │ │ ├── index.ts │ │ ├── ngo.service.ts │ │ └── shared │ │ │ ├── api.service.ts │ │ │ ├── auth.service.ts │ │ │ ├── donor.service.ts │ │ │ ├── index.ts │ │ │ ├── session.service.ts │ │ │ ├── socket.service.ts │ │ │ └── utils.service.ts │ └── ui │ │ ├── components │ │ ├── blockchain-progress │ │ │ ├── blockchain-progress.component.html │ │ │ ├── blockchain-progress.component.scss │ │ │ ├── blockchain-progress.component.spec.ts │ │ │ ├── blockchain-progress.component.ts │ │ │ └── blockchain.interface.ts │ │ ├── donorchart │ │ │ ├── contribution.ts │ │ │ ├── donorchart.component.html │ │ │ ├── donorchart.component.scss │ │ │ ├── donorchart.component.spec.ts │ │ │ └── donorchart.component.ts │ │ ├── gallery │ │ │ ├── gallery.component.html │ │ │ ├── gallery.component.scss │ │ │ ├── gallery.component.spec.ts │ │ │ └── gallery.component.ts │ │ └── rating │ │ │ ├── rating.component.html │ │ │ ├── rating.component.scss │ │ │ ├── rating.component.spec.ts │ │ │ └── rating.component.ts │ │ ├── dashboard │ │ ├── dashboard.component.html │ │ ├── dashboard.component.scss │ │ ├── dashboard.component.spec.ts │ │ └── dashboard.component.ts │ │ ├── donate │ │ ├── donate.component.html │ │ ├── donate.component.scss │ │ ├── donate.component.spec.ts │ │ └── donate.component.ts │ │ ├── ngo-details │ │ ├── ngo-details.component.html │ │ ├── ngo-details.component.scss │ │ ├── ngo-details.component.spec.ts │ │ └── ngo-details.component.ts │ │ ├── ngos-list │ │ ├── ngos-list.component.html │ │ ├── ngos-list.component.scss │ │ ├── ngos-list.component.spec.ts │ │ └── ngos-list.component.ts │ │ ├── shared │ │ ├── blockchain │ │ │ ├── blockchain.component.html │ │ │ ├── blockchain.component.scss │ │ │ ├── blockchain.component.spec.ts │ │ │ └── blockchain.component.ts │ │ ├── breadcrumb │ │ │ ├── breadcrumb.component.html │ │ │ ├── breadcrumb.component.scss │ │ │ ├── breadcrumb.component.spec.ts │ │ │ ├── breadcrumb.component.ts │ │ │ └── breadcrumb.interface.ts │ │ ├── footer │ │ │ ├── footer.component.html │ │ │ ├── footer.component.scss │ │ │ ├── footer.component.spec.ts │ │ │ └── footer.component.ts │ │ ├── header │ │ │ ├── header.component.html │ │ │ ├── header.component.scss │ │ │ ├── header.component.spec.ts │ │ │ └── header.component.ts │ │ └── sidenav │ │ │ ├── sidenav.component.html │ │ │ ├── sidenav.component.scss │ │ │ ├── sidenav.component.spec.ts │ │ │ └── sidenav.component.ts │ │ ├── signin │ │ ├── signin.component.html │ │ ├── signin.component.scss │ │ ├── signin.component.spec.ts │ │ └── signin.component.ts │ │ └── signup │ │ ├── signup.component.html │ │ ├── signup.component.scss │ │ ├── signup.component.spec.ts │ │ └── signup.component.ts ├── assets │ ├── .gitkeep │ ├── fonts │ │ └── amazon-type-fonts │ │ │ ├── amazon-ember-medium-webfont.woff │ │ │ ├── amazon-ember-medium-webfont.woff2 │ │ │ ├── amazon-ember-mediumitalic-webfont.woff │ │ │ ├── amazon-ember-mediumitalic-webfont.woff2 │ │ │ ├── amazonember_bd-webfont.woff │ │ │ ├── amazonember_bd-webfont.woff2 │ │ │ ├── amazonember_bdit-webfont.ttf │ │ │ ├── amazonember_bdit-webfont.woff │ │ │ ├── amazonember_bdit-webfont.woff2 │ │ │ ├── amazonember_he-webfont.woff │ │ │ ├── amazonember_he-webfont.woff2 │ │ │ ├── amazonember_heit-webfont.woff │ │ │ ├── amazonember_heit-webfont.woff2 │ │ │ ├── amazonember_lt-webfont.ttf │ │ │ ├── amazonember_lt-webfont.woff │ │ │ ├── amazonember_lt-webfont.woff2 │ │ │ ├── amazonember_ltit-webfont.woff │ │ │ ├── amazonember_ltit-webfont.woff2 │ │ │ ├── amazonember_rg-webfont.woff │ │ │ ├── amazonember_rg-webfont.woff2 │ │ │ ├── amazonember_rgit-webfont.woff │ │ │ ├── amazonember_rgit-webfont.woff2 │ │ │ ├── amazonember_th-webfont.ttf │ │ │ ├── amazonember_th-webfont.woff │ │ │ ├── amazonember_th-webfont.woff2 │ │ │ ├── amazonember_thit-webfont.woff │ │ │ └── amazonember_thit-webfont.woff2 │ ├── images │ │ ├── 1101 │ │ │ ├── 1101.png │ │ │ └── activities │ │ │ │ ├── 01.jpg │ │ │ │ ├── 02.jpg │ │ │ │ ├── 03.jpg │ │ │ │ └── 04.jpg │ │ ├── 1102 │ │ │ ├── 1102.png │ │ │ └── activities │ │ │ │ ├── 01.jpg │ │ │ │ ├── 02.jpg │ │ │ │ ├── 03.jpg │ │ │ │ └── 04.jpg │ │ ├── 1103 │ │ │ ├── 1103.png │ │ │ └── activities │ │ │ │ ├── 01.jpg │ │ │ │ ├── 02.jpg │ │ │ │ ├── 03.jpg │ │ │ │ └── 04.jpg │ │ ├── 1104 │ │ │ ├── 1104.png │ │ │ └── activities │ │ │ │ ├── 01.jpg │ │ │ │ ├── 02.jpg │ │ │ │ └── 03.jpg │ │ ├── 1105 │ │ │ ├── 1105.png │ │ │ └── activities │ │ │ │ ├── 01.jpg │ │ │ │ ├── 02.jpg │ │ │ │ └── 03.jpg │ │ ├── arrow-gr.png │ │ ├── arrow-gr@2x.png │ │ ├── aws-logo.png │ │ ├── awslogo.png │ │ ├── awslogo@2x.png │ │ ├── block-bendline.png │ │ ├── block-bendline@2x.png │ │ ├── block-bg.png │ │ ├── block-bg@2x.png │ │ ├── block-dark.png │ │ ├── block-dark@2x.png │ │ ├── block-light.png │ │ ├── block-light@2x.png │ │ ├── block-line.png │ │ ├── block-line@2x.png │ │ ├── cal-sym.png │ │ ├── cal-sym@2x.png │ │ ├── compassion-logo.png │ │ ├── direct-relief-logo-2.png │ │ ├── direct-relief-logo.png │ │ ├── dollar-sym.png │ │ ├── dollar-sym@2x.png │ │ ├── gallery.png │ │ ├── gallery@2x.png │ │ ├── gold-star.png │ │ ├── gold-star@2x.png │ │ ├── green-tick.png │ │ ├── green-tick@2x.png │ │ ├── login-bg.png │ │ ├── login-bg@2x.png │ │ ├── npo-aha.png │ │ ├── npo-aha@2x.png │ │ ├── npo-ameri.png │ │ ├── npo-ameri@2x.png │ │ ├── npo-com.png │ │ ├── npo-com@2x.png │ │ ├── npo-dir.png │ │ ├── npo-dir@2x.png │ │ ├── npo-hab.png │ │ ├── npo-hab@2x.png │ │ ├── npo-wv.png │ │ ├── npo-wv@2x.png │ │ ├── photo-alb.png │ │ ├── photo-alb@2x.png │ │ ├── photo1-alb.png │ │ ├── photo1-alb@2x.png │ │ ├── photo2-alb.png │ │ ├── photo2-alb@2x.png │ │ ├── photo3-alb.png │ │ ├── photo3-alb@2x.png │ │ ├── photo4-alb.png │ │ ├── photo4-alb@2x.png │ │ ├── star-regular.svg │ │ ├── white-star.png │ │ └── white-star@2x.png │ ├── js │ │ └── popper.js │ └── scss │ │ ├── _alert.scss │ │ ├── _amazon.scss │ │ ├── _badge.scss │ │ ├── _bootstrap-grid.scss │ │ ├── _bootstrap-reboot.scss │ │ ├── _breadcrumb.scss │ │ ├── _button-group.scss │ │ ├── _buttons.scss │ │ ├── _card.scss │ │ ├── _carousel.scss │ │ ├── _close.scss │ │ ├── _code.scss │ │ ├── _custom-forms.scss │ │ ├── _dropdown.scss │ │ ├── _forms.scss │ │ ├── _functions.scss │ │ ├── _grid.scss │ │ ├── _images.scss │ │ ├── _input-group.scss │ │ ├── _jumbotron.scss │ │ ├── _list-group.scss │ │ ├── _media.scss │ │ ├── _mixins.scss │ │ ├── _modal.scss │ │ ├── _nav.scss │ │ ├── _navbar.scss │ │ ├── _pagination.scss │ │ ├── _popover.scss │ │ ├── _print.scss │ │ ├── _progress.scss │ │ ├── _reboot.scss │ │ ├── _root.scss │ │ ├── _tables.scss │ │ ├── _tooltip.scss │ │ ├── _transitions.scss │ │ ├── _type.scss │ │ ├── _utilities.scss │ │ ├── _variables.scss │ │ ├── amazon │ │ ├── _fonts.scss │ │ └── _theme.scss │ │ ├── bootstrap.scss │ │ ├── mixins │ │ ├── _alert.scss │ │ ├── _background-variant.scss │ │ ├── _badge.scss │ │ ├── _border-radius.scss │ │ ├── _box-shadow.scss │ │ ├── _breakpoints.scss │ │ ├── _buttons.scss │ │ ├── _caret.scss │ │ ├── _clearfix.scss │ │ ├── _float.scss │ │ ├── _forms.scss │ │ ├── _gradients.scss │ │ ├── _grid-framework.scss │ │ ├── _grid.scss │ │ ├── _hover.scss │ │ ├── _image.scss │ │ ├── _list-group.scss │ │ ├── _lists.scss │ │ ├── _nav-divider.scss │ │ ├── _pagination.scss │ │ ├── _reset-text.scss │ │ ├── _resize.scss │ │ ├── _screen-reader.scss │ │ ├── _size.scss │ │ ├── _table-row.scss │ │ ├── _text-emphasis.scss │ │ ├── _text-hide.scss │ │ ├── _text-truncate.scss │ │ ├── _transition.scss │ │ └── _visibility.scss │ │ └── utilities │ │ ├── _align.scss │ │ ├── _background.scss │ │ ├── _borders.scss │ │ ├── _clearfix.scss │ │ ├── _display.scss │ │ ├── _embed.scss │ │ ├── _flex.scss │ │ ├── _float.scss │ │ ├── _position.scss │ │ ├── _screenreaders.scss │ │ ├── _shadows.scss │ │ ├── _sizing.scss │ │ ├── _spacing.scss │ │ ├── _text.scss │ │ └── _visibility.scss ├── browserslist ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── karma.conf.js ├── main.ts ├── polyfills.ts ├── styles.scss ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── tslint.json ├── tsconfig.json └── tslint.json /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *Issue #, if available:* 2 | 3 | *Description of changes:* 4 | 5 | 6 | By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | archive 3 | .vscode 4 | .idea 5 | ngo-rest-api/node_modules 6 | ngo-rest-api/fabric-client-kv-org1 7 | ngo-ui/node_modules 8 | ngo-ui/Config 9 | .DS_Store -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Non-profit Blockchain Workshop 2 | Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | -------------------------------------------------------------------------------- /blockchain-explorer/connection-profile/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "network-configs": { 3 | "amb-network": { 4 | "name": "amb-network", 5 | "profile": "./amb-network.json", 6 | "enableAuthentication": false 7 | } 8 | }, 9 | "license": "Apache-2.0" 10 | } -------------------------------------------------------------------------------- /blockchain-explorer/createdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export CONN=$( jq -r .postgreSQL.conn ../../../../explorerconfig.json ) 3 | export HOSTNAME=$( jq -r .postgreSQL.host ../../../../explorerconfig.json ) 4 | export USER=$( jq -r .postgreSQL.username ../../../../explorerconfig.json ) 5 | export DATABASE=$(jq -r .postgreSQL.database ../../../../explorerconfig.json ) 6 | export PASSWD=$(jq .postgreSQL.passwd ../../../../explorerconfig.json | sed "y/\"/'/") 7 | echo "USER=${USER}" 8 | echo "DATABASE=${DATABASE}" 9 | echo "PASSWD=${PASSWD}" 10 | echo "CONN=${CONN}" 11 | echo "HOSTNAME=${HOSTNAME}" 12 | echo "Executing SQL scripts..." 13 | psql -X -h $HOSTNAME -d $DATABASE --username=$USER -v dbname=$DATABASE -v user=$USER -v passwd=$PASSWD -f ./explorerpg.sql ; 14 | psql -X -h $HOSTNAME -d $DATABASE --username=$USER -v dbname=$DATABASE -v user=$USER -v passwd=$PASSWD -f ./updatepg.sql ; 15 | -------------------------------------------------------------------------------- /blockchain-explorer/explorerconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "persistence": "postgreSQL", 3 | "platforms": ["fabric"], 4 | "postgreSQL": { 5 | "host": "%RDSHOST%", 6 | "port": "5432", 7 | "database": "fabricexplorer", 8 | "username": "master", 9 | "passwd": "master1234" 10 | }, 11 | "sync": { 12 | "type": "local", 13 | "platform": "fabric", 14 | "blocksSyncTime": "1" 15 | }, 16 | "jwt": { 17 | "secret": "a secret phrase!!", 18 | "expiresIn": "2h" 19 | } 20 | } -------------------------------------------------------------------------------- /images/AmazonManagedBlockchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/images/AmazonManagedBlockchain.png -------------------------------------------------------------------------------- /images/MultimemberNetwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/images/MultimemberNetwork.png -------------------------------------------------------------------------------- /ngo-chaincode/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngo", 3 | "version": "0.0.1", 4 | "description": "ngo node.js", 5 | "engines": { 6 | "node": ">=8.4.0", 7 | "npm": ">=5.3.0" 8 | }, 9 | "scripts": { 10 | "start": "node ngo.js" 11 | }, 12 | "engine-strict": true, 13 | "license": "Apache-2.0", 14 | "dependencies": { 15 | "fabric-shim": ">=1.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ngo-events/Architecture Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-events/Architecture Diagram.png -------------------------------------------------------------------------------- /ngo-events/listener/src/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /ngo-events/listener/src/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /package-lock.json 3 | /hfc-key-store/ 4 | connection-profile.yaml 5 | /certs -------------------------------------------------------------------------------- /ngo-events/listener/src/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm install 8 | 9 | COPY certs/ certs/ 10 | COPY . . 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "npm", "start" ] 15 | -------------------------------------------------------------------------------- /ngo-events/listener/src/config.js: -------------------------------------------------------------------------------- 1 | let configObject = { 2 | "logLevel": process.env.LOG_LEVEL || 'debug', 3 | "chaincodeName": process.env.CHAINCODE_NAME || 'ngo', 4 | "channelName": process.env.CHANNEL_NAME || "mychannel", 5 | "eventRegexString" : process.env.EVENT_REGEX_STRING || '.*', 6 | "peerEndpoint": process.env.PEER_ENDPOINT || "grpc://localhost:7051", 7 | "ordererEndpoint": process.env.ORDERER_ENDPOINT || "grpc://localhost:7050", 8 | "fabricUsername": process.env.FABRIC_USERNAME || 'Admin', 9 | "mspID": process.env.MSP || 'Org1MSP', 10 | "SQSQueueURL": process.env.SQS_QUEUE_URL || 'https://sqs.us-east-1.amazonaws.com/1234567890/loc-events-dev', 11 | "cryptoFolder": process.env.CRYPTO_FOLDER || '/tmp', 12 | "memberName": process.env.MEMBER_NAME || 'org1' 13 | } 14 | 15 | module.exports = configObject; -------------------------------------------------------------------------------- /ngo-events/listener/src/connection-profile-template.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | name: "ngo" 15 | x-type: "hlfv1" 16 | description: "NGO Network" 17 | version: "1.0" 18 | 19 | channels: 20 | mychannel: 21 | orderers: 22 | - orderer.com 23 | peers: 24 | peer1: 25 | endorsingPeer: true 26 | chaincodeQuery: true 27 | ledgerQuery: true 28 | eventSource: true 29 | 30 | organizations: 31 | Org1: 32 | mspid: %MEMBERID% 33 | peers: 34 | - peer1 35 | certificateAuthorities: 36 | - ca-org1 37 | 38 | orderers: 39 | orderer.com: 40 | url: grpcs://%ORDERINGSERVICEENDPOINT% 41 | grpcOptions: 42 | ssl-target-name-override: %ORDERINGSERVICEENDPOINTNOPORT% 43 | tlsCACerts: 44 | path: %CAFILE% 45 | 46 | peers: 47 | peer1: 48 | url: grpcs://%PEERSERVICEENDPOINT% 49 | eventUrl: grpcs://%PEEREVENTENDPOINT% 50 | grpcOptions: 51 | ssl-target-name-override: %PEERSERVICEENDPOINTNOPORT% 52 | tlsCACerts: 53 | path: %CAFILE% 54 | 55 | certificateAuthorities: 56 | ca-org1: 57 | url: https://%CASERVICEENDPOINT% 58 | httpOptions: 59 | verify: false 60 | tlsCACerts: 61 | path: %CAFILE% 62 | caName: %MEMBERID% -------------------------------------------------------------------------------- /ngo-events/listener/src/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const log4j = require('log4js'); 18 | const config = require("./config"); 19 | const chaincodeListener = require('./chaincodelistener.js'); 20 | 21 | logger = log4j.getLogger('Server'); 22 | logger.level = config.logLevel; 23 | 24 | const FABRIC_USERNAME = config.fabricUsername; 25 | const CHANNEL_NAME = config.channelName; 26 | 27 | async function run() { 28 | try { 29 | await chaincodeListener.startListener(CHANNEL_NAME, FABRIC_USERNAME); 30 | } catch (error) { 31 | logger.error('##### FabricEventListener - Terminating because we caught an error: ', error); 32 | process.exit(1); 33 | } 34 | } 35 | 36 | if (require.main === module) { 37 | run() 38 | } else { 39 | module.exports.run = run; 40 | } -------------------------------------------------------------------------------- /ngo-events/listener/src/logging.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const log4js = require('log4js'); 18 | 19 | log4js.configure({ 20 | appenders: { 21 | out: { type: 'stdout' }, 22 | }, 23 | categories: { 24 | default: { appenders: ['out'], level: 'debug' }, 25 | } 26 | }); 27 | 28 | module.exports = log4js; -------------------------------------------------------------------------------- /ngo-events/listener/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fabric-event-listener", 3 | "version": "1.0.0", 4 | "description": "Writes Fabric events to SQS", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node index.js" 9 | }, 10 | "engines": { 11 | "node": ">=10.0.0 <12", 12 | "npm": ">=6.0.0" 13 | }, 14 | "dependencies": { 15 | "aws-sdk": "^2.597.0", 16 | "fabric-client": "^1.4.10", 17 | "log4js": "^6.4.0" 18 | }, 19 | "license": "Apache-2.0" 20 | } 21 | -------------------------------------------------------------------------------- /ngo-events/listener/src/queue.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const AWS = require('aws-sdk'); 18 | const config = require("./config"); 19 | const logger = require("./logging").getLogger("queue"); 20 | 21 | /** 22 | event: { 23 | transactionId: event.tx_id, 24 | chaincode: event.chaincode_id, 25 | name: event.event_name, 26 | payload: "" + event.payload 27 | } 28 | */ 29 | async function putEvent(event) { 30 | const sqsClient = new AWS.SQS({ 31 | region: "us-east-1", 32 | apiVersion: '2012-11-05' 33 | }); 34 | 35 | const params = {}; 36 | const payloadJSON = JSON.parse(event.payload); 37 | 38 | const MessageBody = { 39 | type: event.name, 40 | transactionId: event.transactionId, 41 | donationAmount: payloadJSON.donationAmount, 42 | ngoRegistrationNumber: payloadJSON.ngoRegistrationNumber, 43 | createdBy: payloadJSON.createdBy, 44 | createdAt: payloadJSON.createdAt 45 | } 46 | params['MessageBody'] = JSON.stringify(MessageBody); 47 | params['QueueUrl'] = config.SQSQueueURL; 48 | 49 | await sqsClient.sendMessage(params).promise(); 50 | logger.info(`##### queue - putEvent '${event.name}'`); 51 | } 52 | 53 | module.exports = { putEvent }; -------------------------------------------------------------------------------- /ngo-events/listener/src/setupChannel.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const fs = require("fs"); 18 | const path = require("path"); 19 | const config = require("./config"); 20 | const setupClient = require("./setupFabricClient"); 21 | const logger = require("./logging").getLogger("setupChannel"); 22 | 23 | async function setupChannel() { 24 | 25 | logger.info("=== setupChannel start ==="); 26 | 27 | let client = await setupClient(); 28 | 29 | let channel = client.getChannel(config.channelName, false); 30 | if (channel == null) { 31 | channel = client.newChannel(config.channelName); 32 | } 33 | 34 | let peer = channel.getPeers()[0]; 35 | const pemfile = fs.readFileSync(path.resolve(__dirname, "./certs/managedblockchain-tls-chain.pem"), "utf8"); 36 | 37 | if (!peer) { 38 | let peerEndpoints = config.peerEndpoint.split(","); 39 | for (let i in peerEndpoints) { 40 | channel.addPeer(client.newPeer(peerEndpoints[i], {pem:pemfile})); 41 | // Additional peer settings: https://fabric-sdk-node.github.io/Channel.html#addPeer__anchor 42 | } 43 | } 44 | 45 | let orderer = channel.getOrderers()[0]; 46 | if (!orderer) { 47 | orderer = client.newOrderer(config.ordererEndpoint, {pem:pemfile}) 48 | channel.addOrderer(orderer); 49 | } 50 | 51 | logger.info("=== setupChannel end ==="); 52 | return channel; 53 | } 54 | 55 | module.exports = setupChannel; -------------------------------------------------------------------------------- /ngo-events/scripts/createFabricUser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | 17 | # This script registers and enrolls the user within the Fabric CA. It then uploads the generated credentials to AWS Secrets Manager. 18 | REGION=us-east-1 19 | FABRICUSER=eventListenerUser 20 | FABRICUSERPASSWORD=Welcome123 21 | CERTS_FOLDER=/tmp/certs 22 | PATH=$PATH:/home/ec2-user/go/src/github.com/hyperledger/fabric-ca/bin 23 | 24 | # Register and enroll 25 | fabric-ca-client register --id.name $FABRICUSER --id.affiliation $MEMBERNAME --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem --id.type user --id.secret $FABRICUSERPASSWORD 26 | fabric-ca-client enroll -u https://$FABRICUSER:$FABRICUSERPASSWORD@$CASERVICEENDPOINT --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem -M $CERTS_FOLDER/$FABRICUSER 27 | 28 | # Put the credentials on Secrets Manager 29 | aws secretsmanager create-secret --name "dev/fabricOrgs/$MEMBERNAME/$FABRICUSER/pk" --secret-string "`cat $CERTS_FOLDER/$FABRICUSER/keystore/*`" --region $REGION 30 | aws secretsmanager create-secret --name "dev/fabricOrgs/$MEMBERNAME/$FABRICUSER/signcert" --secret-string "`cat $CERTS_FOLDER/$FABRICUSER/signcerts/*`" --region $REGION -------------------------------------------------------------------------------- /ngo-events/scripts/deployHandler.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | # This script assumes PHONENUMBER has been set in the calling environment. If it hasn't, define it here: 17 | # PHONENUMBER=+15555555555 18 | 19 | REGION=us-east-1 20 | LISTENER_STACKNAME=fabric-event-listener 21 | STACKNAME=fabric-event-handler 22 | ROOT_FOLDER=~/non-profit-blockchain/ngo-events/ 23 | TEMPLATEFILE=$ROOT_FOLDER/templates/eventHandler.yaml 24 | SQS_QUEUE_ARN=$(aws cloudformation describe-stacks --stack-name $LISTENER_STACKNAME --query "Stacks[0].Outputs[?OutputKey=='SQSQUEUEARN'].OutputValue" --output text --region $REGION) 25 | 26 | echo Deploying Cloudformation template to provision the Lambda function and SNS subscription 27 | aws cloudformation deploy \ 28 | --stack-name $STACKNAME \ 29 | --capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM" "CAPABILITY_AUTO_EXPAND" \ 30 | --template-file $TEMPLATEFILE \ 31 | --region $REGION \ 32 | --parameter-overrides SQSQueueArn=$SQS_QUEUE_ARN PhoneNumber=$PHONENUMBER -------------------------------------------------------------------------------- /ngo-events/scripts/deployPrivateSubnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | REGION=us-east-1 17 | AZ=us-east-1d 18 | STACKNAME=private-subnet 19 | ROOT_FOLDER=~/non-profit-blockchain/ngo-events/ 20 | TEMPLATEFILE=$ROOT_FOLDER/templates/privateSubnet.yaml 21 | VPC_STACK_NAME=$NETWORKNAME-fabric-client-node 22 | VPCID=$(aws cloudformation describe-stacks --stack-name $VPC_STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='VPCID'].OutputValue" --output text --region $REGION) 23 | PUBLICSUBNETID=$(aws cloudformation describe-stacks --stack-name $VPC_STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='PublicSubnetID'].OutputValue" --output text --region $REGION ) 24 | 25 | echo Deploying Cloudformation template to provision the private subnet 26 | 27 | aws cloudformation deploy \ 28 | --stack-name $STACKNAME \ 29 | --capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM" "CAPABILITY_AUTO_EXPAND" \ 30 | --template-file $TEMPLATEFILE \ 31 | --region $REGION \ 32 | --parameter-overrides \ 33 | VPC=$VPCID \ 34 | PublicSubnetId=$PUBLICSUBNETID \ 35 | AvailabilityZone=$AZ -------------------------------------------------------------------------------- /ngo-events/scripts/gen-connection-profile.sh: -------------------------------------------------------------------------------- 1 | PROFILEDIR=../listener/src 2 | LOCALCA=/usr/src/app/certs/managedblockchain-tls-chain.pem 3 | 4 | #copy the connection profiles 5 | cp $PROFILEDIR/connection-profile-template.yaml $PROFILEDIR/connection-profile.yaml 6 | 7 | #update the connection profiles with endpoints and other information 8 | sed -i "s|%PEERNODEID%|$PEERNODEID|g" $PROFILEDIR/connection-profile.yaml 9 | sed -i "s|%MEMBERID%|$MEMBERID|g" $PROFILEDIR/connection-profile.yaml 10 | sed -i "s|%CAFILE%|$LOCALCA|g" $PROFILEDIR/connection-profile.yaml 11 | sed -i "s|%ORDERINGSERVICEENDPOINT%|$ORDERINGSERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml 12 | sed -i "s|%ORDERINGSERVICEENDPOINTNOPORT%|$ORDERINGSERVICEENDPOINTNOPORT|g" $PROFILEDIR/connection-profile.yaml 13 | sed -i "s|%PEERSERVICEENDPOINT%|$PEERSERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml 14 | sed -i "s|%PEERSERVICEENDPOINTNOPORT%|$PEERSERVICEENDPOINTNOPORT|g" $PROFILEDIR/connection-profile.yaml 15 | sed -i "s|%PEEREVENTENDPOINT%|$PEEREVENTENDPOINT|g" $PROFILEDIR/connection-profile.yaml 16 | sed -i "s|%CASERVICEENDPOINT%|$CASERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml -------------------------------------------------------------------------------- /ngo-events/templates/ecrImage.yaml: -------------------------------------------------------------------------------- 1 | Parameters: 2 | RepositoryName: 3 | Type: String 4 | 5 | Resources: 6 | EventListenerRepository: 7 | Type: AWS::ECR::Repository 8 | Properties: 9 | RepositoryName: !Ref RepositoryName -------------------------------------------------------------------------------- /ngo-fabric/amb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | echo Creating Amazon Managed Blockchain network, member and peer node 17 | aws cloudformation deploy --stack-name $STACKNAME --template-file amb.yaml \ 18 | --parameter-overrides PeerNodeAvailabilityZone=${REGION}a \ 19 | --capabilities CAPABILITY_NAMED_IAM \ 20 | --region $REGION 21 | -------------------------------------------------------------------------------- /ngo-fabric/cli/3a-client-node-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | sudo yum update -y 17 | sudo yum install -y telnet 18 | sudo yum -y install emacs 19 | sudo yum install -y docker 20 | sudo service docker start 21 | sudo usermod -a -G docker ec2-user -------------------------------------------------------------------------------- /ngo-fabric/docker-compose-cli.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | version: '2' 15 | services: 16 | cli: 17 | container_name: cli 18 | image: hyperledger/fabric-tools:1.2.0 19 | tty: true 20 | environment: 21 | - GOPATH=/opt/gopath 22 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 23 | - CORE_LOGGING_LEVEL=info # Set logging level to debug for more verbose logging 24 | - CORE_PEER_ID=cli 25 | - CORE_CHAINCODE_KEEPALIVE=10 26 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 27 | command: /bin/bash 28 | volumes: 29 | - /var/run/:/host/var/run/ 30 | - /home/ec2-user/fabric-samples/chaincode:/opt/gopath/src/github.com/ 31 | - /home/ec2-user:/opt/home -------------------------------------------------------------------------------- /ngo-identity/Blockchain Identity Components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-identity/Blockchain Identity Components.png -------------------------------------------------------------------------------- /ngo-identity/Blockchain Identity Sequence Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-identity/Blockchain Identity Sequence Diagram.png -------------------------------------------------------------------------------- /ngo-identity/chaincode/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngo", 3 | "version": "0.0.1", 4 | "description": "ngo node.js", 5 | "engines": { 6 | "node": ">=8.4.0", 7 | "npm": ">=5.3.0" 8 | }, 9 | "scripts": { 10 | "start": "node ngo.js" 11 | }, 12 | "engine-strict": true, 13 | "license": "Apache-2.0", 14 | "dependencies": { 15 | "fabric-shim": "^1.2.4" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ngo-lambda/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | .DS_Store 3 | connection-profile.yaml -------------------------------------------------------------------------------- /ngo-lambda/Lambda API AMB Workshop Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-lambda/Lambda API AMB Workshop Diagram.png -------------------------------------------------------------------------------- /ngo-lambda/connection-profile-template.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | name: "ngo" 15 | x-type: "hlfv1" 16 | description: "NGO Network" 17 | version: "1.0" 18 | 19 | channels: 20 | mychannel: 21 | orderers: 22 | - orderer.com 23 | peers: 24 | peer1: 25 | endorsingPeer: true 26 | chaincodeQuery: true 27 | ledgerQuery: true 28 | eventSource: true 29 | 30 | organizations: 31 | Org1: 32 | mspid: %MEMBERID% 33 | peers: 34 | - peer1 35 | certificateAuthorities: 36 | - ca-org1 37 | 38 | orderers: 39 | orderer.com: 40 | url: grpcs://%ORDERINGSERVICEENDPOINT% 41 | grpcOptions: 42 | ssl-target-name-override: %ORDERINGSERVICEENDPOINTNOPORT% 43 | tlsCACerts: 44 | path: %CAFILE% 45 | 46 | peers: 47 | peer1: 48 | url: grpcs://%PEERSERVICEENDPOINT% 49 | eventUrl: grpcs://%PEEREVENTENDPOINT% 50 | grpcOptions: 51 | ssl-target-name-override: %PEERSERVICEENDPOINTNOPORT% 52 | tlsCACerts: 53 | path: %CAFILE% 54 | 55 | certificateAuthorities: 56 | ca-org1: 57 | url: https://%CASERVICEENDPOINT% 58 | httpOptions: 59 | verify: false 60 | tlsCACerts: 61 | path: %CAFILE% 62 | caName: %MEMBERID% -------------------------------------------------------------------------------- /ngo-lambda/createFabricUser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | 17 | # This script registers and enrolls the user within the Fabric CA. It then uploads the generated credentials to AWS Secrets Manager. 18 | export CERTS_FOLDER=/tmp/certs 19 | export PATH=$PATH:/home/ec2-user/go/src/github.com/hyperledger/fabric-ca/bin 20 | 21 | # Register and enroll 22 | fabric-ca-client register --id.name $FABRICUSER --id.affiliation $MEMBERNAME --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem --id.type user --id.secret $FABRICUSERPASSWORD 23 | fabric-ca-client enroll -u https://$FABRICUSER:$FABRICUSERPASSWORD@$CASERVICEENDPOINT --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem -M $CERTS_FOLDER/$FABRICUSER 24 | 25 | # Put the credentials on Secrets Manager 26 | aws secretsmanager create-secret --name "dev/fabricOrgs/$MEMBERNAME/$FABRICUSER/pk" --secret-string "`cat $CERTS_FOLDER/$FABRICUSER/keystore/*`" --region $REGION 27 | aws secretsmanager create-secret --name "dev/fabricOrgs/$MEMBERNAME/$FABRICUSER/signcert" --secret-string "`cat $CERTS_FOLDER/$FABRICUSER/signcerts/*`" --region $REGION -------------------------------------------------------------------------------- /ngo-lambda/gen-connection-profile.sh: -------------------------------------------------------------------------------- 1 | PROFILEDIR=./src/ 2 | LOCALCA=~/managedblockchain-tls-chain.pem 3 | 4 | #copy the connection profiles 5 | cp ./connection-profile-template.yaml $PROFILEDIR/connection-profile.yaml 6 | 7 | #update the connection profiles with endpoints and other information 8 | sed -i "s|%PEERNODEID%|$PEERNODEID|g" $PROFILEDIR/connection-profile.yaml 9 | sed -i "s|%MEMBERID%|$MEMBERID|g" $PROFILEDIR/connection-profile.yaml 10 | sed -i "s|%CAFILE%|$LOCALCA|g" $PROFILEDIR/connection-profile.yaml 11 | sed -i "s|%ORDERINGSERVICEENDPOINT%|$ORDERINGSERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml 12 | sed -i "s|%ORDERINGSERVICEENDPOINTNOPORT%|$ORDERINGSERVICEENDPOINTNOPORT|g" $PROFILEDIR/connection-profile.yaml 13 | sed -i "s|%PEERSERVICEENDPOINT%|$PEERSERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml 14 | sed -i "s|%PEERSERVICEENDPOINTNOPORT%|$PEERSERVICEENDPOINTNOPORT|g" $PROFILEDIR/connection-profile.yaml 15 | sed -i "s|%PEEREVENTENDPOINT%|$PEEREVENTENDPOINT|g" $PROFILEDIR/connection-profile.yaml 16 | sed -i "s|%CASERVICEENDPOINT%|$CASERVICEENDPOINT|g" $PROFILEDIR/connection-profile.yaml -------------------------------------------------------------------------------- /ngo-lambda/src/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /ngo-lambda/src/certs/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /ngo-lambda/src/config.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | let configObject = { 18 | "caEndpoint": process.env.CA_ENDPOINT || "localhost:7054", 19 | "peerEndpoint": process.env.PEER_ENDPOINT || "grpc://localhost:7051", 20 | "ordererEndpoint": process.env.ORDERER_ENDPOINT || "grpc://localhost:7050", 21 | "channelName": process.env.CHANNEL_NAME || "mychannel", 22 | "chaincodeId": process.env.CHAIN_CODE_ID || "ngo", 23 | "cryptoFolder": process.env.CRYPTO_FOLDER || '/tmp', 24 | "mspID": process.env.MSP || 'm-1A2B3CXXXXXXXX', 25 | "memberName": process.env.MEMBERNAME || "org1" 26 | } 27 | 28 | module.exports = configObject; -------------------------------------------------------------------------------- /ngo-lambda/src/logging.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const log4js = require('log4js'); 18 | 19 | log4js.configure({ 20 | appenders: { 21 | out: { type: 'stdout' }, 22 | }, 23 | categories: { 24 | default: { appenders: ['out'], level: 'debug' }, 25 | } 26 | }); 27 | 28 | module.exports = log4js; -------------------------------------------------------------------------------- /ngo-lambda/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngo-lambda", 3 | "version": "1.0.0", 4 | "description": "A Lambda function to execute transactions against Amazon Managed Blockchain", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=10.0.0 <12", 8 | "npm": ">=6.0.0" 9 | }, 10 | "license": "Apache-2.0", 11 | "dependencies": { 12 | "aws-sdk": "^2.1354.0", 13 | "fabric-client": "~1.4.20", 14 | "log4js": "^6.4.0" 15 | }, 16 | "author": "Emile Baizel", 17 | "scripts": { 18 | "install": "find ./node_modules/* -mtime +10950 -exec touch {} \\;" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ngo-lambda/src/queryEvents.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | 'use strict'; 18 | 19 | const setupChannel = require("./setupChannel"); 20 | const logger = require("./logging").getLogger("queryEvents"); 21 | 22 | async function queryEventsHandler(transactionId) { 23 | logger.info("=== Query Events Function Start ==="); 24 | 25 | // send the query proposal to the peer 26 | let channel = await setupChannel(); 27 | return channel.queryTransaction(transactionId) 28 | .then((processedTransaction) => { 29 | logger.info("Query events has completed, with result: ", processedTransaction); 30 | logger.info("=== Query Events Function End ==="); 31 | return processedTransaction; 32 | }).catch((err) => { 33 | logger.error('Failed to query events successfully :: ' + err); 34 | throw err; 35 | }); 36 | } 37 | 38 | module.exports = { 39 | queryEventsHandler 40 | } -------------------------------------------------------------------------------- /ngo-lambda/src/setupChannel.js: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | const fs = require("fs"); 18 | const path = require("path"); 19 | const config = require("./config"); 20 | const setupClient = require("./setupFabricClient"); 21 | const logger = require("./logging").getLogger("setupChannel"); 22 | 23 | async function setupChannel() { 24 | 25 | logger.info("=== setupChannel start ==="); 26 | 27 | let client = await setupClient(); 28 | 29 | let channel = client.getChannel(config.channelName, false); 30 | if (channel == null) { 31 | channel = client.newChannel(config.channelName); 32 | } 33 | 34 | let peer = channel.getPeers()[0]; 35 | const pemfile = fs.readFileSync(path.resolve(__dirname, "./certs/managedblockchain-tls-chain.pem"), "utf8"); 36 | 37 | if (!peer) { 38 | let peerEndpoints = config.peerEndpoint.split(","); 39 | for (let i in peerEndpoints) { 40 | channel.addPeer(client.newPeer(peerEndpoint[i], {pem:pemfile})); 41 | // Additional peer settings: https://fabric-sdk-node.github.io/Channel.html#addPeer__anchor 42 | } 43 | } 44 | 45 | let orderer = channel.getOrderers()[0]; 46 | if (!orderer) { 47 | orderer = client.newOrderer(config.ordererEndpoint, {pem:pemfile}) 48 | channel.addOrderer(orderer); 49 | } 50 | 51 | logger.info("=== setupChannel end ==="); 52 | return channel; 53 | } 54 | 55 | module.exports = setupChannel; -------------------------------------------------------------------------------- /ngo-rest-api/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "host":"localhost", 3 | "port":"3000", 4 | "channelName":"mychannel", 5 | "chaincodeName":"ngo", 6 | "eventWaitTime":"30000", 7 | "peers":[ 8 | "peer1" 9 | ], 10 | "admins":[ 11 | { 12 | "username":"admin", 13 | "secret":"Adminpwd1!" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /ngo-rest-api/connection-profile/client-org1.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | name: "ngo-org1" 15 | x-type: "hlfv1" 16 | description: "NGO client definition for Org1" 17 | version: "1.0" 18 | client: 19 | organization: Org1 20 | credentialStore: 21 | path: "./fabric-client-certs-org1" 22 | cryptoStore: 23 | path: "./fabric-client-keys-org1" 24 | 25 | -------------------------------------------------------------------------------- /ngo-rest-api/connection-profile/gen-connection-profile-local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | # This script uses the template ngo-connection-profile.json to generate a connection profile 17 | # for the organisations in the Fabric network. 18 | 19 | #REPODIR points to this repo. 20 | REPODIR=~/Documents/apps/non-profit-blockchain 21 | 22 | #CERTDIR points to the location of the fabric-samples repo. If you are using this to run Fabric, the crypto information 23 | #would have been generated in the first-network/crypto-config folder. 24 | CERTDIR=~/Documents/apps/fabric-samples 25 | 26 | #copy the connection profiles 27 | mkdir -p $REPODIR/tmp/connection-profile/org1 28 | mkdir -p $REPODIR/tmp/connection-profile/org2 29 | cp ngo-connection-profile.yaml $REPODIR/tmp/connection-profile 30 | cp client-org1.yaml $REPODIR/tmp/connection-profile/org1 31 | cp client-org2.yaml $REPODIR/tmp/connection-profile/org2 32 | 33 | #update the connection profiles to refer to the location of the Fabric crypto information 34 | if [[ "$OSTYPE" == "darwin"* ]]; then 35 | sed -e "s|%REPODIR%|$CERTDIR|g" ngo-connection-profile.yaml > $REPODIR/tmp/connection-profile/ngo-connection-profile.yaml 36 | else 37 | sed -i "s|%REPODIR%|$CERTDIR|g" $REPODIR/tmp/connection-profile/ngo-connection-profile.yaml 38 | fi 39 | 40 | ls -lR $REPODIR/tmp/connection-profile -------------------------------------------------------------------------------- /ngo-rest-api/connection-profile/ngo-connection-profile-template.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | name: "ngo" 15 | x-type: "hlfv1" 16 | description: "NGO Network" 17 | version: "1.0" 18 | 19 | channels: 20 | mychannel: 21 | orderers: 22 | - orderer.com 23 | peers: 24 | peer1: 25 | endorsingPeer: true 26 | chaincodeQuery: true 27 | ledgerQuery: true 28 | eventSource: true 29 | 30 | organizations: 31 | Org1: 32 | mspid: %MEMBERID% 33 | peers: 34 | - peer1 35 | certificateAuthorities: 36 | - ca-org1 37 | 38 | orderers: 39 | orderer.com: 40 | url: grpcs://%ORDERINGSERVICEENDPOINT% 41 | grpcOptions: 42 | ssl-target-name-override: %ORDERINGSERVICEENDPOINTNOPORT% 43 | tlsCACerts: 44 | path: %CAFILE% 45 | 46 | peers: 47 | peer1: 48 | url: grpcs://%PEERSERVICEENDPOINT% 49 | eventUrl: grpcs://%PEEREVENTENDPOINT% 50 | grpcOptions: 51 | ssl-target-name-override: %PEERSERVICEENDPOINTNOPORT% 52 | tlsCACerts: 53 | path: %CAFILE% 54 | 55 | certificateAuthorities: 56 | ca-org1: 57 | url: https://%CASERVICEENDPOINT% 58 | httpOptions: 59 | verify: false 60 | tlsCACerts: 61 | path: %CAFILE% 62 | registrar: 63 | - enrollId: %ADMINUSER% 64 | enrollSecret: %ADMINPWD% 65 | caName: %MEMBERID% -------------------------------------------------------------------------------- /ngo-rest-api/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-rest-api/package-lock.json -------------------------------------------------------------------------------- /ngo-rest-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngo-rest-api", 3 | "version": "1.0.0", 4 | "description": "A REST api supporting the NGO application", 5 | "main": "app.js", 6 | "scripts": { 7 | "start": "node app.js" 8 | }, 9 | "engines": { 10 | "node": ">=14.0.0 <15.0", 11 | "npm": ">=6.14.0 <7.0" 12 | }, 13 | "license": "Apache-2.0", 14 | "dependencies": { 15 | "body-parser": "^1.17.1", 16 | "cookie-parser": "^1.4.3", 17 | "cors": "^2.8.3", 18 | "express": "^4.17.3", 19 | "express-session": "^1.15.2", 20 | "fabric-ca-client": "^1.4.20", 21 | "fabric-client": "^1.4.20", 22 | "fs-extra": "^2.0.0", 23 | "log4js": "^6.4.0", 24 | "uuid": "^3.3.2", 25 | "ws": "^6.2.2" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ngo-rest-api/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | 16 | # Clears the key stores before starting the Node app 17 | 18 | rm -rf /tmp/fabric-client-kv-org1/ 19 | rm -rf fabric-client-kv-org1/ 20 | rm -rf /tmp/fabric-client-kv-org2/ 21 | rm -rf fabric-client-kv-org2/ 22 | node app.js -------------------------------------------------------------------------------- /ngo-ui/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /ngo-ui/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to ngo-blockchain!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /ngo-ui/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ngo-ui/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /ngo-ui/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/package-lock.json -------------------------------------------------------------------------------- /ngo-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngo-blockchain", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve --host 0.0.0.0 --port 8080 --disableHostCheck", 7 | "build": "ng build --prod", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~7.0.0", 15 | "@angular/common": "~7.0.0", 16 | "@angular/compiler": "~7.0.0", 17 | "@angular/core": "~7.0.0", 18 | "@angular/forms": "~7.0.0", 19 | "@angular/http": "~7.0.0", 20 | "@angular/platform-browser": "~7.0.0", 21 | "@angular/platform-browser-dynamic": "~7.0.0", 22 | "@angular/router": "~7.0.0", 23 | "bootstrap": "^4.6.0", 24 | "core-js": "^2.6.12", 25 | "d3": "^5.16.0", 26 | "font-awesome": "^4.7.0", 27 | "jquery": "^3.6.0", 28 | "popper.js": "^1.14.4", 29 | "rxjs": "^6.6.6", 30 | "underscore": "^1.12.1", 31 | "zone.js": "~0.8.26" 32 | }, 33 | "devDependencies": { 34 | "@angular-devkit/build-angular": "^15.2.7", 35 | "@angular/cli": "~7.0.1", 36 | "@angular/compiler-cli": "~7.2.16", 37 | "@angular/language-service": "~7.0.0", 38 | "@types/bootstrap": "^4.6.0", 39 | "@types/d3": "^5.16.4", 40 | "@types/jasmine": "^2.8.17", 41 | "@types/jasminewd2": "~2.0.3", 42 | "@types/node": "~8.9.4", 43 | "codelyzer": "~4.5.0", 44 | "jasmine-core": "~2.99.1", 45 | "jasmine-spec-reporter": "~4.2.1", 46 | "karma": "^6.2.0", 47 | "karma-chrome-launcher": "~2.2.0", 48 | "karma-coverage-istanbul-reporter": "~2.0.1", 49 | "karma-jasmine": "~1.1.2", 50 | "karma-jasmine-html-reporter": "^0.2.2", 51 | "protractor": "^7.0.0", 52 | "serialize-javascript": "^3.1.0", 53 | "tree-kill": "~1.2.2", 54 | "ts-node": "~7.0.0", 55 | "tslint": "~5.11.0", 56 | "typescript": "^3.1.8" 57 | }, 58 | "resolutions": { 59 | "tree-kill": "^1.2.2", 60 | "serialize-javascript": "^3.0.0" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /ngo-ui/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | import { NgModule, ModuleWithProviders } from '@angular/core'; 18 | import { Routes, RouterModule } from '@angular/router'; 19 | import { DashboardComponent } from './ui/dashboard/dashboard.component'; 20 | import { NgoDetailsComponent } from './ui/ngo-details/ngo-details.component'; 21 | import { NgosListComponent } from './ui/ngos-list/ngos-list.component'; 22 | import { DonateComponent } from './ui/donate/donate.component'; 23 | import { SigninComponent } from './ui/signin/signin.component'; 24 | import { SignupComponent } from './ui/signup/signup.component'; 25 | 26 | const routes: Routes = [ 27 | { path: '', redirectTo: 'signin', pathMatch: 'full' }, 28 | { path: 'signup', component: SignupComponent }, 29 | { path: 'signin', component: SigninComponent }, 30 | { path: 'ngolist', component: NgosListComponent }, 31 | { path: 'details/:id', component: NgoDetailsComponent }, 32 | { path: 'donate/:id', component: DonateComponent }, 33 | { path: 'dashboard', component: DashboardComponent }, 34 | ]; 35 | @NgModule({ 36 | imports: [RouterModule.forRoot(routes)], 37 | exports: [RouterModule] 38 | }) 39 | export class AppRoutingModule { } 40 | -------------------------------------------------------------------------------- /ngo-ui/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ngo-ui/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { TestBed, async } from '@angular/core/testing'; 17 | import { RouterTestingModule } from '@angular/router/testing'; 18 | import { AppComponent } from './app.component'; 19 | 20 | describe('AppComponent', () => { 21 | beforeEach(async(() => { 22 | TestBed.configureTestingModule({ 23 | imports: [ 24 | RouterTestingModule 25 | ], 26 | declarations: [ 27 | AppComponent 28 | ], 29 | }).compileComponents(); 30 | })); 31 | 32 | it('should create the app', () => { 33 | const fixture = TestBed.createComponent(AppComponent); 34 | const app = fixture.debugElement.componentInstance; 35 | expect(app).toBeTruthy(); 36 | }); 37 | 38 | it(`should have as title 'ngo-blockchain'`, () => { 39 | const fixture = TestBed.createComponent(AppComponent); 40 | const app = fixture.debugElement.componentInstance; 41 | expect(app.title).toEqual('ngo-blockchain'); 42 | }); 43 | 44 | it('should render title in a h1 tag', () => { 45 | const fixture = TestBed.createComponent(AppComponent); 46 | fixture.detectChanges(); 47 | const compiled = fixture.debugElement.nativeElement; 48 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to ngo-blockchain!'); 49 | }); 50 | }); 51 | -------------------------------------------------------------------------------- /ngo-ui/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | import { DonorService } from 'src/app/services/shared'; 18 | 19 | @Component({ 20 | selector: 'app-root', 21 | templateUrl: './app.component.html', 22 | styleUrls: ['./app.component.scss'] 23 | }) 24 | export class AppComponent implements OnInit { 25 | title = 'ngo-blockchain'; 26 | 27 | constructor( 28 | private donorService: DonorService 29 | ) { } 30 | 31 | 32 | ngOnInit() { 33 | this.donorService.populate(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ngo-ui/src/app/models/donation.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | import * as uuid from 'uuid'; 18 | 19 | class Donation { 20 | id: string = null; 21 | Donor_id: string = null; 22 | ngo_id: string = null; 23 | ngo_name: string = null; 24 | project_id: string = null; 25 | status: string = null; 26 | amount = 0; 27 | utilized = 0; 28 | transaction_id: string = null; 29 | date: Date = null; 30 | } 31 | class Donate { 32 | donationId: string = null; 33 | donationAmount: number = null; 34 | donationDate: string = null; 35 | donorUserName: string = null; 36 | ngoRegistrationNumber: string = null; 37 | constructor() { 38 | 39 | } 40 | 41 | set(donationAmount: number, donor: string, ngo: string) { 42 | this.donationId = uuid.v4(); 43 | this.donationAmount = donationAmount; 44 | this.donationDate = ''; 45 | this.donorUserName = donor; 46 | this.ngoRegistrationNumber = ngo; 47 | return this; 48 | } 49 | 50 | toString() { 51 | try { 52 | return JSON.stringify(this); 53 | } catch (error) { 54 | // do nothing; 55 | } 56 | return null; 57 | } 58 | } 59 | export { Donation, Donate }; 60 | -------------------------------------------------------------------------------- /ngo-ui/src/app/models/donor.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export class Donor { 17 | id: string = null; 18 | name: string = null; 19 | email: string = null; 20 | password: string = null; 21 | 22 | constructor() { } 23 | 24 | 25 | get(name: string, email: string) { 26 | this.name = name; 27 | this.email = email; 28 | this.id = name; 29 | return this; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ngo-ui/src/app/models/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | export { Donation } from './donation.model'; 18 | export { Donate } from './donation.model'; 19 | export { Donor } from './donor.model'; 20 | export { Ngo } from './ngo.model'; 21 | export { Rating } from './ngo.model'; 22 | export { Project } from './project.model'; 23 | -------------------------------------------------------------------------------- /ngo-ui/src/app/models/project.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export class Project { 17 | id: string = null; 18 | ngo_id: string = null; 19 | details: string = null; 20 | gallary_url: string = null; 21 | donation: number = null; 22 | fund_utilized: number = null; 23 | address: string = null; 24 | country: string = null; 25 | is_completed = false; 26 | star_date: Date = null; 27 | end_date: Date = null; 28 | } 29 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/blockchain.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Injectable } from '@angular/core'; 17 | 18 | @Injectable({ 19 | providedIn: 'root' 20 | }) 21 | export class BlockchainService { 22 | 23 | constructor() { } 24 | } 25 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/donate.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Injectable } from '@angular/core'; 17 | import { ApiService } from './shared'; 18 | import { Donate } from '../models'; 19 | 20 | @Injectable({ 21 | providedIn: 'root' 22 | }) 23 | export class DonateService { 24 | 25 | constructor(private apiService: ApiService) { } 26 | 27 | makeDonation(ngoName: string, DonorUserName: string, donationAmount: number) { 28 | const donate = new Donate().set(donationAmount, DonorUserName, ngoName); 29 | donate.donationDate = new Date().toISOString(); 30 | const path = `donations`; 31 | return this.apiService.post(path, donate); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export * from './dashboard.service'; 17 | export * from './donate.service'; 18 | export * from './ngo.service'; 19 | export * from './blockchain.service'; 20 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/shared/auth.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Injectable, Injector } from '@angular/core'; 17 | import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; 18 | import { DonorService } from './donor.service'; 19 | import { Observable } from 'rxjs'; 20 | 21 | @Injectable({ 22 | providedIn: 'root' 23 | }) 24 | export class AuthService { 25 | 26 | constructor( 27 | private router: Router, 28 | public injector: Injector 29 | ) { } 30 | 31 | canActivate( 32 | route: ActivatedRouteSnapshot, 33 | state: RouterStateSnapshot 34 | ): Observable { 35 | const donorService = this.injector.get(DonorService); 36 | return donorService.isAuthenticated; 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/shared/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export * from './api.service'; 17 | export * from './auth.service'; 18 | export * from './session.service'; 19 | export * from './socket.service'; 20 | export * from './donor.service'; 21 | export * from './utils.service'; 22 | -------------------------------------------------------------------------------- /ngo-ui/src/app/services/shared/socket.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Injectable, EventEmitter } from '@angular/core'; 17 | import { Observable, Subject, Observer } from 'rxjs'; 18 | 19 | @Injectable({ 20 | providedIn: 'root' 21 | }) 22 | export class SocketService { 23 | private subject: Subject; 24 | private subjectData: Subject; 25 | public messages: Subject = new Subject(); 26 | private ws: any; 27 | newMessage = new EventEmitter(); 28 | 29 | public connect(url: string): Subject { 30 | if (!this.subject) { 31 | this.subject = this.create(url); 32 | } 33 | return this.subject; 34 | } 35 | 36 | private create(url: string): Subject { 37 | this.ws = new WebSocket(url); 38 | 39 | const observable = Observable.create( 40 | (obs: Observer) => { 41 | this.ws.onmessage = obs.next.bind(obs); 42 | this.ws.onerror = obs.error.bind(obs); 43 | this.ws.onclose = obs.complete.bind(obs); 44 | return this.ws.close.bind(this.ws); 45 | }); 46 | 47 | const observer = { 48 | next: (data: Object) => { 49 | if (this.ws.readyState === WebSocket.OPEN) { 50 | this.ws.send(JSON.stringify(data)); 51 | } 52 | } 53 | }; 54 | return Subject.create(observer, observable); 55 | } 56 | 57 | public close() { 58 | this.ws.close(); 59 | this.subject = null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/blockchain-progress/blockchain-progress.component.html: -------------------------------------------------------------------------------- 1 | 18 |
19 |
20 |
    21 |
  • 22 | 23 |
  • 24 |
  • 25 | 26 |
  • 27 |
28 |
29 |
Blockchain Events
30 |
31 |
    32 |
  1. 33 | 34 | Block: 36 | {{item.caption}} 37 |
  2. 38 |
39 | 40 |
41 |
42 |
43 |
44 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/blockchain-progress/blockchain-progress.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { BlockchainProgressComponent } from './blockchain-progress.component'; 19 | 20 | describe('BlockchainProgressComponent', () => { 21 | let component: BlockchainProgressComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ BlockchainProgressComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(BlockchainProgressComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/blockchain-progress/blockchain.interface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export interface Block { 17 | caption: string; 18 | date: Date; 19 | title: string; 20 | selected: boolean; 21 | content: string; 22 | txCount: number; 23 | txInBlock: Array; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/donorchart/contribution.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export interface Contribution { 17 | id: number; 18 | donation: string; 19 | donorName: string; 20 | type: any; 21 | } 22 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/donorchart/donorchart.component.html: -------------------------------------------------------------------------------- 1 | 18 |
19 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/donorchart/donorchart.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | // .wrapper{ 17 | // display: inline-block; 18 | // position: relative; 19 | // width: 100%; 20 | // } 21 | 22 | .pie-chart { 23 | width: 100%; 24 | display: inline-block; 25 | // position: absolute; 26 | // top:0px; 27 | height: 400px !important; 28 | 29 | /deep/ path { 30 | stroke: #fff; 31 | stroke-width: 2; 32 | } 33 | /deep/ .totalspend{ 34 | font-size: 1.6em; 35 | } 36 | 37 | /deep/ .label{ 38 | font-size: 1.2em; 39 | } 40 | 41 | /deep/ .percent{ 42 | font-size: 1.4em; 43 | } 44 | } 45 | 46 | .legend{ 47 | font-weight: bold; 48 | 49 | .item{ 50 | padding: 0 30px; 51 | 52 | .circle{ 53 | height: 30px; 54 | width: 30px; 55 | border-radius: 50%; 56 | margin-right: 5px; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/donorchart/donorchart.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { DonorchartComponent } from './Donorchart.component'; 19 | 20 | describe('DonorchartComponent', () => { 21 | let component: DonorchartComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [DonorchartComponent] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(DonorchartComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/gallery/gallery.component.html: -------------------------------------------------------------------------------- 1 | 18 | 35 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/gallery/gallery.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/gallery/gallery.component.spec.ts: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | # 16 | */ 17 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 18 | 19 | import { GalleryComponent } from './gallery.component'; 20 | 21 | describe('GalleryComponent', () => { 22 | let component: GalleryComponent; 23 | let fixture: ComponentFixture; 24 | 25 | beforeEach(async(() => { 26 | TestBed.configureTestingModule({ 27 | declarations: [ GalleryComponent ] 28 | }) 29 | .compileComponents(); 30 | })); 31 | 32 | beforeEach(() => { 33 | fixture = TestBed.createComponent(GalleryComponent); 34 | component = fixture.componentInstance; 35 | fixture.detectChanges(); 36 | }); 37 | 38 | it('should create', () => { 39 | expect(component).toBeTruthy(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/gallery/gallery.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit, Input, ChangeDetectorRef, AfterViewInit } from '@angular/core'; 17 | 18 | @Component({ 19 | selector: 'app-gallery', 20 | templateUrl: './gallery.component.html', 21 | styleUrls: ['./gallery.component.scss'] 22 | }) 23 | 24 | 25 | export class GalleryComponent implements AfterViewInit { 26 | 27 | 28 | images = []; 29 | private _itemId: any; 30 | @Input() 31 | set itemId(value: any) { 32 | this._itemId = value; 33 | this._cdr.detectChanges(); 34 | this.ngAfterViewInit(); 35 | } 36 | 37 | constructor(private _cdr: ChangeDetectorRef) { } 38 | 39 | ngAfterViewInit() { 40 | this.images = [ 41 | `assets/images/${this._itemId}/activities/01.jpg`, 42 | `assets/images/${this._itemId}/activities/02.jpg`, 43 | `assets/images/${this._itemId}/activities/03.jpg`, 44 | `assets/images/${this._itemId}/activities/04.jpg`, 45 | ]; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/rating/rating.component.html: -------------------------------------------------------------------------------- 1 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/rating/rating.component.scss: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). 6 | # You may not use this file except in compliance with the License. 7 | # A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the "license" file accompanying this file. This file is distributed 12 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | # express or implied. See the License for the specific language governing 14 | # permissions and limitations under the License. 15 | # 16 | */ 17 | 18 | .rating { 19 | float: left; 20 | min-width: 84px; 21 | &:not(:checked) { 22 | > { 23 | input { 24 | position: absolute; 25 | top: -100000px; 26 | clip: rect(0, 0, 0, 0); 27 | } 28 | span { 29 | float: right; 30 | width: 1em; 31 | padding: 0.1em; 32 | overflow: hidden; 33 | white-space: nowrap; 34 | cursor: pointer; 35 | font-size: 110%; 36 | line-height: 1.2; 37 | color: #ddd; 38 | &:before { 39 | content: '★'; 40 | } 41 | } 42 | } 43 | > span:hover { 44 | color: #ffc107; 45 | ~ span { 46 | color: #ffc107; 47 | } 48 | } 49 | } 50 | > input:checked ~ span { 51 | color: #ffc107; 52 | } 53 | > { 54 | span:checked ~ span:hover { 55 | color: #ffc107; 56 | ~ span { 57 | color: #ffc107; 58 | } 59 | } 60 | span:hover ~ input:checked ~ span { 61 | color: #ffc107; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/rating/rating.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { RatingComponent } from './rating.component'; 19 | 20 | describe('RatingComponent', () => { 21 | let component: RatingComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ RatingComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(RatingComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/components/rating/rating.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, Input, Injectable, Output, EventEmitter, OnInit } from '@angular/core'; 17 | 18 | 19 | @Injectable() 20 | export class RatingService { 21 | ratingClick = new EventEmitter(); 22 | } 23 | @Component({ 24 | selector: 'app-star-rating', 25 | templateUrl: './rating.component.html', 26 | styleUrls: ['./rating.component.scss'] 27 | }) 28 | export class RatingComponent implements OnInit { 29 | 30 | @Input() rating: number; 31 | @Input() itemId: string; 32 | @Input() iseditable: false; 33 | 34 | inputName: string; 35 | 36 | constructor(private ratingService: RatingService) { } 37 | 38 | ngOnInit() { 39 | this.inputName = this.itemId + '_rating'; 40 | } 41 | 42 | onClick(rating: number): void { 43 | if (this.iseditable) { 44 | this.rating = rating; 45 | this.ratingService.ratingClick.emit({ 46 | itemId: this.itemId, 47 | rating: rating 48 | }); 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/dashboard/dashboard.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/dashboard/dashboard.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { DashboardComponent } from './dashboard.component'; 19 | 20 | describe('DashboardComponent', () => { 21 | let component: DashboardComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ DashboardComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(DashboardComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/donate/donate.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/donate/donate.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { DonateComponent } from './donate.component'; 19 | 20 | describe('DonateComponent', () => { 21 | let component: DonateComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ DonateComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(DonateComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/donate/donate.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | 18 | @Component({ 19 | selector: 'app-donate', 20 | templateUrl: './donate.component.html', 21 | styleUrls: ['./donate.component.scss'] 22 | }) 23 | export class DonateComponent implements OnInit { 24 | 25 | constructor() { } 26 | 27 | ngOnInit() { 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/ngo-details/ngo-details.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/ngo-details/ngo-details.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { NgoDetailsComponent } from './ngo-details.component'; 19 | 20 | describe('NgoDetailsComponent', () => { 21 | let component: NgoDetailsComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ NgoDetailsComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(NgoDetailsComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/ngos-list/ngos-list.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | .wrapper{ 17 | display: inline-block; 18 | position: relative; 19 | width: 100%; 20 | // height: 900px; 21 | } 22 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/ngos-list/ngos-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { NgosListComponent } from './ngos-list.component'; 19 | 20 | describe('NgosListComponent', () => { 21 | let component: NgosListComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ NgosListComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(NgosListComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/blockchain/blockchain.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/blockchain/blockchain.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/blockchain/blockchain.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { BlockchainComponent } from './blockchain.component'; 19 | 20 | describe('BlockchainComponent', () => { 21 | let component: BlockchainComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ BlockchainComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(BlockchainComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/breadcrumb/breadcrumb.component.html: -------------------------------------------------------------------------------- 1 | 18 |
19 | 27 |
28 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/breadcrumb/breadcrumb.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/breadcrumb/breadcrumb.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { BreadcrumbComponent } from './breadcrumb.component'; 19 | 20 | describe('BreadcrumbComponent', () => { 21 | let component: BreadcrumbComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ BreadcrumbComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(BreadcrumbComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/breadcrumb/breadcrumb.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit, Injectable } from '@angular/core'; 17 | import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; 18 | import { BreadCrumb } from './breadcrumb.interface'; 19 | 20 | @Component({ 21 | selector: 'app-breadcrumb', 22 | templateUrl: './breadcrumb.component.html', 23 | styleUrls: ['./breadcrumb.component.scss'] 24 | }) 25 | export class BreadcrumbComponent implements OnInit { 26 | breadcrumbs: Array = [{ label: 'Dashboard', url: '/dashboard' }]; 27 | constructor(private router: Router, activatedRoute: ActivatedRoute) { 28 | this.router.events.subscribe(e => { 29 | if (e instanceof NavigationEnd) { 30 | this.buildBreadCrumb(e.url); 31 | } 32 | }); 33 | } 34 | 35 | ngOnInit() { 36 | } 37 | 38 | buildBreadCrumb(url) { 39 | const label = url.split('/')[1]; 40 | const nextUrl = url; 41 | const breadcrumb = { 42 | label: label, 43 | url: nextUrl 44 | }; 45 | let previousState: Array = []; 46 | previousState = previousState.concat(this.breadcrumbs); 47 | 48 | let newState: Array = []; 49 | 50 | for (const item of previousState) { 51 | if (item && nextUrl === item.url) { 52 | break; 53 | } 54 | newState = newState.concat([item]); 55 | } 56 | newState = newState.concat([breadcrumb]); 57 | this.breadcrumbs = newState; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/breadcrumb/breadcrumb.interface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export interface BreadCrumb { 17 | label: string; 18 | url: string; 19 | } 20 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/footer/footer.component.html: -------------------------------------------------------------------------------- 1 | 18 |
19 | 21 |
22 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/footer/footer.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { FooterComponent } from './footer.component'; 19 | 20 | describe('FooterComponent', () => { 21 | let component: FooterComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ FooterComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(FooterComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | 18 | @Component({ 19 | selector: 'app-footer', 20 | templateUrl: './footer.component.html', 21 | styleUrls: ['./footer.component.scss'] 22 | }) 23 | export class FooterComponent implements OnInit { 24 | 25 | currentYear = new Date().getFullYear(); 26 | 27 | constructor() { } 28 | 29 | ngOnInit() { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/header/header.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | /* change the background color */ 17 | .navbar-custom { 18 | background-color: #212529 !important; 19 | } 20 | .toggle-button{ 21 | margin:10px; 22 | color: white; 23 | } 24 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/header/header.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { HeaderComponent } from './header.component'; 19 | 20 | describe('HeaderComponent', () => { 21 | let component: HeaderComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ HeaderComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(HeaderComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/header/header.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | import { Router } from '@angular/router'; 18 | import { DonorService } from 'src/app/services/shared'; 19 | import { Donor } from 'src/app/models'; 20 | import { DashboardService } from 'src/app/services'; 21 | 22 | 23 | @Component({ 24 | selector: 'app-header', 25 | templateUrl: './header.component.html', 26 | styleUrls: ['./header.component.scss'] 27 | }) 28 | export class HeaderComponent implements OnInit { 29 | 30 | isVisible = false; 31 | currentUser: Donor = null; 32 | 33 | greetingMsg = 'Hello'; 34 | donationAmount = 0.00; 35 | actionButton = 'Logout'; 36 | 37 | constructor( 38 | private donorService: DonorService, private userDonationsService: DashboardService 39 | ) { } 40 | 41 | ngOnInit() { 42 | this.donorService.currentDonor.subscribe( 43 | (userData) => { 44 | this.currentUser = userData; 45 | } 46 | ); 47 | } 48 | 49 | doAction() { 50 | if (this.actionButton === 'Logout') { 51 | this.donorService.signout(); 52 | this.currentUser = null; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/sidenav/sidenav.component.html: -------------------------------------------------------------------------------- 1 | 18 | 23 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/sidenav/sidenav.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 17 | 18 | import { SidenavComponent } from './sidenav.component'; 19 | 20 | describe('SidenavComponent', () => { 21 | let component: SidenavComponent; 22 | let fixture: ComponentFixture; 23 | 24 | beforeEach(async(() => { 25 | TestBed.configureTestingModule({ 26 | declarations: [ SidenavComponent ] 27 | }) 28 | .compileComponents(); 29 | })); 30 | 31 | beforeEach(() => { 32 | fixture = TestBed.createComponent(SidenavComponent); 33 | component = fixture.componentInstance; 34 | fixture.detectChanges(); 35 | }); 36 | 37 | it('should create', () => { 38 | expect(component).toBeTruthy(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/shared/sidenav/sidenav.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | 18 | @Component({ 19 | selector: 'app-sidenav', 20 | templateUrl: './sidenav.component.html', 21 | styleUrls: ['./sidenav.component.scss'] 22 | }) 23 | export class SidenavComponent implements OnInit { 24 | 25 | constructor() { } 26 | 27 | ngOnInit() { 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/signin/signin.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/signin/signin.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 18 | 19 | import { SigninComponent } from './signin.component'; 20 | 21 | describe('SigninComponent', () => { 22 | let component: SigninComponent; 23 | let fixture: ComponentFixture; 24 | 25 | beforeEach(async(() => { 26 | TestBed.configureTestingModule({ 27 | declarations: [ SigninComponent ] 28 | }) 29 | .compileComponents(); 30 | })); 31 | 32 | beforeEach(() => { 33 | fixture = TestBed.createComponent(SigninComponent); 34 | component = fixture.componentInstance; 35 | fixture.detectChanges(); 36 | }); 37 | 38 | it('should create', () => { 39 | expect(component).toBeTruthy(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/signup/signup.component.scss: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | -------------------------------------------------------------------------------- /ngo-ui/src/app/ui/signup/signup.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | 17 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 18 | 19 | import { SignupComponent } from './signup.component'; 20 | 21 | describe('SignupComponent', () => { 22 | let component: SignupComponent; 23 | let fixture: ComponentFixture; 24 | 25 | beforeEach(async(() => { 26 | TestBed.configureTestingModule({ 27 | declarations: [ SignupComponent ] 28 | }) 29 | .compileComponents(); 30 | })); 31 | 32 | beforeEach(() => { 33 | fixture = TestBed.createComponent(SignupComponent); 34 | component = fixture.componentInstance; 35 | fixture.detectChanges(); 36 | }); 37 | 38 | it('should create', () => { 39 | expect(component).toBeTruthy(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/.gitkeep -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-medium-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-medium-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-medium-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-mediumitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-mediumitalic-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-mediumitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazon-ember-mediumitalic-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bd-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bd-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bd-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bd-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.ttf -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_bdit-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_he-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_he-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_he-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_he-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_heit-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_heit-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_heit-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_heit-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.ttf -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_lt-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_ltit-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_ltit-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_ltit-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_ltit-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rg-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rg-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rg-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rg-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rgit-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rgit-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rgit-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_rgit-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.ttf -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_th-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_thit-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_thit-webfont.woff -------------------------------------------------------------------------------- /ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_thit-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/fonts/amazon-type-fonts/amazonember_thit-webfont.woff2 -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1101/1101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1101/1101.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1101/activities/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1101/activities/01.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1101/activities/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1101/activities/02.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1101/activities/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1101/activities/03.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1101/activities/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1101/activities/04.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1102/1102.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1102/1102.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1102/activities/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1102/activities/01.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1102/activities/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1102/activities/02.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1102/activities/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1102/activities/03.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1102/activities/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1102/activities/04.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1103/1103.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1103/1103.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1103/activities/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1103/activities/01.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1103/activities/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1103/activities/02.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1103/activities/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1103/activities/03.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1103/activities/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1103/activities/04.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1104/1104.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1104/1104.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1104/activities/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1104/activities/01.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1104/activities/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1104/activities/02.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1104/activities/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1104/activities/03.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1105/1105.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1105/1105.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1105/activities/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1105/activities/01.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1105/activities/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1105/activities/02.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/1105/activities/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/1105/activities/03.jpg -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/arrow-gr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/arrow-gr.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/arrow-gr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/arrow-gr@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/aws-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/aws-logo.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/awslogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/awslogo.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/awslogo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/awslogo@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-bendline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-bendline.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-bendline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-bendline@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-bg.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-bg@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-dark.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-dark@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-light.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-light@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-line.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/block-line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/block-line@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/cal-sym.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/cal-sym.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/cal-sym@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/cal-sym@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/compassion-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/compassion-logo.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/direct-relief-logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/direct-relief-logo-2.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/direct-relief-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/direct-relief-logo.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/dollar-sym.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/dollar-sym.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/dollar-sym@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/dollar-sym@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/gallery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/gallery.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/gallery@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/gallery@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/gold-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/gold-star.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/gold-star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/gold-star@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/green-tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/green-tick.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/green-tick@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/green-tick@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/login-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/login-bg.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/login-bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/login-bg@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-aha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-aha.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-aha@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-aha@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-ameri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-ameri.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-ameri@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-ameri@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-com.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-com@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-com@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-dir.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-dir@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-dir@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-hab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-hab.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-hab@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-hab@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-wv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-wv.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/npo-wv@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/npo-wv@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo-alb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo-alb.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo-alb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo-alb@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo1-alb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo1-alb.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo1-alb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo1-alb@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo2-alb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo2-alb.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo2-alb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo2-alb@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo3-alb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo3-alb.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo3-alb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo3-alb@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo4-alb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo4-alb.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/photo4-alb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/photo4-alb@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/star-regular.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/white-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/white-star.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/images/white-star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/assets/images/white-star@2x.png -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: ($close-font-size + $alert-padding-x * 2); 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_amazon.scss: -------------------------------------------------------------------------------- 1 | // Utilities 2 | @import "amazon/theme"; -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | 17 | // Empty badges collapse automatically 18 | &:empty { 19 | display: none; 20 | } 21 | } 22 | 23 | // Quick fix for badges in buttons 24 | .btn .badge { 25 | position: relative; 26 | top: -1px; 27 | } 28 | 29 | // Pill badges 30 | // 31 | // Make them extra rounded with a modifier to replace v3's badges. 32 | 33 | .badge-pill { 34 | padding-right: $badge-pill-padding-x; 35 | padding-left: $badge-pill-padding-x; 36 | @include border-radius($badge-pill-border-radius); 37 | } 38 | 39 | // Colors 40 | // 41 | // Contextual variations (linked badges get darker on :hover). 42 | 43 | @each $color, $value in $theme-colors { 44 | .badge-#{$color} { 45 | @include badge-variant($value); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_bootstrap-grid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grid v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | @at-root { 9 | @-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix 10 | } 11 | 12 | html { 13 | box-sizing: border-box; 14 | -ms-overflow-style: scrollbar; 15 | } 16 | 17 | *, 18 | *::before, 19 | *::after { 20 | box-sizing: inherit; 21 | } 22 | 23 | @import "functions"; 24 | @import "variables"; 25 | 26 | @import "mixins/breakpoints"; 27 | @import "mixins/grid-framework"; 28 | @import "mixins/grid"; 29 | 30 | @import "grid"; 31 | @import "utilities/display"; 32 | @import "utilities/flex"; 33 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_bootstrap-reboot.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "reboot"; 13 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($breadcrumb-border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item { 14 | padding-left: $breadcrumb-item-padding; 15 | 16 | &::before { 17 | display: inline-block; // Suppress underlining of the separator in modern browsers 18 | padding-right: $breadcrumb-item-padding; 19 | color: $breadcrumb-divider-color; 20 | content: $breadcrumb-divider; 21 | } 22 | } 23 | 24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 25 | // without `
    `s. The `::before` pseudo-element generates an element 26 | // *within* the .breadcrumb-item and thereby inherits the `text-decoration`. 27 | // 28 | // To trick IE into suppressing the underline, we give the pseudo-element an 29 | // underline and then immediately remove it. 30 | + .breadcrumb-item:hover::before { 31 | text-decoration: underline; 32 | } 33 | // stylelint-disable-next-line no-duplicate-selectors 34 | + .breadcrumb-item:hover::before { 35 | text-decoration: none; 36 | } 37 | 38 | &.active { 39 | color: $breadcrumb-active-color; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_close.scss: -------------------------------------------------------------------------------- 1 | .close { 2 | float: right; 3 | font-size: $close-font-size; 4 | font-weight: $close-font-weight; 5 | line-height: 1; 6 | color: $close-color; 7 | text-shadow: $close-text-shadow; 8 | opacity: .5; 9 | 10 | &:not(:disabled):not(.disabled) { 11 | 12 | @include hover-focus { 13 | color: $close-color; 14 | text-decoration: none; 15 | opacity: .75; 16 | } 17 | 18 | // Opinionated: add "hand" cursor to non-disabled .close elements 19 | cursor: pointer; 20 | } 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | 28 | // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type 29 | button.close { 30 | padding: 0; 31 | background-color: transparent; 32 | border: 0; 33 | -webkit-appearance: none; 34 | } 35 | // stylelint-enable 36 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_code.scss: -------------------------------------------------------------------------------- 1 | // Inline code 2 | code { 3 | font-size: $code-font-size; 4 | color: $code-color; 5 | word-break: break-word; 6 | 7 | // Streamline the style when inside anchors to avoid broken underline and more 8 | a > & { 9 | color: inherit; 10 | } 11 | } 12 | 13 | // User input typically entered via keyboard 14 | kbd { 15 | padding: $kbd-padding-y $kbd-padding-x; 16 | font-size: $kbd-font-size; 17 | color: $kbd-color; 18 | background-color: $kbd-bg; 19 | @include border-radius($border-radius-sm); 20 | @include box-shadow($kbd-box-shadow); 21 | 22 | kbd { 23 | padding: 0; 24 | font-size: 100%; 25 | font-weight: $nested-kbd-font-weight; 26 | @include box-shadow(none); 27 | } 28 | } 29 | 30 | // Blocks of code 31 | pre { 32 | display: block; 33 | font-size: $code-font-size; 34 | color: $pre-color; 35 | 36 | // Account for some code outputs that place code tags in pre tags 37 | code { 38 | font-size: inherit; 39 | color: inherit; 40 | word-break: normal; 41 | } 42 | } 43 | 44 | // Enable scrollable blocks of code 45 | .pre-scrollable { 46 | max-height: $pre-scrollable-max-height; 47 | overflow-y: scroll; 48 | } 49 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | // Container widths 2 | // 3 | // Set the container width, and override it for fixed navbars in media queries. 4 | 5 | @if $enable-grid-classes { 6 | .container { 7 | @include make-container(); 8 | @include make-container-max-widths(); 9 | } 10 | } 11 | 12 | // Fluid container 13 | // 14 | // Utilizes the mixin meant for fixed width containers, but with 100% width for 15 | // fluid, full width layouts. 16 | 17 | @if $enable-grid-classes { 18 | .container-fluid { 19 | @include make-container(); 20 | } 21 | } 22 | 23 | // Row 24 | // 25 | // Rows contain and clear the floats of your columns. 26 | 27 | @if $enable-grid-classes { 28 | .row { 29 | @include make-row(); 30 | } 31 | 32 | // Remove the negative margin from default .row, then the horizontal padding 33 | // from all immediate children columns (to prevent runaway style inheritance). 34 | .no-gutters { 35 | margin-right: 0; 36 | margin-left: 0; 37 | 38 | > .col, 39 | > [class*="col-"] { 40 | padding-right: 0; 41 | padding-left: 0; 42 | } 43 | } 44 | } 45 | 46 | // Columns 47 | // 48 | // Common styles for small and large grid columns 49 | 50 | @if $enable-grid-classes { 51 | @include make-grid-columns(); 52 | } 53 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_images.scss: -------------------------------------------------------------------------------- 1 | // Responsive images (ensure images don't scale beyond their parents) 2 | // 3 | // This is purposefully opt-in via an explicit class rather than being the default for all ``s. 4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2, 5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) 6 | // which weren't expecting the images within themselves to be involuntarily resized. 7 | // See also https://github.com/twbs/bootstrap/issues/18178 8 | .img-fluid { 9 | @include img-fluid; 10 | } 11 | 12 | 13 | // Image thumbnails 14 | .img-thumbnail { 15 | padding: $thumbnail-padding; 16 | background-color: $thumbnail-bg; 17 | border: $thumbnail-border-width solid $thumbnail-border-color; 18 | @include border-radius($thumbnail-border-radius); 19 | @include box-shadow($thumbnail-box-shadow); 20 | 21 | // Keep them at most 100% wide 22 | @include img-fluid; 23 | } 24 | 25 | // 26 | // Figures 27 | // 28 | 29 | .figure { 30 | // Ensures the caption's text aligns with the image. 31 | display: inline-block; 32 | } 33 | 34 | .figure-img { 35 | margin-bottom: ($spacer / 2); 36 | line-height: 1; 37 | } 38 | 39 | .figure-caption { 40 | font-size: $figure-caption-font-size; 41 | color: $figure-caption-color; 42 | } 43 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | background-color: $jumbotron-bg; 5 | @include border-radius($border-radius-lg); 6 | 7 | @include media-breakpoint-up(sm) { 8 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 9 | } 10 | } 11 | 12 | .jumbotron-fluid { 13 | padding-right: 0; 14 | padding-left: 0; 15 | @include border-radius(0); 16 | } 17 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Toggles 2 | // 3 | // Used in conjunction with global variables to enable certain theme features. 4 | 5 | // Utilities 6 | @import "mixins/breakpoints"; 7 | @import "mixins/hover"; 8 | @import "mixins/image"; 9 | @import "mixins/badge"; 10 | @import "mixins/resize"; 11 | @import "mixins/screen-reader"; 12 | @import "mixins/size"; 13 | @import "mixins/reset-text"; 14 | @import "mixins/text-emphasis"; 15 | @import "mixins/text-hide"; 16 | @import "mixins/text-truncate"; 17 | @import "mixins/visibility"; 18 | 19 | // // Components 20 | @import "mixins/alert"; 21 | @import "mixins/buttons"; 22 | @import "mixins/caret"; 23 | @import "mixins/pagination"; 24 | @import "mixins/lists"; 25 | @import "mixins/list-group"; 26 | @import "mixins/nav-divider"; 27 | @import "mixins/forms"; 28 | @import "mixins/table-row"; 29 | 30 | // // Skins 31 | @import "mixins/background-variant"; 32 | @import "mixins/border-radius"; 33 | @import "mixins/box-shadow"; 34 | @import "mixins/gradients"; 35 | @import "mixins/transition"; 36 | 37 | // // Layout 38 | @import "mixins/clearfix"; 39 | @import "mixins/grid-framework"; 40 | @import "mixins/grid"; 41 | @import "mixins/float"; 42 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | @keyframes progress-bar-stripes { 2 | from { background-position: $progress-height 0; } 3 | to { background-position: 0 0; } 4 | } 5 | 6 | .progress { 7 | display: flex; 8 | height: $progress-height; 9 | overflow: hidden; // force rounded corners by cropping it 10 | font-size: $progress-font-size; 11 | background-color: $progress-bg; 12 | @include border-radius($progress-border-radius); 13 | @include box-shadow($progress-box-shadow); 14 | } 15 | 16 | .progress-bar { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | color: $progress-bar-color; 21 | text-align: center; 22 | white-space: nowrap; 23 | background-color: $progress-bar-bg; 24 | @include transition($progress-bar-transition); 25 | } 26 | 27 | .progress-bar-striped { 28 | @include gradient-striped(); 29 | background-size: $progress-height $progress-height; 30 | } 31 | 32 | .progress-bar-animated { 33 | animation: progress-bar-stripes $progress-bar-animation-timing; 34 | } 35 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_root.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | // Custom variable values only support SassScript inside `#{}`. 3 | @each $color, $value in $colors { 4 | #{--#{$color}}: #{$value}; 5 | } 6 | @each $color, $value in $theme-colors { 7 | #{--#{$color}}: #{$value}; 8 | } 9 | 10 | // @each $color, $value in $colors { 11 | // --#{$color}: #{$value}; 12 | // } 13 | // @each $color, $value in $theme-colors { 14 | // --#{$color}: #{$value}; 15 | // } 16 | @each $bp, $value in $grid-breakpoints { 17 | --breakpoint-#{$bp}: #{$value}; 18 | } 19 | 20 | // Use `inspect` for lists so that quoted items keep the quotes. 21 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 22 | --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 23 | --font-family-monospace: #{inspect($font-family-monospace)}; 24 | } 25 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable selector-no-qualifying-type 2 | 3 | .fade { 4 | @include transition($transition-fade); 5 | 6 | &:not(.show) { 7 | opacity: 0; 8 | } 9 | } 10 | 11 | .collapse { 12 | &:not(.show) { 13 | display: none; 14 | } 15 | } 16 | 17 | .collapsing { 18 | position: relative; 19 | height: 0; 20 | overflow: hidden; 21 | @include transition($transition-collapse); 22 | } 23 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/position"; 10 | @import "utilities/screenreaders"; 11 | @import "utilities/shadows"; 12 | @import "utilities/sizing"; 13 | @import "utilities/spacing"; 14 | @import "utilities/text"; 15 | @import "utilities/visibility"; 16 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | @import "functions"; 8 | @import "amazon/fonts"; 9 | @import "variables"; 10 | @import "mixins"; 11 | @import "root"; 12 | @import "reboot"; 13 | @import "type"; 14 | @import "images"; 15 | @import "code"; 16 | @import "grid"; 17 | @import "tables"; 18 | @import "forms"; 19 | @import "buttons"; 20 | @import "transitions"; 21 | @import "dropdown"; 22 | @import "button-group"; 23 | @import "input-group"; 24 | @import "custom-forms"; 25 | @import "nav"; 26 | @import "navbar"; 27 | @import "card"; 28 | @import "breadcrumb"; 29 | @import "pagination"; 30 | @import "badge"; 31 | @import "jumbotron"; 32 | @import "alert"; 33 | @import "progress"; 34 | @import "media"; 35 | @import "list-group"; 36 | @import "close"; 37 | @import "modal"; 38 | @import "tooltip"; 39 | @import "popover"; 40 | @import "carousel"; 41 | @import "utilities"; 42 | @import "print"; 43 | 44 | 45 | @import "amazon"; -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | } 16 | 17 | @mixin bg-gradient-variant($parent, $color) { 18 | #{$parent} { 19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | &[href] { 6 | @include hover-focus { 7 | color: color-yiq($bg); 8 | text-decoration: none; 9 | background-color: darken($bg, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | @mixin border-radius($radius: $border-radius) { 4 | @if $enable-rounded { 5 | border-radius: $radius; 6 | } 7 | } 8 | 9 | @mixin border-top-radius($radius) { 10 | @if $enable-rounded { 11 | border-top-left-radius: $radius; 12 | border-top-right-radius: $radius; 13 | } 14 | } 15 | 16 | @mixin border-right-radius($radius) { 17 | @if $enable-rounded { 18 | border-top-right-radius: $radius; 19 | border-bottom-right-radius: $radius; 20 | } 21 | } 22 | 23 | @mixin border-bottom-radius($radius) { 24 | @if $enable-rounded { 25 | border-bottom-right-radius: $radius; 26 | border-bottom-left-radius: $radius; 27 | } 28 | } 29 | 30 | @mixin border-left-radius($radius) { 31 | @if $enable-rounded { 32 | border-top-left-radius: $radius; 33 | border-bottom-left-radius: $radius; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | box-shadow: $shadow; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_caret.scss: -------------------------------------------------------------------------------- 1 | @mixin caret-down { 2 | border-top: $caret-width solid; 3 | border-right: $caret-width solid transparent; 4 | border-bottom: 0; 5 | border-left: $caret-width solid transparent; 6 | } 7 | 8 | @mixin caret-up { 9 | border-top: 0; 10 | border-right: $caret-width solid transparent; 11 | border-bottom: $caret-width solid; 12 | border-left: $caret-width solid transparent; 13 | } 14 | 15 | @mixin caret-right { 16 | border-top: $caret-width solid transparent; 17 | border-right: 0; 18 | border-bottom: $caret-width solid transparent; 19 | border-left: $caret-width solid; 20 | } 21 | 22 | @mixin caret-left { 23 | border-top: $caret-width solid transparent; 24 | border-right: $caret-width solid; 25 | border-bottom: $caret-width solid transparent; 26 | } 27 | 28 | @mixin caret($direction: down) { 29 | @if $enable-caret { 30 | &::after { 31 | display: inline-block; 32 | width: 0; 33 | height: 0; 34 | margin-left: $caret-width * .85; 35 | vertical-align: $caret-width * .85; 36 | content: ""; 37 | @if $direction == down { 38 | @include caret-down; 39 | } @else if $direction == up { 40 | @include caret-up; 41 | } @else if $direction == right { 42 | @include caret-right; 43 | } 44 | } 45 | 46 | @if $direction == left { 47 | &::after { 48 | display: none; 49 | } 50 | 51 | &::before { 52 | display: inline-block; 53 | width: 0; 54 | height: 0; 55 | margin-right: $caret-width * .85; 56 | vertical-align: $caret-width * .85; 57 | content: ""; 58 | @include caret-left; 59 | } 60 | } 61 | 62 | &:empty::after { 63 | margin-left: 0; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left { 4 | float: left !important; 5 | } 6 | @mixin float-right { 7 | float: right !important; 8 | } 9 | @mixin float-none { 10 | float: none !important; 11 | } 12 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_grid.scss: -------------------------------------------------------------------------------- 1 | /// Grid system 2 | // 3 | // Generate semantic grid columns with these mixins. 4 | 5 | @mixin make-container() { 6 | width: 100%; 7 | padding-right: ($grid-gutter-width / 2); 8 | padding-left: ($grid-gutter-width / 2); 9 | margin-right: auto; 10 | margin-left: auto; 11 | } 12 | 13 | 14 | // For each breakpoint, define the maximum width of the container in a media query 15 | @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) { 16 | @each $breakpoint, $container-max-width in $max-widths { 17 | @include media-breakpoint-up($breakpoint, $breakpoints) { 18 | max-width: $container-max-width; 19 | } 20 | } 21 | } 22 | 23 | @mixin make-row() { 24 | display: flex; 25 | flex-wrap: wrap; 26 | margin-right: ($grid-gutter-width / -2); 27 | margin-left: ($grid-gutter-width / -2); 28 | } 29 | 30 | @mixin make-col-ready() { 31 | position: relative; 32 | // Prevent columns from becoming too narrow when at smaller grid tiers by 33 | // always setting `width: 100%;`. This works because we use `flex` values 34 | // later on to override this initial width. 35 | width: 100%; 36 | min-height: 1px; // Prevent collapsing 37 | padding-right: ($grid-gutter-width / 2); 38 | padding-left: ($grid-gutter-width / 2); 39 | } 40 | 41 | @mixin make-col($size, $columns: $grid-columns) { 42 | flex: 0 0 percentage($size / $columns); 43 | // Add a `max-width` to ensure content within each column does not blow out 44 | // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari 45 | // do not appear to require this. 46 | max-width: percentage($size / $columns); 47 | } 48 | 49 | @mixin make-col-offset($size, $columns: $grid-columns) { 50 | $num: $size / $columns; 51 | margin-left: if($num == 0, 0, percentage($num)); 52 | } 53 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_hover.scss: -------------------------------------------------------------------------------- 1 | // Hover mixin and `$enable-hover-media-query` are deprecated. 2 | // 3 | // Originally added during our alphas and maintained during betas, this mixin was 4 | // designed to prevent `:hover` stickiness on iOS-an issue where hover styles 5 | // would persist after initial touch. 6 | // 7 | // For backward compatibility, we've kept these mixins and updated them to 8 | // always return their regular pseudo-classes instead of a shimmed media query. 9 | // 10 | // Issue: https://github.com/twbs/bootstrap/issues/25195 11 | 12 | @mixin hover { 13 | &:hover { @content; } 14 | } 15 | 16 | @mixin hover-focus { 17 | &:hover, 18 | &:focus { 19 | @content; 20 | } 21 | } 22 | 23 | @mixin plain-hover-focus { 24 | &, 25 | &:hover, 26 | &:focus { 27 | @content; 28 | } 29 | } 30 | 31 | @mixin hover-focus-active { 32 | &:hover, 33 | &:focus, 34 | &:active { 35 | @content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | 10 | @mixin img-fluid { 11 | // Part 1: Set a maximum relative to the parent 12 | max-width: 100%; 13 | // Part 2: Override the height to auto, otherwise images will be stretched 14 | // when setting a width and height attribute on the img element. 15 | height: auto; 16 | } 17 | 18 | 19 | // Retina image 20 | // 21 | // Short retina mixin for setting background-image and -size. 22 | 23 | // stylelint-disable indentation, media-query-list-comma-newline-after 24 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 25 | background-image: url($file-1x); 26 | 27 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, 28 | // but doesn't convert dppx=>dpi. 29 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. 30 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution 31 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx 32 | only screen and (min-resolution: 2dppx) { // Standardized 33 | background-image: url($file-2x); 34 | background-size: $width-1x $height-1x; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | &.list-group-item-action { 9 | @include hover-focus { 10 | color: $color; 11 | background-color: darken($background, 5%); 12 | } 13 | 14 | &.active { 15 | color: $white; 16 | background-color: $color; 17 | border-color: $color; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) { 6 | height: 0; 7 | margin: $margin-y 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | } 11 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | font-size: $font-size; 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // 3 | // See: https://a11yproject.com/posts/how-to-hide-content/ 4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 5 | 6 | @mixin sr-only { 7 | position: absolute; 8 | width: 1px; 9 | height: 1px; 10 | padding: 0; 11 | overflow: hidden; 12 | clip: rect(0, 0, 0, 0); 13 | white-space: nowrap; 14 | border: 0; 15 | } 16 | 17 | // Use in conjunction with .sr-only to only display content when it's focused. 18 | // 19 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 20 | // 21 | // Credit: HTML5 Boilerplate 22 | 23 | @mixin sr-only-focusable { 24 | &:active, 25 | &:focus { 26 | position: static; 27 | width: auto; 28 | height: auto; 29 | overflow: visible; 30 | clip: auto; 31 | white-space: normal; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | } 7 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table-#{$state} { 7 | &, 8 | > th, 9 | > td { 10 | background-color: $background; 11 | } 12 | } 13 | 14 | // Hover states for `.table-hover` 15 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 16 | .table-hover { 17 | $hover-background: darken($background, 5%); 18 | 19 | .table-#{$state} { 20 | @include hover { 21 | background-color: $hover-background; 22 | 23 | > td, 24 | > th { 25 | background-color: $hover-background; 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | a#{$parent} { 10 | @include hover-focus { 11 | color: darken($color, 10%) !important; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide($ignore-warning: false) { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | 10 | @if ($ignore-warning != true) { 11 | @warn "The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5."; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | @mixin transition($transition...) { 2 | @if $enable-transitions { 3 | @if length($transition) == 0 { 4 | transition: $transition-base; 5 | } @else { 6 | transition: $transition; 7 | } 8 | } 9 | 10 | @media screen and (prefers-reduced-motion: reduce) { 11 | transition: none; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | } 8 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_borders.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Border 5 | // 6 | 7 | .border { border: $border-width solid $border-color !important; } 8 | .border-top { border-top: $border-width solid $border-color !important; } 9 | .border-right { border-right: $border-width solid $border-color !important; } 10 | .border-bottom { border-bottom: $border-width solid $border-color !important; } 11 | .border-left { border-left: $border-width solid $border-color !important; } 12 | 13 | .border-0 { border: 0 !important; } 14 | .border-top-0 { border-top: 0 !important; } 15 | .border-right-0 { border-right: 0 !important; } 16 | .border-bottom-0 { border-bottom: 0 !important; } 17 | .border-left-0 { border-left: 0 !important; } 18 | 19 | @each $color, $value in $theme-colors { 20 | .border-#{$color} { 21 | border-color: $value !important; 22 | } 23 | } 24 | 25 | .border-white { 26 | border-color: $white !important; 27 | } 28 | 29 | // 30 | // Border-radius 31 | // 32 | 33 | .rounded { 34 | border-radius: $border-radius !important; 35 | } 36 | .rounded-top { 37 | border-top-left-radius: $border-radius !important; 38 | border-top-right-radius: $border-radius !important; 39 | } 40 | .rounded-right { 41 | border-top-right-radius: $border-radius !important; 42 | border-bottom-right-radius: $border-radius !important; 43 | } 44 | .rounded-bottom { 45 | border-bottom-right-radius: $border-radius !important; 46 | border-bottom-left-radius: $border-radius !important; 47 | } 48 | .rounded-left { 49 | border-top-left-radius: $border-radius !important; 50 | border-bottom-left-radius: $border-radius !important; 51 | } 52 | 53 | .rounded-circle { 54 | border-radius: 50% !important; 55 | } 56 | 57 | .rounded-0 { 58 | border-radius: 0 !important; 59 | } 60 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_display.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Utilities for common `display` values 5 | // 6 | 7 | @each $breakpoint in map-keys($grid-breakpoints) { 8 | @include media-breakpoint-up($breakpoint) { 9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 10 | 11 | .d#{$infix}-none { display: none !important; } 12 | .d#{$infix}-inline { display: inline !important; } 13 | .d#{$infix}-inline-block { display: inline-block !important; } 14 | .d#{$infix}-block { display: block !important; } 15 | .d#{$infix}-table { display: table !important; } 16 | .d#{$infix}-table-row { display: table-row !important; } 17 | .d#{$infix}-table-cell { display: table-cell !important; } 18 | .d#{$infix}-flex { display: flex !important; } 19 | .d#{$infix}-inline-flex { display: inline-flex !important; } 20 | } 21 | } 22 | 23 | 24 | // 25 | // Utilities for toggling `display` in print 26 | // 27 | 28 | @media print { 29 | .d-print-none { display: none !important; } 30 | .d-print-inline { display: inline !important; } 31 | .d-print-inline-block { display: inline-block !important; } 32 | .d-print-block { display: block !important; } 33 | .d-print-table { display: table !important; } 34 | .d-print-table-row { display: table-row !important; } 35 | .d-print-table-cell { display: table-cell !important; } 36 | .d-print-flex { display: flex !important; } 37 | .d-print-inline-flex { display: inline-flex !important; } 38 | } 39 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_embed.scss: -------------------------------------------------------------------------------- 1 | // Credit: Nicolas Gallagher and SUIT CSS. 2 | 3 | .embed-responsive { 4 | position: relative; 5 | display: block; 6 | width: 100%; 7 | padding: 0; 8 | overflow: hidden; 9 | 10 | &::before { 11 | display: block; 12 | content: ""; 13 | } 14 | 15 | .embed-responsive-item, 16 | iframe, 17 | embed, 18 | object, 19 | video { 20 | position: absolute; 21 | top: 0; 22 | bottom: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | border: 0; 27 | } 28 | } 29 | 30 | .embed-responsive-21by9 { 31 | &::before { 32 | padding-top: percentage(9 / 21); 33 | } 34 | } 35 | 36 | .embed-responsive-16by9 { 37 | &::before { 38 | padding-top: percentage(9 / 16); 39 | } 40 | } 41 | 42 | .embed-responsive-4by3 { 43 | &::before { 44 | padding-top: percentage(3 / 4); 45 | } 46 | } 47 | 48 | .embed-responsive-1by1 { 49 | &::before { 50 | padding-top: percentage(1 / 1); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | @each $breakpoint in map-keys($grid-breakpoints) { 2 | @include media-breakpoint-up($breakpoint) { 3 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 4 | 5 | .float#{$infix}-left { @include float-left; } 6 | .float#{$infix}-right { @include float-right; } 7 | .float#{$infix}-none { @include float-none; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | 5 | // Sass list not in variables since it's not intended for customization. 6 | // stylelint-disable-next-line scss/dollar-variable-default 7 | $positions: static, relative, absolute, fixed, sticky; 8 | 9 | @each $position in $positions { 10 | .position-#{$position} { position: $position !important; } 11 | } 12 | 13 | // Shorthand 14 | 15 | .fixed-top { 16 | position: fixed; 17 | top: 0; 18 | right: 0; 19 | left: 0; 20 | z-index: $zindex-fixed; 21 | } 22 | 23 | .fixed-bottom { 24 | position: fixed; 25 | right: 0; 26 | bottom: 0; 27 | left: 0; 28 | z-index: $zindex-fixed; 29 | } 30 | 31 | .sticky-top { 32 | @supports (position: sticky) { 33 | position: sticky; 34 | top: 0; 35 | z-index: $zindex-sticky; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .shadow-sm { box-shadow: $box-shadow-sm !important; } 4 | .shadow { box-shadow: $box-shadow !important; } 5 | .shadow-lg { box-shadow: $box-shadow-lg !important; } 6 | .shadow-none { box-shadow: none !important; } 7 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_spacing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Margin and Padding 4 | 5 | @each $breakpoint in map-keys($grid-breakpoints) { 6 | @include media-breakpoint-up($breakpoint) { 7 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 8 | 9 | @each $prop, $abbrev in (margin: m, padding: p) { 10 | @each $size, $length in $spacers { 11 | 12 | .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } 13 | .#{$abbrev}t#{$infix}-#{$size}, 14 | .#{$abbrev}y#{$infix}-#{$size} { 15 | #{$prop}-top: $length !important; 16 | } 17 | .#{$abbrev}r#{$infix}-#{$size}, 18 | .#{$abbrev}x#{$infix}-#{$size} { 19 | #{$prop}-right: $length !important; 20 | } 21 | .#{$abbrev}b#{$infix}-#{$size}, 22 | .#{$abbrev}y#{$infix}-#{$size} { 23 | #{$prop}-bottom: $length !important; 24 | } 25 | .#{$abbrev}l#{$infix}-#{$size}, 26 | .#{$abbrev}x#{$infix}-#{$size} { 27 | #{$prop}-left: $length !important; 28 | } 29 | } 30 | } 31 | 32 | // Some special margin utils 33 | .m#{$infix}-auto { margin: auto !important; } 34 | .mt#{$infix}-auto, 35 | .my#{$infix}-auto { 36 | margin-top: auto !important; 37 | } 38 | .mr#{$infix}-auto, 39 | .mx#{$infix}-auto { 40 | margin-right: auto !important; 41 | } 42 | .mb#{$infix}-auto, 43 | .my#{$infix}-auto { 44 | margin-bottom: auto !important; 45 | } 46 | .ml#{$infix}-auto, 47 | .mx#{$infix}-auto { 48 | margin-left: auto !important; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_text.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Text 5 | // 6 | 7 | .text-monospace { font-family: $font-family-monospace; } 8 | 9 | // Alignment 10 | 11 | .text-justify { text-align: justify !important; } 12 | .text-nowrap { white-space: nowrap !important; } 13 | .text-truncate { @include text-truncate; } 14 | 15 | // Responsive alignment 16 | 17 | @each $breakpoint in map-keys($grid-breakpoints) { 18 | @include media-breakpoint-up($breakpoint) { 19 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 20 | 21 | .text#{$infix}-left { text-align: left !important; } 22 | .text#{$infix}-right { text-align: right !important; } 23 | .text#{$infix}-center { text-align: center !important; } 24 | } 25 | } 26 | 27 | // Transformation 28 | 29 | .text-lowercase { text-transform: lowercase !important; } 30 | .text-uppercase { text-transform: uppercase !important; } 31 | .text-capitalize { text-transform: capitalize !important; } 32 | 33 | // Weight and italics 34 | 35 | .font-weight-light { font-weight: $font-weight-light !important; } 36 | .font-weight-normal { font-weight: $font-weight-normal !important; } 37 | .font-weight-bold { font-weight: $font-weight-bold !important; } 38 | .font-italic { font-style: italic !important; } 39 | 40 | // Contextual colors 41 | 42 | .text-white { color: $white !important; } 43 | 44 | @each $color, $value in $theme-colors { 45 | @include text-emphasis-variant(".text-#{$color}", $value); 46 | } 47 | 48 | .text-body { color: $body-color !important; } 49 | .text-muted { color: $text-muted !important; } 50 | 51 | .text-black-50 { color: rgba($black, .5) !important; } 52 | .text-white-50 { color: rgba($white, .5) !important; } 53 | 54 | // Misc 55 | 56 | .text-hide { 57 | @include text-hide($ignore-warning: true); 58 | } 59 | -------------------------------------------------------------------------------- /ngo-ui/src/assets/scss/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Visibility utilities 3 | // 4 | 5 | .visible { 6 | @include invisible(visible); 7 | } 8 | 9 | .invisible { 10 | @include invisible(hidden); 11 | } 12 | -------------------------------------------------------------------------------- /ngo-ui/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /ngo-ui/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export const environment = { 17 | production: true, 18 | host: '', 19 | port: '', 20 | dbhost: '', 21 | dbport: '', 22 | api_url: 'http://Fabric-ELB-205962472.us-west-2.elb.amazonaws.com/', 23 | test: 'test', 24 | socket_url: 'ws://Fabric-ELB-205962472.us-west-2.elb.amazonaws.com' 25 | }; 26 | -------------------------------------------------------------------------------- /ngo-ui/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | export const environment = { 17 | production: false, 18 | host: '', 19 | port: '', 20 | dbhost: '', 21 | dbport: '', 22 | api_url: 'http://__ELBURL__/', 23 | test: 'test', 24 | socket_url: 'ws://__ELBURL__' 25 | }; 26 | -------------------------------------------------------------------------------- /ngo-ui/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/non-profit-blockchain/20f68358441bbb9771838e9e8dfbec61c752766f/ngo-ui/src/favicon.ico -------------------------------------------------------------------------------- /ngo-ui/src/index.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | NgoBlockchain 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ngo-ui/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; -------------------------------------------------------------------------------- /ngo-ui/src/main.ts: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | */ 16 | import { enableProdMode } from '@angular/core'; 17 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 18 | 19 | import { AppModule } from './app/app.module'; 20 | import { environment } from './environments/environment'; 21 | 22 | if (environment.production) { 23 | enableProdMode(); 24 | } 25 | 26 | platformBrowserDynamic().bootstrapModule(AppModule) 27 | .catch(err => console.error(err)); 28 | -------------------------------------------------------------------------------- /ngo-ui/src/styles.scss: -------------------------------------------------------------------------------- 1 | @import 'assets/scss/bootstrap.scss' -------------------------------------------------------------------------------- /ngo-ui/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /ngo-ui/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /ngo-ui/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /ngo-ui/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ngo-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "target": "es5", 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "lib": [ 17 | "es2018", 18 | "dom" 19 | ] 20 | } 21 | } 22 | --------------------------------------------------------------------------------