Class: Master

@bldr/vue-app-presentation/masters~Master

Each master slide is a instance of this class. This class has many dummy methods. They are there for documentation reasons. On the other side they are useful as default methods. You have not to check if a master slide implements a specific hook.

new Master (specs)

Name Type Description
specs Object

The default exported object from the main.js file.

Members

documentation String

Some markdown formated string to document this master slide.

example String

A example presentation file in the YAML format like *.baldr.yml files featuring the master.

exampleClean

A cleaned version of this.example.

Remove the empty line at the beginning of the backtick string example.

A instance of MasterIcon which holds information about the master icon.

methods_ object private

All imported methods. They are not called directly, but through public methods, which add additional functionality.

name string

It is the same as the basename of the Vue component, for example audio.vue. The name is audio.

propNamesInlineMedia

The name of the props which are supporting inline media (for example markup)

propsDef

The definition of the slide properties (props) (aka props of a master).

store Object

A vuex object containing state, getters, actions, mutations properties which buildes a submodule vuex store for each master.

A style configuration object.

title String

The human readable title of the master slide.

Methods

beforeLeaveSlide (payload, thisArg)

Called before leaving a slide. This hook is triggered before the new slide number slideNoCurrent is set in the vuex store.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
oldSlide module:@bldr/vue-app-presentation/content-file~Slide
oldProps module:@bldr/vue-app-presentation~props
newSlide module:@bldr/vue-app-presentation/content-file~Slide
newProps module:@bldr/vue-app-presentation~props

calculateStepCount (props, thisArg)Number

Calculate from the given props the step count. This hook method is called after media resolution.

Name Type Description
props module:@bldr/vue-app-presentation~props
thisArg object

The thisArg the master function is called with.

Returns:
Type Description
Number
  • The number of steps.

callFunction_ (functionName, payload, thisArg)mixed private

Call a master function. Master functions are definied in the master.vue files. They are members of the exported object called master.

export const master = {
  normalizeProps (props) {
    return props
  }
}
Name Type Description
functionName String

The name of the master function.

payload mixed

The argument the master function is called with.

thisArg object

The thisArg the master function is called with.

Returns:
Type Description
mixed

collectPropsMain (props, thisArg)Object

Collect the props (properties) for the main Vue component.

Name Type Description
props object

The props of the master slide.

thisArg object

The thisArg the master function is called with.

Returns:
Type Description
Object
  • The props for the main component as a object.

collectPropsPreview (payload, thisArg)Object

Collect the props (properties) for the preview Vue component.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
props number

The props of the master slide.

propsMain number

The props of the main Vue component.

Returns:
Type Description
Object
  • The props for the preview component as a object.

detectUnkownProps (props)

Raise an error if there is an unkown prop - a not in the props section defined prop.

Name Type Description
props module:@bldr/vue-app-presentation~props

enterSlide (payload, thisArg)

Called when entering a slide.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
oldSlide module:@bldr/vue-app-presentation/content-file~Slide
oldProps module:@bldr/vue-app-presentation~props
newSlide module:@bldr/vue-app-presentation/content-file~Slide
newProps module:@bldr/vue-app-presentation~props

enterStep (payload, thisArg)

Called when entering a step.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
oldStepNo number
newStepNo number

extractInlineMediaUris (props)Set

Filter the master props for props which are supporting inline media.

Name Type Description
props module:@bldr/vue-app-presentation~props
Returns:
Type Description
Set

leaveSlide (payload, thisArg)

Called when leaving a slide. This hook is triggered by the Vue lifecycle hook beforeDestroy.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
oldSlide module:@bldr/vue-app-presentation/content-file~Slide
oldProps module:@bldr/vue-app-presentation~props
newSlide module:@bldr/vue-app-presentation/content-file~Slide
newProps module:@bldr/vue-app-presentation~props

leaveStep (payload, thisArg)

Called when leaving a step.

Name Type Description
payload object
thisArg object

The thisArg the master function is called with.

Properties:
Name Type Description
payload object
Properties
Name Type Description
oldStepNo number
newStepNo number

markupToHtml (props)object

Convert in the props certain strings containing markup to HTML.

Name Type Description
props module:@bldr/vue-app-presentation~props
Returns:
Type Description
object

normalizeProps (props)object

result must fit to props

Name Type Description
props module:@bldr/vue-app-presentation~props
Returns:
Type Description
object

plainTextFromProps (props)String

Name Type Description
props module:@bldr/vue-app-presentation~props
Returns:
Type Description
String

registerVuexModule_ () private

Must called after this.store is set.

renderInlineMedia (props)

Replace the inline media tags [id:Beethoven] in certain props with HTML. This function must be called after the media resolution.

Name Type Description
props module:@bldr/vue-app-presentation~props

resolveMediaUris (props)Set

Retrieve the media URIs which have to be resolved.

Call the master funtion resolveMediaUris and collect the media URIs. (like [id:beethoven, filename:mozart.mp3]). Extract media URIs from the text props.

Name Type Description
props module:@bldr/vue-app-presentation~props
Returns:
Type Description
Set

validateUris (props)

Validate all media file URIs in the props of a certain slide.

Name Type Description
props module:@bldr/vue-app-presentation~props