@openremote/or-json-forms 1.10.0-snapshot.20251022150258 → 1.10.0-snapshot.20251022155009
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.
- package/custom-elements.json +6 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.orbundle.js +3 -3
- package/dist/umd/index.orbundle.js.map +1 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/custom-elements.json
CHANGED
package/dist/umd/index.js
CHANGED
|
@@ -1110,5 +1110,5 @@
|
|
|
1110
1110
|
.item-container {
|
|
1111
1111
|
margin: 0; /* Remove inherited margin */
|
|
1112
1112
|
}
|
|
1113
|
-
`,aj=class extends
|
|
1113
|
+
`,aj=class extends(0,op.translate)(op.i18next)(ec){constructor(){super(...arguments),this.renderers=aP,this.readonly=!1,this.required=!1,this.previousErrors=[]}static get styles(){return[ag,aF]}checkValidity(){return 0===this.previousErrors.length}shouldUpdate(e){if(super.shouldUpdate(e),this.schema||(this.schema=void 0!==this.data?ta(this.data):{}),this.data||(this.data=nX(this.schema,this.schema)),this.uischema||(this.uischema=tz(this.schema)),this.core||(this.core={ajv:tL({useDefaults:!0,validateFormats:!1}),data:{},schema:this.schema,uischema:this.uischema},this.updateCore(t8.init(this.data,this.schema,this.uischema)),this.config=((e=ne(),t)=>t.type===tY?ne(t.config):e)(void 0,t6(this.config))),(e.has("data")||e.has("schema")||e.has("uischema"))&&this.updateCore(t8.updateCore(this.data,this.schema,this.uischema)),(!this.contextValue||e.has("core")||e.has("renderers")||e.has("cells")||e.has("config")||e.has("readonly")||e.has("_language"))&&(this.contextValue={core:this.core,renderers:this.renderers,cells:this.cells,config:this.config,uischemas:this.uischemas,readonly:this.readonly,dispatch:e=>this.updateCore(e),i18n:{locale:this._language,translate:(e,t,{errors:[n]})=>{let i=t||(null==n?void 0:n.message)||"";return op.i18next.t(e,{defaultValue:i})||op.i18next.t(e,{defaultValue:i,lng:"en"})}}}),e.has("core")){let e=this.core.data,t=this.core.errors;this.onChange&&(!oc.Util.objectsEqual(e,this.previousData,!0)||t&&!oc.Util.objectsEqual(t,this.previousErrors,!0))&&(this.previousErrors=t||[],this.previousData=e,this.onChange({data:e,errors:t}))}return!0}updateCore(e){let t=((e=nt,t)=>{switch(t.type){case tj:{let n=no(e,t),i=nn(e,t),r="NoValidation"===i?void 0:n.compile(t.schema),o=tR(r,t.data),a=nr(e,t);return{...e,data:t.data,schema:t.schema,uischema:t.uischema,additionalErrors:a,errors:o,validator:r,ajv:n,validationMode:i}}case tH:{let n=no(e,t),i=nn(e,t),r=e.validator,o=e.errors;e.schema!==t.schema||e.validationMode!==i||e.ajv!==n?o=tR(r="NoValidation"===i?void 0:n.compile(t.schema),t.data):e.data!==t.data&&(o=tR(r,t.data));let a=nr(e,t);return e.data!==t.data||e.schema!==t.schema||e.uischema!==t.uischema||e.ajv!==n||e.errors!==o||e.validator!==r||e.validationMode!==i||e.additionalErrors!==a?{...e,data:t.data,schema:t.schema,uischema:t.uischema,ajv:n,errors:e0()(o,e.errors)?e.errors:o,validator:r,validationMode:i,additionalErrors:a}:e}case tB:{let n=t.ajv,i="NoValidation"===e.validationMode?void 0:n.compile(e.schema),r=tR(i,e.data);return{...e,validator:i,errors:r}}case tJ:{let n=t.schema&&e.ajv&&"NoValidation"!==e.validationMode?e.ajv.compile(t.schema):e.validator,i=tR(n,e.data);return{...e,validator:n,schema:t.schema,errors:i}}case tZ:return{...e,uischema:t.uischema};case tW:if(void 0===t.path||null===t.path)return e;if(""===t.path){let n=t.updater(e4()(e.data)),i=tR(e.validator,n);return{...e,data:n,errors:i}}{let n,i=ez()(e.data,t.path),r=t.updater(e4()(i));n=void 0!==r?e7()(t.path,r,void 0===e.data?{}:e.data):e8()(t.path,void 0===e.data?{}:e.data);let o=tR(e.validator,n);return{...e,data:n,errors:o}}case tU:return{...e,errors:t.errors};case t0:if(e.validationMode===t.validationMode)return e;if("NoValidation"===t.validationMode){let n=tR(void 0,e.data);return{...e,errors:n,validationMode:t.validationMode}}if("NoValidation"===e.validationMode){let n=e.ajv.compile(e.schema),i=tR(n,e.data);return{...e,validator:n,errors:i,validationMode:t.validationMode}}return{...e,validationMode:t.validationMode};default:return e}})(this.core,e);return t!==this.core&&(this.core=t),e}render(){if(!this.contextValue)return V``;let e=Object.assign(Object.assign({},((e,t)=>{let n;return{renderers:t.renderers||ez()(e.jsonforms,"renderers"),cells:t.cells||ez()(e.jsonforms,"cells"),schema:t.schema||nF(e),rootSchema:nF(e),uischema:t.uischema||(n=ez()(e,"jsonforms.core"),ez()(n,"uischema")),path:t.path,enabled:t.enabled,config:e.jsonforms.config}})({jsonforms:Object.assign({},this.contextValue)},this)),{label:as(this.schema,this.uischema,this.label,void 0)||"",required:this.required});return at(this.contextValue,e)||V``}};az([ep({type:Object})],aj.prototype,"uischema",void 0),az([ep({type:Object})],aj.prototype,"schema",void 0),az([ep({type:Object,attribute:!1})],aj.prototype,"data",void 0),az([ep({type:Array})],aj.prototype,"renderers",void 0),az([ep({type:Array})],aj.prototype,"cells",void 0),az([ep({type:String,attribute:!1})],aj.prototype,"onChange",void 0),az([ep({type:String,attribute:!1})],aj.prototype,"config",void 0),az([ep({type:Array})],aj.prototype,"uischemas",void 0),az([ep({type:Boolean})],aj.prototype,"readonly",void 0),az([ep({type:String})],aj.prototype,"label",void 0),az([ep({type:Boolean})],aj.prototype,"required",void 0),az([em()],aj.prototype,"core",void 0),az([em()],aj.prototype,"contextValue",void 0),aj=az([eu("or-json-forms")],aj)})(),a})());
|
|
1114
1114
|
//# sourceMappingURL=index.js.map
|