UNPKG

issue-pane

Version:

Solid-compatible Panes: issue editor

1 lines 63.9 kB
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("UI"),require("SolidLogic"),require("$rdf")):"function"==typeof define&&define.amd?define(["UI","SolidLogic","$rdf"],n):"object"==typeof exports?exports.issuePane=n(require("UI"),require("SolidLogic"),require("$rdf")):e.issuePane=n(e.UI,e.SolidLogic,e.$rdf)}(this,(e,n,t)=>(()=>{"use strict";var s={85:(e,n,t)=>{t.d(n,{board:()=>o});var s=t(426),i=t(663),r=t(264);function o(e,n,t,o){const a=e.createElement("div");a.style="width: 100%;",a.style.margin="1em";const l=a.appendChild(e.createElement("table"));l.style="width: 100%;",l.style.borderCollapse="collapse";const u=l.appendChild(e.createElement("tr")),c=l.appendChild(e.createElement("tr"));function d(n,t){const r=e.createElement("div"),o=r.appendChild(e.createElement("table")),a=i.store.each(n,s.ns.rdf("type")).map(e=>i.store.any(e,s.ns.ui("backgroundColor"))).filter(e=>e);o.appendChild(s.widgets.personTR(e,null,n)),o.subject=n,o.style="margin: 1em;";const l=a[0]||i.store.any(t,s.ns.ui("backgroundColor"));return r.style.backgroundColor=l?l.value:"#fff",r}function p(e,n,t,s){const r=e.map(e=>[i.store.any(e,n)||t,e]);return r.sort(),s&&r.reverse(),r.map(e=>e[1])}return n.forEach(n=>{const t=u.appendChild(e.createElement("th"));t.textContent=s.utils.label(n,!0),t.subject=n,t.style="margin: 0.3em; padding: 0.5em 1em; font-treatment: bold; font-size: 120%;";const r=c.appendChild(e.createElement("td"));r.subject=n,r.style="border: 0.01em solid white; padding: 0.1em;",o.columnDropHandler&&s.widgets.makeDropTarget(r,function(e){e.forEach(function(e){console.log("Dropped on column: "+e);const t=i.store.sym(e);o.columnDropHandler(t,n)})})}),a.refresh=function(){const e=new r.Literal(new Date),n=t||o.renderItem||d;function a(e){const t=n(e);return s.widgets.makeDraggable(t,e),t.subject=e,t}for(let n=c.firstChild;n;n=n.nextSibling){const t=n.subject;let r=i.store.each(null,s.ns.rdf("type"),t);const l=o.sortBy||s.ns.dct("created");o.filter&&(r=r.filter(o.filter));const u=p(r,l,e,!0);s.utils.syncTableToArrayReOrdered(n,u,a)}},a.refresh(),a}},178:(e,n,t)=>{t.d(n,{exposeOverlay:()=>m,getState:()=>d,renderIssue:()=>w,renderIssueCard:()=>f});var s=t(426),i=t(663),r=t(324),o=t(264);const a=i.store,l=!1,u=s.icons.iconBase+"noun_17020_gray-tick.svg",c=(s.icons.iconBase,s.icons.iconBase+"noun_17020.svg");function d(e,n){const t=a.the(e,s.ns.wf("tracker"),null,e.doc()),i=a.any(t,s.ns.wf("issueClass"));n=n||i;const r=a.each(e,s.ns.rdf("type")).filter(e=>a.holds(e,s.ns.rdfs("subClassOf"),n));if(1!==r.length)throw new Error("Issue must have one type as state: "+r.length);return r[0]}function p(e){const n=a.each(e,s.ns.rdf("type")).map(e=>a.any(e,s.ns.ui("backgroundColor"))).filter(e=>!!e);return n.length?n[0].value:null}function f(e,n){function t(){const n=p(e)||"white";o.style.backgroundColor=n,c.style.backgroundColor=n}const i=n.dom,r=!p(e),o=i.createElement("div"),l=o.appendChild(i.createElement("table"));l.style.width="100%",l.appendChild(s.widgets.personTR(i,null,e,{draggable:!1})),l.subject=e,o.style="border-radius: 0.4em; border: 0.05em solid grey; margin: 0.3em;",o.firstChild.firstChild.firstChild.firstChild.setAttribute("src",s.icons.iconBase+"noun_Danger_1259514.svg");const u=o.firstChild.firstChild.children[2],c=s.widgets.button(i,s.icons.iconBase+"noun_253504.svg","edit",async t=>{m(e,n)}),d=c.firstChild;if(d.style.width=d.style.height="1.5em",u.appendChild(c),r){const t=s.widgets.deleteButtonWithCheck(i,u,"issue",async function(){try{await a.updater.update(a.connectedStatements(e))}catch(e){!function(e,n){console.warn(e),n.paneDiv.appendChild(s.widgets.errorMessageBlock(n.dom,e))}(`Unable to delete issue: ${e}`,n)}console.log("User deleted issue "+e),o.parentNode.removeChild(o),s.widgets.refreshTree(n.paneDiv)});u.appendChild(t)}return o.style.maxWidth="24em",o.refresh=t,t(),o}function m(e,n){const t=n.overlay;t.innerHTML="";const i=t.appendChild(s.widgets.button(n.dom,s.icons.iconBase+"noun_1180156.svg","close",function(){t.innerHTML="",t.style.visibility="hidden"}));i.style.float="right",i.style.margin="0.7em",delete i.style.backgroundColor,t.style.visibility="visible",t.appendChild(w(e,n)),t.firstChild.style.overflow="auto"}function h(e,n){const t=e.createElement("div");return t.setAttribute("style","height: 1em; margin: 0.5em;"),t.style.backgroundColor=n,t}function w(e,n){function t(n,t,i){if(l){if(!w(y,"trackLastModified"))return;const n=t.statementsMatching(e,s.ns.dct("modified")).concat(t.statementsMatching(e,s.ns.wf("modifiedBy"))),r=[o.st(e,s.ns.dct("modified"),new Date,i)];k&&r.push(o.st(e,s.ns.wf("modifiedBy"),k,i)),t.updater.update(n,r,function(e,n,t){})}}function d(e,n){const t=g.createElement("pre");return t.setAttribute("style",n||"color: grey"),F.appendChild(t),t.appendChild(g.createTextNode(e)),t}function f(e){console.warn(e),F.appendChild(s.widgets.errorMessageBlock(g,e))}function m(e,n){e||f("Sorry, failed to save your change:\n"+n)}function w(e,n){const t=a.any(e,s.ns.ui(n));return!(!t||!t.value)}const g=n.dom,y=a.the(e,s.ns.wf("tracker"),null,e.doc());if(!y)throw new Error("No tracker");const b=a.any(y,s.ns.wf("stateStore")),C=e.doc(),F=g.createElement("div"),k=i.authn.currentUser(),v=p(e)||"white";!function(){const n="padding: 0.5em 1.5em 1em 1.5em; border: 0.7em;border-color: "+(p(e)||"#eee")+"; ";F.setAttribute("style",n),F.style.backgroundColor="white"}(),i.authn.checkUser();const T=F.appendChild(s.widgets.button(g,function(e){return function(e){return!!a.findTypeURIs(e)[s.ns.wf("Open").uri]}(e)?u:c}(e)));s.widgets.makeDraggable(T,e);const x=a.any(y,s.ns.wf("issueClass"));if(!x)throw new Error("This tracker "+y+" has no issueClass");const S=s.widgets.makeSelectForCategory(g,a,e,x,b,function(e,n){e?(t(0,a,C),s.widgets.refreshTree(F)):console.log("Failed to change state:\n"+n)});F.appendChild(S);const P=a.each(y,s.ns.wf("issueCategory"));for(const n of P)F.appendChild(s.widgets.makeSelectForCategory(g,a,e,n,b,function(e,n){e?(t(0,a,C),s.widgets.refreshTree(F)):console.log("Failed to change category:\n"+n)}));const O=g.createElement("a");O.setAttribute("href",y.uri),O.setAttribute("style","float:right"),F.appendChild(O).textContent=s.utils.label(y),O.addEventListener("click",s.widgets.openHrefInOutlineMode,!0);const M=s.ns.wf("coreIsueForm");o.parse('\n @prefix : <http://www.w3.org/ns/ui#> .\n @prefix core: <http://www.w3.org/2005/01/wf/flow#>.\n @prefix dc: <http://purl.org/dc/elements/1.1/>.\n @prefix wf: <http://www.w3.org/2005/01/wf/flow#> .\n\n core:coreIsueForm a :Form;\n <http://purl.org/dc/elements/1.1/title> "Core issue data";\n :parts (\n core:titleField\n core:descriptionField ) .\n\n core:descriptionField a :MultiLineTextField;\n :label "Description";\n :property wf:description;\n :size "40" .\n\n core:titleField a :SingleLineTextField;\n :label "Title";\n :maxLength "128";\n :property dc:title; # @@ Should move to dct or schema\n :size "40" .\n\n wf:Task :creationForm core:coreIsueForm .\n',a,M.doc().uri,"text/turtle");const A=s.widgets.appendForm(g,null,{},e,M,b,m);F.appendChild(A),A.style.backgroundColor=v;const D=a.statementsMatching(e,s.ns.wf("assignee"));if(D.length>1){d("Weird, was assigned to more than one person. Fixing ..");const e=D.slice(1);a.updater.update(e,[],function(e,n,t){n?d("Now fixed."):f("Fixed failed: "+t)})}function E(e){return s.widgets.personTR(g,s.ns.wf("dependent"),e,{link:!1})}function I(e,n){n=n||[];const t=a.any(null,s.ns.wf("dependent"),e,e.doc());return t?I(t,[t].concat(n)):n}if(async function(){const n=a.each(e,s.ns.wf("assigneeGroup"));await a.fetcher.load(n);const t=n.map(e=>a.each(e,s.ns.vcard("member"),null,e.doc())).flat(),i=a.any(null,s.ns.doap("bug-database"),y);i&&await a.fetcher.load(i);const r=i?a.each(i,s.ns.doap("developer")):[];return t.concat(r)}().then(n=>{if(n.length){n.forEach(function(e){a.fetcher.lookUpThing(e)});const i={nullLabel:"(unassigned)"};F.appendChild(s.widgets.makeSelectForOptions(g,a,e,s.ns.wf("assignee"),n,i,C,function(e,n){e?t(0,a,C):console.log("Failed to change assignee:\n"+n)}))}}),w(y,"allowSubIssues")){const n=F.appendChild(g.createElement("div"));n.style="margin: 1em; padding: 1em;",n.appendChild(g.createElement("h4")).textContent="Super Issues";const t=n.appendChild(g.createElement("div"));t.style.display="flex",t.refresh=function(){const n=I(e);s.utils.syncTableToArrayReOrdered(t,n,E)},t.refresh(),n.appendChild(g.createElement("h4")).textContent="Sub Issues";const i=n.appendChild(g.createElement("div"));i.style.display="flex",i.style.flexDirection="reverse",i.refresh=function(){const n=a.each(e,s.ns.wf("dependent"),null,e.doc());s.utils.syncTableToArrayReOrdered(i,n,E)},i.refresh();const o=g.createElement("button");o.setAttribute("type","button"),n.appendChild(o);const l=s.utils.label(x);o.innerHTML="New sub "+l,o.setAttribute("style","float: right; margin: 0.5em 1em;"),o.addEventListener("click",function(t){n.insertBefore((0,r.newIssueForm)(g,a,y,e,i.refresh),o.nextSibling)},!1)}F.appendChild(g.createElement("br"));const L=a.any(y,s.ns.wf("extrasEntryForm"));L&&s.widgets.appendForm(g,F,{},e,L,b,m);const N=F.appendChild(h(g,v));let q;a.anyValue(y,s.ns.wf("issueURITemplate"))?q=e.doc():(q=a.any(y,s.ns.wf("messageStore")),q||(q=a.any(y,s.ns.wf("stateStore"))),a.sym(q.uri+"#Chat"+(new Date).getTime())),a.fetcher.nowOrWhenFetched(q,function(n,t,i){if(n){const n=(0,s.messageArea)(g,a,e,q);F.insertBefore(n,N),F.insertBefore(h(g,v),n)}else{const e=g.createElement("p");e.textContent=t,F.insertBefore(e,N)}}),F.appendChild(g.createElement("div")).innerHTML="<h4>Attachments</h4>\n <p>Drag files, emails,\n web pages onto the paper clip, or click the file upload button.</p>";const j=e.uri.endsWith("/index.ttl#this")?e.uri.slice(0,14)+"Files/":e.dir().uri+"Files/"+e.uri.split("#")[1]+"/";s.widgets.attachmentList(g,e,F,{doc:b,promptIcon:s.icons.iconBase+"noun_25830.svg",uploadFolder:a.sym(j),predicate:s.ns.wf("attachment")}),s.widgets.deleteButtonWithCheck(g,F,"issue",async function(){try{await a.updater.update(a.connectedStatements(e))}catch(e){f(`Unable to delete issue: ${e}`)}f("DELETED OK"),F.style.backgroundColor="#eee",F.style.fontColor="orange"}).style.float="right";const U=g.createElement("button");return U.textContent="refresh messages",U.addEventListener("click",async function(e){try{await a.fetcher.load(q,{force:!0,clearPreviousData:!0})}catch(e){return void alert(e)}s.widgets.refreshTree(F)},!1),U.setAttribute("style",s.style.button),F.appendChild(U),F}},197:e=>{e.exports='# Ontology for user interface hints and forms\n#\n# See also related: the Fresnel language\n#\n@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix s: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix tt: <http://dig.csail.mit.edu/2010/issues/track#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix : <http://www.w3.org/ns/ui#>.\n@prefix wf: <http://www.w3.org/2005/01/wf/flow#>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n@keywords is, of, a.\n\n<> dc:title "An ontology for User Interface description, Hints and Forms.";\n dc:description """The User Interface ontology allows the definition\n of forms for processing RDF model data, and include a bootstrap form for\n editing forms. It allows user interface hints such as background colors,\n can be associated with objects and classes.\n """;\n dc:created 2010-08-07;\n dc:license <https://creativecommons.org/publicdomain/zero/1.0/>;\n dc:modified """$Date: 2020/03/22 16:53:21 $""";\n dc:author <https://www.w3.org/People/Berners-Lee/card#i>.\n\nstyle a r:Property, owl:DatatypeProperty;\n s:label "style";\n prompt "CSS style";\n s:comment """Must be a valid CSS style string such as one could put in\n an HTML style attribute. Depending on the user interface system, this can\n by given to individuals, classes or properties. It is up to a user interface\n which wants to draw on them to pick how it uses styles from which parts\n of the data it has. For example, the style of a class may be picked\n to distinguish information about things in that class.""".\n\nbackgroundColor a r:Property, owl:DatatypeProperty;\n s:label "background color"@en;\n s:range ui:Color;\n s:comment """Must be a valid CSS color string such as one could put in\n an HTML style attribute. This should be in the #xxxxxx form,\n (with 6 digits of hex) so that it\n can work with Graphviz.""".\n\nbackgroundImage a r:Property, owl:DatatypeProperty;\n s:label "background image"@en;\n s:comment """URI or base64 representation of an image""".\n\ncolor a r:Property, owl:DatatypeProperty;\n s:label "color"@en;\n s:range ui:Color;\n s:comment """Must be a valid CSS color string such as one could put in\n an HTML style attribute. This should be in the #xxxxxx form,\n (with 6 digits of hex) so that it\n can work with Graphviz.""".\n\n\n\nsortPriority a r:Property, owl:DatatypeProperty;\n s:label "sort priority";\n s:range xsd:integer;\n s:comment """When individuals or classes must be sorted, then\n if they are given different values of sortPriority a user agent can\n use this as a hint to how to present information.""".\n\nsortBy a r:Property;\n s:label "sort by";\n s:domain s:Class;\n s:range r:Property;\n s:comment """A property which typically is used to sort\n members of a given class.""".\n\nseqeunce a r:Property;\n s:label "sequence number";\n s:range xsd:integer;\n s:comment """The sequence in which this item is arranged with repect to other parts.""".\n\ninitialProperties a r:Property;\n s:label "initial properties";\n s:domain s:Class;\n s:range r:List; # List of r:Property\n s:comment """A really simple way of enabling user interfaces to\n create new information about a class of things is to make a define of properties\n to be specified when a information about a new item\n ("New item" here means an item which the system\n does not have prvious information about yet,\n not an items which has just been created,\n like new friend as opposed to new baby)""";\n prompt "Properties to be specified for new ones".\n\ntableProperties a r:Property;\n s:domain s:Class;\n s:label "table properties";\n s:range r:List; # List of r:Property\n s:comment """This is a crude way of specifying a table-based\n view for objects of this class.""";\n prompt "Properties to be given in a default table view".\n\nprompt a r:Property;\n s:label "user prompt";\n s:comment """A string for the UI to use if the user needs a longer\n prompts than just a field name, the rdfs:label. """;\n ui:prompt "A longer prompt for a user inputting this property".\n\n\n# A Taxonomy of Field types\n\nui:Form owl:disjointUnionOf ( ui:ValueField ui:Group ui:Choice ui:Classifier ui:Options ui:Multiple ui:Heading ui:Comment);\n s:comment """A form can be any type of single field, or typically a Group of several fields,\n including interspersed headings and comments. """.\nui:Single owl:disjointUnionOf ( ui:ValueField ui:Group ui:Choice ui:Classifier ui:Options ui:Heading ui:Comment).\nui:ValueField owl:disjointUnionOf ( ui:TextField ui:NumericField ui:ColorField ui:DateField ui:DateTimeField ui:PhoneField ui:EmailField).\nui:NumericField owl:disjointUnionOf (ui:BooleanField ui:TriStateField ui:IntegerField ui:DecimalField ui:FloatField).\n# ui:Multiple owl:disjointUnionOf ( ui:ZeroOrMore ui:OneOrMore ).\nui:TextField owl:disjointUnionOf (ui:SingleLineTextField ui:MultiLineTextField).\n\nui:Form a s:Class; is s:subClassOf of ui:ValueField, ui:Group, ui:Choice, ui:Heading, ui:Comment, ui:Classifier, ui:Options, ui:Multiple.\nui:Single a s:Class; is s:subClassOf of ui:ValueField, ui:Group, ui:Choice, ui:Heading, ui:Comment, ui:Classifier, ui:Options.\nui:ValueField a s:Class; is s:subClassOf of ui:TextField, ui:NumericField, ui:ColorField, ui:DateField, ui:DateTimeField, ui:PhoneField, ui:EmailField.\nui:NumericField a s:Class; is s:subClassOf of ui:BooleanField, ui:TriStateField, ui:IntegerField, ui:DecimalField, ui:FloatField.\nui:TextField a s:Class; is s:subClassOf of ui:SingleLineTextField, ui:MultiLineTextField.\n\nui:Classifier a s:Class; s:label "classifier";\n s:comment """A classifier allows the user to select the type of an object.\n The possible types must be subclasses of some overall class, the "category".\n (Ideally, the superclass is also set up as the disjoint union of the subclasses,\n if they are disjoint.)\n\n The form normally stores the resulting classes using an rdf:type triple,\n but a different predicate can be used if required, so the classifier field\n needs is \'property\' defined too.\n\n If the subclass selected itself is has subclasses defined, the user can\n recursively select from them in turn, as many levels as needed.""".\n\nui:property a r:Property; s:domain ui:Form; s:range r:Property;\n s:label "property to be stored"@en;\n s:comment """Many fields prompt for information about a given property of the subject.\n When field is filled in, this gives which property is written into the data.""".\n\nui:category a r:Property; s:domain ui:Classifier; s:range s:Class;\n s:label "overall superclass"@en;\n s:comment """The superclass subclasses of which will be selected.""".\n\nui:dependingOn a r:Property; s:domain ui:Options; s:range r:Property;\n s:label "depending on"@en;\n s:comment """Many fields prompt for information about a given property of the subject""".\n\nui:for a r:Property; s:label "for"@en; s:comment "The value for which this case is selected.".\nui:use a r:Property; s:range ui:Form.\n\nui:part a r:Property; s:label "part"@en ; s:domain ui:Form; s:range ui:Form. # Used for Multiple field - the subform for each item\nui:parts a r:Property; s:label "parts"@en ; s:domain ui:Form; s:range r:Collection. # (of Forms) The ordered set of fields in a group\nui:ordered e r:Property; s:label "ordered"; s:range xsd:Boolean . # Could be useful for all kinds of things in future so not restricted to Multiple\n\nui:from a r:Property; s:domain ui:Choice; s:range r:Class;\n s:label "from"; ui:prompt "from what class".\n\nui:size a r:Property; s:domain ui:ValueField; s:range xsd:integer;\n s:label "size of field";\n ui:prompt "size of field in characters".\n\nui:maxLength a r:Property; s:domain ui:TextField; s:range xsd:integer;\n s:label "max length of value".\n\nui:minValue a r:Property; s:domain ui:ValueField; s:label "min". # @@ range?\nui:maxValue a r:Property; s:domain ui:ValueField; s:label "max".\n\n ui:creationForm a r:Property; s:domain s:Class; s:range ui:Form;\n s:label "creation form";\n s:comment """A form which may be used to collect information about a\n hitherto locally undocumented instance instance of this class.""".\n\n ui:annotationForm a r:Property; s:domain s:Class; s:range ui:Form;\n s:label "annotation form";\n s:comment """A form which may be used to add more infromation to an\ninstance of this class which we know something about. Anything from\nadding just add one more fact, to adding a whole lot of information about a specific\nfacet of the thing.\n""".\n\n\n#############################################\n#\n# Form for editing Forms\n#\n\nFormForm a ui:Form;\n dc:title "Form for editing Forms";\n is ui:creationForm of Form;\n a ui:Group; ui:parts (FF1 FF2 FF3 FieldList) .\n\n FF1 ui:sequence 1; a ui:Heading; ui:contents "Edit Form"@en .\n FF2 ui:sequence 2; a ui:SingleLineTextField; ui:property dc:title; ui:size 60 .\n FF3 ui:sequence 3; a ui:Comment; ui:contents\n """To add a field to the form, press the plus at the bottom,\n and then select what sort of field you want."""@en; ui:style "background-color: #ffe;" .\n\n FieldList ui:sequence 10; a ui:Multiple; ui:ordered true; ui:property ui:parts; ui:part FieldForm .\n\nFieldForm a ui:Group;\n dc:title "Form for selecting a type of field";\n ui:parts (\n\n [ ui:sequence 1; a ui:Classifier; ui:property r:type; ui:category ui:Form]\n\n [ a ui:Options; ui:sequence 2; ui:dependingOn r:type;\n\n ui:case [ ui:for ui:TextField; ui:use [a ui:Group; ui:parts (\n [ a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty] # @@@ Needs inference on current web\n [ a ui:IntegerField; ui:property ui:size; ui:label "field size"; ui:min 1; ui:max 4096]\n [ a ui:IntegerField; ui:property ui:maxLength; ui:label "Max. length of string"; ui:min 1]\n )]];\n\n ui:case [ ui:for ui:IntegerField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:IntegerField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:IntegerField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:DecimalField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DecimalField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:DecimalField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:FloatField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:FloatField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:FloatField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:ColorField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty] )\n ]];\n\n ui:case [ ui:for ui:DateField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DateField; ui:property ui:min; ui:label "min"]\n [ ui:sequence 3; a ui:DateField; ui:property ui:max ; ui:label "max"]\n ) ]];\n\n ui:case [ ui:for ui:DateTimeField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DateTimeField; ui:property ui:min; ui:label "min"]\n [ ui:sequence 3; a ui:DateTimeField; ui:property ui:max ; ui:label "max"]\n ) ]];\n\n ui:case [ ui:for ui:EmailField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:ObjectProperty]\n ) ]];\n\n ui:case [ ui:for ui:PhoneField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:ObjectProperty]\n )]];\n\n ui:case [ ui:for ui:Group; ui:use FieldList];\n\n ui:case [ ui:for ui:Options; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:dependingOn; ui:label "depending on"; ui:from r:Property; ui:default r:type]\n [ ui:sequence 2; a ui:Multiple; ui:property ui:case; ui:part CaseForm]\n ) ]];\n\n ui:case [ ui:for ui:Choice; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property";\n ui:canMintNew true; ui:from owl:ObjectProperty]\n [ ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:from; ui:label "destination class";\n ui:from s:Class; ui:canMintNew true; ]\n [ ui:sequence 3; a ui:BooleanField; ui:property ui:canMintNew; # No class form yet\n ui:label "user can add new"]\n [ ui:sequence 4; a ui:Choice; ui:canMintNew true; ui:property ui:use; ui:label "Nested Form (if any)";\n ui:from ui:Form; ui:optional true; ui:use FormForm] # @@ optional\n\n ) ]];\n\n ui:case [ ui:for ui:Classifier; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 2; a ui:Comment; ui:contents """A classifier allows the user to which classes the item belongs to, given a common superclass of the allowed classes. Give the superclass here:""" ]\n\n [ ui:sequence 4; a ui:Choice; ui:canMintNew true; ui:property ui:category; ui:label "superclass"; ui:from s:Class]\n\n [ ui:sequence 6; a ui:Comment; ui:contents """(When the choice is made normally the item is given a rdf:type. Set this to rdf:type unless you want the form to set a different property.)""" ]\n\n [ ui:sequence 8; a ui:Choice; ui:canMintNew true; ui:property ui:property;\n ui:label "property"; ui:from owl:ObjectProperty; ui:default r:type] # @@ restriction\n\n ) ]];\n\n ui:case [ ui:for ui:Multiple; ui:use [a ui:Group; ui:parts (\n [ui:sequence 0; a ui:BooleanField; ui:property ui:ordered; ui:label "ordered"] # If this an ordered array or an unordered set?\n [ui:sequence 0; a ui:IntegerField; ui:property ui:min; ui:label "minimum number"] # If this an ordered array or an unordered set?\n [ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from r:Property]\n [ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:part; ui:from ui:Form; ui:use FieldForm] # Form for details of the field part of the multiple\n ) ]];\n\n ui:case [ ui:for ui:Heading; ui:use [a ui:SingleLineTextField; ui:property ui:contents]];\n\n ui:case [ ui:for ui:Comment; ui:use [a ui:MultiLineTextField; ui:property ui:contents]]\n ]).\n\n\nCaseForm a ui:Group;\n dc:title "Form for a conditional case in a form";\n ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:for; ui:label "when it is"; ui:canMintNew true; ui:from s:Class]\n [ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:use; ui:from ui:Form; ui:canMintNew true; ui:use FieldForm] ). # Form for details of the field part of the multiple\n\n# ENDS\n'},240:e=>{e.exports='# Issue tracking - Workflow application definition ontology\n#\n# Finite state automaton ontology\n#\n# See requirements for tracking tools http://www.w3.org/2005/01/06-tool-req.html\n#\n@keywords a, is, of.\n\n@prefix : <http://www.w3.org/2005/01/wf/flow#>.\n@prefix wf: <http://www.w3.org/2005/01/wf/flow#>.\n\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#> .\n@prefix log: <http://www.w3.org/2000/10/swap/log#> .\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> .\n@prefix doap: <http://usefulinc.com/ns/doap#>.\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix dct: <http://purl.org/dc/terms/>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n<> dc:title "Issue Tracking Ontology";\n\n dct:creator <http://www.w3.org/People/Berners-Lee/card#i>;\n\n s:comment """This ontology defines a very general class (Task)\n which can used for any kind of bug tracking, issue tracking,\n to-do-list management, action items, goal dependency, and so on.\n It captures the state of a task as a subclass, so that\n subsumption can be used.\n It captures a discussion thread about a task.\n It captures subtasks structure if necessary.\n A "Tracker" defines actual set of states, categories, etc.,\n which a task can be in. The data about the tracker\n guides the software managing the task.\n\n There is some workflow modeling finite state machine\n terms which are optional for more complex definition\n of the transitions allowed.\n """.\n\nTask a s:Class;\n s:label "task"@en; owl:disjointUnionOf (Open Closed);\n s:comment """Something to be done in a wide sense,\n an agenda item at a meeting is one example, but any\n issue, task, action item, goal, product, deliverable, milestone, can such a thing.\n The requirement for this framework was that it would allow\n one to customize ontologies for things such as agenda items,\n action items, working group issues with a spec, w3c Last Call issues,\n software bugs and administrative requests.\n In π-calculus, a process.\n Make your type of issue a subclass of Task.\n """.\n\nOpen a s:Class; s:subClassOf Task;\n s:label "open"@en, "ouvert"@fr;\n ui:backgroundColor "#d6f5d6"; # green like github for some reason\n s:comment """A task which needs attention. The very crude states of Open and Closed all\n interoperability between different systems if the states for a given\n application are made subclasses of either Open or Closed. This allows\n tasks from different systems to be mixed and treated together with\n limited but valuable functionality.\n """.\n\nClosed a s:Class; s:subClassOf Task;\n s:label "closed"@en, "fermé"@fr;\n ui:backgroundColor "#f5d6d6"; # pink\n s:comment """A task which does not need attention. It may be closed because\n has been abandoned or completed, for example.\n """.\n\n\n ActionItem a s:Class;\n s:subClassOf Task;\n s:label "action item"@en; owl:disjointUnionOf (Open Closed);\n s:comment """An obligation taken on by a person, typically at a meeting.\n """.\n\n\ndescription a rdf:Property;\n s:label "description";\n s:comment """The description, definition,\n or abstract. Information explaining what this is.\n Not arbitrary comment about anything, only about the subject.\n (Use this property for anything. There is no domain restriction.).""".\n\ndependent a rdf:Property;\n s:label "how"; owl:inverseOf [ s:label "why"];\n s:domain Task; s:range Task;\n s:comment """Another task upon which this depends, in the sense that\n this task cannot be completed without that task being done.\n You can\'t use this for dependencies on anything other than other tasks.\n (Note the US spelling of the URI. In the UK, a dependant is a something\n which is dependent on somehing else.)""".\n\nassignee a rdf:Property;\n s:label "assigned to"; owl:inverseOf [s:label "assignment"];\n# s:domain Task;\n s:range foaf:Agent;\n s:comment """The person or group to whom this has been assigned.""".\n\n# use dct:modified\n#modified a rdf:Property;\n# s:label "last changed".\n\nmodifiedBy a rdf:Property;\n s:range foaf:Agent;\n s:label "changed by".\n\n# use dct:created instead\n#created a rdf:Property;\n# s:range xsd:dateTime;\n#\n# Use foaf:maker instead\n#creator a rdf:Property;\n# s:range foaf:Agent;\n# s:label "changed by".\n\nsubscriber a rdf:Property;\n s:label "subscriber";\n s:range foaf:Agent.\n\n\n################## Products\n#\n#\n# History: The Tracker system included a cocept of a product,\n# such that an action could be associated with *either* an issue *or* a product.\n# Noah Mendelsohn for the TAG needed to be able make\n# and to give products: Goals, scuuess criteria,\n# deliverables with dates, schedules, TAG members assigned, related issues.\n#\n\n\nProduct a s:Class; s:subClassOf Task;\n s:label "product";\n s:comment """A product is a task which monitors something\n which must be produced.""".\n\ndeliverable a rdf:Property; s:subPropertyOf dependent;\n s:range Product;\n s:label "deliverable"@en;\n s:comment """Something which must be delivered to accomplish this""".\n\ngoalDescription a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:string;\n s:label "goals";\n s:comment """A textual description of the goals of this product, etc.""".\n\nsuccessCriteria a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:string;\n s:label "success criteria";\n s:comment """A textual description of the successs critera.\n How when we know this is done?""".\n\ndateDue a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:date;\n s:label "due"@en;\n s:comment """The date this task is due.\n """.\n\n################## Attachments\n\nattachment a rdf:Property;\n s:label "attachment";\n s:comment """Something related is attached for information.""".\n\nscreenShot a rdf:Property; s:subPropertyOf attachment;\n s:label "screen shot"@en;\n s:comment """An image taken by capturing the state of a\n computer screen, for example to demonstrate a problem""".\n\ntestData a rdf:Property; s:subPropertyOf attachment;\n s:label "test data"@en;\n s:comment """A file which can be used as inpiut to a test\n or to demonstrate a problem. """.\n\n\nterminalOutput a rdf:Property; s:subPropertyOf attachment;\n s:label "terminal output"@en;\n s:comment """A file showing user interaction from a\n text terminal or console etc. """.\n\n\nmessage a rdf:Property; s:subPropertyOf attachment;\n s:label "message"@en;\n s:comment """A message about this. Attached for information.""".\n\n\nMessage a s:Class; s:label "message"@en.\nrecipent a rdf:Property; s:label "to"; s:domain Message; s:range foaf:Agent.\nsender a rdf:Property; s:label "from"; s:domain Message; s:range foaf:Agent.\n\n############################# A Tracker connects and manages issues\n\ntracker a rdf:Property;\n s:label "tracker";\n owl:inverseOf [ s:label "issue"];\n s:domain Task;\n s:range Tracker.\n\nTracker a s:Class;\n s:label "tracker";\n s:comment """A set of issues and\n the constraints on how they evolve.\n To use this ontology, craete a new tracker.\n Copy an existing one or make up your own.""".\n\nissueClass a rdf:Property;\n s:label "all issues must be in";\n s:domain Tracker;\n s:range s:Class, State;\n s:comment """The class of issues which are allowed in this tracker.\n This is essemtial to the operation of the tracker,\n as it defines which states an issue can be in.\n (The issueClass must be a disjointUnionOf the state classes)""".\n\nissueCategory a rdf:Property;\n s:label "issue category";\n s:domain Tracker;\n s:range s:Class;\n s:comment """Issues may be categorized according to the\n subclasses of this class""".\n\nstateStore a rdf:Property;\n s:label "state store";\n s:domain Tracker;\n s:range doc:Document;\n s:comment """A read-write document.\n The state of the issues is modified here.\n When you set up a trcaker, thgis must be set to point\n to a writeble data resource on the web.""".\n\ntransactionStore\n a rdf:Property;\n s:label "transaction store";\n s:domain Tracker;\n s:range doc:Document;\n s:comment """An appendable document. Transactions and messsages\n can be written into here""".\n\nasigneeClass\n a rdf:Property;\n s:label "assignees must be";\n s:domain Tracker;\n s:range s:Class; # Subclass of foaf:Agent\n s:comment """When an issue is assigned, the assignee must be from this class""".\n\ninitialState\n a rdf:Property;\n s:label "initial state"@en;\n s:label "état initial"@fr;\n s:domain Tracker;\n s:range State;\n s:comment """The initial state for a new issue""".\n\n# Use this to link a project to a tracker\ndoap:bug-database owl:inverseOf [ s:label "project"@en ].\n\n\n\n\n############################################################\n#\n# Finite state machines\n#\nChange a s:Class;\n s:label "change";\n s:comment """The universal class of things which\nchange the state of a task.\nIncluded now: Creation, Transition. (Maybe in the future\nmore π-calculus constructions such as splitting & merging tasks,\nand import/export of obligations to a foreign opaque system.)\n""".\n\nTransition a s:Class; s:subClassOf Change;\n s:label "transition";\n s:comment """A transition is a change of state of\na task. Typical properties include date and/or source\n(a document causing the transition), and a final state.""".\n\nCreation a s:Class; s:subClassOf Change;\n s:label "creation";\n s:comment """A creation is a change from existence\nto non-existence\na task. Typical properties include date and/or source\n(a document causing the transition), and a final state.""".\n\n\ndate s:range DateTime.\n\nfinal a rdf:Property;\n s:label "to";\n s:domain Transition;\n s:range State.\n\ntask a rdf:Property;\n s:range Task;\n s:label "task".\n\nrequires a rdf:Property;\n s:label "requires";\n s:domain Transition;\n s:range rdf:List; # Of properties for validation\n s:comment """To be a valid transition,\n a necessary (but not necessarily sufficuent) condition\n is that there be recorded these properties for the record""".\n\naffects a rdf:Property;\n s:label "affects";\n s:domain doc:Work;\n s:range Task.\n\n\n# { ?x a Transition; task ?t; source ?doc } => { ?doc affects ?t }.\n\n\ncreates a rdf:Property;\n s:label "creates";\n s:domain doc:Work;\n s:range Task.\n\n\nallowedTransitions a rdf:Property;\n s:domain State;\n s:range rdf:List; # @@@ of Action\n s:label "allowed transitions";\n s:comment """The state machine is defined\n by these lists of transition allowed for each issue.\n (An interesting option in the Web is to make an allowed transition\n to a state in soemone else\'s ontology, which in turn allows\n transitions into many ontologies. So a finite state maxchine\n may become very large. In practice this means that a task handed\n off to another organization may be processed on all kinds of ways.)""".\n\n# { ?x a TerminalState} => { ?x allowedTransitions () }.\n\nfinal a rdf:Property;\n s:label "to";\n s:range State.\n\nissue a rdf:Property;\n s:label "issue";\n s:comment\n """A transition changes the state of the given issue.""".\n\nsource a rdf:Property;\n s:label "source";\n s:comment """The source of a transition is\n the document by which it happened""";\n s:range doc:Work.\nTerminalState a s:Class;\n s:subClassOf State;\n s:label "terminal state";\n s:comment """A state from which there are no transitions.""".\n\nNonTerminalState a s:Class;\n s:label "non-terminal state";\n owl:disjointWith TerminalState;\n s:comment """A state from which there are transitions.""".\n\n######################################################\n\n#ends\n'},264:e=>{e.exports=t},324:(e,n,t)=>{t.d(n,{newIssueForm:()=>r});var s=t(426),i=t(264);function r(e,n,t,r,o){const a=e.createElement("div"),l=n.any(t,s.ns.wf("stateStore")),u=n.any(t,s.ns.wf("issueClass")),c=s.utils.label(u);a.innerHTML="<h2>Add new "+(r?"sub ":"")+c+"</h2><p>Title of new "+c+":</p>";const d=e.createElement("input");return d.setAttribute("type","text"),d.setAttribute("style","margin: 0.5em; font-size: 100%; padding: 0.3em;"),d.setAttribute("size","100"),d.setAttribute("maxLength","2048"),d.select(),d.addEventListener("keyup",function(e){13===e.keyCode&&function(){d.setAttribute("class","pendingedit"),d.disabled=!0;const e=[],u=n.anyValue(t,s.ns.wf("issueURITemplate")),c=u?n.sym(function(e){const n=new i.Literal(new Date),t=""+(new Date).getTime(),s=n.value.slice(0,4),r=n.value.slice(5,7),o=n.value.slice(8,10);return e.replace("{N}",t).replace("{YYYY}",s).replace("{MM}",r).replace("{DD}",o)}(i.uri.join(u,l.uri))):n.sym(l.uri+"#Iss"+(new Date).getTime()),p=c.doc(),f=n.literal(d.value);e.push(new i.Statement(c,s.ns.wf("tracker"),t,l)),e.push(new i.Statement(c,s.ns.dc("title"),f,l)),e.push(new i.Statement(c,s.ns.dct("created"),new Date,l));const m=r?n.each(r,s.ns.rdf("type"),null,r.doc()):n.each(t,s.ns.wf("initialState"));for(const n of m)e.push(new i.Statement(c,s.ns.rdf("type"),n,l));r&&e.push(new i.Statement(r,s.ns.wf("dependent"),c,l)),u&&(e.push(new i.Statement(c,s.ns.wf("tracker"),t,p)),e.push(new i.Statement(c,s.ns.rdfs("seeAlso"),l,p))),n.updater.update([],e,function(e,n,t){n?(a.parentNode.removeChild(a),o(c)):console.log("Error: can't save new issue:"+t)})}()},!1),a.appendChild(d),d.focus(),a}},426:n=>{n.exports=e},663:e=>{e.exports=n},685:(e,n,t)=>{t.d(n,{csvButton:()=>o});var s=t(426),i=t(663);function r(e){const n=e.replaceAll("\n"," ");if(!n.includes(","))return n;const t='"'+n.replaceAll('"','""')+'"';if(console.log("Quoted: >>>"+t+"<<<"),t.slice(1,-1).replaceAll('""',"").includes('"'))throw new Error("CSV inconsistecy");return t}function o(e,n){const t=e.createElement("div"),o=s.widgets.button(e,s.icons.iconBase+"noun_Document_998605.svg","Copy as CSV",async e=>{const t=o.parentNode.parentNode;console.log("button gparent div",t),t.addEventListener("copy",e=>{const t=function(e,n){const t=e.any(n,s.ns.wf("stateStore")),i=e.each(null,s.ns.wf("tracker"),n,t);console.log(" CSV: Tasks:",i.length);const o=[{label:"Name",predicate:s.ns.dc("title")}],a=e.any(n,s.ns.wf("issueClass"));console.log(" CSV: States - main superclass:",a);const l={label:"State",category:a};console.log(" CSV: found column from state",l),o.push(l);const u=e.each(n,s.ns.wf("issueCategory"));console.log(" CSV: Categories : ",u),console.log(" CSV: Categories : length: ",u.length),console.log(" CSV: Categories : first: ",u[0]);const c=u;for(const e of c){const n={label:s.utils.label(e),category:e};console.log(" CSV: found column from classifications",n),o.push(n)}const d=e.any(n,s.ns.wf("extrasEntryForm"),null,null);if(console.log(" CSV: Form : ",d),d){const n=e.any(d,s.ns.ui("parts"),null,d.doc());console.log(" CSV: parts : ",n);const t=n.elements;console.log(" CSV: fields : ",t);for(const n of t){const t=e.any(n,s.ns.ui("property"));if(t){const e={label:s.utils.label(t),predicate:t};console.log(" CSV: found column from form",e),o.push(e)}}}o.push({label:"Description",predicate:s.ns.wf("description")}),console.log("Columns: ",o.length);const p=o.map(e=>e.label).join(",")+"\n";return console.log("CSV: Header= ",p),p+i.map(function(n){return o.map(t=>function(n,t){let i;if(t.predicate)return i=e.any(n,t.predicate),i?i.value:"--";if(!t.category)throw new Error("wot no pred or cat",t);{const r=e.each(n,s.ns.rdf("type"));for(const n of r)e.holds(n,s.ns.rdfs("subClassOf"),t.category)&&(i=n);if(!i)return"?"+s.utils.label(t.category)}return s.utils.label(i)}(n,t)).map(r).join(",")+"\n"}).join("")}(i.store,n);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/csv",t),alert("Copy data: "+t),e.preventDefault()})});return t.appendChild(o),t}},719:(e,n,t)=>{t.d(n,{newTrackerButton:()=>l});var s=t(426),i=t(264),r=t(663);const o=s.ns,a=r.store.updater;function l(e,n){const t=s.login.newAppInstance(n.dom,{noun:"tracker"},function(t,r){function l(e){if(void 0!==e.elements)return e.elements.map(l);if(void 0===e.uri)return e;let n=e.uri;return n===p.uri?f:(n.slice(0,h.length)===h&&(n=r+n.slice(h.length)),d.sym(n))}const u="issuetracker.w3.org",c=s.ns.space,d=n.session.store;if(!r&&("/"!==(r=d.any(t,c("uriPrefix")).value).slice(-1)&&(i.log.error(u+": No / at end of uriPrefix "+r),r+="/"),r+=u+"/"+(new Date).getTime()+"/",!confirm("Make new tracker at "+r+"?")))return;const p=d.any(e,o.wf("stateStore")),f=d.sym(r+"store.ttl"),m=e.doc(),h=m.uri.slice(0,m.uri.lastIndexOf("/")+1),w=l(m),g=l(e),y=d.statementsMatching(void 0,void 0,void 0,m);for(let e=0;e<y.length;e++){const n=y[e];d.add(l(n.subject),l(n.predicate),l(n.object),w)}d.add(g,s.ns.space("inspiration"),e,p),d.add(g,s.ns.space("inspiration"),e,w),a.put(w,d.statementsMatching(void 0,void 0,void 0,w),"text/turtle",function(e,n,t){n?a.put(f,[],"text/turtle",function(e,n,t){n?console.info("Ok The tracker created OK at: "+g.uri+"\nMake a note of it, bookmark it. "):console.log("FAILED to set up new store at: "+f.uri+" : "+t)}):console.log("FAILED to save new tracker at: "+w.uri+" : "+t)})});return t.setAttribute("style","margin: 0.5em 1em;"),t}}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var t=i[e]={exports:{}};return s[e](t,t.exports,r),t.exports}r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};r.r(o),r.d(o,{default:()=>w});var a=r(426),l=r(663),u=r(85),c=r(178),d=r(719),p=r(324),f=r(685),m=r(264);const h=l.store,w={icon:a.icons.iconBase+"noun_122196.svg",name:"issue",audience:[],label:function(e,n){const t=h.findTypeURIs(e);return t["http://www.w3.org/2005/01/wf/flow#Task"]||h.holds(e,a.ns.wf("tracker"))?"issue":t["http://www.w3.org/2005/01/wf/flow#Tracker"]?"tracker":null},mintClass:a.ns.wf("Tracker"),mintNew:async function(e,n){const t=e.session.store;let s;n.newInstance?s=t.sym(n.newInstance.doc().uri+"_state.ttl"):(n.newInstance=t.sym(n.newBase+"index.ttl#this"),s=t.sym(n.newBase+"state.ttl"));const i=n.newInstance,r=i.doc(),o=l.authn.currentUser();o&&t.add(i,a.ns.dc("author"),o,r),t.add(i,a.ns.rdf("type"),a.ns.wf("Tracker"),r),t.add(i,a.ns.dc("created"),new Date,r),t.add(i,a.ns.wf("issueClass"),a.ns.wf("Task"),r),t.add(i,a.ns.wf("initialState"),a.ns.wf("Open"),r),t.add(i,a.ns.wf("stateStore"),s,r),t.add(i,a.ns.wf("assigneeClass"),a.ns.foaf("Person"),r),t.add(i,a.ns.wf("stateStore"),s,s);const u=t.statementsMatching(void 0,void 0,void 0,r).concat(t.statementsMatching(void 0,void 0,void 0,s));try{await async function(e,n){const s=e.concat(n).map(e=>e.why),i=Array.from(new Set(s)).map(s=>t.updater.update(e.filter(e=>e.why.sameTerm(s)),n.filter(e=>e.why.sameTerm(s))));return Promise.all(i)}([],u)}catch(n){return a.widgets.complain(e,"Error writing tracker configuration: "+n)}const c=e.dom;return n.div.appendChild(c.createElement("div")).innerHTML=`<h4>Success</h4>\n <p>Your <a href="${i.uri}">new tracker</a> has been made.\n Use the settings tab to configure it.\n </p>\n `,n},render:function(e,n){const t=n.dom,s=t.createElement("div");function i(e){console.warn(e),s.appendChild(a.widgets.errorMessageBlock(t,e))}function o(e,n){e||i(n)}function w(e,s){const r=h.any(e,a.ns.wf("issueClass")),o=(s=s||r).sameTerm(r),l=h.any(s,a.ns.owl("disjointUnionOf"));if(!l)return i(`Configuration error: state ${r} does not have substates`);let d=l.elements;o&&d.length>2&&(d=d.filter(e=>h.holds(e,a.ns.rdfs("subClassOf"),a.ns.wf("Open"))||e.sameTerm(a.ns.wf("Open"))));const p={columnDropHandler:async function(e,t){const i=(0,c.getState)(e,s),r=h.the(e,a.ns.wf("tracker"),null,e.doc()),o=h.any(r,a.ns.wf("stateStore"));if(!t.sameTerm(i)){try{await h.updater.update([m.st(e,a.ns.rdf("type"),i,o)],[m.st(e,a.ns.rdf("type"),t,o)])}catch(e){a.widgets.complain(n,"Unable to change