@evotecit/canopyx 0.2.2 → 0.3.3

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 (34) hide show
  1. package/CanopyX.Html/Assets/canopyx-editing.css +1 -6
  2. package/CanopyX.Html/Assets/canopyx-editing.js +4 -39
  3. package/CanopyX.Html/Assets/canopyx-export.js +2 -2
  4. package/CanopyX.Html/Assets/canopyx-flow-entry.css +178 -0
  5. package/CanopyX.Html/Assets/canopyx-flow-entry.js +78 -0
  6. package/CanopyX.Html/Assets/canopyx-flow-module.mjs +80 -0
  7. package/CanopyX.Html/Assets/canopyx-flow.css +180 -0
  8. package/CanopyX.Html/Assets/canopyx-flow.js +214 -0
  9. package/CanopyX.Html/Assets/canopyx-forms.css +8 -0
  10. package/CanopyX.Html/Assets/canopyx-forms.js +39 -0
  11. package/CanopyX.Html/Assets/canopyx-grid-module.mjs +18 -14
  12. package/CanopyX.Html/Assets/canopyx-grid.css +2 -0
  13. package/CanopyX.Html/Assets/canopyx-grid.js +18 -14
  14. package/CanopyX.Html/Assets/canopyx-interactive.js +10 -9
  15. package/CanopyX.Html/Assets/canopyx-labels-de.js +72 -0
  16. package/CanopyX.Html/Assets/canopyx-labels-es.js +72 -0
  17. package/CanopyX.Html/Assets/canopyx-labels-fr.js +72 -0
  18. package/CanopyX.Html/Assets/canopyx-labels-it.js +72 -0
  19. package/CanopyX.Html/Assets/canopyx-labels-pl.js +72 -0
  20. package/CanopyX.Html/Assets/canopyx-module.mjs +10 -9
  21. package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +18 -14
  22. package/CanopyX.Html/Assets/canopyx-reporting.css +2 -0
  23. package/CanopyX.Html/Assets/canopyx-reporting.js +18 -14
  24. package/CanopyX.Html/Assets/canopyx.js +10 -9
  25. package/JavaScript/flow.d.ts +232 -0
  26. package/JavaScript/grid.d.ts +8 -5
  27. package/JavaScript/hosts.d.ts +3 -1
  28. package/JavaScript/locales/de.mjs +72 -0
  29. package/JavaScript/locales/es.mjs +72 -0
  30. package/JavaScript/locales/fr.mjs +72 -0
  31. package/JavaScript/locales/it.mjs +72 -0
  32. package/JavaScript/locales/pl.mjs +72 -0
  33. package/README.md +3 -2
  34. package/package.json +20 -1
@@ -55,15 +55,15 @@ return{rank:1,value:String(value)}}
55
55
  function compareKeys(a,b,direction){if(a.rank!==b.rank){return a.rank-b.rank}
56
56
  if(a.rank===2){return 0}
57
57
  const order=a.rank===0?(a.value<b.value?-1:a.value>b.value?1:0):collator.compare(a.value,b.value);return order*direction}
58
- let DEFAULT_LABELS=Object.freeze({searchPlaceholder:"Search",searchResults:"Search results",searchResultCount:"{count} results",searchResultCountOfTotal:"{count} of {total} results",searchResultCountOfMany:"{count} of many results",searchNoResults:"No results",searchTooShort:"Type at least {min} characters",searchWordTooShort:"Type a word of at least {min} characters",searchFailed:"Search failed: {error}",columns:"Columns",visibleColumns:"Visible columns",resizeColumn:"Resize {column}",columnWidth:"{width} pixels",loading:"Loading…",loadError:"Could not load: {error} (Enter to retry)",queryFailed:"Could not update the view: {error}",showMore:"Show more ({loaded} of {total} loaded)",showMoreUnknownTotal:"Show more ({loaded} loaded)",pageLoaded:"{loaded} of {total} loaded",itemsLoaded:"{count} items",yes:"Yes",no:"No",utcTime:"{time} UTC",localTime:"{time} local time",mountError:"This view could not be displayed: {error}"});function labelsFor(...sources){const labels=Object.assign({},DEFAULT_LABELS);for(const source of sources){if(source==null)continue;if(typeof source!=="object"||Array.isArray(source))throw new Error("CanopyX: labels must be an object of strings.");Object.keys(source).forEach((name)=>{if(!Object.hasOwn(DEFAULT_LABELS,name)&&!/^(?:gridEdit|format|calendar)[A-Z]\w{0,63}$/.test(name)) throw new Error("CanopyX: there is no label '" + name + "'.");
59
- if(typeof source[name]!=="string"||!/\S/.test(source[name])) throw new Error("CanopyX: label '" + name + "' must be a string with visible text.");
60
- if((name==="utcTime"||name==="localTime")&&source[name].indexOf("{time}")<0)throw new Error("CanopyX: label '"+name+"' must hold {time}.");labels[name]=source[name]})}
61
- return Object.freeze(labels)}
62
58
  function fill(template,values){return template.replace(/\{(\w+)\}/g, (match, name) => (values && Object.hasOwn(values, name) ? String(values[name]) : match));
63
59
  }
64
60
  const pluralRules=new Map();function plural(template,count,lang){if(!template.startsWith("["))return template;const forms={};for(const match of template.matchAll(/\[(zero|one|two|few|many|other)\]([^[]*)/g)) forms[match[1]] = match[2];
65
61
  let rules=pluralRules.get(lang);if(!rules){try{rules=new Intl.PluralRules(lang||"en")}catch(_){rules=new Intl.PluralRules("en")}pluralRules.set(lang,rules)}
66
62
  return forms[rules.select(Number(count))]??forms.other??template}
63
+ let DEFAULT_LABELS=Object.freeze({searchPlaceholder:"Search",searchResults:"Search results",searchResultCount:"{count} results",searchResultCountOfTotal:"{count} of {total} results",searchResultCountOfMany:"{count} of many results",searchNoResults:"No results",searchTooShort:"Type at least {min} characters",searchWordTooShort:"Type a word of at least {min} characters",searchFailed:"Search failed: {error}",columns:"Columns",visibleColumns:"Visible columns",resizeColumn:"Resize {column}",columnWidth:"{width} pixels",loading:"Loading…",loadError:"Could not load: {error} (Enter to retry)",queryFailed:"Could not update the view: {error}",showMore:"Show more ({loaded} of {total} loaded)",showMoreUnknownTotal:"Show more ({loaded} loaded)",pageLoaded:"{loaded} of {total} loaded",itemsLoaded:"{count} items",yes:"Yes",no:"No",utcTime:"{time} UTC",localTime:"{time} local time",mountError:"This view could not be displayed: {error}"});function labelsFor(...sources){const labels=Object.assign({},DEFAULT_LABELS);for(const source of sources){if(source==null)continue;if(typeof source!=="object"||Array.isArray(source))throw new Error("CanopyX: labels must be an object of strings.");Object.keys(source).forEach((name)=>{if(!Object.hasOwn(DEFAULT_LABELS,name)&&!/^(?:gridEdit|format|calendar|flow)[A-Z]\w{0,63}$/.test(name)) throw new Error("CanopyX: there is no label '" + name + "'.");
64
+ if(typeof source[name]!=="string"||!/\S/.test(source[name])) throw new Error("CanopyX: label '" + name + "' must be a string with visible text.");
65
+ if((name==="utcTime"||name==="localTime")&&source[name].indexOf("{time}")<0)throw new Error("CanopyX: label '"+name+"' must hold {time}.");labels[name]=source[name]})}
66
+ return Object.freeze(labels)}
67
67
  const numberFormats=new Map();function numberFormat(lang,minimum=0,maximum=3){const key=(lang||"")+ "|"+minimum+"|"+maximum;let format=numberFormats.get(key);if(!format){const digits={minimumFractionDigits:minimum,maximumFractionDigits:maximum};try{format=new Intl.NumberFormat(lang||undefined,digits)}catch(e){format=new Intl.NumberFormat(undefined,digits)}
68
68
  if(numberFormats.size>=16)numberFormats.delete(numberFormats.keys().next().value);numberFormats.set(key,format)}
69
69
  return format}
@@ -486,8 +486,9 @@ items.push(...page.items);total=page.total;next=page.next||null;if(next&&(next==
486
486
  fill(this.labels.itemsLoaded,{count:count.format(items.length)}));this.stateChanged()}});const EXPORT_FORMATS=new Map(),EXPORT_IMPL={},exportFormatId=id=>typeof id==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(id);
487
487
  const exportFormatIds=list=>Array.isArray(list)&&new Set(list).size===list.length&&list.every(exportFormatId);function exportFormat(format){if(!format||!exportFormatId(format.id)||format.id==="csv"||
488
488
  typeof format.label!=="string"||!format.label.trim()||typeof format.extension!=="string"||!/^[a-z\d]{1,16}$/i.test(format.extension) ||
489
- format.mime!==undefined&&typeof format.mime!=="string"||typeof format.write!=="function")
490
- throw new Error("CanopyX: invalid export format.");return Object.freeze({id:format.id,label:format.label,extension:format.extension,mime:format.mime||"application/octet-stream",write:format.write})}
489
+ format.mime!==undefined&&typeof format.mime!=="string"||
490
+ format.showInMenu!==undefined&&typeof format.showInMenu!=="boolean"||typeof format.write!=="function")
491
+ throw new Error("CanopyX: invalid export format.");return Object.freeze({id:format.id,label:format.label,extension:format.extension,mime:format.mime||"application/octet-stream",showInMenu:format.showInMenu!==false,write:format.write})}
491
492
  function registerExportFormat(format){format=exportFormat(format);EXPORT_FORMATS.set(format.id,format);return()=>EXPORT_FORMATS.get(format.id)===format&&EXPORT_FORMATS.delete(format.id)}
492
493
  EXPORT_IMPL.formatsOf=function(grid){const list=grid.opts.exportFormats??grid.view.exportFormats,known=new Map(EXPORT_FORMATS);for(const format of grid.plugins.filter(item=>(grid.opts.plugins||[]).some(local=>local.name===item.name))
493
494
  .flatMap(item=>item.exportFormats||[]))known.set(format.id,exportFormat(format));if(list===undefined)return[...known.values()];const formats=Array.isArray(list)?list.map(item=>typeof item==="string"?known.get(item):exportFormat(item)).filter(Boolean):null;if(!formats||new Set(formats.map(format=>format.id)).size!==formats.length)throw new Error("CanopyX: invalid exportFormats.");return formats};function exportTimeout(grid,options){const timeout=options?.timeoutMs??grid.opts.exportTimeoutMs??600000;if(!Number.isInteger(timeout)||timeout<1||timeout>2147483647)throw new Error("CanopyX: invalid export timeout.");return timeout}
@@ -503,7 +504,7 @@ if(active>=0){list.children[active].setAttribute("aria-selected","false")}
503
504
  active=active<0?(delta<0?hits.length-1:0):(active+delta+hits.length)%hits.length;const item=list.children[active];item.setAttribute("aria-selected","true");input.setAttribute("aria-activedescendant",item.id);item.scrollIntoView({block:"nearest"})};input.addEventListener("input",()=>{cancelNavigation();sequence++;clearTimeout(timer);hits=[];close();timer=setTimeout(run,150)});input.addEventListener("keydown",(e)=>{if(e.defaultPrevented||e.isComposing)return;if(e.key==="ArrowDown"||e.key==="ArrowUp"){move(e.key==="ArrowDown"?1:-1)}else if(e.key==="Enter"){if(!list.hidden){choose(active>=0?active:0)}}else if(e.key==="Escape"){cancelNavigation();sequence++;clearTimeout(timer);if(list.hidden){input.value=""}
504
505
  close()}else{return}
505
506
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const position=()=>{if(!isOpen())return;const anchor=anchorElement.getBoundingClientRect(),fixed=getComputedStyle(panel).position==="fixed";const below=Math.max(0,global.innerHeight-anchor.bottom-8);const above=Math.max(0,anchor.top-8);const opensAbove=below<120&&above>below,room=opensAbove?above:below;panel.style.maxHeight=(panel.classList.contains("cx-fb")?room:Math.min(320,room))+ "px";panel.style.top=opensAbove?"auto":fixed?anchor.bottom+"px":"100%";panel.style.bottom=opensAbove?fixed?global.innerHeight-anchor.top+"px":"100%":"auto";const width=panel.getBoundingClientRect().width;panel.style.left=Math.max(8,Math.min(anchor.left,global.innerWidth-width-8))-(fixed?0:anchor.left)+ "px"};global.addEventListener("resize",position);global.addEventListener("scroll",position,true);return{position,dispose:()=>{global.removeEventListener("resize",position);global.removeEventListener("scroll",position,true)}}}
506
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"tree-tools":["ce442e100494535d","canopyx-tree-tools.149c371950d66a15.js","canopyx-tree-tools.ef7a3fb9c9115a82.css"],"export":["5673e642f32c2f4e","canopyx-export.01512af72a298711.js"],"links":["f1ab7e32b501ce37","canopyx-links.d96addeefb3eccf5.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"link":["fa0c9e888463553b","canopyx-link.4ec39bc39fa6cf50.js","canopyx-link.8435c892613926ac.css"],"highlight":["f39423961654c1e2","canopyx-highlight.a6f93893d36ab343.js","canopyx-highlight.5b6d2e0d979f9f9b.css"],"layouts":["fa8c686f21626884","canopyx-layouts.e7250c82a6abf52e.js","canopyx-layouts.0b75738924533ee8.css"],"record-panel":["bcc06276c7933af6","canopyx-record-panel.a374fb4254f9115c.js","canopyx-record-panel.f3691d54cefaab04.css"]},PART_CODE=new Map(),partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
507
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"tree-tools":["ce442e100494535d","canopyx-tree-tools.149c371950d66a15.js","canopyx-tree-tools.ef7a3fb9c9115a82.css"],"export":["8b99c0b7b0ec37c5","canopyx-export.6989ea36f5d6da7b.js"],"links":["f1ab7e32b501ce37","canopyx-links.d96addeefb3eccf5.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"link":["fa0c9e888463553b","canopyx-link.4ec39bc39fa6cf50.js","canopyx-link.8435c892613926ac.css"],"highlight":["f39423961654c1e2","canopyx-highlight.a6f93893d36ab343.js","canopyx-highlight.5b6d2e0d979f9f9b.css"],"layouts":["fa8c686f21626884","canopyx-layouts.e7250c82a6abf52e.js","canopyx-layouts.0b75738924533ee8.css"],"record-panel":["bcc06276c7933af6","canopyx-record-panel.a374fb4254f9115c.js","canopyx-record-panel.f3691d54cefaab04.css"]},PART_CODE=new Map(),partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
507
508
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
508
509
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
509
510
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -739,5 +740,5 @@ watcher.observe(host)}
739
740
  function mount(root,automatic){const scope=root||document;const created=[];const showError=(host,err,api,view)=>{if(api){api.destroy();if(host.canopyx===api)delete host.canopyx}
740
741
  const message=err&&err.message?err.message:String(err);let labels=DEFAULT_LABELS;for(const attempt of[()=>labelsFor(view&&view.labels,view&&configured.has(view.id)?configured.get(view.id).labels:null),()=>labelsFor(view&&view.labels)]){try{labels=attempt();break}catch(e){labels=DEFAULT_LABELS}}
741
742
  const notice=document.createElement("div");notice.className="cx-mount-error";notice.setAttribute("role","alert");setText(notice,fill(labels.mountError,{error:message}));host.classList.add("cx-host");host.setAttribute("data-canopyx-mounted","true");host.setAttribute("data-cx-error",message);host.appendChild(notice);if(global.console)global.console.error(err)};const selector="[data-canopyx-host]:not([data-canopyx-mounted])";(scope.matches?.(selector)?[scope]:scope.querySelectorAll(selector)).forEach((host)=>{const config=host.querySelector("script.cx-config"),mode=host.getAttribute("data-cx-mount");if(!config||(automatic===true&&mode==="manual")){return}
742
- if(mode==="visible"&&host!==scope&&global.IntersectionObserver)return mountWhenVisible(host);watcher?.unobserve(host);host.setAttribute("data-canopyx-mounted","true");let view=null;try{view=JSON.parse(config.textContent);if(view===Object(view))parsedViews.add(view);const create=view&&view.type==="grid"&&typeof createDataGrid==="function"?createDataGrid:createTreeGrid;const api=create(host,Object.assign({},view&&configured.get(view.id),{view}));created.push(api);api.ready.catch((err)=>{if(view.type!=="grid"&&activeGrids.get(host)===api&&host.canopyx===api)showError(host,err,api,view)})}catch(err){showError(host,err,null,view)}});return created}
743
- global.CanopyX=Object.freeze(Object.assign({protocol:PROTOCOL,createTreeGrid,configure,unconfigure,mount:(root)=>mount(root,false),sources:Object.freeze({inline:inlineSource,sidecar:sidecarSource,remote:remoteSource}),badge:hostBadge,labels:DEFAULT_LABELS,registerExportFormat,use,registerPart,setNonce},typeof GRID_API==="object"?GRID_API:{}));const navigation=global.performance&&performance.getEntriesByType?performance.getEntriesByType("navigation")[0]:null;if(document.readyState==="loading"||(document.readyState==="interactive"&&navigation&&navigation.domContentLoadedEventStart===0)){document.addEventListener("DOMContentLoaded",()=>mount(document,true))}else{mount(document,true)}})(typeof window!=="undefined"?window:this);
743
+ if(mode==="visible"&&host!==scope&&global.IntersectionObserver)return mountWhenVisible(host);watcher?.unobserve(host);host.setAttribute("data-canopyx-mounted","true");let view=null;try{view=JSON.parse(config.textContent);if(view===Object(view))parsedViews.add(view);const flow=view&&view.kind==="flow"&&typeof FLOW_API==="object";const create=flow?FLOW_API.createFlow:view&&view.type==="grid"&&typeof createDataGrid==="function"?createDataGrid:createTreeGrid;const api=create(host,Object.assign({},view&&configured.get(view.id),flow?{flow:view}:{view}));created.push(api);api.ready.catch((err)=>{if(view.type!=="grid"&&activeGrids.get(host)===api&&host.canopyx===api)showError(host,err,api,view)})}catch(err){showError(host,err,null,view)}});return created}
744
+ global.CanopyX=Object.freeze(Object.assign({protocol:PROTOCOL,createTreeGrid,configure,unconfigure,mount:(root)=>mount(root,false),sources:Object.freeze({inline:inlineSource,sidecar:sidecarSource,remote:remoteSource}),badge:hostBadge,labels:DEFAULT_LABELS,registerExportFormat,use,registerPart,setNonce},typeof GRID_API==="object"?GRID_API:{},typeof FLOW_API==="object"?FLOW_API:{}));const navigation=global.performance&&performance.getEntriesByType?performance.getEntriesByType("navigation")[0]:null;if(document.readyState==="loading"||(document.readyState==="interactive"&&navigation&&navigation.domContentLoadedEventStart===0)){document.addEventListener("DOMContentLoaded",()=>mount(document,true))}else{mount(document,true)}})(typeof window!=="undefined"?window:this);
@@ -517,6 +517,78 @@ const labels = Object.freeze({
517
517
  calendarOutsideRange: "Außerhalb des Zeitraums dieses Kalenders",
518
518
  calendarClose: "Schließen",
519
519
  calendarDetailsOf: "Details zu {title}",
520
+ flowSteps: "Schritte",
521
+ flowStepOf: "Schritt {current} von {count}",
522
+ flowStepAnnounce: "Schritt {current} von {count}, {title}",
523
+ flowNext: "Weiter",
524
+ flowBack: "Zurück",
525
+ flowSubmit: "Senden",
526
+ flowSubmitting: "Wird gesendet…",
527
+ flowReviewTitle: "Angaben prüfen",
528
+ flowChange: "Ändern",
529
+ flowChangeField: "{field} ändern",
530
+ flowNotProvided: "Nicht angegeben",
531
+ flowOptional: "(optional)",
532
+ flowStepOptional: "Optional",
533
+ flowStepComplete: "Erledigt",
534
+ flowStepCurrent: "Aktueller Schritt",
535
+ flowStepErrors: "Fehler: {count}",
536
+ flowStepLocked: "Zuerst die vorherigen Schritte abschließen",
537
+ flowStepNotStarted: "Nicht begonnen",
538
+ flowErrorSummary: "Bitte korrigieren Sie diese Angaben, bevor Sie fortfahren",
539
+ flowReady: "Bereit zum Senden",
540
+ flowNotReady: "Zu korrigierende Fehler: {count}",
541
+ flowWarnings: "Warnungen: {count}",
542
+ flowChangesOnly: "Nur Änderungen anzeigen",
543
+ flowNoChanges: "Keine Angabe wurde geändert.",
544
+ flowWas: "Vorher: {value}",
545
+ flowChangedCount: "Geänderte Angaben: {count}",
546
+ flowSecretSet: "Festgelegt",
547
+ flowSecretKept: "Unverändert",
548
+ flowSecretNotSet: "Nicht festgelegt",
549
+ flowSecretHint: "Ein Wert ist gespeichert. Leer lassen, um ihn zu behalten.",
550
+ flowSecretShow: "Anzeigen",
551
+ flowSecretHide: "Verbergen",
552
+ flowSecretReveal: "{field} anzeigen",
553
+ flowOn: "Ein",
554
+ flowOff: "Aus",
555
+ flowAdd: "Hinzufügen",
556
+ flowAddItem: "Zu {field} hinzufügen",
557
+ flowRemoveItem: "{item} entfernen",
558
+ flowItemLabel: "{field}, Eintrag {index}",
559
+ flowSelectAll: "Alle auswählen",
560
+ flowSelectNone: "Leeren",
561
+ flowSelectedCount: "{count} von {total} ausgewählt",
562
+ flowUnit: "Einheit",
563
+ flowUnitSeconds: "Sekunden",
564
+ flowUnitMinutes: "Minuten",
565
+ flowUnitHours: "Stunden",
566
+ flowUnitDays: "Tage",
567
+ flowSeconds: "[one]{count} Sekunde[other]{count} Sekunden",
568
+ flowMinutes: "[one]{count} Minute[other]{count} Minuten",
569
+ flowHours: "[one]{count} Stunde[other]{count} Stunden",
570
+ flowDays: "[one]{count} Tag[other]{count} Tage",
571
+ flowDurationInvalid: "{field} muss eine ganze Zahl sein.",
572
+ flowItemsMin: "{field} braucht mindestens {min}.",
573
+ flowItemsMax: "{field} erlaubt höchstens {max}.",
574
+ flowItemEmail: "„{item}“ ist keine E-Mail-Adresse.",
575
+ flowItemHost: "„{item}“ ist kein Hostname.",
576
+ flowItemIp: "„{item}“ ist keine IP-Adresse.",
577
+ flowItemCidr: "„{item}“ ist kein Netzwerkbereich.",
578
+ flowItemUrl: "„{item}“ ist keine Webadresse.",
579
+ flowItemPattern: "„{item}“ hat nicht das erwartete Format.",
580
+ flowSaved: "Gespeichert",
581
+ flowAccepted: "In Bearbeitung",
582
+ flowProgress: "{done} von {total}",
583
+ flowConflict: "Diese Einstellungen wurden während Ihrer Bearbeitung geändert.",
584
+ flowReload: "Aktuelle Einstellungen neu laden",
585
+ flowNotSubmitted: "Die Angaben wurden nicht gesendet.",
586
+ flowNoHost: "Kein Host hat die Angaben empfangen.",
587
+ flowStartAgain: "Neu beginnen",
588
+ flowCopy: "Kopieren",
589
+ flowCopied: "Kopiert",
590
+ flowSavedIt: "Ich habe es gespeichert",
591
+ flowShownOnce: "Wird nur einmal angezeigt. Jetzt kopieren.",
520
592
  });
521
593
  const staticLabels = Object.freeze({
522
594
  overflowNote: "{shown} Zeilen angezeigt. Gesamtzahl: {total}.",
@@ -517,6 +517,78 @@ const labels = Object.freeze({
517
517
  calendarOutsideRange: "Fuera de las fechas que muestra este calendario",
518
518
  calendarClose: "Cerrar",
519
519
  calendarDetailsOf: "Detalles de {title}",
520
+ flowSteps: "Pasos",
521
+ flowStepOf: "Paso {current} de {count}",
522
+ flowStepAnnounce: "Paso {current} de {count}, {title}",
523
+ flowNext: "Siguiente",
524
+ flowBack: "Atrás",
525
+ flowSubmit: "Enviar",
526
+ flowSubmitting: "Enviando…",
527
+ flowReviewTitle: "Revise sus respuestas",
528
+ flowChange: "Cambiar",
529
+ flowChangeField: "Cambiar {field}",
530
+ flowNotProvided: "No indicado",
531
+ flowOptional: "(opcional)",
532
+ flowStepOptional: "Opcional",
533
+ flowStepComplete: "Completado",
534
+ flowStepCurrent: "Paso actual",
535
+ flowStepErrors: "Errores: {count}",
536
+ flowStepLocked: "Complete primero los pasos anteriores",
537
+ flowStepNotStarted: "Sin empezar",
538
+ flowErrorSummary: "Corrija esto antes de continuar",
539
+ flowReady: "Listo para enviar",
540
+ flowNotReady: "Errores por corregir: {count}",
541
+ flowWarnings: "Advertencias: {count}",
542
+ flowChangesOnly: "Mostrar solo los cambios",
543
+ flowNoChanges: "No ha cambiado ninguna respuesta.",
544
+ flowWas: "Antes: {value}",
545
+ flowChangedCount: "Respuestas cambiadas: {count}",
546
+ flowSecretSet: "Establecido",
547
+ flowSecretKept: "Sin cambios",
548
+ flowSecretNotSet: "Sin establecer",
549
+ flowSecretHint: "Hay un valor guardado. Déjelo en blanco para conservarlo.",
550
+ flowSecretShow: "Mostrar",
551
+ flowSecretHide: "Ocultar",
552
+ flowSecretReveal: "Mostrar {field}",
553
+ flowOn: "Activado",
554
+ flowOff: "Desactivado",
555
+ flowAdd: "Añadir",
556
+ flowAddItem: "Añadir a {field}",
557
+ flowRemoveItem: "Quitar {item}",
558
+ flowItemLabel: "{field}, elemento {index}",
559
+ flowSelectAll: "Seleccionar todo",
560
+ flowSelectNone: "Borrar",
561
+ flowSelectedCount: "{count} de {total} seleccionados",
562
+ flowUnit: "Unidad",
563
+ flowUnitSeconds: "segundos",
564
+ flowUnitMinutes: "minutos",
565
+ flowUnitHours: "horas",
566
+ flowUnitDays: "días",
567
+ flowSeconds: "[one]{count} segundo[other]{count} segundos",
568
+ flowMinutes: "[one]{count} minuto[other]{count} minutos",
569
+ flowHours: "[one]{count} hora[other]{count} horas",
570
+ flowDays: "[one]{count} día[other]{count} días",
571
+ flowDurationInvalid: "{field} debe ser un número entero.",
572
+ flowItemsMin: "{field} necesita al menos {min}.",
573
+ flowItemsMax: "{field} admite como máximo {max}.",
574
+ flowItemEmail: "«{item}» no es una dirección de correo.",
575
+ flowItemHost: "«{item}» no es un nombre de host.",
576
+ flowItemIp: "«{item}» no es una dirección IP.",
577
+ flowItemCidr: "«{item}» no es un rango de red.",
578
+ flowItemUrl: "«{item}» no es una dirección web.",
579
+ flowItemPattern: "«{item}» no tiene el formato esperado.",
580
+ flowSaved: "Guardado",
581
+ flowAccepted: "En curso",
582
+ flowProgress: "{done} de {total}",
583
+ flowConflict: "Esta configuración cambió mientras la editaba.",
584
+ flowReload: "Volver a cargar la configuración actual",
585
+ flowNotSubmitted: "Las respuestas no se enviaron.",
586
+ flowNoHost: "Ningún host recibió las respuestas.",
587
+ flowStartAgain: "Empezar otro",
588
+ flowCopy: "Copiar",
589
+ flowCopied: "Copiado",
590
+ flowSavedIt: "Lo he guardado",
591
+ flowShownOnce: "Se muestra solo una vez. Cópielo ahora.",
520
592
  });
521
593
  const staticLabels = Object.freeze({
522
594
  overflowNote: "Filas mostradas: {shown}. Total: {total}.",
@@ -517,6 +517,78 @@ const labels = Object.freeze({
517
517
  calendarOutsideRange: "En dehors des dates de ce calendrier",
518
518
  calendarClose: "Fermer",
519
519
  calendarDetailsOf: "Détails de {title}",
520
+ flowSteps: "Étapes",
521
+ flowStepOf: "Étape {current} sur {count}",
522
+ flowStepAnnounce: "Étape {current} sur {count}, {title}",
523
+ flowNext: "Suivant",
524
+ flowBack: "Retour",
525
+ flowSubmit: "Envoyer",
526
+ flowSubmitting: "Envoi…",
527
+ flowReviewTitle: "Vérifiez vos réponses",
528
+ flowChange: "Modifier",
529
+ flowChangeField: "Modifier {field}",
530
+ flowNotProvided: "Non renseigné",
531
+ flowOptional: "(facultatif)",
532
+ flowStepOptional: "Facultative",
533
+ flowStepComplete: "Terminée",
534
+ flowStepCurrent: "Étape actuelle",
535
+ flowStepErrors: "Erreurs : {count}",
536
+ flowStepLocked: "Terminez d'abord les étapes précédentes",
537
+ flowStepNotStarted: "Non commencée",
538
+ flowErrorSummary: "Corrigez ces points avant de continuer",
539
+ flowReady: "Prêt à envoyer",
540
+ flowNotReady: "Erreurs à corriger : {count}",
541
+ flowWarnings: "Avertissements : {count}",
542
+ flowChangesOnly: "Afficher uniquement les modifications",
543
+ flowNoChanges: "Aucune réponse n'a changé.",
544
+ flowWas: "Avant : {value}",
545
+ flowChangedCount: "Réponses modifiées : {count}",
546
+ flowSecretSet: "Défini",
547
+ flowSecretKept: "Inchangé",
548
+ flowSecretNotSet: "Non défini",
549
+ flowSecretHint: "Une valeur est enregistrée. Laissez vide pour la conserver.",
550
+ flowSecretShow: "Afficher",
551
+ flowSecretHide: "Masquer",
552
+ flowSecretReveal: "Afficher {field}",
553
+ flowOn: "Activé",
554
+ flowOff: "Désactivé",
555
+ flowAdd: "Ajouter",
556
+ flowAddItem: "Ajouter à {field}",
557
+ flowRemoveItem: "Retirer {item}",
558
+ flowItemLabel: "{field}, élément {index}",
559
+ flowSelectAll: "Tout sélectionner",
560
+ flowSelectNone: "Effacer",
561
+ flowSelectedCount: "{count} sur {total} sélectionnés",
562
+ flowUnit: "Unité",
563
+ flowUnitSeconds: "secondes",
564
+ flowUnitMinutes: "minutes",
565
+ flowUnitHours: "heures",
566
+ flowUnitDays: "jours",
567
+ flowSeconds: "[one]{count} seconde[other]{count} secondes",
568
+ flowMinutes: "[one]{count} minute[other]{count} minutes",
569
+ flowHours: "[one]{count} heure[other]{count} heures",
570
+ flowDays: "[one]{count} jour[other]{count} jours",
571
+ flowDurationInvalid: "{field} doit être un nombre entier.",
572
+ flowItemsMin: "{field} : au moins {min}.",
573
+ flowItemsMax: "{field} : au plus {max}.",
574
+ flowItemEmail: "« {item} » n'est pas une adresse e-mail.",
575
+ flowItemHost: "« {item} » n'est pas un nom d'hôte.",
576
+ flowItemIp: "« {item} » n'est pas une adresse IP.",
577
+ flowItemCidr: "« {item} » n'est pas une plage réseau.",
578
+ flowItemUrl: "« {item} » n'est pas une adresse web.",
579
+ flowItemPattern: "« {item} » n'a pas le format attendu.",
580
+ flowSaved: "Enregistré",
581
+ flowAccepted: "En cours",
582
+ flowProgress: "{done} sur {total}",
583
+ flowConflict: "Ces paramètres ont changé pendant que vous les modifiiez.",
584
+ flowReload: "Recharger les paramètres actuels",
585
+ flowNotSubmitted: "Les réponses n'ont pas été envoyées.",
586
+ flowNoHost: "Aucun hôte n'a reçu les réponses.",
587
+ flowStartAgain: "Recommencer",
588
+ flowCopy: "Copier",
589
+ flowCopied: "Copié",
590
+ flowSavedIt: "Je l'ai enregistré",
591
+ flowShownOnce: "Affiché une seule fois. Copiez-le maintenant.",
520
592
  });
521
593
  const staticLabels = Object.freeze({
522
594
  overflowNote: "{shown} lignes affichées sur {total}.",
@@ -517,6 +517,78 @@ const labels = Object.freeze({
517
517
  calendarOutsideRange: "Al di fuori delle date di questo calendario",
518
518
  calendarClose: "Chiudi",
519
519
  calendarDetailsOf: "Dettagli di {title}",
520
+ flowSteps: "Passaggi",
521
+ flowStepOf: "Passaggio {current} di {count}",
522
+ flowStepAnnounce: "Passaggio {current} di {count}, {title}",
523
+ flowNext: "Avanti",
524
+ flowBack: "Indietro",
525
+ flowSubmit: "Invia",
526
+ flowSubmitting: "Invio in corso…",
527
+ flowReviewTitle: "Controlla le risposte",
528
+ flowChange: "Modifica",
529
+ flowChangeField: "Modifica {field}",
530
+ flowNotProvided: "Non indicato",
531
+ flowOptional: "(facoltativo)",
532
+ flowStepOptional: "Facoltativo",
533
+ flowStepComplete: "Completato",
534
+ flowStepCurrent: "Passaggio corrente",
535
+ flowStepErrors: "Errori: {count}",
536
+ flowStepLocked: "Completa prima i passaggi precedenti",
537
+ flowStepNotStarted: "Non iniziato",
538
+ flowErrorSummary: "Correggi questi punti prima di continuare",
539
+ flowReady: "Pronto per l'invio",
540
+ flowNotReady: "Errori da correggere: {count}",
541
+ flowWarnings: "Avvisi: {count}",
542
+ flowChangesOnly: "Mostra solo le modifiche",
543
+ flowNoChanges: "Nessuna risposta è cambiata.",
544
+ flowWas: "Prima: {value}",
545
+ flowChangedCount: "Risposte modificate: {count}",
546
+ flowSecretSet: "Impostato",
547
+ flowSecretKept: "Invariato",
548
+ flowSecretNotSet: "Non impostato",
549
+ flowSecretHint: "È salvato un valore. Lascia vuoto per mantenerlo.",
550
+ flowSecretShow: "Mostra",
551
+ flowSecretHide: "Nascondi",
552
+ flowSecretReveal: "Mostra {field}",
553
+ flowOn: "Attivo",
554
+ flowOff: "Disattivo",
555
+ flowAdd: "Aggiungi",
556
+ flowAddItem: "Aggiungi a {field}",
557
+ flowRemoveItem: "Rimuovi {item}",
558
+ flowItemLabel: "{field}, elemento {index}",
559
+ flowSelectAll: "Seleziona tutto",
560
+ flowSelectNone: "Cancella",
561
+ flowSelectedCount: "{count} di {total} selezionati",
562
+ flowUnit: "Unità",
563
+ flowUnitSeconds: "secondi",
564
+ flowUnitMinutes: "minuti",
565
+ flowUnitHours: "ore",
566
+ flowUnitDays: "giorni",
567
+ flowSeconds: "[one]{count} secondo[other]{count} secondi",
568
+ flowMinutes: "[one]{count} minuto[other]{count} minuti",
569
+ flowHours: "[one]{count} ora[other]{count} ore",
570
+ flowDays: "[one]{count} giorno[other]{count} giorni",
571
+ flowDurationInvalid: "{field} deve essere un numero intero.",
572
+ flowItemsMin: "{field} richiede almeno {min}.",
573
+ flowItemsMax: "{field} ne consente al massimo {max}.",
574
+ flowItemEmail: "«{item}» non è un indirizzo email.",
575
+ flowItemHost: "«{item}» non è un nome host.",
576
+ flowItemIp: "«{item}» non è un indirizzo IP.",
577
+ flowItemCidr: "«{item}» non è un intervallo di rete.",
578
+ flowItemUrl: "«{item}» non è un indirizzo web.",
579
+ flowItemPattern: "«{item}» non ha il formato previsto.",
580
+ flowSaved: "Salvato",
581
+ flowAccepted: "In corso",
582
+ flowProgress: "{done} di {total}",
583
+ flowConflict: "Queste impostazioni sono cambiate durante la modifica.",
584
+ flowReload: "Ricarica le impostazioni correnti",
585
+ flowNotSubmitted: "Le risposte non sono state inviate.",
586
+ flowNoHost: "Nessun host ha ricevuto le risposte.",
587
+ flowStartAgain: "Ricomincia",
588
+ flowCopy: "Copia",
589
+ flowCopied: "Copiato",
590
+ flowSavedIt: "L'ho salvato",
591
+ flowShownOnce: "Mostrato una sola volta. Copialo ora.",
520
592
  });
521
593
  const staticLabels = Object.freeze({
522
594
  overflowNote: "Righe mostrate: {shown} su {total}.",
@@ -517,6 +517,78 @@ const labels = Object.freeze({
517
517
  calendarOutsideRange: "Poza datami, które pokazuje ten kalendarz",
518
518
  calendarClose: "Zamknij",
519
519
  calendarDetailsOf: "Szczegóły: {title}",
520
+ flowSteps: "Kroki",
521
+ flowStepOf: "Krok {current} z {count}",
522
+ flowStepAnnounce: "Krok {current} z {count}: {title}",
523
+ flowNext: "Dalej",
524
+ flowBack: "Wstecz",
525
+ flowSubmit: "Wyślij",
526
+ flowSubmitting: "Wysyłanie…",
527
+ flowReviewTitle: "Sprawdź odpowiedzi",
528
+ flowChange: "Zmień",
529
+ flowChangeField: "Zmień: {field}",
530
+ flowNotProvided: "Nie podano",
531
+ flowOptional: "(opcjonalnie)",
532
+ flowStepOptional: "Opcjonalny",
533
+ flowStepComplete: "Ukończono",
534
+ flowStepCurrent: "Bieżący krok",
535
+ flowStepErrors: "Błędy: {count}",
536
+ flowStepLocked: "Najpierw ukończ wcześniejsze kroki",
537
+ flowStepNotStarted: "Nierozpoczęty",
538
+ flowErrorSummary: "Popraw te pola, zanim przejdziesz dalej",
539
+ flowReady: "Gotowe do wysłania",
540
+ flowNotReady: "Błędy do poprawienia: {count}",
541
+ flowWarnings: "Ostrzeżenia: {count}",
542
+ flowChangesOnly: "Pokaż tylko zmiany",
543
+ flowNoChanges: "Żadna odpowiedź się nie zmieniła.",
544
+ flowWas: "Było: {value}",
545
+ flowChangedCount: "Zmienione odpowiedzi: {count}",
546
+ flowSecretSet: "Ustawiono",
547
+ flowSecretKept: "Bez zmian",
548
+ flowSecretNotSet: "Nie ustawiono",
549
+ flowSecretHint: "Wartość jest zapisana. Zostaw puste, aby ją zachować.",
550
+ flowSecretShow: "Pokaż",
551
+ flowSecretHide: "Ukryj",
552
+ flowSecretReveal: "Pokaż: {field}",
553
+ flowOn: "Włączone",
554
+ flowOff: "Wyłączone",
555
+ flowAdd: "Dodaj",
556
+ flowAddItem: "Dodaj do: {field}",
557
+ flowRemoveItem: "Usuń: {item}",
558
+ flowItemLabel: "{field}, pozycja {index}",
559
+ flowSelectAll: "Zaznacz wszystko",
560
+ flowSelectNone: "Wyczyść",
561
+ flowSelectedCount: "Zaznaczono {count} z {total}",
562
+ flowUnit: "Jednostka",
563
+ flowUnitSeconds: "sekundy",
564
+ flowUnitMinutes: "minuty",
565
+ flowUnitHours: "godziny",
566
+ flowUnitDays: "dni",
567
+ flowSeconds: "[one]{count} sekunda[few]{count} sekundy[many]{count} sekund[other]{count} sekundy",
568
+ flowMinutes: "[one]{count} minuta[few]{count} minuty[many]{count} minut[other]{count} minuty",
569
+ flowHours: "[one]{count} godzina[few]{count} godziny[many]{count} godzin[other]{count} godziny",
570
+ flowDays: "[one]{count} dzień[few]{count} dni[many]{count} dni[other]{count} dnia",
571
+ flowDurationInvalid: "{field}: wpisz liczbę całkowitą.",
572
+ flowItemsMin: "{field}: wymagane co najmniej {min}.",
573
+ flowItemsMax: "{field}: dozwolone najwyżej {max}.",
574
+ flowItemEmail: "„{item}” nie jest adresem e-mail.",
575
+ flowItemHost: "„{item}” nie jest nazwą hosta.",
576
+ flowItemIp: "„{item}” nie jest adresem IP.",
577
+ flowItemCidr: "„{item}” nie jest zakresem sieci.",
578
+ flowItemUrl: "„{item}” nie jest adresem internetowym.",
579
+ flowItemPattern: "„{item}” ma nieoczekiwany format.",
580
+ flowSaved: "Zapisano",
581
+ flowAccepted: "W toku",
582
+ flowProgress: "{done} z {total}",
583
+ flowConflict: "Te ustawienia zmieniły się podczas edycji.",
584
+ flowReload: "Wczytaj bieżące ustawienia",
585
+ flowNotSubmitted: "Odpowiedzi nie zostały wysłane.",
586
+ flowNoHost: "Żaden host nie odebrał odpowiedzi.",
587
+ flowStartAgain: "Zacznij od nowa",
588
+ flowCopy: "Kopiuj",
589
+ flowCopied: "Skopiowano",
590
+ flowSavedIt: "Mam to zapisane",
591
+ flowShownOnce: "Widoczne tylko raz. Skopiuj teraz.",
520
592
  });
521
593
  const staticLabels = Object.freeze({
522
594
  overflowNote: "Pokazano {shown} z {total} wierszy.",
@@ -57,15 +57,15 @@ return{rank:1,value:String(value)}}
57
57
  function compareKeys(a,b,direction){if(a.rank!==b.rank){return a.rank-b.rank}
58
58
  if(a.rank===2){return 0}
59
59
  const order=a.rank===0?(a.value<b.value?-1:a.value>b.value?1:0):collator.compare(a.value,b.value);return order*direction}
60
- let DEFAULT_LABELS=Object.freeze({searchPlaceholder:"Search",searchResults:"Search results",searchResultCount:"{count} results",searchResultCountOfTotal:"{count} of {total} results",searchResultCountOfMany:"{count} of many results",searchNoResults:"No results",searchTooShort:"Type at least {min} characters",searchWordTooShort:"Type a word of at least {min} characters",searchFailed:"Search failed: {error}",columns:"Columns",visibleColumns:"Visible columns",resizeColumn:"Resize {column}",columnWidth:"{width} pixels",loading:"Loading…",loadError:"Could not load: {error} (Enter to retry)",queryFailed:"Could not update the view: {error}",showMore:"Show more ({loaded} of {total} loaded)",showMoreUnknownTotal:"Show more ({loaded} loaded)",pageLoaded:"{loaded} of {total} loaded",itemsLoaded:"{count} items",yes:"Yes",no:"No",utcTime:"{time} UTC",localTime:"{time} local time",mountError:"This view could not be displayed: {error}"});function labelsFor(...sources){const labels=Object.assign({},DEFAULT_LABELS);for(const source of sources){if(source==null)continue;if(typeof source!=="object"||Array.isArray(source))throw new Error("CanopyX: labels must be an object of strings.");Object.keys(source).forEach((name)=>{if(!Object.hasOwn(DEFAULT_LABELS,name)&&!/^(?:gridEdit|format|calendar)[A-Z]\w{0,63}$/.test(name)) throw new Error("CanopyX: there is no label '" + name + "'.");
61
- if(typeof source[name]!=="string"||!/\S/.test(source[name])) throw new Error("CanopyX: label '" + name + "' must be a string with visible text.");
62
- if((name==="utcTime"||name==="localTime")&&source[name].indexOf("{time}")<0)throw new Error("CanopyX: label '"+name+"' must hold {time}.");labels[name]=source[name]})}
63
- return Object.freeze(labels)}
64
60
  function fill(template,values){return template.replace(/\{(\w+)\}/g, (match, name) => (values && Object.hasOwn(values, name) ? String(values[name]) : match));
65
61
  }
66
62
  const pluralRules=new Map();function plural(template,count,lang){if(!template.startsWith("["))return template;const forms={};for(const match of template.matchAll(/\[(zero|one|two|few|many|other)\]([^[]*)/g)) forms[match[1]] = match[2];
67
63
  let rules=pluralRules.get(lang);if(!rules){try{rules=new Intl.PluralRules(lang||"en")}catch(_){rules=new Intl.PluralRules("en")}pluralRules.set(lang,rules)}
68
64
  return forms[rules.select(Number(count))]??forms.other??template}
65
+ let DEFAULT_LABELS=Object.freeze({searchPlaceholder:"Search",searchResults:"Search results",searchResultCount:"{count} results",searchResultCountOfTotal:"{count} of {total} results",searchResultCountOfMany:"{count} of many results",searchNoResults:"No results",searchTooShort:"Type at least {min} characters",searchWordTooShort:"Type a word of at least {min} characters",searchFailed:"Search failed: {error}",columns:"Columns",visibleColumns:"Visible columns",resizeColumn:"Resize {column}",columnWidth:"{width} pixels",loading:"Loading…",loadError:"Could not load: {error} (Enter to retry)",queryFailed:"Could not update the view: {error}",showMore:"Show more ({loaded} of {total} loaded)",showMoreUnknownTotal:"Show more ({loaded} loaded)",pageLoaded:"{loaded} of {total} loaded",itemsLoaded:"{count} items",yes:"Yes",no:"No",utcTime:"{time} UTC",localTime:"{time} local time",mountError:"This view could not be displayed: {error}"});function labelsFor(...sources){const labels=Object.assign({},DEFAULT_LABELS);for(const source of sources){if(source==null)continue;if(typeof source!=="object"||Array.isArray(source))throw new Error("CanopyX: labels must be an object of strings.");Object.keys(source).forEach((name)=>{if(!Object.hasOwn(DEFAULT_LABELS,name)&&!/^(?:gridEdit|format|calendar|flow)[A-Z]\w{0,63}$/.test(name)) throw new Error("CanopyX: there is no label '" + name + "'.");
66
+ if(typeof source[name]!=="string"||!/\S/.test(source[name])) throw new Error("CanopyX: label '" + name + "' must be a string with visible text.");
67
+ if((name==="utcTime"||name==="localTime")&&source[name].indexOf("{time}")<0)throw new Error("CanopyX: label '"+name+"' must hold {time}.");labels[name]=source[name]})}
68
+ return Object.freeze(labels)}
69
69
  const numberFormats=new Map();function numberFormat(lang,minimum=0,maximum=3){const key=(lang||"")+ "|"+minimum+"|"+maximum;let format=numberFormats.get(key);if(!format){const digits={minimumFractionDigits:minimum,maximumFractionDigits:maximum};try{format=new Intl.NumberFormat(lang||undefined,digits)}catch(e){format=new Intl.NumberFormat(undefined,digits)}
70
70
  if(numberFormats.size>=16)numberFormats.delete(numberFormats.keys().next().value);numberFormats.set(key,format)}
71
71
  return format}
@@ -488,8 +488,9 @@ items.push(...page.items);total=page.total;next=page.next||null;if(next&&(next==
488
488
  fill(this.labels.itemsLoaded,{count:count.format(items.length)}));this.stateChanged()}});const EXPORT_FORMATS=new Map(),EXPORT_IMPL={},exportFormatId=id=>typeof id==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(id);
489
489
  const exportFormatIds=list=>Array.isArray(list)&&new Set(list).size===list.length&&list.every(exportFormatId);function exportFormat(format){if(!format||!exportFormatId(format.id)||format.id==="csv"||
490
490
  typeof format.label!=="string"||!format.label.trim()||typeof format.extension!=="string"||!/^[a-z\d]{1,16}$/i.test(format.extension) ||
491
- format.mime!==undefined&&typeof format.mime!=="string"||typeof format.write!=="function")
492
- throw new Error("CanopyX: invalid export format.");return Object.freeze({id:format.id,label:format.label,extension:format.extension,mime:format.mime||"application/octet-stream",write:format.write})}
491
+ format.mime!==undefined&&typeof format.mime!=="string"||
492
+ format.showInMenu!==undefined&&typeof format.showInMenu!=="boolean"||typeof format.write!=="function")
493
+ throw new Error("CanopyX: invalid export format.");return Object.freeze({id:format.id,label:format.label,extension:format.extension,mime:format.mime||"application/octet-stream",showInMenu:format.showInMenu!==false,write:format.write})}
493
494
  function registerExportFormat(format){format=exportFormat(format);EXPORT_FORMATS.set(format.id,format);return()=>EXPORT_FORMATS.get(format.id)===format&&EXPORT_FORMATS.delete(format.id)}
494
495
  EXPORT_IMPL.formatsOf=function(grid){const list=grid.opts.exportFormats??grid.view.exportFormats,known=new Map(EXPORT_FORMATS);for(const format of grid.plugins.filter(item=>(grid.opts.plugins||[]).some(local=>local.name===item.name))
495
496
  .flatMap(item=>item.exportFormats||[]))known.set(format.id,exportFormat(format));if(list===undefined)return[...known.values()];const formats=Array.isArray(list)?list.map(item=>typeof item==="string"?known.get(item):exportFormat(item)).filter(Boolean):null;if(!formats||new Set(formats.map(format=>format.id)).size!==formats.length)throw new Error("CanopyX: invalid exportFormats.");return formats};function exportTimeout(grid,options){const timeout=options?.timeoutMs??grid.opts.exportTimeoutMs??600000;if(!Number.isInteger(timeout)||timeout<1||timeout>2147483647)throw new Error("CanopyX: invalid export timeout.");return timeout}
@@ -505,7 +506,7 @@ if(active>=0){list.children[active].setAttribute("aria-selected","false")}
505
506
  active=active<0?(delta<0?hits.length-1:0):(active+delta+hits.length)%hits.length;const item=list.children[active];item.setAttribute("aria-selected","true");input.setAttribute("aria-activedescendant",item.id);item.scrollIntoView({block:"nearest"})};input.addEventListener("input",()=>{cancelNavigation();sequence++;clearTimeout(timer);hits=[];close();timer=setTimeout(run,150)});input.addEventListener("keydown",(e)=>{if(e.defaultPrevented||e.isComposing)return;if(e.key==="ArrowDown"||e.key==="ArrowUp"){move(e.key==="ArrowDown"?1:-1)}else if(e.key==="Enter"){if(!list.hidden){choose(active>=0?active:0)}}else if(e.key==="Escape"){cancelNavigation();sequence++;clearTimeout(timer);if(list.hidden){input.value=""}
506
507
  close()}else{return}
507
508
  e.preventDefault()});input.addEventListener("blur",()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);blurTimer=setTimeout(close,150)});this.cancelSearch=()=>{cancelNavigation();sequence++;clearTimeout(timer);clearTimeout(blurTimer);hits=[];close()};box.appendChild(input);box.appendChild(list);box.appendChild(status);bar.appendChild(box);this.searchInput=input}});function watchFlyout(anchorElement,panel,isOpen){const position=()=>{if(!isOpen())return;const anchor=anchorElement.getBoundingClientRect(),fixed=getComputedStyle(panel).position==="fixed";const below=Math.max(0,global.innerHeight-anchor.bottom-8);const above=Math.max(0,anchor.top-8);const opensAbove=below<120&&above>below,room=opensAbove?above:below;panel.style.maxHeight=(panel.classList.contains("cx-fb")?room:Math.min(320,room))+ "px";panel.style.top=opensAbove?"auto":fixed?anchor.bottom+"px":"100%";panel.style.bottom=opensAbove?fixed?global.innerHeight-anchor.top+"px":"100%":"auto";const width=panel.getBoundingClientRect().width;panel.style.left=Math.max(8,Math.min(anchor.left,global.innerWidth-width-8))-(fixed?0:anchor.left)+ "px"};global.addEventListener("resize",position);global.addEventListener("scroll",position,true);return{position,dispose:()=>{global.removeEventListener("resize",position);global.removeEventListener("scroll",position,true)}}}
508
- const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"tree-tools":["ce442e100494535d","canopyx-tree-tools.149c371950d66a15.js","canopyx-tree-tools.ef7a3fb9c9115a82.css"],"export":["5673e642f32c2f4e","canopyx-export.01512af72a298711.js"],"links":["f1ab7e32b501ce37","canopyx-links.d96addeefb3eccf5.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"link":["fa0c9e888463553b","canopyx-link.4ec39bc39fa6cf50.js","canopyx-link.8435c892613926ac.css"],"highlight":["f39423961654c1e2","canopyx-highlight.a6f93893d36ab343.js","canopyx-highlight.5b6d2e0d979f9f9b.css"],"layouts":["fa8c686f21626884","canopyx-layouts.e7250c82a6abf52e.js","canopyx-layouts.0b75738924533ee8.css"],"record-panel":["bcc06276c7933af6","canopyx-record-panel.a374fb4254f9115c.js","canopyx-record-panel.f3691d54cefaab04.css"]},PART_CODE=new Map(),partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
509
+ const PART_URL=typeof document!=="undefined"&&document.currentScript?.src;const PARTS={"tree-tools":["ce442e100494535d","canopyx-tree-tools.149c371950d66a15.js","canopyx-tree-tools.ef7a3fb9c9115a82.css"],"export":["8b99c0b7b0ec37c5","canopyx-export.6989ea36f5d6da7b.js"],"links":["f1ab7e32b501ce37","canopyx-links.d96addeefb3eccf5.js"],"search":["521eebd6e1bbbd35","canopyx-search.14c69f4551c69f23.js"],"link":["fa0c9e888463553b","canopyx-link.4ec39bc39fa6cf50.js","canopyx-link.8435c892613926ac.css"],"highlight":["f39423961654c1e2","canopyx-highlight.a6f93893d36ab343.js","canopyx-highlight.5b6d2e0d979f9f9b.css"],"layouts":["fa8c686f21626884","canopyx-layouts.e7250c82a6abf52e.js","canopyx-layouts.0b75738924533ee8.css"],"record-panel":["bcc06276c7933af6","canopyx-record-panel.a374fb4254f9115c.js","canopyx-record-panel.f3691d54cefaab04.css"]},PART_CODE=new Map(),partName=name=>typeof name==="string"&&/^[a-z][a-z\d-]{0,31}$/.test(name);
509
510
  function registerPart(name,part){if(!partName(name)||!part||typeof part.version!=="string"||typeof part.install!=="function"||
510
511
  part.requires!==undefined&&!(Array.isArray(part.requires)&&part.requires.every(partName)))throw new Error("CanopyX: invalid part.");PART_CODE.set(name,part)}
511
512
  function definePart(View,name,label,context){const parts=View.prototype.parts||={};return parts[name]={name,label,context,parts}}
@@ -741,5 +742,5 @@ watcher.observe(host)}
741
742
  function mount(root,automatic){const scope=root||document;const created=[];const showError=(host,err,api,view)=>{if(api){api.destroy();if(host.canopyx===api)delete host.canopyx}
742
743
  const message=err&&err.message?err.message:String(err);let labels=DEFAULT_LABELS;for(const attempt of[()=>labelsFor(view&&view.labels,view&&configured.has(view.id)?configured.get(view.id).labels:null),()=>labelsFor(view&&view.labels)]){try{labels=attempt();break}catch(e){labels=DEFAULT_LABELS}}
743
744
  const notice=document.createElement("div");notice.className="cx-mount-error";notice.setAttribute("role","alert");setText(notice,fill(labels.mountError,{error:message}));host.classList.add("cx-host");host.setAttribute("data-canopyx-mounted","true");host.setAttribute("data-cx-error",message);host.appendChild(notice);if(global.console)global.console.error(err)};const selector="[data-canopyx-host]:not([data-canopyx-mounted])";(scope.matches?.(selector)?[scope]:scope.querySelectorAll(selector)).forEach((host)=>{const config=host.querySelector("script.cx-config"),mode=host.getAttribute("data-cx-mount");if(!config||(automatic===true&&mode==="manual")){return}
744
- if(mode==="visible"&&host!==scope&&global.IntersectionObserver)return mountWhenVisible(host);watcher?.unobserve(host);host.setAttribute("data-canopyx-mounted","true");let view=null;try{view=JSON.parse(config.textContent);if(view===Object(view))parsedViews.add(view);const create=view&&view.type==="grid"&&typeof createDataGrid==="function"?createDataGrid:createTreeGrid;const api=create(host,Object.assign({},view&&configured.get(view.id),{view}));created.push(api);api.ready.catch((err)=>{if(view.type!=="grid"&&activeGrids.get(host)===api&&host.canopyx===api)showError(host,err,api,view)})}catch(err){showError(host,err,null,view)}});return created}
745
- global.CanopyX=Object.freeze(Object.assign({protocol:PROTOCOL,createTreeGrid,configure,unconfigure,mount:(root)=>mount(root,false),sources:Object.freeze({inline:inlineSource,sidecar:sidecarSource,remote:remoteSource}),badge:hostBadge,labels:DEFAULT_LABELS,registerExportFormat,use,registerPart,setNonce},typeof GRID_API==="object"?GRID_API:{}));if(typeof document!=="undefined"){const navigation=global.performance&&performance.getEntriesByType?performance.getEntriesByType("navigation")[0]:null;if(document.readyState==="loading"||(document.readyState==="interactive"&&navigation&&navigation.domContentLoadedEventStart===0)){document.addEventListener("DOMContentLoaded",()=>mount(document,true))}else{mount(document,true)}}})(runtimeHost);const CanopyX=runtimeHost.CanopyX;const{protocol,createTreeGrid,configure,unconfigure,mount,sources,badge,labels,registerExportFormat,use,registerPart,setNonce}=CanopyX;export{protocol,createTreeGrid,configure,unconfigure,mount,sources,badge,labels,registerExportFormat,use,registerPart,setNonce};export default CanopyX;
745
+ if(mode==="visible"&&host!==scope&&global.IntersectionObserver)return mountWhenVisible(host);watcher?.unobserve(host);host.setAttribute("data-canopyx-mounted","true");let view=null;try{view=JSON.parse(config.textContent);if(view===Object(view))parsedViews.add(view);const flow=view&&view.kind==="flow"&&typeof FLOW_API==="object";const create=flow?FLOW_API.createFlow:view&&view.type==="grid"&&typeof createDataGrid==="function"?createDataGrid:createTreeGrid;const api=create(host,Object.assign({},view&&configured.get(view.id),flow?{flow:view}:{view}));created.push(api);api.ready.catch((err)=>{if(view.type!=="grid"&&activeGrids.get(host)===api&&host.canopyx===api)showError(host,err,api,view)})}catch(err){showError(host,err,null,view)}});return created}
746
+ global.CanopyX=Object.freeze(Object.assign({protocol:PROTOCOL,createTreeGrid,configure,unconfigure,mount:(root)=>mount(root,false),sources:Object.freeze({inline:inlineSource,sidecar:sidecarSource,remote:remoteSource}),badge:hostBadge,labels:DEFAULT_LABELS,registerExportFormat,use,registerPart,setNonce},typeof GRID_API==="object"?GRID_API:{},typeof FLOW_API==="object"?FLOW_API:{}));if(typeof document!=="undefined"){const navigation=global.performance&&performance.getEntriesByType?performance.getEntriesByType("navigation")[0]:null;if(document.readyState==="loading"||(document.readyState==="interactive"&&navigation&&navigation.domContentLoadedEventStart===0)){document.addEventListener("DOMContentLoaded",()=>mount(document,true))}else{mount(document,true)}}})(runtimeHost);const CanopyX=runtimeHost.CanopyX;const{protocol,createTreeGrid,configure,unconfigure,mount,sources,badge,labels,registerExportFormat,use,registerPart,setNonce}=CanopyX;export{protocol,createTreeGrid,configure,unconfigure,mount,sources,badge,labels,registerExportFormat,use,registerPart,setNonce};export default CanopyX;