@dosgato/templating 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component.d.ts +2 -3
- package/dist/component.js +1 -1
- package/package.json +1 -1
package/dist/component.d.ts
CHANGED
|
@@ -231,10 +231,9 @@ export interface EditBarOpts {
|
|
|
231
231
|
editMode?: boolean;
|
|
232
232
|
inheritedFrom?: string;
|
|
233
233
|
}
|
|
234
|
-
export interface RenderedComponent {
|
|
235
|
-
|
|
234
|
+
export interface RenderedComponent<C extends Component = Component> {
|
|
235
|
+
component: C;
|
|
236
236
|
html: string;
|
|
237
|
-
editbar: string;
|
|
238
237
|
}
|
|
239
238
|
export declare abstract class Page<DataType extends PageData = any, FetchedType = any, RenderContextType extends ContextBase = any> extends Component<DataType, FetchedType, RenderContextType> {
|
|
240
239
|
pagePath: string;
|
package/dist/component.js
CHANGED
|
@@ -94,7 +94,7 @@ export class Component extends ResourceProvider {
|
|
|
94
94
|
// helper function to help you print an area, but you can also override this if you
|
|
95
95
|
// need to do something advanced like wrap each component in a div
|
|
96
96
|
renderComponents(components = [], opts) {
|
|
97
|
-
return components.flatMap(c => c.
|
|
97
|
+
return components.flatMap(c => c.component.inheritedFrom && opts?.hideInheritBars ? [c.html] : [c.component.editBar(), c.html]).join('');
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* During rendering, each component should determine the CSS blocks that it needs. This may
|