@dosgato/templating 0.0.87 → 0.0.89
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 -2
- package/dist/uitemplate.d.ts +21 -0
- package/package.json +1 -1
package/dist/component.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
|
|
|
168
168
|
*/
|
|
169
169
|
renderRichText: (html: string, opts?: {
|
|
170
170
|
headerLevel?: number;
|
|
171
|
-
advanceHeader?: string
|
|
171
|
+
advanceHeader?: string;
|
|
172
172
|
}) => string;
|
|
173
173
|
/**
|
|
174
174
|
* The final phase of rendering a component is the render phase. This step is BOTTOM-UP -
|
|
@@ -502,7 +502,7 @@ export interface RenderedComponent<C extends Component = Component> {
|
|
|
502
502
|
component: C;
|
|
503
503
|
output: string;
|
|
504
504
|
}
|
|
505
|
-
export declare abstract class Page<DataType extends PageData = any, FetchedType = any, RenderContextType extends ContextBase =
|
|
505
|
+
export declare abstract class Page<DataType extends PageData = any, FetchedType = any, RenderContextType extends ContextBase = ContextBase> extends Component<DataType, FetchedType, RenderContextType> {
|
|
506
506
|
/**
|
|
507
507
|
* The page id in case you need to pass it to the API, e.g. this.api.getRootPage(this.id)
|
|
508
508
|
* in a page template or this.api.getRootPage(this.page.id) in a component template.
|
package/dist/uitemplate.d.ts
CHANGED
|
@@ -66,6 +66,27 @@ export interface UITemplate {
|
|
|
66
66
|
* preview image.
|
|
67
67
|
*/
|
|
68
68
|
icon?: IconOrSVG;
|
|
69
|
+
/**
|
|
70
|
+
* Add buttons to the page bar in the page editing UI when editing pages with this
|
|
71
|
+
* template. Only applies to page templates.
|
|
72
|
+
*
|
|
73
|
+
* When clicked, the button will send a message to the page iframe. The message content
|
|
74
|
+
* will contain the label, like this:
|
|
75
|
+
*
|
|
76
|
+
* { action: 'pagebar', label: 'yourlabel' }
|
|
77
|
+
*
|
|
78
|
+
* There should be code, generated by this template, that listens for such a message and
|
|
79
|
+
* takes your desired action.
|
|
80
|
+
*/
|
|
81
|
+
pageBarButtons?: {
|
|
82
|
+
icon?: IconOrSVG;
|
|
83
|
+
label: string;
|
|
84
|
+
/**
|
|
85
|
+
* Set true if the button should only appear as an icon. `label` is still required for
|
|
86
|
+
* screen reader support.
|
|
87
|
+
*/
|
|
88
|
+
hideLabel?: boolean;
|
|
89
|
+
}[];
|
|
69
90
|
}
|
|
70
91
|
/**
|
|
71
92
|
* This is a type for the data that will be passed to dialog Svelte components as
|