journeyapps
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -106,2 +106,5 @@ // # schema module | ||
}, | ||
'card': { | ||
} | ||
@@ -230,2 +233,5 @@ }; | ||
}, | ||
'card': { | ||
} | ||
@@ -277,2 +283,24 @@ }; | ||
var cardInfoElement = { | ||
'header': { | ||
'show-if': xml.attribute.notBlank, | ||
'hide-if': xml.attribute.notBlank | ||
}, | ||
'footer': { | ||
'show-if': xml.attribute.notBlank, | ||
'hide-if': xml.attribute.notBlank | ||
}, | ||
'content': { | ||
'show-if': xml.attribute.notBlank, | ||
'hide-if': xml.attribute.notBlank | ||
} | ||
}; | ||
var cardAccentElement = { | ||
'accent': { | ||
'label': xml.attribute.label, | ||
'color': xml.attribute.any | ||
} | ||
}; | ||
const listActionIconOptions = ['ion-chevron-right', 'ion-more', 'ion-edit', 'ion-trash-a']; | ||
@@ -1030,2 +1058,48 @@ | ||
if (type == 'card') { | ||
component.header = null; | ||
component.footer = null; | ||
component.accent = null; | ||
component.cardContent = null; | ||
component.action = null; | ||
xml.children(element, 'accent').forEach(function(accentElement) { | ||
parseElement(accentElement, cardAccentElement); | ||
component.accent = { | ||
'label': format(accentElement, 'label'), | ||
'color': format(accentElement, 'color') | ||
}; | ||
}); | ||
xml.children(element, 'header').forEach(function(headerElement) { | ||
var parsedHeader = parseElement(headerElement, cardInfoElement); | ||
component.header = { | ||
value: formatText(headerElement) | ||
}; | ||
}); | ||
xml.children(element, 'footer').forEach(function(footerElement) { | ||
var parsedFooter = parseElement(footerElement, cardInfoElement); | ||
component.footer = { | ||
value: formatText(footerElement) | ||
}; | ||
}); | ||
xml.children(element, 'content').forEach(function(contentElement) { | ||
var parsedContent = parseElement(contentElement, cardInfoElement); | ||
component.cardContent = { | ||
value: formatText(contentElement) | ||
}; | ||
}); | ||
xml.children(element, 'action').forEach(function(actionElement) { | ||
parseElement(actionElement, v3listElement); | ||
var action = { | ||
label: getAttribute(actionElement, 'label'), | ||
onpress: actionElement.getAttribute(tag.onPress) | ||
}; | ||
var iconName = getAttribute(actionElement, 'icon'); | ||
if (iconName) { | ||
action.icon = iconName; | ||
} | ||
component.action = action; | ||
inferOnPress(action.onpress); | ||
}); | ||
} | ||
if(type == 'object-repeat') { | ||
@@ -1058,3 +1132,2 @@ component.collection = getAttribute(element, 'query'); | ||
} | ||
} | ||
@@ -1061,0 +1134,0 @@ |
{ | ||
"name": "journeyapps", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Journey JS library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
451546
11578