Browse Source

Fixing stupid mistakes

master
Levi Olson 4 years ago
parent
commit
2c8fdfc3ce
7 changed files with 35 additions and 44 deletions
  1. +23
    -8
      README.org
  2. +0
    -4
      force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.html
  3. +0
    -15
      force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js
  4. +0
    -6
      force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js-meta.xml
  5. +10
    -4
      force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js
  6. +0
    -3
      force-app/main/default/lwc/jsconfig.json
  7. +2
    -4
      force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js

+ 23
- 8
README.org View File

@ -3,24 +3,39 @@
My own local collection of (mostly) working examples of Vlocity LWCs. My own local collection of (mostly) working examples of Vlocity LWCs.
** List
*** NEEDCLARIFICATION Step Example - baseStepNavigationComponent [[dired:./force-app/main/default/lwc/baseStepNavigationComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseStepNavigationComponent][gh]]
* Contributing
When creating a new component, use this naming convention:
The name is 3 parts.
- First, prefix with =base=, =omni= or =lightning=
- Second, describe the type of component (i.e. "file input", "text", "checkbox", etc...)
- Then append =Component=
Examples:
- =baseCheckboxComponent=
- =omniStepComponent=
- =omniTextComponent=
- =lightningFileInputComponent=
* Current List
Updated Regularly
*** PROVIDEUPDATE Step Example - baseStepNavigationComponent [[dired:./force-app/main/default/lwc/baseStepNavigationComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseStepNavigationComponent][gh]]
Need to get info on how to get =stepIndex= for the =dispatchOmniEvent= to work Need to get info on how to get =stepIndex= for the =dispatchOmniEvent= to work
*** NEEDCLARIFICATION Checkbox Example - baseCheckboxComponent [[dired:./force-app/main/default/lwc/baseCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseCheckboxComponent][gh]]
Not able to get the value of the checkbox
*** NEEDCLARIFICATION Checkbox Example - omniCheckboxComponent [[dired:./force-app/main/default/lwc/omniCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniCheckboxComponent][gh]]
Not able to get the value of the checkbox
- WORKAROUND found =this.jsonDef.indexInParent=
*** NEEDCLARIFICATION File Upload - baseFileInputComponent [[dired:force-app/main/default/lwc/baseFileInputComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseFileInputComponent][gh]] *** NEEDCLARIFICATION File Upload - baseFileInputComponent [[dired:force-app/main/default/lwc/baseFileInputComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseFileInputComponent][gh]]
Not able to see the files on the input Not able to see the files on the input
*** NEEDCLARIFICATION CSS Styling Example - textBlockHeader [[dired:~/Projects/vlocity/devr6/force-app/main/default/lwc/textBlock][link]] ap
*** NEEDCLARIFICATION CSS Styling Example - textBlockHeader [[dired:~/Projects/vlocity/devr6/force-app/main/default/lwc/textBlockHeader/][link]] ap
Need to add styles to parent, so this isn't an effective solution Need to add styles to parent, so this isn't an effective solution
/Maybe explore adding just the class (and the rest styled via Newport)/ /Maybe explore adding just the class (and the rest styled via Newport)/
*** WAITING Typeahead Example - baseTypeaheadComponent [[dired:./force-app/main/default/lwc/baseTypeaheadComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseTypeaheadComponent][gh]] *** WAITING Typeahead Example - baseTypeaheadComponent [[dired:./force-app/main/default/lwc/baseTypeaheadComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseTypeaheadComponent][gh]]
Waiting on example from Sidd Waiting on example from Sidd
*** DONE Accordion Example - baseAccordionComponent [[dired:./force-app/main/default/lwc/baseAccordionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseAccordionComponent][gh]] *** DONE Accordion Example - baseAccordionComponent [[dired:./force-app/main/default/lwc/baseAccordionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseAccordionComponent][gh]]
CLOSED: [2020-02-29 Sat 17:59] CLOSED: [2020-02-29 Sat 17:59]
*** DONE Checkbox Example - omniCheckboxComponent [[dired:./force-app/main/default/lwc/omniCheckboxComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniCheckboxComponent][gh]]
CLOSED: [2020-03-01 Sun 17:30]
*** DONE Text Example - omniTextComponent [[dired:./force-app/main/default/lwc/omniTextComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniTextComponent][gh]] *** DONE Text Example - omniTextComponent [[dired:./force-app/main/default/lwc/omniTextComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/omniTextComponent][gh]]
CLOSED: [2020-02-29 Sat 18:03] CLOSED: [2020-02-29 Sat 18:03]
*** DONE Vlocity Action Example - baseActionComponent [[dired:./force-app/main/default/lwc/baseActionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseActionComponent][gh]] *** DONE Vlocity Action Example - baseActionComponent [[dired:./force-app/main/default/lwc/baseActionComponent/][link]] [[https://github.com/leothelocust/vlocity-lwc-examples/tree/master/force-app/main/default/lwc/baseActionComponent][gh]]
CLOSED: [2020-02-29 Sat 18:03] CLOSED: [2020-02-29 Sat 18:03]

+ 0
- 4
force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.html View File

@ -1,4 +0,0 @@
<template>
<c-checkbox-component>
</c-checkbox-component>
</template>

+ 0
- 15
force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js View File

@ -1,15 +0,0 @@
import { LightningElement, track } from "lwc";
import template from "./baseCheckboxComponent.html"
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
export default class BaseCheckboxComponent extends OmniscriptBaseMixin(LightningElement){
connectedCallback() {
// this.layout = this.getAttribute('data-omni-layout'); // returns lightning or newport
console.debug("BaseCheckboxComponent - connected");
}
render() {
return template;
}
}

+ 0
- 6
force-app/main/default/lwc/baseCheckboxComponent/baseCheckboxComponent.js-meta.xml View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>46.0</apiVersion>
<isExposed>true</isExposed>
<runtimeNamespace>vlocity_cmt</runtimeNamespace>
</LightningComponentBundle>

+ 10
- 4
force-app/main/default/lwc/baseStepNavigationComponent/baseStepNavigationComponent.js View File

@ -1,10 +1,10 @@
import { LightningElement } from 'lwc'; import { LightningElement } from 'lwc';
import template from './baseStepNavigationComponent.html' import template from './baseStepNavigationComponent.html'
import omniscriptStep from 'vlocity_cmt/omniscriptStep'; import omniscriptStep from 'vlocity_cmt/omniscriptStep';
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
// import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
import { dispatchOmniEvent } from 'vlocity_cmt/omniscriptUtils'; import { dispatchOmniEvent } from 'vlocity_cmt/omniscriptUtils';
export default class BaseStepNavigationComponent extends OmniscriptBaseMixin(omniscriptStep) {
export default class BaseStepNavigationComponent extends omniscriptStep {
connectedCallback() { connectedCallback() {
console.debug("BaseStepNavigationComponent - connected"); console.debug("BaseStepNavigationComponent - connected");
@ -15,8 +15,14 @@ export default class BaseStepNavigationComponent extends OmniscriptBaseMixin(omn
} }
gotoPrev() { gotoPrev() {
console.debug('gotoPrev stepIndex', this.stepIndex);
dispatchOmniEvent(this, { moveToStep: this.stepIndex - 1 }, 'omniautoadvance');
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() { render() {

+ 0
- 3
force-app/main/default/lwc/jsconfig.json View File

@ -9,9 +9,6 @@
"c/baseActionComponent": [ "c/baseActionComponent": [
"baseActionComponent/baseActionComponent.js" "baseActionComponent/baseActionComponent.js"
], ],
"c/baseCheckboxComponent": [
"baseCheckboxComponent/baseCheckboxComponent.js"
],
"c/baseCssComponent": [ "c/baseCssComponent": [
"baseCssComponent/baseCssComponent.js" "baseCssComponent/baseCssComponent.js"
], ],

+ 2
- 4
force-app/main/default/lwc/omniCheckboxComponent/omniCheckboxComponent.js View File

@ -1,15 +1,13 @@
import { LightningElement } from "lwc"; import { LightningElement } from "lwc";
import OmniscriptCheckbox from "vlocity_cmt/omniscriptCheckbox";
import omniscriptCheckbox from "vlocity_cmt/omniscriptCheckbox";
export default class OmniCheckboxComponent extends OmniscriptCheckbox {
export default class OmniCheckboxComponent extends omniscriptCheckbox {
connectedCallback() { connectedCallback() {
console.debug("OmniCheckboxComponent - connected"); console.debug("OmniCheckboxComponent - connected");
this.omniApplyCallResp({'checkbox':false});
} }
handleChange(evt) { handleChange(evt) {
console.debug("hangleChange: ", evt); console.debug("hangleChange: ", evt);
} }
} }

Loading…
Cancel
Save