@dosgato/templating 0.0.146 → 0.0.147
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.js +4 -2
- package/package.json +1 -1
package/dist/component.js
CHANGED
|
@@ -111,7 +111,9 @@ export class Component extends ResourceProvider {
|
|
|
111
111
|
if (!Array.isArray(components))
|
|
112
112
|
components = this.renderedAreas.get(components) ?? [];
|
|
113
113
|
const wrap = opts?.wrap ?? defaultWrap;
|
|
114
|
-
if (opts?.
|
|
114
|
+
if (opts?.skipContent && !this.editMode)
|
|
115
|
+
return '';
|
|
116
|
+
if (opts?.skipBars || opts?.skipEditBars || !this.editMode)
|
|
115
117
|
return components.map((c, indexInArea) => wrap({ ...c, content: c.output, bar: '', indexInArea })).join('');
|
|
116
118
|
return components
|
|
117
119
|
.map((c, indexInArea) => {
|
|
@@ -146,7 +148,7 @@ export class Component extends ResourceProvider {
|
|
|
146
148
|
const full = !!(opts?.max && ownedComponentCount >= opts.max);
|
|
147
149
|
const wrap = opts?.wrap ?? defaultWrap;
|
|
148
150
|
let output = this.renderComponents(components, { ...opts, editBarOpts: { ...opts?.editBarOpts, disableDelete: ownedComponentCount <= (opts?.min ?? 0), disableDrop: full } });
|
|
149
|
-
if (!opts?.skipBars && !opts?.skipNewBar) {
|
|
151
|
+
if (!opts?.skipBars && !opts?.skipNewBar && this.editMode) {
|
|
150
152
|
let bar;
|
|
151
153
|
if (full) {
|
|
152
154
|
if (!opts.hideMaxWarning) {
|