@genesislcap/design-system-configurator 14.437.3-alpha-5efde79.0 → 14.437.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.
@@ -285,7 +285,7 @@
285
285
  />
286
286
  `)}
287
287
  </template>
288
- `,D=(e,t,a)=>{var o,r,i,n;return null!==(n=null===(i=null===(r=null===(o=null==a?void 0:a.options)||void 0===o?void 0:o.i18n)||void 0===r?void 0:r.error)||void 0===i?void 0:i[e.keyword])&&void 0!==n?n:((e,t,a)=>{var o;return"pattern"===(null==e?void 0:e.keyword)?null!==(o=O[e.params.pattern])&&void 0!==o?o:"Invalid pattern.":(0,c.mXY)(e,t,a)})(e,t,a)};let T=class extends p.FASTElement{constructor(){super(...arguments),this._submitted=!1,this.ajv=(0,c.grE)({useDefaults:!0,$data:!0}),this.rowSubmitStatuses=new Map,this.bulkInsert=!1,this.dispatch=e=>{this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:(0,c.kkC)(this.jsonforms.core,e)});const t=this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:t,path:e.path})},this.validate=e=>{var t,a,o;const r=null===(a=null===(t=this.jsonforms)||void 0===t?void 0:t.core)||void 0===a?void 0:a.data,i=[],n=e=>{var t,a,o,s,l;const d=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.validateFn;if("function"==typeof d){const t=null===(o=null===(a=null==e?void 0:e.scope)||void 0===a?void 0:a.split("/"))||void 0===o?void 0:o.pop(),n=null==e?void 0:e.label;let l=null!==(s=d(r,t,n))&&void 0!==s?s:[];Array.isArray(l)||(l=[l]),i.push(...l)}(null==e?void 0:e.elements)&&e.elements.forEach(e=>{n(e)}),(null===(l=null==e?void 0:e.options)||void 0===l?void 0:l.childElements)&&e.options.childElements.forEach(e=>{n(e)})};return null===(o=null==e?void 0:e.elements)||void 0===o||o.forEach(e=>{n(e)}),i}}get submitted(){return p.Observable.track(this,"submitted"),this._submitted}set submitted(e){this._submitted=e,p.Observable.notify(this,"submitted")}prefixChanged(){this.schemaChanged()}schemaChanged(){var e,t,a,o;if(!this.schema)return;this.uichemaToUse=null!==(e=this.uischema)&&void 0!==e?e:c.wyb.uiSchema(this.schema),this.uischema||v.debug("UI schema not provided. Auto generated schema:",this.uichemaToUse);this.jsonforms={core:(()=>{const e={data:this.data,schema:this.schema,uischema:this.uichemaToUse};return(0,c.kkC)(e,c.En0.init(this.data,this.schema,this.uichemaToUse,{validationMode:this.validationMode||"ValidateAndShow",ajv:this.ajv,additionalErrors:this.validate(this.uichemaToUse)}))})(),config:(0,c.tWo)(void 0,c.En0.setConfig(this.config)),i18n:(0,c.Fxm)(this.i18n,c.En0.updateI18n(null===(t=this.i18n)||void 0===t?void 0:t.locale,null===(a=this.i18n)||void 0===a?void 0:a.translate,(null===(o=this.i18n)||void 0===o?void 0:o.translateError)||D)),renderers:this.renderers,readonly:this.readonly,rowSubmitStatuses:this.rowSubmitStatuses,bulkInsert:this.bulkInsert};const r=this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:r})}uischemaChanged(){this.schemaChanged()}dataChanged(){var e;if(!(null===(e=this.jsonforms)||void 0===e?void 0:e.core))return void this.schemaChanged();if(this.jsonforms.core.data===this.data)return;this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:(0,c.kkC)(this.jsonforms.core,c.En0.updateCore(this.data,this.schema,this.uichemaToUse))});const t=this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:t})}renderersChanged(){this.schemaChanged()}validationModeChanged(){this.schemaChanged()}ajvChanged(){this.schemaChanged()}readonlyChanged(){this.schemaChanged()}configChanged(){this.schemaChanged()}rowSubmitStatusesChanged(){this.jsonforms&&(this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{rowSubmitStatuses:this.rowSubmitStatuses}))}bulkInsertChanged(){this.jsonforms&&(this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{bulkInsert:this.bulkInsert}))}get props(){var e;if(!this.schema&&!this.uischema)return;const t=null!==(e=this.uischema)&&void 0!==e?e:c.wyb.uiSchema(this.schema);return{uischema:Object.assign(Object.assign({},t),{elements:t.elements.map(e=>"#/properties/TIMESTAMP"===e.scope?Object.assign(Object.assign({},e),{options:{hidden:!0}}):e)}),schema:this.schema,path:"",enabled:!0,visible:!0}}copyUISchemaToClipboard(){return(0,i.sH)(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(JSON.stringify(this.uichemaToUse)),v.debug("Autogenerated UI schema copied to clipboard")}catch(e){v.error("Failed to copy autogenerated UI schema: ",e)}})}};(0,i.Cg)([p.observable],T.prototype,"prefix",void 0),(0,i.Cg)([p.observable],T.prototype,"jsonforms",void 0),(0,i.Cg)([p.observable],T.prototype,"i18n",void 0),(0,i.Cg)([p.observable],T.prototype,"uichemaToUse",void 0),(0,i.Cg)([p.observable],T.prototype,"schema",void 0),(0,i.Cg)([p.observable],T.prototype,"uischema",void 0),(0,i.Cg)([p.observable],T.prototype,"data",void 0),(0,i.Cg)([p.observable],T.prototype,"renderers",void 0),(0,i.Cg)([p.observable],T.prototype,"validationMode",void 0),(0,i.Cg)([p.observable],T.prototype,"ajv",void 0),(0,i.Cg)([(0,p.attr)({mode:"boolean"})],T.prototype,"readonly",void 0),(0,i.Cg)([p.observable],T.prototype,"config",void 0),(0,i.Cg)([p.observable],T.prototype,"rowSubmitStatuses",void 0),(0,i.Cg)([p.observable],T.prototype,"bulkInsert",void 0),T=(0,i.Cg)([(0,p.customElement)({name:"json-forms",template:L,styles:p.css`
288
+ `,D=(e,t,a)=>{var o,r,i,n;return null!==(n=null===(i=null===(r=null===(o=null==a?void 0:a.options)||void 0===o?void 0:o.i18n)||void 0===r?void 0:r.error)||void 0===i?void 0:i[e.keyword])&&void 0!==n?n:((e,t,a)=>{var o;return"pattern"===(null==e?void 0:e.keyword)?null!==(o=O[e.params.pattern])&&void 0!==o?o:"Invalid pattern.":(0,c.mXY)(e,t,a)})(e,t,a)};let T=class extends p.FASTElement{constructor(){super(...arguments),this._submitted=!1,this.ajv=(0,c.grE)({useDefaults:!0,$data:!0}),this.rowSubmitStatuses=new Map,this.bulkInsert=!1,this.dispatch=e=>{this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:(0,c.kkC)(this.jsonforms.core,e)});this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:this.jsonforms.core.additionalErrors,path:e.path})},this.validate=e=>{var t,a,o;const r=null===(a=null===(t=this.jsonforms)||void 0===t?void 0:t.core)||void 0===a?void 0:a.data,i=[],n=e=>{var t,a,o,s,l;const d=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.validateFn;if("function"==typeof d){const t=null===(o=null===(a=null==e?void 0:e.scope)||void 0===a?void 0:a.split("/"))||void 0===o?void 0:o.pop(),n=null==e?void 0:e.label;let l=null!==(s=d(r,t,n))&&void 0!==s?s:[];Array.isArray(l)||(l=[l]),i.push(...l)}(null==e?void 0:e.elements)&&e.elements.forEach(e=>{n(e)}),(null===(l=null==e?void 0:e.options)||void 0===l?void 0:l.childElements)&&e.options.childElements.forEach(e=>{n(e)})};return null===(o=null==e?void 0:e.elements)||void 0===o||o.forEach(e=>{n(e)}),i}}get submitted(){return p.Observable.track(this,"submitted"),this._submitted}set submitted(e){this._submitted=e,p.Observable.notify(this,"submitted")}prefixChanged(){this.schemaChanged()}schemaChanged(){var e,t,a,o;if(!this.schema)return;this.uichemaToUse=null!==(e=this.uischema)&&void 0!==e?e:c.wyb.uiSchema(this.schema),this.uischema||v.debug("UI schema not provided. Auto generated schema:",this.uichemaToUse);this.jsonforms={core:(()=>{const e={data:this.data,schema:this.schema,uischema:this.uichemaToUse};return(0,c.kkC)(e,c.En0.init(this.data,this.schema,this.uichemaToUse,{validationMode:this.validationMode||"ValidateAndShow",ajv:this.ajv,additionalErrors:this.validate(this.uichemaToUse)}))})(),config:(0,c.tWo)(void 0,c.En0.setConfig(this.config)),i18n:(0,c.Fxm)(this.i18n,c.En0.updateI18n(null===(t=this.i18n)||void 0===t?void 0:t.locale,null===(a=this.i18n)||void 0===a?void 0:a.translate,(null===(o=this.i18n)||void 0===o?void 0:o.translateError)||D)),renderers:this.renderers,readonly:this.readonly,rowSubmitStatuses:this.rowSubmitStatuses,bulkInsert:this.bulkInsert};const r=this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:r})}uischemaChanged(){this.schemaChanged()}dataChanged(){var e;if(!(null===(e=this.jsonforms)||void 0===e?void 0:e.core))return void this.schemaChanged();if(this.jsonforms.core.data===this.data)return;this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:(0,c.kkC)(this.jsonforms.core,c.En0.updateCore(this.data,this.schema,this.uichemaToUse))});const t=this.validate(this.uichemaToUse);this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors,additionalErrors:t})}renderersChanged(){this.schemaChanged()}validationModeChanged(){this.schemaChanged()}ajvChanged(){this.schemaChanged()}readonlyChanged(){this.schemaChanged()}configChanged(){this.schemaChanged()}rowSubmitStatusesChanged(){this.jsonforms&&(this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{rowSubmitStatuses:this.rowSubmitStatuses}))}bulkInsertChanged(){this.jsonforms&&(this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{bulkInsert:this.bulkInsert}))}get props(){var e;if(!this.schema&&!this.uischema)return;const t=null!==(e=this.uischema)&&void 0!==e?e:c.wyb.uiSchema(this.schema);return{uischema:Object.assign(Object.assign({},t),{elements:t.elements.map(e=>"#/properties/TIMESTAMP"===e.scope?Object.assign(Object.assign({},e),{options:{hidden:!0}}):e)}),schema:this.schema,path:"",enabled:!0,visible:!0}}copyUISchemaToClipboard(){return(0,i.sH)(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(JSON.stringify(this.uichemaToUse)),v.debug("Autogenerated UI schema copied to clipboard")}catch(e){v.error("Failed to copy autogenerated UI schema: ",e)}})}};(0,i.Cg)([p.observable],T.prototype,"prefix",void 0),(0,i.Cg)([p.observable],T.prototype,"jsonforms",void 0),(0,i.Cg)([p.observable],T.prototype,"i18n",void 0),(0,i.Cg)([p.observable],T.prototype,"uichemaToUse",void 0),(0,i.Cg)([p.observable],T.prototype,"schema",void 0),(0,i.Cg)([p.observable],T.prototype,"uischema",void 0),(0,i.Cg)([p.observable],T.prototype,"data",void 0),(0,i.Cg)([p.observable],T.prototype,"renderers",void 0),(0,i.Cg)([p.observable],T.prototype,"validationMode",void 0),(0,i.Cg)([p.observable],T.prototype,"ajv",void 0),(0,i.Cg)([(0,p.attr)({mode:"boolean"})],T.prototype,"readonly",void 0),(0,i.Cg)([p.observable],T.prototype,"config",void 0),(0,i.Cg)([p.observable],T.prototype,"rowSubmitStatuses",void 0),(0,i.Cg)([p.observable],T.prototype,"bulkInsert",void 0),T=(0,i.Cg)([(0,p.customElement)({name:"json-forms",template:L,styles:p.css`
289
289
  .clipboard-button {
290
290
  display: flex;
291
291
  }
@@ -923,7 +923,7 @@
923
923
  <template>
924
924
  ${w({prefix:e,innerTemplate:p.html`
925
925
  <${e}-checkbox
926
- ?checked=${e=>e.control.data}
926
+ :checked=${e=>e.control.data}
927
927
  ?disabled=${e=>!e.control.enabled}
928
928
  :autofocus=${e=>e.control.config.focus}
929
929
  :placeholder=${e=>e.control.config.placeholder}
@@ -5526,4 +5526,4 @@
5526
5526
  </rapid-tabs>
5527
5527
  </template>
5528
5528
  `;let Mc=class extends p.FASTElement{};Mc=(0,i.Cg)([(0,p.customElement)({name:"design-system-preview",template:Rc,styles:pc})],Mc),((e,t="zero")=>(0,oe.provideDesignSystem)(e,t,r,o))().register(vl,Rd),(0,Id.provideDesignSystem)().register(Id.baseComponents,Fd.rapidGridComponents,da)}}]);
5529
- //# sourceMappingURL=627.04764c4fb26a0a4c31b87b92348da5f4.js.map
5529
+ //# sourceMappingURL=627.dc669d450c104134f4ee3d4d66c376f9.js.map