<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikiyouth.eu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=223.109.252.197</id>
	<title>Wikiyouth - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikiyouth.eu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=223.109.252.197"/>
	<link rel="alternate" type="text/html" href="https://wikiyouth.eu/wiki/Special:Contributions/223.109.252.197"/>
	<updated>2026-10-07T08:26:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wikiyouth.eu/w/index.php?title=MediaWiki:JsonFormsOptions&amp;diff=36848</id>
		<title>MediaWiki:JsonFormsOptions</title>
		<link rel="alternate" type="text/html" href="https://wikiyouth.eu/w/index.php?title=MediaWiki:JsonFormsOptions&amp;diff=36848"/>
		<updated>2026-09-24T13:04:34Z</updated>

		<summary type="html">&lt;p&gt;223.109.252.197: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;export default {&lt;br /&gt;
	validation: &#039;onsubmit&#039;, // onsubmit, always&lt;br /&gt;
	template: &#039;default&#039;,&lt;br /&gt;
	max_depth: 16,&lt;br /&gt;
	path_separator: &#039;.&#039;,&lt;br /&gt;
	default_additional_properties: false,&lt;br /&gt;
	use_lazy_properties: &#039;threshold&#039;, // never, always, threshold&lt;br /&gt;
	lazy_properties_threshold: 6,&lt;br /&gt;
	remove_empty_properties: false,&lt;br /&gt;
	remove_false_properties: false,&lt;br /&gt;
	required_evaluates_non_empty: false,&lt;br /&gt;
	debug: false,&lt;br /&gt;
&lt;br /&gt;
	// after the editor has been initialized and&lt;br /&gt;
	// before is ready&lt;br /&gt;
	onInit: function (jsonFormsInstance, editor) {&lt;br /&gt;
		editor.on(&#039;ready&#039;, () =&amp;gt; {&lt;br /&gt;
			// update editor with new config&lt;br /&gt;
			// const config = {}&lt;br /&gt;
			// jsonFormsInstance.createEditor( jsonFormsInstance.el, { ...jsonFormsInstance.config, ...config } );&lt;br /&gt;
		});&lt;br /&gt;
&lt;br /&gt;
		editor.on(&#039;change&#039;, () =&amp;gt; {});&lt;br /&gt;
&lt;br /&gt;
		// subeditor access&lt;br /&gt;
		const editorAB = editor.watch(&#039;root.a.b&#039;, (editor) =&amp;gt; {&lt;br /&gt;
			// do something when the value changes&lt;br /&gt;
			// console.log(&#039;^^editorAB&#039;, editor.getValue());&lt;br /&gt;
		});&lt;br /&gt;
&lt;br /&gt;
		// another way to register an event, this will fire&lt;br /&gt;
		// for each editor in the page, including nested editors&lt;br /&gt;
		// in the same form&lt;br /&gt;
		const context = this;&lt;br /&gt;
		const onPagedLayoutSetPage = function (thisJsonFormsInstance, editor, eventData) {&lt;br /&gt;
			// console.log(&#039;event onPagedLayoutSetPage via event registration&#039;, editor, eventData);&lt;br /&gt;
		};&lt;br /&gt;
		jsonFormsInstance.registerEvent(&lt;br /&gt;
			context,&lt;br /&gt;
			&#039;pagedLayoutSetPage&#039;,&lt;br /&gt;
			onPagedLayoutSetPage,&lt;br /&gt;
		);&lt;br /&gt;
	},&lt;br /&gt;
	callbacks: {&lt;br /&gt;
		enum_providers: {&lt;br /&gt;
			wikiList: function () {&lt;br /&gt;
				const cache = {};&lt;br /&gt;
&lt;br /&gt;
				function parseBulletList(content) {&lt;br /&gt;
					const regex = /^\*\s*(.+)$/gm;&lt;br /&gt;
					const items = [];&lt;br /&gt;
					let match;&lt;br /&gt;
&lt;br /&gt;
					while ((match = regex.exec(content)) !== null) {&lt;br /&gt;
						items.push(match[1]);&lt;br /&gt;
					}&lt;br /&gt;
&lt;br /&gt;
					return items;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return {&lt;br /&gt;
					source: (jseditor, { item, watched }) =&amp;gt; {&lt;br /&gt;
						const jsonForm = jseditor.jsoneditor.jsonFormsInstance;&lt;br /&gt;
&lt;br /&gt;
						if (&lt;br /&gt;
							!jseditor.schema[&#039;x-data&#039;] ||&lt;br /&gt;
							!jseditor.schema[&#039;x-data&#039;].article&lt;br /&gt;
						) {&lt;br /&gt;
							console.log(&lt;br /&gt;
								&#039;A key &amp;quot;article&amp;quot; must be specified in an object with key &amp;quot;x-data&amp;quot; in the enum schema&#039;,&lt;br /&gt;
							);&lt;br /&gt;
&lt;br /&gt;
							return [];&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						const pageTitle = jseditor.schema[&#039;x-data&#039;].article;&lt;br /&gt;
						if (cache[pageTitle]) {&lt;br /&gt;
							return cache[pageTitle];&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						return jsonForm.fetchArticleContent(pageTitle).then((content) =&amp;gt; {&lt;br /&gt;
							cache[pageTitle] = parseBulletList(content);&lt;br /&gt;
							return cache[pageTitle];&lt;br /&gt;
						});&lt;br /&gt;
					},&lt;br /&gt;
					filter: (jseditor, { item, watched }) =&amp;gt; {&lt;br /&gt;
						return true;&lt;br /&gt;
					},&lt;br /&gt;
					title: (jseditor, { item, watched }) =&amp;gt; item.text,&lt;br /&gt;
					value: (jseditor, { item, watched }) =&amp;gt; item.value,&lt;br /&gt;
				};&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
			jsonSchemas: function () {&lt;br /&gt;
				let cache = null;&lt;br /&gt;
				let pending = null;&lt;br /&gt;
&lt;br /&gt;
				return {&lt;br /&gt;
					source: (jseditor, { item, watched }) =&amp;gt; {&lt;br /&gt;
						if (cache) return cache;&lt;br /&gt;
						if (pending) return pending;&lt;br /&gt;
&lt;br /&gt;
						const api = new mw.Api();&lt;br /&gt;
&lt;br /&gt;
						pending = api&lt;br /&gt;
							.get({&lt;br /&gt;
								action: &#039;query&#039;,&lt;br /&gt;
								list: &#039;allpages&#039;,&lt;br /&gt;
								apnamespace: 2100,&lt;br /&gt;
								aplimit: &#039;max&#039;,&lt;br /&gt;
								formatversion: 2,&lt;br /&gt;
							})&lt;br /&gt;
							.then((res) =&amp;gt; {&lt;br /&gt;
								cache = res.query.allpages.map((page) =&amp;gt; {&lt;br /&gt;
									const titleObj = new mw.Title(page.title);&lt;br /&gt;
									const baseTitle = titleObj.getMainText();&lt;br /&gt;
									return {&lt;br /&gt;
										text: baseTitle,&lt;br /&gt;
										value: baseTitle,&lt;br /&gt;
									};&lt;br /&gt;
								});&lt;br /&gt;
								pending = null;&lt;br /&gt;
								return cache;&lt;br /&gt;
							});&lt;br /&gt;
&lt;br /&gt;
						return pending;&lt;br /&gt;
					},&lt;br /&gt;
					filter: (jseditor, { item, watched }) =&amp;gt; {&lt;br /&gt;
						return true;&lt;br /&gt;
					},&lt;br /&gt;
					title: (jseditor, { item, watched }) =&amp;gt; item.text,&lt;br /&gt;
					value: (jseditor, { item, watched }) =&amp;gt; item.value,&lt;br /&gt;
				};&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
		autocomplete_providers: {&lt;br /&gt;
			jsonSchemas: function () {&lt;br /&gt;
				let cache = null;&lt;br /&gt;
				let pending = null;&lt;br /&gt;
&lt;br /&gt;
				return {&lt;br /&gt;
					search: async (jseditor_editor, input) =&amp;gt; {&lt;br /&gt;
						// If we have cached results, filter them based on input&lt;br /&gt;
						if (cache) {&lt;br /&gt;
							if (!input) return cache;&lt;br /&gt;
							const lowerInput = input.toLowerCase();&lt;br /&gt;
							return cache.filter((item) =&amp;gt;&lt;br /&gt;
								item.text.toLowerCase().includes(lowerInput),&lt;br /&gt;
							);&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						if (pending) {&lt;br /&gt;
							return pending;&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						const api = new mw.Api();&lt;br /&gt;
						pending = api&lt;br /&gt;
							.get({&lt;br /&gt;
								action: &#039;query&#039;,&lt;br /&gt;
								list: &#039;allpages&#039;,&lt;br /&gt;
								apnamespace: 2100,&lt;br /&gt;
								aplimit: &#039;max&#039;,&lt;br /&gt;
								formatversion: 2,&lt;br /&gt;
							})&lt;br /&gt;
							.then((res) =&amp;gt; {&lt;br /&gt;
								cache = res.query.allpages.map((page) =&amp;gt; {&lt;br /&gt;
									const titleObj = new mw.Title(page.title);&lt;br /&gt;
									const baseTitle = titleObj.getMainText();&lt;br /&gt;
									return {&lt;br /&gt;
										text: baseTitle,&lt;br /&gt;
										value: baseTitle,&lt;br /&gt;
									};&lt;br /&gt;
								});&lt;br /&gt;
								pending = null;&lt;br /&gt;
&lt;br /&gt;
								// Filter after caching if input exists&lt;br /&gt;
								if (input) {&lt;br /&gt;
									const lowerInput = input.toLowerCase();&lt;br /&gt;
									return cache.filter((item) =&amp;gt;&lt;br /&gt;
										item.text.toLowerCase().includes(lowerInput),&lt;br /&gt;
									);&lt;br /&gt;
								}&lt;br /&gt;
								return cache;&lt;br /&gt;
							});&lt;br /&gt;
&lt;br /&gt;
						return pending;&lt;br /&gt;
					},&lt;br /&gt;
					getResultValue: (jseditor_editor, result) =&amp;gt; result.value,&lt;br /&gt;
					renderResult: (jseditor_editor, result, props) =&amp;gt; result.text,&lt;br /&gt;
				};&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
&lt;br /&gt;
		// must be a function with a &amp;quot;compile&amp;quot; method&lt;br /&gt;
		template: {},&lt;br /&gt;
&lt;br /&gt;
		actions: {&lt;br /&gt;
			submit: function (editor) {&lt;br /&gt;
				const jsonEditor = editor.jsoneditor;&lt;br /&gt;
				const jsonForm = jsonEditor.jsonFormsInstance;&lt;br /&gt;
				const validation = jsonEditor.validate();&lt;br /&gt;
				if (!validation.length) {&lt;br /&gt;
					editor.disable();&lt;br /&gt;
					const optionsEditor = jsonForm.getEditor(&#039;root.form.options&#039;);&lt;br /&gt;
					jsonForm&lt;br /&gt;
						.submitForm(jsonEditor, optionsEditor)&lt;br /&gt;
						.then(() =&amp;gt; editor.enable())&lt;br /&gt;
						.catch((err) =&amp;gt; {&lt;br /&gt;
							console.error(&#039;API error:&#039;, err);&lt;br /&gt;
							editor.enable();&lt;br /&gt;
						});&lt;br /&gt;
				} else {&lt;br /&gt;
					JsonForms.Alert(&#039;there are errors&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
&lt;br /&gt;
		// currently not used&lt;br /&gt;
		upload: {},&lt;br /&gt;
&lt;br /&gt;
		// an object of converter names returning a convertTo and convertFrom functions&lt;br /&gt;
		// the converter name must then be used in the schema using x-value-converter: [converter name]&lt;br /&gt;
		converters: {},&lt;br /&gt;
&lt;br /&gt;
		preprocessData: function (editor, data) {&lt;br /&gt;
			return data;&lt;br /&gt;
		},&lt;br /&gt;
&lt;br /&gt;
		postprocessData: function (editor, data) {&lt;br /&gt;
			return data;&lt;br /&gt;
		},&lt;br /&gt;
&lt;br /&gt;
		events: {&lt;br /&gt;
			initialized: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event initialized via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			ready: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event ready via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			change: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event change via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			buildComplete: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event buildComplete via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			pagedLayoutSetPage: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event pagedLayoutSetPage via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			fancyTreeSelectItem: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event fancyTreeSelectItem via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
			fancyTreeClickItem: function (editor, eventData) {&lt;br /&gt;
				// console.log(&#039;event fancyTreeClickItem via options&#039;, editor, eventData);&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
};&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>223.109.252.197</name></author>
	</entry>
	<entry>
		<id>https://wikiyouth.eu/w/index.php?title=JsonSchema:Core/DemoForm&amp;diff=36847</id>
		<title>JsonSchema:Core/DemoForm</title>
		<link rel="alternate" type="text/html" href="https://wikiyouth.eu/w/index.php?title=JsonSchema:Core/DemoForm&amp;diff=36847"/>
		<updated>2026-09-24T13:04:34Z</updated>

		<summary type="html">&lt;p&gt;223.109.252.197: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{&lt;br /&gt;
	&amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;,&lt;br /&gt;
	&amp;quot;$id&amp;quot;: &amp;quot;https://wikisphere.org/wiki/JsonSchema:Core/DemoForm&amp;quot;,&lt;br /&gt;
	&amp;quot;title&amp;quot;: &amp;quot;Demo&amp;quot;,&lt;br /&gt;
	&amp;quot;x-message&amp;quot;: {&lt;br /&gt;
		&amp;quot;x-label-template&amp;quot;: &amp;quot;This form is based on the schema &amp;lt;a target=\&amp;quot;blank\&amp;quot; href=\&amp;quot;{{replace wgArticlePath &#039;$1&#039; &#039;JsonSchema:Core/DemoForm&#039;}}\&amp;quot;&amp;gt;JsonSchema:Core/DemoForm&amp;lt;/a&amp;gt;&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;x-default-properties&amp;quot;: [&amp;quot;schema&amp;quot;, &amp;quot;editor&amp;quot;],&lt;br /&gt;
	&amp;quot;properties&amp;quot;: {&lt;br /&gt;
		&amp;quot;schema&amp;quot;: {&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;title&amp;quot;: &amp;quot;schema&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
			&amp;quot;x-enum-provider&amp;quot;: &amp;quot;jsonSchemas&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;editor&amp;quot;: {&lt;br /&gt;
			&amp;quot;x-message&amp;quot;: {&lt;br /&gt;
				&amp;quot;x-label-template&amp;quot;: &amp;quot;This form is based on the schema &amp;lt;a target=\&amp;quot;blank\&amp;quot; href=\&amp;quot;{{replace wgArticlePath &#039;$1&#039; &#039;JsonSchema:&#039;}}{{schema}}\&amp;quot;&amp;gt;JsonSchema:{{schema}}&amp;lt;/a&amp;gt;&amp;quot;&lt;br /&gt;
			},&lt;br /&gt;
			&amp;quot;x-compact&amp;quot;: &amp;quot;true&amp;quot;,&lt;br /&gt;
			&amp;quot;x-watch&amp;quot;: &amp;quot;schema&amp;quot;,&lt;br /&gt;
			&amp;quot;links&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;rel&amp;quot;: &amp;quot;describedBy&amp;quot;,&lt;br /&gt;
					&amp;quot;href&amp;quot;: &amp;quot;JsonSchema:{{schema}}&amp;quot;,&lt;br /&gt;
					&amp;quot;x-destroy-values-on-switch&amp;quot;: true&lt;br /&gt;
				}&lt;br /&gt;
			]&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>223.109.252.197</name></author>
	</entry>
</feed>