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.
 
 
 

31 lines
1019 B

import { LightningElement } from 'lwc';
import template from './baseStepNavigationComponent.html'
import omniscriptStep from 'vlocity_cmt/omniscriptStep';
// import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
import { dispatchOmniEvent } from 'vlocity_cmt/omniscriptUtils';
export default class BaseStepNavigationComponent extends omniscriptStep {
connectedCallback() {
console.debug("BaseStepNavigationComponent - connected");
}
gotoNext() {
dispatchOmniEvent(this, { moveToStep: 'next' }, 'omniautoadvance');
}
gotoPrev() {
try {
let jsDef = JSON.parse(JSON.stringify(this.jsonDef));
let idx = jsDef.indexInParent;
// console.debug('gotoPrev stepIndex', idx);
dispatchOmniEvent(this, { moveToStep: idx - 1 }, 'omniautoadvance');
} catch (e) {
console.debug("Could not parse jsonDef to get previous step index!", e);
}
}
render() {
return template;
}
}