@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,100 @@
1
+ import { B as y, n as d, o as p, b as u, A as $, i as f, c as x, t as g } from "./micro-app-entry-BgDXbkmh.js";
2
+ var b = Object.defineProperty, E = Object.getOwnPropertyDescriptor, h = (n, t, s, r) => {
3
+ for (var o = r > 1 ? void 0 : r ? E(t, s) : t, l = n.length - 1, a; l >= 0; l--)
4
+ (a = n[l]) && (o = (r ? a(t, s, o) : a(o)) || o);
5
+ return r && o && b(t, s, o), o;
6
+ };
7
+ try {
8
+ await import("@nuralyui/video");
9
+ } catch {
10
+ console.warn("[@nuralyui/video] Package not found or failed to load.");
11
+ }
12
+ let c = class extends y {
13
+ renderComponent() {
14
+ const n = this.getStyles() || {}, t = this.component?.styleHandlers ? Object.fromEntries(
15
+ Object.entries(this.component?.styleHandlers).filter(([e, i]) => i)
16
+ ) : {}, s = this.inputHandlersValue?.src, r = this.inputHandlersValue?.poster, o = this.inputHandlersValue?.autoplay ?? !1, l = this.inputHandlersValue?.controls ?? !0, a = this.inputHandlersValue?.loop ?? !1, v = this.inputHandlersValue?.muted ?? !1, m = this.inputHandlersValue?.preload ?? "metadata";
17
+ return s ? u`
18
+ <nr-video-player
19
+ ${d(this.inputRef)}
20
+ style=${p({
21
+ ...this.getStyles(),
22
+ display: "block"
23
+ })}
24
+ .src=${s}
25
+ .poster=${r ?? $}
26
+ .autoplay=${o}
27
+ .controls=${l}
28
+ .loop=${a}
29
+ .muted=${v}
30
+ .preload=${m}
31
+ .width=${t?.width || n?.width}
32
+ .height=${t?.height || n?.height}
33
+ @click=${(e) => this.executeEvent("onClick", e)}
34
+ @play=${(e) => this.executeEvent("onPlay", e)}
35
+ @pause=${(e) => this.executeEvent("onPause", e)}
36
+ @ended=${(e) => this.executeEvent("onEnded", e)}
37
+ @loadeddata=${(e) => this.executeEvent("onLoad", e)}
38
+ @error=${(e) => this.executeEvent("onError", e)}
39
+ @timeupdate=${(e) => {
40
+ const i = e.target;
41
+ this.executeEvent("onTimeUpdate", e, {
42
+ currentTime: i?.currentTime,
43
+ duration: i?.duration
44
+ });
45
+ }}
46
+ @volumechange=${(e) => {
47
+ const i = e.target;
48
+ this.executeEvent("onVolumeChange", e, {
49
+ volume: i?.volume,
50
+ muted: i?.muted
51
+ });
52
+ }}
53
+ >
54
+ </nr-video-player>
55
+ ` : u`
56
+ <div
57
+ ${d(this.inputRef)}
58
+ class="video-placeholder"
59
+ style=${p({
60
+ ...this.getStyles(),
61
+ width: t?.width || n?.width || "100%",
62
+ height: t?.height || n?.height || "200px"
63
+ })}
64
+ @click=${(e) => this.executeEvent("onClick", e)}
65
+ >
66
+ <nr-icon name="video"></nr-icon>
67
+ <nr-label>No video source</nr-label>
68
+ </div>
69
+ `;
70
+ }
71
+ };
72
+ c.styles = [f`
73
+ .video-placeholder {
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ justify-content: center;
78
+ color: #64748b;
79
+ min-height: 200px;
80
+ border-radius: 8px;
81
+ border: 2px dashed #cbd5e1;
82
+ gap: 12px;
83
+ }
84
+ .video-placeholder nr-icon {
85
+ --nuraly-icon-size: 48px;
86
+ }
87
+ .video-placeholder span {
88
+ font-size: 14px;
89
+ font-weight: 500;
90
+ }
91
+ `];
92
+ h([
93
+ x({ type: Object })
94
+ ], c.prototype, "component", 2);
95
+ c = h([
96
+ g("video-block")
97
+ ], c);
98
+ export {
99
+ c as VideoBlock
100
+ };
@@ -0,0 +1,23 @@
1
+ import { $ as $components, ag as addComponentAction, bp as getVar, aX as eventDispatcher } from './BaseElement-wyA58UxT.js';
2
+
3
+ function addTempApplication(uuid, components) {
4
+ $components.set({
5
+ ...$components.get(),
6
+ [uuid]: components
7
+ });
8
+ }
9
+
10
+ function addGeneratedComponents(structureComponent) {
11
+ structureComponent.forEach((component) => {
12
+ addComponentAction(
13
+ component,
14
+ getVar("global", "currentPage").value,
15
+ getVar("global", "currentEditingApplication").value.uuid
16
+ );
17
+ });
18
+ setTimeout(() => {
19
+ eventDispatcher.emit("component:refresh");
20
+ }, 1e3);
21
+ }
22
+
23
+ export { addTempApplication as a, addGeneratedComponents as b };
@@ -0,0 +1,64 @@
1
+ import { B as c, n as p, o as u, b as h, i as d, c as $, t as f } from "./micro-app-entry-BgDXbkmh.js";
2
+ import "@nuralyui/color-picker";
3
+ import { E as m } from "./constants-CXdpxgF2.js";
4
+ var H = Object.defineProperty, V = Object.getOwnPropertyDescriptor, i = (o, l, e, s) => {
5
+ for (var t = s > 1 ? void 0 : s ? V(l, e) : l, r = o.length - 1, a; r >= 0; r--)
6
+ (a = o[r]) && (t = (s ? a(l, e, t) : a(t)) || t);
7
+ return s && t && H(l, e, t), t;
8
+ };
9
+ let n = class extends c {
10
+ connectedCallback() {
11
+ super.connectedCallback(), this.registerCallback("value", () => {
12
+ });
13
+ }
14
+ renderComponent() {
15
+ const l = (this.component?.style || {}).size || "default";
16
+ return h`
17
+ <nr-color-picker
18
+ ${p(this.inputRef)}
19
+ style=${u({
20
+ width: "28px",
21
+ height: "28px",
22
+ ...this.getStyles()
23
+ })}
24
+ .color=${this.inputHandlersValue.value ?? m}
25
+ .disabled=${this.inputHandlersValue?.state == "disabled"}
26
+ .size=${l}
27
+ .trigger=${this.inputHandlersValue?.trigger || "click"}
28
+ .placement=${this.inputHandlersValue?.placement || "auto"}
29
+ .animation=${this.inputHandlersValue?.animation || "fade"}
30
+ .closeOnSelect=${this.inputHandlersValue?.closeOnSelect || !1}
31
+ .closeOnOutsideClick=${this.inputHandlersValue?.closeOnOutsideClick !== !1}
32
+ .closeOnEscape=${this.inputHandlersValue?.closeOnEscape !== !1}
33
+ .showInput=${this.inputHandlersValue?.showInput !== !1}
34
+ .showCopyButton=${this.inputHandlersValue?.showCopyButton !== !1}
35
+ .format=${this.inputHandlersValue?.format || "hex"}
36
+ .inputPlaceholder=${this.inputHandlersValue?.inputPlaceholder || "Enter color"}
37
+ .label=${this.inputHandlersValue?.label || ""}
38
+ .helperText=${this.inputHandlersValue?.helperText || ""}
39
+ .defaultColorSets=${this.inputHandlersValue?.defaultColorSets || []}
40
+ @nr-color-change=${(e) => {
41
+ this.executeEvent("onChange", e, { value: e.detail.color });
42
+ }}
43
+ @nr-colorpicker-open=${(e) => {
44
+ this.executeEvent("onOpen", e);
45
+ }}
46
+ @nr-colorpicker-close=${(e) => {
47
+ this.executeEvent("onClose", e);
48
+ }}
49
+ ></nr-color-picker>
50
+ `;
51
+ }
52
+ };
53
+ n.styles = [
54
+ d``
55
+ ];
56
+ i([
57
+ $({ type: Object })
58
+ ], n.prototype, "component", 2);
59
+ n = i([
60
+ f("color-picker-block")
61
+ ], n);
62
+ export {
63
+ n as ColorPickerBlock
64
+ };
@@ -0,0 +1,75 @@
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
+ import '@nuralyui/color-picker';
7
+ import { E as EMPTY_STRING } from './constants-Bs_KQRi_.js';
8
+
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __decorateClass = (decorators, target, key, kind) => {
12
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
13
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
+ if (decorator = decorators[i])
15
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
16
+ if (kind && result) __defProp(target, key, result);
17
+ return result;
18
+ };
19
+ let ColorPickerBlock = class extends BaseElementBlock {
20
+ connectedCallback() {
21
+ super.connectedCallback();
22
+ this.registerCallback("value", () => {
23
+ });
24
+ }
25
+ renderComponent() {
26
+ const colorPickerStyles = this.component?.style || {};
27
+ const size = colorPickerStyles.size || "default";
28
+ return html`
29
+ <nr-color-picker
30
+ ${ref(this.inputRef)}
31
+ style=${styleMap({
32
+ width: "28px",
33
+ height: "28px",
34
+ ...this.getStyles()
35
+ })}
36
+ .color=${this.inputHandlersValue.value ?? EMPTY_STRING}
37
+ .disabled=${this.inputHandlersValue?.state == "disabled"}
38
+ .size=${size}
39
+ .trigger=${this.inputHandlersValue?.trigger || "click"}
40
+ .placement=${this.inputHandlersValue?.placement || "auto"}
41
+ .animation=${this.inputHandlersValue?.animation || "fade"}
42
+ .closeOnSelect=${this.inputHandlersValue?.closeOnSelect || false}
43
+ .closeOnOutsideClick=${this.inputHandlersValue?.closeOnOutsideClick !== false}
44
+ .closeOnEscape=${this.inputHandlersValue?.closeOnEscape !== false}
45
+ .showInput=${this.inputHandlersValue?.showInput !== false}
46
+ .showCopyButton=${this.inputHandlersValue?.showCopyButton !== false}
47
+ .format=${this.inputHandlersValue?.format || "hex"}
48
+ .inputPlaceholder=${this.inputHandlersValue?.inputPlaceholder || "Enter color"}
49
+ .label=${this.inputHandlersValue?.label || ""}
50
+ .helperText=${this.inputHandlersValue?.helperText || ""}
51
+ .defaultColorSets=${this.inputHandlersValue?.defaultColorSets || []}
52
+ @nr-color-change=${(e) => {
53
+ this.executeEvent("onChange", e, { value: e.detail.color });
54
+ }}
55
+ @nr-colorpicker-open=${(e) => {
56
+ this.executeEvent("onOpen", e);
57
+ }}
58
+ @nr-colorpicker-close=${(e) => {
59
+ this.executeEvent("onClose", e);
60
+ }}
61
+ ></nr-color-picker>
62
+ `;
63
+ }
64
+ };
65
+ ColorPickerBlock.styles = [
66
+ css``
67
+ ];
68
+ __decorateClass([
69
+ property({ type: Object })
70
+ ], ColorPickerBlock.prototype, "component", 2);
71
+ ColorPickerBlock = __decorateClass([
72
+ customElement("color-picker-block")
73
+ ], ColorPickerBlock);
74
+
75
+ export { ColorPickerBlock };
@@ -0,0 +1,4 @@
1
+ const NO_EVENT_LISTENER = "";
2
+ const EMPTY_STRING = "";
3
+
4
+ export { EMPTY_STRING as E, NO_EVENT_LISTENER as N };
@@ -0,0 +1,4 @@
1
+ const o = "";
2
+ export {
3
+ o as E
4
+ };
@@ -1,4 +1,4 @@
1
- import { m as et } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as et } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as f } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as f } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as l } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as s } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as lt } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as lt } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -0,0 +1,53 @@
1
+ import { B as c, h as u, j as p, n as h, o as d, b, i as f, c as m, t as y } from "./micro-app-entry-BgDXbkmh.js";
2
+ var $ = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (e, n, o, s) => {
3
+ for (var t = s > 1 ? void 0 : s ? g(n, o) : n, l = e.length - 1, a; l >= 0; l--)
4
+ (a = e[l]) && (t = (s ? a(n, o, t) : a(t)) || t);
5
+ return s && t && $(n, o, t), t;
6
+ };
7
+ try {
8
+ await import("@nuralyui/button");
9
+ } catch {
10
+ console.warn("[@nuralyui/button] Package not found or failed to load.");
11
+ }
12
+ let i = class extends c {
13
+ constructor() {
14
+ super(...arguments), this.handleClick = () => {
15
+ setTimeout(() => {
16
+ this.component?.event?.click && u(this.component, p(this.component, "event.click"));
17
+ }, 0);
18
+ };
19
+ }
20
+ renderComponent() {
21
+ const e = this.getStyles(), { icon: n } = this.component?.parameters ?? {}, o = n ? [n] : [], s = this.inputHandlersValue.value || e?.type || "default", t = e?.size || "medium";
22
+ return b`
23
+ <nr-button
24
+ ${h(this.inputRef)}
25
+ .size=${t}
26
+ .type=${s}
27
+ .disabled=${this.inputHandlersValue.state == "disabled"}
28
+ .loading=${this.inputHandlersValue.loading || !1}
29
+ .block=${this.inputHandlersValue.block || !1}
30
+ .dashed=${this.inputHandlersValue.dashed || !1}
31
+ .icon=${o}
32
+ .iconPosition=${this.inputHandlersValue.iconPosition || "left"}
33
+ @click=${this.handleClick}
34
+ style=${d({
35
+ ...this.getStyles(),
36
+ width: e?.width,
37
+ height: e?.height
38
+ })}
39
+ >
40
+ </nr-button>
41
+ `;
42
+ }
43
+ };
44
+ i.styles = f``;
45
+ r([
46
+ m({ type: Object })
47
+ ], i.prototype, "component", 2);
48
+ i = r([
49
+ y("icon-button-block")
50
+ ], i);
51
+ export {
52
+ i as IconButtonBlock
53
+ };
@@ -0,0 +1,69 @@
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, a8 as executeHandler, bd as getNestedAttribute } 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/button');
19
+ } catch (error) {
20
+ console.warn("[@nuralyui/button] Package not found or failed to load.");
21
+ }
22
+ let IconButtonBlock = class extends BaseElementBlock {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.handleClick = () => {
26
+ setTimeout(() => {
27
+ if (this.component?.event?.click) {
28
+ executeHandler(this.component, getNestedAttribute(this.component, `event.click`));
29
+ }
30
+ }, 0);
31
+ };
32
+ }
33
+ renderComponent() {
34
+ const buttonStyles = this.getStyles();
35
+ const { icon } = this.component?.parameters ?? {};
36
+ const iconArray = icon ? [icon] : [];
37
+ const type = this.inputHandlersValue.value || buttonStyles?.type || "default";
38
+ const size = buttonStyles?.size || "medium";
39
+ return html`
40
+ <nr-button
41
+ ${ref(this.inputRef)}
42
+ .size=${size}
43
+ .type=${type}
44
+ .disabled=${this.inputHandlersValue.state == "disabled"}
45
+ .loading=${this.inputHandlersValue.loading || false}
46
+ .block=${this.inputHandlersValue.block || false}
47
+ .dashed=${this.inputHandlersValue.dashed || false}
48
+ .icon=${iconArray}
49
+ .iconPosition=${this.inputHandlersValue.iconPosition || "left"}
50
+ @click=${this.handleClick}
51
+ style=${styleMap({
52
+ ...this.getStyles(),
53
+ width: buttonStyles?.width,
54
+ height: buttonStyles?.height
55
+ })}
56
+ >
57
+ </nr-button>
58
+ `;
59
+ }
60
+ };
61
+ IconButtonBlock.styles = css``;
62
+ __decorateClass([
63
+ property({ type: Object })
64
+ ], IconButtonBlock.prototype, "component", 2);
65
+ IconButtonBlock = __decorateClass([
66
+ customElement("icon-button-block")
67
+ ], IconButtonBlock);
68
+
69
+ export { IconButtonBlock };
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-Bu3ZbtQI.js";
1
+ import { conf as t, language as e } from "./typescript-BuKvlC_a.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as Et } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as Et } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as l } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./CodeEditor-B1gNuvPb.js";
1
+ import { m as s } from "./CodeEditor-2QHTZxKN.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)