Part of #749. Deletes the hand-written link switch.
The none | internal | external switch is written by hand four times, under four names: j:linkType in samples/hydrogen (Hero/CallToAction/default.server.tsx:20-37), ctaType in Jahia/luxe-jahia-demo (mixins/CTA/index.tsx:5-45) and again in Jahia/jahia.com (src/mixins/CTA/server.tsx), and seu:linkType in Jahia/se-utils, which adds a self value.
j:linkType is not core. Core's CND has only jmix:link (j:target), jnt:nodeLink (j:node) and jnt:externalLink (j:url) — verified in the running 8.2.3 at 02-jahia-nodetypes.cnd:693-711. The j:linkType / jmix:internalLink / jmix:externalLink vocabulary ships in the Jahia/default module (META-INF/definitions.cnd:49-56, LinkTypeInitializer).
First pass in #751.
Part of #749. Deletes the hand-written link switch.
The
none | internal | externalswitch is written by hand four times, under four names:j:linkTypeinsamples/hydrogen(Hero/CallToAction/default.server.tsx:20-37),ctaTypein Jahia/luxe-jahia-demo (mixins/CTA/index.tsx:5-45) and again in Jahia/jahia.com (src/mixins/CTA/server.tsx), andseu:linkTypein Jahia/se-utils, which adds aselfvalue.j:linkTypeis not core. Core's CND has onlyjmix:link(j:target),jnt:nodeLink(j:node) andjnt:externalLink(j:url) — verified in the running 8.2.3 at02-jahia-nodetypes.cnd:693-711. Thej:linkType/jmix:internalLink/jmix:externalLinkvocabulary ships in the Jahia/default module (META-INF/definitions.cnd:49-56,LinkTypeInitializer).resolveContentLink(node, options)→LinkProps | null. Handles core'sjnt:nodeLinkandjnt:externalLinkdirectly.typeProperty, default"j:linkType";noneValue, default"none"), not a hardcode — otherwise the engine-provided library bakes in a module convention, and still deletes no code in luxe or jahia.com.j:urlgoes through the scheme allow-list. It is editor input, and it is what spike Provide link component for js modules to improve usability and security #80 is about. Core already guards it at render time (jnt_externalLink/html/externalLink.jsp:17) but with a different remedy — it prefixeshttp://rather than dropping the href. Pick one and say why (see the epic's open questions).getDisplayableName()on the link node, then on the target. Jahia/jahia.com instead emits a literal"Internal link not defined"sentinel — decide whether an author-visible placeholder in edit mode is worth having.<JLink content={node}>as the component shortcut.First pass in #751.