Skip to content

Commit

Permalink
Merge pull request #1384 from AmpersandTarski/feature/angularGenerator
Browse files Browse the repository at this point in the history
Feature/angular generator
  • Loading branch information
hanjoosten authored Feb 25, 2023
2 parents 1ce2ce5 + 455897e commit 1ce12e0
Show file tree
Hide file tree
Showing 10 changed files with 536 additions and 116 deletions.
3 changes: 3 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased changes

## v4.7.5 (25 february 2023)
* [Issue #1381](https://github.com/AmpersandTarski/Ampersand/issues/1381) Generate prototype with Angular frontend.

## v4.7.4 (20 february 2023)

- [Issue #1281 (extra fix after reopening of issue)](https://github.com/AmpersandTarski/Ampersand/issues/1281#issuecomment-1159623865) Final fix an omision in typecheck of ENFORCE statement.
Expand Down
2 changes: 1 addition & 1 deletion ampersand.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.0
-- see: https://github.com/sol/hpack

name: ampersand
version: 4.7.4
version: 4.7.5
synopsis: Toolsuite for automated design of enterprise information systems.
description: You can define your business processes by means of rules, written in Relation Algebra.
category: Database Design
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ampersand
version: 4.7.4
version: 4.7.5
author: Stef Joosten
maintainer: [email protected]
synopsis: Toolsuite for automated design of enterprise information systems.
Expand Down
8 changes: 4 additions & 4 deletions src/Ampersand/Core/AbstractSyntaxTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ data ViewDef = Vd
-- | the constituent attributes (i.e. name/term pairs) of this view.
vdats :: [ViewSegment]
}
deriving (Show)
deriving (Show, Data)

instance Named ViewDef where
name = vdlbl
Expand All @@ -556,7 +556,7 @@ data ViewSegment = ViewSegment
vsmSeqNr :: Integer,
vsmLoad :: ViewSegmentPayLoad
}
deriving (Show)
deriving (Show, Data)

instance Traced ViewSegment where
origin = vsmpos
Expand All @@ -568,7 +568,7 @@ data ViewSegmentPayLoad
| ViewText
{ vsgmTxt :: Text
}
deriving (Eq, Show)
deriving (Eq, Show, Data)

-- | data structure AClassify contains the CLASSIFY statements from an Ampersand script
-- CLASSIFY Employee ISA Person translates to Isa (C "Person") (C "Employee")
Expand Down Expand Up @@ -776,7 +776,7 @@ data Cruds = Cruds
crudU :: Bool,
crudD :: Bool
}
deriving (Show)
deriving (Show, Data)

data SubInterface
= Box
Expand Down
2 changes: 1 addition & 1 deletion src/Ampersand/Core/ParseTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ data P_ViewSegmtPayLoad a

newtype ViewHtmlTemplate = ViewHtmlTemplateFile FilePath
-- | ViewHtmlTemplateInline Text -- Future extension
deriving (Eq, Ord, Show)
deriving (Eq, Ord, Show, Data)

instance Functor P_ViewSegmtPayLoad where fmap = fmapDefault

Expand Down
6 changes: 4 additions & 2 deletions src/Ampersand/Misc/HasClasses.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ class HasProtoOpts a => HasDirPrototype a where
getTemplateDir x =
getDirPrototype x </> case view frontendVersionL x of
AngularJS -> "templates"
Angular -> "angular-app/templates"
Angular -> ".templates"
getAppDir :: a -> FilePath
getAppDir x =
getDirPrototype x </> "public" </> "app" </> "project"
getDirPrototype x </> case view frontendVersionL x of
AngularJS -> "public" </> "app" </> "project"
Angular -> ""
getGenericsDir :: a -> FilePath
getGenericsDir x =
getDirPrototype x </> "generics"
Expand Down
Loading

0 comments on commit 1ce12e0

Please sign in to comment.