gantt-schedule-timeline-calendar
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "gantt-schedule-timeline-calendar", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Gantt, Schedule, Timeline, Calendar components all in one!", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.umd.js", |
@@ -135,3 +135,3 @@ /** | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -146,4 +146,4 @@ html` | ||
`, | ||
{ vido, props: {}, templateProps: props } | ||
{ vido, props: {}, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ChartTimeline(vido) { | ||
export default function ChartTimeline(vido, props) { | ||
const { api, state, onDestroy, actions, update, html, createComponent } = vido; | ||
@@ -30,3 +30,3 @@ const componentName = 'chart-timeline'; | ||
onDestroy( | ||
state.subscribe('config.classNames', value => { | ||
state.subscribe('config.classNames', () => { | ||
className = api.getClass(componentName); | ||
@@ -53,3 +53,3 @@ classNameInner = api.getClass(componentName + '-inner'); | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -63,4 +63,4 @@ html` | ||
`, | ||
{ props: {}, vido, templateProps: props } | ||
{ props, vido, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ChartTimelineGrid(vido) { | ||
export default function ChartTimelineGrid(vido, props) { | ||
const { api, state, onDestroy, actions, update, html, reuseComponents } = vido; | ||
@@ -70,3 +70,3 @@ const componentName = 'chart-timeline-grid'; | ||
componentActions.push(element => { | ||
state.update('_internal.elements.grid'); | ||
state.update('_internal.elements.grid', element); | ||
}); | ||
@@ -78,3 +78,3 @@ | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -86,4 +86,4 @@ html` | ||
`, | ||
{ props: {}, vido, templateProps: props } | ||
{ props, vido, templateProps } | ||
); | ||
} |
@@ -11,6 +11,5 @@ /** | ||
export default function ChartTimelineGridRow(vido, { row, blocks, top }) { | ||
export default function ChartTimelineGridRow(vido, props) { | ||
const { api, state, onDestroy, actions, update, html, reuseComponents, onChange } = vido; | ||
const componentName = 'chart-timeline-grid-row'; | ||
let wrapper; | ||
@@ -31,5 +30,6 @@ onDestroy( | ||
let rowsBlocksComponents = []; | ||
onChange(({ row, blocks, top }) => { | ||
reuseComponents(rowsBlocksComponents, blocks, block => block, GridBlockComponent); | ||
style = `height: ${row.height}px;`; | ||
onChange(changedProps => { | ||
props = changedProps; | ||
reuseComponents(rowsBlocksComponents, props.blocks, block => block, GridBlockComponent); | ||
style = `height: ${props.row.height}px;`; | ||
update(); | ||
@@ -42,11 +42,21 @@ }); | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
html` | ||
<div class=${className} data-actions=${actions(componentActions, { row, api, state })} style=${style}> | ||
<div | ||
class=${className} | ||
data-actions=${actions(componentActions, { | ||
row: props.row, | ||
blocks: props.blocks, | ||
top: props.top, | ||
api, | ||
state | ||
})} | ||
style=${style} | ||
> | ||
${rowsBlocksComponents.map(r => r.html())} | ||
</div> | ||
`, | ||
{ vido, props: { row }, templateProps: props } | ||
{ vido, props, templateProps } | ||
); | ||
} |
@@ -97,3 +97,3 @@ /** | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -113,4 +113,4 @@ list.columns.percent > 0 | ||
: null, | ||
{ vido, props: {}, templateProps: props } | ||
{ vido, props: {}, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ListColumn(vido, { columnId }) { | ||
export default function ListColumn(vido, props) { | ||
const { api, state, onDestroy, actions, update, createComponent, reuseComponents, html } = vido; | ||
@@ -24,3 +24,3 @@ | ||
let column, | ||
columnPath = `config.list.columns.data.${columnId}`; | ||
columnPath = `config.list.columns.data.${props.columnId}`; | ||
onDestroy( | ||
@@ -50,3 +50,3 @@ state.subscribe(columnPath, val => { | ||
state.subscribe('_internal.list.visibleRows;', val => { | ||
reuseComponents(visibleRows, val, row => ({ columnId, rowId: row.id }), ListColumnRowComponent); | ||
reuseComponents(visibleRows, val, row => ({ columnId: props.columnId, rowId: row.id }), ListColumnRowComponent); | ||
update(); | ||
@@ -81,6 +81,6 @@ }) | ||
const ListColumnHeader = createComponent(ListColumnHeaderComponent, { columnId }); | ||
const ListColumnHeader = createComponent(ListColumnHeaderComponent, { columnId: props.columnId }); | ||
onDestroy(ListColumnHeader.destroy); | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -101,4 +101,4 @@ html` | ||
`, | ||
{ vido, props: { columnId }, templateProps: props } | ||
{ vido, props, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ListColumnHeader(vido, { columnId }) { | ||
export default function ListColumnHeader(vido, props) { | ||
const { api, state, onDestroy, actions, update, createComponent, html } = vido; | ||
@@ -25,3 +25,3 @@ | ||
); | ||
const ListColumnHeaderResizer = createComponent(ListColumnHeaderResizerComponent, { columnId }); | ||
const ListColumnHeaderResizer = createComponent(ListColumnHeaderResizerComponent, { columnId: props.columnId }); | ||
onDestroy(ListColumnHeaderResizer.destroy); | ||
@@ -36,3 +36,3 @@ | ||
onDestroy( | ||
state.subscribe(`config.list.columns.data.${columnId}`, val => { | ||
state.subscribe(`config.list.columns.data.${props.columnId}`, val => { | ||
column = val; | ||
@@ -70,3 +70,3 @@ update(); | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -78,4 +78,4 @@ html` | ||
`, | ||
{ vido, props: { columnId }, templateProps: props } | ||
{ vido, props, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ListColumnHeaderResizer(vido, { columnId }) { | ||
export default function ListColumnHeaderResizer(vido, props) { | ||
const { api, state, onDestroy, update, html, actions } = vido; | ||
@@ -23,3 +23,3 @@ | ||
onDestroy( | ||
state.subscribe(`config.list.columns.data.${columnId}`, val => { | ||
state.subscribe(`config.list.columns.data.${props.columnId}`, val => { | ||
column = val; | ||
@@ -116,3 +116,3 @@ update(); | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -138,4 +138,4 @@ html` | ||
`, | ||
{ vido, props: { columnId }, temlateProps: props } | ||
{ vido, props, templateProps } | ||
); | ||
} |
@@ -11,3 +11,3 @@ /** | ||
export default function ListColumnRow(vido, { rowId, columnId }) { | ||
export default function ListColumnRow(vido, props) { | ||
const { api, state, onDestroy, actions, update, html, createComponent, onChange } = vido; | ||
@@ -21,5 +21,5 @@ | ||
let rowPath = `_internal.flatTreeMapById.${rowId}`, | ||
let rowPath = `_internal.flatTreeMapById.${props.rowId}`, | ||
row = state.get(rowPath); | ||
let colPath = `config.list.columns.data.${columnId}`, | ||
let colPath = `config.list.columns.data.${props.columnId}`, | ||
column = state.get(colPath); | ||
@@ -100,3 +100,3 @@ let style; | ||
return props => | ||
return templateProps => | ||
wrapper( | ||
@@ -118,4 +118,4 @@ html` | ||
`, | ||
{ vido, props: { rowId, columnId }, templateProps: props } | ||
{ vido, props, templateProps } | ||
); | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1217624
5175