@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.
Files changed (113) hide show
  1. package/components/ui/components/inputs/ColorPicker/colorpicker.ts +1 -7
  2. package/components/ui/components/inputs/Form/Form.ts +3 -11
  3. package/components/ui/components/inputs/RadioButton/Radio-button.ts +1 -7
  4. package/components/ui/components/inputs/Select/Select.ts +1 -7
  5. package/components/ui/components/layout/Grid/Col.ts +2 -6
  6. package/components/ui/components/layout/Grid/Row.ts +2 -6
  7. package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +4 -16
  8. package/dist/AIChat-DP3ZdLL3.js +220 -0
  9. package/dist/AIChat-km1IYaR-.js +260 -0
  10. package/dist/Badge-BR94MUt5.js +48 -0
  11. package/dist/Badge-DzNZFKtC.js +70 -0
  12. package/dist/{BaseElement-BNBn_IJk.js → BaseElement-pS6m_x6Q.js} +153 -24
  13. package/dist/Button-BHAN7npC.js +92 -0
  14. package/dist/Button-DCqgsxrL.js +80 -0
  15. package/dist/Card-B70c8NFb.js +150 -0
  16. package/dist/Card-DhOCsGKC.js +120 -0
  17. package/dist/Checkbox-BZTcPwew.js +59 -0
  18. package/dist/Checkbox-LYTIBAUV.js +65 -0
  19. package/dist/Code-BWbiciC8.js +123 -0
  20. package/dist/Code-Ds0vFclr.js +109 -0
  21. package/dist/{CodeEditor-B1gNuvPb.js → CodeEditor-ChuFC0ex.js} +22 -22
  22. package/dist/Col-B_wpWUcU.js +217 -0
  23. package/dist/Col-DYs8_65c.js +193 -0
  24. package/dist/Collapse-4kxbQ74u.js +74 -0
  25. package/dist/Collapse-Dkw6Ner6.js +96 -0
  26. package/dist/Collections-BSF-PqBz.js +122 -0
  27. package/dist/Collections-D5rwMFbv.js +151 -0
  28. package/dist/Container-DMNh5U4Y.js +204 -0
  29. package/dist/DatePicker-BmEOONiA.js +99 -0
  30. package/dist/DatePicker-VuUroOT4.js +80 -0
  31. package/dist/Divider-BfxR3rVl.js +86 -0
  32. package/dist/Divider-etMTYU3d.js +106 -0
  33. package/dist/Document-CHBcJciR.js +74 -0
  34. package/dist/Document-Cj-TmjAf.js +90 -0
  35. package/dist/Dropdown-BRtHvDa3.js +133 -0
  36. package/dist/Dropdown-C47Y11dj.js +112 -0
  37. package/dist/EmbedURL-BwbJRnY1.js +142 -0
  38. package/dist/EmbedURL-Ci5X1vQG.js +114 -0
  39. package/dist/FileUpload-BBgPcRag.js +54 -0
  40. package/dist/FileUpload-BgkhxtNe.js +47 -0
  41. package/dist/Form-BLq6U3In.js +339 -0
  42. package/dist/Form-E6zXqgsm.js +286 -0
  43. package/dist/Icon-CcLuhz6B.js +64 -0
  44. package/dist/Icon-_UiLblGb.js +74 -0
  45. package/dist/Image-B_VERIvH.js +111 -0
  46. package/dist/Image-hI8kIx8U.js +93 -0
  47. package/dist/Link-BVTo43Cc.js +76 -0
  48. package/dist/Link-xSrPxOLt.js +95 -0
  49. package/dist/Menu-CembLIjO.js +83 -0
  50. package/dist/Menu-D9ZjIOMg.js +73 -0
  51. package/dist/MicroApp-DI1kQwJk.js +100 -0
  52. package/dist/MicroApp-DJw57sLE.js +75 -0
  53. package/dist/NumberInput-DftAAKEs.js +84 -0
  54. package/dist/NumberInput-eOAk0-fb.js +95 -0
  55. package/dist/Panel-Bso5fv4i.js +127 -0
  56. package/dist/Panel-CwzW9iuA.js +161 -0
  57. package/dist/Radio-button-Sii5iveh.js +71 -0
  58. package/dist/Radio-button-YXsVqipQ.js +53 -0
  59. package/dist/RefComponent-Bwk_I0mK.js +79 -0
  60. package/dist/RefComponent-ZxafRVhZ.js +96 -0
  61. package/dist/RichText-CgYXXC_a.js +485 -0
  62. package/dist/RichText-DV46U7fI.js +449 -0
  63. package/dist/Row-Bb95f5DI.js +229 -0
  64. package/dist/Row-Dmd_61mR.js +202 -0
  65. package/dist/Select-Cma8JHAj.js +77 -0
  66. package/dist/Select-DqA08VYb.js +87 -0
  67. package/dist/Slider-B2_Qecjz.js +74 -0
  68. package/dist/Slider-DVY0N2YX.js +55 -0
  69. package/dist/Table-0WjrBnz-.js +159 -0
  70. package/dist/Table-dEma50kw.js +184 -0
  71. package/dist/Tabs-BDKEv1jn.js +131 -0
  72. package/dist/Tabs-Cvt3Q8vx.js +116 -0
  73. package/dist/Tag-BcZvQkE_.js +47 -0
  74. package/dist/Tag-DMZ0mu8y.js +61 -0
  75. package/dist/TextInput-KI6r9xET.js +193 -0
  76. package/dist/TextInput-hxK-HhJi.js +148 -0
  77. package/dist/TextLabel-DkV26yaL.js +102 -0
  78. package/dist/Textarea-Bzs3jSUm.js +117 -0
  79. package/dist/Textarea-CwK3SYbz.js +83 -0
  80. package/dist/Video-C4uBWCBb.js +100 -0
  81. package/dist/Video-CL1lgcvB.js +120 -0
  82. package/dist/aitchat-DjX5s7_8.js +23 -0
  83. package/dist/colorpicker-B-KETfWw.js +64 -0
  84. package/dist/colorpicker-DhB0AygJ.js +75 -0
  85. package/dist/constants-Bs_KQRi_.js +4 -0
  86. package/dist/constants-CXdpxgF2.js +4 -0
  87. package/dist/{cssMode-D82-gS78.js → cssMode-CV7QbFJv.js} +1 -1
  88. package/dist/{freemarker2-CYRLpyjt.js → freemarker2-CqQxSEZa.js} +1 -1
  89. package/dist/{handlebars-R8Efxi60.js → handlebars-a71LdN7X.js} +1 -1
  90. package/dist/{html-czhjovcp.js → html-D8UaB7IC.js} +1 -1
  91. package/dist/{htmlMode-DpyKDYYs.js → htmlMode-CqWQMFWX.js} +1 -1
  92. package/dist/iconbutton-DfnrRmmB.js +69 -0
  93. package/dist/iconbutton-DvIQHV8o.js +53 -0
  94. package/dist/{javascript-DwqkMEdb.js → javascript-D_jGqcRD.js} +1 -1
  95. package/dist/{jsonMode-Cmxxe0W9.js → jsonMode-C3-m5xts.js} +1 -1
  96. package/dist/{liquid-2spuEcBh.js → liquid-DLwYj6Te.js} +1 -1
  97. package/dist/{mdx-BjBXyEeR.js → mdx-DhYjhxkW.js} +1 -1
  98. package/dist/micro-app-entry-DiNqE6xi.js +12042 -0
  99. package/dist/micro-app.bundle.js +1 -1
  100. package/dist/micro-app.js +6 -4969
  101. package/dist/{python-DLI1ji08.js → python-B-WcGqFq.js} +1 -1
  102. package/dist/{razor-oAnIJsrL.js → razor-JGACy1mz.js} +1 -1
  103. package/dist/runtime.js +4 -2
  104. package/dist/{tsMode-D_PMsbjK.js → tsMode-lzBM1oT2.js} +1 -1
  105. package/dist/{typescript-Bu3ZbtQI.js → typescript-CuL5pdO2.js} +1 -1
  106. package/dist/{xml-CNSSkPqy.js → xml-D1tacAKD.js} +1 -1
  107. package/dist/{yaml-5RF_PGNe.js → yaml-CjPB1g7v.js} +1 -1
  108. package/package.json +1 -1
  109. package/utils/index.ts +4 -1
  110. package/utils/lazy-component-loader.ts +120 -0
  111. package/utils/register-components.ts +14 -40
  112. package/utils/render-util.ts +84 -0
  113. package/dist/micro-app-entry-DYAnCRDo.js +0 -15860
@@ -0,0 +1,127 @@
1
+ import { B as g, $ as x, n as V, o as H, r as y, A as u, b as d, i as E, c, d as w, t as M } from "./micro-app-entry-DiNqE6xi.js";
2
+ import { PanelMode as S, PanelSize as _, PanelPosition as D, MaximizePosition as O } from "@nuralyui/panel";
3
+ var B = Object.defineProperty, j = Object.getOwnPropertyDescriptor, r = (t, i, s, a) => {
4
+ for (var n = a > 1 ? void 0 : a ? j(i, s) : i, l = t.length - 1, p; l >= 0; l--)
5
+ (p = t[l]) && (n = (a ? p(i, s, n) : p(n)) || n);
6
+ return a && n && B(i, s, n), n;
7
+ };
8
+ try {
9
+ await import("@nuralyui/panel");
10
+ } catch {
11
+ console.warn("[@nuralyui/panel] Package not found or failed to load. Panel functionality may be limited.");
12
+ }
13
+ let o = class extends g {
14
+ constructor() {
15
+ super(...arguments), this.isViewMode = !1, this.childrenComponents = [];
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback(), this.updateChildrenComponents();
19
+ }
20
+ updated(t) {
21
+ super.updated(t), t.has("component") && this.updateChildrenComponents();
22
+ }
23
+ updateChildrenComponents() {
24
+ this.childrenComponents = this.component?.childrenIds?.map((t) => x.get()[this.component?.application_id]?.find((i) => i.uuid === t)) ?? [];
25
+ }
26
+ renderComponent() {
27
+ const t = this.component?.style || {}, i = this.component?.input?.mode?.value || this.inputHandlersValue?.mode || S.Panel, s = this.component?.input?.size?.value || this.inputHandlersValue?.size || _.Medium, a = this.component?.input?.position?.value || this.inputHandlersValue?.position || D.Right, n = this.component?.input?.maximizePosition?.value || this.inputHandlersValue?.maximizePosition || O.Center, l = this.component?.input?.draggable?.value ?? this.inputHandlersValue?.draggable ?? !0, p = this.component?.input?.resizable?.value ?? this.inputHandlersValue?.resizable ?? !1, h = this.component?.input?.collapsible?.value ?? this.inputHandlersValue?.collapsible ?? !1, m = this.component?.input?.minimizable?.value ?? this.inputHandlersValue?.minimizable ?? !0, v = this.component?.input?.closable?.value ?? this.inputHandlersValue?.closable ?? !0, $ = this.component?.input?.animated?.value ?? this.inputHandlersValue?.animated ?? !1, b = this.component?.input?.title?.value || this.inputHandlersValue?.title || "", z = this.component?.input?.icon?.value || this.inputHandlersValue?.icon || "", C = this.component?.input?.width?.value || this.inputHandlersValue?.width || "", P = this.component?.input?.height?.value || this.inputHandlersValue?.height || "", f = this.component?.input?.open?.value ?? this.inputHandlersValue?.open ?? !0;
28
+ return d`
29
+ <nr-panel
30
+ ${V(this.inputRef)}
31
+ style=${H(t)}
32
+ .mode=${i}
33
+ .size=${s}
34
+ .position=${a}
35
+ .maximizePosition=${n}
36
+ ?draggable=${l}
37
+ ?resizable=${p}
38
+ ?collapsible=${h}
39
+ ?minimizable=${m}
40
+ ?closable=${v}
41
+ ?animated=${$}
42
+ .title=${b}
43
+ .icon=${z}
44
+ .width=${C}
45
+ .height=${P}
46
+ ?open=${f}
47
+ @panel-mode-change=${(e) => {
48
+ this.executeEvent("onPanelModeChange", e);
49
+ }}
50
+ @panel-close=${(e) => {
51
+ this.executeEvent("onPanelClose", e);
52
+ }}
53
+ @panel-minimize=${(e) => {
54
+ this.executeEvent("onPanelMinimize", e);
55
+ }}
56
+ @panel-maximize=${(e) => {
57
+ this.executeEvent("onPanelMaximize", e);
58
+ }}
59
+ @panel-drag-start=${(e) => {
60
+ this.executeEvent("onPanelDragStart", e);
61
+ }}
62
+ @panel-drag-end=${(e) => {
63
+ this.executeEvent("onPanelDragEnd", e);
64
+ }}
65
+ @panel-resize=${(e) => {
66
+ this.executeEvent("onPanelResize", e);
67
+ }}
68
+ @panel-maximize-embedded=${(e) => {
69
+ this.executeEvent("onPanelMaximizeEmbedded", e);
70
+ }}
71
+ @panel-restore-embedded=${(e) => {
72
+ this.executeEvent("onPanelRestoreEmbedded", e);
73
+ }}
74
+ >
75
+ ${this.childrenComponents.length ? y(
76
+ this.childrenComponents.map((e) => ({ ...e, item: this.item })),
77
+ this.item,
78
+ this.isViewMode,
79
+ { ...this.component, uniqueUUID: this.uniqueUUID }
80
+ ) : u}
81
+ ${this.renderHeaderSlot()}
82
+ ${this.renderFooterSlot()}
83
+ </nr-panel>
84
+ `;
85
+ }
86
+ /**
87
+ * Render custom header slot if content is provided
88
+ */
89
+ renderHeaderSlot() {
90
+ const t = this.component?.input?.headerContent?.value || this.inputHandlersValue?.headerContent;
91
+ return t ? d`
92
+ <div slot="header">
93
+ ${t}
94
+ </div>
95
+ ` : u;
96
+ }
97
+ /**
98
+ * Render custom footer slot if content is provided
99
+ */
100
+ renderFooterSlot() {
101
+ const t = this.component?.input?.footerContent?.value || this.inputHandlersValue?.footerContent;
102
+ return t ? d`
103
+ <div slot="footer">
104
+ ${t}
105
+ </div>
106
+ ` : u;
107
+ }
108
+ };
109
+ o.styles = [E``];
110
+ r([
111
+ c({ type: Object })
112
+ ], o.prototype, "component", 2);
113
+ r([
114
+ c({ type: Object })
115
+ ], o.prototype, "item", 2);
116
+ r([
117
+ c({ type: Boolean })
118
+ ], o.prototype, "isViewMode", 2);
119
+ r([
120
+ w()
121
+ ], o.prototype, "childrenComponents", 2);
122
+ o = r([
123
+ M("panel-block")
124
+ ], o);
125
+ export {
126
+ o as PanelBlock
127
+ };
@@ -0,0 +1,161 @@
1
+ import { nothing, html, css } from 'lit';
2
+ import { property, state, customElement } from 'lit/decorators.js';
3
+ import { styleMap } from 'lit/directives/style-map.js';
4
+ import { ae as BaseElementBlock, $ as $components, aM as renderComponent } from './BaseElement-pS6m_x6Q.js';
5
+ import { ref } from 'lit/directives/ref.js';
6
+ import { PanelMode, PanelSize, PanelPosition, MaximizePosition } from '@nuralyui/panel';
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __decorateClass = (decorators, target, key, kind) => {
11
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
13
+ if (decorator = decorators[i])
14
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15
+ if (kind && result) __defProp(target, key, result);
16
+ return result;
17
+ };
18
+ try {
19
+ await import('@nuralyui/panel');
20
+ } catch (error) {
21
+ console.warn("[@nuralyui/panel] Package not found or failed to load. Panel functionality may be limited.");
22
+ }
23
+ let PanelBlock = class extends BaseElementBlock {
24
+ constructor() {
25
+ super(...arguments);
26
+ this.isViewMode = false;
27
+ this.childrenComponents = [];
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback();
31
+ this.updateChildrenComponents();
32
+ }
33
+ updated(changedProperties) {
34
+ super.updated(changedProperties);
35
+ if (changedProperties.has("component")) {
36
+ this.updateChildrenComponents();
37
+ }
38
+ }
39
+ updateChildrenComponents() {
40
+ this.childrenComponents = this.component?.childrenIds?.map((id) => {
41
+ return $components.get()[this.component?.application_id]?.find((component) => component.uuid === id);
42
+ }) ?? [];
43
+ }
44
+ renderComponent() {
45
+ const panelStyles = this.component?.style || {};
46
+ const mode = this.component?.input?.mode?.value || this.inputHandlersValue?.mode || PanelMode.Panel;
47
+ const size = this.component?.input?.size?.value || this.inputHandlersValue?.size || PanelSize.Medium;
48
+ const position = this.component?.input?.position?.value || this.inputHandlersValue?.position || PanelPosition.Right;
49
+ const maximizePosition = this.component?.input?.maximizePosition?.value || this.inputHandlersValue?.maximizePosition || MaximizePosition.Center;
50
+ const draggable = this.component?.input?.draggable?.value ?? this.inputHandlersValue?.draggable ?? true;
51
+ const resizable = this.component?.input?.resizable?.value ?? this.inputHandlersValue?.resizable ?? false;
52
+ const collapsible = this.component?.input?.collapsible?.value ?? this.inputHandlersValue?.collapsible ?? false;
53
+ const minimizable = this.component?.input?.minimizable?.value ?? this.inputHandlersValue?.minimizable ?? true;
54
+ const closable = this.component?.input?.closable?.value ?? this.inputHandlersValue?.closable ?? true;
55
+ const animated = this.component?.input?.animated?.value ?? this.inputHandlersValue?.animated ?? false;
56
+ const title = this.component?.input?.title?.value || this.inputHandlersValue?.title || "";
57
+ const icon = this.component?.input?.icon?.value || this.inputHandlersValue?.icon || "";
58
+ const width = this.component?.input?.width?.value || this.inputHandlersValue?.width || "";
59
+ const height = this.component?.input?.height?.value || this.inputHandlersValue?.height || "";
60
+ const open = this.component?.input?.open?.value ?? this.inputHandlersValue?.open ?? true;
61
+ return html`
62
+ <nr-panel
63
+ ${ref(this.inputRef)}
64
+ style=${styleMap(panelStyles)}
65
+ .mode=${mode}
66
+ .size=${size}
67
+ .position=${position}
68
+ .maximizePosition=${maximizePosition}
69
+ ?draggable=${draggable}
70
+ ?resizable=${resizable}
71
+ ?collapsible=${collapsible}
72
+ ?minimizable=${minimizable}
73
+ ?closable=${closable}
74
+ ?animated=${animated}
75
+ .title=${title}
76
+ .icon=${icon}
77
+ .width=${width}
78
+ .height=${height}
79
+ ?open=${open}
80
+ @panel-mode-change=${(e) => {
81
+ this.executeEvent("onPanelModeChange", e);
82
+ }}
83
+ @panel-close=${(e) => {
84
+ this.executeEvent("onPanelClose", e);
85
+ }}
86
+ @panel-minimize=${(e) => {
87
+ this.executeEvent("onPanelMinimize", e);
88
+ }}
89
+ @panel-maximize=${(e) => {
90
+ this.executeEvent("onPanelMaximize", e);
91
+ }}
92
+ @panel-drag-start=${(e) => {
93
+ this.executeEvent("onPanelDragStart", e);
94
+ }}
95
+ @panel-drag-end=${(e) => {
96
+ this.executeEvent("onPanelDragEnd", e);
97
+ }}
98
+ @panel-resize=${(e) => {
99
+ this.executeEvent("onPanelResize", e);
100
+ }}
101
+ @panel-maximize-embedded=${(e) => {
102
+ this.executeEvent("onPanelMaximizeEmbedded", e);
103
+ }}
104
+ @panel-restore-embedded=${(e) => {
105
+ this.executeEvent("onPanelRestoreEmbedded", e);
106
+ }}
107
+ >
108
+ ${this.childrenComponents.length ? renderComponent(
109
+ this.childrenComponents.map((component) => ({ ...component, item: this.item })),
110
+ this.item,
111
+ this.isViewMode,
112
+ { ...this.component, uniqueUUID: this.uniqueUUID }
113
+ ) : nothing}
114
+ ${this.renderHeaderSlot()}
115
+ ${this.renderFooterSlot()}
116
+ </nr-panel>
117
+ `;
118
+ }
119
+ /**
120
+ * Render custom header slot if content is provided
121
+ */
122
+ renderHeaderSlot() {
123
+ const headerContent = this.component?.input?.headerContent?.value || this.inputHandlersValue?.headerContent;
124
+ if (!headerContent) return nothing;
125
+ return html`
126
+ <div slot="header">
127
+ ${headerContent}
128
+ </div>
129
+ `;
130
+ }
131
+ /**
132
+ * Render custom footer slot if content is provided
133
+ */
134
+ renderFooterSlot() {
135
+ const footerContent = this.component?.input?.footerContent?.value || this.inputHandlersValue?.footerContent;
136
+ if (!footerContent) return nothing;
137
+ return html`
138
+ <div slot="footer">
139
+ ${footerContent}
140
+ </div>
141
+ `;
142
+ }
143
+ };
144
+ PanelBlock.styles = [css``];
145
+ __decorateClass([
146
+ property({ type: Object })
147
+ ], PanelBlock.prototype, "component", 2);
148
+ __decorateClass([
149
+ property({ type: Object })
150
+ ], PanelBlock.prototype, "item", 2);
151
+ __decorateClass([
152
+ property({ type: Boolean })
153
+ ], PanelBlock.prototype, "isViewMode", 2);
154
+ __decorateClass([
155
+ state()
156
+ ], PanelBlock.prototype, "childrenComponents", 2);
157
+ PanelBlock = __decorateClass([
158
+ customElement("panel-block")
159
+ ], PanelBlock);
160
+
161
+ export { PanelBlock };
@@ -0,0 +1,71 @@
1
+ import { property, customElement } from 'lit/decorators.js';
2
+ import { ae as BaseElementBlock } from './BaseElement-pS6m_x6Q.js';
3
+ import { html } from 'lit';
4
+ import { styleMap } from 'lit/directives/style-map.js';
5
+ import '@nuralyui/radio-group';
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 RadioButtonBlock = class extends BaseElementBlock {
18
+ renderComponent() {
19
+ const radioStyles = this.component?.style || {};
20
+ const options = this.inputHandlersValue?.value?.options || [];
21
+ const defaultValue = this.inputHandlersValue?.value?.currentValue ?? "";
22
+ const type = this.inputHandlersValue?.value?.type || "default";
23
+ const direction = this.inputHandlersValue?.direction || "vertical";
24
+ const position = this.inputHandlersValue?.position || "left";
25
+ const size = this.inputHandlersValue?.size?.value || this.inputHandlersValue?.size || "medium";
26
+ const disabled = this.inputHandlersValue?.state === "disabled";
27
+ const required = this.inputHandlersValue?.required || false;
28
+ const name = this.inputHandlersValue?.name || "radioGroup";
29
+ const autoWidth = this.inputHandlersValue?.autoWidth?.value || this.inputHandlersValue?.autoWidth || false;
30
+ return html`
31
+ <span style=${styleMap(radioStyles)}>
32
+ <nr-radio-group
33
+
34
+ .options=${options}
35
+ .defaultValue=${defaultValue}
36
+ .value=${defaultValue}
37
+ .type=${type}
38
+ .direction=${direction}
39
+ .position=${position}
40
+ .size=${size}
41
+ .name=${name}
42
+ ?disabled=${disabled}
43
+ ?required=${required}
44
+ ?auto-width=${autoWidth}
45
+ @nr-change=${(e) => {
46
+ this.executeEvent("onChange", e, {
47
+ value: e.detail.value,
48
+ option: e.detail.option,
49
+ oldValue: e.detail.oldValue
50
+ });
51
+ }}
52
+ >
53
+ <span slot="helper-text" style="display: block; margin-top: 4px;">
54
+ ${this.inputHandlersValue?.helper ?? ""}
55
+ </span>
56
+ </nr-radio-group>
57
+ </span>
58
+ `;
59
+ }
60
+ };
61
+ __decorateClass([
62
+ property({ type: Object })
63
+ ], RadioButtonBlock.prototype, "component", 2);
64
+ __decorateClass([
65
+ property({ type: Object })
66
+ ], RadioButtonBlock.prototype, "item", 2);
67
+ RadioButtonBlock = __decorateClass([
68
+ customElement("radio-button-block")
69
+ ], RadioButtonBlock);
70
+
71
+ export { RadioButtonBlock };
@@ -0,0 +1,53 @@
1
+ import { B as v, o as m, b as $, c as p, t as H } from "./micro-app-entry-DiNqE6xi.js";
2
+ import "@nuralyui/radio-group";
3
+ var f = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (l, t, n, a) => {
4
+ for (var e = a > 1 ? void 0 : a ? y(t, n) : t, i = l.length - 1, s; i >= 0; i--)
5
+ (s = l[i]) && (e = (a ? s(t, n, e) : s(e)) || e);
6
+ return a && e && f(t, n, e), e;
7
+ };
8
+ let u = class extends v {
9
+ renderComponent() {
10
+ const l = this.component?.style || {}, t = this.inputHandlersValue?.value?.options || [], n = this.inputHandlersValue?.value?.currentValue ?? "", a = this.inputHandlersValue?.value?.type || "default", e = this.inputHandlersValue?.direction || "vertical", i = this.inputHandlersValue?.position || "left", s = this.inputHandlersValue?.size?.value || this.inputHandlersValue?.size || "medium", d = this.inputHandlersValue?.state === "disabled", c = this.inputHandlersValue?.required || !1, h = this.inputHandlersValue?.name || "radioGroup", V = this.inputHandlersValue?.autoWidth?.value || this.inputHandlersValue?.autoWidth || !1;
11
+ return $`
12
+ <span style=${m(l)}>
13
+ <nr-radio-group
14
+
15
+ .options=${t}
16
+ .defaultValue=${n}
17
+ .value=${n}
18
+ .type=${a}
19
+ .direction=${e}
20
+ .position=${i}
21
+ .size=${s}
22
+ .name=${h}
23
+ ?disabled=${d}
24
+ ?required=${c}
25
+ ?auto-width=${V}
26
+ @nr-change=${(o) => {
27
+ this.executeEvent("onChange", o, {
28
+ value: o.detail.value,
29
+ option: o.detail.option,
30
+ oldValue: o.detail.oldValue
31
+ });
32
+ }}
33
+ >
34
+ <span slot="helper-text" style="display: block; margin-top: 4px;">
35
+ ${this.inputHandlersValue?.helper ?? ""}
36
+ </span>
37
+ </nr-radio-group>
38
+ </span>
39
+ `;
40
+ }
41
+ };
42
+ r([
43
+ p({ type: Object })
44
+ ], u.prototype, "component", 2);
45
+ r([
46
+ p({ type: Object })
47
+ ], u.prototype, "item", 2);
48
+ u = r([
49
+ H("radio-button-block")
50
+ ], u);
51
+ export {
52
+ u as RadioButtonBlock
53
+ };
@@ -0,0 +1,79 @@
1
+ import { B as u, e as h, s as f, m, f as l, r as y, b as C, c as i, d as r, t as v } from "./micro-app-entry-DiNqE6xi.js";
2
+ var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, t = (o, n, a, s) => {
3
+ for (var p = s > 1 ? void 0 : s ? g(n, a) : n, c = o.length - 1, d; c >= 0; c--)
4
+ (d = o[c]) && (p = (s ? d(n, a, p) : d(p)) || p);
5
+ return s && p && b(n, a, p), p;
6
+ };
7
+ let e = class extends u {
8
+ constructor() {
9
+ super(), this.dragOverSituation = !1, this.isViewMode = !1, this.wrapperStyle = {}, this.containerRef = h(), this.addEventListener("click", (o) => {
10
+ o.preventDefault(), o.stopPropagation(), f(this.component.uuid);
11
+ });
12
+ }
13
+ connectedCallback() {
14
+ super.connectedCallback();
15
+ }
16
+ firstUpdated(o) {
17
+ m.on(`component-property-changed:${String(this.component.name)}`, () => {
18
+ this.requestUpdate();
19
+ }), l(this.component.application_id).subscribe(
20
+ (n) => {
21
+ this.components = [...n];
22
+ }
23
+ ), m.on(
24
+ "component:refresh",
25
+ () => {
26
+ this.components = l(this.component.application_id).get();
27
+ }
28
+ );
29
+ }
30
+ renderComponent() {
31
+ const o = this.components?.find(
32
+ (n) => n.uuid === this.inputHandlersValue?.ref && this.component.uuid !== this.inputHandlersValue?.ref
33
+ );
34
+ return C`
35
+ ${y(
36
+ [o],
37
+ {},
38
+ !0
39
+ )}
40
+
41
+ `;
42
+ }
43
+ };
44
+ t([
45
+ i({ type: Object })
46
+ ], e.prototype, "component", 2);
47
+ t([
48
+ i({ type: Object })
49
+ ], e.prototype, "item", 2);
50
+ t([
51
+ r()
52
+ ], e.prototype, "dragOverSituation", 2);
53
+ t([
54
+ r()
55
+ ], e.prototype, "selectedComponent", 2);
56
+ t([
57
+ r()
58
+ ], e.prototype, "hoveredComponent", 2);
59
+ t([
60
+ i({ type: Object })
61
+ ], e.prototype, "draggingComponentInfo", 2);
62
+ t([
63
+ i({ type: Boolean })
64
+ ], e.prototype, "isViewMode", 2);
65
+ t([
66
+ r()
67
+ ], e.prototype, "wrapperStyle", 2);
68
+ t([
69
+ r()
70
+ ], e.prototype, "containerRef", 2);
71
+ t([
72
+ r()
73
+ ], e.prototype, "components", 2);
74
+ e = t([
75
+ v("ref-component-container-block")
76
+ ], e);
77
+ export {
78
+ e as RefComponentContainer
79
+ };
@@ -0,0 +1,96 @@
1
+ import { ae as BaseElementBlock, ak as setCurrentComponentIdAction, aX as eventDispatcher, w as $applicationComponents, aM as renderComponent } from './BaseElement-pS6m_x6Q.js';
2
+ import { html } from 'lit';
3
+ import { property, state, customElement } from 'lit/decorators.js';
4
+ import { createRef } from 'lit/directives/ref.js';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result) __defProp(target, key, result);
14
+ return result;
15
+ };
16
+ let RefComponentContainer = class extends BaseElementBlock {
17
+ constructor() {
18
+ super();
19
+ this.dragOverSituation = false;
20
+ this.isViewMode = false;
21
+ this.wrapperStyle = {};
22
+ this.containerRef = createRef();
23
+ this.addEventListener("click", (e) => {
24
+ e.preventDefault();
25
+ e.stopPropagation();
26
+ setCurrentComponentIdAction(this.component.uuid);
27
+ });
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback();
31
+ }
32
+ firstUpdated(_changedProperties) {
33
+ eventDispatcher.on(`component-property-changed:${String(this.component.name)}`, () => {
34
+ this.requestUpdate();
35
+ });
36
+ $applicationComponents(this.component.application_id).subscribe(
37
+ (components) => {
38
+ this.components = [...components];
39
+ }
40
+ );
41
+ eventDispatcher.on(
42
+ "component:refresh",
43
+ () => {
44
+ this.components = $applicationComponents(this.component.application_id).get();
45
+ }
46
+ );
47
+ }
48
+ renderComponent() {
49
+ const componentToRender = this.components?.find(
50
+ (component) => component.uuid === this.inputHandlersValue?.ref && this.component.uuid !== this.inputHandlersValue?.ref
51
+ );
52
+ return html`
53
+ ${renderComponent(
54
+ [componentToRender],
55
+ {},
56
+ true
57
+ )}
58
+
59
+ `;
60
+ }
61
+ };
62
+ __decorateClass([
63
+ property({ type: Object })
64
+ ], RefComponentContainer.prototype, "component", 2);
65
+ __decorateClass([
66
+ property({ type: Object })
67
+ ], RefComponentContainer.prototype, "item", 2);
68
+ __decorateClass([
69
+ state()
70
+ ], RefComponentContainer.prototype, "dragOverSituation", 2);
71
+ __decorateClass([
72
+ state()
73
+ ], RefComponentContainer.prototype, "selectedComponent", 2);
74
+ __decorateClass([
75
+ state()
76
+ ], RefComponentContainer.prototype, "hoveredComponent", 2);
77
+ __decorateClass([
78
+ property({ type: Object })
79
+ ], RefComponentContainer.prototype, "draggingComponentInfo", 2);
80
+ __decorateClass([
81
+ property({ type: Boolean })
82
+ ], RefComponentContainer.prototype, "isViewMode", 2);
83
+ __decorateClass([
84
+ state()
85
+ ], RefComponentContainer.prototype, "wrapperStyle", 2);
86
+ __decorateClass([
87
+ state()
88
+ ], RefComponentContainer.prototype, "containerRef", 2);
89
+ __decorateClass([
90
+ state()
91
+ ], RefComponentContainer.prototype, "components", 2);
92
+ RefComponentContainer = __decorateClass([
93
+ customElement("ref-component-container-block")
94
+ ], RefComponentContainer);
95
+
96
+ export { RefComponentContainer };