@dosgato/templating 0.0.105 → 0.0.107
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/render.d.ts +5 -1
- package/dist/uitemplate.d.ts +14 -0
- package/package.json +1 -1
package/dist/render.d.ts
CHANGED
|
@@ -81,11 +81,15 @@ export interface APIClient {
|
|
|
81
81
|
* By default this will generate relative links based on the page currently being rendered. Set
|
|
82
82
|
* absolute: true to generate a full URL suitable for a backend http request or non-HTML document
|
|
83
83
|
* like an RSS feed.
|
|
84
|
+
*
|
|
85
|
+
* Will be undefined for cross-site links to pages without launch info, since the resulting link would be
|
|
86
|
+
* broken, but if a site has launch info that is simply disabled, getHref will still work. Any links generated
|
|
87
|
+
* would work as soon as the launch info is enabled.
|
|
84
88
|
*/
|
|
85
89
|
getHref: (page: PageRecordOptionalData, opts?: {
|
|
86
90
|
absolute?: boolean;
|
|
87
91
|
extension?: string;
|
|
88
|
-
}) => string;
|
|
92
|
+
}) => string | undefined;
|
|
89
93
|
/**
|
|
90
94
|
* This function will retrieve information about an image to help you construct responsive HTML
|
|
91
95
|
* for a <picture> element including the <img> and all <source> tags.
|
package/dist/uitemplate.d.ts
CHANGED
|
@@ -38,6 +38,20 @@ export interface UITemplate {
|
|
|
38
38
|
* requests to the API.
|
|
39
39
|
*/
|
|
40
40
|
dialog?: new (...args: any[]) => any;
|
|
41
|
+
/**
|
|
42
|
+
* Sometimes it's useful for a component to have a stable but random identifier for use
|
|
43
|
+
* during render. For instance, to set the id on an HTML element for reference by other
|
|
44
|
+
* components or code.
|
|
45
|
+
*
|
|
46
|
+
* If your component has a dialog, dosgato-dialog has a <FieldIdentifier> component for this;
|
|
47
|
+
* it's invisible but either creates or maintains a random string.
|
|
48
|
+
*
|
|
49
|
+
* If your component has no dialog but still needs an identifier, you can name a property
|
|
50
|
+
* here and dosgato-admin will generate one for you upon creation.
|
|
51
|
+
*
|
|
52
|
+
* For example, `randomId: 'id'` means your component data will look like `{ id: 'cym87regpk' }`
|
|
53
|
+
*/
|
|
54
|
+
randomId?: string;
|
|
41
55
|
/**
|
|
42
56
|
* Sometimes when you create a component that has areas, you want to automatically fill
|
|
43
57
|
* one or more areas with some default introductory content.
|