|
|
- 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)));
- } catch (e) {
- console.debug("Error Parsing: ", e);
- }
- }
-
- handleInput(evt) {
- let inp = this.template.querySelector('input')
- this.omniUpdateDataJson();
- }
- }
|