Skip to content

Commit 3026c25

Browse files
committed
[TASK] Add description to extension authors list
Add a description to the persons list explaining that author information is written to ext_emconf.php and composer.json. Also add description support to the list renderer in render-fields.js.
1 parent 74342bb commit 3026c25

4 files changed

Lines changed: 40 additions & 25 deletions

File tree

Resources/Private/Language/locallang.xlf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@
188188
<trans-unit id="persons" resname="persons">
189189
<source>Extension authors</source>
190190
</trans-unit>
191+
<trans-unit id="descr_persons" resname="descr_persons">
192+
<source>Author information is written to ext_emconf.php and composer.json of the generated extension.</source>
193+
</trans-unit>
191194
<trans-unit id="role" resname="role">
192195
<source>Role</source>
193196
</trans-unit>

Resources/Public/JavaScript/domain-modeling.js

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ const mt = (a, e, t) => {
527527
* SPDX-License-Identifier: BSD-3-Clause
528528
*/
529529
const L = globalThis;
530-
let w = class extends O {
530+
let x = class extends O {
531531
constructor() {
532532
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
533533
}
@@ -553,11 +553,11 @@ let w = class extends O {
553553
}
554554
};
555555
var Re;
556-
w._$litElement$ = !0, w.finalized = !0, (Re = L.litElementHydrateSupport) == null || Re.call(L, { LitElement: w });
556+
x._$litElement$ = !0, x.finalized = !0, (Re = L.litElementHydrateSupport) == null || Re.call(L, { LitElement: x });
557557
const ee = L.litElementPolyfillSupport;
558-
ee == null || ee({ LitElement: w });
558+
ee == null || ee({ LitElement: x });
559559
(L.litElementVersions ?? (L.litElementVersions = [])).push("4.2.2");
560-
class se extends w {
560+
class se extends x {
561561
connectedCallback() {
562562
super.connectedCallback(), this.addEventListener("pointerdown", this._onPointerDown.bind(this));
563563
}
@@ -641,7 +641,7 @@ g(se, "properties", {
641641
}
642642
`);
643643
customElements.define("eb-terminal", se);
644-
class ne extends w {
644+
class ne extends x {
645645
getPath() {
646646
const { x1: e, y1: t, x2: i, y2: r } = this, s = t + 80, n = r - 80;
647647
return `M ${e} ${t} C ${e} ${s}, ${i} ${n}, ${i} ${r}`;
@@ -684,7 +684,7 @@ g(ne, "properties", {
684684
}
685685
`);
686686
customElements.define("eb-wire", ne);
687-
function x(a) {
687+
function w(a) {
688688
var i, r, s;
689689
if (!a)
690690
return "";
@@ -702,10 +702,10 @@ function Fe(a) {
702702
case "string":
703703
return p`<eb-string-field
704704
name="${e.name}"
705-
label="${x(e.label ?? "")}"
705+
label="${w(e.label ?? "")}"
706706
?required="${e.required}"
707707
?advanced="${e.advancedMode || !1}"
708-
description="${x(e.description ?? "")}"
708+
description="${w(e.description ?? "")}"
709709
help-link="${e.helpLink ?? ""}"
710710
type-invite="${e.typeInvite ?? ""}"
711711
placeholder="${e.placeholder ?? ""}"
@@ -728,19 +728,19 @@ function Fe(a) {
728728
case "text":
729729
return p`<eb-textarea-field
730730
name="${e.name}"
731-
label="${x(e.label ?? "")}"
731+
label="${w(e.label ?? "")}"
732732
?advanced="${e.advancedMode || !1}"
733-
description="${x(e.description ?? "")}"
733+
description="${w(e.description ?? "")}"
734734
help-link="${e.helpLink ?? ""}"
735735
placeholder="${e.placeholder ?? ""}"
736736
.value="${e.value ?? ""}"
737737
></eb-textarea-field>`;
738738
case "select":
739739
return p`<eb-select-field
740740
name="${e.name}"
741-
label="${x(e.label ?? "")}"
741+
label="${w(e.label ?? "")}"
742742
?advanced="${e.advancedMode || !1}"
743-
description="${x(e.description ?? "")}"
743+
description="${w(e.description ?? "")}"
744744
help-link="${e.helpLink ?? ""}"
745745
.selectValues="${e.selectValues ?? []}"
746746
.selectOptions="${e.selectOptions ?? []}"
@@ -749,9 +749,9 @@ function Fe(a) {
749749
case "boolean":
750750
return p`<eb-boolean-field
751751
name="${e.name}"
752-
label="${x(e.label ?? "")}"
752+
label="${w(e.label ?? "")}"
753753
?advanced="${e.advancedMode || !1}"
754-
description="${x(e.description ?? "")}"
754+
description="${w(e.description ?? "")}"
755755
help-link="${e.helpLink ?? ""}"
756756
.value="${e.value ?? !1}"
757757
data-visible-for="${((l = e.visibleForTypes) == null ? void 0 : l.join(" ")) ?? ""}"
@@ -760,7 +760,7 @@ function Fe(a) {
760760
case "group":
761761
return p`<eb-group
762762
name="${e.name ?? ""}"
763-
legend="${x(e.legend ?? "")}"
763+
legend="${w(e.legend ?? "")}"
764764
?advanced="${e.advancedMode || !1}"
765765
?collapsible="${e.collapsible}"
766766
?collapsed="${e.collapsed}"
@@ -774,21 +774,25 @@ function Fe(a) {
774774
?advanced="${e.advancedMode || !1}"
775775
data-visible-for="${((c = e.visibleForTypes) == null ? void 0 : c.join(" ")) ?? ""}"
776776
data-hidden-for="${((b = e.hiddenForTypes) == null ? void 0 : b.join(" ")) ?? ""}"
777-
>${x(e.label)}</label
777+
>${w(e.label)}</label
778+
>` : ""}
779+
${e.description ? p`<small
780+
style="display:block;margin-bottom:0.4rem;font-size:0.8em;color:var(--bs-secondary-color, #6c757d)"
781+
>${w(e.description)}</small
778782
>` : ""}
779783
<eb-list-field
780784
name="${e.name}"
781785
?advanced="${e.advancedMode || !1}"
782786
?sortable="${e.sortable}"
783-
add-label="${x("add")}"
787+
add-label="${w("add")}"
784788
element-type="${JSON.stringify(e.elementType ?? {})}"
785789
data-visible-for="${((d = e.visibleForTypes) == null ? void 0 : d.join(" ")) ?? ""}"
786790
data-hidden-for="${((h = e.hiddenForTypes) == null ? void 0 : h.join(" ")) ?? ""}"
787791
></eb-list-field>`;
788792
case "inplaceedit":
789793
return p`<eb-inplace-edit name="${e.name ?? ""}" .value="${e.value ?? ""}"></eb-inplace-edit>`;
790794
default:
791-
return p`<eb-string-field name="${e.name}" label="${x(e.label ?? "")}"></eb-string-field>`;
795+
return p`<eb-string-field name="${e.name}" label="${w(e.label ?? "")}"></eb-string-field>`;
792796
}
793797
}
794798
function _e(a) {
@@ -1546,7 +1550,7 @@ const je = {
15461550
color: var(--bs-danger, #dc3545);
15471551
}
15481552
`;
1549-
class ae extends w {
1553+
class ae extends x {
15501554
constructor() {
15511555
super(), this.posX = 10, this.posY = 10, this.moduleData = {}, this._name = "", this._advancedMode = !1, this._dragging = !1, this._dragOffsetX = 0, this._dragOffsetY = 0, this._resizeWidth = null, this._resizeHeight = null, this._resizing = !1, this._resizeStartX = 0, this._resizeStartY = 0, this._resizeStartW = 0, this._resizeStartH = 0;
15521556
}
@@ -1763,7 +1767,7 @@ g(ae, "properties", {
17631767
`
17641768
]);
17651769
customElements.define("eb-container", ae);
1766-
class oe extends w {
1770+
class oe extends x {
17671771
constructor() {
17681772
super(), this._wires = [], this._containers = [], this._drawingWire = null, this._tempWire = null, this._hoveredWireId = null, this._panOffset = { x: 0, y: 0 }, this._isPanning = !1, this._panStartX = 0, this._panStartY = 0;
17691773
}
@@ -2213,7 +2217,7 @@ const He = $`
22132217
border-color: color-mix(in srgb, var(--bs-warning, #ffc107) 80%, #000);
22142218
}
22152219
`;
2216-
class C extends w {
2220+
class C extends x {
22172221
/**
22182222
* Dispatches a `field-updated` CustomEvent that bubbles through Shadow DOM
22192223
* boundaries so parent components can collect updated values.
@@ -2684,7 +2688,7 @@ g(ue, "properties", {
26842688
}
26852689
`);
26862690
customElements.define("eb-hidden-field", ue);
2687-
class he extends w {
2691+
class he extends x {
26882692
connectedCallback() {
26892693
super.connectedCallback(), this.addEventListener("field-updated", this._onFieldUpdated), this._onAdvancedModeChanged = (e) => {
26902694
this.advancedMode = e.detail.enabled;
@@ -2895,7 +2899,7 @@ function q(a) {
28952899
` : p`<span aria-hidden="true">${xt[a] ?? a}</span>`;
28962900
}
28972901
const Ct = /* @__PURE__ */ new Set(["propertyName", "relationName", "customAction", "name", "label"]);
2898-
class me extends w {
2902+
class me extends x {
28992903
constructor() {
29002904
super(), this.sortable = !0, this.addLabel = "add", this._items = [], this._boundOnFieldUpdated = this._onFieldUpdated.bind(this);
29012905
}
@@ -3364,6 +3368,7 @@ const kt = [
33643368
inputParams: {
33653369
label: "persons",
33663370
name: "persons",
3371+
description: "descr_persons",
33673372
sortable: !0,
33683373
className: "persons mainGroup",
33693374
elementType: {
@@ -3580,7 +3585,7 @@ const kt = [
35803585
}
35813586
}
35823587
];
3583-
class be extends w {
3588+
class be extends x {
35843589
constructor() {
35853590
super(), this.smdUrl = "", this.extensionName = "", this.initialWarnings = [], this.composerWarning = "", this._loading = !1, this._extensionData = null, this._advancedMode = !1, this._leftCollapsed = !1, this._isDirty = !1;
35863591
}
@@ -3969,7 +3974,7 @@ g(be, "properties", {
39693974
`
39703975
]);
39713976
customElements.define("eb-wiring-editor", be);
3972-
class fe extends w {
3977+
class fe extends x {
39733978
constructor() {
39743979
super(), this._editing = !1;
39753980
}

Resources/Public/jsDomainModeling/src/config/extensionProperties.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ export const extensionPropertiesFields = [
236236
inputParams: {
237237
label: 'persons',
238238
name: 'persons',
239+
description: 'descr_persons',
239240
sortable: true,
240241
className: 'persons mainGroup',
241242
elementType: {

Resources/Public/jsDomainModeling/src/render-fields.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ export function renderFieldDef(fieldDef) {
107107
>${translate(p.label)}</label
108108
>`
109109
: ''}
110+
${p.description
111+
? html`<small
112+
style="display:block;margin-bottom:0.4rem;font-size:0.8em;color:var(--bs-secondary-color, #6c757d)"
113+
>${translate(p.description)}</small
114+
>`
115+
: ''}
110116
<eb-list-field
111117
name="${p.name}"
112118
?advanced="${p.advancedMode || false}"

0 commit comments

Comments
 (0)