@cyberismo/assets 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +702 -0
  2. package/README.md +1 -0
  3. package/dist/index.d.ts +21 -0
  4. package/dist/index.js +612 -0
  5. package/dist/schemas.d.ts +1132 -0
  6. package/dist/static/defaultReport/.schema +7 -0
  7. package/dist/static/defaultReport/index.adoc.hbs +3 -0
  8. package/dist/static/defaultReport/parameterSchema.json +18 -0
  9. package/dist/static/defaultReport/query.lp.hbs +2 -0
  10. package/package.json +30 -0
  11. package/src/calculations/common/base.lp +71 -0
  12. package/src/calculations/common/queryLanguage.lp +418 -0
  13. package/src/calculations/queries/card.lp +129 -0
  14. package/src/calculations/queries/onCreation.lp +44 -0
  15. package/src/calculations/queries/onTransition.lp +26 -0
  16. package/src/calculations/queries/tree.lp +6 -0
  17. package/src/calculations/test/model.lp +9 -0
  18. package/src/declarations.d.ts +9 -0
  19. package/src/graphvizReport/index.adoc.hbs +34 -0
  20. package/src/graphvizReport/query.lp.hbs +141 -0
  21. package/src/index.ts +52 -0
  22. package/src/schema/cardBaseSchema.json +76 -0
  23. package/src/schema/cardTreeDirectorySchema.json +663 -0
  24. package/src/schema/cardsConfigSchema.json +49 -0
  25. package/src/schema/csvSchema.json +30 -0
  26. package/src/schema/dotSchema.json +25 -0
  27. package/src/schema/macros/createCardsMacroSchema.json +39 -0
  28. package/src/schema/macros/graphMacroBaseSchema.json +17 -0
  29. package/src/schema/macros/reportMacroBaseSchema.json +13 -0
  30. package/src/schema/macros/scoreCardMacroSchema.json +24 -0
  31. package/src/schema/resources/cardTypeSchema.json +65 -0
  32. package/src/schema/resources/fieldTypeSchema.json +47 -0
  33. package/src/schema/resources/graphModelSchema.json +28 -0
  34. package/src/schema/resources/graphViewSchema.json +28 -0
  35. package/src/schema/resources/linkTypeSchema.json +56 -0
  36. package/src/schema/resources/reportSchema.json +28 -0
  37. package/src/schema/resources/templateSchema.json +28 -0
  38. package/src/schema/resources/workflowSchema.json +75 -0
  39. package/src/schema/schema.json +166 -0
  40. package/src/schemas.ts +54 -0
  41. package/src/static/defaultReport/.schema +7 -0
  42. package/src/static/defaultReport/index.adoc.hbs +3 -0
  43. package/src/static/defaultReport/parameterSchema.json +18 -0
  44. package/src/static/defaultReport/query.lp.hbs +2 -0
package/dist/index.js ADDED
@@ -0,0 +1,612 @@
1
+ var e={title:"Card",$id:"cardBaseSchema",description:"Cards represent different types of tickets, issues and documents. All cards must be valid against this parent schema.",type:"object",additionalProperties:!0,properties:{cardType:{type:"string",minLength:1,description:"The name of the card type",pattern:"^[A-Za-z]*/?[A-Za-z]*/?[A-Za-z-_]+$"},title:{type:"string",minLength:1,description:"A short title of the card"},workflowState:{type:"string",description:"the name of the card's current state in the workflow"},rank:{type:"string",description:"The rank of the card in relative to its siblings"},lastTransitioned:{type:"string",format:"date-time",description:"The date and time of the last transition of the card"},lastUpdated:{type:"string",format:"date-time",description:"The date and time of the last update of the card"},labels:{type:"array",description:"Labels or tags that can be used for organising cards",items:{type:"string",minLength:1}},links:{type:"array",description:"links to or from this card to other cards",items:{type:"object",properties:{cardKey:{type:"string",minLength:3,maxLength:20,pattern:"^[a-z]+_[0-9a-z]+$"},linkType:{description:"The name of the link type. For example, 'base/linkTypes/causes'",type:"string"},linkDescription:{type:"string",description:"A description of the link"}},required:["cardKey","linkType"],additionalProperties:!1}},templateCardKey:{type:"string",description:"Card key from which this card has been instantiated"}},required:["title","cardType","workflowState","rank"]};var i={title:"CardsConfig",$id:"cardsConfigSchema",description:"General configuration settings for the card tree.",type:"object",additionalProperties:!1,properties:{cardKeyPrefix:{type:"string",description:"The prefix or the fist component of the card key. For example, ABC",pattern:"^[a-z]+$",minLength:3,maxLength:10},name:{description:"Name of the project",type:"string",minLength:1,pattern:"^[A-Za-z ._-]+$"},modules:{description:"List of modules that have been included in the project",type:"array",items:{type:"object",properties:{name:{description:"Module name (project prefix). Must be unique.",type:"string"},location:{description:"URI that is either a git URL with HTTPS, or relative file reference",type:"string"},branch:{description:"If using git URL in 'location' defines git branch. If empty, assumed to be 'main'. ",type:"string"},private:{description:"If true, the module is private and requires credentials (CYBERISMO_GIT_USER / CYBERISMO_GIT_TOKEN)",type:"boolean"}},required:["name","location"]}}},required:["cardKeyPrefix"]};var t={title:"Cardtype",$id:"cardTypeSchema",description:"Card type defines the workflow and optional additional fields for the cards.",type:"object",additionalProperties:!1,properties:{name:{description:"The name of the card type",type:"string",minLength:1,pattern:"^[A-Za-z0-9]*/?[A-Za-z]*/?[A-Za-z-_]+[.json]*$"},description:{description:"A description that describes the card type",type:"string"},displayName:{description:"A name by which the card type is referred to in the user interface",type:"string"},workflow:{description:"The name of the workflow",type:"string",minLength:1,pattern:"^[A-Za-z0-9]*/?[A-Za-z0-9]*/?[A-Za-z-_]+[.json]*$"},customFields:{type:"array",items:{type:"object",additionalProperties:!1,properties:{name:{description:"The technical name by which the field is referred to in JSON files.",type:"string"},displayName:{description:"A name by which the field is referred to in the user interface.",type:"string"},isCalculated:{description:"Defines if field value is a calculated field.",type:"boolean",default:!0}},required:["name"]}},alwaysVisibleFields:{type:"array",items:{type:"string"}},optionallyVisibleFields:{type:"array",items:{type:"string"}}},required:["displayName","name","workflow"]};var n={type:"object",$id:"createCardsMacroSchema",properties:{buttonLabel:{type:"string",description:"The label of the button to create from this template. For example, 'Create a New Decision'."},template:{type:"string",description:"The name of the template"},cardKey:{type:"string",description:"The card key of the parent under which the template should be instantiated. If not given, the template will be instantiated under the card that includes this macro."},link:{type:"object",properties:{linkType:{type:"string",description:"Name of the link type to create"},direction:{type:"string",description:"Direction of the link. Can be 'inbound' or 'outbound'."},cardKey:{type:"string",description:"Either the source of an inbound link or the target of an outbound link"}},additionalProperties:!1,required:["linkType","direction","cardKey"]}},additionalProperties:!1,required:["buttonLabel","template"]};var r={title:"Csv content",$id:"csvSchema",description:"Contains the content of a CSV file as an array of objects. Each object represents a row in the CSV file.",type:"array",items:{type:"object",additionalProperties:!0,properties:{title:{type:"string",minLength:1,description:"The title of the card"},template:{type:"string",minLength:1,description:"the name of the template for creating the card. Notice that the template must have exactly one card"},description:{type:"string",description:"The AsciiDoc contents of the card"},labels:{type:"string"}},required:["title","template"]}};var a={title:"Dot Schema",$id:"dotSchema",description:"Schema of the .schema ",type:"array",items:{type:"object",additionalProperties:!1,properties:{version:{description:"Version of the schema",type:"number"},file:{description:"File that is being validated. If empty, validates all json using the schema in the directory.",type:"string"},id:{description:"Id of the schema that is used to validate the given file",type:"string"}},required:["version","id"]}};var o={title:"FieldType",$id:"fieldTypeSchema",description:"Field type defines the workflow and optional additional fields for the cards.",type:"object",additionalProperties:!1,properties:{name:{type:"string",description:"The technical name by which the field is referred to in JSON files."},displayName:{type:"string",description:"A name by which the field is referred to in the user interface."},description:{type:"string",description:"A description that describes the field type"},dataType:{type:"string",description:"",pattern:"^shortText$|^longText$|^number$|^integer$|^boolean$|^enum$|^list$|^date$|^dateTime$|^person$"},enumValues:{description:"An array of available enum values. Used for the enum fieldType only.",type:"array",items:{type:"object",additionalProperties:!1,properties:{enumValue:{type:"string"},enumDisplayValue:{type:"string"},enumDescription:{type:"string"}},required:["enumValue"]}}},required:["displayName","name","dataType"]};var l={title:"Graph",$id:"graphMacroBaseSchema",description:"A graph object provides supplemental information about a graph",type:"object",properties:{model:{description:"Model",type:"string"},view:{description:"View",type:"string"}},required:["model","view"]};var d={title:"GraphModel",$id:"graphModelSchema",description:"A graph model object provides data for graph views",type:"object",properties:{name:{description:"The name of this graph model",type:"string",minLength:1,pattern:"^[A-Za-z0-9/._-]+$"},displayName:{description:"The name of the graph model as it should be displayed in the user interface. For example, 'Workflow data'.",type:"string"},description:{description:"A description of the graph model. For example, 'Workflow data defines necessary data elements to show workflow graphically.'.",type:"string"},category:{description:"The category of the graph model. For example, 'UserModels'.",type:"string"}},required:["displayName","name","displayName"],additionalProperties:!1};var s={title:"GraphView",$id:"graphViewSchema",description:"A graph view object provides means to show graph model data to users",type:"object",properties:{name:{description:"The name of this graph view",type:"string",minLength:1,pattern:"^[A-Za-z0-9/._-]+$"},displayName:{description:"The name of the graph view as it should be displayed in the user interface. For example, 'Workflow view'.",type:"string"},description:{description:"A description of the graph view. For example, 'Workflow view defines ways how to show workflow data to the user'.",type:"string"},category:{description:"The category of the graph view. For example, 'UserViews'.",type:"string"}},required:["displayName","name","displayName"],additionalProperties:!1};var p={title:"LinkType",$id:"linkTypeSchema",description:"Link types defined different ways to link cards together.",type:"object",additionalProperties:!1,properties:{description:{description:"A description that describes the link type",type:"string"},displayName:{description:"A name by which the link type is referred to in the user interface",type:"string"},name:{type:"string",description:"The technical name by which the field is referred to in JSON files."},outboundDisplayName:{type:"string",description:"A name by which the field is referred to in the user interface(from-to)."},inboundDisplayName:{type:"string",description:"A name by which the field is referred to in the user interface(to-from)."},sourceCardTypes:{type:"array",description:"The card types that can be the source of this link type. If empty, all card types are allowed.",items:{type:"string"}},destinationCardTypes:{type:"array",description:"The card types that can be the target of this link type. If empty, all card types are allowed.",items:{type:"string"}},enableLinkDescription:{type:"boolean",description:"If true, the user can add a description to the link."}},required:["displayName","name","outboundDisplayName","inboundDisplayName","sourceCardTypes","destinationCardTypes","enableLinkDescription"]};var c={title:"Report",$id:"reportMacroBaseSchema",description:"A report object provides supplemental information about a report",type:"object",properties:{name:{description:"The name of the report",type:"string"}},required:["name"]};var y={title:"Report",$id:"reportSchema",description:"A report object provides supplemental information about a report",type:"object",properties:{name:{description:"The name of this report",type:"string",minLength:1,pattern:"^[A-Za-z0-9/._-]+$"},displayName:{description:"The name of the report as it should be displayed in the user interface. For example, 'Children list'.",type:"string"},description:{description:"A description of the report. For example, 'A Children list shows the child cards as an unordered list.'.",type:"string"},category:{description:"The category of the report. For example, 'Architecture'.",type:"string"}},required:["name","displayName","category"],additionalProperties:!1};var u={$schema:"http://json-schema.org/draft-07/schema#",$id:"jsonSchema",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var h={type:"object",$id:"scoreCardMacroSchema",properties:{title:{type:"string",description:"Title text on top of the card (optional)"},value:{type:"number",description:"Value shown as content of the card"},unit:{type:"string",description:"Unit shown after the value (optional)"},legend:{type:"string",description:"Description text shown below the value (optional)"}},additionalProperties:!1,required:["value"]};var f={title:"Template",$id:"templateSchema",description:"A template object provides supplemental information about a template directory structure ",type:"object",additionalProperties:!1,properties:{name:{description:"The name of this template",type:"string",minLength:1,pattern:"^[A-Za-z0-9/._-]+$"},displayName:{description:"The name of the template as it should be displayed in the user interface. For example, 'Decision'.",type:"string"},description:{description:"A description of the template. For example, 'A decision is a choice between two or more options.'.",type:"string"},category:{description:"The category of the template. For example, 'Decision'.",type:"string"}},required:["displayName","name"]};var m={title:"Workflow",$id:"workflowSchema",description:"A state machine for the workflow of cards",type:"object",additionalProperties:!1,properties:{description:{description:"A description that describes the workflow",type:"string"},displayName:{description:"A name by which the workflow is referred to in the user interface",type:"string"},name:{description:"The name of this workflow",type:"string",minLength:1,pattern:"^[A-Za-z0-9/._-]+$"},states:{description:"The states of the workflow",type:"array",items:{type:"object",additionalProperties:!1,properties:{name:{description:"The name of a workflow state",type:"string",minLength:1,pattern:"^[A-Za-z ._-]+$"},category:{description:"The category of a workflow state",enum:["none","initial","active","closed"]}},required:["name","category"]}},transitions:{description:"The state transitions of the workflow",type:"array",items:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,pattern:"^[A-Za-z. _-]+$"},fromState:{description:"List of states where state transition can start from",type:"array",items:{description:"The name of the starting state of the transition. The wildcard '*' denotes any state and and empty value denotes the transition to create a new card with this workflow.",type:"string",pattern:"^[*]|^$|^[A-Za-z ._-]+$"}},toState:{description:"The name of the end state of the transition",type:"string",pattern:"^[*]|^$|^[A-Za-z ._-]+$"}},required:["name","fromState","toState"]}}},required:["displayName","name","states","transitions"]};var g={title:"Card directory tree schema",$id:"cardTreeDirectorySchema",description:"This schema represents the directory structure of a card tree, using the format of https://github.com/jpoehnelt/directory-schema-validator",type:"object",properties:{directories:{type:"object",properties:{".cards":{description:"Configuration for the card tree",type:"object",properties:{files:{type:"object",additionalProperties:!1},directories:{type:"object",additionalProperties:!1,properties:{modules:{$ref:"#/$defs/cardModuleSchema"},local:{type:"object",properties:{files:{type:"object",additionalProperties:!1,properties:{".schema":{},"cardsConfig.json":{}},required:[".schema","cardsConfig.json"]},directories:{type:"object",additionalProperties:!1,properties:{calculations:{$ref:"#/$defs/calculationResourceSchema"},cardTypes:{$ref:"#/$defs/cardTypeResourceSchema"},fieldTypes:{$ref:"#/$defs/fieldTypeResourceSchema"},graphViews:{$ref:"#/$defs/graphViewResourceSchema"},graphModels:{$ref:"#/$defs/graphModelResourceSchema"},linkTypes:{$ref:"#/$defs/linkTypeResourceSchema"},reports:{$ref:"#/$defs/reportResourceSchema"},templates:{$ref:"#/$defs/templatesResourceSchema"},workflows:{$ref:"#/$defs/workflowResourceSchema"}}}}}},required:["local"]}}},cardRoot:{description:"The contents of the card tree. Each subdirectory contains a top level card. The name of the directory is the card key.",type:"object",properties:{files:{type:"object",additionalProperties:!1,properties:{".gitkeep":{},".schema":{}}},directories:{type:"object",additionalProperties:!1,patternProperties:{"^[a-z]+_[0-9a-z]+$":{$ref:"#/$defs/cardDirectorySchema#"}}}}},".calc":{description:"Temporary files for calculations.",type:"object",properties:{directories:{type:"object",properties:{resources:{description:"Schema of the .calc resource folder",type:"object",properties:{files:{type:"object",additionalProperties:!1,patternProperties:{"^.+\\.lp$":{type:"object"}}}}},cards:{description:"Directory that contains separate logic program files for each card",type:"object",properties:{files:{type:"object",additionalProperties:!1,patternProperties:{"^.+\\.lp$":{type:"object"}}}}}},additionalProperties:!1},files:{type:"object",properties:{"base.lp":{description:"A logic program that contains basic common definitions that are the same in all cards projects",type:"object"},"calculations.lp":{description:"A logic program that only includes all the logic programs from modules, including the calculations from the local content",type:"object"},"cardTree.lp":{description:"A logic program that only includes all the card-specific logic programs",type:"object"},"resourceImports.lp":{description:"A logic program that only includes all the logic programs generated from resources",type:"object"},"main.lp":{description:"The main logic program",type:"object"},"modules.lp":{description:"",type:"object"},"queryLanguage.lp":{description:"A logic program that defines the Cyberismo query language",type:"object"}},additionalProperties:!0}}}},required:[".cards","cardRoot"]}},$defs:{cardModuleSchema:{description:"The schema for modules. Each module is in a named directory containing 'cardTypes', 'templates' and 'workflows'. ",type:"object",properties:{directories:{type:"object",patternProperties:{"^[A-Za-z ._-]+$":{type:"object",properties:{directories:{type:"object",properties:{calculations:{$ref:"#/$defs/calculationResourceSchema"},cardTypes:{$ref:"#/$defs/cardTypeResourceSchema"},fieldTypes:{$ref:"#/$defs/fieldTypeResourceSchema"},graphViews:{$ref:"#/$defs/graphViewResourceSchema"},graphModels:{$ref:"#/$defs/graphModelResourceSchema"},linkTypes:{$ref:"#/$defs/linkTypeResourceSchema"},reports:{$ref:"#/$defs/reportResourceSchema"},templates:{$ref:"#/$defs/templatesResourceSchema"},workflows:{$ref:"#/$defs/workflowResourceSchema"}}},files:{type:"object",additionalProperties:!1,properties:{".schema":{},"cardsConfig.json":{type:"object"}},required:["cardsConfig.json",".schema"]}}}}}}},cardDirectorySchema:{description:"The directory schema of a card, using the format of https://github.com/jpoehnelt/directory-schema-validator",type:"object",properties:{name:{description:"The name of the card directory is the card key",type:"string",minLength:5,maxLength:20,pattern:"^[a-z]+_[0-9a-z]+$"},files:{type:"object",additionalProperties:!1,properties:{".schema":{},"index.json":{description:"The fields of the card. This file must validate against both the cardBaseSchema.json and the custom fields of its card type",type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"cardBaseSchema.json"},"index.adoc":{description:"The description field of the card as an Asciidoc file",type:"object"},"index.lp":{description:"Calculations specific to the card",type:"object"}},required:["index.json","index.adoc"]},directories:{type:"object",additionalProperties:!1,properties:{a:{description:"A directory for file attachments of the card",type:"object",properties:{directories:{type:"object",additionalProperties:!1}}},c:{description:"A directory for child cards",type:"object",properties:{directories:{$ref:"#/$defs/cardDirectorySchema#"}}}}}}},calculationResourceSchema:{type:"object",properties:{directories:{type:"object",additionalProperties:!1},files:{type:"object",$comment:"Each file must be a logic program file",additionalProperties:!1,patternProperties:{"^.+\\.lp$":{type:"object"}},properties:{".gitkeep":{}}}}},cardTypeResourceSchema:{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1}}},{properties:{files:{type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"cardTypeSchema.json"}}},{properties:{files:{type:"object",properties:{".schema":{},".gitkeep":{}},required:[".schema"]}}}]},fieldTypeResourceSchema:{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1}}},{properties:{files:{type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"cardTypeSchema.json"}}},{properties:{files:{type:"object",properties:{".schema":{},".gitkeep":{}},required:[".schema"]}}}]},graphViewResourceSchema:{type:"object",properties:{additionalProperties:!1,directories:{type:"object",additionalProperties:!1,patternProperties:{".+":{type:"object",properties:{files:{type:"object",properties:{"view.lp.hbs":{type:"object"},"parameterSchema.json":{type:"object"}},required:["view.lp.hbs"]}}}}}}},graphModelResourceSchema:{type:"object",properties:{additionalProperties:!1,directories:{type:"object",additionalProperties:!1,patternProperties:{".+":{type:"object",properties:{files:{type:"object",properties:{"model.lp":{type:"object"}},required:["model.lp"]}}}}}}},linkTypeResourceSchema:{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1}}},{properties:{files:{type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"linkTypeSchema.json"}}},{properties:{files:{type:"object",properties:{".schema":{},".gitkeep":{}},required:[".schema"]}}}]},reportResourceSchema:{type:"object",properties:{additionalProperties:!1,files:{$comment:"reports folder can contain report configuration files (<name>.json), or .gitkeep",type:"object",additionalProperties:!1,patternProperties:{"^[A-Za-z0-9-_]+.json$":{type:"object"},"^.schema$":{type:"object"},"^.gitkeep$":{type:"object"}}},directories:{type:"object",additionalProperties:!1,patternProperties:{".+":{type:"object",properties:{files:{type:"object",additionalProperties:!1,properties:{"index.adoc.hbs":{type:"object"},"query.lp.hbs":{type:"object"},"parameterSchema.json":{type:"object"},".schema":{type:"object"}},required:[".schema","index.adoc.hbs","query.lp.hbs"]}}}}}}},workflowResourceSchema:{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1}}},{properties:{files:{type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"workflowSchema.json"}}},{properties:{files:{type:"object",properties:{".schema":{},".gitkeep":{}},required:[".schema"]}}}]},templatesResourceSchema:{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1,patternProperties:{".+":{type:"object",allOf:[{properties:{directories:{type:"object",additionalProperties:!1,properties:{c:{description:"Each subdirectory is a card.",type:"object",properties:{directories:{type:"object",additionalProperties:!1,patternProperties:{"^[a-z]+_[0-9a-z]+$":{$ref:"#/$defs/cardDirectorySchema#"}}},files:{type:"object",additionalProperties:!1,properties:{".schema":{}}}}}}}}},{properties:{files:{type:"object",additionalProperties:!1,properties:{".gitkeep":{}}}}}]}}}}},{properties:{files:{$comment:"templates folder can contain template configuration files (<name>.json), content schema files (.schema) or .gitkeep",type:"object",additionalProperties:!1,patternProperties:{"^[A-Za-z0-9-_]+.json$":{type:"object",$comment:"Each file needs to be separately validated against 'contentSchema'",contentSchema:"templateSchema.json"},"^.schema$":{type:"object"},"^.gitkeep$":{type:"object"}}}}},{properties:{files:{type:"object",properties:{".schema":{},".gitkeep":{}},required:[".schema"]}}}]}}};var Ke=[e,i,t,n,r,a,o,l,d,s,p,c,y,u,h,f,m],Ae=g;var T=`ancestor(A, C) :- parent(A, C), card(A), card(C).
2
+ ancestor(A, C) :- parent(A, C), card(A), template(C).
3
+ ancestor(A, C) :- parent(A, B), ancestor (B, C), card(A), card(B), card(C).
4
+ ancestor(A, C) :- parent(A, B), ancestor (B, C), card(A), card(B), template(C).
5
+ card(C) :- field(C, "cardType", _).
6
+ projectCard(C) :- card(C), field(C, "container", "project").
7
+ templateCard(C) :- card(C), field(C, "container", "template").
8
+ dataType(Card, "lastUpdated", "dateTime") :-
9
+ field(Card, "lastUpdated", _).
10
+ field(Card, "workflowStateCategory", Category) :-
11
+ card(Card),
12
+ field(Card, "workflowState", State),
13
+ field(Card, "cardType", CardType),
14
+ field(CardType, "workflow", Workflow),
15
+ workflowState(Workflow, State, Category).
16
+ dataType(Key, Field, DataType) :-
17
+ field(Key, Field, _),
18
+ fieldType(Field),
19
+ field(Field, "dataType", DataType).
20
+ dataType((FieldType, EnumValue), "index", "integer") :-
21
+ enumValue(FieldType, EnumValue).
22
+ dataType((FieldType, EnumValue), "enumDisplayValue", "shortText") :-
23
+ enumValue(FieldType, EnumValue).
24
+ dataType((FieldType, EnumValue), "enumDescription", "longText") :-
25
+ enumValue(FieldType, EnumValue).
26
+ dataType((FieldType, EnumValue), "enumValue", "longText") :-
27
+ enumValue(FieldType, EnumValue).
28
+ hiddenInTreeView(Card) :-
29
+ ancestor(Card, Ancestor),
30
+ hiddenInTreeView(Ancestor).
31
+ field(Card, "progress", Progress) :- field(Card, "base/fieldTypes/progress", Progress).
32
+ link(Source, Destination, LinkType) :- userLink(Source, Destination, LinkType).
33
+ link(Source, Destination, LinkType, LinkDescription) :- userLink(Source, Destination, LinkType, LinkDescription).
34
+ calculatedLink(Source, Destination, LinkType) :-
35
+ link(Source, Destination, LinkType),
36
+ not userLink(Source, Destination, LinkType).
37
+ calculatedLink(Source, Destination, LinkType, LinkDescription) :-
38
+ link(Source, Destination, LinkType, LinkDescription),
39
+ not userLink(Source, Destination, LinkType, LinkDescription).
40
+ `;var F=`select(N, Collection, Field) :- select(Field), resultLevel(_, N, Collection).
41
+ selectAll(N) :- selectAll, resultLevel(_, N, _).
42
+ select(N, Collection, Field) :-
43
+ selectCollectionField(Collection, Field),
44
+ resultLevel(_, N, Collection).
45
+ childResult(Key, Child, "results") :- childResult(Key, Child).
46
+ resultLevel(Key, 1, "results") :- result(Key).
47
+ resultLevel(Child, N+1, Collection) :- childResult(Key, Child, Collection), resultLevel(Key, N, _).
48
+ #show result(Key) : result(Key), not queryError.
49
+ #show childResult(Key, Child, Collection) : childResult(Key, Child, Collection), not queryError.
50
+ resultOrChildResult(Key) :- result(Key).
51
+ resultOrChildResult(Key) :- childResult(_, Key, _).
52
+ showAll(Key) :-
53
+ resultOrChildResult(Key),
54
+ resultLevel(Key, Level, _),
55
+ selectAll(Level),
56
+ not queryError.
57
+ showField(Key, Field) :-
58
+ resultOrChildResult(Key),
59
+ resultLevel(Key, Level, _),
60
+ select(Level, Field),
61
+ not queryError.
62
+ showField(Key, Field) :-
63
+ resultOrChildResult(Key),
64
+ resultLevel(Key, Level, Collection),
65
+ select(Level, Collection, Field),
66
+ not queryError.
67
+ #show field(Key, Field, Value, DataType) :
68
+ field(Key, Field, Value),
69
+ dataType(Key, Field, DataType),
70
+ DataType != "enum",
71
+ DataType != "list",
72
+ showField(Key, Field).
73
+ #show field(Key, Field, Value, DataType) :
74
+ field(Key, Field, Value),
75
+ dataType(Key, Field, DataType),
76
+ DataType != "enum",
77
+ DataType != "list",
78
+ showAll(Key).
79
+ #show field(Key, Field, Value, "shortText") :
80
+ field(Key, Field, Value),
81
+ not dataType(Key, Field, _),
82
+ showField(Key, Field).
83
+ #show field(Key, Field, Value, "shortText") :
84
+ field(Key, Field, Value),
85
+ not dataType(Key, Field, _),
86
+ showAll(Key).
87
+ #show enumField(Key, Field, Value, Index, DisplayValue) :
88
+ field(Key, Field, Value),
89
+ dataType(Key, Field, "enum"),
90
+ field((Field, Value), "index", Index),
91
+ field((Field, Value), "enumDisplayValue", DisplayValue),
92
+ showField(Key, Field).
93
+ #show enumField(Key, Field, Value, Index, Value) :
94
+ field(Key, Field, Value),
95
+ dataType(Key, Field, "enum"),
96
+ field((Field, Value), "index", Index),
97
+ not field((Field, Value), "enumDisplayValue", _),
98
+ showField(Key, Field).
99
+ #show enumField(Key, Field, Value) :
100
+ field(Key, Field, Value),
101
+ dataType(Key, Field, "enum"),
102
+ not field((Field, Value), "index", _),
103
+ not field((Field, Value), "enumDisplayValue", _),
104
+ showField(Key, Field).
105
+ #show enumField(Key, Field, Value, Index, DisplayValue) :
106
+ field(Key, Field, Value),
107
+ dataType(Key, Field, "enum"),
108
+ field((Field, Value), "index", Index),
109
+ field((Field, Value), "enumDisplayValue", DisplayValue),
110
+ showAll(Key).
111
+ #show enumField(Key, Field, Value, Index, Value) :
112
+ field(Key, Field, Value),
113
+ dataType(Key, Field, "enum"),
114
+ field((Field, Value), "index", Index),
115
+ not field((Field, Value), "enumDisplayValue", _),
116
+ showAll(Key).
117
+ #show enumField(Key, Field, Value) :
118
+ field(Key, Field, Value),
119
+ dataType(Key, Field, "enum"),
120
+ not field((Field, Value), "index", _),
121
+ not field((Field, Value), "enumDisplayValue", _),
122
+ showAll(Key).
123
+ #show listField(Key, Field, Value, Index, DisplayValue) :
124
+ field(Key, Field, Value),
125
+ dataType(Key, Field, "list"),
126
+ field((Field, Value), "index", Index),
127
+ field((Field, Value), "enumDisplayValue", DisplayValue),
128
+ showField(Key, Field).
129
+ #show listField(Key, Field, Value, Index, Value) :
130
+ field(Key, Field, Value),
131
+ dataType(Key, Field, "list"),
132
+ field((Field, Value), "index", Index),
133
+ not field((Field, Value), "enumDisplayValue", _),
134
+ showField(Key, Field).
135
+ #show listField(Key, Field, Value) :
136
+ field(Key, Field, Value),
137
+ dataType(Key, Field, "list"),
138
+ not field((Field, Value), "index", _),
139
+ not field((Field, Value), "enumDisplayValue", _),
140
+ showField(Key, Field).
141
+ #show listField(Key, Field, Value, Index, DisplayValue) :
142
+ field(Key, Field, Value),
143
+ dataType(Key, Field, "list"),
144
+ field((Field, Value), "index", Index),
145
+ field((Field, Value), "enumDisplayValue", DisplayValue),
146
+ showAll(Key).
147
+ #show listField(Key, Field, Value, Index, Value) :
148
+ field(Key, Field, Value),
149
+ dataType(Key, Field, "list"),
150
+ field((Field, Value), "index", Index),
151
+ not field((Field, Value), "enumDisplayValue", _),
152
+ showAll(Key).
153
+ #show listField(Key, Field, Value) :
154
+ field(Key, Field, Value),
155
+ dataType(Key, Field, "list"),
156
+ not field((Field, Value), "index", _),
157
+ not field((Field, Value), "enumDisplayValue", _),
158
+ showAll(Key).
159
+ #show label(Key, Label) :
160
+ label(Key, Label),
161
+ showField(Key, "labels").
162
+ #show label(Key, Label) :
163
+ label(Key, Label),
164
+ showAll(Key).
165
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "user", LinkDescription) :
166
+ userLink(Source, Destination, LinkType, LinkDescription),
167
+ field(Destination, "title", DestinationTitle),
168
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
169
+ showField(Source, "links").
170
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "user", LinkDescription) :
171
+ userLink(Source, Destination, LinkType, LinkDescription),
172
+ field(Source, "title", SourceTitle),
173
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
174
+ showField(Destination, "links").
175
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "user", LinkDescription) :
176
+ userLink(Source, Destination, LinkType, LinkDescription),
177
+ field(Destination, "title", DestinationTitle),
178
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
179
+ showAll(Source).
180
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "user", LinkDescription) :
181
+ userLink(Source, Destination, LinkType, LinkDescription),
182
+ field(Source, "title", SourceTitle),
183
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
184
+ showAll(Destination).
185
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "user") :
186
+ userLink(Source, Destination, LinkType),
187
+ field(Destination, "title", DestinationTitle),
188
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
189
+ showField(Source, "links").
190
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "user") :
191
+ userLink(Source, Destination, LinkType),
192
+ field(Source, "title", SourceTitle),
193
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
194
+ showField(Destination, "links").
195
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "user") :
196
+ userLink(Source, Destination, LinkType),
197
+ field(Destination, "title", DestinationTitle),
198
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
199
+ showAll(Source).
200
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "user") :
201
+ userLink(Source, Destination, LinkType),
202
+ field(Source, "title", SourceTitle),
203
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
204
+ showAll(Destination).
205
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "calculated", LinkDescription) :
206
+ calculatedLink(Source, Destination, LinkType, LinkDescription),
207
+ field(Destination, "title", DestinationTitle),
208
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
209
+ showField(Source, "links").
210
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "calculated", LinkDescription) :
211
+ calculatedLink(Source, Destination, LinkType, LinkDescription),
212
+ field(Source, "title", SourceTitle),
213
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
214
+ showField(Destination, "links").
215
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "calculated", LinkDescription) :
216
+ calculatedLink(Source, Destination, LinkType, LinkDescription),
217
+ field(Destination, "title", DestinationTitle),
218
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
219
+ showAll(Source).
220
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "calculated", LinkDescription) :
221
+ calculatedLink(Source, Destination, LinkType, LinkDescription),
222
+ field(Source, "title", SourceTitle),
223
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
224
+ showAll(Destination).
225
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "calculated") :
226
+ calculatedLink(Source, Destination, LinkType),
227
+ field(Destination, "title", DestinationTitle),
228
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
229
+ showField(Source, "links").
230
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "calculated") :
231
+ calculatedLink(Source, Destination, LinkType),
232
+ field(Source, "title", SourceTitle),
233
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
234
+ showField(Destination, "links").
235
+ #show link(Source, Destination, DestinationTitle, LinkType, OutboundDisplayName, "outbound", "calculated") :
236
+ calculatedLink(Source, Destination, LinkType),
237
+ field(Destination, "title", DestinationTitle),
238
+ field(LinkType, "outboundDisplayName", OutboundDisplayName),
239
+ showAll(Source).
240
+ #show link(Destination, Source, SourceTitle, LinkType, InboundDisplayName, "inbound", "calculated") :
241
+ calculatedLink(Source, Destination, LinkType),
242
+ field(Source, "title", SourceTitle),
243
+ field(LinkType, "inboundDisplayName", InboundDisplayName),
244
+ showAll(Destination).
245
+ #show notification(Key, Category, Title, Message) :
246
+ notification(Key, Category, Title, Message),
247
+ showField(Key, "notifications").
248
+ #show notification(Key, Category, Title, Message) :
249
+ notification(Key, Category, Title, Message),
250
+ showAll(Key).
251
+ #show policyCheckFailure(Key, Category, Title, ErrorMessage, Field) :
252
+ policyCheckFailure(Key, Category, Title, ErrorMessage, Field),
253
+ showField(Key, "policyChecks").
254
+ #show policyCheckFailure(Key, Category, Title, ErrorMessage, Field) :
255
+ policyCheckFailure(Key, Category, Title, ErrorMessage, Field),
256
+ showAll(Key).
257
+ #show policyCheckFailure(Key, Category, Title, ErrorMessage) :
258
+ policyCheckFailure(Key, Category, Title, ErrorMessage),
259
+ showField(Key, "policyChecks").
260
+ #show policyCheckFailure(Key, Category, Title, ErrorMessage) :
261
+ policyCheckFailure(Key, Category, Title, ErrorMessage),
262
+ showAll(Key).
263
+ #show policyCheckSuccess(Key, Category, Title) :
264
+ policyCheckSuccess(Key, Category, Title),
265
+ showField(Key, "policyChecks").
266
+ #show policyCheckSuccess(Key, Category, Title) :
267
+ policyCheckSuccess(Key, Category, Title),
268
+ showAll(Key).
269
+ #show transitionDenied(Key, Transition, ErrorMessage) :
270
+ transitionDenied(Key, Transition, ErrorMessage),
271
+ showField(Key, "deniedOperations").
272
+ #show transitionDenied(Key, Transition, ErrorMessage) :
273
+ transitionDenied(Key, Transition, ErrorMessage),
274
+ showAll(Key).
275
+ #show movingCardDenied(Key, ErrorMessage) :
276
+ movingCardDenied(Key, ErrorMessage),
277
+ showField(Key, "deniedOperations").
278
+ #show movingCardDenied(Key, ErrorMessage) :
279
+ movingCardDenied(Key, ErrorMessage),
280
+ showAll(Key).
281
+ #show deletingCardDenied(Key, ErrorMessage) :
282
+ deletingCardDenied(Key, ErrorMessage),
283
+ showField(Key, "deniedOperations").
284
+ #show deletingCardDenied(Key, ErrorMessage) :
285
+ deletingCardDenied(Key, ErrorMessage),
286
+ showAll(Key).
287
+ #show editingFieldDenied(Key, Field, ErrorMessage) :
288
+ editingFieldDenied(Key, Field, ErrorMessage),
289
+ showField(Key, "deniedOperations").
290
+ #show editingFieldDenied(Key, Field, ErrorMessage) :
291
+ editingFieldDenied(Key, Field, ErrorMessage),
292
+ showAll(Key).
293
+ #show editingContentDenied(Key, ErrorMessage) :
294
+ editingContentDenied(Key, ErrorMessage),
295
+ showField(Key, "deniedOperations").
296
+ #show editingContentDenied(Key, ErrorMessage) :
297
+ editingContentDenied(Key, ErrorMessage),
298
+ showAll(Key).
299
+ order(N, "results", 1, Field, Direction) :- orderBy(Field, Direction), resultLevel(_, N, "results").
300
+ order(N, "results", 1, Field1, Direction1) :- orderBy(Field1, Direction1, _, _), resultLevel(_, N, "results").
301
+ order(N, "results", 2, Field2, Direction2) :- orderBy(_, _, Field2, Direction2), resultLevel(_, N, "results").
302
+ order(N, "results", 1, Field1, Direction1) :- orderBy(Field1, Direction1, _, _, _, _), resultLevel(_, N, "results").
303
+ order(N, "results", 2, Field2, Direction2) :- orderBy(_, _, Field2, Direction2, _, _), resultLevel(_, N, "results").
304
+ order(N, "results", 3, Field3, Direction3) :- orderBy(_, _, _, _, Field3, Direction3), resultLevel(_, N, "results").
305
+ order(Level, "results", 1, Field, Direction) :- orderBy(Level, Field, Direction).
306
+ order(Level, "results", 1, Field1, Direction1) :- orderBy(Level, Field1, Direction1, _, _).
307
+ order(Level, "results", 2, Field2, Direction2) :- orderBy(Level, _, _, Field2, Direction2).
308
+ order(Level, "results", 1, Field1, Direction1) :- orderBy(Level, Field1, Direction1, _, _, _, _).
309
+ order(Level, "results", 2, Field2, Direction2) :- orderBy(Level, _, _, Field2, Direction2, _, _).
310
+ order(Level, "results", 3, Field3, Direction3) :- orderBy(Level, _, _, _, _, Field3, Direction3).
311
+ select(Level, Collection, Field) :- order(Level, Collection, _, Field, _).
312
+ queryError("Invalid direction in ordering:", (Level, Collection, Index, Field, Direction)) :-
313
+ order(Level, Collection, Index, Field, Direction),
314
+ Direction != "ASC",
315
+ Direction != "DESC".
316
+ queryError("Ordering direction missing:", (Field)) :- orderBy(Field).
317
+ queryError("Conflicting ordering for fields: ", (Field1, Field2)) :-
318
+ order(Level, Collection, Index, Field1, _),
319
+ order(Level, Collection, Index, Field2, _),
320
+ Field1 != Field2.
321
+ queryError("Conflicting ordering direction", (Field, Collection, Direction1, Direction2)) :-
322
+ order(Level, Collection, Index, Field, Direction1),
323
+ order(Level, Collection, Index, Field, Direction2),
324
+ Direction1 != Direction2.
325
+ queryError :- queryError(_, _).
326
+ #show order(Level, Collection, Index, Field, Direction) :
327
+ order(Level, Collection, Index, Field, Direction),
328
+ not queryError.
329
+ #show queryError/2.
330
+ level(Level) :-
331
+ resultLevel(_, Level, _).
332
+ `;var b=`{{#if cardKey}}
333
+ result({{cardKey}}).
334
+ {{else}}
335
+ result(X) :- projectCard(X).
336
+ {{/if}}
337
+ displayName(Card, Field, DisplayName) :-
338
+ field(Card, Field, _),
339
+ fieldType(Field),
340
+ field(Field, "displayName", DisplayName),
341
+ field(Card, "cardType", CardType),
342
+ not field((CardType, Field), "displayName", _).
343
+ displayName(Card, Field, DisplayName) :-
344
+ field(Card, "cardType", CardType),
345
+ field((CardType, Field), "displayName", DisplayName).
346
+ field(Field, "visibility", "always") :-
347
+ alwaysVisibleField(CardType, Field),
348
+ field(Card, "cardType", CardType),
349
+ result(Card).
350
+ field(Field, "visibility", "optional") :-
351
+ optionallyVisibleField(CardType, Field),
352
+ field(Card, "cardType", CardType),
353
+ result(Card).
354
+ field(Field, "index", Index) :-
355
+ alwaysVisibleField(CardType, Field),
356
+ field((CardType, Field), "index", Index),
357
+ field(Card, "cardType", CardType),
358
+ result(Card).
359
+ field(Field, "index", Index) :-
360
+ optionallyVisibleField(CardType, Field),
361
+ field((CardType, Field), "index", Index),
362
+ field(Card, "cardType", CardType),
363
+ result(Card).
364
+ dataType(Field, "fieldDisplayName", "shortText") :-
365
+ childResult(_, Field, "fields"),
366
+ field(Field, "fieldDisplayName", _).
367
+ field(Field, "fieldDisplayName", DisplayName) :-
368
+ childResult(_, Field, "fields"),
369
+ result(Card),
370
+ displayName(Card, Field, DisplayName).
371
+ dataType(Field, "isCalculated", "boolean") :-
372
+ childResult(_, Field, "fields"),
373
+ field(Field, "isCalculated", _).
374
+ field(Field, "isCalculated", true) :-
375
+ result(Card),
376
+ field(Card, "cardType", CardType),
377
+ calculatedField(CardType, Field).
378
+ field(Field, "isCalculated", false) :-
379
+ childResult(_, Field, "fields"),
380
+ result(Card),
381
+ field(Card, "cardType", CardType),
382
+ not calculatedField(CardType, Field).
383
+ dataType(Field, "value", DataType) :-
384
+ childResult(_, Field, "fields"),
385
+ result(Card),
386
+ field(Card, Field, Value),
387
+ dataType(Card, Field, DataType).
388
+ field(Field, "value", Value) :-
389
+ childResult(Card, Field, "fields"),
390
+ field(Card, Field, Value).
391
+ select(1, "cardType").
392
+ select(1, "title").
393
+ select(1, "key").
394
+ select(1, "lastUpdated").
395
+ select(1, "workflowState").
396
+ select(1, "notifications").
397
+ select(1, "policyChecks").
398
+ select(1, "links").
399
+ select(1, "deniedOperations").
400
+ select(1, "labels").
401
+ select(2, "visibility").
402
+ select(2, "index").
403
+ select(2, "fieldDisplayName").
404
+ select(2, "fieldDescription").
405
+ select(2, "dataType").
406
+ select(2, "isCalculated").
407
+ select(2, "value").
408
+ childResult(Card, Field, "fields") :-
409
+ alwaysVisibleField(CardType, Field),
410
+ field(Card, "cardType", CardType),
411
+ result(Card).
412
+ childResult(Card, Field, "fields") :-
413
+ optionallyVisibleField(CardType, Field),
414
+ field(Card, "cardType", CardType),
415
+ result(Card).
416
+ select(3, "index").
417
+ select(3, "enumDisplayValue").
418
+ select(3, "enumDescription").
419
+ select(3, "enumValue").
420
+ childResult(Field, (Field, EnumValue), "enumValues") :-
421
+ enumValue(Field, EnumValue).
422
+ field((Field, EnumValue), "enumValue", EnumValue) :-
423
+ enumValue(Field, EnumValue).
424
+ order(2, "fields", 1, "visibility", "ASC").
425
+ order(2, "fields", 2, "index", "ASC").
426
+ order(3, "enumValues", 1, "index", "ASC").`;var C=`{{#each cardKeys}}
427
+ createdCard({{this}}).
428
+ {{/each}}
429
+ updateField(Card, CreateTransition, AffectedCard, Field, NewValue) :-
430
+ createdCard(Card),
431
+ onTransitionSetField(Card, CreateTransition, AffectedCard, Field, NewValue),
432
+ field(Card, "cardType", CardType),
433
+ field(CardType, "workflow", Workflow),
434
+ workflowTransition(Workflow, CreateTransition, "", _),
435
+ not editingFieldDenied(AffectedCard, Field, _).
436
+ executeTransition(Card, CreateTransition, AffectedCard, TransitionToExecute) :-
437
+ createdCard(Card),
438
+ onTransitionExecuteTransition(Card, CreateTransition, AffectedCard, TransitionToExecute),
439
+ field(Card, "cardType", CardType),
440
+ field(CardType, "workflow", Workflow),
441
+ workflowTransition(Workflow, CreateTransition, "", _),
442
+ not transitionDenied(AffectedCard, TransitionToExecute, _).
443
+ selectAll.
444
+ result(transitionSideEffects).
445
+ childResult(transitionSideEffects, @concatenate("updateFields", Card, CreateTransition, AffectedCard, Field, NewValue), "updateFields") :-
446
+ updateField(Card, CreateTransition, AffectedCard, Field, NewValue).
447
+ field(@concatenate("updateFields", Card, CreateTransition, AffectedCard, Field, NewValue), "card", AffectedCard) :-
448
+ updateField(Card, CreateTransition, AffectedCard, Field, NewValue).
449
+ field(@concatenate("updateFields", Card, CreateTransition, AffectedCard, Field, NewValue), "field", Field) :-
450
+ updateField(Card, CreateTransition, AffectedCard, Field, NewValue).
451
+ field(@concatenate("updateFields", Card, CreateTransition, AffectedCard, Field, NewValue), "newValue", NewValue) :-
452
+ updateField(Card, CreateTransition, AffectedCard, Field, NewValue).
453
+ childResult(transitionSideEffects, @concatenate("executeTransition", Card, CreateTransition, AffectedCard, TransitionToExecute), "executeTransition") :-
454
+ executeTransition(Card, CreateTransition, AffectedCard, TransitionToExecute).
455
+ field(@concatenate("executeTransition", Card, CreateTransition, AffectedCard, TransitionToExecute), "card", AffectedCard) :-
456
+ executeTransition(Card, CreateTransition, AffectedCard, TransitionToExecute).
457
+ field(@concatenate("executeTransition", Card, CreateTransition, AffectedCard, TransitionToExecute), "transitionToExecute", TransitionToExecute) :-
458
+ executeTransition(Card, CreateTransition, AffectedCard, TransitionToExecute).
459
+ `;var w=`selectAll.
460
+ result(transitionSideEffects).
461
+ childResult(transitionSideEffects, @concatenate("updateFields", {{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue), "updateFields") :-
462
+ onTransitionSetField({{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue),
463
+ not editingFieldDenied(AffectedCard, Field, _).
464
+ field(@concatenate("updateFields", {{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue), "card", AffectedCard) :-
465
+ onTransitionSetField({{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue).
466
+ field(@concatenate("updateFields", {{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue), "field", Field) :-
467
+ onTransitionSetField({{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue).
468
+ field(@concatenate("updateFields", {{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue), "newValue", NewValue) :-
469
+ onTransitionSetField({{cardKey}}, "{{transition}}", AffectedCard, Field, NewValue).
470
+ childResult(transitionSideEffects, @concatenate("executeTransition", {{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute), "executeTransition") :-
471
+ onTransitionExecuteTransition({{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute),
472
+ not transitionDenied(AffectedCard, TransitionToExecute, _).
473
+ field(@concatenate("executeTransition", {{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute), "card", AffectedCard) :-
474
+ onTransitionExecuteTransition({{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute).
475
+ field(@concatenate("executeTransition", {{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute), "transitionToExecute", TransitionToExecute) :-
476
+ onTransitionExecuteTransition({{cardKey}}, "{{transition}}", AffectedCard, TransitionToExecute).
477
+ `;var D=`select("title";"statusIndicator";"progress";"rank";"cardType").
478
+ result(Card) :- card(Card), not parent(Card, _), not hiddenInTreeView(Card).
479
+ childResult(Parent, Card, "children") :- card(Card), parent(Card, Parent), not hiddenInTreeView(Card).
480
+ order(Level, "children", 1, "rank", "ASC") :-
481
+ level(Level).
482
+ `;var k=`node(john).
483
+ node(jane).
484
+ edge((john,jane)).
485
+ attr(graph, default, label, "Does' family").
486
+ attr(graph_nodes, default, style, filled).
487
+ attr(node, john, label, "John Doe").
488
+ attr(node, jane, label, "Jane Doe").`;var S=`{{{model}}}
489
+ {{{view}}}
490
+ selectAll.
491
+ result(result).
492
+ labelAttribute("label").
493
+ labelAttribute(label).
494
+ childResult(result, Graph, "digraphs") :-
495
+ graph(Graph).
496
+ childResult(Graph, ((graph, Graph), Field), "attrs") :-
497
+ graph(Graph),
498
+ attr(graph, Graph, Field, _).
499
+ field(((graph, Graph), Field), "attr", Field) :-
500
+ graph(Graph),
501
+ attr(graph, Graph, Field, _).
502
+ field(((graph, Graph), Field), "value", Value) :-
503
+ graph(Graph),
504
+ attr(graph, Graph, Field, Value),
505
+ labelAttribute(Field).
506
+ field(((graph, Graph), Field), "value", Value) :-
507
+ graph(Graph),
508
+ attr(graph, Graph, Field, Value),
509
+ not labelAttribute(Field).
510
+ childResult(Parent, Graph, "children") :-
511
+ graph(Graph, Parent).
512
+ field(Graph, "isGraph", "void") :-
513
+ childResult(_, Graph, "children"),
514
+ graph(Graph, _).
515
+ childResult(Graph, ((graph, Graph), Field), "attrs") :-
516
+ graph(Graph, _),
517
+ attr(graph, Graph, Field, _).
518
+ field(((graph, Graph), Field), "attr", Field) :-
519
+ graph(Graph, _),
520
+ attr(graph, Graph, Field, _).
521
+ field(((graph, Graph), Field), "value", Value) :-
522
+ graph(Graph, _),
523
+ attr(graph, Graph, Field, Value),
524
+ labelAttribute(Field).
525
+ field(((graph, Graph), Field), "value", Value) :-
526
+ graph(Graph, _),
527
+ attr(graph, Graph, Field, Value),
528
+ not labelAttribute(Field).
529
+ field((node, Node), "rank", Rank) :- field(Node, "rank", Rank), node(Node, _).
530
+ field((node, Node), "isNode", "void") :-
531
+ childResult(_, (node, Node), "children"),
532
+ node(Node, _).
533
+ childResult(Graph, (node, Node), "children") :-
534
+ childResult(_, Graph, _),
535
+ node(Node, Graph).
536
+ field((node, Node), "cardKey", Node) :-
537
+ childResult(_, Graph, _),
538
+ node(Node, Graph).
539
+ childResult((node, Node), ((node, Node), Field), "attrs") :-
540
+ node(Node, Graph),
541
+ attr(node, Node, Field, _).
542
+ field(((node, Node), Field), "attr", Field) :-
543
+ node(Node, Graph),
544
+ attr(node, Node, Field, _).
545
+ field(((node, Node), Field), "value", Value) :-
546
+ node(Node, Graph),
547
+ attr(node, Node, Field, Value),
548
+ labelAttribute(Field).
549
+ field(((node, Node), Field), "value", Value) :-
550
+ node(Node, Graph),
551
+ attr(node, Node, Field, Value),
552
+ not labelAttribute(Field).
553
+ graph(default) :-
554
+ node(_).
555
+ graph(default) :-
556
+ edge(_).
557
+ node(X, default) :-
558
+ node(X).
559
+ edge((XR, YR), default) :-
560
+ edge((XR, YR)).
561
+ edge((XR, YR, ""), Graph) :-
562
+ edge((XR, YR), Graph).
563
+ childResult(Graph, (edge, (XR, YR, Description)), "edges") :-
564
+ childResult(_, Graph, _),
565
+ edge((XR, YR, Description), Graph).
566
+ childResult((edge, (XR, YR, Description)), ((edge, (XR, YR, Description)), Field), "attrs") :-
567
+ childResult(_, (edge, (XR, YR, Description)), _),
568
+ attr(edge, (XR, YR, Description), Field, _).
569
+ field(((edge, (XR, YR, Description)), Field), "attr", Field) :-
570
+ childResult(_, (edge, (XR, YR, Description)), _),
571
+ attr(edge, (XR, YR, Description), Field, Value).
572
+ field(((edge, (XR, YR, Description)), Field), "value", Value) :-
573
+ childResult(_, (edge, (XR, YR, Description)), _),
574
+ attr(edge, (XR, YR, Description), Field, Value).
575
+ field((edge, (XR, YR, Description)), "source", XR) :-
576
+ edge((XR, YR, Description), _).
577
+ field((edge, (XR, YR, Description)), "destination", YR) :-
578
+ edge((XR, YR, Description), _).
579
+ order(N, Collection, 1, "rank", "ASC") :- resultLevel(_, N, Collection).`;var j=`{{#*inline "subgraph"}}
580
+ subgraph cluster_{{this.key}} {
581
+ graph [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
582
+ {{#each edges}}
583
+ "{{this.[source]}}" -> "{{this.destination}}" [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
584
+ {{/each}}
585
+ {{#each children}}
586
+ {{#if this.isNode}}
587
+ "{{this.cardKey}}" [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
588
+ {{/if}}
589
+ {{#if this.isGraph}}
590
+ {{> subgraph}}
591
+ {{/if}}
592
+ {{/each}}
593
+ }
594
+ {{/inline}}
595
+ {{#each results}}
596
+ {{#each digraphs}}
597
+ digraph {{this.key}} {
598
+ graph [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
599
+ {{#each edges}}
600
+ "{{this.[source]}}" -> "{{this.destination}}" [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
601
+ {{/each}}
602
+ {{#each children}}
603
+ {{#if this.isNode}}
604
+ "{{this.cardKey}}" [{{#each attrs}}{{this.attr}}={{{formatAttributeValue this.value}}} {{/each}}]
605
+ {{/if}}
606
+ {{#if this.isGraph}}
607
+ {{> subgraph}}
608
+ {{/if}}
609
+ {{/each}}
610
+ }
611
+ {{/each}}
612
+ {{/each}}`;var We={query:S,content:j},Je={common:{base:T,queryLanguage:F},queries:{card:b,onCreation:C,onTransition:w,tree:D},test:{model:k}};async function Qe(){if(typeof process>"u"||!process.versions?.node)throw new Error("@cyberismo/assets: getStaticDirectoryPath can only be called in Node.js");let{join:L}=await import("node:path"),V=import.meta.dirname;return L(V,"static")}export{Qe as getStaticDirectoryPath,We as graphvizReport,Je as lpFiles,Ae as parentSchema,Ke as schemas};