@nuraly/runtime 0.1.9 → 0.1.10
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/components/ui/components/inputs/ColorPicker/colorpicker.ts +1 -7
- package/components/ui/components/inputs/Form/Form.ts +3 -11
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +1 -7
- package/components/ui/components/inputs/Select/Select.ts +1 -7
- package/components/ui/components/layout/Grid/Col.ts +2 -6
- package/components/ui/components/layout/Grid/Row.ts +2 -6
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +4 -16
- package/dist/AIChat-DP3ZdLL3.js +220 -0
- package/dist/AIChat-km1IYaR-.js +260 -0
- package/dist/Badge-BR94MUt5.js +48 -0
- package/dist/Badge-DzNZFKtC.js +70 -0
- package/dist/{BaseElement-BNBn_IJk.js → BaseElement-pS6m_x6Q.js} +153 -24
- package/dist/Button-BHAN7npC.js +92 -0
- package/dist/Button-DCqgsxrL.js +80 -0
- package/dist/Card-B70c8NFb.js +150 -0
- package/dist/Card-DhOCsGKC.js +120 -0
- package/dist/Checkbox-BZTcPwew.js +59 -0
- package/dist/Checkbox-LYTIBAUV.js +65 -0
- package/dist/Code-BWbiciC8.js +123 -0
- package/dist/Code-Ds0vFclr.js +109 -0
- package/dist/{CodeEditor-B1gNuvPb.js → CodeEditor-ChuFC0ex.js} +22 -22
- package/dist/Col-B_wpWUcU.js +217 -0
- package/dist/Col-DYs8_65c.js +193 -0
- package/dist/Collapse-4kxbQ74u.js +74 -0
- package/dist/Collapse-Dkw6Ner6.js +96 -0
- package/dist/Collections-BSF-PqBz.js +122 -0
- package/dist/Collections-D5rwMFbv.js +151 -0
- package/dist/Container-DMNh5U4Y.js +204 -0
- package/dist/DatePicker-BmEOONiA.js +99 -0
- package/dist/DatePicker-VuUroOT4.js +80 -0
- package/dist/Divider-BfxR3rVl.js +86 -0
- package/dist/Divider-etMTYU3d.js +106 -0
- package/dist/Document-CHBcJciR.js +74 -0
- package/dist/Document-Cj-TmjAf.js +90 -0
- package/dist/Dropdown-BRtHvDa3.js +133 -0
- package/dist/Dropdown-C47Y11dj.js +112 -0
- package/dist/EmbedURL-BwbJRnY1.js +142 -0
- package/dist/EmbedURL-Ci5X1vQG.js +114 -0
- package/dist/FileUpload-BBgPcRag.js +54 -0
- package/dist/FileUpload-BgkhxtNe.js +47 -0
- package/dist/Form-BLq6U3In.js +339 -0
- package/dist/Form-E6zXqgsm.js +286 -0
- package/dist/Icon-CcLuhz6B.js +64 -0
- package/dist/Icon-_UiLblGb.js +74 -0
- package/dist/Image-B_VERIvH.js +111 -0
- package/dist/Image-hI8kIx8U.js +93 -0
- package/dist/Link-BVTo43Cc.js +76 -0
- package/dist/Link-xSrPxOLt.js +95 -0
- package/dist/Menu-CembLIjO.js +83 -0
- package/dist/Menu-D9ZjIOMg.js +73 -0
- package/dist/MicroApp-DI1kQwJk.js +100 -0
- package/dist/MicroApp-DJw57sLE.js +75 -0
- package/dist/NumberInput-DftAAKEs.js +84 -0
- package/dist/NumberInput-eOAk0-fb.js +95 -0
- package/dist/Panel-Bso5fv4i.js +127 -0
- package/dist/Panel-CwzW9iuA.js +161 -0
- package/dist/Radio-button-Sii5iveh.js +71 -0
- package/dist/Radio-button-YXsVqipQ.js +53 -0
- package/dist/RefComponent-Bwk_I0mK.js +79 -0
- package/dist/RefComponent-ZxafRVhZ.js +96 -0
- package/dist/RichText-CgYXXC_a.js +485 -0
- package/dist/RichText-DV46U7fI.js +449 -0
- package/dist/Row-Bb95f5DI.js +229 -0
- package/dist/Row-Dmd_61mR.js +202 -0
- package/dist/Select-Cma8JHAj.js +77 -0
- package/dist/Select-DqA08VYb.js +87 -0
- package/dist/Slider-B2_Qecjz.js +74 -0
- package/dist/Slider-DVY0N2YX.js +55 -0
- package/dist/Table-0WjrBnz-.js +159 -0
- package/dist/Table-dEma50kw.js +184 -0
- package/dist/Tabs-BDKEv1jn.js +131 -0
- package/dist/Tabs-Cvt3Q8vx.js +116 -0
- package/dist/Tag-BcZvQkE_.js +47 -0
- package/dist/Tag-DMZ0mu8y.js +61 -0
- package/dist/TextInput-KI6r9xET.js +193 -0
- package/dist/TextInput-hxK-HhJi.js +148 -0
- package/dist/TextLabel-DkV26yaL.js +102 -0
- package/dist/Textarea-Bzs3jSUm.js +117 -0
- package/dist/Textarea-CwK3SYbz.js +83 -0
- package/dist/Video-C4uBWCBb.js +100 -0
- package/dist/Video-CL1lgcvB.js +120 -0
- package/dist/aitchat-DjX5s7_8.js +23 -0
- package/dist/colorpicker-B-KETfWw.js +64 -0
- package/dist/colorpicker-DhB0AygJ.js +75 -0
- package/dist/constants-Bs_KQRi_.js +4 -0
- package/dist/constants-CXdpxgF2.js +4 -0
- package/dist/{cssMode-D82-gS78.js → cssMode-CV7QbFJv.js} +1 -1
- package/dist/{freemarker2-CYRLpyjt.js → freemarker2-CqQxSEZa.js} +1 -1
- package/dist/{handlebars-R8Efxi60.js → handlebars-a71LdN7X.js} +1 -1
- package/dist/{html-czhjovcp.js → html-D8UaB7IC.js} +1 -1
- package/dist/{htmlMode-DpyKDYYs.js → htmlMode-CqWQMFWX.js} +1 -1
- package/dist/iconbutton-DfnrRmmB.js +69 -0
- package/dist/iconbutton-DvIQHV8o.js +53 -0
- package/dist/{javascript-DwqkMEdb.js → javascript-D_jGqcRD.js} +1 -1
- package/dist/{jsonMode-Cmxxe0W9.js → jsonMode-C3-m5xts.js} +1 -1
- package/dist/{liquid-2spuEcBh.js → liquid-DLwYj6Te.js} +1 -1
- package/dist/{mdx-BjBXyEeR.js → mdx-DhYjhxkW.js} +1 -1
- package/dist/micro-app-entry-DiNqE6xi.js +12042 -0
- package/dist/micro-app.bundle.js +1 -1
- package/dist/micro-app.js +6 -4969
- package/dist/{python-DLI1ji08.js → python-B-WcGqFq.js} +1 -1
- package/dist/{razor-oAnIJsrL.js → razor-JGACy1mz.js} +1 -1
- package/dist/runtime.js +4 -2
- package/dist/{tsMode-D_PMsbjK.js → tsMode-lzBM1oT2.js} +1 -1
- package/dist/{typescript-Bu3ZbtQI.js → typescript-CuL5pdO2.js} +1 -1
- package/dist/{xml-CNSSkPqy.js → xml-D1tacAKD.js} +1 -1
- package/dist/{yaml-5RF_PGNe.js → yaml-CjPB1g7v.js} +1 -1
- package/package.json +1 -1
- package/utils/index.ts +4 -1
- package/utils/lazy-component-loader.ts +120 -0
- package/utils/register-components.ts +14 -40
- package/utils/render-util.ts +84 -0
- package/dist/micro-app-entry-DYAnCRDo.js +0 -15860
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { B as g, $ as C, A as c, n as h, o as u, g as m, r as v, R as b, b as d, a as f, s as w, i as y, c as p, d as $, t as V } from "./micro-app-entry-DiNqE6xi.js";
|
|
2
|
+
var U = Object.defineProperty, D = Object.getOwnPropertyDescriptor, l = (t, i, a, o) => {
|
|
3
|
+
for (var n = o > 1 ? void 0 : o ? D(i, a) : i, r = t.length - 1, e; r >= 0; r--)
|
|
4
|
+
(e = t[r]) && (n = (o ? e(i, a, n) : e(n)) || n);
|
|
5
|
+
return o && n && U(i, a, n), n;
|
|
6
|
+
};
|
|
7
|
+
try {
|
|
8
|
+
await import("@nuralyui/card");
|
|
9
|
+
} catch {
|
|
10
|
+
console.warn("[@nuralyui/card] Package not found or failed to load.");
|
|
11
|
+
}
|
|
12
|
+
let s = class extends g {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.isViewMode = !1, this.childrenComponents = [], this.dragOverSituation = !1;
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
super.connectedCallback(), this.updateChildrenComponents();
|
|
18
|
+
}
|
|
19
|
+
willUpdate(t) {
|
|
20
|
+
super.willUpdate(t), t.has("component") && this.updateChildrenComponents();
|
|
21
|
+
}
|
|
22
|
+
updateChildrenComponents() {
|
|
23
|
+
this.childrenComponents = this.component?.childrenIds?.map((t) => C.get()[this.component?.application_id]?.find((i) => i.uuid === t)) ?? [];
|
|
24
|
+
}
|
|
25
|
+
renderView() {
|
|
26
|
+
const t = this.component?.style || {}, i = this.component?.input?.title?.value || this.inputHandlersValue?.title || "", a = this.component?.input?.bordered?.value ?? this.inputHandlersValue?.bordered ?? !0, o = this.component?.input?.hoverable?.value ?? this.inputHandlersValue?.hoverable ?? !1, n = this.component?.input?.loading?.value ?? this.inputHandlersValue?.loading ?? !1, r = this.component?.input?.size?.value || this.inputHandlersValue?.size || "default";
|
|
27
|
+
return d`
|
|
28
|
+
<nr-card
|
|
29
|
+
id=${this.inputHandlersValue.id ?? c}
|
|
30
|
+
${h(this.inputRef)}
|
|
31
|
+
data-component-uuid=${this.component?.uuid}
|
|
32
|
+
data-component-name=${this.component?.name}
|
|
33
|
+
style=${u({
|
|
34
|
+
width: b.extractUnit(t?.width) === "%" ? "100%" : t?.width ?? "auto",
|
|
35
|
+
...t
|
|
36
|
+
})}
|
|
37
|
+
class=${m({
|
|
38
|
+
"drag-over": this.dragOverSituation
|
|
39
|
+
})}
|
|
40
|
+
.header=${i}
|
|
41
|
+
.size=${r}
|
|
42
|
+
?bordered=${a}
|
|
43
|
+
?hoverable=${o}
|
|
44
|
+
?loading=${n}
|
|
45
|
+
@mouseenter="${(e) => this.executeEvent("onMouseEnter", { ...e, unique: this.uniqueUUID })}"
|
|
46
|
+
@mouseleave="${(e) => this.executeEvent("onMouseLeave", { ...e, unique: this.uniqueUUID })}"
|
|
47
|
+
@click=${(e) => this.executeEvent("onClick", e)}
|
|
48
|
+
>
|
|
49
|
+
<div slot="content">
|
|
50
|
+
${this.childrenComponents.length ? v(this.childrenComponents.map((e) => ({ ...e, item: this.item })), this.item, this.isViewMode, { ...this.component, uniqueUUID: this.uniqueUUID }) : c}
|
|
51
|
+
</div>
|
|
52
|
+
</nr-card>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
renderComponent() {
|
|
56
|
+
const t = this.component?.style || {}, i = this.component?.input?.title?.value || this.inputHandlersValue?.title || "", a = this.component?.input?.bordered?.value ?? this.inputHandlersValue?.bordered ?? !0, o = this.component?.input?.hoverable?.value ?? this.inputHandlersValue?.hoverable ?? !1, n = this.component?.input?.loading?.value ?? this.inputHandlersValue?.loading ?? !1, r = this.component?.input?.size?.value || this.inputHandlersValue?.size || "default";
|
|
57
|
+
return d`
|
|
58
|
+
${this.isViewMode ? this.renderView() : d`
|
|
59
|
+
<nr-card
|
|
60
|
+
${h(this.inputRef)}
|
|
61
|
+
data-component-uuid=${this.component?.uuid}
|
|
62
|
+
data-component-name=${this.component?.name}
|
|
63
|
+
style=${u(t)}
|
|
64
|
+
class=${m({
|
|
65
|
+
"drag-over": this.dragOverSituation
|
|
66
|
+
})}
|
|
67
|
+
.header=${i}
|
|
68
|
+
.size=${r}
|
|
69
|
+
?bordered=${a}
|
|
70
|
+
?hoverable=${o}
|
|
71
|
+
?loading=${n}
|
|
72
|
+
@click=${(e) => {
|
|
73
|
+
f(null), this.executeEvent("onClick", e);
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
<div slot="content" style=${u({ "min-height": this.childrenComponents.length ? "auto" : "100px" })}>
|
|
77
|
+
${this.childrenComponents.length ? v(this.childrenComponents.map((e) => ({ ...e, item: this.item })), this.item, this.isViewMode, { ...this.component, uniqueUUID: this.uniqueUUID }) : d`
|
|
78
|
+
<div
|
|
79
|
+
style="padding: 20px; text-align: center; color: #999;"
|
|
80
|
+
@click="${() => w(this.component?.uuid)}"
|
|
81
|
+
>
|
|
82
|
+
Add or Drag an item into this card
|
|
83
|
+
<drag-wrapper
|
|
84
|
+
.where=${"inside"}
|
|
85
|
+
.message=${"Drop inside"}
|
|
86
|
+
.component=${{ ...this.component }}
|
|
87
|
+
.inputRef=${this.inputRef}
|
|
88
|
+
.isDragInitiator=${this.isDragInitiator}
|
|
89
|
+
>
|
|
90
|
+
</drag-wrapper>
|
|
91
|
+
</div>
|
|
92
|
+
`}
|
|
93
|
+
</div>
|
|
94
|
+
</nr-card>
|
|
95
|
+
`}
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
s.styles = [y``];
|
|
100
|
+
l([
|
|
101
|
+
p({ type: Object })
|
|
102
|
+
], s.prototype, "component", 2);
|
|
103
|
+
l([
|
|
104
|
+
p({ type: Object })
|
|
105
|
+
], s.prototype, "item", 2);
|
|
106
|
+
l([
|
|
107
|
+
p({ type: Boolean })
|
|
108
|
+
], s.prototype, "isViewMode", 2);
|
|
109
|
+
l([
|
|
110
|
+
$()
|
|
111
|
+
], s.prototype, "childrenComponents", 2);
|
|
112
|
+
l([
|
|
113
|
+
$()
|
|
114
|
+
], s.prototype, "dragOverSituation", 2);
|
|
115
|
+
s = l([
|
|
116
|
+
V("card-block")
|
|
117
|
+
], s);
|
|
118
|
+
export {
|
|
119
|
+
s as CardBlock
|
|
120
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { B as r, n as o, b as c, t as d } from "./micro-app-entry-DiNqE6xi.js";
|
|
2
|
+
var h = Object.getOwnPropertyDescriptor, p = (e, a, i, s) => {
|
|
3
|
+
for (var t = s > 1 ? void 0 : s ? h(a, i) : a, n = e.length - 1, u; n >= 0; n--)
|
|
4
|
+
(u = e[n]) && (t = u(t) || t);
|
|
5
|
+
return t;
|
|
6
|
+
};
|
|
7
|
+
try {
|
|
8
|
+
await import("@nuralyui/checkbox");
|
|
9
|
+
} catch {
|
|
10
|
+
console.warn("[@nuralyui/checkbox] Package not found or failed to load.");
|
|
11
|
+
}
|
|
12
|
+
let l = class extends r {
|
|
13
|
+
renderComponent() {
|
|
14
|
+
return c`
|
|
15
|
+
<nr-checkbox
|
|
16
|
+
class="${`drop-${this.component.uuid}`}"
|
|
17
|
+
${o(this.inputRef)}
|
|
18
|
+
.checked=${this.inputHandlersValue?.value === !0}
|
|
19
|
+
.indeterminate=${this.inputHandlersValue?.value === "indeterminate"}
|
|
20
|
+
.disabled=${this.inputHandlersValue?.disabled}
|
|
21
|
+
.size=${this.inputHandlersValue?.size || "medium"}
|
|
22
|
+
.name=${this.inputHandlersValue?.name || ""}
|
|
23
|
+
.value=${this.inputHandlersValue?.value || ""}
|
|
24
|
+
.autoFocus=${this.inputHandlersValue?.autoFocus || !1}
|
|
25
|
+
.id=${this.inputHandlersValue?.id || ""}
|
|
26
|
+
.title=${this.inputHandlersValue?.title || ""}
|
|
27
|
+
.tabIndex=${this.inputHandlersValue?.tabIndex || 0}
|
|
28
|
+
@nr-change=${(e) => {
|
|
29
|
+
this.executeEvent("onChange", e, {
|
|
30
|
+
checked: e.detail.checked
|
|
31
|
+
});
|
|
32
|
+
}}
|
|
33
|
+
@nr-focus=${(e) => {
|
|
34
|
+
this.executeEvent("onFocus", e);
|
|
35
|
+
}}
|
|
36
|
+
@nr-blur=${(e) => {
|
|
37
|
+
this.executeEvent("onBlur", e);
|
|
38
|
+
}}
|
|
39
|
+
@nr-keydown=${(e) => {
|
|
40
|
+
this.executeEvent("onKeydown", e);
|
|
41
|
+
}}
|
|
42
|
+
@nr-mouseenter=${(e) => {
|
|
43
|
+
this.executeEvent("onMouseEnter", e);
|
|
44
|
+
}}
|
|
45
|
+
@nr-mouseleave=${(e) => {
|
|
46
|
+
this.executeEvent("onMouseLeave", e);
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
<nr-label .size=${this.inputHandlersValue?.size || "medium"}> ${this.inputHandlersValue?.label ?? ""}</nr-label>
|
|
50
|
+
</nr-checkbox>
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
l = p([
|
|
55
|
+
d("checkbox-block")
|
|
56
|
+
], l);
|
|
57
|
+
export {
|
|
58
|
+
l as CheckboxBlock
|
|
59
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import { ae as BaseElementBlock } from './BaseElement-pS6m_x6Q.js';
|
|
4
|
+
import { ref } from 'lit/directives/ref.js';
|
|
5
|
+
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (decorator(result)) || result;
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
try {
|
|
15
|
+
await import('@nuralyui/checkbox');
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.warn("[@nuralyui/checkbox] Package not found or failed to load.");
|
|
18
|
+
}
|
|
19
|
+
let CheckboxBlock = class extends BaseElementBlock {
|
|
20
|
+
renderComponent() {
|
|
21
|
+
return html`
|
|
22
|
+
<nr-checkbox
|
|
23
|
+
class="${`drop-${this.component.uuid}`}"
|
|
24
|
+
${ref(this.inputRef)}
|
|
25
|
+
.checked=${this.inputHandlersValue?.value === true}
|
|
26
|
+
.indeterminate=${this.inputHandlersValue?.value === "indeterminate"}
|
|
27
|
+
.disabled=${this.inputHandlersValue?.disabled}
|
|
28
|
+
.size=${this.inputHandlersValue?.size || "medium"}
|
|
29
|
+
.name=${this.inputHandlersValue?.name || ""}
|
|
30
|
+
.value=${this.inputHandlersValue?.value || ""}
|
|
31
|
+
.autoFocus=${this.inputHandlersValue?.autoFocus || false}
|
|
32
|
+
.id=${this.inputHandlersValue?.id || ""}
|
|
33
|
+
.title=${this.inputHandlersValue?.title || ""}
|
|
34
|
+
.tabIndex=${this.inputHandlersValue?.tabIndex || 0}
|
|
35
|
+
@nr-change=${(e) => {
|
|
36
|
+
this.executeEvent("onChange", e, {
|
|
37
|
+
checked: e.detail.checked
|
|
38
|
+
});
|
|
39
|
+
}}
|
|
40
|
+
@nr-focus=${(e) => {
|
|
41
|
+
this.executeEvent("onFocus", e);
|
|
42
|
+
}}
|
|
43
|
+
@nr-blur=${(e) => {
|
|
44
|
+
this.executeEvent("onBlur", e);
|
|
45
|
+
}}
|
|
46
|
+
@nr-keydown=${(e) => {
|
|
47
|
+
this.executeEvent("onKeydown", e);
|
|
48
|
+
}}
|
|
49
|
+
@nr-mouseenter=${(e) => {
|
|
50
|
+
this.executeEvent("onMouseEnter", e);
|
|
51
|
+
}}
|
|
52
|
+
@nr-mouseleave=${(e) => {
|
|
53
|
+
this.executeEvent("onMouseLeave", e);
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<nr-label .size=${this.inputHandlersValue?.size || "medium"}> ${this.inputHandlersValue?.label ?? ""}</nr-label>
|
|
57
|
+
</nr-checkbox>
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
CheckboxBlock = __decorateClass([
|
|
62
|
+
customElement("checkbox-block")
|
|
63
|
+
], CheckboxBlock);
|
|
64
|
+
|
|
65
|
+
export { CheckboxBlock };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { html, css } from 'lit';
|
|
2
|
+
import { property, state, customElement } from 'lit/decorators.js';
|
|
3
|
+
import { ae as BaseElementBlock, a8 as executeHandler } from './BaseElement-pS6m_x6Q.js';
|
|
4
|
+
import { ref } from 'lit/directives/ref.js';
|
|
5
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
let TextInputBlock = class extends BaseElementBlock {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.isEditorLoaded = false;
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
this.loadEditor();
|
|
25
|
+
}
|
|
26
|
+
async loadEditor() {
|
|
27
|
+
if (!this.isEditorLoaded) {
|
|
28
|
+
await import('./CodeEditor-Cpph-xRc.js');
|
|
29
|
+
this.isEditorLoaded = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
super.disconnectedCallback();
|
|
34
|
+
}
|
|
35
|
+
handleCodeEditorChange(event) {
|
|
36
|
+
const value = event.detail.value;
|
|
37
|
+
if (!this.isViewMode) {
|
|
38
|
+
const serializedValue = JSON.stringify(value);
|
|
39
|
+
executeHandler(
|
|
40
|
+
this.component,
|
|
41
|
+
/* js */
|
|
42
|
+
`
|
|
43
|
+
try {
|
|
44
|
+
const selectedComponent = Utils.first($selectedComponents);
|
|
45
|
+
updateInput(selectedComponent, "value", "string", ${serializedValue}, null);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error(error);
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
{}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
this.executeEvent("onChange", event, { value });
|
|
54
|
+
}
|
|
55
|
+
renderComponent() {
|
|
56
|
+
return html`
|
|
57
|
+
${this.isEditorLoaded ? html`
|
|
58
|
+
<code-editor
|
|
59
|
+
${ref(this.inputRef)}
|
|
60
|
+
style=${styleMap({
|
|
61
|
+
...this.getStyles(),
|
|
62
|
+
display: "block"
|
|
63
|
+
})}
|
|
64
|
+
language="${this.inputHandlersValue?.language ?? "javascript"}"
|
|
65
|
+
theme="${this.inputHandlersValue?.theme ?? "vs-dark"}"
|
|
66
|
+
.readonly=${this.inputHandlersValue?.readonly ?? this.isViewMode === true}
|
|
67
|
+
.code=${this.inputHandlersValue?.value ?? ""}
|
|
68
|
+
@click=${(e) => {
|
|
69
|
+
this.executeEvent("onClick", e);
|
|
70
|
+
}}
|
|
71
|
+
@change=${(event) => {
|
|
72
|
+
this.handleCodeEditorChange(event);
|
|
73
|
+
}}
|
|
74
|
+
@editor-keydown=${(event) => {
|
|
75
|
+
this.executeEvent("onKeyDown", event, {
|
|
76
|
+
key: event.detail.key,
|
|
77
|
+
code: event.detail.code,
|
|
78
|
+
ctrlKey: event.detail.ctrlKey,
|
|
79
|
+
shiftKey: event.detail.shiftKey,
|
|
80
|
+
altKey: event.detail.altKey,
|
|
81
|
+
metaKey: event.detail.metaKey
|
|
82
|
+
});
|
|
83
|
+
}}
|
|
84
|
+
@editor-keyup=${(event) => {
|
|
85
|
+
this.executeEvent("onKeyUp", event, {
|
|
86
|
+
key: event.detail.key,
|
|
87
|
+
code: event.detail.code,
|
|
88
|
+
ctrlKey: event.detail.ctrlKey,
|
|
89
|
+
shiftKey: event.detail.shiftKey,
|
|
90
|
+
altKey: event.detail.altKey,
|
|
91
|
+
metaKey: event.detail.metaKey
|
|
92
|
+
});
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
</code-editor>
|
|
96
|
+
` : html`<p>Loading editor...</p>`}
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
TextInputBlock.styles = [
|
|
101
|
+
css`
|
|
102
|
+
:host {
|
|
103
|
+
}
|
|
104
|
+
code-editor {
|
|
105
|
+
display: block;
|
|
106
|
+
height: 100px;
|
|
107
|
+
}
|
|
108
|
+
`
|
|
109
|
+
];
|
|
110
|
+
__decorateClass([
|
|
111
|
+
property({ type: Object })
|
|
112
|
+
], TextInputBlock.prototype, "component", 2);
|
|
113
|
+
__decorateClass([
|
|
114
|
+
property({ type: Object })
|
|
115
|
+
], TextInputBlock.prototype, "item", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
state()
|
|
118
|
+
], TextInputBlock.prototype, "isEditorLoaded", 2);
|
|
119
|
+
TextInputBlock = __decorateClass([
|
|
120
|
+
customElement("code-block")
|
|
121
|
+
], TextInputBlock);
|
|
122
|
+
|
|
123
|
+
export { TextInputBlock };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { B as p, h as y, n as h, o as u, b as c, i as m, c as n, d as K, t as f } from "./micro-app-entry-DiNqE6xi.js";
|
|
2
|
+
var C = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (e, t, a, d) => {
|
|
3
|
+
for (var o = d > 1 ? void 0 : d ? g(t, a) : t, s = e.length - 1, r; s >= 0; s--)
|
|
4
|
+
(r = e[s]) && (o = (d ? r(t, a, o) : r(o)) || o);
|
|
5
|
+
return d && o && C(t, a, o), o;
|
|
6
|
+
};
|
|
7
|
+
let i = class extends p {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.isEditorLoaded = !1;
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
super.connectedCallback(), this.loadEditor();
|
|
13
|
+
}
|
|
14
|
+
async loadEditor() {
|
|
15
|
+
this.isEditorLoaded || (await import("./CodeEditor-ChuFC0ex.js").then((e) => e.C), this.isEditorLoaded = !0);
|
|
16
|
+
}
|
|
17
|
+
disconnectedCallback() {
|
|
18
|
+
super.disconnectedCallback();
|
|
19
|
+
}
|
|
20
|
+
handleCodeEditorChange(e) {
|
|
21
|
+
const t = e.detail.value;
|
|
22
|
+
if (!this.isViewMode) {
|
|
23
|
+
const a = JSON.stringify(t);
|
|
24
|
+
y(
|
|
25
|
+
this.component,
|
|
26
|
+
/* js */
|
|
27
|
+
`
|
|
28
|
+
try {
|
|
29
|
+
const selectedComponent = Utils.first($selectedComponents);
|
|
30
|
+
updateInput(selectedComponent, "value", "string", ${a}, null);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error(error);
|
|
33
|
+
}
|
|
34
|
+
`,
|
|
35
|
+
{}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
this.executeEvent("onChange", e, { value: t });
|
|
39
|
+
}
|
|
40
|
+
renderComponent() {
|
|
41
|
+
return c`
|
|
42
|
+
${this.isEditorLoaded ? c`
|
|
43
|
+
<code-editor
|
|
44
|
+
${h(this.inputRef)}
|
|
45
|
+
style=${u({
|
|
46
|
+
...this.getStyles(),
|
|
47
|
+
display: "block"
|
|
48
|
+
})}
|
|
49
|
+
language="${this.inputHandlersValue?.language ?? "javascript"}"
|
|
50
|
+
theme="${this.inputHandlersValue?.theme ?? "vs-dark"}"
|
|
51
|
+
.readonly=${this.inputHandlersValue?.readonly ?? this.isViewMode === !0}
|
|
52
|
+
.code=${this.inputHandlersValue?.value ?? ""}
|
|
53
|
+
@click=${(e) => {
|
|
54
|
+
this.executeEvent("onClick", e);
|
|
55
|
+
}}
|
|
56
|
+
@change=${(e) => {
|
|
57
|
+
this.handleCodeEditorChange(e);
|
|
58
|
+
}}
|
|
59
|
+
@editor-keydown=${(e) => {
|
|
60
|
+
this.executeEvent("onKeyDown", e, {
|
|
61
|
+
key: e.detail.key,
|
|
62
|
+
code: e.detail.code,
|
|
63
|
+
ctrlKey: e.detail.ctrlKey,
|
|
64
|
+
shiftKey: e.detail.shiftKey,
|
|
65
|
+
altKey: e.detail.altKey,
|
|
66
|
+
metaKey: e.detail.metaKey
|
|
67
|
+
});
|
|
68
|
+
}}
|
|
69
|
+
@editor-keyup=${(e) => {
|
|
70
|
+
this.executeEvent("onKeyUp", e, {
|
|
71
|
+
key: e.detail.key,
|
|
72
|
+
code: e.detail.code,
|
|
73
|
+
ctrlKey: e.detail.ctrlKey,
|
|
74
|
+
shiftKey: e.detail.shiftKey,
|
|
75
|
+
altKey: e.detail.altKey,
|
|
76
|
+
metaKey: e.detail.metaKey
|
|
77
|
+
});
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
</code-editor>
|
|
81
|
+
` : c`<p>Loading editor...</p>`}
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
i.styles = [
|
|
86
|
+
m`
|
|
87
|
+
:host {
|
|
88
|
+
}
|
|
89
|
+
code-editor {
|
|
90
|
+
display: block;
|
|
91
|
+
height: 100px;
|
|
92
|
+
}
|
|
93
|
+
`
|
|
94
|
+
];
|
|
95
|
+
l([
|
|
96
|
+
n({ type: Object })
|
|
97
|
+
], i.prototype, "component", 2);
|
|
98
|
+
l([
|
|
99
|
+
n({ type: Object })
|
|
100
|
+
], i.prototype, "item", 2);
|
|
101
|
+
l([
|
|
102
|
+
K()
|
|
103
|
+
], i.prototype, "isEditorLoaded", 2);
|
|
104
|
+
i = l([
|
|
105
|
+
f("code-block")
|
|
106
|
+
], i);
|
|
107
|
+
export {
|
|
108
|
+
i as TextInputBlock
|
|
109
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as aG,
|
|
1
|
+
import { i as aG, c as b0, q as lG, e as cG, n as dG, b as hG, t as uG } from "./micro-app-entry-DiNqE6xi.js";
|
|
2
2
|
function Qo(o, e = 0) {
|
|
3
3
|
return o[o.length - (1 + e)];
|
|
4
4
|
}
|
|
@@ -77835,37 +77835,37 @@ Se({
|
|
|
77835
77835
|
id: "freemarker2",
|
|
77836
77836
|
extensions: [".ftl", ".ftlh", ".ftlx"],
|
|
77837
77837
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
77838
|
-
loader: () => import("./freemarker2-
|
|
77838
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagAutoInterpolationDollar)
|
|
77839
77839
|
});
|
|
77840
77840
|
Se({
|
|
77841
77841
|
id: "freemarker2.tag-angle.interpolation-dollar",
|
|
77842
77842
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
77843
|
-
loader: () => import("./freemarker2-
|
|
77843
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagAngleInterpolationDollar)
|
|
77844
77844
|
});
|
|
77845
77845
|
Se({
|
|
77846
77846
|
id: "freemarker2.tag-bracket.interpolation-dollar",
|
|
77847
77847
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
77848
|
-
loader: () => import("./freemarker2-
|
|
77848
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagBracketInterpolationDollar)
|
|
77849
77849
|
});
|
|
77850
77850
|
Se({
|
|
77851
77851
|
id: "freemarker2.tag-angle.interpolation-bracket",
|
|
77852
77852
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
77853
|
-
loader: () => import("./freemarker2-
|
|
77853
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagAngleInterpolationBracket)
|
|
77854
77854
|
});
|
|
77855
77855
|
Se({
|
|
77856
77856
|
id: "freemarker2.tag-bracket.interpolation-bracket",
|
|
77857
77857
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
77858
|
-
loader: () => import("./freemarker2-
|
|
77858
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagBracketInterpolationBracket)
|
|
77859
77859
|
});
|
|
77860
77860
|
Se({
|
|
77861
77861
|
id: "freemarker2.tag-auto.interpolation-dollar",
|
|
77862
77862
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
77863
|
-
loader: () => import("./freemarker2-
|
|
77863
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagAutoInterpolationDollar)
|
|
77864
77864
|
});
|
|
77865
77865
|
Se({
|
|
77866
77866
|
id: "freemarker2.tag-auto.interpolation-bracket",
|
|
77867
77867
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
77868
|
-
loader: () => import("./freemarker2-
|
|
77868
|
+
loader: () => import("./freemarker2-CqQxSEZa.js").then((o) => o.TagAutoInterpolationBracket)
|
|
77869
77869
|
});
|
|
77870
77870
|
/*!-----------------------------------------------------------------------------
|
|
77871
77871
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77903,7 +77903,7 @@ Se({
|
|
|
77903
77903
|
extensions: [".handlebars", ".hbs"],
|
|
77904
77904
|
aliases: ["Handlebars", "handlebars", "hbs"],
|
|
77905
77905
|
mimetypes: ["text/x-handlebars-template"],
|
|
77906
|
-
loader: () => import("./handlebars-
|
|
77906
|
+
loader: () => import("./handlebars-a71LdN7X.js")
|
|
77907
77907
|
});
|
|
77908
77908
|
/*!-----------------------------------------------------------------------------
|
|
77909
77909
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77928,7 +77928,7 @@ Se({
|
|
|
77928
77928
|
extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
|
|
77929
77929
|
aliases: ["HTML", "htm", "html", "xhtml"],
|
|
77930
77930
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
77931
|
-
loader: () => import("./html-
|
|
77931
|
+
loader: () => import("./html-D8UaB7IC.js")
|
|
77932
77932
|
});
|
|
77933
77933
|
/*!-----------------------------------------------------------------------------
|
|
77934
77934
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77969,7 +77969,7 @@ Se({
|
|
|
77969
77969
|
filenames: ["jakefile"],
|
|
77970
77970
|
aliases: ["JavaScript", "javascript", "js"],
|
|
77971
77971
|
mimetypes: ["text/javascript"],
|
|
77972
|
-
loader: () => import("./javascript-
|
|
77972
|
+
loader: () => import("./javascript-D_jGqcRD.js")
|
|
77973
77973
|
});
|
|
77974
77974
|
/*!-----------------------------------------------------------------------------
|
|
77975
77975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78044,7 +78044,7 @@ Se({
|
|
|
78044
78044
|
extensions: [".liquid", ".html.liquid"],
|
|
78045
78045
|
aliases: ["Liquid", "liquid"],
|
|
78046
78046
|
mimetypes: ["application/liquid"],
|
|
78047
|
-
loader: () => import("./liquid-
|
|
78047
|
+
loader: () => import("./liquid-DLwYj6Te.js")
|
|
78048
78048
|
});
|
|
78049
78049
|
/*!-----------------------------------------------------------------------------
|
|
78050
78050
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78080,7 +78080,7 @@ Se({
|
|
|
78080
78080
|
id: "mdx",
|
|
78081
78081
|
extensions: [".mdx"],
|
|
78082
78082
|
aliases: ["MDX", "mdx"],
|
|
78083
|
-
loader: () => import("./mdx-
|
|
78083
|
+
loader: () => import("./mdx-DhYjhxkW.js")
|
|
78084
78084
|
});
|
|
78085
78085
|
/*!-----------------------------------------------------------------------------
|
|
78086
78086
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78275,7 +78275,7 @@ Se({
|
|
|
78275
78275
|
extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
|
|
78276
78276
|
aliases: ["Python", "py"],
|
|
78277
78277
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
78278
|
-
loader: () => import("./python-
|
|
78278
|
+
loader: () => import("./python-B-WcGqFq.js")
|
|
78279
78279
|
});
|
|
78280
78280
|
/*!-----------------------------------------------------------------------------
|
|
78281
78281
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78312,7 +78312,7 @@ Se({
|
|
|
78312
78312
|
extensions: [".cshtml"],
|
|
78313
78313
|
aliases: ["Razor", "razor"],
|
|
78314
78314
|
mimetypes: ["text/x-cshtml"],
|
|
78315
|
-
loader: () => import("./razor-
|
|
78315
|
+
loader: () => import("./razor-JGACy1mz.js")
|
|
78316
78316
|
});
|
|
78317
78317
|
/*!-----------------------------------------------------------------------------
|
|
78318
78318
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78564,7 +78564,7 @@ Se({
|
|
|
78564
78564
|
extensions: [".ts", ".tsx", ".cts", ".mts"],
|
|
78565
78565
|
aliases: ["TypeScript", "ts", "typescript"],
|
|
78566
78566
|
mimetypes: ["text/typescript"],
|
|
78567
|
-
loader: () => import("./typescript-
|
|
78567
|
+
loader: () => import("./typescript-CuL5pdO2.js")
|
|
78568
78568
|
});
|
|
78569
78569
|
/*!-----------------------------------------------------------------------------
|
|
78570
78570
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78632,7 +78632,7 @@ Se({
|
|
|
78632
78632
|
firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
|
|
78633
78633
|
aliases: ["XML", "xml"],
|
|
78634
78634
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
78635
|
-
loader: () => import("./xml-
|
|
78635
|
+
loader: () => import("./xml-D1tacAKD.js")
|
|
78636
78636
|
});
|
|
78637
78637
|
/*!-----------------------------------------------------------------------------
|
|
78638
78638
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78645,7 +78645,7 @@ Se({
|
|
|
78645
78645
|
extensions: [".yaml", ".yml"],
|
|
78646
78646
|
aliases: ["YAML", "yaml", "YML", "yml"],
|
|
78647
78647
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
78648
|
-
loader: () => import("./yaml-
|
|
78648
|
+
loader: () => import("./yaml-CjPB1g7v.js")
|
|
78649
78649
|
});
|
|
78650
78650
|
/*!-----------------------------------------------------------------------------
|
|
78651
78651
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78748,7 +78748,7 @@ var nP = class {
|
|
|
78748
78748
|
);
|
|
78749
78749
|
lp.languages.css = { cssDefaults: tU, lessDefaults: nU, scssDefaults: iU };
|
|
78750
78750
|
function rP() {
|
|
78751
|
-
return import("./cssMode-
|
|
78751
|
+
return import("./cssMode-CV7QbFJv.js");
|
|
78752
78752
|
}
|
|
78753
78753
|
lp.languages.onLanguage("less", () => {
|
|
78754
78754
|
rP().then((o) => o.setupMode(nU));
|
|
@@ -78854,7 +78854,7 @@ jy.languages.html = {
|
|
|
78854
78854
|
registerHTMLLanguageService: Ky
|
|
78855
78855
|
};
|
|
78856
78856
|
function Zpe() {
|
|
78857
|
-
return import("./htmlMode-
|
|
78857
|
+
return import("./htmlMode-CqWQMFWX.js");
|
|
78858
78858
|
}
|
|
78859
78859
|
function Ky(o, e = Gy, t = Yy(o)) {
|
|
78860
78860
|
const i = new Kpe(o, e, t);
|
|
@@ -78931,7 +78931,7 @@ var r_e = class {
|
|
|
78931
78931
|
), c_e = () => lU().then((o) => o.getWorker());
|
|
78932
78932
|
fw.languages.json = { jsonDefaults: aU, getWorker: c_e };
|
|
78933
78933
|
function lU() {
|
|
78934
|
-
return import("./jsonMode-
|
|
78934
|
+
return import("./jsonMode-C3-m5xts.js");
|
|
78935
78935
|
}
|
|
78936
78936
|
fw.languages.register({
|
|
78937
78937
|
id: "json",
|
|
@@ -79095,7 +79095,7 @@ xm.languages.typescript = {
|
|
|
79095
79095
|
getJavaScriptWorker: b_e
|
|
79096
79096
|
};
|
|
79097
79097
|
function $y() {
|
|
79098
|
-
return import("./tsMode-
|
|
79098
|
+
return import("./tsMode-lzBM1oT2.js");
|
|
79099
79099
|
}
|
|
79100
79100
|
xm.languages.onLanguage("typescript", () => $y().then((o) => o.setupTypeScript(pU)));
|
|
79101
79101
|
xm.languages.onLanguage("javascript", () => $y().then((o) => o.setupJavaScript(_U)));
|