Commit 9c4a5a82 authored by Camil Staps's avatar Camil Staps 🚀

Merge branch '251-remove-gdefault-form-itasks-class' into 'master'

Resolve "remove gDefault form iTasks class"

Closes #251

See merge request !288
parents 01f019e4 057f227c
Pipeline #27094 passed with stage
in 5 minutes and 9 seconds
......@@ -25,6 +25,8 @@ import Incidone.Extensions.CrewLists
derive class iTask CommunicationAttempt
derive class iTask ActionPlan
derive gDefault ActionStatus, ItemMeta, ActionProgress
actionStatuses :: SDSLens () [(InstanceNo,InstanceNo,ActionStatus)] ()
actionStatuses = mapRead (map toActionStatus) detachedTaskInstances
......
......@@ -7,6 +7,8 @@ import Text, Text.HTML, Data.List, iTasks.Internal.HtmlUtil
derive class iTask WallContent
derive gDefault ContactMap, ContactMapLayer, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactTrack, ContactMapMarkerType, DateTime
wallContent :: SimpleSDSLens WallContent
wallContent = sharedStore "WallContent" (WallOverview defaultValue)
......
......@@ -7,6 +7,8 @@ import Incidone.Util.TaskPatterns
import qualified Data.Map as DM
import Data.Functor
derive gDefault AISContact, DateTime, ContactTrack, Degrees, AIVDM5, AIVDMCNB
syncAISStream :: Task ()
syncAISStream = withShared ([],False,[],False) (\channel -> (sync channel -&&- consume channel) @! ())
where
......
......@@ -21,5 +21,4 @@ derive JSONEncode Temperature, Meters, Feet, Miles, Knots, Degrees, Contac
derive JSONDecode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gText Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEditor Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEq Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
......@@ -29,6 +29,4 @@ gText{|IncidentShort|} _ i = [maybe "" incidentTitle i]
derive JSONEncode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive JSONDecode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEditor Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEq Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
......@@ -13,6 +13,8 @@ import Data.Map.GenJSON
import Text, Text.HTML, Data.Either, Data.Functor
import iTasks.UI.Editor.Controls
derive gDefault Contact, ContactMap, ContactStatus, ContactAccessLevel, Credentials, ContactPhoto, ContactTrack, ContactType, Degrees, Document, ContactMapLayer, DateTime, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactMapMarkerType
CONVERT_BIN :== "/opt/local/bin/convert"
//CONVERT_BIN :== "/usr/bin/convert"
......
......@@ -4,6 +4,9 @@ import Incidone.OP.Concepts
import Text, Text.HTML
import iTasks.Extensions.DateTime
derive gDefault ContactGeo, CommunicationMean, NewCommunicationMean, ContactStatus, ContactAccessLevel, Credentials, ContactPhoto, ContactTrack, ContactType
derive gDefault DateTime, Contact, Degrees, CommunicationMeanType, Document
class contactTitle a :: a -> String
instance contactTitle Contact
where
......
......@@ -5,6 +5,8 @@ import Incidone.OP.IncidentManagementTasks
import Incidone.OP.ContactManagementTasks
import Incidone.OP.CommunicationManagementTasks
derive gDefault NewContact, IncidentShort, ContactType
generateTestIncident :: Bool -> Task IncidentNo
generateTestIncident closed
= randomChoice [YachtEngineProblems,YachtAground,Medevac]
......
......@@ -9,6 +9,7 @@ import Incidone.Util.SQLSDS
import Data.Functor, Data.Either, Data.Tuple, Data.Func
derive class iTask ContactFilter
derive gDefault PhoneCall, RadioCall, EmailMessage, P2000Message, WeatherData, PersonDetails, VesselDetails, SurferDetails, DiverDetails, AirplaneDetails, HelicopterDetails, CommunicationMean, WeatherType, Gender, VesselType, CommunicationMeanType, Feet, Knots, Meters, Temperature, Degrees, Miles
dbReadSDS :: String -> SDSSequence QueryDef [r] () | mbFromSQL r & TC r
dbReadSDS notifyId = databaseDef >++> sqlReadSDS notifyId
......
......@@ -22,6 +22,7 @@ import Text.HTML
| IncorrectDatabaseTables
derive class iTask DatabaseProblem
derive gDefault ContactMap, ContactMapLayer, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactTrack, ContactMapMarkerType, DateTime
configureIncidone :: [Workspace -> Task ()]
configureIncidone = map const [configureDatabase <<@ (Title "Database")
......
......@@ -9,6 +9,8 @@ import System.Directory, System.FilePath
import Cadastre.SDS, ChamberOfCommerce.SDS, Compensation.SDS, CivilAffairs.SDS
import StdArray, StdFile
derive gDefault Date
batchProcessing :: Task ()
batchProcessing
= pay
......
......@@ -12,8 +12,9 @@ playWithMaps = withShared ({defaultValue & icons = shipIcons, tilesUrls = ["/til
manipulateMap m
) <<@ ArrangeWithSideBar 0 LeftSide True @! ()
derive gDefault LeafletSimpleState, LeafletObjectID
manipulateMap :: (Shared sds (LeafletMap,LeafletSimpleState)) -> Task () | RWShared sds
manipulateMap m = updateSharedInformation () [UpdateUsing id (flip const) (customLeafletEditor eventHandlers)] m
manipulateMap m = updateSharedInformation () [UpdateUsing id (flip const) (customLeafletEditor eventHandlers defaultValue)] m
<<@ ApplyLayout (layoutSubUIs (SelectByPath [1]) (setUIAttributes (sizeAttr FlexSize FlexSize))) @! ()
where
eventHandlers = {simpleStateEventHandlers & onHtmlEvent = onHtmlEvent}
......
......@@ -18,7 +18,6 @@ derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
derive JSONDecode TraxTile
derive gDefault TraxTile
derive gEq TraxTile
derive gFDomain TraxTile
instance fromTuple TileEdge TileEdge TraxTile
......@@ -79,7 +78,6 @@ derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
derive JSONDecode Trax
derive gDefault Trax
derive gEq Trax
instance == Trax
instance zero Trax
......
......@@ -20,7 +20,6 @@ derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
derive JSONDecode TraxTile
derive gDefault TraxTile
gFDomain{|TraxTile|} = map fromTuple [(West,East),(North,South),(North,West),(North,East),(South,East),(South,West)]
instance fromTuple TileEdge TileEdge TraxTile where fromTuple (e1,e2) = {end1 = e1, end2 = e2}
instance toTuple TileEdge TileEdge TraxTile where toTuple tile = (tile.end1, tile.end2)
......@@ -121,7 +120,6 @@ derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
derive JSONDecode Trax
derive gDefault Trax
instance == Trax where == t1 t2 = sortBy fst_smaller t1.tiles == sortBy fst_smaller t2.tiles
gEq{|Trax|} t1 t2 = t1 == t2
instance zero Trax where zero = { tiles = [] }
......
......@@ -10,6 +10,4 @@ derive JSONEncode AnalogClock
derive JSONDecode AnalogClock
derive gEditor AnalogClock
derive gEq AnalogClock
derive gDefault AnalogClock
derive gText AnalogClock
......@@ -13,7 +13,6 @@ import StdEnv
derive JSONEncode AnalogClock
derive JSONDecode AnalogClock
derive gEq AnalogClock
derive gDefault AnalogClock
derive gText AnalogClock
gEditor{|AnalogClock|} = analogClockEditor
......
......@@ -51,7 +51,6 @@ instance < Date, Time, DateTime
derive JSONEncode Date, Time, DateTime
derive JSONDecode Date, Time, DateTime
derive gDefault Date, Time, DateTime
derive gEq Date, Time, DateTime
derive gText Date, Time, DateTime
derive gEditor Date, Time, DateTime
......
......@@ -13,7 +13,6 @@ derive class iTask EndEventType, Expression
derive gEditor EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gDefault EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gEq EndEvent, FailReason, FailedAssertion, CounterExample, Relation
compileTestModule :: CleanModuleName -> Task EndEvent
......
definition module iTasks.Extensions.Device.Features
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.SDS.Definition import :: SDSLens, :: SimpleSDSLens
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
......@@ -5,7 +5,7 @@ import iTasks.SDS.Sources.Store
import iTasks.Internal.SDS
from iTasks.WF.Tasks.SDS import get, set
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from Data.Maybe import :: Maybe
......
definition module iTasks.Extensions.Device.Location
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
definition module iTasks.Extensions.Distributed.Authentication
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -2,7 +2,7 @@ definition module iTasks.Extensions.Distributed.InteractionTasks
from iTasks.WF.Definition import class iTask
import iTasks.Internal.SDS
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
definition module iTasks.Extensions.Distributed.Task
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -4,7 +4,7 @@ import StdString
import StdInt
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from Data.Maybe import :: Maybe, maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint, instance toString UserConstraint, instance toUserConstraint User, instance toString UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -17,7 +17,6 @@ from iTasks.SDS.Combinators.Common import sdsFocus
from iTasks.UI.Editor import :: Editor
from iTasks.UI.Editor.Generic import generic gEditor
from iTasks.Internal.Generic.Visualization import generic gText, :: TextFormat
from iTasks.Internal.Generic.Defaults import generic gDefault
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.GenEq import generic gEq
......
......@@ -11,7 +11,7 @@ from StdFunc import const, o
import System.OS
from iTasks.WF.Definition import class iTask
from iTasks.Internal.Task import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from iTasks.Internal.Task import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint, instance toString UserConstraint, instance toUserConstraint User, instance toString UserConstraint, instance toString User
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -23,7 +23,6 @@ instance toString FileException
//Necessary generics to be able to handle documents in tasks
derive JSONEncode Document
derive JSONDecode Document
derive gDefault Document
derive gEq Document
derive gText Document
derive gEditor Document
......
......@@ -31,7 +31,6 @@ where
derive JSONEncode Document
derive JSONDecode Document
derive gDefault Document
derive gEq Document
instance toString Document
......
......@@ -11,6 +11,7 @@ ACE_DEFAULT_THEME :== "ace/theme/chrome"
ACE_DEFAULT_MODE :== "ace/mode/text"
derive class iTask AceState, AceRange
derive gDefault AceState, AceRange
derive gEditor AceOptions
derive gEq AceOptions
......
......@@ -6,8 +6,14 @@ from Data.Set import :: Set
leafletEditor :: Editor LeafletMap
//Customization of editors
customLeafletEditor :: (LeafletEventHandlers s) -> Editor (LeafletMap, s) | iTask s
/*
* Customization of editors
*
* @param handlers
* @param initial value
* @result editor
*/
customLeafletEditor :: (LeafletEventHandlers s) s -> Editor (LeafletMap, s) | iTask s
:: LeafletMap =
......
......@@ -730,11 +730,11 @@ where
toggle (LeafletObjectID "cursor") xs = xs //The cursor can't be selected
toggle x xs = if (isMember x xs) (removeMember x xs) ([x:xs])
customLeafletEditor :: (LeafletEventHandlers s) -> Editor (LeafletMap, s) | iTask s
customLeafletEditor handlers = leafEditorToEditor (customLeafletEditor` handlers)
customLeafletEditor :: (LeafletEventHandlers s) s -> Editor (LeafletMap, s) | iTask s
customLeafletEditor handlers initial = leafEditorToEditor (customLeafletEditor` handlers initial)
customLeafletEditor` ::(LeafletEventHandlers s) -> LeafEditor [LeafletEdit] (LeafletMap,s) (LeafletMap,s) | iTask s
customLeafletEditor` handlers =
customLeafletEditor` ::(LeafletEventHandlers s) s -> LeafEditor [LeafletEdit] (LeafletMap,s) (LeafletMap,s) | iTask s
customLeafletEditor` handlers initial =
{ LeafEditor
| genUI = genUI
, onEdit = onEdit
......@@ -744,7 +744,7 @@ customLeafletEditor` handlers =
where
genUI attributes datapath mode vst = case leafletEditor`.LeafEditor.genUI attributes datapath (mapEditMode fst mode) vst of
(Error e, vst) = (Error e, vst)
(Ok (ui,mapState),vst) = (Ok (ui,(mapState,defaultValue)),vst)
(Ok (ui,mapState),vst) = (Ok (ui,(mapState, initial)),vst)
onEdit datapath edit (mapState,customState) vst = case leafletEditor`.LeafEditor.onEdit datapath edit mapState vst of
(Error e, vst) = (Error e, vst)
......
definition module iTasks.Extensions.Picture.JPEG
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
......@@ -11,7 +11,6 @@ from Data.Map import :: Map
derive gText JPEGPicture
derive JSONEncode JPEGPicture
derive JSONDecode JPEGPicture
derive gDefault JPEGPicture
derive gEq JPEGPicture
derive gEditor JPEGPicture
......@@ -4,7 +4,7 @@ import StdString
from iTasks.Internal.IWorld import :: IWorld
from Data.Maybe import :: Maybe(..)
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
......@@ -19,7 +19,6 @@ from iTasks.WF.Combinators.Tune import <<@, class tune
derive gText JPEGPicture
derive JSONEncode JPEGPicture
derive JSONDecode JPEGPicture
derive gDefault JPEGPicture
derive gEq JPEGPicture
gEditor{|JPEGPicture|} = comapEditorValue (\(JPEGPicture val) -> ImgTag [SrcAttr val, AltAttr "no photo", StyleAttr ("max-width: 200px; max-height: 200px;")])
......
definition module iTasks.Internal.Distributed.Symbols
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
......@@ -9,6 +9,7 @@ from iTasks.UI.Definition import :: UIChange
from iTasks.UI.Editor import :: EditState
from iTasks.UI.Layout import :: LUI, :: LUIMoves, :: LUIMoveID, :: LUINo, :: LUIEffectStage
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.GenDefault import generic gDefault
from Data.Map import :: Map
from Data.Maybe import :: Maybe
from Data.Queue import :: Queue
......@@ -35,6 +36,7 @@ derive JSONDecode TIMeta, TIType, TIReduct, TaskTree
//Identification and classification information
, attributes :: !TaskAttributes //Arbitrary meta-data
}
derive gDefault TIMeta
:: TIType
= TIStartup
......
......@@ -15,6 +15,8 @@ import Data.Error, Data.Either
derive JSONEncode TIMeta, TIType, TIValue, TIReduct, TaskTree, ParallelTaskState, ParallelTaskChange, TaskResult, TaskEvalInfo, TonicOpts, CircularStack, AsyncAction
derive JSONDecode TIMeta, TIType, TIValue, TIReduct, TaskTree, ParallelTaskState, ParallelTaskChange, TaskResult, TaskEvalInfo, TonicOpts, CircularStack, AsyncAction
derive gDefault TIMeta, InstanceProgress, TIType, TaskId, ValueStatus
instance toString DeferredJSON where
toString (DeferredJSON x) = toString $ toJSON x
toString (DeferredJSONNode json) = toString json
......
......@@ -29,6 +29,7 @@ from System.Time import :: Timestamp
, includeProgress :: !Bool
, includeAttributes :: !Bool
}
derive gDefault InstanceFilter
:: InstanceData :== (!InstanceNo,!Maybe InstanceConstants,!Maybe InstanceProgress,!Maybe TaskAttributes)
......
......@@ -37,7 +37,8 @@ derive JSONEncode Queue, Event
derive JSONDecode TaskOutputMessage, TaskResult, TaskEvalInfo, TIValue, ParallelTaskState, ParallelTaskChange, TIUIState
derive JSONDecode Queue, Event
derive gDefault TIMeta, TIType
derive gDefault InstanceFilter
derive gEq ParallelTaskChange, TaskOutputMessage
derive gText ParallelTaskChange
derive class iTask InstanceFilter
......
......@@ -4,7 +4,7 @@ definition module iTasks.SDS.Combinators.Common
*/
import iTasks.SDS.Definition
from iTasks.WF.Definition import :: TaskException, :: TaskValue, :: TaskId, :: TaskAttributes, :: InstanceProgress, class iTask
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gDefault, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Combinators.Core import :: TaskList, :: TaskListFilter, :: TaskListItem, :: SharedTaskList
from iTasks.Internal.Generic.Visualization import :: TextFormat
from iTasks.UI.Editor import :: Editor
......
......@@ -10,7 +10,7 @@ from Text.GenJSON import :: JSONNode
from System.Time import :: Timespec
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gDefault, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.UI.Editor import :: Editor
from iTasks.Internal.Generic.Visualization import :: TextFormat
......@@ -30,4 +30,4 @@ sdsParallel :: !String !(p -> (p1,p2)) !((r1,r2) -> r) !(SDSLensWrite p w r1 w1)
sdsSequence :: !String !(p -> p1) !(p r1 -> p2) (p r1 -> Either r ((r1,r2) -> r)) !(SDSLensWrite p w r1 w1) !(SDSLensWrite p w r2 w2) !(sds1 p1 r1 w1) !(sds2 p2 r2 w2) -> SDSSequence p r w | gText{|*|} p1 & TC p1 & gText{|*|} p2 & TC p2 & TC r1 & TC r2 & TC w1 & TC w2 & RWShared sds1 & RWShared sds2
// Create a cached version of an SDS
sdsCache:: (p (Maybe r) (Maybe w) w -> (Maybe r, SDSCacheWrite)) (SDSSource p r w) -> SDSCache p r w | iTask p & TC r & TC w
\ No newline at end of file
sdsCache:: (p (Maybe r) (Maybe w) w -> (Maybe r, SDSCacheWrite)) (SDSSource p r w) -> SDSCache p r w | iTask p & TC r & TC w
......@@ -77,7 +77,7 @@ testEditorWithShare :: (Editor a) a Bool -> Task a | iTask a
*
* @param The name of the type to test (e.g. "Int" or "MyADT")
*/
testCommonInteractions :: String -> Task a | iTask a
testCommonInteractions :: String -> Task a | iTask, gDefault{|*|} a
/**
......
......@@ -97,7 +97,7 @@ testEditorWithShare editor model viewMode = (withShared model
,onRefresh = \r l v -> (l,r,Nothing)} editor @ snd
) <<@ ArrangeHorizontal
testCommonInteractions :: String -> Task a | iTask a
testCommonInteractions :: String -> Task a | iTask, gDefault{|*|} a
testCommonInteractions typeName
= enterInformation ("Enter","Enter information of type " +++ typeName) []
-||- updateInformation ("Update","Update default value of type " +++ typeName) [] defaultValue
......
......@@ -110,7 +110,7 @@ where
= step
(t st)
id
[ OnValue $ ifStable \st` -> get (sdsFocus {gDefault{|*|} & onlySelf=True} tlist) >>- \(_, [{TaskListItem|taskId}]) ->
[ OnValue $ ifStable \st` -> get (sdsFocus {defaultValue & onlySelf=True} tlist) >>- \(_, [{TaskListItem|taskId}]) ->
appendTask Embedded (par st` (Just taskId)) tlist @! st`
]
......
......@@ -64,6 +64,7 @@ ActionClose :== Action "Close"
, includeAttributes :: !Bool
, includeProgress :: !Bool
}
derive gDefault TaskListFilter
/**
* State of another task instance.
......
......@@ -66,6 +66,7 @@ derive gEq ParallelTaskChange
, includeAttributes :: !Bool
, includeProgress :: !Bool
}
derive gDefault TaskListFilter, TaskId
instance toString AttachException
where
......
......@@ -17,7 +17,6 @@ from System.Time import :: Timestamp, :: Timespec
from iTasks.UI.Editor import :: Editor
from iTasks.UI.Editor.Generic import generic gEditor
from iTasks.Internal.Generic.Visualization import generic gText, :: TextFormat
from iTasks.Internal.Generic.Defaults import generic gDefault
from Text.GenJSON import generic JSONEncode, generic JSONDecode
from Data.GenEq import generic gEq
from StdString import class toString, class fromString
......@@ -117,7 +116,6 @@ class iTask a
, JSONEncode{|*|}
, JSONDecode{|*|}
//Data
, gDefault{|*|}
, gEq{|*|}
, TC a
......@@ -20,11 +20,9 @@ from Text.HTML import :: SVGStrokeDashArray, :: SVGStrokeDashOffset, :: SVGStrok
//Common library types
derive gEq (->), Dynamic
derive gDefault HtmlAttr
derive gEditor HtmlAttr
derive gText HtmlAttr
derive gDefault SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gEditor SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gText SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
......@@ -36,7 +34,6 @@ derive class iTask TaskId, TaskListFilter, AttachmentStatus
derive JSONEncode TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive JSONDecode TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive gDefault TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, ClockParameter
derive gEq TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive gText TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action
......
......@@ -20,16 +20,13 @@ gEq{|Dynamic|} _ _ = False // dynamics are never equal
gEditor{|{}|} _ _ tjx fjx = emptyEditorWithDefaultInEnterMode_ (JSONEncode{|* -> *|} tjx) (JSONDecode{|* -> *|} fjx) {}
gText{|{}|} _ _ _ = []
derive gDefault SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gEditor SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gText SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gDefault HtmlAttr
derive gEditor HtmlAttr
derive gText HtmlAttr
derive JSONEncode TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter
derive JSONDecode TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter