├── config-main-app-id
├── .yarnrc.yml
├── web
├── src
│ ├── components
│ │ ├── MenuPopup
│ │ │ ├── MenuPopup.js
│ │ │ └── MenuPopup.scss
│ │ ├── OnClickOutside
│ │ │ ├── OnClickOutside.scss
│ │ │ └── OnClickOutside.tsx
│ │ ├── DeleteProjectModal
│ │ │ └── DeleteProjectModal.scss
│ │ ├── OutcomeConnectors
│ │ │ └── OutcomeConnectors.scss
│ │ ├── ProjectMigratedModal
│ │ │ └── ProjectMigratedModal.scss
│ │ ├── SmartOutcomeConnector
│ │ │ └── SmartOutcomeConnector.scss
│ │ ├── ProgressIndicatorCalculated
│ │ │ └── ProgressIndicatorCalculated.scss
│ │ ├── InviteMembersModal
│ │ │ └── InviteMembersModal.scss
│ │ ├── ProfileEditFormModal
│ │ │ └── ProfileEditFormModal.scss
│ │ ├── MapViewContextMenu
│ │ │ └── MapViewContextMenu.scss
│ │ ├── RemoveSelfProjectModal
│ │ │ └── RemoveSelfProjectModal.scss
│ │ ├── ExpandedViewMode
│ │ │ ├── NavEnum.ts
│ │ │ └── EVMiddleColumn
│ │ │ │ └── TabContent
│ │ │ │ ├── EvAttachments
│ │ │ │ ├── EvAttachments.scss
│ │ │ │ └── AddAttachment.tsx
│ │ │ │ ├── EvChildren
│ │ │ │ └── EvChildren.scss
│ │ │ │ ├── EvTaskList
│ │ │ │ └── EvTaskList.scss
│ │ │ │ └── EvComments
│ │ │ │ └── EvComments.scss
│ │ ├── JoinProjectModal
│ │ │ └── JoinProjectModal.scss
│ │ ├── MapViewDevMode
│ │ │ └── MapViewDevMode.scss
│ │ ├── OutcomeTableWithFilters
│ │ │ └── OutcomeTableWithFilters.scss
│ │ ├── MembersIndicator
│ │ │ ├── MembersIndicator.scss
│ │ │ └── MembersIndicator.tsx
│ │ ├── Header
│ │ │ ├── Status.ts
│ │ │ └── priorityMenuItems.ts
│ │ ├── ButtonWithPendingState
│ │ │ ├── ButtonWithPendingState.scss
│ │ │ └── ButtonWithPendingState.js
│ │ ├── Tag
│ │ │ ├── Tag.tsx
│ │ │ └── Tag.scss
│ │ ├── ViewFilters
│ │ │ └── ViewFilters.tsx
│ │ ├── TimeframeFormat.js
│ │ ├── NetworkInfo
│ │ │ └── NetworkInfo.scss
│ │ ├── ConnectivityOverlay
│ │ │ └── ConnectivityOverlay.scss
│ │ ├── LoadingScreen
│ │ │ └── LoadingScreen.js
│ │ ├── ProjectEmptyState
│ │ │ ├── ProjectEmptyState.js
│ │ │ └── ProjectEmptyState.scss
│ │ ├── ProjectModal
│ │ │ └── ProjectModal.scss
│ │ ├── CollapsedChildrenPills
│ │ │ └── CollapsedChildrenPills.scss
│ │ ├── Zoom
│ │ │ ├── Zoom.scss
│ │ │ └── Zoom.connector.ts
│ │ ├── OutcomeConnector
│ │ │ └── OutcomeConnector.scss
│ │ ├── ButtonClose
│ │ │ ├── ButtonClose.scss
│ │ │ └── ButtonClose.tsx
│ │ ├── MarkdownDescription
│ │ │ └── MarkdownDescription.scss
│ │ ├── OutcomeConnectorPicker
│ │ │ └── OutcomeConnectorPicker.scss
│ │ ├── MetadataWithLabel
│ │ │ └── MetadataWithLabel.scss
│ │ ├── PickerTemplate
│ │ │ ├── PickerTemplate.scss
│ │ │ └── PickerTemplate.js
│ │ ├── ExportMenuItem
│ │ │ └── ExportMenuItem.component.tsx
│ │ ├── SyncingIndicator
│ │ │ ├── SyncingIndicator.tsx
│ │ │ └── SyncingIndicator.scss
│ │ ├── ButtonAction
│ │ │ └── ButtonAction.tsx
│ │ ├── EvReadOnlyHeading
│ │ │ ├── EvReadOnlyHeading.scss
│ │ │ └── EvReadOnlyHeading.tsx
│ │ ├── ExpandChevron
│ │ │ ├── ExpandChevron.tsx
│ │ │ └── ExpandChevron.scss
│ │ ├── Checkbox
│ │ │ └── Checkbox.tsx
│ │ ├── CommentPosted
│ │ │ └── CommentPosted.scss
│ │ ├── CreateProjectModal
│ │ │ └── CreateProjectModal.scss
│ │ ├── ProgressIndicator
│ │ │ └── ProgressIndicator.scss
│ │ ├── ButtonTabIcon
│ │ │ ├── ButtonTabIcon.scss
│ │ │ └── ButtonTabIcon.tsx
│ │ ├── Breadcrumbs
│ │ │ └── Breadcrumbs.scss
│ │ ├── ChecklistItem
│ │ │ └── ChecklistItem.scss
│ │ ├── Typography
│ │ │ └── Typography.tsx
│ │ └── FilterButton
│ │ │ └── FilterButton.tsx
│ ├── routes
│ │ ├── VersionUpdateLeaving
│ │ │ └── VersionUpdateLeaving.scss
│ │ ├── ProjectView
│ │ │ ├── TableView
│ │ │ │ └── TableView.scss
│ │ │ └── MapView
│ │ │ │ └── MapView.scss
│ │ ├── App.scss
│ │ └── VersionUpdateEntering
│ │ │ └── VersionUpdateEntering.scss
│ ├── images
│ │ ├── intro-vis-1.png
│ │ ├── intro-vis-2.png
│ │ ├── intro-vis-3.png
│ │ ├── intro-vis-4.png
│ │ ├── acorn-alpha-logo.png
│ │ ├── error-screen-image.png
│ │ ├── splash-image-valeriia-miller.jpg
│ │ ├── minus.svg
│ │ ├── check.svg
│ │ ├── lightning.svg
│ │ ├── plus.svg
│ │ ├── title.svg
│ │ ├── x.svg
│ │ ├── chevron-up.svg
│ │ ├── circle.svg
│ │ ├── chevron-down.svg
│ │ ├── chevron-left.svg
│ │ ├── chevron-right.svg
│ │ ├── popup-triangle-white.svg
│ │ ├── send-plane.svg
│ │ ├── folder.svg
│ │ ├── pencil.svg
│ │ ├── square-check.svg
│ │ ├── archive.svg
│ │ ├── comment.svg
│ │ ├── door-closed.svg
│ │ ├── file-copy.svg
│ │ ├── flask.svg
│ │ ├── search.svg
│ │ ├── enter.svg
│ │ ├── circle-check.svg
│ │ ├── map.svg
│ │ ├── arrow-right.svg
│ │ ├── lock-closed.svg
│ │ ├── notification.svg
│ │ ├── activity-history.svg
│ │ ├── arrow-down-left.svg
│ │ ├── calendar.svg
│ │ ├── circle-x.svg
│ │ ├── circle-alert.svg
│ │ ├── link.svg
│ │ ├── squares-check.svg
│ │ ├── navigation.svg
│ │ ├── table.svg
│ │ ├── text-align-left.svg
│ │ ├── arrow-circle-up.svg
│ │ ├── tag.svg
│ │ ├── sort-asc.svg
│ │ ├── delete-bin.svg
│ │ ├── edit.svg
│ │ ├── leaf.svg
│ │ ├── details.svg
│ │ ├── door-open.svg
│ │ ├── export.svg
│ │ ├── timer.svg
│ │ ├── user-plus.svg
│ │ ├── aspect-ratio.svg
│ │ ├── barbell.svg
│ │ ├── import.svg
│ │ ├── test-tube.svg
│ │ ├── zoom-in.svg
│ │ ├── booklet.svg
│ │ ├── eye.svg
│ │ ├── dots-vertical.svg
│ │ ├── expand.svg
│ │ ├── dots-horizontal.svg
│ │ ├── external-link.svg
│ │ ├── chats-circle.svg
│ │ ├── share.svg
│ │ ├── popup-curved-pointer-downside.svg
│ │ ├── popup-curved-pointer-upside.svg
│ │ ├── team.svg
│ │ ├── github.svg
│ │ ├── square-check-grey.svg
│ │ ├── square-check-green.svg
│ │ ├── font.svg
│ │ ├── mouse.svg
│ │ ├── progress-circle.svg
│ │ ├── help.svg
│ │ ├── validation-check.svg
│ │ ├── tooltip-triangle-bottom.svg
│ │ ├── triangle-bottom-white.svg
│ │ ├── triangle-top-white.svg
│ │ ├── tooltip-triangle-top.svg
│ │ ├── validation-x.svg
│ │ ├── achieved.svg
│ │ ├── leaf-bronze.svg
│ │ ├── leaf-green.svg
│ │ ├── confirmation.svg
│ │ ├── info.svg
│ │ ├── destructive.svg
│ │ ├── panning.svg
│ │ ├── refresh.svg
│ │ ├── uncertain.svg
│ │ ├── collapse.svg
│ │ ├── earth.svg
│ │ ├── expand2.svg
│ │ ├── avatar-placeholder.svg
│ │ ├── information.svg
│ │ ├── attachment.svg
│ │ └── warning.svg
│ ├── types
│ │ ├── member.ts
│ │ ├── editingOutcomeDetails.ts
│ │ ├── whoAmIOutput.ts
│ │ ├── profile.ts
│ │ ├── entryPointDetails.ts
│ │ ├── realtimeInfoInput.ts
│ │ ├── createOutcomeWithConnectionOutput.ts
│ │ ├── deleteOutcomeFullyResponse.ts
│ │ ├── projectMeta.ts
│ │ ├── createOutcomeWithConnectionInput.ts
│ │ └── index.ts
│ ├── fonts
│ │ ├── gilroy
│ │ │ ├── gilroy-light-webfont.woff
│ │ │ ├── gilroy-light-webfont.woff2
│ │ │ ├── gilroy-extrabold-webfont.woff
│ │ │ └── gilroy-extrabold-webfont.woff2
│ │ └── plus-jakarta-sans
│ │ │ ├── PlusJakartaSans-Bold.woff
│ │ │ ├── PlusJakartaSans-Bold.woff2
│ │ │ ├── PlusJakartaSans-Italic.woff
│ │ │ ├── PlusJakartaSans-Italic.woff2
│ │ │ ├── PlusJakartaSans-Light.woff
│ │ │ ├── PlusJakartaSans-Light.woff2
│ │ │ ├── PlusJakartaSans-Medium.woff
│ │ │ ├── PlusJakartaSans-Medium.woff2
│ │ │ ├── PlusJakartaSans-Regular.woff
│ │ │ ├── PlusJakartaSans-ExtraBold.woff
│ │ │ ├── PlusJakartaSans-Regular.woff2
│ │ │ ├── PlusJakartaSans-SemiBold.woff
│ │ │ ├── PlusJakartaSans-SemiBold.woff2
│ │ │ ├── PlusJakartaSans-BoldItalic.woff
│ │ │ ├── PlusJakartaSans-BoldItalic.woff2
│ │ │ ├── PlusJakartaSans-ExtraBold.woff2
│ │ │ ├── PlusJakartaSans-ExtraLight.woff
│ │ │ ├── PlusJakartaSans-ExtraLight.woff2
│ │ │ ├── PlusJakartaSans-LightItalic.woff
│ │ │ ├── PlusJakartaSans-LightItalic.woff2
│ │ │ ├── PlusJakartaSans-MediumItalic.woff
│ │ │ ├── PlusJakartaSans-MediumItalic.woff2
│ │ │ ├── PlusJakartaSans-SemiBoldItalic.woff
│ │ │ ├── PlusJakartaSans-ExtraBoldItalic.woff
│ │ │ ├── PlusJakartaSans-ExtraBoldItalic.woff2
│ │ │ ├── PlusJakartaSans-ExtraLightItalic.woff
│ │ │ ├── PlusJakartaSans-ExtraLightItalic.woff2
│ │ │ └── PlusJakartaSans-SemiBoldItalic.woff2
│ ├── index.html
│ ├── drawing
│ │ ├── draw.ts
│ │ ├── imageCache.js
│ │ ├── drawOverlay.ts
│ │ ├── drawOutcome
│ │ │ ├── computeArguments
│ │ │ │ ├── argsForDrawBeingEdited.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── computeHeightsWithSpacing.ts
│ │ │ │ └── argsForDrawPeopleActive.ts
│ │ │ ├── drawBeingEdited.ts
│ │ │ └── drawSmallLeaf.ts
│ │ └── checkOutcomeAgainstViewingFilters.ts
│ ├── searchParams.ts
│ ├── stories
│ │ ├── testData
│ │ │ ├── testMember.ts
│ │ │ ├── testAgent.ts
│ │ │ ├── testEntryPoint.ts
│ │ │ ├── testConnection.ts
│ │ │ ├── testOutcomeMember.ts
│ │ │ └── testProjectMeta.ts
│ │ ├── CommentInput.stories.tsx
│ │ └── ButtonClose.stories.tsx
│ ├── redux
│ │ ├── ephemeral
│ │ │ ├── viewport
│ │ │ │ └── state-type.ts
│ │ │ ├── outcome-clone
│ │ │ │ ├── actions.js
│ │ │ │ └── reducer.js
│ │ │ ├── screensize
│ │ │ │ ├── reducer.js
│ │ │ │ └── actions.js
│ │ │ ├── active-project
│ │ │ │ ├── reducer.ts
│ │ │ │ └── actions.ts
│ │ │ ├── active-entry-points
│ │ │ │ ├── reducer.ts
│ │ │ │ └── actions.ts
│ │ │ ├── realtime-info
│ │ │ │ ├── actions.js
│ │ │ │ └── reducer.js
│ │ │ ├── expanded-view
│ │ │ │ ├── actions.js
│ │ │ │ └── reducer.js
│ │ │ ├── keyboard
│ │ │ │ ├── reducer.ts
│ │ │ │ └── actions.ts
│ │ │ ├── layout
│ │ │ │ ├── state-type.ts
│ │ │ │ └── reducer.ts
│ │ │ ├── navigation-modal
│ │ │ │ └── selector.ts
│ │ │ ├── local-preferences
│ │ │ │ └── actions.js
│ │ │ ├── animations
│ │ │ │ └── getGraphForState.ts
│ │ │ └── outcome-editing
│ │ │ │ └── reducer.js
│ │ └── persistent
│ │ │ ├── projects
│ │ │ ├── outcome-history
│ │ │ │ ├── actions.js
│ │ │ │ └── reducer.js
│ │ │ ├── realtime-info-signal
│ │ │ │ └── actions.ts
│ │ │ ├── tags
│ │ │ │ └── actions.ts
│ │ │ ├── reducer.ts
│ │ │ ├── outcome-members
│ │ │ │ └── actions.ts
│ │ │ ├── outcome-comments
│ │ │ │ └── actions.ts
│ │ │ └── entry-points
│ │ │ │ └── select.ts
│ │ │ └── profiles
│ │ │ ├── my-local-profile
│ │ │ ├── reducer.ts
│ │ │ └── actions.ts
│ │ │ └── agent-address
│ │ │ ├── reducer.ts
│ │ │ └── actions.ts
│ ├── context
│ │ ├── AppWebsocketContext.ts
│ │ ├── ComputedOutcomeContext.ts
│ │ └── ToastContext.ts
│ ├── migrating
│ │ └── import
│ │ │ └── zomeApiCreators.ts
│ ├── hooks
│ │ ├── useAppWebsocket.ts
│ │ └── useFileDownloaded.ts
│ ├── constants.ts
│ ├── api
│ │ ├── clientSideIdHash.ts
│ │ ├── callZome.ts
│ │ └── cleanOutcome.ts
│ ├── event-listeners
│ │ ├── bodyKeyup.ts
│ │ ├── windowResize.ts
│ │ └── helpers
│ │ │ ├── osPlatformHelper.ts
│ │ │ └── closestOutcome.ts
│ ├── weave
│ │ └── ProjectAssetView.scss
│ ├── projects
│ │ └── uninstallProject.ts
│ ├── secrets.ts
│ ├── projectAppIds.ts
│ └── holochainConfig.ts
├── dist
│ ├── icon.png
│ ├── logo
│ │ └── acorn-app-icon-512px.png
│ └── index.html
├── .storybook
│ ├── preview.js
│ └── main.js
├── .babelrc.json
├── test
│ ├── mockTag.ts
│ ├── mockConnection.ts
│ ├── mockOutcome.ts
│ ├── mockOutcomeMember.ts
│ ├── mockEntryPoint.ts
│ ├── mockOutcomeComment.ts
│ ├── mockWhoami.ts
│ ├── mockActionHashMaps.ts
│ ├── mockProjectMeta.ts
│ └── mockProjectData.ts
├── tsconfig.json
└── jest.config.js
├── happs
├── happ
│ ├── zomes
│ │ ├── projects
│ │ │ ├── src
│ │ │ │ ├── project
│ │ │ │ │ ├── connection
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── crud.rs
│ │ │ │ │ ├── outcome
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── tag
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── crud.rs
│ │ │ │ │ ├── entry_point
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── outcome_comment
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── crud.rs
│ │ │ │ │ ├── outcome_member
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── outcome_vote
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── crud.rs
│ │ │ │ │ ├── project_meta
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── member
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ └── mod.rs
│ │ │ │ └── ui_enum.rs
│ │ │ └── Cargo.toml
│ │ ├── projects_integrity
│ │ │ ├── src
│ │ │ │ ├── project
│ │ │ │ │ ├── tag
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── entry.rs
│ │ │ │ │ ├── member
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── entry.rs
│ │ │ │ │ ├── connection
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── entry.rs
│ │ │ │ │ ├── entry_point
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── outcome_member
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── outcome_vote
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── project_meta
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ ├── outcome_comment
│ │ │ │ │ │ ├── mod.rs
│ │ │ │ │ │ └── entry.rs
│ │ │ │ │ ├── outcome
│ │ │ │ │ │ └── mod.rs
│ │ │ │ │ └── mod.rs
│ │ │ │ └── ui_enum.rs
│ │ │ └── Cargo.toml
│ │ ├── profiles_integrity
│ │ │ └── Cargo.toml
│ │ └── profiles
│ │ │ └── Cargo.toml
│ └── workdir
│ │ ├── web-happ.yaml
│ │ ├── happ.yaml
│ │ └── dna
│ │ └── projects
│ │ └── dna.yaml
├── .gitignore
├── README.md
├── lib
│ └── hdk_crud
│ │ ├── src
│ │ ├── modify_chain
│ │ │ └── mod.rs
│ │ ├── retrieval
│ │ │ ├── mod.rs
│ │ │ ├── inputs.rs
│ │ │ └── utils.rs
│ │ ├── lib.rs
│ │ ├── datetime_queries
│ │ │ └── mod.rs
│ │ └── wire_record.rs
│ │ ├── run-test.sh
│ │ └── README.md
├── AUTHORS.md
├── scripts
│ └── happ-pack.sh
└── Cargo.toml
├── icons
├── zippy.jpg
├── zerbina.jpg
├── lrl-icon.png
└── acorn-app-icon-512px.png
├── .prettierrc
├── acorn-design-sample-june2022.png
├── zod-models
├── src
│ ├── withActionHashSchema.ts
│ ├── scope
│ │ ├── small
│ │ │ ├── smallsEstimateSchema.ts
│ │ │ ├── achievementStatus.ts
│ │ │ ├── smallTaskSchema.ts
│ │ │ └── smallScopeSchema.ts
│ │ ├── uncertain
│ │ │ ├── timeFrameSchema.ts
│ │ │ └── uncertainScopeSchema.ts
│ │ └── scopeSchema.ts
│ ├── profile
│ │ └── profileSchema.ts
│ ├── tag
│ │ └── tagSchema.ts
│ ├── connection
│ │ ├── v11
│ │ │ └── connectionV11Schema.ts
│ │ └── v12
│ │ │ └── connectionV12Schema.ts
│ ├── projectMetaSchema
│ │ ├── v0
│ │ │ └── projectMetaV0Schema.ts
│ │ ├── v1
│ │ │ └── projectMetaV1Schema.ts
│ │ └── projectMetaSchema.ts
│ ├── entryPoint
│ │ └── entryPointSchema.ts
│ ├── outcomeMember
│ │ └── outcomeMemberSchema.ts
│ ├── outcomeComment
│ │ └── outcomeCommentSchema.ts
│ ├── outcome
│ │ └── outcomeSchema.ts
│ └── zodModels.ts
├── package.json
└── tsconfig.json
├── scripts
├── build-webhapp.sh
├── component-template
│ └── component.tsx
└── add-components.sh
├── AUTHORS.md
├── CHANGELOG.md
├── spec
└── weave-types.md
├── .gitignore
└── flake.nix
/config-main-app-id:
--------------------------------------------------------------------------------
1 | main-app
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
--------------------------------------------------------------------------------
/web/src/components/MenuPopup/MenuPopup.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/MenuPopup/MenuPopup.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/OnClickOutside/OnClickOutside.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/DeleteProjectModal/DeleteProjectModal.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/routes/VersionUpdateLeaving/VersionUpdateLeaving.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/OutcomeConnectors/OutcomeConnectors.scss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web/src/components/ProjectMigratedModal/ProjectMigratedModal.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/SmartOutcomeConnector/SmartOutcomeConnector.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/connection/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/tag/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/entry_point/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome_comment/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome_member/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome_vote/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/project_meta/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod crud;
2 |
3 |
--------------------------------------------------------------------------------
/web/src/components/ProgressIndicatorCalculated/ProgressIndicatorCalculated.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | **/*.dna
3 | **/*.happ
4 |
5 | **/.DS_Store
6 | .DS_Store
--------------------------------------------------------------------------------
/icons/zippy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/icons/zippy.jpg
--------------------------------------------------------------------------------
/icons/zerbina.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/icons/zerbina.jpg
--------------------------------------------------------------------------------
/web/dist/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/dist/icon.png
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/member/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 |
3 | pub mod zome_fns;
4 |
--------------------------------------------------------------------------------
/icons/lrl-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/icons/lrl-icon.png
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/tag/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/member/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/connection/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/entry_point/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/outcome_member/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/outcome_vote/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/project_meta/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/web/src/components/InviteMembersModal/InviteMembersModal.scss:
--------------------------------------------------------------------------------
1 | .invite-members-modal {
2 | width: 33rem;
3 | }
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/outcome_comment/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 |
--------------------------------------------------------------------------------
/icons/acorn-app-icon-512px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/icons/acorn-app-icon-512px.png
--------------------------------------------------------------------------------
/web/src/components/ProfileEditFormModal/ProfileEditFormModal.scss:
--------------------------------------------------------------------------------
1 | .edit-profile-modal {
2 | width: 40.5rem;
3 | }
--------------------------------------------------------------------------------
/web/src/images/intro-vis-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/intro-vis-1.png
--------------------------------------------------------------------------------
/web/src/images/intro-vis-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/intro-vis-2.png
--------------------------------------------------------------------------------
/web/src/images/intro-vis-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/intro-vis-3.png
--------------------------------------------------------------------------------
/web/src/images/intro-vis-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/intro-vis-4.png
--------------------------------------------------------------------------------
/web/src/routes/ProjectView/TableView/TableView.scss:
--------------------------------------------------------------------------------
1 | .table-view {
2 | flex: 1;
3 | overflow: hidden;
4 | }
5 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "tabWidth": 2,
4 | "semi": false,
5 | "singleQuote": true
6 | }
7 |
--------------------------------------------------------------------------------
/acorn-design-sample-june2022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/acorn-design-sample-june2022.png
--------------------------------------------------------------------------------
/web/src/components/MapViewContextMenu/MapViewContextMenu.scss:
--------------------------------------------------------------------------------
1 | .map-view-context-menu {
2 | position: absolute;
3 | }
4 |
--------------------------------------------------------------------------------
/web/src/images/acorn-alpha-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/acorn-alpha-logo.png
--------------------------------------------------------------------------------
/web/src/images/error-screen-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/error-screen-image.png
--------------------------------------------------------------------------------
/happs/README.md:
--------------------------------------------------------------------------------
1 | # Acorn hApp
2 |
3 | This folder is home to the holochain hApp definitions, DNA definitions and Zome Rust/WASM code.
4 |
--------------------------------------------------------------------------------
/web/dist/logo/acorn-app-icon-512px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/dist/logo/acorn-app-icon-512px.png
--------------------------------------------------------------------------------
/web/src/types/member.ts:
--------------------------------------------------------------------------------
1 | import { AgentPubKeyB64 } from './shared'
2 |
3 | export interface Member {
4 | agentPubKey: AgentPubKeyB64
5 | }
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/modify_chain/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod do_create;
2 | pub mod do_delete;
3 | pub mod do_fetch;
4 | pub mod do_update;
5 | pub mod utils;
6 |
--------------------------------------------------------------------------------
/web/src/components/RemoveSelfProjectModal/RemoveSelfProjectModal.scss:
--------------------------------------------------------------------------------
1 | .remove-self-modal {
2 |
3 | .modal-wrapper {
4 | width: 540px;
5 | }
6 | }
--------------------------------------------------------------------------------
/web/src/fonts/gilroy/gilroy-light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/gilroy/gilroy-light-webfont.woff
--------------------------------------------------------------------------------
/web/src/fonts/gilroy/gilroy-light-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/gilroy/gilroy-light-webfont.woff2
--------------------------------------------------------------------------------
/web/src/images/splash-image-valeriia-miller.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/images/splash-image-valeriia-miller.jpg
--------------------------------------------------------------------------------
/web/dist/index.html:
--------------------------------------------------------------------------------
1 |
Acorn
--------------------------------------------------------------------------------
/web/src/fonts/gilroy/gilroy-extrabold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/gilroy/gilroy-extrabold-webfont.woff
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/outcome/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod entry;
2 | // pub mod validate;
3 | pub mod uncertain_scope;
4 | pub mod small_scope;
5 |
--------------------------------------------------------------------------------
/web/src/fonts/gilroy/gilroy-extrabold-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/gilroy/gilroy-extrabold-webfont.woff2
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/run-test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # --nocapture makes sure the logging output is visible
3 | cargo test -j 2 --lib --features="mock" -- --nocapture
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/retrieval/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod fetch_entries;
2 | pub mod fetch_links;
3 | pub mod get_latest_for_entry;
4 | pub mod inputs;
5 | pub mod utils;
6 |
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod modify_chain;
2 | pub mod crud;
3 | pub mod datetime_queries;
4 | pub mod retrieval;
5 | pub mod signals;
6 | pub mod wire_record;
7 |
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/NavEnum.ts:
--------------------------------------------------------------------------------
1 | export enum ExpandedViewTab {
2 | Details,
3 | Comments,
4 | ChildrenList,
5 | TaskList,
6 | Attachments,
7 | }
8 |
--------------------------------------------------------------------------------
/web/src/components/JoinProjectModal/JoinProjectModal.scss:
--------------------------------------------------------------------------------
1 | .join-project-modal {
2 | width: 31.5rem;
3 | position: relative;
4 | justify-content: space-between;
5 | }
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Bold.woff
--------------------------------------------------------------------------------
/happs/happ/workdir/web-happ.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | manifest_version: '1'
3 | name: acorn
4 | ui:
5 | bundled: '../../../web/dist.zip'
6 | happ_manifest:
7 | bundled: './acorn.happ'
8 |
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Bold.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Italic.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Italic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Light.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Light.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Medium.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Medium.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Regular.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBold.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-Regular.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBold.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBold.woff2
--------------------------------------------------------------------------------
/web/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Acorn
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/ui_enum.rs:
--------------------------------------------------------------------------------
1 |
2 | use hdk::prelude::*;
3 |
4 | #[derive(Debug, Serialize, Deserialize, SerializedBytes, Clone, PartialEq)]
5 | pub struct UIEnum(pub String);
--------------------------------------------------------------------------------
/web/src/drawing/draw.ts:
--------------------------------------------------------------------------------
1 | export default function draw(
2 | ctx: CanvasRenderingContext2D,
3 | drawFn: () => void
4 | ) {
5 | ctx.save()
6 | drawFn()
7 | ctx.restore()
8 | }
9 |
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-BoldItalic.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-BoldItalic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBold.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLight.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLight.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLight.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLight.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-LightItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-LightItalic.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-LightItalic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-MediumItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-MediumItalic.woff
--------------------------------------------------------------------------------
/web/src/components/MapViewDevMode/MapViewDevMode.scss:
--------------------------------------------------------------------------------
1 | .map-view-dev-mode {
2 | width: 1000px;
3 | height: 1000px;
4 | canvas {
5 | height: 100%;
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-MediumItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-MediumItalic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBoldItalic.woff
--------------------------------------------------------------------------------
/web/src/searchParams.ts:
--------------------------------------------------------------------------------
1 | export const GO_TO_OUTCOME = 'go_to_outcome'
2 |
3 | export const ENTRY_POINTS = 'entry_points'
4 |
5 | export const CREATE_ENTRY_POINT_KEY = 'create_entry_point'
6 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/ui_enum.rs:
--------------------------------------------------------------------------------
1 |
2 | use hdi::prelude::*;
3 |
4 | #[derive(Debug, Serialize, Deserialize, SerializedBytes, Clone, PartialEq)]
5 | pub struct UIEnum(pub String);
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBoldItalic.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraBoldItalic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLightItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLightItalic.woff
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-ExtraLightItalic.woff2
--------------------------------------------------------------------------------
/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lightningrodlabs/acorn/HEAD/web/src/fonts/plus-jakarta-sans/PlusJakartaSans-SemiBoldItalic.woff2
--------------------------------------------------------------------------------
/web/src/stories/testData/testMember.ts:
--------------------------------------------------------------------------------
1 | import { Member } from '../../types'
2 |
3 | const testMember: Member = {
4 | agentPubKey: 'testMemberAgentPubKey',
5 | }
6 |
7 | export default testMember
8 |
--------------------------------------------------------------------------------
/web/src/types/editingOutcomeDetails.ts:
--------------------------------------------------------------------------------
1 | import { ActionHashB64 } from './shared'
2 |
3 | export interface EditingOutcomeDetails {
4 | outcomeActionHash: ActionHashB64
5 | isTitle: boolean
6 | }
7 |
--------------------------------------------------------------------------------
/zod-models/src/withActionHashSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const WithActionHashSchema = z.object({
4 | actionHash: z.string().nonempty()
5 | })
6 |
7 | export default WithActionHashSchema
--------------------------------------------------------------------------------
/web/src/components/OutcomeTableWithFilters/OutcomeTableWithFilters.scss:
--------------------------------------------------------------------------------
1 | .outcome-table-with-filters {
2 | height: 100%;
3 | display: flex;
4 | flex-direction: column;
5 | overflow: hidden;
6 | }
7 |
--------------------------------------------------------------------------------
/scripts/build-webhapp.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # crash on error, don't continue
4 | set -e
5 |
6 | yarn workspace acorn-ui build
7 | yarn run zip-ui
8 |
9 | cd happs/happ/workdir
10 | hc web-app pack .
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/viewport/state-type.ts:
--------------------------------------------------------------------------------
1 | interface ViewportState {
2 | translate: {
3 | x: number
4 | y: number
5 | }
6 | scale: number
7 | }
8 |
9 | export { ViewportState }
10 |
--------------------------------------------------------------------------------
/web/src/types/whoAmIOutput.ts:
--------------------------------------------------------------------------------
1 | import { Profile } from '.'
2 | import { WireRecord } from '../api/hdkCrud'
3 | import { Option } from './shared'
4 |
5 | export type WhoAmIOutput = Option>
6 |
--------------------------------------------------------------------------------
/web/src/types/profile.ts:
--------------------------------------------------------------------------------
1 | import { Profile } from 'zod-models'
2 | import { ActionHashB64 } from './shared'
3 |
4 | export type AssigneeWithActionHash = {
5 | profile: Profile
6 | outcomeMemberActionHash: ActionHashB64
7 | }
8 |
--------------------------------------------------------------------------------
/web/src/context/AppWebsocketContext.ts:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { AppClient } from '@holochain/client'
3 |
4 | const AppWebsocketContext = React.createContext(null)
5 |
6 | export default AppWebsocketContext
7 |
--------------------------------------------------------------------------------
/web/.storybook/preview.js:
--------------------------------------------------------------------------------
1 | export const parameters = {
2 | actions: { argTypesRegex: '^on[A-Z].*' },
3 | controls: {
4 | matchers: {
5 | color: /(background|color)$/i,
6 | date: /Date$/,
7 | },
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/zod-models/src/scope/small/smallsEstimateSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const SmallsEstimateSchema = z.number().nullable()
4 |
5 | export type SmallsEstimate = z.infer
6 | export default SmallsEstimateSchema
--------------------------------------------------------------------------------
/web/src/routes/App.scss:
--------------------------------------------------------------------------------
1 | .profile_edit_wrapper {
2 | position: fixed;
3 | top: 50%;
4 | left: 50%;
5 | transform: translate(-50%, -50%);
6 | background: #ffffff;
7 | box-shadow: 0px 0px 6px #00000041;
8 | border-radius: 10px;
9 | }
10 |
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/retrieval/inputs.rs:
--------------------------------------------------------------------------------
1 | use hdk::prelude::*;
2 | use holo_hash::EntryHashB64;
3 |
4 | #[derive(Debug, PartialEq, Serialize, Deserialize, SerializedBytes)]
5 | pub enum FetchOptions {
6 | All,
7 | Specific(Vec),
8 | }
9 |
--------------------------------------------------------------------------------
/web/src/images/minus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/zod-models/src/scope/small/achievementStatus.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const AchievementStatusSchema = z.enum(['Achieved', 'NotAchieved'])
4 |
5 | export type AchievementStatus = z.infer
6 | export default AchievementStatusSchema
--------------------------------------------------------------------------------
/web/src/types/entryPointDetails.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../api/hdkCrud'
2 | import { Outcome, EntryPoint } from 'zod-models'
3 |
4 | export interface EntryPointDetails {
5 | entryPoints: Array>
6 | outcomes: Array>
7 | }
8 |
--------------------------------------------------------------------------------
/web/src/images/check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/zod-models/src/scope/small/smallTaskSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const SmallTaskSchema = z.object({
4 | complete: z.boolean(),
5 | task: z.string(),
6 | })
7 |
8 | export type SmallTask = z.infer
9 |
10 | export default SmallTaskSchema
--------------------------------------------------------------------------------
/zod-models/src/scope/uncertain/timeFrameSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const TimeFrameSchema = z.object({
4 | fromDate: z.number(),
5 | toDate: z.number(),
6 | }).nullable()
7 |
8 | export type TimeFrame = z.infer
9 | export default TimeFrameSchema
--------------------------------------------------------------------------------
/web/src/images/lightning.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/plus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/title.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/x.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/outcome-clone/actions.js:
--------------------------------------------------------------------------------
1 | const SET_OUTCOME_CLONE = 'SET_OUTCOME_CLONE'
2 |
3 | function setOutcomeClone(outcomes) {
4 | return {
5 | type: SET_OUTCOME_CLONE,
6 | payload: outcomes,
7 | }
8 | }
9 | export { SET_OUTCOME_CLONE, setOutcomeClone }
10 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod connection;
2 | pub mod tag;
3 | pub mod entry_point;
4 | pub mod error;
5 | pub mod member;
6 | pub mod outcome;
7 | pub mod outcome_comment;
8 | pub mod outcome_member;
9 | pub mod outcome_vote;
10 | pub mod project_meta;
11 |
12 |
--------------------------------------------------------------------------------
/web/src/images/chevron-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/chevron-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/chevron-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/chevron-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/stories/testData/testAgent.ts:
--------------------------------------------------------------------------------
1 | import { AgentsState } from '../../../../web/src/redux/persistent/profiles/agents/reducer'
2 | import testProfile from './testProfile'
3 |
4 | const testAgent: AgentsState = {
5 | '389457985y498592847': testProfile,
6 | }
7 |
8 | export default testAgent
9 |
--------------------------------------------------------------------------------
/web/src/migrating/import/zomeApiCreators.ts:
--------------------------------------------------------------------------------
1 | import { AppClient } from '@holochain/client'
2 | import ProjectsZomeApi from '../../api/projectsApi'
3 |
4 | export function createProjectsZomeApi(
5 | appWebsocket: AppClient
6 | ): ProjectsZomeApi {
7 | return new ProjectsZomeApi(appWebsocket)
8 | }
9 |
--------------------------------------------------------------------------------
/web/src/images/popup-triangle-white.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/web/src/images/send-plane.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/retrieval/utils.rs:
--------------------------------------------------------------------------------
1 | use hdk::prelude::*;
2 |
3 | /// convert a SignedActionHashed which are like raw contents
4 | /// into the ActionHash of itself
5 | pub fn get_action_hash(signed_action_hashed: SignedActionHashed) -> ActionHash {
6 | signed_action_hashed.as_hash().to_owned()
7 | }
8 |
--------------------------------------------------------------------------------
/web/src/drawing/imageCache.js:
--------------------------------------------------------------------------------
1 | const imgCache = {}
2 |
3 | export function getOrSetImageForUrl(url, width, height) {
4 | if (imgCache[url]) {
5 | return imgCache[url]
6 | }
7 |
8 | const newImage = new Image()
9 | newImage.src = url
10 | imgCache[url] = newImage
11 | return null
12 | }
13 |
--------------------------------------------------------------------------------
/web/src/images/folder.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/pencil.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/AUTHORS.md:
--------------------------------------------------------------------------------
1 | # Authors
2 |
3 | - Harris-Braun Enterprises LLC, operating as Lightningrod Labs (https://lightningrodlabs.org) (2019 - present)
4 | - Sprillow Limited (https://sprillow.com) (2019 - present)
5 | - EYSS Tech UK, LTD (https://eyss.io) (2019)
6 | - David Meister (https://github.com/thedavidmeister) (2019)
7 |
--------------------------------------------------------------------------------
/web/src/images/square-check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/routes/VersionUpdateEntering/VersionUpdateEntering.scss:
--------------------------------------------------------------------------------
1 | .migration-actions {
2 | margin-top: 2rem;
3 | width: 100%;
4 |
5 | .button-group {
6 | margin-top: 2rem;
7 | display: flex;
8 | flex-direction: row;
9 | width: 100%;
10 | justify-content: space-evenly;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/happs/AUTHORS.md:
--------------------------------------------------------------------------------
1 | # Authors
2 |
3 | - Harris-Braun Enterprises LLC, operating as Lightningrod Labs (https://lightningrodlabs.org) (2019 - present)
4 | - Sprillow Limited (https://sprillow.com) (2019 - present)
5 | - EYSS Tech UK, LTD (https://eyss.io) (2019)
6 | - David Meister (https://github.com/thedavidmeister) (2019)
7 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod connection;
2 | pub mod tag;
3 | pub mod entry_point;
4 | pub mod error;
5 | pub mod member;
6 | pub mod outcome;
7 | pub mod outcome_comment;
8 | pub mod outcome_member;
9 | pub mod outcome_vote;
10 | pub mod project_meta;
11 | // pub mod validate;
12 |
--------------------------------------------------------------------------------
/web/src/components/MembersIndicator/MembersIndicator.scss:
--------------------------------------------------------------------------------
1 | .members-indicator-wrapper {
2 | background: rgba(255, 255, 255, 0.9);
3 | border-radius: 10px;
4 | display: flex;
5 | align-items: center;
6 | height: 3rem;
7 | padding-right: 0.5rem;
8 | padding-left: 0.825rem;
9 | margin: 0 6px;
10 | }
11 |
--------------------------------------------------------------------------------
/happs/happ/workdir/happ.yaml:
--------------------------------------------------------------------------------
1 | manifest_version: "1"
2 | name: acorn
3 | description: productivity tool for distributed software teams
4 | roles:
5 | - name: projects
6 | provisioning:
7 | strategy: create
8 | deferred: true
9 | dna:
10 | bundled: "./projects.dna"
11 | clone_limit: 999
12 |
--------------------------------------------------------------------------------
/web/src/images/archive.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/comment.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/door-closed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/file-copy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/flask.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/.babelrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceType": "unambiguous",
3 | "presets": [
4 | [
5 | "@babel/preset-env",
6 | {
7 | "targets": {
8 | "chrome": 100
9 | }
10 | }
11 | ],
12 | "@babel/preset-typescript",
13 | "@babel/preset-react"
14 | ],
15 | "plugins": []
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/images/enter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/types/realtimeInfoInput.ts:
--------------------------------------------------------------------------------
1 | import { ActionHashB64, Option } from './shared'
2 | import { EditingOutcomeDetails } from './editingOutcomeDetails'
3 |
4 | export interface RealtimeInfoInput {
5 | projectId: String
6 | outcomeBeingEdited: Option
7 | outcomeExpandedView: Option
8 | }
9 |
--------------------------------------------------------------------------------
/happs/happ/zomes/profiles_integrity/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "profiles_integrity"
4 | version = "0.0.1"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 | name = "profiles_integrity"
9 |
10 | [dependencies]
11 | hdi = { workspace = true }
12 | holo_hash = { workspace = true }
13 | serde = "*"
14 |
--------------------------------------------------------------------------------
/scripts/component-template/component.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './ReplaceMe.scss'
3 |
4 | export type ReplaceMeProps = {
5 | // proptypes
6 | }
7 |
8 | const ReplaceMe: React.FC = ({
9 | // prop declarations
10 | }) => {
11 | return
12 | }
13 |
14 | export default ReplaceMe
15 |
--------------------------------------------------------------------------------
/web/src/images/circle-check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/map.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/types/createOutcomeWithConnectionOutput.ts:
--------------------------------------------------------------------------------
1 | import { Connection, Outcome } from 'zod-models'
2 | import { WireRecord } from '../api/hdkCrud'
3 | import { Option } from './shared'
4 |
5 | export interface CreateOutcomeWithConnectionOutput {
6 | outcome: WireRecord
7 | maybeConnection: Option>
8 | }
9 |
--------------------------------------------------------------------------------
/web/src/images/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/lock-closed.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/notification.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/Header/Status.ts:
--------------------------------------------------------------------------------
1 | enum Status {
2 | Online = 'Online',
3 | Away = 'Away',
4 | Offline = 'Offline',
5 | }
6 |
7 | const StatusCssColorClass = {
8 | [Status.Online]: 'status-online',
9 | [Status.Away]: 'status-away',
10 | [Status.Offline]: 'status-offline',
11 | }
12 |
13 | export { Status, StatusCssColorClass }
14 |
--------------------------------------------------------------------------------
/web/src/images/activity-history.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/arrow-down-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/calendar.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/circle-x.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/zod-models/src/scope/scopeSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 | import SmallScopeSchema from './small/smallScopeSchema'
3 | import UncertainScopeSchema from './uncertain/uncertainScopeSchema'
4 |
5 | const ScopeSchema = z.union([SmallScopeSchema, UncertainScopeSchema])
6 |
7 | export type Scope = z.infer
8 | export default ScopeSchema
--------------------------------------------------------------------------------
/web/src/images/circle-alert.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/squares-check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "projects_integrity"
4 | version = "0.0.1"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 | name = "projects_integrity"
9 |
10 | [dependencies]
11 | hdi = { workspace = true }
12 | holo_hash = { workspace = true }
13 | serde = "*"
14 | thiserror = "=1.0.40"
15 |
--------------------------------------------------------------------------------
/web/src/images/navigation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/text-align-left.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/arrow-circle-up.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/README.md:
--------------------------------------------------------------------------------
1 | # hdk_crud
2 | A library to help quickly and easily create a consistent set of create-read-update-delete functions for an Entry type in Holochain, complete with signaling options
3 |
4 | This crate is published to crates.io and documentation is publicly available.
5 |
6 | https://crates.io/crates/hdk_crud
7 |
8 | https://docs.rs/hdk_crud
9 |
--------------------------------------------------------------------------------
/web/src/images/tag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/scripts/happ-pack.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Compile the WASM
3 | cargo build --release --target-dir happs/target --target wasm32-unknown-unknown --manifest-path happs/Cargo.toml
4 |
5 | # Pack DNAs
6 | hc dna pack --output=happs/happ/workdir/projects.dna happs/happ/workdir/dna/projects
7 |
8 | # Pack hApp
9 | hc app pack --output=happs/happ/workdir/acorn.happ happs/happ/workdir
--------------------------------------------------------------------------------
/web/src/images/sort-asc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/zod-models/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "zod-models",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "dist/zodModels.js",
6 | "scripts": {
7 | "build": "tsc",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "zod": "^3.21.4"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/web/src/images/delete-bin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/leaf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/details.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/door-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/export.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/timer.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/user-plus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## Unreleased
4 |
5 | - added a Factory Reset file menu option, to reset the entire state, including your keys, of your current version
6 | - added migration error handling to smooth the version migration process
7 | - added the ability to override a migrated project so that it can be used again, if it was migrated by accident or if something went wrong
8 |
--------------------------------------------------------------------------------
/web/src/hooks/useAppWebsocket.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react";
2 | import AppWebsocketContext from "../context/AppWebsocketContext";
3 |
4 |
5 | export default function useAppWebsocket() {
6 | const appWs = useContext(AppWebsocketContext)
7 | if (!appWs) {
8 | throw new Error('useAppWebsocket must be used within a AppWebsocketProvider')
9 | }
10 | return appWs
11 | }
--------------------------------------------------------------------------------
/web/src/images/aspect-ratio.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/barbell.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/import.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/test-tube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/zoom-in.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/datetime_queries/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod fetch_by_day;
2 | pub mod fetch_by_hour;
3 | pub mod fetch_by_time;
4 | pub mod fetch_entries_from_day_to_day;
5 | pub mod fetch_entries_from_day_to_hour;
6 | pub mod fetch_entries_from_hour_to_day;
7 | pub mod fetch_entries_from_hour_to_hour;
8 | pub mod fetch_in_time_range;
9 | pub mod fetchers;
10 | pub mod inputs;
11 | pub mod utils;
12 |
--------------------------------------------------------------------------------
/web/src/components/ButtonWithPendingState/ButtonWithPendingState.scss:
--------------------------------------------------------------------------------
1 | .pending-acorn {
2 | display: flex;
3 | flex-direction: row;
4 | text-align: center;
5 | }
6 |
7 | .pending-acorn .icon {
8 | padding: 2px;
9 | margin-right: 4px;
10 | -webkit-animation: spin 2s linear infinite;
11 | -moz-animation: spin 2s linear infinite;
12 | animation: spin 2s linear infinite;
13 | }
14 |
--------------------------------------------------------------------------------
/web/src/constants.ts:
--------------------------------------------------------------------------------
1 | // last X milliseconds, adjust this value to tune the animation
2 | // of Outcomes repositioning themselves
3 | const LAYOUT_ANIMATION_TYPICAL_MS = 200
4 |
5 | // this one controls how long the animation
6 | // lasts when the layout algorithm is changed
7 | const LAYOUT_ANIMATION_ALGO_MS = 1000
8 |
9 | export { LAYOUT_ANIMATION_TYPICAL_MS, LAYOUT_ANIMATION_ALGO_MS }
10 |
--------------------------------------------------------------------------------
/web/src/images/booklet.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/test/mockTag.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import testTags from '../src/stories/testData/testTags'
3 | import { Tag } from '../src/types'
4 |
5 | const mockTag: WireRecord = {
6 | entry: testTags[0],
7 | actionHash: 'testActionHash',
8 | entryHash: 'testEntryHash',
9 | createdAt: 1234,
10 | updatedAt: 1234,
11 | }
12 |
13 | export default mockTag
14 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/outcome-history/actions.js:
--------------------------------------------------------------------------------
1 | /* action creator functions */
2 | const FETCH_OUTCOME_HISTORY = 'FETCH_OUTCOME_HISTORY'
3 |
4 | const fetchOutcomeHistory = (cellIdString, payload) => {
5 | return {
6 | type: FETCH_OUTCOME_HISTORY,
7 | payload,
8 | meta: { cellIdString },
9 | }
10 | }
11 |
12 | export { FETCH_OUTCOME_HISTORY, fetchOutcomeHistory }
13 |
--------------------------------------------------------------------------------
/web/src/images/dots-vertical.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/expand.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/dots-horizontal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/external-link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/Tag/Tag.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './Tag.scss'
3 |
4 | export type TagProps = {
5 | text: string
6 | backgroundColor: string
7 | }
8 |
9 | const Tag: React.FC = ({ text, backgroundColor }) => {
10 | return (
11 |
12 | {text}
13 |
14 | )
15 | }
16 |
17 | export default Tag
18 |
--------------------------------------------------------------------------------
/web/src/types/deleteOutcomeFullyResponse.ts:
--------------------------------------------------------------------------------
1 | import { ActionHashB64 } from './shared'
2 |
3 | export interface DeleteOutcomeFullyResponse {
4 | outcomeActionHash: ActionHashB64
5 | deletedConnections: Array
6 | deletedOutcomeMembers: Array
7 | deletedOutcomeVotes: Array
8 | deletedOutcomeComments: Array
9 | deletedEntryPoints: Array
10 | }
11 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/tag/crud.rs:
--------------------------------------------------------------------------------
1 | use crate::{get_peers_content, SignalType};
2 | use hdk::prelude::*;
3 | use hdk_crud::crud;
4 |
5 | use projects_integrity::{project::tag::entry::Tag, EntryTypes, LinkTypes};
6 |
7 | crud!(
8 | Tag,
9 | EntryTypes,
10 | EntryTypes::Tag,
11 | LinkTypes,
12 | LinkTypes::All,
13 | tag,
14 | "tag",
15 | get_peers_content,
16 | SignalType
17 | );
18 |
--------------------------------------------------------------------------------
/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": false,
4 | "outDir": "./dist/",
5 | "checkJs": false,
6 | "sourceMap": true,
7 | "noImplicitAny": false,
8 | "module": "ES2020",
9 | "target": "ES6",
10 | "jsx": "react",
11 | "allowJs": true,
12 | "moduleResolution": "node",
13 | "allowSyntheticDefaultImports": true
14 | },
15 | "exclude": ["src/stories", "test"]
16 | }
17 |
--------------------------------------------------------------------------------
/zod-models/src/profile/profileSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const ProfileSchema = z.object({
4 | firstName: z.string(),
5 | lastName: z.string(),
6 | handle: z.string(),
7 | status: z.enum(['Online', 'Offline', 'Away']),
8 | avatarUrl: z.string(),
9 | agentPubKey: z.string(),
10 | isImported: z.boolean(),
11 | })
12 |
13 | export type Profile = z.infer
14 | export default ProfileSchema
--------------------------------------------------------------------------------
/web/test/mockConnection.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import testConnection from '../src/stories/testData/testConnection'
3 | import { Connection } from '../src/types'
4 |
5 | const mockConnection: WireRecord = {
6 | entry: testConnection,
7 | actionHash: 'testActionHash',
8 | entryHash: 'testEntryHash',
9 | createdAt: 1234,
10 | updatedAt: 1234,
11 | }
12 |
13 | export default mockConnection
14 |
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvAttachments/EvAttachments.scss:
--------------------------------------------------------------------------------
1 | .ev-children-view-wrapper {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 |
6 | .ev-children-view-outcome-list {
7 | display: flex;
8 | flex-direction: column;
9 | padding: 1rem 0.5rem;
10 | overflow-y: scroll;
11 | }
12 |
13 | .ev-attachments-add-new {
14 | padding: 0 0.5rem;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvChildren/EvChildren.scss:
--------------------------------------------------------------------------------
1 | .ev-children-view-wrapper {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 |
6 | .ev-children-view-outcome-list {
7 | display: flex;
8 | flex-direction: column;
9 | padding: 1rem 0.5rem;
10 | overflow-y: scroll;
11 | }
12 |
13 | .ev-children-add-new-child {
14 | padding-left: 1.5rem;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOverlay.ts:
--------------------------------------------------------------------------------
1 | import draw from './draw'
2 |
3 | export default function render(
4 | ctx: CanvasRenderingContext2D,
5 | x: number,
6 | y: number,
7 | width: number,
8 | height: number
9 | ) {
10 | draw(ctx, () => {
11 | // counteract the scale and translation
12 | ctx.setTransform(1, 0, 0, 1, 0, 0)
13 | ctx.fillStyle = 'rgb(239 236 231 / 90%)'
14 | ctx.fillRect(x, y, width, height)
15 | })
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/images/chats-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/test/mockOutcome.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import { testBigAchievedOutcome } from '../src/stories/testData/testOutcomes'
3 | import { Outcome } from '../src/types'
4 |
5 | const mockOutcome: WireRecord = {
6 | entry: testBigAchievedOutcome,
7 | actionHash: 'testActionHash',
8 | entryHash: 'testEntryHash',
9 | createdAt: 1234,
10 | updatedAt: 1234,
11 | }
12 |
13 | export default mockOutcome
14 |
--------------------------------------------------------------------------------
/zod-models/src/tag/tagSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | export const TagSchema = z.object({
4 | backgroundColor: z.string(),
5 | text: z.string(),
6 | })
7 |
8 | export const ProjectTagsStateSchema = z.record(
9 | z.object({ actionHash: z.string() }).merge(TagSchema)
10 | )
11 |
12 | export type Tag = z.infer
13 | export type ProjectTagsState = z.infer
14 |
15 | export default TagSchema
--------------------------------------------------------------------------------
/web/src/api/clientSideIdHash.ts:
--------------------------------------------------------------------------------
1 | const hashCodeId = function (str?: string): string {
2 | var hash = 0,
3 | i,
4 | chr
5 | if (!str || str.length === 0) return hash.toString()
6 | for (i = 0; i < str.length; i++) {
7 | chr = str.charCodeAt(i)
8 | hash = (hash << 5) - hash + chr
9 | hash |= 0 // Convert to 32bit integer
10 | }
11 | return Math.abs(hash).toString().slice(0, 6)
12 | }
13 |
14 | export default hashCodeId
15 |
--------------------------------------------------------------------------------
/web/src/images/share.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/outcome-clone/reducer.js:
--------------------------------------------------------------------------------
1 | import { SET_OUTCOME_CLONE } from './actions'
2 |
3 | const defaultState = {
4 | outcomes: [],
5 | }
6 |
7 | export default function (state = defaultState, action) {
8 | const { payload, type } = action
9 | switch (type) {
10 | case SET_OUTCOME_CLONE:
11 | return {
12 | ...state,
13 | outcomes: payload,
14 | }
15 | default:
16 | return state
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/profiles/my-local-profile/reducer.ts:
--------------------------------------------------------------------------------
1 | import { Profile } from 'zod-models'
2 | import { SET_MY_LOCAL_PROFILE } from './actions'
3 |
4 | const defaultState: Profile = null
5 |
6 | export default function (state = defaultState, action: any): Profile {
7 | const { payload, type } = action
8 | switch (type) {
9 | case SET_MY_LOCAL_PROFILE:
10 | return payload
11 | default:
12 | return state
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/zod-models/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": true,
4 | "outDir": "./dist/",
5 | "declaration": true,
6 | "checkJs": false,
7 | "sourceMap": true,
8 | "noImplicitAny": false,
9 | "module": "ES6",
10 | "target": "ES6",
11 | "jsx": "react",
12 | "allowJs": true,
13 | "moduleResolution": "node",
14 | "allowSyntheticDefaultImports": true
15 | }
16 | // "exclude": ["src/stories"]
17 | }
18 |
--------------------------------------------------------------------------------
/web/src/components/ViewFilters/ViewFilters.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from 'react-router-dom'
3 |
4 | function ProjectMapViewOnly({ children }) {
5 | return children} />
6 | }
7 | function ProjectPriorityViewOnly({ children }) {
8 | return children} />
9 | }
10 |
11 | export { ProjectMapViewOnly, ProjectPriorityViewOnly }
12 |
--------------------------------------------------------------------------------
/web/src/components/TimeframeFormat.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import moment from 'moment'
3 |
4 | export default function TimeframeFormat({ timeFrame }) {
5 | if (!timeFrame) timeFrame = {}
6 | let text = timeFrame.fromDate
7 | ? String(moment.unix(timeFrame.fromDate).format('MMM D, YYYY - '))
8 | : ''
9 | text += timeFrame.toDate
10 | ? String(moment.unix(timeFrame.toDate).format('MMM D, YYYY'))
11 | : ''
12 | return <>text>
13 | }
14 |
--------------------------------------------------------------------------------
/web/test/mockOutcomeMember.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import testOutcomeMember from '../src/stories/testData/testOutcomeMember'
3 | import { OutcomeMember } from '../src/types'
4 |
5 | const mockOutcomeMember: WireRecord = {
6 | entry: testOutcomeMember,
7 | actionHash: 'testActionHash',
8 | entryHash: 'testEntryHash',
9 | createdAt: 1234,
10 | updatedAt: 1234,
11 | }
12 |
13 | export default mockOutcomeMember
14 |
--------------------------------------------------------------------------------
/zod-models/src/connection/v11/connectionV11Schema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const ConnectionV11Schema = z.object({
4 | parentActionHash: z.string(),
5 | childActionHash: z.string(),
6 | randomizer: z.number(), // needs to be broad enough to allow floats for backwards compatibility, but is now an int
7 | isImported: z.boolean(),
8 | })
9 |
10 | export type ConnectionV11 = z.infer
11 |
12 | export default ConnectionV11Schema
--------------------------------------------------------------------------------
/web/src/stories/testData/testEntryPoint.ts:
--------------------------------------------------------------------------------
1 | import { EntryPoint } from '../../types'
2 | import { WithActionHash } from '../../types/shared'
3 |
4 | const testEntryPoint: WithActionHash = {
5 | color: '#000000',
6 | creatorAgentPubKey: 'testCreatorAgentPubKey',
7 | createdAt: 1234,
8 | outcomeActionHash: 'testOutcomeActionHash',
9 | isImported: false,
10 | actionHash: 'testEntryPointActionHash',
11 | }
12 |
13 | export default testEntryPoint
14 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/connection/crud.rs:
--------------------------------------------------------------------------------
1 | use crate::{get_peers_content, SignalType};
2 | use hdk::prelude::*;
3 | use hdk_crud::crud;
4 | use projects_integrity::{project::connection::entry::Connection, EntryTypes, LinkTypes};
5 |
6 | crud!(
7 | Connection,
8 | EntryTypes,
9 | EntryTypes::Connection,
10 | LinkTypes,
11 | LinkTypes::All,
12 | connection,
13 | "connection",
14 | get_peers_content,
15 | SignalType
16 | );
17 |
--------------------------------------------------------------------------------
/web/src/components/NetworkInfo/NetworkInfo.scss:
--------------------------------------------------------------------------------
1 | .network-info {
2 | display: flex;
3 | flex-direction: column;
4 | // corresponds with .network-info-open styling
5 | // in global.scss
6 | width: 30vw;
7 | height: 100vh;
8 | overflow-y: scroll;
9 | border-left: 1px solid #999;
10 | box-sizing: border-box;
11 | padding: 1rem;
12 |
13 | .network-info-context {
14 | padding: 1rem;
15 | }
16 |
17 | .react-json-view {
18 | width: 100%;
19 | }
20 | }
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome_vote/crud.rs:
--------------------------------------------------------------------------------
1 | use crate::{get_peers_content, SignalType};
2 | use hdk::prelude::*;
3 | use hdk_crud::crud;
4 | use projects_integrity::{project::outcome_vote::entry::OutcomeVote, EntryTypes, LinkTypes};
5 |
6 | crud!(
7 | OutcomeVote,
8 | EntryTypes,
9 | EntryTypes::OutcomeVote,
10 | LinkTypes,
11 | LinkTypes::All,
12 | outcome_vote,
13 | "outcome_vote",
14 | get_peers_content,
15 | SignalType
16 | );
17 |
--------------------------------------------------------------------------------
/web/.storybook/main.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3 | addons: [
4 | '@storybook/addon-links',
5 | '@storybook/addon-essentials',
6 | '@storybook/addon-interactions',
7 | '@storybook/preset-scss',
8 | '@storybook/addon-mdx-gfm',
9 | ],
10 | framework: {
11 | name: '@storybook/react-webpack5',
12 | options: {},
13 | },
14 | docs: {
15 | autodocs: true,
16 | },
17 | }
18 |
--------------------------------------------------------------------------------
/web/src/components/ConnectivityOverlay/ConnectivityOverlay.scss:
--------------------------------------------------------------------------------
1 | .connectivity-overlay-wrapper {
2 | .modal-wrapper {
3 | width: 29rem;
4 | padding: 3.5rem 3.5rem 3rem 3.5rem;
5 | }
6 |
7 | .connectivity-modal-heading {
8 | margin-bottom: 1.5rem;
9 | }
10 |
11 | .connectivity-modal-button-primary {
12 | display: flex;
13 | flex-direction: column;
14 | align-items: center;
15 | justify-content: center;
16 | margin-top: 1.5rem;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/web/src/routes/ProjectView/MapView/MapView.scss:
--------------------------------------------------------------------------------
1 | canvas {
2 | position: absolute;
3 |
4 | &.grabbing {
5 | cursor: grabbing;
6 | }
7 | }
8 |
9 | /* transform */
10 |
11 | .transform-container,
12 | .mapview-elements-container {
13 | position: fixed;
14 | }
15 |
16 | .outcome-statement-tooltip-visible {
17 | // establishes a max width for the Outcome Statement Tooltip
18 | width: 14rem;
19 |
20 | .tooltip-wrapper {
21 | visibility: visible;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/stories/testData/testConnection.ts:
--------------------------------------------------------------------------------
1 | import { Connection } from '../../types'
2 | import { WithActionHash } from '../../types/shared'
3 |
4 | const testConnection: WithActionHash = {
5 | parentActionHash: 'testConnectionParentActionHash',
6 | childActionHash: 'testConnectionChildActionHash',
7 | randomizer: 1234, //i64,
8 | siblingOrder: 0,
9 | isImported: false,
10 | actionHash: 'testConnectionActionHash',
11 | }
12 |
13 | export default testConnection
14 |
--------------------------------------------------------------------------------
/web/src/api/callZome.ts:
--------------------------------------------------------------------------------
1 | import { AppClient, CellId } from '@holochain/client'
2 |
3 | export default async function callZome(
4 | appWebsocket: AppClient,
5 | cellId: CellId,
6 | zomeName: string,
7 | fnName: string,
8 | payload: InputType
9 | ): Promise {
10 | return appWebsocket.callZome({
11 | cell_id: cellId,
12 | zome_name: zomeName,
13 | fn_name: fnName,
14 | payload: payload,
15 | cap_secret: null,
16 | })
17 | }
18 |
--------------------------------------------------------------------------------
/web/src/images/popup-curved-pointer-downside.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/web/src/images/popup-curved-pointer-upside.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/screensize/reducer.js:
--------------------------------------------------------------------------------
1 | import { SET_SCREEN_DIMENSIONS } from './actions'
2 |
3 | const defaultState = {
4 | width: 0,
5 | height: 0,
6 | }
7 |
8 | export default function (state = defaultState, action) {
9 | const { payload, type } = action
10 | switch (type) {
11 | case SET_SCREEN_DIMENSIONS:
12 | return {
13 | width: payload.width,
14 | height: payload.height,
15 | }
16 | default:
17 | return state
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/web/src/components/LoadingScreen/LoadingScreen.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import './LoadingScreen.scss'
4 |
5 | import AcornLogo from '../../images/acorn-logo.svg'
6 |
7 | function LoadingScreen() {
8 | return (
9 |
10 |
11 |

12 |
collecting your acorns...
13 |
14 |
15 | )
16 | }
17 |
18 | export default LoadingScreen
19 |
--------------------------------------------------------------------------------
/web/src/images/team.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/active-project/reducer.ts:
--------------------------------------------------------------------------------
1 | import _ from 'lodash'
2 | import { CellIdString } from '../../../types/shared'
3 |
4 | import { SET_ACTIVE_PROJECT } from './actions'
5 |
6 | const defaultState: CellIdString = null
7 |
8 | export default function (state = defaultState, action: any): CellIdString {
9 | const { payload, type } = action
10 | switch (type) {
11 | case SET_ACTIVE_PROJECT:
12 | return payload
13 | default:
14 | return state
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/zod-models/src/connection/v12/connectionV12Schema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | const ConnectionV12Schema = z.object({
4 | parentActionHash: z.string(),
5 | childActionHash: z.string(),
6 | siblingOrder: z.number(),
7 | randomizer: z.number(), // needs to be broad enough to allow floats for backwards compatibility, but is now an int
8 | isImported: z.boolean(),
9 | })
10 |
11 | export type ConnectionV12 = z.infer
12 |
13 | export default ConnectionV12Schema
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvTaskList/EvTaskList.scss:
--------------------------------------------------------------------------------
1 | .ev-tasks-view-wrapper {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 |
6 | .ev-tasks-view-list {
7 | display: flex;
8 | flex-direction: column;
9 | overflow-y: scroll;
10 | padding-top: 1.5rem;
11 |
12 | .checklist-item-row,
13 | .add-checklist-item-wrapper {
14 | padding-right: 3rem;
15 | padding-left: 3rem;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/src/project/outcome_comment/crud.rs:
--------------------------------------------------------------------------------
1 | use crate::{get_peers_content, SignalType};
2 | use hdk::prelude::*;
3 | use hdk_crud::crud;
4 | use projects_integrity::{project::outcome_comment::entry::OutcomeComment, EntryTypes, LinkTypes};
5 |
6 | crud!(
7 | OutcomeComment,
8 | EntryTypes,
9 | EntryTypes::OutcomeComment,
10 | LinkTypes,
11 | LinkTypes::All,
12 | outcome_comment,
13 | "outcome_comment",
14 | get_peers_content,
15 | SignalType
16 | );
17 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/computeArguments/argsForDrawBeingEdited.ts:
--------------------------------------------------------------------------------
1 | import { ComputedOutcome } from '../../../types'
2 | import drawBeingEdited from '../drawBeingEdited'
3 |
4 | // TODO (later)
5 | export const argsForDrawBeingEdited = ({
6 | outcome,
7 | ctx,
8 | }: {
9 | outcome: ComputedOutcome
10 | ctx: CanvasRenderingContext2D
11 | }): Parameters[0] => {
12 | const args: Parameters[0] = {
13 | ctx,
14 | }
15 | return args
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/event-listeners/bodyKeyup.ts:
--------------------------------------------------------------------------------
1 | import { unsetShiftKeyDown } from '../redux/ephemeral/keyboard/actions'
2 |
3 | export default function bodyKeyup(store: any, event: KeyboardEvent) {
4 | // there are event.code and event.key ...
5 | // event.key is keyboard layout independent, so works for Dvorak users
6 | switch (event.key) {
7 | case 'Shift':
8 | store.dispatch(unsetShiftKeyDown())
9 | break
10 | default:
11 | // console.log(event)
12 | break
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/happs/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | members = [
3 | "happ/zomes/profiles",
4 | "happ/zomes/profiles_integrity",
5 | "happ/zomes/projects",
6 | "happ/zomes/projects_integrity",
7 | ]
8 | resolver = "2"
9 |
10 | [profile.dev]
11 | opt-level = "z"
12 |
13 | [profile.release]
14 | opt-level = "z"
15 |
16 | [workspace.dependencies]
17 | hdi = "0.6.0"
18 | hdk = "0.5.0"
19 | holochain = { version = "0.5.0" }
20 | holo_hash = {version = "0.5.0", features = ["encoding"]}
21 | holochain_types = { version = "0.5.0" }
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/active-entry-points/reducer.ts:
--------------------------------------------------------------------------------
1 | import _ from 'lodash'
2 | import { SET_ACTIVE_ENTRY_POINTS } from './actions'
3 | import { ActionHashB64 } from '../../../types/shared'
4 |
5 | const defaultState: ActionHashB64[] = []
6 |
7 | export default function (state = defaultState, action: any): ActionHashB64[] {
8 | const { payload, type } = action
9 | switch (type) {
10 | case SET_ACTIVE_ENTRY_POINTS:
11 | return payload
12 | default:
13 | return state
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/zod-models/src/scope/small/smallScopeSchema.ts:
--------------------------------------------------------------------------------
1 |
2 | import {z} from 'zod'
3 | import SmallTaskSchema from './smallTaskSchema'
4 | import AchievementStatusSchema from './achievementStatus'
5 |
6 | const SmallScopeSchema = z.object({
7 | Small: z.object({
8 | achievementStatus: AchievementStatusSchema,
9 | targetDate: z.number().nullable(),
10 | taskList: z.array(SmallTaskSchema),
11 | })
12 | })
13 |
14 | export type SmallScope = z.infer
15 | export default SmallScopeSchema
--------------------------------------------------------------------------------
/web/src/stories/testData/testOutcomeMember.ts:
--------------------------------------------------------------------------------
1 | import { WithActionHash } from '../../types/shared'
2 | import { OutcomeMember } from '../../types'
3 |
4 | const testOutcomeMember: WithActionHash = {
5 | outcomeActionHash: 'testOutcomeActionHash',
6 | memberAgentPubKey: 'testMemberAgentPubKey',
7 | creatorAgentPubKey: 'testCreatorAgentPubKey',
8 | unixTimestamp: 1234,
9 | isImported: false,
10 | actionHash: 'testOutcomeMemberActionHash',
11 | }
12 |
13 | export default testOutcomeMember
14 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/member/entry.rs:
--------------------------------------------------------------------------------
1 | use hdi::prelude::*;
2 | use holo_hash::AgentPubKeyB64;
3 |
4 | // This is a reference to the agent address for any users who have joined this DHT
5 | #[hdk_entry_helper]
6 | #[serde(rename_all = "camelCase")]
7 | #[derive(Clone, PartialEq)]
8 | pub struct Member {
9 | pub agent_pub_key: AgentPubKeyB64,
10 | }
11 |
12 | impl Member {
13 | pub fn new(agent_pub_key: AgentPubKeyB64) -> Self {
14 | Self { agent_pub_key }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/zod-models/src/scope/uncertain/uncertainScopeSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 | import SmallsEstimateSchema from '../small/smallsEstimateSchema'
3 | import TimeFrameSchema from './timeFrameSchema'
4 |
5 | const UncertainScopeSchema = z.object({
6 | Uncertain: z.object({
7 | smallsEstimate: SmallsEstimateSchema,
8 | timeFrame: TimeFrameSchema,
9 | inBreakdown: z.boolean(),
10 | })
11 | })
12 |
13 | export type UncertainScope = z.infer
14 | export default UncertainScopeSchema
--------------------------------------------------------------------------------
/web/src/components/ProjectEmptyState/ProjectEmptyState.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './ProjectEmptyState.scss'
3 |
4 | function ProjectEmptyState() {
5 | return (
6 |
7 |
8 |
9 |
Double click anywhere on canvas to create your first Outcome.
10 |
11 |
12 |
13 | )
14 | }
15 |
16 | export default ProjectEmptyState
17 |
--------------------------------------------------------------------------------
/web/src/images/github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/ButtonWithPendingState/ButtonWithPendingState.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './ButtonWithPendingState.scss'
3 |
4 | import Icon from '../Icon/Icon'
5 |
6 | export default function ButtonWithPendingState({
7 | pending,
8 | pendingText,
9 | actionText,
10 | }) {
11 | return pending ? (
12 |
13 |
14 | {pendingText}
15 |
16 | ) : (
17 | actionText
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/web/test/mockEntryPoint.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import { EntryPoint } from '../src/types'
3 |
4 | const mockEntryPoint: WireRecord = {
5 | entry: {
6 | color: 'testColor',
7 | creatorAgentPubKey: 'testAgentAddress',
8 | createdAt: 1234,
9 | outcomeActionHash: 'testOutcomeActionHash',
10 | isImported: false,
11 | },
12 | actionHash: 'testActionHash',
13 | entryHash: 'testEntryHash',
14 | createdAt: 1234,
15 | updatedAt: 1234,
16 | }
17 |
18 | export default mockEntryPoint
19 |
--------------------------------------------------------------------------------
/web/src/components/ProjectModal/ProjectModal.scss:
--------------------------------------------------------------------------------
1 | .project-modal-heading {
2 | margin-bottom: 0.5rem;
3 | }
4 |
5 | .project-modal-subheading {
6 | // font-family: 'PlusJakartaSans-medium', Helvetica, sans-serif;
7 | margin-bottom: 30px;
8 | // line-height: 1.4;
9 | }
10 |
11 | .project-modal-content-spacer {
12 | margin-bottom: 2rem;
13 | margin-top: 2rem;
14 | }
15 |
16 | .project-modal-button {
17 | text-align: center;
18 | display: flex;
19 | flex-direction: row;
20 | align-items: center;
21 | justify-content: center;
22 | }
23 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/realtime-info/actions.js:
--------------------------------------------------------------------------------
1 | const UPDATE_PEER_STATE = 'UPDATE_PEER_STATE'
2 | const REMOVE_PEER_STATE = 'REMOVE_PEER_STATE'
3 |
4 | function updatePeerState(realtimeInfo) {
5 | return {
6 | type: UPDATE_PEER_STATE,
7 | payload: realtimeInfo,
8 | }
9 | }
10 | function removePeerState(realtimeInfo) {
11 | return {
12 | type: REMOVE_PEER_STATE,
13 | payload: realtimeInfo,
14 | }
15 | }
16 |
17 | export {
18 | UPDATE_PEER_STATE,
19 | REMOVE_PEER_STATE,
20 | updatePeerState,
21 | removePeerState,
22 | }
23 |
--------------------------------------------------------------------------------
/web/src/components/CollapsedChildrenPills/CollapsedChildrenPills.scss:
--------------------------------------------------------------------------------
1 | .collapsed-children-pill-wrapper {
2 | position: absolute;
3 | width: fit-content;
4 | display: flex;
5 | align-items: center;
6 | justify-content: center;
7 | background-color: var(--bg-color-secondary);
8 | padding: 0.5rem 1rem;
9 | border-radius: 1.25rem;
10 | z-index: 2;
11 | transform: translateX(-50%);
12 | box-shadow: 0rem 0rem 1.25rem var(--shadow-color);
13 | min-width: 3rem;
14 |
15 | div:last-child {
16 | // margin-right: 0.25rem;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/web/src/weave/ProjectAssetView.scss:
--------------------------------------------------------------------------------
1 | .project-asset-view {
2 | display: flex;
3 | flex-direction: column;
4 | height: 100%;
5 | width: 100%;
6 |
7 | .header-wrapper {
8 | width: 100%;
9 |
10 | .header {
11 | margin: 0.5rem;
12 | display: flex;
13 | justify-content: space-between;
14 | }
15 | }
16 |
17 | /* Style for the main content area below the header */
18 | .project-view-wrapper {
19 | flex: 1;
20 | display: flex;
21 | flex-direction: column;
22 | overflow: hidden;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/profiles/agent-address/reducer.ts:
--------------------------------------------------------------------------------
1 | import _ from 'lodash'
2 | import { Action, AgentPubKeyB64 } from '../../../../types/shared'
3 |
4 | import { SET_AGENT_ADDRESS } from './actions'
5 |
6 | type State = AgentPubKeyB64
7 | const defaultState = ''
8 |
9 | export default function (
10 | state: State = defaultState,
11 | action: Action
12 | ) {
13 | const { payload, type } = action
14 | switch (type) {
15 | case SET_AGENT_ADDRESS:
16 | return payload
17 | default:
18 | return state
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/web/src/images/square-check-grey.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/expanded-view/actions.js:
--------------------------------------------------------------------------------
1 | const OPEN_EXPANDED_VIEW = 'OPEN_EXPANDED_VIEW'
2 | const CLOSE_EXPANDED_VIEW = 'CLOSE_EXPANDED_VIEW'
3 |
4 | function openExpandedView(outcomeActionHash) {
5 | return {
6 | type: OPEN_EXPANDED_VIEW,
7 | payload: {
8 | outcomeActionHash,
9 | },
10 | }
11 | }
12 |
13 | function closeExpandedView() {
14 | return {
15 | type: CLOSE_EXPANDED_VIEW,
16 | }
17 | }
18 |
19 | export {
20 | OPEN_EXPANDED_VIEW,
21 | CLOSE_EXPANDED_VIEW,
22 | openExpandedView,
23 | closeExpandedView,
24 | }
25 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/tag/entry.rs:
--------------------------------------------------------------------------------
1 | use hdi::prelude::*;
2 |
3 | // An connection. This is an arrow on the SoA Tree which directionally links
4 | // two outcomes.
5 | #[hdk_entry_helper]
6 | #[serde(rename_all = "camelCase")]
7 | #[derive(Clone, PartialEq)]
8 | pub struct Tag {
9 | pub background_color: String,
10 | pub text: String,
11 | }
12 |
13 | impl Tag {
14 | pub fn new(background_color: String, text: String) -> Self {
15 | Self {
16 | background_color,
17 | text,
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/spec/weave-types.md:
--------------------------------------------------------------------------------
1 | ```
2 | export type AssetLocationAndInfo = {
3 | appletHash: AppletHash;
4 | assetInfo: AssetInfo;
5 | /**
6 | * Only set if Moss is run in applet development mode and the applet is running in hot-reloading mode
7 | */
8 | appletDevPort?: number;
9 | };
10 |
11 | export type AssetInfo = {
12 | name: string;
13 | icon_src: string;
14 | };
15 |
16 | export type AppletInfo = {
17 | appletBundleId: string;
18 | appletName: string;
19 | appletIcon: string;
20 | groupsHashes: Array;
21 | };
22 | ```
23 |
--------------------------------------------------------------------------------
/web/src/images/square-check-green.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/web/test/mockOutcomeComment.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import { OutcomeComment } from '../src/types'
3 |
4 | const mockOutcomeComment: WireRecord = {
5 | entry: {
6 | outcomeActionHash: 'testOutcomeActionHash',
7 | content: 'testContent',
8 | creatorAgentPubKey: 'testAgentAddress',
9 | unixTimestamp: 1234,
10 | isImported: false,
11 | },
12 | actionHash: 'testActionHash',
13 | entryHash: 'testEntryHash',
14 | createdAt: 1234,
15 | updatedAt: 1234,
16 | }
17 |
18 | export default mockOutcomeComment
19 |
--------------------------------------------------------------------------------
/happs/happ/zomes/profiles/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "profiles"
4 | version = "0.0.1"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 | name = "profiles"
9 |
10 | [dependencies]
11 | hdk_crud = { path = "../../../lib/hdk_crud", features = ["no_example"] }
12 | hdk = { workspace = true }
13 | holo_hash = { workspace = true }
14 | profiles_integrity = { path = "../profiles_integrity" }
15 | chrono = { version = "*", default-features = false, features = ["clock", "std", "oldtime", "serde"] }
16 | paste = "*"
17 | serde = "*"
18 | thiserror = "=1.0.40"
19 |
--------------------------------------------------------------------------------
/web/src/components/Zoom/Zoom.scss:
--------------------------------------------------------------------------------
1 | .zoom-wrapper {
2 | display: flex;
3 | align-items: center;
4 | background: rgba(255, 255, 255, 0.9);
5 | border-radius: 0.625rem;
6 | height: 3rem;
7 | padding: 0.75rem 0.625rem;
8 | box-sizing: border-box;
9 |
10 | .icon {
11 | display: inline-block;
12 | margin-right: 0.5rem;
13 | }
14 |
15 | span {
16 | display: inline-block;
17 | font-size: 14px;
18 | font-family: 'gilroyextrabold', Helvetica, sans-serif;
19 | font-weight: normal;
20 |
21 | width: 40px;
22 | color: #535353;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/event-listeners/windowResize.ts:
--------------------------------------------------------------------------------
1 | import { setScreenDimensions } from '../redux/ephemeral/screensize/actions'
2 |
3 | export default function windowResize(store: any, canvas: HTMLCanvasElement) {
4 | // Get the device pixel ratio, falling back to 1.
5 | const dpr = window.devicePixelRatio || 1
6 | // Get the size of the canvas in CSS pixels.
7 | const rect = canvas.getBoundingClientRect()
8 | // Give the canvas pixel dimensions of their CSS
9 | // size * the device pixel ratio.
10 | store.dispatch(setScreenDimensions(rect.width * dpr, rect.height * dpr))
11 | }
12 |
--------------------------------------------------------------------------------
/web/src/drawing/checkOutcomeAgainstViewingFilters.ts:
--------------------------------------------------------------------------------
1 | import {
2 | ComputedOutcome,
3 | ComputedSimpleAchievementStatus,
4 | ComputedScope,
5 | } from '../types'
6 |
7 | export default function checkOutcomeAgainstViewingFilters(
8 | outcome: ComputedOutcome,
9 | hiddenSmalls: boolean,
10 | hiddenAchieved: boolean
11 | ): boolean {
12 | return !(
13 | (hiddenAchieved &&
14 | outcome.computedAchievementStatus.simple ===
15 | ComputedSimpleAchievementStatus.Achieved) ||
16 | (hiddenSmalls && outcome.computedScope === ComputedScope.Small)
17 | )
18 | }
19 |
--------------------------------------------------------------------------------
/web/src/components/OutcomeConnector/OutcomeConnector.scss:
--------------------------------------------------------------------------------
1 | .outcome-connector {
2 | position: absolute;
3 | width: 30px;
4 | height: 30px;
5 | transform: translate(-15px, -15px);
6 | background-color: rgba(255, 255, 255, 0.5);
7 | border-radius: 10px;
8 | }
9 |
10 | .outcome-connector-blue-dot {
11 | background-color: #b1b9ff;
12 | width: 10px;
13 | height: 10px;
14 | border-radius: 5px;
15 | margin: 10px;
16 | }
17 |
18 | .outcome-connector:hover .outcome-connector-blue-dot,
19 | .outcome-connector.active .outcome-connector-blue-dot {
20 | background-color: #6772ff;
21 | }
--------------------------------------------------------------------------------
/web/src/images/font.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/types/projectMeta.ts:
--------------------------------------------------------------------------------
1 | import { AgentPubKeyB64, CellIdString, WithActionHash } from './shared'
2 | import { EntryPoint, Outcome, Profile, ProjectMetaV1 } from 'zod-models'
3 |
4 | export { LayeringAlgorithm } from 'zod-models'
5 |
6 | export type ProjectAggregated = {
7 | projectMeta: WithActionHash
8 | cellId: CellIdString
9 | presentMembers: AgentPubKeyB64[]
10 | members: Profile[]
11 | entryPoints: {
12 | entryPoint: WithActionHash
13 | outcome: WithActionHash
14 | }[]
15 | }
16 |
17 | export type ProjectMeta = ProjectMetaV1
18 |
--------------------------------------------------------------------------------
/zod-models/src/projectMetaSchema/v0/projectMetaV0Schema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 | import WithActionHashSchema from '../../withActionHashSchema'
3 |
4 | export const ProjectMetaV0Schema = z.object({
5 | creatorAgentPubKey: z.string(),
6 | createdAt: z.number(),
7 | name: z.string(),
8 | image: z.string().nullable(),
9 | passphrase: z.string(),
10 | isImported: z.boolean(),
11 | isMigrated: z.string().nullable(),
12 | })
13 |
14 | const ProjectMetaV0WithActionHashSchema = WithActionHashSchema.merge(ProjectMetaV0Schema)
15 |
16 | export default ProjectMetaV0WithActionHashSchema
--------------------------------------------------------------------------------
/web/src/hooks/useFileDownloaded.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react'
2 |
3 | export default function useFileDownloaded() {
4 | const [fileDownloaded, setFileDownloaded] = useState(false)
5 |
6 | const subscribeToEvent = async () => {
7 | if (window.require) {
8 | const { ipcRenderer } = window.require('electron')
9 | ipcRenderer.on('exportDownloaded', () => {
10 | setFileDownloaded(true)
11 | })
12 | }
13 | }
14 |
15 | useEffect(() => {
16 | subscribeToEvent()
17 | }, [])
18 |
19 | return { fileDownloaded, setFileDownloaded }
20 | }
21 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/keyboard/reducer.ts:
--------------------------------------------------------------------------------
1 | import { SET_SHIFT_KEYDOWN, UNSET_SHIFT_KEYDOWN } from './actions'
2 |
3 | const defaultState = {
4 | shiftKeyDown: false,
5 | }
6 |
7 | export default function (state = defaultState, action: any) {
8 | const { type } = action
9 | switch (type) {
10 | case SET_SHIFT_KEYDOWN:
11 | return {
12 | ...state,
13 | shiftKeyDown: true,
14 | }
15 | case UNSET_SHIFT_KEYDOWN:
16 | return {
17 | ...state,
18 | shiftKeyDown: false,
19 | }
20 | default:
21 | return state
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/computeArguments/index.ts:
--------------------------------------------------------------------------------
1 | export * from './argsForDrawBackgroundColor'
2 | export * from './argsForDrawBeingEdited'
3 | export * from './argsForDrawColoredBorder'
4 | export * from './argsForDrawDescendantsAchievementStatus'
5 | export * from './argsForDrawGlow'
6 | export * from './argsForDrawPeopleActive'
7 | export * from './argsForDrawProgressBar'
8 | export * from './argsForDrawSelectedBorder'
9 | export * from './argsForDrawSmallLeaf'
10 | export * from './argsForDrawStatement'
11 | export * from './argsForDrawTags'
12 | export * from './argsForDrawTimeAndAssignees'
13 |
--------------------------------------------------------------------------------
/web/src/images/mouse.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/web/src/components/ProjectEmptyState/ProjectEmptyState.scss:
--------------------------------------------------------------------------------
1 | .project-empty-state-wrapper {
2 | height: 100vh;
3 | width: 100%;
4 | display: flex;
5 | align-items: center;
6 | z-index: -1;
7 | position: absolute;
8 | }
9 |
10 | .project-empty-state {
11 | display: flex;
12 | flex-direction: column;
13 | text-align: center;
14 | align-items: center;
15 | margin: 0 auto;
16 | }
17 |
18 | .project-empty-state-text {
19 | font-family: 'PlusJakartaSans-medium', Helvetica, sans-serif;
20 | margin: 20px auto;
21 | color: #4d4d4d;
22 | width: 300px;
23 | line-height: 28px;
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/projects/uninstallProject.ts:
--------------------------------------------------------------------------------
1 | import { AppClient } from '@holochain/client'
2 | import { removeProjectCellId } from '../redux/persistent/cells/actions'
3 | import { CellIdString } from '../types/shared'
4 | import { cellIdFromString } from '../utils'
5 |
6 | export async function uninstallProject(
7 | cellId: CellIdString,
8 | dispatch: any,
9 | appWs: AppClient
10 | ) {
11 | await appWs.disableCloneCell({
12 | clone_cell_id: { type: 'dna_hash', value: cellIdFromString(cellId)[0] },
13 | })
14 | // remove it from our redux state
15 | dispatch(removeProjectCellId(cellId))
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/secrets.ts:
--------------------------------------------------------------------------------
1 | // since this is a big wordset, dynamically import it
2 | // instead of including in the main bundle
3 | async function generatePassphrase() {
4 | const { default: randomWord } = await import('diceware-word')
5 | return `${randomWord()} ${randomWord()} ${randomWord()} ${randomWord()} ${randomWord()}`
6 | }
7 |
8 | const passphraseToUid = (passphrase: string) =>
9 | `uid-${passphrase.split(' ').join('-')}`
10 |
11 | const uidToPassphrase = (uid: string) =>
12 | uid.replace('uid-', '').split('-').join(' ')
13 |
14 | export { generatePassphrase, passphraseToUid, uidToPassphrase }
15 |
--------------------------------------------------------------------------------
/web/src/stories/testData/testProjectMeta.ts:
--------------------------------------------------------------------------------
1 | import { LayeringAlgorithm, ProjectMeta } from '../../types'
2 | import { WithActionHash } from '../../types/shared'
3 |
4 | const testProject: WithActionHash = {
5 | creatorAgentPubKey: 'testCreatorAgentPubKey',
6 | createdAt: 1234,
7 | name: 'testProjectName',
8 | image: null,
9 | passphrase: 'testPassphrase',
10 | isImported: false,
11 | layeringAlgorithm: LayeringAlgorithm.CoffmanGraham,
12 | topPriorityOutcomes: [],
13 | isMigrated: null,
14 | actionHash: 'testProjectActionHash',
15 | }
16 |
17 | export default testProject
18 |
--------------------------------------------------------------------------------
/web/src/api/cleanOutcome.ts:
--------------------------------------------------------------------------------
1 | // we can't pass a ComputedOutcome to the backend
2 |
3 | import { ComputedOutcome, Outcome } from '../types'
4 |
5 | // so we strip it back to just the holochain version of an Outcome.
6 | // The function acts with immutability
7 | const cleanOutcome = (computedOutcome: ComputedOutcome): Outcome => {
8 | const {
9 | computedAchievementStatus,
10 | computedScope,
11 | actionHash,
12 | children,
13 | members,
14 | comments,
15 | ...outcome
16 | } = computedOutcome
17 | return {
18 | ...outcome,
19 | }
20 | }
21 |
22 | export default cleanOutcome
23 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/layout/state-type.ts:
--------------------------------------------------------------------------------
1 | import { ActionHashB64 } from '../../../types/shared'
2 |
3 | export interface CoordinatesState {
4 | // the x,y coordinate represents the upper left corner of the
5 | // Outcome "card" in the Map View
6 | [outcomeActionHash: ActionHashB64]: {
7 | x: number
8 | y: number
9 | }
10 | }
11 |
12 | export interface DimensionsState {
13 | [outcomeActionHash: ActionHashB64]: {
14 | width: number
15 | height: number
16 | }
17 | }
18 |
19 | export interface LayoutState {
20 | coordinates: CoordinatesState
21 | dimensions: DimensionsState
22 | }
23 |
--------------------------------------------------------------------------------
/web/test/mockWhoami.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import { Profile } from '../src/types'
3 |
4 | const mockProfile: Profile = {
5 | firstName: 'testFirstName',
6 | lastName: 'testLastName',
7 | handle: 'testHandle',
8 | status: 'Online',
9 | avatarUrl: 'testAvatarUrl',
10 | agentPubKey: 'testAgentPubKey',
11 | isImported: false,
12 | }
13 |
14 | const mockWhoami: WireRecord = {
15 | actionHash: 'testActionHash',
16 | entryHash: 'testEntryHash',
17 | createdAt: 1234,
18 | updatedAt: 1234,
19 | entry: mockProfile,
20 | }
21 |
22 | export default mockWhoami
23 |
--------------------------------------------------------------------------------
/zod-models/src/entryPoint/entryPointSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | export const EntryPointSchema = z.object({
4 | color: z.string(),
5 | creatorAgentPubKey: z.string(),
6 | createdAt: z.number(),
7 | outcomeActionHash: z.string(),
8 | isImported: z.boolean(),
9 | })
10 |
11 | export const ProjectEntryPointsStateSchema = z.record(
12 | z
13 | .object({
14 | actionHash: z.string(),
15 | })
16 | .merge(EntryPointSchema)
17 | )
18 |
19 | export type EntryPoint = z.infer
20 | export type ProjectEntryPointsState = z.infer
--------------------------------------------------------------------------------
/happs/happ/zomes/projects/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "projects"
4 | version = "0.0.1"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 | name = "projects"
9 |
10 | [dependencies]
11 | hdk_crud = { path = "../../../lib/hdk_crud", features = ["no_example"] }
12 | hdk = { workspace = true }
13 | holo_hash = { workspace = true }
14 | projects_integrity = { path = "../projects_integrity" }
15 | paste = "*"
16 | chrono = { version = "*", default-features = false, features = ["clock", "std", "oldtime", "serde"] }
17 | # use whatever serde hdk uses
18 | serde = "*"
19 | thiserror = "=1.0.40"
20 |
21 |
--------------------------------------------------------------------------------
/web/src/components/Header/priorityMenuItems.ts:
--------------------------------------------------------------------------------
1 | const priorityMenuItems = [
2 | // name, url/path
3 | ['Urgency x Importance', `/project/:projectId/priority/urgency-importance`],
4 | ['Impact x Effort', '/project/:projectId/priority/impact-effort'],
5 | // ['Urgency', '/project/:projectId/priority/urgency'],
6 | // ['Importance', '/project/:projectId/priority/importance'],
7 | // ['Impact', '/project/:projectId/priority/impact'],
8 | // ['Effort', '/project/:projectId/priority/effort'],
9 | ['Uncategorized', '/project/:projectId/priority/uncategorized'],
10 | ]
11 |
12 | export default priorityMenuItems
13 |
--------------------------------------------------------------------------------
/web/src/components/ButtonClose/ButtonClose.scss:
--------------------------------------------------------------------------------
1 | .button-close-wrapper {
2 | border-radius: 50%;
3 | width: fit-content;
4 | transition: 0.2s all ease;
5 | border: none;
6 | background: none;
7 | padding: 0;
8 |
9 | &:hover {
10 | background-color: var(--bg-color-hover);
11 |
12 | .icon {
13 | .inner-icon {
14 | background-color: var(--text-color-primary);
15 | }
16 | }
17 | }
18 |
19 | .icon {
20 | &.small {
21 | width: 1.5rem;
22 | height: 1.5rem;
23 | }
24 | .inner-icon {
25 | background-color: var(--color-silver);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/components/MarkdownDescription/MarkdownDescription.scss:
--------------------------------------------------------------------------------
1 | // Description
2 | .markdown-description-wrapper {
3 | position: relative;
4 |
5 | .markdown-description-content {
6 | margin-top: 0.25rem;
7 |
8 | textarea {
9 | width: 100%;
10 | padding: 0;
11 | margin: 0;
12 | outline: none;
13 | border: 0;
14 | resize: none;
15 | font: 1.05rem var(--font-family-primary-medium);
16 | line-height: 1.45;
17 | background-color: transparent;
18 |
19 | &::placeholder {
20 | color: var(--text-color-placeholder);
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/screensize/actions.js:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | /* constants */
9 | const SET_SCREEN_DIMENSIONS = 'SET_SCREEN_DIMENSIONS'
10 |
11 | /* action creator functions */
12 |
13 | function setScreenDimensions(width, height) {
14 | return {
15 | type: SET_SCREEN_DIMENSIONS,
16 | payload: {
17 | width,
18 | height,
19 | },
20 | }
21 | }
22 |
23 | export { SET_SCREEN_DIMENSIONS, setScreenDimensions }
24 |
--------------------------------------------------------------------------------
/web/src/components/OutcomeConnectorPicker/OutcomeConnectorPicker.scss:
--------------------------------------------------------------------------------
1 | .outcome-connector-modal-subheading {
2 | margin-bottom: 1.25rem;
3 | }
4 |
5 | .outcome-connector-content {
6 | flex: 1;
7 | width: 100%;
8 | }
9 |
10 | .outcome-connector-dropdown-wrapper {
11 | display: flex;
12 | flex-direction: column;
13 | width: 100%;
14 | flex: 1;
15 |
16 | &:first-child {
17 | margin-bottom: 2rem;
18 | }
19 |
20 | &:last-child {
21 | margin-bottom: 1rem;
22 | }
23 |
24 | label {
25 | font-family: var(--font-family-primary-bold);
26 | font-size: 1.125rem;
27 | margin-bottom: 0.5rem;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/web/src/context/ComputedOutcomeContext.ts:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ComputedOutcome } from '../types'
3 | import { ActionHashB64 } from '../types/shared'
4 |
5 | export interface ProjectComputedOutcomes {
6 | // note they are nested like a tree
7 | computedOutcomesAsTree: ComputedOutcome[]
8 | computedOutcomesKeyed: {
9 | [actionHash: ActionHashB64]: ComputedOutcome
10 | }
11 | }
12 |
13 | const ComputedOutcomeContext = React.createContext({
14 | // default states
15 | computedOutcomesAsTree: [],
16 | computedOutcomesKeyed: {},
17 | })
18 |
19 | export default ComputedOutcomeContext
20 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/active-project/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | import { CellIdString } from '../../../types/shared'
9 |
10 | const SET_ACTIVE_PROJECT = 'SET_ACTIVE_PROJECT'
11 |
12 | /* action creator functions */
13 |
14 | const setActiveProject = (projectId: CellIdString) => {
15 | return {
16 | type: SET_ACTIVE_PROJECT,
17 | payload: projectId,
18 | }
19 | }
20 |
21 | export { SET_ACTIVE_PROJECT, setActiveProject }
22 |
--------------------------------------------------------------------------------
/web/src/components/MetadataWithLabel/MetadataWithLabel.scss:
--------------------------------------------------------------------------------
1 | .metadata-with-label-wrapper {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: flex-start;
5 |
6 | .metadata-with-label-icon {
7 | margin-top: 0.25rem;
8 | margin-right: 0.5rem;
9 |
10 | .icon {
11 | width: 1.125rem;
12 | height: 1.125rem;
13 | padding: 0;
14 | }
15 | }
16 |
17 | .metadata-with-label-column {
18 | display: flex;
19 | flex-direction: column;
20 | width: 100%;
21 |
22 | .metadata-with-label-label {
23 | // TODO: fix this value
24 | margin-bottom: 0.5rem;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .yarn
2 |
3 | binaries
4 | node_modules
5 | out/
6 | user2-data
7 | user-data
8 | electron/web
9 |
10 | zod-models/dist
11 |
12 | web/dist.zip
13 | web/dist/fonts
14 | web/dist/images
15 | web/dist/*.js
16 | web/dist/*.js.map
17 | web/storybook-static
18 |
19 | target/
20 | back/.cargo/
21 | back/2-conductor-config.yml
22 | back/scripts/2-install-happ.sh
23 | 2-config-admin-ws
24 | 2-config-app-ws
25 | databases
26 | databases2
27 | keystore
28 | keystore2
29 | my-proxy-cert.cert
30 |
31 | **/.hc*
32 | **/.kitsune2_bootstrap_srv
33 | **/*.dna
34 | **/*.happ
35 | **/*.webhapp
36 |
37 | **/.DS_Store
38 | .DS_Store
39 | .aider*
40 | .env
41 |
--------------------------------------------------------------------------------
/web/src/images/progress-circle.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/web/src/images/help.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/validation-check.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/zod-models/src/outcomeMember/outcomeMemberSchema.ts:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | export const OutcomeMemberSchema = z.object({
4 | outcomeActionHash: z.string(),
5 | memberAgentPubKey: z.string(),
6 | creatorAgentPubKey: z.string(),
7 | unixTimestamp: z.number(),
8 | isImported: z.boolean(),
9 | })
10 |
11 | export const ProjectOutcomeMembersStateSchema = z.record(
12 | z.object({ actionHash: z.string() }).merge(OutcomeMemberSchema)
13 | )
14 |
15 | export type ProjectOutcomeMembersState = z.infer
16 | export type OutcomeMember = z.infer
17 |
18 | export default OutcomeMemberSchema
--------------------------------------------------------------------------------
/web/src/images/tooltip-triangle-bottom.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/web/src/images/triangle-bottom-white.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/web/src/images/triangle-top-white.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/profiles/agent-address/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | import { Action, AgentPubKeyB64 } from '../../../../types/shared'
9 |
10 | const SET_AGENT_ADDRESS = 'SET_AGENT_ADDRESS'
11 | /* action creator functions */
12 |
13 | const setAgentAddress = (
14 | payload: AgentPubKeyB64
15 | ): Action => {
16 | return {
17 | type: SET_AGENT_ADDRESS,
18 | payload,
19 | }
20 | }
21 |
22 | export { setAgentAddress, SET_AGENT_ADDRESS }
23 |
--------------------------------------------------------------------------------
/web/src/images/tooltip-triangle-top.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/computeArguments/computeHeightsWithSpacing.ts:
--------------------------------------------------------------------------------
1 | import { OUTCOME_VERTICAL_SPACE_BETWEEN } from '../../dimensions'
2 |
3 | export function computeHeightsWithSpacing(elementHeights: number[]) {
4 | // assume that we want at least one vertical_space_between
5 | // for the new element we're computing this for
6 | let height = OUTCOME_VERTICAL_SPACE_BETWEEN
7 | // for each additional prior element, decide whether we need to account
8 | // for vertical spacing for it
9 | elementHeights.forEach((elementHeight) => {
10 | height +=
11 | elementHeight > 0 ? OUTCOME_VERTICAL_SPACE_BETWEEN + elementHeight : 0
12 | })
13 | return height
14 | }
15 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/navigation-modal/selector.ts:
--------------------------------------------------------------------------------
1 | import { useSelector } from 'react-redux'
2 | import { RootState } from '../../reducer'
3 |
4 | export const navModalOpenSelector = () => {
5 | const state = useSelector((state: RootState) => state)
6 | return state.ui.navigationModal.open
7 | }
8 |
9 | export const navModalOutcomes = () => {
10 | const state = useSelector((state: RootState) => state)
11 |
12 | const projectId = state.ui.activeProject
13 | const outcomes = state.projects.outcomes[projectId]
14 | const outcomeActionHashes = state.ui.navigationModal.outcomeActionHashes
15 | return outcomeActionHashes.map((actionHash) => outcomes[actionHash])
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/realtime-info/reducer.js:
--------------------------------------------------------------------------------
1 | import { REMOVE_PEER_STATE, UPDATE_PEER_STATE } from './actions'
2 | // const defaultState = {
3 | // isOpen: false,
4 | // outcomeActionHash: null,
5 | // }
6 | const defaultState = {}
7 |
8 | export default function (state = defaultState, action) {
9 | const { payload, type } = action
10 | switch (type) {
11 | case UPDATE_PEER_STATE:
12 | return {
13 | ...state,
14 | [payload.agentPubKey]: payload,
15 | }
16 | case REMOVE_PEER_STATE:
17 | let newState = { ...state }
18 | delete newState[payload]
19 | return newState
20 | default:
21 | return state
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/web/test/mockActionHashMaps.ts:
--------------------------------------------------------------------------------
1 | const mockActionHashMaps = {
2 | tagActionHashMap: { oldTagActionHash: 'newTagActionHash' },
3 | outcomeActionHashMap: { oldOutcomeActionHash: 'newOutcomeActionHash' },
4 | connectionsActionHashMap: {
5 | oldConnectionActionHash: 'newConnectionActionHash',
6 | },
7 | outcomeMembersActionHashMap: {
8 | oldOutcomeMemberActionHash: 'newOutcomeMemberActionHash',
9 | },
10 | outcomeCommentActionHashMap: {
11 | oldOutcomeCommentActionHash: 'newOutcomeCommentActionHash',
12 | },
13 | entryPointActionHashMap: {
14 | oldEntryPointActionHash: 'newEntryPointActionHash',
15 | },
16 | }
17 |
18 | export default mockActionHashMaps
19 |
--------------------------------------------------------------------------------
/web/src/components/OnClickOutside/OnClickOutside.tsx:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react'
2 | import useOnClickOutside from 'use-onclickoutside'
3 | import './OnClickOutside.scss'
4 |
5 | /*
6 | A higher order component to make it easier
7 | to implement a basic onClickOutside
8 | callback for the inner contents
9 | */
10 |
11 | export type OnClickOutsideProps = {
12 | onClickOutside: () => void
13 | }
14 | const OnClickOutside: React.FC = ({
15 | children,
16 | onClickOutside,
17 | }) => {
18 | const ref = useRef()
19 | useOnClickOutside(ref, onClickOutside)
20 | return {children}
21 | }
22 |
23 | export default OnClickOutside
24 |
--------------------------------------------------------------------------------
/web/src/images/validation-x.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/realtime-info-signal/actions.ts:
--------------------------------------------------------------------------------
1 | import { CellIdString } from '../../../../types/shared'
2 |
3 | const SEND_REALTIME_INFO = 'SEND_REALTIME_INFO'
4 | const SEND_EXIT_PROJECT_SIGNAL = 'SEND_EXIT_PROJECT_SIGNAL'
5 |
6 | function triggerRealtimeInfoSignal() {
7 | return {
8 | type: SEND_REALTIME_INFO,
9 | payload: {},
10 | }
11 | }
12 |
13 | function sendExitProjectSignal(projectId: CellIdString) {
14 | return {
15 | type: SEND_EXIT_PROJECT_SIGNAL,
16 | payload: projectId,
17 | }
18 | }
19 |
20 | export {
21 | SEND_REALTIME_INFO,
22 | SEND_EXIT_PROJECT_SIGNAL,
23 | triggerRealtimeInfoSignal,
24 | sendExitProjectSignal,
25 | }
26 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/active-entry-points/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | import { ActionHashB64 } from '../../../types/shared'
9 |
10 | const SET_ACTIVE_ENTRY_POINTS = 'SET_ACTIVE_ENTRY_POINTS'
11 |
12 | /* action creator functions */
13 |
14 | const setActiveEntryPoints = (entryPointAddresses: ActionHashB64[]) => {
15 | return {
16 | type: SET_ACTIVE_ENTRY_POINTS,
17 | payload: entryPointAddresses,
18 | }
19 | }
20 |
21 | export { SET_ACTIVE_ENTRY_POINTS, setActiveEntryPoints }
22 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/local-preferences/actions.js:
--------------------------------------------------------------------------------
1 | const SET_NAVIGATION_PREFERENCE = 'set_navigation_preference'
2 | const SET_KEYBOARD_NAVIGATION_PREFERENCE = 'set_keyboard_navigation_preference'
3 |
4 | function setNavigationPreference(preference) {
5 | return {
6 | type: SET_NAVIGATION_PREFERENCE,
7 | payload: preference,
8 | }
9 | }
10 |
11 | function setKeyboardNavigationPreference(preference) {
12 | return {
13 | type: SET_KEYBOARD_NAVIGATION_PREFERENCE,
14 | payload: preference,
15 | }
16 | }
17 |
18 | export {
19 | SET_NAVIGATION_PREFERENCE,
20 | SET_KEYBOARD_NAVIGATION_PREFERENCE,
21 | setNavigationPreference,
22 | setKeyboardNavigationPreference,
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/components/PickerTemplate/PickerTemplate.scss:
--------------------------------------------------------------------------------
1 | .picker-popup {
2 | position: absolute;
3 | border-radius: 0.75rem;
4 | background: var(--bg-color-secondary);
5 | box-shadow: 0 0 1rem var(--shadow-color-dark);
6 | padding: 20px 0px;
7 | // margin: 0 1rem;
8 | top: 0;
9 | z-index: 5;
10 | width: 20rem;
11 |
12 | .button-close-wrapper {
13 | position: absolute;
14 | top: 0.75rem;
15 | right: 0.75rem;
16 | }
17 | }
18 |
19 | .picker-popup-heading {
20 | font-size: 1rem;
21 | font-family: var(--font-family-primary-extrabold);
22 | color: var(--text-color-secondary);
23 | text-align: center;
24 | margin-top: 0.125rem;
25 | margin-bottom: 1.25rem;
26 | }
27 |
--------------------------------------------------------------------------------
/web/src/images/achieved.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/web/src/images/leaf-bronze.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/web/src/images/leaf-green.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/zod-models/src/outcomeComment/outcomeCommentSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 |
3 | export const OutcomeCommentSchema = z.object({
4 | outcomeActionHash: z.string(),
5 | content: z.string(),
6 | creatorAgentPubKey: z.string(),
7 | unixTimestamp: z.number(),
8 | isImported: z.boolean(),
9 | })
10 |
11 | export const ProjectOutcomeCommentsStateSchema = z.record(
12 | z
13 | .object({
14 | actionHash: z.string(),
15 | })
16 | .merge(OutcomeCommentSchema)
17 | )
18 |
19 |
20 | export type OutcomeComment = z.infer
21 | export type ProjectOutcomeCommentsState = z.infer
22 |
23 | export default OutcomeCommentSchema
--------------------------------------------------------------------------------
/web/src/components/ExportMenuItem/ExportMenuItem.component.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { exportDataHref, ExportType } from '../../migrating/export'
3 |
4 | export type ExportMenuItemProps = {
5 | title: string
6 | downloadFilename: string
7 | type: ExportType
8 | data: string
9 | onClick: () => void
10 | }
11 |
12 | const ExportMenuItem: React.FC = ({
13 | downloadFilename,
14 | title,
15 | type,
16 | data,
17 | onClick,
18 | }) => {
19 | return (
20 |
25 | {title}
26 |
27 | )
28 | }
29 | export default ExportMenuItem
30 |
--------------------------------------------------------------------------------
/web/src/components/Tag/Tag.scss:
--------------------------------------------------------------------------------
1 | // :root {
2 | // --light: 70;
3 | // /* the threshold at which colors are considered "light." Range: integers from 0 to 100,
4 | // recommended 50 - 70 */
5 | // --threshold: 60;
6 | // }
7 |
8 | .tag-wrapper {
9 | font: 0.75rem var(--font-family-primary-bold);
10 | line-height: 1.65;
11 | color: var(--text-color-dark-bg);
12 | letter-spacing: 0.02rem;
13 | /* Any lightness value below the threshold will result in white, any above will result in black */
14 | // --switch: calc((var(--light) - var(--threshold)) * -100%);
15 | // color: hsl(0, 0%, var(--switch));
16 | padding: 0.175rem 0.6875rem;
17 | border-radius: 0.5rem;
18 | width: fit-content;
19 | }
20 |
--------------------------------------------------------------------------------
/web/src/event-listeners/helpers/osPlatformHelper.ts:
--------------------------------------------------------------------------------
1 |
2 | // The "modifier" key is different on Mac and non-Mac
3 | // Pattern borrowed from TinyKeys library.
4 | // --
5 | // https://github.com/jamiebuilds/tinykeys/blob/e0d23b4f248af59ffbbe52411505c3d681c73045/src/tinykeys.ts#L50-L54
6 | var macOsPattern = /Mac|macOS|iPod|iPhone|iPad/
7 | let platform =
8 | // @ts-ignore
9 | navigator?.userAgentData?.platform || navigator?.platform || 'unknown'
10 | const isMacish = macOsPattern.test(platform)
11 | const operatingSystemModifier = isMacish ? 'metaKey' : 'ctrlKey'
12 |
13 | export default function checkForKeyboardKeyModifier(
14 | event: KeyboardEvent
15 | ): boolean {
16 | return event[operatingSystemModifier]
17 | }
--------------------------------------------------------------------------------
/web/src/images/confirmation.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/expanded-view/reducer.js:
--------------------------------------------------------------------------------
1 | import { OPEN_EXPANDED_VIEW, CLOSE_EXPANDED_VIEW } from './actions'
2 |
3 | const defaultState = {
4 | isOpen: false,
5 | outcomeActionHash: null,
6 | }
7 |
8 | export default function (state = defaultState, action) {
9 | const { payload, type } = action
10 | switch (type) {
11 | case OPEN_EXPANDED_VIEW:
12 | return {
13 | ...state,
14 | isOpen: true,
15 | outcomeActionHash: payload.outcomeActionHash,
16 | }
17 | case CLOSE_EXPANDED_VIEW:
18 | return {
19 | ...state,
20 | isOpen: false,
21 | outcomeActionHash: null,
22 | }
23 | default:
24 | return state
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/web/src/images/info.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/animations/getGraphForState.ts:
--------------------------------------------------------------------------------
1 | import outcomesAsGraph, {
2 | Graph,
3 | GraphData,
4 | } from '../../persistent/projects/outcomes/outcomesAsGraph'
5 | import { RootState } from '../../reducer'
6 |
7 | export function getGraphForState(state: RootState): Graph {
8 | const projectId = state.ui.activeProject
9 | const graphData: GraphData = {
10 | outcomes: state.projects.outcomes[projectId] || {},
11 | connections: state.projects.connections[projectId] || {},
12 | outcomeMembers: state.projects.outcomeMembers[projectId] || {},
13 | memberProfiles: state.projects.members[projectId]?.profiles || [],
14 | }
15 | return outcomesAsGraph(graphData, { withMembers: true })
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/context/ToastContext.ts:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export enum ShowToast {
4 | No,
5 | Yes,
6 | }
7 |
8 | export type ToastState =
9 | | {
10 | id: ShowToast.No
11 | }
12 | | {
13 | id: ShowToast.Yes
14 | text: string
15 | type: 'confirmation' | 'information' | 'warning' | 'destructive'
16 | }
17 |
18 | export interface ToastContextShape {
19 | toastState: ToastState
20 | setToastState: React.Dispatch>
21 | }
22 |
23 | const ToastContext = React.createContext({
24 | // default values
25 | toastState: {
26 | id: ShowToast.No,
27 | },
28 | setToastState: () => {},
29 | })
30 |
31 | export default ToastContext
32 |
--------------------------------------------------------------------------------
/web/test/mockProjectMeta.ts:
--------------------------------------------------------------------------------
1 | import { WireRecord } from '../src/api/hdkCrud'
2 | import { LayeringAlgorithm, ProjectMeta } from '../src/types'
3 |
4 | const projectMeta: ProjectMeta = {
5 | creatorAgentPubKey: 'testAgentPubKey',
6 | createdAt: 1234,
7 | name: 'testName',
8 | image: null,
9 | passphrase: 'testPassphrase',
10 | isImported: false,
11 | layeringAlgorithm: LayeringAlgorithm.CoffmanGraham,
12 | topPriorityOutcomes: [],
13 | isMigrated: null,
14 | }
15 |
16 | const mockUnmigratedProjectMeta: WireRecord = {
17 | actionHash: 'testActionHash',
18 | entryHash: 'testEntryHash',
19 | entry: projectMeta,
20 | createdAt: 1234,
21 | updatedAt: 1234,
22 | }
23 | export default mockUnmigratedProjectMeta
24 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/tags/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 | import { Tag } from '../../../../types'
8 | import { createCrudActionCreators } from '../../crudRedux'
9 |
10 | /* action creator functions */
11 |
12 | const [
13 | [CREATE_TAG, FETCH_TAGS, UPDATE_TAG, DELETE_TAG],
14 | [createTag, fetchTags, updateTag, deleteTag],
15 | ] = createCrudActionCreators('TAG')
16 |
17 | export {
18 | CREATE_TAG,
19 | FETCH_TAGS,
20 | UPDATE_TAG,
21 | DELETE_TAG,
22 | createTag,
23 | fetchTags,
24 | updateTag,
25 | deleteTag,
26 | }
27 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/outcome-history/reducer.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash'
2 |
3 | import { FETCH_OUTCOME_HISTORY } from './actions'
4 |
5 | const defaultState = {}
6 |
7 | export default function (state = defaultState, action) {
8 | const { payload, type } = action
9 |
10 | let cellId
11 | if (action.meta && action.meta.cellIdString) {
12 | cellId = action.meta.cellIdString
13 | }
14 |
15 | switch (type) {
16 | // HISTORY_OF_OUTCOME
17 | case FETCH_OUTCOME_HISTORY:
18 | return {
19 | ...state,
20 | [cellId]: {
21 | ...state[cellId],
22 | [payload.actionHash]: payload,
23 | },
24 | }
25 | // DEFAULT
26 | default:
27 | return state
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/web/src/components/Zoom/Zoom.connector.ts:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { changeScale } from '../../redux/ephemeral/viewport/actions'
3 | import { RootState } from '../../redux/reducer'
4 | import Zoom, { DispatchZoomProps, StateZoomProps } from './Zoom.component'
5 |
6 | function mapStateToProps(state: RootState): StateZoomProps {
7 | return {
8 | screensize: state.ui.screensize,
9 | scale: state.ui.viewport.scale,
10 | }
11 | }
12 |
13 | function mapDispatchToProps(dispatch: any): DispatchZoomProps {
14 | return {
15 | zoom: (zoom, pageCoord, instant) => {
16 | return dispatch(changeScale(zoom, pageCoord, instant))
17 | },
18 | }
19 | }
20 |
21 | export default connect(mapStateToProps, mapDispatchToProps)(Zoom)
22 |
--------------------------------------------------------------------------------
/web/src/images/destructive.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/keyboard/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | /* constants */
9 | const SET_SHIFT_KEYDOWN = 'SET_SHIFT_KEYDOWN'
10 | const UNSET_SHIFT_KEYDOWN = 'UNSET_SHIFT_KEYDOWN'
11 |
12 | /* action creator functions */
13 |
14 | function setShiftKeyDown() {
15 | return {
16 | type: SET_SHIFT_KEYDOWN,
17 | }
18 | }
19 |
20 | function unsetShiftKeyDown() {
21 | return {
22 | type: UNSET_SHIFT_KEYDOWN,
23 | }
24 | }
25 |
26 | export {
27 | SET_SHIFT_KEYDOWN,
28 | UNSET_SHIFT_KEYDOWN,
29 | setShiftKeyDown,
30 | unsetShiftKeyDown,
31 | }
32 |
--------------------------------------------------------------------------------
/web/src/images/panning.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/web/src/images/refresh.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
--------------------------------------------------------------------------------
/web/src/images/uncertain.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/web/test/mockProjectData.ts:
--------------------------------------------------------------------------------
1 | import { ProjectExportData } from 'zod-models'
2 | import { LayeringAlgorithm } from '../src/types'
3 |
4 | const mockProjectData: ProjectExportData = {
5 | projectMeta: {
6 | creatorAgentPubKey: 'testAgentPubKey',
7 | createdAt: 1234,
8 | name: 'testProjectName',
9 | image: 'testProjectImage',
10 | passphrase: 'testPassphrase',
11 | isImported: false,
12 | layeringAlgorithm: LayeringAlgorithm.CoffmanGraham,
13 | topPriorityOutcomes: [],
14 | isMigrated: null,
15 | actionHash: 'testProjectActionHash',
16 | },
17 | outcomes: {},
18 | connections: {},
19 | outcomeMembers: {},
20 | outcomeComments: {},
21 | entryPoints: {},
22 | tags: {},
23 | }
24 |
25 | export default mockProjectData
26 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/reducer.ts:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux'
2 |
3 | import members from './members/reducer'
4 | import outcomes from './outcomes/reducer'
5 | import connections from './connections/reducer'
6 | import entryPoints from './entry-points/reducer'
7 | import outcomeComments from './outcome-comments/reducer'
8 | import outcomeMembers from './outcome-members/reducer'
9 | import outcomeHistory from './outcome-history/reducer'
10 | import projectMeta from './project-meta/reducer'
11 | import tags from './tags/reducer'
12 |
13 | export default combineReducers({
14 | projectMeta,
15 | members,
16 | tags,
17 | outcomes,
18 | connections,
19 | entryPoints,
20 | outcomeMembers,
21 | outcomeComments,
22 | outcomeHistory,
23 | })
24 |
--------------------------------------------------------------------------------
/web/src/components/ButtonClose/ButtonClose.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Icon from '../Icon/Icon'
3 |
4 | import './ButtonClose.scss'
5 |
6 | export type ButtonCloseProps = {
7 | size: 'small' | 'medium' | 'large'
8 | onClick: () => void
9 | disabled?: boolean
10 | }
11 |
12 | const ButtonClose: React.FC = ({
13 | size = 'medium',
14 | onClick,
15 | disabled,
16 | }) => {
17 | return (
18 |
26 | )
27 | }
28 |
29 | export default ButtonClose
30 |
--------------------------------------------------------------------------------
/web/src/components/SyncingIndicator/SyncingIndicator.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './SyncingIndicator.scss'
3 | import Icon from '../Icon/Icon'
4 | import Tooltip from '../Tooltip/Tooltip'
5 |
6 | export type SyncingIndicatorProps = {
7 | small?: boolean
8 | }
9 |
10 | const SyncingIndicator: React.FC = ({ small }) => {
11 | return (
12 |
13 |
14 | {!small && (
15 |
16 | )}
17 | {small && (
18 |
19 | )}
20 |
21 | )
22 | }
23 |
24 | export default SyncingIndicator
25 |
--------------------------------------------------------------------------------
/web/src/images/collapse.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web/src/images/earth.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/images/expand2.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/outcome-members/actions.ts:
--------------------------------------------------------------------------------
1 | import { OutcomeMember } from '../../../../types'
2 | import { createCrudActionCreators } from '../../crudRedux'
3 |
4 | const [
5 | [
6 | CREATE_OUTCOME_MEMBER,
7 | FETCH_OUTCOME_MEMBERS,
8 | UPDATE_OUTCOME_MEMBER,
9 | DELETE_OUTCOME_MEMBER,
10 | ],
11 | [
12 | createOutcomeMember,
13 | fetchOutcomeMembers,
14 | updateOutcomeMember,
15 | deleteOutcomeMember,
16 | ],
17 | ] = createCrudActionCreators('OUTCOME_MEMBER')
18 |
19 | export {
20 | CREATE_OUTCOME_MEMBER,
21 | FETCH_OUTCOME_MEMBERS,
22 | UPDATE_OUTCOME_MEMBER,
23 | DELETE_OUTCOME_MEMBER,
24 | createOutcomeMember,
25 | fetchOutcomeMembers,
26 | updateOutcomeMember,
27 | deleteOutcomeMember,
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/images/avatar-placeholder.svg:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/web/src/images/information.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/outcome-comments/actions.ts:
--------------------------------------------------------------------------------
1 | import { OutcomeComment } from '../../../../types'
2 | import { createCrudActionCreators } from '../../crudRedux'
3 |
4 | const [
5 | [
6 | CREATE_OUTCOME_COMMENT,
7 | FETCH_OUTCOME_COMMENTS,
8 | UPDATE_OUTCOME_COMMENT,
9 | DELETE_OUTCOME_COMMENT,
10 | ],
11 | [
12 | createOutcomeComment,
13 | fetchOutcomeComments,
14 | updateOutcomeComment,
15 | deleteOutcomeComment,
16 | ],
17 | ] = createCrudActionCreators('OUTCOME_COMMENT')
18 |
19 | export {
20 | CREATE_OUTCOME_COMMENT,
21 | FETCH_OUTCOME_COMMENTS,
22 | UPDATE_OUTCOME_COMMENT,
23 | DELETE_OUTCOME_COMMENT,
24 | createOutcomeComment,
25 | fetchOutcomeComments,
26 | updateOutcomeComment,
27 | deleteOutcomeComment,
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/components/ButtonAction/ButtonAction.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import './ButtonAction.scss'
4 |
5 | export type ButtonActionProps = {
6 | size: 'small' | 'medium' | 'large'
7 | onClick: () => void
8 | icon: React.ReactElement
9 | text: string
10 | }
11 |
12 | const ButtonAction: React.FC = ({
13 | size = 'medium',
14 | onClick,
15 | icon,
16 | text,
17 | }) => {
18 | return (
19 |
25 |
{icon}
26 |
{text}
27 |
28 | )
29 | }
30 |
31 | export default ButtonAction
32 |
--------------------------------------------------------------------------------
/web/src/images/attachment.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/outcome-editing/reducer.js:
--------------------------------------------------------------------------------
1 | import {
2 | START_TITLE_EDIT,
3 | END_TITLE_EDIT,
4 | START_DESCRIPTION_EDIT,
5 | END_DESCRIPTION_EDIT,
6 | } from './actions'
7 | const defaultState = null
8 | export default function (state = defaultState, action) {
9 | const { payload, type } = action
10 | switch (type) {
11 | case START_TITLE_EDIT:
12 | return {
13 | outcomeActionHash: payload.outcomeActionHash,
14 | isTitle: true,
15 | }
16 | case START_DESCRIPTION_EDIT:
17 | return {
18 | outcomeActionHash: payload.outcomeActionHash,
19 | isTitle: false,
20 | }
21 | case END_TITLE_EDIT:
22 | return null
23 | case END_DESCRIPTION_EDIT:
24 | return null
25 | default:
26 | return state
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/profiles/my-local-profile/actions.ts:
--------------------------------------------------------------------------------
1 | /*
2 | There should be an actions.js file in every
3 | feature folder, and it should start with a list
4 | of constants defining all the types of actions
5 | that can be taken within that feature.
6 | */
7 |
8 | import { Profile } from '../../../../types'
9 | import { Action } from '../../../../types/shared'
10 |
11 | // SET because it could be brand new, or an update, but treat it the same way
12 | const SET_MY_LOCAL_PROFILE = 'SET_MY_LOCAL_PROFILE'
13 |
14 | /* action creator functions */
15 |
16 | const setMyLocalProfile = (
17 | payload: Profile
18 | ): Action => {
19 | return {
20 | type: SET_MY_LOCAL_PROFILE,
21 | payload,
22 | }
23 | }
24 |
25 | export {
26 | SET_MY_LOCAL_PROFILE,
27 | setMyLocalProfile,
28 | }
--------------------------------------------------------------------------------
/happs/happ/workdir/dna/projects/dna.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | manifest_version: '1'
3 | name: projects-dna
4 | integrity:
5 | network_seed: ~
6 | properties:
7 | modifier: '0001'
8 | zomes:
9 | - name: projects_integrity
10 | bundled: ../../../../target/wasm32-unknown-unknown/release/projects_integrity.wasm
11 | - name: profiles_integrity
12 | bundled: ../../../../target/wasm32-unknown-unknown/release/profiles_integrity.wasm
13 | coordinator:
14 | zomes:
15 | - name: projects
16 | bundled: ../../../../target/wasm32-unknown-unknown/release/projects.wasm
17 | dependencies:
18 | - name: projects_integrity
19 | - name: profiles
20 | bundled: ../../../../target/wasm32-unknown-unknown/release/profiles.wasm
21 | dependencies:
22 | - name: profiles_integrity
23 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/computeArguments/argsForDrawPeopleActive.ts:
--------------------------------------------------------------------------------
1 | import { ComputedOutcome, Profile } from '../../../types'
2 | import drawPeopleActive from '../drawPeopleActive'
3 |
4 | export const argsForDrawPeopleActive = ({
5 | outcome,
6 | ctx,
7 | outcomeFocusedMembers,
8 | }: {
9 | outcome: ComputedOutcome
10 | ctx: CanvasRenderingContext2D
11 | outcomeFocusedMembers: Profile[]
12 | }): Parameters[0] => {
13 | const args: Parameters[0] = {
14 | // TODO: check these fixed values on different zoom levels
15 | // and make them adapt according to zoom level
16 | outcomeFocusedMembers,
17 | xPosition: 82,
18 | yPosition: 132,
19 | avatarSize: 46,
20 | avatarSpace: 0,
21 | ctx,
22 | }
23 | return args
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/images/warning.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/web/src/projectAppIds.ts:
--------------------------------------------------------------------------------
1 | import { AppInfo, CellType, ClonedCell } from '@holochain/client'
2 | import _ from 'lodash'
3 | import { getAppWs } from './hcWebsockets'
4 | import { PROJECTS_ROLE_NAME } from './holochainConfig'
5 | import { cellIdToString } from './utils'
6 |
7 | export async function getProjectCellIdStrings(appInfo?: AppInfo) {
8 | if (!appInfo) {
9 | const appWs = await getAppWs()
10 | appInfo = await appWs.appInfo()
11 | }
12 |
13 | // get only the enabled cloned cells
14 | const clonedProjectCells =
15 | appInfo?.cell_info[PROJECTS_ROLE_NAME].filter(
16 | (cellInfo) => CellType.Cloned === cellInfo.type && cellInfo.value.enabled
17 | ) || []
18 | return clonedProjectCells.map((cellInfo) =>
19 | cellIdToString((cellInfo.value as ClonedCell).cell_id)
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/web/src/components/EvReadOnlyHeading/EvReadOnlyHeading.scss:
--------------------------------------------------------------------------------
1 | .ev-read-only-heading-wrapper {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: flex-end;
5 | padding: 0 3rem 1.5rem 3rem;
6 | border-bottom: 0.125rem solid var(--border-color-platinum);
7 | max-height: 6rem;
8 | box-sizing: border-box;
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | .ev-read-only-heading {
13 | font: 1.5rem var(--font-family-primary-bold);
14 | line-height: 1.35;
15 | letter-spacing: 0.01rem;
16 | margin-right: 2.75rem;
17 | flex: 1;
18 | height: 100%;
19 | display: -webkit-box;
20 | display: box;
21 | -webkit-line-clamp: 2;
22 | -webkit-box-orient: vertical;
23 | overflow: hidden;
24 | text-overflow: ellipsis;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/web/src/components/ExpandChevron/ExpandChevron.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Icon from '../Icon/Icon'
3 | import './ExpandChevron.scss'
4 |
5 | export type ExpandChevronProps = {
6 | expanded?: boolean
7 | onClick: () => void
8 | size: 'small' | 'medium'
9 | }
10 |
11 | const ExpandChevron: React.FC = ({
12 | expanded,
13 | onClick,
14 | size = 'medium',
15 | }) => {
16 | return (
17 | // TODO: add size variations
18 |
24 | {/* @ts-ignore */}
25 |
26 |
27 | )
28 | }
29 |
30 | export default ExpandChevron
31 |
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvAttachments/AddAttachment.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './AddAttachment.scss'
3 | import Icon from '../../../../Icon/Icon'
4 |
5 | export type AddAttachmentProps = {
6 | // proptypes
7 | onAddAttachment: () => void
8 | }
9 |
10 | const AddAttachment: React.FC = ({
11 | // prop declarations
12 | onAddAttachment,
13 | }) => {
14 | return (
15 |
16 |
17 |
18 |
19 |
Add an attachment
20 |
21 | )
22 | }
23 |
24 | export default AddAttachment
25 |
--------------------------------------------------------------------------------
/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvComments/EvComments.scss:
--------------------------------------------------------------------------------
1 | .comments-posted-wrapper {
2 | overflow-y: scroll;
3 | flex: 1;
4 | display: flex;
5 | flex-direction: column;
6 |
7 | .comments-posted-list-item {
8 | padding: 0.75rem 3.5rem 0.75rem 3rem;
9 | margin-bottom: 0.5rem;
10 | transition: 0.2s background-color ease;
11 |
12 | .comments-posted-list-item-empty {
13 | color: var(--text-color-tertiary);
14 | }
15 |
16 | &:first-child {
17 | margin-top: 1rem;
18 | }
19 |
20 | &:last-child {
21 | padding-bottom: 2rem;
22 | margin-bottom: 0;
23 | }
24 |
25 | &:hover {
26 | background-color: var(--bg-color-hover);
27 | }
28 | }
29 | }
30 |
31 | .comments-view-input-wrapper {
32 | padding: 0 2.75rem 2rem 2.75rem;
33 | }
34 |
--------------------------------------------------------------------------------
/zod-models/src/projectMetaSchema/v1/projectMetaV1Schema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 | import { ProjectMetaV0Schema } from '../v0/projectMetaV0Schema'
3 | import WithActionHashSchema from '../../withActionHashSchema'
4 |
5 | export enum LayeringAlgorithm {
6 | LongestPath = 'LongestPath',
7 | CoffmanGraham = 'CoffmanGraham',
8 | Classic = 'Classic'
9 | }
10 | export const LayeringAlgorithmSchema = z.nativeEnum(LayeringAlgorithm)
11 |
12 | export const ProjectMetaV1Schema = z.object({
13 | layeringAlgorithm: LayeringAlgorithmSchema,
14 | topPriorityOutcomes: z.array(z.string())
15 | }).merge(ProjectMetaV0Schema)
16 |
17 | export type ProjectMetaV1 = z.infer
18 |
19 | const ProjectMetaV1WithActionHashSchema = WithActionHashSchema.merge(ProjectMetaV1Schema)
20 | export default ProjectMetaV1WithActionHashSchema
--------------------------------------------------------------------------------
/happs/lib/hdk_crud/src/wire_record.rs:
--------------------------------------------------------------------------------
1 | use hdk::prelude::*;
2 | use holo_hash::{EntryHashB64, ActionHashB64};
3 |
4 | #[doc = "This data structure will be very broadly useful and represents
5 | how an entry should be serialized along with what metadata to
6 | form a consistent pattern that the UI or client can expect.
7 | It is called `WireRecord` because it is how data looks passed
8 | 'over the wire' or network."]
9 | /// It serializes with camelCase style replacement of underscores in object keys.
10 | #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
11 | #[serde(rename_all = "camelCase")]
12 | pub struct WireRecord {
13 | pub action_hash: ActionHashB64,
14 | pub entry_hash: EntryHashB64,
15 | pub entry: T,
16 | pub created_at: Timestamp,
17 | pub updated_at: Timestamp,
18 | }
--------------------------------------------------------------------------------
/web/src/components/Checkbox/Checkbox.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Icon from '../Icon/Icon'
3 |
4 | import './Checkbox.scss'
5 |
6 | export type CheckboxProps = {
7 | size: 'small' | 'medium' | 'large'
8 | isChecked?: boolean
9 | onChange?: (newState: boolean) => void
10 | }
11 |
12 | const Checkbox: React.FC = ({
13 | size = 'medium',
14 | isChecked,
15 | onChange = () => {},
16 | }) => {
17 | return (
18 | onChange(!isChecked)}
20 | className={`checkbox-wrapper ${isChecked ? 'checked' : ''}
21 | ${size === 'small' ? 'small' : size === 'large' ? 'large' : ''}
22 | `}
23 | >
24 | {/* @ts-ignore */}
25 | {isChecked && }
26 |
27 | )
28 | }
29 |
30 | export default Checkbox
31 |
--------------------------------------------------------------------------------
/web/src/components/CommentPosted/CommentPosted.scss:
--------------------------------------------------------------------------------
1 | .comment-posted-wrapper {
2 | display: flex;
3 | width: 100%;
4 | box-sizing: border-box;
5 | }
6 |
7 | .comment-posted-avatar {
8 | display: inline-block;
9 | }
10 | .comment-posted-avatar .avatar-wrapper {
11 | position: relative;
12 | }
13 |
14 | .comment-posted-content {
15 | margin-left: 1rem;
16 | }
17 |
18 | .comment-posted-info {
19 | display: flex;
20 | flex-direction: row;
21 | align-items: center;
22 | margin-bottom: 0.125rem;
23 | }
24 |
25 | .comment-posted-name {
26 | display: flex;
27 | flex-direction: row;
28 | margin-right: 0.5rem;
29 | }
30 |
31 | .comment-posted-date {
32 | }
33 |
34 | .comment-posted-text {
35 | color: #4d4d4d;
36 | font-size: 0.875rem;
37 | box-sizing: border-box;
38 | white-space: pre-wrap;
39 | line-height: 1.45;
40 | }
41 |
--------------------------------------------------------------------------------
/web/src/components/SyncingIndicator/SyncingIndicator.scss:
--------------------------------------------------------------------------------
1 | .syncing-indicator {
2 | margin: 10px;
3 | position: relative;
4 | width: 100%;
5 | height: 100%;
6 | display: flex;
7 | flex-direction: column;
8 | align-items: center;
9 | justify-content: center;
10 |
11 | &:hover .tooltip-wrapper {
12 | position: absolute;
13 | left: 50%;
14 | visibility: visible;
15 | transition-delay: 0.9s;
16 | transition-property: visibility;
17 | }
18 |
19 | .icon {
20 | animation: spin 2s linear infinite;
21 | -webkit-animation: spin 2s linear infinite;
22 | }
23 | }
24 |
25 | @keyframes spin {
26 | 100% {
27 | -webkit-transform: rotate(360deg);
28 | transform: rotate(360deg);
29 | }
30 | }
31 |
32 | @-webkit-keyframes spin {
33 | 100% {
34 | -webkit-transform: rotate(360deg);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/web/src/components/EvReadOnlyHeading/EvReadOnlyHeading.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReadOnlyInfo from '../ReadOnlyInfo/ReadOnlyInfo'
3 | import Typography from '../Typography/Typography'
4 | import './EvReadOnlyHeading.scss'
5 |
6 | export type EvReadOnlyHeadingProps = {
7 | headingText: string
8 | overviewText: string
9 | overviewIcon: React.ReactElement
10 | }
11 |
12 | const EvReadOnlyHeading: React.FC = ({
13 | headingText,
14 | overviewIcon,
15 | overviewText,
16 | }) => {
17 | return (
18 |
19 |
{headingText}
20 |
21 |
22 |
23 |
24 | )
25 | }
26 |
27 | export default EvReadOnlyHeading
28 |
--------------------------------------------------------------------------------
/scripts/add-components.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | for var in "$@"; do
4 | echo "folder: web/src/components/$var"
5 | mkdir web/src/components/$var
6 |
7 | echo "scss: web/src/components/$var"
8 | touch web/src/components/$var/$var.scss
9 |
10 | echo "component: web/src/components/$var"
11 | touch web/src/components/$var/$var.tsx
12 | cat scripts/component-template/component.tsx >web/src/components/$var/$var.tsx
13 | sed -i.bak "s/ReplaceMe/$var/g" web/src/components/$var/$var.tsx
14 | rm web/src/components/$var/$var.tsx.bak
15 |
16 | echo "story: web/src/stories/$var.stories.tsx"
17 | touch web/src/stories/$var.stories.tsx
18 | cat scripts/component-template/component.stories.tsx >web/src/stories/$var.stories.tsx
19 | sed -i.bak "s/ReplaceMe/$var/g" web/src/stories/$var.stories.tsx
20 | rm web/src/stories/$var.stories.tsx.bak
21 | done
22 |
--------------------------------------------------------------------------------
/web/src/redux/persistent/projects/entry-points/select.ts:
--------------------------------------------------------------------------------
1 | import { CellIdString } from '../../../../types/shared'
2 | import { RootState } from '../../../reducer'
3 |
4 | export default function selectEntryPoints(
5 | state: RootState,
6 | projectId: CellIdString
7 | ) {
8 | const entryPoints = state.projects.entryPoints[projectId] || {}
9 | const outcomes = state.projects.outcomes[projectId] || {}
10 |
11 | const combinedEntryPoints = Object.keys(entryPoints)
12 | .map((key) => {
13 | const entryPoint = entryPoints[key]
14 | const outcome = outcomes[entryPoint.outcomeActionHash]
15 | if (outcome) {
16 | return {
17 | entryPoint,
18 | outcome,
19 | }
20 | }
21 | return null
22 | })
23 | // filter out nulls
24 | .filter((e) => e)
25 |
26 | return combinedEntryPoints
27 | }
28 |
--------------------------------------------------------------------------------
/web/src/components/CreateProjectModal/CreateProjectModal.scss:
--------------------------------------------------------------------------------
1 | .create-project-modal {
2 | width: 30rem;
3 | overflow: auto;
4 | position: relative;
5 | justify-content: space-between;
6 | align-items: center;
7 |
8 | .create-project-form {
9 |
10 | .create-project-image-row {
11 | display: flex;
12 | flex-direction: row;
13 | align-items: flex-end;
14 |
15 | .validating-form-input {
16 | margin-bottom: 0;
17 | }
18 |
19 | .create-project-image {
20 | margin-left: 8px;
21 | width: 44px;
22 | height: 44px;
23 | background-size: cover;
24 | background-repeat: no-repeat;
25 | border-radius: 10px;
26 | border: 2px solid #f3efeb;
27 | box-sizing: border-box;
28 | background-color: var(--bg-color-tertiary);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/web/src/components/ProgressIndicator/ProgressIndicator.scss:
--------------------------------------------------------------------------------
1 | .progress-indicator-wrapper {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | justify-content: center;
6 |
7 | &.small {
8 | transform: scale(0.9);
9 | }
10 |
11 | .icon {
12 | height: 1.05rem;
13 | width: 1.05rem;
14 | padding: 0;
15 |
16 | &.not-achieved {
17 | .inner-icon {
18 | background-color: var(--color-topaz);
19 | }
20 | }
21 |
22 | &.partially-achieved {
23 | svg {
24 | g {
25 | path {
26 | stroke: yellow;
27 | }
28 | }
29 | }
30 |
31 | .inner-icon {
32 | // background-color: unset;
33 | }
34 | }
35 |
36 | &.achieved {
37 | .inner-icon {
38 | background-color: var(--color-green);
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/web/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2 | module.exports = {
3 | preset: 'ts-jest',
4 | testEnvironment: 'node',
5 | extensionsToTreatAsEsm: ['.ts'],
6 | transform: {
7 | '^.+\\.[tj]s$': [
8 | 'babel-jest',
9 | {
10 | presets: [
11 | [
12 | '@babel/preset-env',
13 | {
14 | targets: {
15 | node: 'current',
16 | },
17 | },
18 | ],
19 | '@babel/preset-typescript',
20 | ],
21 | },
22 | ],
23 | },
24 | transformIgnorePatterns: [
25 | 'node_modules/(?!((@holochain/(client|serialization))|@noble/ed25519|emittery|lodash-es).*)',
26 | ],
27 | globals: {
28 | __MAIN_APP_ID__: 'test-main-app-id',
29 | __ADMIN_PORT__: '8000',
30 | __APP_PORT__: '8000',
31 | },
32 | }
33 |
--------------------------------------------------------------------------------
/zod-models/src/outcome/outcomeSchema.ts:
--------------------------------------------------------------------------------
1 | import {z} from 'zod'
2 | import ScopeSchema from '../scope/scopeSchema'
3 | import WithActionHashSchema from '../withActionHashSchema'
4 |
5 | export const OutcomeSchema = z.object({
6 | content: z.string(),
7 | creatorAgentPubKey: z.string(),
8 | editorAgentPubKey: z.string().nullable(),
9 | timestampCreated: z.number().gt(0),
10 | timestampUpdated: z.number().gt(0).nullable(),
11 | scope: ScopeSchema,
12 | tags: z.array(z.string()).nullable(),
13 | description: z.string(),
14 | isImported: z.boolean(),
15 | githubLink: z.string().url().or(z.literal('')),
16 | })
17 |
18 | export const ProjectOutcomesStateSchema = z.record(
19 | WithActionHashSchema.merge(OutcomeSchema)
20 | )
21 | export type ProjectOutcomesState = z.infer
22 |
23 |
24 | export type Outcome = z.infer
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "Flake for Holochain app development";
3 |
4 | inputs = {
5 | holonix.url = "github:holochain/holonix?ref=main-0.5";
6 |
7 | nixpkgs.follows = "holonix/nixpkgs";
8 | flake-parts.follows = "holonix/flake-parts";
9 | };
10 |
11 | outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
12 | systems = builtins.attrNames inputs.holonix.devShells;
13 | perSystem = { inputs', pkgs, ... }: {
14 | formatter = pkgs.nixpkgs-fmt;
15 |
16 | devShells.default = pkgs.mkShell {
17 | inputsFrom = [ inputs'.holonix.devShells.default ];
18 |
19 | packages = (with pkgs; [
20 | nodejs_20
21 | binaryen
22 | ]);
23 |
24 | shellHook = ''
25 | export PS1='\[\033[1;34m\][holonix:\w]\$\[\033[0m\] '
26 | '';
27 | };
28 | };
29 | };
30 | }
--------------------------------------------------------------------------------
/web/src/components/ButtonTabIcon/ButtonTabIcon.scss:
--------------------------------------------------------------------------------
1 | .button-tab-icon-wrapper {
2 | color: var(--text-color-quaternary);
3 | display: flex;
4 | cursor: pointer;
5 | align-items: center;
6 | border-radius: 0.5rem;
7 | width: fit-content;
8 | padding: 0.5rem;
9 | box-sizing: border-box;
10 | transition: 0.2s all ease;
11 |
12 | .icon {
13 | width: 2.75rem;
14 | height: 2.75rem;
15 |
16 | .inner-icon {
17 | background-color: var(--icon-color-light-grey);
18 | }
19 | }
20 |
21 | &:hover {
22 | background-color: var(--bg-color-hover);
23 |
24 | .icon {
25 | .inner-icon {
26 | background-color: var(--text-color-primary);
27 | }
28 | }
29 | }
30 |
31 | &.active {
32 | background-color: var(--bg-color-hover);
33 |
34 | .icon .inner-icon {
35 | background-color: var(--text-color-primary);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/web/src/components/ButtonTabIcon/ButtonTabIcon.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Icon from '../Icon/Icon'
3 | import './ButtonTabIcon.scss'
4 |
5 | export type ButtonTabIconProps = {
6 | label: string
7 | iconName: string
8 | active: boolean
9 | onClick: () => void
10 | }
11 |
12 | const ButtonTabIcon: React.FC = ({
13 | label,
14 | iconName,
15 | active,
16 | onClick,
17 | }) => {
18 | return (
19 |
23 | {/* @ts-ignore */}
24 |
31 | {/* TODO: add tooltip text */}
32 | {/* {label} */}
33 |
34 | )
35 | }
36 |
37 | export default ButtonTabIcon
38 |
--------------------------------------------------------------------------------
/web/src/components/ExpandChevron/ExpandChevron.scss:
--------------------------------------------------------------------------------
1 | .expand-chevron-wrapper {
2 | padding: 0.25rem;
3 | cursor: pointer;
4 | transition: 0.2s background-color ease-in;
5 | border-radius: 0.5rem;
6 | aspect-ratio: 1/1;
7 | display: flex;
8 | align-items: center;
9 | justify-content: center;
10 |
11 | &.small {
12 | transform: scale(0.9);
13 | padding: 0.125;
14 | border-radius: 0.375rem;
15 | }
16 |
17 | &:hover {
18 | background-color: var(--bg-color-secondary);
19 |
20 | .icon .inner-icon {
21 | background-color: var(--text-color-primary);
22 | }
23 | }
24 |
25 | .icon {
26 | transition: transform 0.2s ease-in;
27 | padding: 0;
28 | width: 1.25rem;
29 | height: 1.25rem;
30 | }
31 |
32 | &.expanded {
33 | .icon {
34 | transform: rotateX(90deg);
35 | -webkit-transform: rotate(90deg);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/web/src/components/PickerTemplate/PickerTemplate.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './PickerTemplate.scss'
3 |
4 | import Icon from '../Icon/Icon'
5 | import OnClickOutside from '../OnClickOutside/OnClickOutside'
6 | import ButtonClose from '../ButtonClose/ButtonClose'
7 |
8 | export default function PickerTemplate({
9 | className,
10 | children,
11 | heading,
12 | onClose,
13 | skipOnClickOutside = false,
14 | }) {
15 | return (
16 | {
18 | if (!skipOnClickOutside) onClose()
19 | }}
20 | >
21 |
22 |
23 | onClose()} />
24 |
25 |
{heading}
26 | {children}
27 |
28 |
29 | )
30 | }
31 |
--------------------------------------------------------------------------------
/web/src/holochainConfig.ts:
--------------------------------------------------------------------------------
1 | // this corresponds with the zome name used in
2 | // `dna/workdir/dna/profiles/dna.yaml`
3 | export const PROFILES_ZOME_NAME = 'profiles'
4 |
5 | // this corresponds with the zome name used in
6 | // `dna/workdir/dna/projects/dna.yaml`
7 | export const PROJECTS_ZOME_NAME = 'projects'
8 |
9 | // this corresponds with the app id used to install the app
10 | // defined in for the web clients in `config-main-app-id`
11 | // and for the "server" in `electron/src/holochain.ts`
12 | // @ts-ignore
13 | export const MAIN_APP_ID = __MAIN_APP_ID__
14 |
15 | // this corresponds with the `name` field of the profiles slot
16 | // defined in `conductor/src/main.rs`
17 | export const PROFILES_ROLE_NAME = 'profiles'
18 | export const PROJECTS_ROLE_NAME = 'projects'
19 |
20 | // is used as a prefix for the creation of new Project apps/DHTs
21 | export const PROJECT_APP_PREFIX = 'acorn-project'
22 |
--------------------------------------------------------------------------------
/web/src/stories/CommentInput.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ComponentStory, ComponentMeta } from '@storybook/react'
3 | import '../variables.scss'
4 |
5 | import CommentInput from '../components/CommentInput/CommentInput'
6 |
7 | // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8 | export default {
9 | title: 'Comments/CommentInput',
10 | component: CommentInput,
11 | } as ComponentMeta
12 |
13 | // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
14 | const Template: ComponentStory = (args) => {
15 | return
16 | }
17 |
18 | export const Primary = Template.bind({})
19 | Primary.storyName = 'CommentInput'
20 | // More on args: https://storybook.js.org/docs/react/writing-stories/args
21 | Primary.args = {}
22 |
--------------------------------------------------------------------------------
/web/src/types/createOutcomeWithConnectionInput.ts:
--------------------------------------------------------------------------------
1 | import { Outcome } from 'zod-models'
2 | import { Option, ActionHashB64 } from './shared'
3 |
4 | export interface CreateOutcomeWithConnectionInput {
5 | entry: Outcome
6 | maybeLinkedOutcome: Option
7 | }
8 |
9 | export interface LinkedOutcomeDetails {
10 | // the ActionHashB64 of the
11 | // Outcome that is the 'origin' of the connection
12 | outcomeActionHash: ActionHashB64
13 | // `relation` indicates the 'port' in a sense, to be parent or child
14 | relation: RelationInput
15 | // when creating a new Connection, the siblingOrder is the number that
16 | // determines the order of the new Connection relative to its siblings
17 | siblingOrder: number
18 | }
19 |
20 | export enum RelationInput {
21 | ExistingOutcomeAsParent = 'ExistingOutcomeAsParent',
22 | ExistingOutcomeAsChild = 'ExistingOutcomeAsChild',
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/event-listeners/helpers/closestOutcome.ts:
--------------------------------------------------------------------------------
1 | import { ActionHashB64 } from '../../types/shared'
2 |
3 | export default function closestOutcomeToPageCoord(
4 | canvasCoords: { x: number; y: number },
5 | outcomeCoordinates: {
6 | [outcomeActionHash: ActionHashB64]: { x: number; y: number }
7 | }
8 | ) {
9 | let closestOutcomeActionHash: ActionHashB64
10 | let closestDistance: number = Infinity
11 | for (let outcomeActionHash in outcomeCoordinates) {
12 | const outcomeCoord = outcomeCoordinates[outcomeActionHash]
13 | // trig distance
14 | const distance = Math.sqrt(
15 | Math.pow(canvasCoords.x - outcomeCoord.x, 2) +
16 | Math.pow(canvasCoords.y - outcomeCoord.y, 2)
17 | )
18 | if (distance < closestDistance) {
19 | closestOutcomeActionHash = outcomeActionHash
20 | closestDistance = distance
21 | }
22 | }
23 | return closestOutcomeActionHash
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/drawBeingEdited.ts:
--------------------------------------------------------------------------------
1 | import draw from '../draw'
2 |
3 | const drawBeingEdited = ({ ctx }: { ctx: CanvasRenderingContext2D }) =>
4 | draw(ctx, () => {
5 | // if (isBeingEdited) {
6 | // drawRoundCornerRectangle({
7 | // context: ctx,
8 | // width: 140,
9 | // height: 25,
10 | // color: '#717171',
11 | // boxShadow: false,
12 | // xPosition: outcomeLeftX + outcomeWidth / 2 - 70,
13 | // yPosition: outcomeTopY + outcomeHeight - 12.5,
14 | // radius: 6,
15 | // })
16 | // }
17 | // if (isBeingEdited) {
18 | // let isBeingEditedText = `Being edited by ${isBeingEditedBy}`
19 | // ctx.fillStyle = '#fff'
20 | // ctx.font = '14px PlusJakartaSans-bold'
21 | // ctx.fillText(isBeingEditedText, outcomeLeftX + outcomeWidth / 2 - 60, outcomeTopY + outcomeHeight - 8)
22 | // }
23 | })
24 |
25 | export default drawBeingEdited
26 |
--------------------------------------------------------------------------------
/web/src/stories/ButtonClose.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ComponentStory, ComponentMeta } from '@storybook/react'
3 | import '../variables.scss'
4 |
5 | import ButtonClose from '../components/ButtonClose/ButtonClose'
6 |
7 | // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8 | export default {
9 | title: 'Buttons/ButtonClose',
10 | component: ButtonClose,
11 | } as ComponentMeta
12 |
13 | // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
14 | const Template: ComponentStory = (args) => {
15 | return
16 | }
17 |
18 | export const Primary = Template.bind({})
19 | Primary.storyName = 'ButtonClose'
20 | // More on args: https://storybook.js.org/docs/react/writing-stories/args
21 | Primary.args = {
22 | // assign props here
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/components/Breadcrumbs/Breadcrumbs.scss:
--------------------------------------------------------------------------------
1 | .breadcrumbs-wrapper {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | padding: 0.415rem 1rem;
6 | background-color: var(--bg-color-secondary);
7 | border-radius: 0.5rem;
8 |
9 | .breadcrumbs-parents {
10 | display: flex;
11 | flex-direction: row;
12 | align-items: center;
13 | flex-wrap: nowrap;
14 | white-space: nowrap;
15 | text-overflow: ellipsis;
16 | cursor: pointer;
17 |
18 | .breadcrumbs-item-wrapper {
19 | display: flex;
20 | flex-direction: row;
21 |
22 | .breadcrumbs-item {
23 | &:hover {
24 | text-decoration: underline;
25 | }
26 | }
27 | }
28 | }
29 |
30 | .breadcrumbs-current-outcome {
31 | margin-left: 0.125rem;
32 | flex-wrap: nowrap;
33 | white-space: nowrap;
34 | text-overflow: ellipsis;
35 | cursor: pointer;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/web/src/redux/ephemeral/layout/reducer.ts:
--------------------------------------------------------------------------------
1 | import {
2 | UPDATE_LAYOUT,
3 | UPDATE_OUTCOME_COORDINATES,
4 | UPDATE_OUTCOME_DIMENSIONS,
5 | } from './actions'
6 | import { CoordinatesState, DimensionsState, LayoutState } from './state-type'
7 |
8 | const defaultState: LayoutState = {
9 | coordinates: {},
10 | dimensions: {},
11 | }
12 |
13 | export default function (state = defaultState, action: any): LayoutState {
14 | const { payload, type } = action
15 | switch (type) {
16 | case UPDATE_OUTCOME_COORDINATES:
17 | return {
18 | ...state,
19 | coordinates: payload.coordinates as CoordinatesState,
20 | }
21 | case UPDATE_OUTCOME_DIMENSIONS:
22 | return {
23 | ...state,
24 | dimensions: payload.dimensions as DimensionsState,
25 | }
26 | case UPDATE_LAYOUT:
27 | return payload.layout as LayoutState
28 | default:
29 | return state
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/web/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | ConnectionSchema,
3 | EntryPointSchema,
4 | OutcomeCommentSchema,
5 | OutcomeMemberSchema,
6 | TagSchema,
7 | } from 'zod-models'
8 |
9 | export type {
10 | Tag,
11 | Profile,
12 | Connection,
13 | EntryPoint,
14 | Outcome,
15 | SmallTask,
16 | SmallScope,
17 | TimeFrame,
18 | SmallsEstimate,
19 | UncertainScope,
20 | Scope,
21 | AchievementStatus,
22 | OutcomeComment,
23 | OutcomeMember,
24 | } from 'zod-models'
25 |
26 | export * from './member'
27 | export * from './outcome'
28 | export * from './profile'
29 | export * from './projectMeta'
30 | export * from './editingOutcomeDetails'
31 | export * from './entryPointDetails'
32 | export * from './realtimeInfoInput'
33 | export * from './createOutcomeWithConnectionInput'
34 | export * from './createOutcomeWithConnectionOutput'
35 | export * from './deleteOutcomeFullyResponse'
36 | export * from './whoAmIOutput'
37 |
--------------------------------------------------------------------------------
/web/src/components/ChecklistItem/ChecklistItem.scss:
--------------------------------------------------------------------------------
1 | .checklist-item-wrapper {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: flex-start;
5 | -webkit-font-smoothing: antialiased;
6 |
7 | &.with-strikethrough {
8 | .checklist-item-wrapper-text {
9 | &.checked {
10 | color: var(--text-color-tertiary);
11 | text-decoration: line-through var(--text-color-strikethrough);
12 | }
13 | }
14 | }
15 |
16 | .checkbox-wrapper {
17 | margin-right: 0.625rem;
18 | margin-top: 0.125rem;
19 | }
20 |
21 | .checklist-item-wrapper-text {
22 | font: 1rem var(--font-family-primary-medium);
23 | color: var(--text-color-primary);
24 | line-height: 1.45;
25 |
26 | &.small {
27 | font: 0.825rem var(--font-family-primary-medium);
28 | }
29 |
30 | &.large {
31 | font: 1.25rem var(--font-family-primary-medium);
32 | line-height: 1.5;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/outcome_comment/entry.rs:
--------------------------------------------------------------------------------
1 | use hdi::prelude::*;
2 | use holo_hash::{ActionHashB64, AgentPubKeyB64};
3 |
4 | #[hdk_entry_helper]
5 | #[serde(rename_all = "camelCase")]
6 | #[derive(Clone, PartialEq)]
7 | pub struct OutcomeComment {
8 | pub outcome_action_hash: ActionHashB64,
9 | pub content: String,
10 | pub creator_agent_pub_key: AgentPubKeyB64,
11 | pub unix_timestamp: f64,
12 | pub is_imported: bool,
13 | }
14 |
15 | impl OutcomeComment {
16 | pub fn new(
17 | outcome_action_hash: ActionHashB64,
18 | content: String,
19 | creator_agent_pub_key: AgentPubKeyB64,
20 | unix_timestamp: f64,
21 | is_imported: bool,
22 | ) -> Self {
23 | Self {
24 | outcome_action_hash,
25 | content,
26 | creator_agent_pub_key,
27 | unix_timestamp,
28 | is_imported,
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/zod-models/src/zodModels.ts:
--------------------------------------------------------------------------------
1 | export * from './allProjectsDataExport/allProjectsDataExportSchema'
2 | export * from './connection/connectionSchema'
3 | export * from './entryPoint/entryPointSchema'
4 | export * from './outcomeComment/outcomeCommentSchema'
5 | export * from './outcomeMember/outcomeMemberSchema'
6 | export * from './outcome/outcomeSchema'
7 | export * from './profile/profileSchema'
8 | export * from './tag/tagSchema'
9 | export * from './projectMetaSchema/projectMetaSchema'
10 | export * from './projectMetaSchema/v1/projectMetaV1Schema'
11 | export * from './scope/scopeSchema'
12 | export * from './scope/small/smallScopeSchema'
13 | export * from './scope/small/smallsEstimateSchema'
14 | export * from './scope/small/smallTaskSchema'
15 | export * from './scope/small/achievementStatus'
16 | export * from './scope/uncertain/timeFrameSchema'
17 | export * from './scope/uncertain/uncertainScopeSchema'
18 | export * from './projectExportData/projectExportDataSchema'
19 |
--------------------------------------------------------------------------------
/web/src/components/MembersIndicator/MembersIndicator.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import AvatarsList from '../AvatarsList/AvatarsList'
3 |
4 | import { AgentPubKeyB64 } from '../../types/shared'
5 | import { Profile } from '../../types'
6 |
7 | import './MembersIndicator.scss'
8 |
9 | export type MembersIndicatorProps = {
10 | members: Profile[]
11 | presentMembers: AgentPubKeyB64[]
12 | onClickInviteMember: () => void
13 | }
14 |
15 | const MembersIndicator: React.FC = ({
16 | members,
17 | presentMembers,
18 | onClickInviteMember,
19 | }) => {
20 | return (
21 |
31 | )
32 | }
33 |
34 | export default MembersIndicator
35 |
--------------------------------------------------------------------------------
/web/src/components/Typography/Typography.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import './Typography.scss'
4 |
5 | export type TypographyProps = {
6 | style:
7 | | 'h1'
8 | | 'h2'
9 | | 'h3'
10 | | 'h4'
11 | | 'h5'
12 | | 'h6'
13 | | 'h7'
14 | | 'h8'
15 | | 'subtitle1'
16 | | 'subtitle2'
17 | | 'subtitle3'
18 | | 'description'
19 | | 'body1'
20 | | 'body2'
21 | | 'caption1'
22 | | 'caption2'
23 | | 'caption3'
24 | | 'caption4'
25 | | 'breadcrumbs'
26 | | 'breadcrumbs-bold'
27 | | 'button-text'
28 | | 'label'
29 | | 'label-help'
30 | | 'heading-modal'
31 | | 'subtitle-modal'
32 | | 'body-modal'
33 | text?: string
34 | }
35 |
36 | const Typography: React.FC = ({ style, text, children }) => {
37 | return (
38 |
39 | {text}
40 | {children}
41 |
42 | )
43 | }
44 |
45 | export default Typography
46 |
--------------------------------------------------------------------------------
/web/src/components/FilterButton/FilterButton.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Checkbox from '../Checkbox/Checkbox'
3 | import Icon from '../Icon/Icon'
4 |
5 | import './FilterButton.scss'
6 |
7 | export type FilterButtonProps = {
8 | size: 'small' | 'medium' | 'large'
9 | isSelected: boolean
10 | onChange: (newState: boolean) => void
11 | icon: React.ReactElement
12 | text: string
13 | }
14 |
15 | const FilterButton: React.FC = ({
16 | size = 'medium',
17 | isSelected,
18 | onChange,
19 | icon,
20 | text,
21 | }) => {
22 | return (
23 | onChange(!isSelected)}
27 | >
28 |
{icon}
29 |
{text}
30 |
31 | )
32 | }
33 |
34 | export default FilterButton
35 |
--------------------------------------------------------------------------------
/zod-models/src/projectMetaSchema/projectMetaSchema.ts:
--------------------------------------------------------------------------------
1 |
2 | import {z} from 'zod'
3 | import ProjectMetaV0WithActionHashSchema from './v0/projectMetaV0Schema'
4 | import ProjectMetaV1WithActionHashSchema, { ProjectMetaV1, ProjectMetaV1Schema } from './v1/projectMetaV1Schema'
5 |
6 | const BackwardsCompatibleProjectMetaSchema = z.union([ProjectMetaV1WithActionHashSchema, ProjectMetaV0WithActionHashSchema])
7 |
8 | export {
9 | ProjectMetaV0WithActionHashSchema,
10 | ProjectMetaV1WithActionHashSchema,
11 | ProjectMetaV1,
12 | ProjectMetaV1Schema,
13 | }
14 | export type ProjectMetaV0WithActionHash = z.infer
15 | export type ProjectMetaV1WithActionHash = z.infer
16 |
17 | export type ProjectMetaWithActionHash = ProjectMetaV1WithActionHash
18 |
19 | export type BackwardsCompatibleProjectMeta = z.infer
20 | export default BackwardsCompatibleProjectMetaSchema
--------------------------------------------------------------------------------
/web/src/drawing/drawOutcome/drawSmallLeaf.ts:
--------------------------------------------------------------------------------
1 | import draw from '../draw'
2 | import { getOrSetImageForUrl } from '../imageCache'
3 | // @ts-ignore
4 | import leafGreen from '../../images/leaf-green.svg'
5 | // @ts-ignore
6 | import leafBronze from '../../images/leaf-bronze.svg'
7 |
8 | const drawSmallLeaf = ({
9 | xPosition,
10 | yPosition,
11 | isAchieved,
12 | isSmall,
13 | size,
14 | ctx,
15 | }: {
16 | xPosition: number
17 | yPosition: number
18 | isAchieved: boolean
19 | isSmall: boolean
20 | size: number
21 | ctx: CanvasRenderingContext2D
22 | }) =>
23 | draw(ctx, () => {
24 | if (isSmall) {
25 | const leafImg = getOrSetImageForUrl(
26 | isAchieved ? leafGreen : leafBronze,
27 | size,
28 | size
29 | )
30 | // url, x coordinate, y coordinate, width, height
31 | if (leafImg) {
32 | ctx.drawImage(leafImg, xPosition, yPosition, size, size)
33 | }
34 | }
35 | })
36 |
37 | export default drawSmallLeaf
38 |
--------------------------------------------------------------------------------
/happs/happ/zomes/projects_integrity/src/project/connection/entry.rs:
--------------------------------------------------------------------------------
1 | use hdi::prelude::*;
2 | use holo_hash::ActionHashB64;
3 |
4 | // An connection. This is an arrow on the SoA Tree which directionally links
5 | // two outcomes.
6 | #[hdk_entry_helper]
7 | #[serde(rename_all = "camelCase")]
8 | #[derive(Clone, PartialEq)]
9 | pub struct Connection {
10 | pub parent_action_hash: ActionHashB64,
11 | pub child_action_hash: ActionHashB64,
12 | pub sibling_order: i32,
13 | pub randomizer: i64,
14 | pub is_imported: bool,
15 | }
16 |
17 | impl Connection {
18 | pub fn new(
19 | parent_action_hash: ActionHashB64,
20 | child_action_hash: ActionHashB64,
21 | sibling_order: i32,
22 | randomizer: i64,
23 | is_imported: bool,
24 | ) -> Self {
25 | Self {
26 | parent_action_hash,
27 | child_action_hash,
28 | sibling_order,
29 | randomizer,
30 | is_imported,
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------