@nuraly/runtime 0.1.9 → 0.1.11

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 (114) hide show
  1. package/components/ui/components/base/controllers/InputHandlerController.ts +5 -0
  2. package/components/ui/components/inputs/ColorPicker/colorpicker.ts +1 -7
  3. package/components/ui/components/inputs/Form/Form.ts +3 -11
  4. package/components/ui/components/inputs/RadioButton/Radio-button.ts +1 -7
  5. package/components/ui/components/inputs/Select/Select.ts +1 -7
  6. package/components/ui/components/layout/Grid/Col.ts +2 -6
  7. package/components/ui/components/layout/Grid/Row.ts +2 -6
  8. package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +4 -16
  9. package/dist/AIChat-C-wFf4PD.js +220 -0
  10. package/dist/AIChat-Cly-frW6.js +260 -0
  11. package/dist/Badge-BUm76SZ2.js +70 -0
  12. package/dist/Badge-BarGcY8u.js +48 -0
  13. package/dist/{BaseElement-BNBn_IJk.js → BaseElement-wyA58UxT.js} +156 -24
  14. package/dist/Button-BEgayuX9.js +80 -0
  15. package/dist/Button-wgwjzM_f.js +92 -0
  16. package/dist/Card-B4r5RQgn.js +120 -0
  17. package/dist/Card-a1sdDpKe.js +150 -0
  18. package/dist/Checkbox-CC9PkwpC.js +59 -0
  19. package/dist/Checkbox-WVmAN9ZP.js +65 -0
  20. package/dist/Code-Dc66ui4C.js +109 -0
  21. package/dist/Code-kVoVXBbt.js +123 -0
  22. package/dist/{CodeEditor-B1gNuvPb.js → CodeEditor-2QHTZxKN.js} +22 -22
  23. package/dist/Col-BKbQ2o0P.js +217 -0
  24. package/dist/Col-x4rRO4dz.js +193 -0
  25. package/dist/Collapse-Dd2GfevD.js +74 -0
  26. package/dist/Collapse-Xo-jb8zs.js +96 -0
  27. package/dist/Collections-DEqUHWFe.js +151 -0
  28. package/dist/Collections-DsTr-Zt7.js +122 -0
  29. package/dist/Container-C1HjQgb7.js +204 -0
  30. package/dist/DatePicker-DRVwFJmL.js +99 -0
  31. package/dist/DatePicker-oAOJyU3e.js +80 -0
  32. package/dist/Divider-BMA6S7Pd.js +106 -0
  33. package/dist/Divider-zbcO-KF9.js +86 -0
  34. package/dist/Document-BqVezrmJ.js +90 -0
  35. package/dist/Document-C2lg-jdj.js +74 -0
  36. package/dist/Dropdown-BRN-hpgd.js +133 -0
  37. package/dist/Dropdown-j62nqdd-.js +112 -0
  38. package/dist/EmbedURL-Bgr2pdf_.js +114 -0
  39. package/dist/EmbedURL-DFt6rN3J.js +142 -0
  40. package/dist/FileUpload-B5TBQJPC.js +54 -0
  41. package/dist/FileUpload-sYxMn9Rj.js +47 -0
  42. package/dist/Form-7ZWgBVzR.js +286 -0
  43. package/dist/Form-CsN7UMF-.js +339 -0
  44. package/dist/Icon-B_2ZWGd0.js +64 -0
  45. package/dist/Icon-CkLIObME.js +74 -0
  46. package/dist/Image-CcswllGj.js +93 -0
  47. package/dist/Image-CihbGdKt.js +111 -0
  48. package/dist/Link-BEUscah_.js +95 -0
  49. package/dist/Link-C4HV3i5L.js +76 -0
  50. package/dist/Menu-B98hcumz.js +83 -0
  51. package/dist/Menu-BEzo-k-M.js +73 -0
  52. package/dist/MicroApp-BDPSu_XC.js +75 -0
  53. package/dist/MicroApp-DCBOKAJ4.js +100 -0
  54. package/dist/NumberInput-Bbo10XmQ.js +95 -0
  55. package/dist/NumberInput-YJKsJDcd.js +84 -0
  56. package/dist/Panel-C1tcqveD.js +161 -0
  57. package/dist/Panel-DidE5uT5.js +127 -0
  58. package/dist/Radio-button-CuVS3-fC.js +71 -0
  59. package/dist/Radio-button-Cxj0bL8i.js +53 -0
  60. package/dist/RefComponent-BgOcavVg.js +79 -0
  61. package/dist/RefComponent-DTerPZ8J.js +96 -0
  62. package/dist/RichText-BiZgSdNO.js +449 -0
  63. package/dist/RichText-CwMNVuR_.js +485 -0
  64. package/dist/Row-BEx5bGTR.js +202 -0
  65. package/dist/Row-XczXHjOV.js +229 -0
  66. package/dist/Select-Bd16OOiE.js +87 -0
  67. package/dist/Select-D0xinu-U.js +77 -0
  68. package/dist/Slider-BVFPWYh3.js +55 -0
  69. package/dist/Slider-DGulvswN.js +74 -0
  70. package/dist/Table-C44wa8yn.js +159 -0
  71. package/dist/Table-CQiS_Q-s.js +184 -0
  72. package/dist/Tabs-CPQxFISc.js +131 -0
  73. package/dist/Tabs-DW2Su8xF.js +116 -0
  74. package/dist/Tag-BEfAQrjG.js +61 -0
  75. package/dist/Tag-BLxTFDcC.js +47 -0
  76. package/dist/TextInput-BWhdGS3a.js +148 -0
  77. package/dist/TextInput-CV850FvO.js +193 -0
  78. package/dist/TextLabel-CbSGmoVY.js +102 -0
  79. package/dist/Textarea-Bncyxfts.js +83 -0
  80. package/dist/Textarea-SEbx4KI5.js +117 -0
  81. package/dist/Video--shJ014h.js +120 -0
  82. package/dist/Video-CflXfaiK.js +100 -0
  83. package/dist/aitchat-Btz9TPEN.js +23 -0
  84. package/dist/colorpicker-BO_4CeX4.js +64 -0
  85. package/dist/colorpicker-UzXsx6gP.js +75 -0
  86. package/dist/constants-Bs_KQRi_.js +4 -0
  87. package/dist/constants-CXdpxgF2.js +4 -0
  88. package/dist/{cssMode-D82-gS78.js → cssMode-tpaxIZJS.js} +1 -1
  89. package/dist/{freemarker2-CYRLpyjt.js → freemarker2-Nx-tkO9y.js} +1 -1
  90. package/dist/{handlebars-R8Efxi60.js → handlebars-CF3Jmmto.js} +1 -1
  91. package/dist/{html-czhjovcp.js → html-CdZEJTJR.js} +1 -1
  92. package/dist/{htmlMode-DpyKDYYs.js → htmlMode-CztruwTl.js} +1 -1
  93. package/dist/iconbutton-BwuZYQyh.js +53 -0
  94. package/dist/iconbutton-CE0Vxu1G.js +69 -0
  95. package/dist/{javascript-DwqkMEdb.js → javascript-CVODTc2t.js} +1 -1
  96. package/dist/{jsonMode-Cmxxe0W9.js → jsonMode-ChPl6moP.js} +1 -1
  97. package/dist/{liquid-2spuEcBh.js → liquid-BckHw388.js} +1 -1
  98. package/dist/{mdx-BjBXyEeR.js → mdx-DB1fiwuN.js} +1 -1
  99. package/dist/micro-app-entry-BgDXbkmh.js +12042 -0
  100. package/dist/micro-app.bundle.js +1 -1
  101. package/dist/micro-app.js +6 -4969
  102. package/dist/{python-DLI1ji08.js → python-DOQt67t7.js} +1 -1
  103. package/dist/{razor-oAnIJsrL.js → razor-D65ZeXuP.js} +1 -1
  104. package/dist/runtime.js +4 -2
  105. package/dist/{tsMode-D_PMsbjK.js → tsMode-CXrSAnjJ.js} +1 -1
  106. package/dist/{typescript-Bu3ZbtQI.js → typescript-BuKvlC_a.js} +1 -1
  107. package/dist/{xml-CNSSkPqy.js → xml-_nj2r-yt.js} +1 -1
  108. package/dist/{yaml-5RF_PGNe.js → yaml-m8PrW_TL.js} +1 -1
  109. package/package.json +1 -1
  110. package/utils/index.ts +4 -1
  111. package/utils/lazy-component-loader.ts +120 -0
  112. package/utils/register-components.ts +14 -40
  113. package/utils/render-util.ts +84 -0
  114. package/dist/micro-app-entry-DYAnCRDo.js +0 -15860
@@ -0,0 +1,184 @@
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 } from './BaseElement-wyA58UxT.js';
5
+ import { ref } from 'lit/directives/ref.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
+ try {
18
+ await import('@nuralyui/table');
19
+ } catch (error) {
20
+ console.warn("[@nuralyui/table] Package not found or failed to load.");
21
+ }
22
+ let TextInputBlock = class extends BaseElementBlock {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.headers = [
26
+ {
27
+ name: "Id",
28
+ key: "id"
29
+ },
30
+ {
31
+ name: "Status",
32
+ key: "status"
33
+ },
34
+ {
35
+ name: "Priority",
36
+ key: "priority"
37
+ },
38
+ {
39
+ name: "Title",
40
+ key: "title"
41
+ },
42
+ {
43
+ name: "Assignee",
44
+ key: "assignee"
45
+ }
46
+ ];
47
+ this.rows = [
48
+ {
49
+ id: 1,
50
+ status: "Open",
51
+ priority: "Normal",
52
+ title: "Product Details Page - Variant Component (1)",
53
+ assignee: "William Jones"
54
+ },
55
+ {
56
+ id: 2,
57
+ status: "Open",
58
+ priority: "High",
59
+ title: "Product Details Page - Variant Component (2)",
60
+ assignee: "Natalia Hayward"
61
+ },
62
+ {
63
+ id: 3,
64
+ status: "Closed",
65
+ priority: "Normal",
66
+ title: "Product Details Page - Variant Component (3)",
67
+ assignee: "Jess Plant"
68
+ },
69
+ {
70
+ id: 4,
71
+ status: "Open",
72
+ priority: "Normal",
73
+ title: "Product Details Page - Variant Component (4)",
74
+ assignee: "William Jones"
75
+ },
76
+ {
77
+ id: 5,
78
+ status: "Open",
79
+ priority: "Normal",
80
+ title: "Product Details Page - Variant Component (5)",
81
+ assignee: "Kathleen Knowles"
82
+ },
83
+ {
84
+ id: 6,
85
+ status: "Open",
86
+ priority: "High",
87
+ title: "Product Details Page - Variant Component (6)",
88
+ assignee: "Mel Young"
89
+ },
90
+ {
91
+ id: 7,
92
+ status: "Closed",
93
+ priority: "Normal",
94
+ title: "Product Details Page - Variant Component (7)",
95
+ assignee: "Zahid Allison"
96
+ },
97
+ {
98
+ id: 8,
99
+ status: "Closed",
100
+ priority: "High",
101
+ title: "Product Details Page - Variant Component (8)",
102
+ assignee: "William Jones"
103
+ }
104
+ ];
105
+ }
106
+ disconnectedCallback() {
107
+ super.disconnectedCallback();
108
+ if (this.unsubscribe) this.unsubscribe();
109
+ }
110
+ renderComponent() {
111
+ const tableStyles = this.component?.style || {};
112
+ const tableAutoWidth = this.inputHandlersValue?.width;
113
+ this.inputHandlersValue?.height;
114
+ const headers = this.inputHandlersValue?.data ? this.inputHandlersValue?.data?.headers : this.headers;
115
+ const rows = this.inputHandlersValue?.data ? this.inputHandlersValue?.data?.rows : this.rows;
116
+ const size = tableStyles.size || "normal";
117
+ const selectionModeValue = this.component?.input?.selectionMode?.value || this.inputHandlersValue?.selectionMode;
118
+ const selectionMode = selectionModeValue === "multiple" ? "multiple" : selectionModeValue === "single" ? "single" : void 0;
119
+ const filter = this.inputHandlersValue?.filter;
120
+ const fixedHeader = this.inputHandlersValue?.fixedHeader ?? false;
121
+ const loading = this.inputHandlersValue?.loading ?? false;
122
+ const expandable = this.inputHandlersValue?.expandable ?? false;
123
+ const emptyText = this.inputHandlersValue?.emptyText ?? "No data available";
124
+ const emptyIcon = this.inputHandlersValue?.emptyIcon;
125
+ const expansionRenderer = this.inputHandlersValue?.expansionRenderer;
126
+ const scrollConfig = this.inputHandlersValue?.scrollConfig;
127
+ return html`
128
+ <nr-table
129
+ ${ref(this.inputRef)}
130
+ style=${styleMap({
131
+ ...tableStyles,
132
+ width: tableAutoWidth ? "auto" : tableStyles.width,
133
+ "overflow": "auto"
134
+ })}
135
+ .headers="${headers}"
136
+ .rows="${rows}"
137
+ .size=${size}
138
+ .withFilter=${filter === "filter"}
139
+ .expandable=${expandable ?? nothing}
140
+ .expansionRenderer=${expansionRenderer ?? nothing}
141
+ .selectionMode=${selectionMode}
142
+ .fixedHeader=${fixedHeader}
143
+ .scrollConfig=${scrollConfig ?? nothing}
144
+ .loading=${loading}
145
+ .emptyText=${emptyText}
146
+ .emptyIcon=${emptyIcon ?? nothing}
147
+ @onPaginate=${(e) => {
148
+ this.executeEvent("onPaginate", e);
149
+ }}
150
+ @nr-select=${(e) => {
151
+ this.executeEvent("onSelect", e);
152
+ }}
153
+ @onSearch=${(e) => {
154
+ this.executeEvent("onSearch", e);
155
+ }}
156
+ @onSort=${(e) => {
157
+ this.executeEvent("onSort", e);
158
+ }}
159
+ >
160
+ </nr-table>
161
+
162
+ `;
163
+ }
164
+ };
165
+ TextInputBlock.styles = [
166
+ css``
167
+ ];
168
+ __decorateClass([
169
+ property({ type: Object })
170
+ ], TextInputBlock.prototype, "component", 2);
171
+ __decorateClass([
172
+ property({ type: Object })
173
+ ], TextInputBlock.prototype, "item", 2);
174
+ __decorateClass([
175
+ state()
176
+ ], TextInputBlock.prototype, "headers", 2);
177
+ __decorateClass([
178
+ state()
179
+ ], TextInputBlock.prototype, "rows", 2);
180
+ TextInputBlock = __decorateClass([
181
+ customElement("table-block")
182
+ ], TextInputBlock);
183
+
184
+ export { TextInputBlock };
@@ -0,0 +1,131 @@
1
+ import { ae as BaseElementBlock, aM as renderComponent, w as $applicationComponents } from './BaseElement-wyA58UxT.js';
2
+ import { nothing, html, css } from 'lit';
3
+ import { property, state, customElement } from 'lit/decorators.js';
4
+ import { styleMap } from 'lit/directives/style-map.js';
5
+ import { E as EMPTY_STRING } from './constants-Bs_KQRi_.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
+ try {
18
+ await import('@nuralyui/tabs');
19
+ } catch (error) {
20
+ console.warn("[@nuralyui/tabs] Package not found or failed to load. Tab functionality may be limited.");
21
+ }
22
+ let TabsBlock = class extends BaseElementBlock {
23
+ constructor() {
24
+ super();
25
+ this.editableTabs = [];
26
+ this.componentsWithChildren = [];
27
+ this.registerCallback("tabs", () => {
28
+ this.updateComponents();
29
+ this.editableTabs = this.generateTabs();
30
+ });
31
+ }
32
+ update(changedProperties) {
33
+ super.update(changedProperties);
34
+ if (changedProperties.has("component")) {
35
+ this.updateComponents();
36
+ }
37
+ }
38
+ renderComponent() {
39
+ const tabStyle = this.getStyles();
40
+ return html`
41
+ ${this.editableTabs?.length > 0 ? html`
42
+ <nr-tabs
43
+ style=${styleMap({
44
+ ...tabStyle
45
+ })}
46
+ .activeTab=${this.inputHandlersValue.index ?? 0}
47
+ .tabs=${this.editableTabs}
48
+ size=${this.inputHandlersValue?.size ?? "medium"}
49
+ align=${this.inputHandlersValue?.align ?? nothing}
50
+ .panelConfig=${this.inputHandlersValue?.panelConfig ?? nothing}
51
+ .popOut=${this.inputHandlersValue?.popOut ?? nothing}
52
+ @nr-tab-click=${(e) => {
53
+ this.executeEvent("onTabChanged", e, {
54
+ tab: this.editableTabs.find((tab, index) => index === e.detail.index)
55
+ });
56
+ }}
57
+ @nr-tabs-panel-close=${(e) => {
58
+ this.executeEvent("onPanelClose", e);
59
+ }}
60
+ @nr-tabs-panel-minimize=${(e) => {
61
+ this.executeEvent("onPanelMinimize", e);
62
+ }}
63
+ @nr-tabs-panel-resize=${(e) => {
64
+ this.executeEvent("onPanelResize", e);
65
+ }}
66
+ @nr-tab-pop-out=${(e) => {
67
+ this.executeEvent("onTabPopOut", e, {
68
+ tab: e.detail.tab,
69
+ index: e.detail.index,
70
+ popOutId: e.detail.popOutId
71
+ });
72
+ }}
73
+ @nr-tab-pop-in=${(e) => {
74
+ this.executeEvent("onTabPopIn", e, {
75
+ tab: e.detail.tab,
76
+ originalIndex: e.detail.originalIndex,
77
+ popOutId: e.detail.popOutId
78
+ });
79
+ }}
80
+ .editable=${{
81
+ canDeleteTab: false,
82
+ canEditTabTitle: false,
83
+ canAddTab: false,
84
+ canMove: false
85
+ }}
86
+ ></nr-tabs>
87
+ ` : EMPTY_STRING}
88
+ `;
89
+ }
90
+ generateComponent(childrensIds) {
91
+ const childrens = childrensIds?.map(
92
+ (id) => this.componentsWithChildren.find((component) => component.uuid === id)
93
+ ).filter(Boolean) || [];
94
+ return html`${renderComponent(childrens, null, true)}`;
95
+ }
96
+ generateTabs() {
97
+ return this.inputHandlersValue.tabs?.map((tab) => ({
98
+ label: tab.label.value,
99
+ key: tab.key,
100
+ icon: tab.icon?.value || null,
101
+ content: html`
102
+ <div>${this.generateComponent(tab.childrends.value)}</div>`
103
+ }));
104
+ }
105
+ updateComponents() {
106
+ const components = $applicationComponents(this.component.application_id).get();
107
+ this.componentsWithChildren = [...components];
108
+ }
109
+ };
110
+ TabsBlock.styles = css`
111
+ :host {
112
+ display: block;
113
+ height: 100%;
114
+ /* CSS variables for tab text alignment customization */
115
+ --nuraly-tabs-text-align: center; /* Default center alignment */
116
+ }
117
+ `;
118
+ __decorateClass([
119
+ property({ type: Object, reflect: false })
120
+ ], TabsBlock.prototype, "component", 2);
121
+ __decorateClass([
122
+ state()
123
+ ], TabsBlock.prototype, "editableTabs", 2);
124
+ __decorateClass([
125
+ state()
126
+ ], TabsBlock.prototype, "componentsWithChildren", 2);
127
+ TabsBlock = __decorateClass([
128
+ customElement("tabs-block")
129
+ ], TabsBlock);
130
+
131
+ export { TabsBlock };
@@ -0,0 +1,116 @@
1
+ import { B as b, o as c, A as d, b as l, r as h, f as m, i as f, c as v, d as u, t as T } from "./micro-app-entry-BgDXbkmh.js";
2
+ import { E as g } from "./constants-CXdpxgF2.js";
3
+ var C = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (t, e, i, n) => {
4
+ for (var a = n > 1 ? void 0 : n ? $(e, i) : e, r = t.length - 1, p; r >= 0; r--)
5
+ (p = t[r]) && (a = (n ? p(e, i, a) : p(a)) || a);
6
+ return n && a && C(e, i, a), a;
7
+ };
8
+ try {
9
+ await import("@nuralyui/tabs");
10
+ } catch {
11
+ console.warn("[@nuralyui/tabs] Package not found or failed to load. Tab functionality may be limited.");
12
+ }
13
+ let s = class extends b {
14
+ constructor() {
15
+ super(), this.editableTabs = [], this.componentsWithChildren = [], this.registerCallback("tabs", () => {
16
+ this.updateComponents(), this.editableTabs = this.generateTabs();
17
+ });
18
+ }
19
+ update(t) {
20
+ super.update(t), t.has("component") && this.updateComponents();
21
+ }
22
+ renderComponent() {
23
+ const t = this.getStyles();
24
+ return l`
25
+ ${this.editableTabs?.length > 0 ? l`
26
+ <nr-tabs
27
+ style=${c({
28
+ ...t
29
+ })}
30
+ .activeTab=${this.inputHandlersValue.index ?? 0}
31
+ .tabs=${this.editableTabs}
32
+ size=${this.inputHandlersValue?.size ?? "medium"}
33
+ align=${this.inputHandlersValue?.align ?? d}
34
+ .panelConfig=${this.inputHandlersValue?.panelConfig ?? d}
35
+ .popOut=${this.inputHandlersValue?.popOut ?? d}
36
+ @nr-tab-click=${(e) => {
37
+ this.executeEvent("onTabChanged", e, {
38
+ tab: this.editableTabs.find((i, n) => n === e.detail.index)
39
+ });
40
+ }}
41
+ @nr-tabs-panel-close=${(e) => {
42
+ this.executeEvent("onPanelClose", e);
43
+ }}
44
+ @nr-tabs-panel-minimize=${(e) => {
45
+ this.executeEvent("onPanelMinimize", e);
46
+ }}
47
+ @nr-tabs-panel-resize=${(e) => {
48
+ this.executeEvent("onPanelResize", e);
49
+ }}
50
+ @nr-tab-pop-out=${(e) => {
51
+ this.executeEvent("onTabPopOut", e, {
52
+ tab: e.detail.tab,
53
+ index: e.detail.index,
54
+ popOutId: e.detail.popOutId
55
+ });
56
+ }}
57
+ @nr-tab-pop-in=${(e) => {
58
+ this.executeEvent("onTabPopIn", e, {
59
+ tab: e.detail.tab,
60
+ originalIndex: e.detail.originalIndex,
61
+ popOutId: e.detail.popOutId
62
+ });
63
+ }}
64
+ .editable=${{
65
+ canDeleteTab: !1,
66
+ canEditTabTitle: !1,
67
+ canAddTab: !1,
68
+ canMove: !1
69
+ }}
70
+ ></nr-tabs>
71
+ ` : g}
72
+ `;
73
+ }
74
+ generateComponent(t) {
75
+ const e = t?.map(
76
+ (i) => this.componentsWithChildren.find((n) => n.uuid === i)
77
+ ).filter(Boolean) || [];
78
+ return l`${h(e, null, !0)}`;
79
+ }
80
+ generateTabs() {
81
+ return this.inputHandlersValue.tabs?.map((t) => ({
82
+ label: t.label.value,
83
+ key: t.key,
84
+ icon: t.icon?.value || null,
85
+ content: l`
86
+ <div>${this.generateComponent(t.childrends.value)}</div>`
87
+ }));
88
+ }
89
+ updateComponents() {
90
+ const t = m(this.component.application_id).get();
91
+ this.componentsWithChildren = [...t];
92
+ }
93
+ };
94
+ s.styles = f`
95
+ :host {
96
+ display: block;
97
+ height: 100%;
98
+ /* CSS variables for tab text alignment customization */
99
+ --nuraly-tabs-text-align: center; /* Default center alignment */
100
+ }
101
+ `;
102
+ o([
103
+ v({ type: Object, reflect: !1 })
104
+ ], s.prototype, "component", 2);
105
+ o([
106
+ u()
107
+ ], s.prototype, "editableTabs", 2);
108
+ o([
109
+ u()
110
+ ], s.prototype, "componentsWithChildren", 2);
111
+ s = o([
112
+ T("tabs-block")
113
+ ], s);
114
+ export {
115
+ s as TabsBlock
116
+ };
@@ -0,0 +1,61 @@
1
+ import { html, css } from 'lit';
2
+ import { property, customElement } from 'lit/decorators.js';
3
+ import { styleMap } from 'lit/directives/style-map.js';
4
+ import { ae as BaseElementBlock } from './BaseElement-wyA58UxT.js';
5
+ import { ref } from 'lit/directives/ref.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
+ try {
18
+ await import('@nuralyui/tag');
19
+ } catch (error) {
20
+ console.warn("[@nuralyui/tag] Package not found or failed to load.");
21
+ }
22
+ let TagBlock = class extends BaseElementBlock {
23
+ renderComponent() {
24
+ const tagStyles = this.component?.style || {};
25
+ const label = this.component?.input?.label?.value || this.inputHandlersValue?.label || "";
26
+ const closable = this.component?.input?.closable?.value ?? this.inputHandlersValue?.closable ?? false;
27
+ const color = this.component?.input?.color?.value || this.inputHandlersValue?.color;
28
+ const icon = this.component?.input?.icon?.value || this.inputHandlersValue?.icon;
29
+ const bordered = this.component?.input?.bordered?.value ?? this.inputHandlersValue?.bordered ?? true;
30
+ return html`
31
+ <nr-tag
32
+ ${ref(this.inputRef)}
33
+ style=${styleMap(tagStyles)}
34
+ .color=${color}
35
+ ?closable=${closable}
36
+ ?bordered=${bordered}
37
+ @nr-tag-close=${(e) => {
38
+ this.executeEvent("onClose", e);
39
+ }}
40
+ @click=${(e) => {
41
+ this.executeEvent("onClick", e);
42
+ }}
43
+ >
44
+ ${icon ? html`<nr-icon slot="icon" .name=${icon}></nr-icon>` : ""}
45
+ ${label}
46
+ </nr-tag>
47
+ `;
48
+ }
49
+ };
50
+ TagBlock.styles = [css``];
51
+ __decorateClass([
52
+ property({ type: Object })
53
+ ], TagBlock.prototype, "component", 2);
54
+ __decorateClass([
55
+ property({ type: Object })
56
+ ], TagBlock.prototype, "item", 2);
57
+ TagBlock = __decorateClass([
58
+ customElement("tag-block")
59
+ ], TagBlock);
60
+
61
+ export { TagBlock };
@@ -0,0 +1,47 @@
1
+ import { B as u, n as b, o as d, b as i, i as h, c as p, t as m } from "./micro-app-entry-BgDXbkmh.js";
2
+ var v = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, a = (l, o, r, n) => {
3
+ for (var e = n > 1 ? void 0 : n ? $(o, r) : o, s = l.length - 1, t; s >= 0; s--)
4
+ (t = l[s]) && (e = (n ? t(o, r, e) : t(e)) || e);
5
+ return n && e && v(o, r, e), e;
6
+ };
7
+ try {
8
+ await import("@nuralyui/tag");
9
+ } catch {
10
+ console.warn("[@nuralyui/tag] Package not found or failed to load.");
11
+ }
12
+ let c = class extends u {
13
+ renderComponent() {
14
+ const l = this.component?.style || {}, o = this.component?.input?.label?.value || this.inputHandlersValue?.label || "", r = this.component?.input?.closable?.value ?? this.inputHandlersValue?.closable ?? !1, n = this.component?.input?.color?.value || this.inputHandlersValue?.color, e = this.component?.input?.icon?.value || this.inputHandlersValue?.icon, s = this.component?.input?.bordered?.value ?? this.inputHandlersValue?.bordered ?? !0;
15
+ return i`
16
+ <nr-tag
17
+ ${b(this.inputRef)}
18
+ style=${d(l)}
19
+ .color=${n}
20
+ ?closable=${r}
21
+ ?bordered=${s}
22
+ @nr-tag-close=${(t) => {
23
+ this.executeEvent("onClose", t);
24
+ }}
25
+ @click=${(t) => {
26
+ this.executeEvent("onClick", t);
27
+ }}
28
+ >
29
+ ${e ? i`<nr-icon slot="icon" .name=${e}></nr-icon>` : ""}
30
+ ${o}
31
+ </nr-tag>
32
+ `;
33
+ }
34
+ };
35
+ c.styles = [h``];
36
+ a([
37
+ p({ type: Object })
38
+ ], c.prototype, "component", 2);
39
+ a([
40
+ p({ type: Object })
41
+ ], c.prototype, "item", 2);
42
+ c = a([
43
+ m("tag-block")
44
+ ], c);
45
+ export {
46
+ c as TagBlock
47
+ };
@@ -0,0 +1,148 @@
1
+ import { B as h, n as c, A as s, b as m, i as f, c as p, d, t as v } from "./micro-app-entry-BgDXbkmh.js";
2
+ function V(t, e) {
3
+ const a = t.inputHandlersValue?.name;
4
+ !a || !e || t.dispatchEvent(new CustomEvent("nr-field-register", {
5
+ bubbles: !0,
6
+ composed: !0,
7
+ detail: {
8
+ element: e,
9
+ name: a,
10
+ blockElement: t
11
+ }
12
+ }));
13
+ }
14
+ function $(t) {
15
+ const e = t.inputHandlersValue?.name;
16
+ e && t.dispatchEvent(new CustomEvent("nr-field-unregister", {
17
+ bubbles: !0,
18
+ composed: !0,
19
+ detail: {
20
+ name: e,
21
+ blockElement: t
22
+ }
23
+ }));
24
+ }
25
+ var b = Object.defineProperty, H = Object.getOwnPropertyDescriptor, u = (t, e, a, l) => {
26
+ for (var n = l > 1 ? void 0 : l ? H(e, a) : e, r = t.length - 1, o; r >= 0; r--)
27
+ (o = t[r]) && (n = (l ? o(e, a, n) : o(n)) || n);
28
+ return l && n && b(e, a, n), n;
29
+ };
30
+ try {
31
+ await import("@nuralyui/input");
32
+ } catch {
33
+ console.warn("[@nuralyui/input] Package not found or failed to load.");
34
+ }
35
+ let i = class extends h {
36
+ constructor() {
37
+ super(), this.currentValue = "", this._isUserFocused = !1, this._focusResetTimeout = null, this._inputElement = null;
38
+ }
39
+ firstUpdated(t) {
40
+ super.firstUpdated(t), this.registerCallback("value", (e) => {
41
+ !this._isUserFocused && this.currentValue !== e && (this.currentValue = e ?? "");
42
+ }), this._inputElement = this.renderRoot.querySelector("nr-input"), this._inputElement && this.inputHandlersValue?.name && V(this, this._inputElement);
43
+ }
44
+ disconnectedCallback() {
45
+ super.disconnectedCallback(), this.unsubscribe && this.unsubscribe(), this._focusResetTimeout && clearTimeout(this._focusResetTimeout), this.inputHandlersValue?.name && $(this);
46
+ }
47
+ resetFocusAfterInactivity() {
48
+ this._focusResetTimeout && clearTimeout(this._focusResetTimeout), this._focusResetTimeout = setTimeout(() => {
49
+ this._isUserFocused = !1;
50
+ }, 3e3);
51
+ }
52
+ renderComponent() {
53
+ return this.getStyles(), (this.component?.style || {})?.size, m`
54
+ <nr-input
55
+ ${c(this.inputRef)}
56
+ class="${`drop-${this.component.uuid}`}"
57
+
58
+ .value=${this.inputHandlersValue?.value ?? s}
59
+ .size=${this.inputHandlersValue?.size ?? "medium"}
60
+ .state=${this.inputHandlersValue.status ?? s}
61
+ .type=${this.inputHandlersValue.type ?? s}
62
+ .variant=${this.inputHandlersValue.variant ?? s}
63
+ .disabled=${this.inputHandlersValue.state === "disabled"}
64
+ .readonly=${this.inputHandlersValue.readonly || !1}
65
+ .placeholder=${this.inputHandlersValue?.placeholder ?? "Text input"}
66
+ .step=${this.inputHandlersValue?.step ?? s}
67
+ .min=${this.inputHandlersValue?.min ?? s}
68
+ .max=${this.inputHandlersValue?.max ?? s}
69
+ .name=${this.inputHandlersValue?.name ?? s}
70
+ .required=${this.inputHandlersValue?.required || !1}
71
+ .withCopy=${this.inputHandlersValue?.withCopy || !1}
72
+ .allowClear=${this.inputHandlersValue?.allowClear || !1}
73
+ .showCount=${this.inputHandlersValue?.showCount || !1}
74
+ .maxLength=${this.inputHandlersValue?.maxLength ?? s}
75
+ .rules=${this.inputHandlersValue?.rules ?? []}
76
+ .validateOnChangeInput=${this.inputHandlersValue?.validateOnChange !== !1}
77
+ .validateOnBlurInput=${this.inputHandlersValue?.validateOnBlur !== !1}
78
+ .hasFeedback=${this.inputHandlersValue?.hasFeedback || !1}
79
+ .autocomplete=${this.inputHandlersValue?.autocomplete ?? "off"}
80
+ @nr-input=${(e) => {
81
+ this._isUserFocused = !0, this.executeEvent(
82
+ "onChange",
83
+ e,
84
+ {
85
+ value: e.detail.value,
86
+ oldValue: e.detail.oldValue
87
+ }
88
+ ), this.resetFocusAfterInactivity();
89
+ }}
90
+ @nr-focus=${(e) => {
91
+ this._isUserFocused = !0, this.executeEvent("onFocus", e, {
92
+ value: e.detail.value
93
+ });
94
+ }}
95
+ @nr-blur=${(e) => {
96
+ this._isUserFocused = !1, this.executeEvent("onBlur", e, {
97
+ value: e.detail.value
98
+ });
99
+ }}
100
+ @nr-enter=${(e) => {
101
+ this.executeEvent("onEnter", e, {
102
+ value: e.detail.value
103
+ });
104
+ }}
105
+ @nr-clear=${(e) => {
106
+ this.executeEvent("onClear", e, {
107
+ value: e.detail.value
108
+ });
109
+ }}
110
+ @keydown=${(e) => {
111
+ e.key === "ArrowUp" ? this.executeEvent("onArrowUp", e) : e.key === "ArrowDown" && this.executeEvent("onArrowDown", e);
112
+ }}
113
+ >
114
+ <span
115
+ slot="label"
116
+
117
+ >
118
+ ${this.inputHandlersValue?.label ?? ""}
119
+ </span>
120
+ <span
121
+ slot="helper-text"
122
+
123
+ >
124
+ ${this.inputHandlersValue?.helper ?? ""}
125
+ </span>
126
+ </nr-input>
127
+ `;
128
+ }
129
+ };
130
+ i.styles = [f``];
131
+ u([
132
+ p({ type: Object })
133
+ ], i.prototype, "component", 2);
134
+ u([
135
+ p({ type: Object })
136
+ ], i.prototype, "item", 2);
137
+ u([
138
+ d()
139
+ ], i.prototype, "currentValue", 2);
140
+ u([
141
+ d()
142
+ ], i.prototype, "_isUserFocused", 2);
143
+ i = u([
144
+ v("text-input-block")
145
+ ], i);
146
+ export {
147
+ i as TextInputBlock
148
+ };