Examples of Vlocity/SF LWC components (in various states of working)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
1.5 KiB

import { LightningElement, track } from 'lwc';
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
export default class MyCustomComponent extends OmniscriptBaseMixin(LightningElement) {
@track layout;
@track theme;
@track parentClass;
connectedCallback() {
console.log("MyCustomComponent - Connected");
this.layout = this.getAttribute('data-omni-layout'); // returns lightning or newport
this.theme = this.layout === 'lightning' ? 'slds' : 'nds'; // we can now use theme={theme} in html
this.parentClass = this.layout === 'lightning' ? 'slds-grid slds-wrap' : 'nds-grid nds-wrap';
try {
console.log("MyCustomComponent - this:", this);
console.log("MyCustomComponent - this.omniScriptHeaderDef:", JSON.parse(JSON.stringify(this.omniScriptHeaderDef)));
console.log("MyCustomComponent - this.omniResume:", JSON.parse(JSON.stringify(this.omniResume)));
console.log("MyCustomComponent - this.omniSeedJson:", JSON.parse(JSON.stringify(this.omniSeedJson)));
console.log("MyCustomComponent - this.omniJsonDef:", JSON.parse(JSON.stringify(this.omniJsonDef)));
console.log("MyCustomComponent - this.omniJsonData:", JSON.parse(JSON.stringify(this.omniJsonData)));
// console.log("MyCustomComponent - this.omniLayout:", JSON.parse(JSON.stringify(this.omniLayout)));
} catch (e) {
console.debug("Error Parsing: ", e);
}
}
handleBlur(evt) {
this.omniUpdateDataJson(evt);
}
}