@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,151 @@
1
+ import { css, html } from 'lit';
2
+ import { property, state, customElement } from 'lit/decorators.js';
3
+ import { createRef, ref } from 'lit/directives/ref.js';
4
+ import { ae as BaseElementBlock, a8 as executeHandler, bd as getNestedAttribute, $ as $components, ap as setContextMenuEvent, n as $resizing, ak as setCurrentComponentIdAction, aM as renderComponent } from './BaseElement-wyA58UxT.js';
5
+ import { classMap } from 'lit/directives/class-map.js';
6
+ import { styleMap } from 'lit/directives/style-map.js';
7
+
8
+ const styles = css`
9
+ .collection_viewer {
10
+ --columns: 1;
11
+ min-width: 200px;
12
+ max-height: 400px;
13
+ display: flex;
14
+ flex-wrap: wrap; /* Allows items to wrap into new rows */
15
+ }
16
+
17
+ .vertical {
18
+ flex-direction: column;
19
+ flex-wrap: nowrap
20
+
21
+ }
22
+
23
+ .collection{
24
+ flex: 0 0 calc(100% / var(--columns) - 10px); /* Fixed width */
25
+ }
26
+ `;
27
+
28
+ var __defProp = Object.defineProperty;
29
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
30
+ var __decorateClass = (decorators, target, key, kind) => {
31
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
32
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
33
+ if (decorator = decorators[i])
34
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
35
+ if (kind && result) __defProp(target, key, result);
36
+ return result;
37
+ };
38
+ let CollectionViewer = class extends BaseElementBlock {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.isViewMode = false;
42
+ this.dropDragPalceHolderStyle = {
43
+ display: "none",
44
+ height: "auto",
45
+ width: "auto",
46
+ minWidth: "80px",
47
+ backgroundColor: "rgb(202 235 255)",
48
+ zIndex: "7",
49
+ borderRadius: "2px"
50
+ };
51
+ this.childrenComponents = [];
52
+ this.containerRef = createRef();
53
+ }
54
+ connectedCallback() {
55
+ super.connectedCallback();
56
+ this.updateChildrenComponents();
57
+ if (this.component?.event?.onInit) {
58
+ executeHandler(
59
+ this.component,
60
+ getNestedAttribute(this.component, "event.onInit")
61
+ );
62
+ }
63
+ }
64
+ updated(changedProperties) {
65
+ if (changedProperties.has("component")) {
66
+ this.updateChildrenComponents();
67
+ }
68
+ }
69
+ updateChildrenComponents() {
70
+ const applicationComponents = $components.get()[this.component?.application_id];
71
+ if (!applicationComponents || !this.component?.childrenIds?.length) {
72
+ this.childrenComponents = [];
73
+ return;
74
+ }
75
+ this.childrenComponents = this.component.childrenIds.map((id) => applicationComponents.find((component) => component.uuid === id)).filter(Boolean);
76
+ }
77
+ handleCollectionClick(e) {
78
+ setContextMenuEvent(null);
79
+ if ($resizing.get()) return;
80
+ setCurrentComponentIdAction(this.component?.uuid);
81
+ e.preventDefault();
82
+ e.stopPropagation();
83
+ }
84
+ renderRow(item) {
85
+ return html`
86
+ <div class="collection" ${ref(this.containerRef)}
87
+ @click="${(e) => this.handleCollectionClick(e)}">
88
+ ${this.childrenComponents.length ? html`${renderComponent(
89
+ this.childrenComponents.map((component) => ({ ...component, item })),
90
+ item,
91
+ this.isViewMode
92
+ )}` : html`<div class="empty-message">Add or Drag an item into this collection</div>`}
93
+ </div>`;
94
+ }
95
+ getData() {
96
+ if (Array.isArray(this.inputHandlersValue.data)) {
97
+ return this.inputHandlersValue.data;
98
+ }
99
+ return this.component.input?.data ? [] : [
100
+ { title: "Function 1" },
101
+ { title: "Function 2" },
102
+ { title: "Function 3" }
103
+ ];
104
+ }
105
+ renderComponent() {
106
+ const isVertical = this.inputHandlersValue.direction?.value === "vertical";
107
+ const data = this.getData();
108
+ return html`
109
+ <div
110
+ ${ref(this.inputRef)}
111
+ style=${styleMap(this.getStyles())}
112
+ class=${classMap({
113
+ collection_viewer: true,
114
+ vertical: isVertical
115
+ })}
116
+ >
117
+ ${data.map((item, index) => this.renderRow({ ...item, index }))}
118
+ </div>
119
+ `;
120
+ }
121
+ };
122
+ CollectionViewer.styles = styles;
123
+ __decorateClass([
124
+ property({ type: Object })
125
+ ], CollectionViewer.prototype, "component", 2);
126
+ __decorateClass([
127
+ property({ type: Boolean })
128
+ ], CollectionViewer.prototype, "isViewMode", 2);
129
+ __decorateClass([
130
+ property({ type: String })
131
+ ], CollectionViewer.prototype, "mode", 2);
132
+ __decorateClass([
133
+ state()
134
+ ], CollectionViewer.prototype, "hoveredComponent", 2);
135
+ __decorateClass([
136
+ state()
137
+ ], CollectionViewer.prototype, "currentEditingApplication", 2);
138
+ __decorateClass([
139
+ state()
140
+ ], CollectionViewer.prototype, "draggingComponentInfo", 2);
141
+ __decorateClass([
142
+ state()
143
+ ], CollectionViewer.prototype, "dropDragPalceHolderStyle", 2);
144
+ __decorateClass([
145
+ state()
146
+ ], CollectionViewer.prototype, "childrenComponents", 2);
147
+ CollectionViewer = __decorateClass([
148
+ customElement("collection-viewer")
149
+ ], CollectionViewer);
150
+
151
+ export { CollectionViewer };
@@ -0,0 +1,122 @@
1
+ import { i as u, B as m, e as C, h as g, j as v, $ as f, a as w, p as y, s as x, n as h, r as $, b as a, o as b, g as _, c as d, d as l, t as D } from "./micro-app-entry-BgDXbkmh.js";
2
+ const V = u`
3
+ .collection_viewer {
4
+ --columns: 1;
5
+ min-width: 200px;
6
+ max-height: 400px;
7
+ display: flex;
8
+ flex-wrap: wrap; /* Allows items to wrap into new rows */
9
+ }
10
+
11
+ .vertical {
12
+ flex-direction: column;
13
+ flex-wrap: nowrap
14
+
15
+ }
16
+
17
+ .collection{
18
+ flex: 0 0 calc(100% / var(--columns) - 10px); /* Fixed width */
19
+ }
20
+ `;
21
+ var A = Object.defineProperty, I = Object.getOwnPropertyDescriptor, o = (e, t, i, s) => {
22
+ for (var r = s > 1 ? void 0 : s ? I(t, i) : t, p = e.length - 1, c; p >= 0; p--)
23
+ (c = e[p]) && (r = (s ? c(t, i, r) : c(r)) || r);
24
+ return s && r && A(t, i, r), r;
25
+ };
26
+ let n = class extends m {
27
+ constructor() {
28
+ super(...arguments), this.isViewMode = !1, this.dropDragPalceHolderStyle = {
29
+ display: "none",
30
+ height: "auto",
31
+ width: "auto",
32
+ minWidth: "80px",
33
+ backgroundColor: "rgb(202 235 255)",
34
+ zIndex: "7",
35
+ borderRadius: "2px"
36
+ }, this.childrenComponents = [], this.containerRef = C();
37
+ }
38
+ connectedCallback() {
39
+ super.connectedCallback(), this.updateChildrenComponents(), this.component?.event?.onInit && g(
40
+ this.component,
41
+ v(this.component, "event.onInit")
42
+ );
43
+ }
44
+ updated(e) {
45
+ e.has("component") && this.updateChildrenComponents();
46
+ }
47
+ updateChildrenComponents() {
48
+ const e = f.get()[this.component?.application_id];
49
+ if (!e || !this.component?.childrenIds?.length) {
50
+ this.childrenComponents = [];
51
+ return;
52
+ }
53
+ this.childrenComponents = this.component.childrenIds.map((t) => e.find((i) => i.uuid === t)).filter(Boolean);
54
+ }
55
+ handleCollectionClick(e) {
56
+ w(null), !y.get() && (x(this.component?.uuid), e.preventDefault(), e.stopPropagation());
57
+ }
58
+ renderRow(e) {
59
+ return a`
60
+ <div class="collection" ${h(this.containerRef)}
61
+ @click="${(t) => this.handleCollectionClick(t)}">
62
+ ${this.childrenComponents.length ? a`${$(
63
+ this.childrenComponents.map((t) => ({ ...t, item: e })),
64
+ e,
65
+ this.isViewMode
66
+ )}` : a`<div class="empty-message">Add or Drag an item into this collection</div>`}
67
+ </div>`;
68
+ }
69
+ getData() {
70
+ return Array.isArray(this.inputHandlersValue.data) ? this.inputHandlersValue.data : this.component.input?.data ? [] : [
71
+ { title: "Function 1" },
72
+ { title: "Function 2" },
73
+ { title: "Function 3" }
74
+ ];
75
+ }
76
+ renderComponent() {
77
+ const e = this.inputHandlersValue.direction?.value === "vertical", t = this.getData();
78
+ return a`
79
+ <div
80
+ ${h(this.inputRef)}
81
+ style=${b(this.getStyles())}
82
+ class=${_({
83
+ collection_viewer: !0,
84
+ vertical: e
85
+ })}
86
+ >
87
+ ${t.map((i, s) => this.renderRow({ ...i, index: s }))}
88
+ </div>
89
+ `;
90
+ }
91
+ };
92
+ n.styles = V;
93
+ o([
94
+ d({ type: Object })
95
+ ], n.prototype, "component", 2);
96
+ o([
97
+ d({ type: Boolean })
98
+ ], n.prototype, "isViewMode", 2);
99
+ o([
100
+ d({ type: String })
101
+ ], n.prototype, "mode", 2);
102
+ o([
103
+ l()
104
+ ], n.prototype, "hoveredComponent", 2);
105
+ o([
106
+ l()
107
+ ], n.prototype, "currentEditingApplication", 2);
108
+ o([
109
+ l()
110
+ ], n.prototype, "draggingComponentInfo", 2);
111
+ o([
112
+ l()
113
+ ], n.prototype, "dropDragPalceHolderStyle", 2);
114
+ o([
115
+ l()
116
+ ], n.prototype, "childrenComponents", 2);
117
+ n = o([
118
+ D("collection-viewer")
119
+ ], n);
120
+ export {
121
+ n as CollectionViewer
122
+ };
@@ -0,0 +1,204 @@
1
+ import { ae as BaseElementBlock, $ as $components, aM as renderComponent, v as RuntimeHelpers, ap as setContextMenuEvent, ak as setCurrentComponentIdAction } from './BaseElement-wyA58UxT.js';
2
+ import { css, nothing, html } from 'lit';
3
+ import { property, state, customElement } from 'lit/decorators.js';
4
+ import { classMap } from 'lit/directives/class-map.js';
5
+ import { styleMap } from 'lit/directives/style-map.js';
6
+ import { createRef, ref } from 'lit/directives/ref.js';
7
+
8
+ const styles = css`
9
+ :host{
10
+ display: block;
11
+ }
12
+
13
+ .container {
14
+ /* --container-bg-color-local: var(--container-bg-color); */
15
+ display: flex;
16
+ width: fit-content;
17
+ min-height: 300px;
18
+ height: 100%;
19
+ flex-wrap: wrap;
20
+ /* background-color: var(--container-bg-color-local, var(--container-bg-color)); */
21
+ }
22
+
23
+ .boxed{
24
+ margin-inline-start: auto;
25
+ margin-inline-end: auto;
26
+ }
27
+
28
+ .vertical {
29
+ flex-direction: column;
30
+ }
31
+
32
+ .empty-message-container {
33
+ display: flex;
34
+ justify-content: center;
35
+ align-items: center;
36
+ width: 100%;
37
+ height:100%
38
+ }
39
+
40
+ .container-placeholder {
41
+ display: flex;
42
+ flex-direction: column;
43
+ align-items: center;
44
+ justify-content: center;
45
+ color: #64748b;
46
+ min-height: 200px;
47
+ width: 100%;
48
+ border-radius: 8px;
49
+ border: 2px dashed #cbd5e1;
50
+ gap: 12px;
51
+ cursor: pointer;
52
+ }
53
+
54
+ .container-placeholder nr-icon {
55
+ --nuraly-icon-size: 48px;
56
+ }
57
+ `;
58
+
59
+ var __defProp = Object.defineProperty;
60
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
61
+ var __decorateClass = (decorators, target, key, kind) => {
62
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
63
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
64
+ if (decorator = decorators[i])
65
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
66
+ if (kind && result) __defProp(target, key, result);
67
+ return result;
68
+ };
69
+ let VerticalContainer = class extends BaseElementBlock {
70
+ constructor() {
71
+ super(...arguments);
72
+ this.isViewMode = false;
73
+ this.dragOverSituation = false;
74
+ this.wrapperStyle = {};
75
+ this.containerRef = createRef();
76
+ this.childrenComponents = [];
77
+ }
78
+ connectedCallback() {
79
+ super.connectedCallback();
80
+ this.updateChildrenComponents();
81
+ }
82
+ willUpdate(changedProperties) {
83
+ super.willUpdate(changedProperties);
84
+ if (changedProperties.has("component")) {
85
+ this.updateChildrenComponents();
86
+ }
87
+ }
88
+ updateChildrenComponents() {
89
+ this.childrenComponents = this.component?.childrenIds?.map((id) => {
90
+ return $components.get()[this.component?.application_id]?.find((component) => component.uuid === id);
91
+ }) ?? [];
92
+ }
93
+ renderView() {
94
+ return html`
95
+ <div
96
+ id=${this.inputHandlersValue.id ?? nothing}
97
+ ${ref(this.inputRef)}
98
+ data-component-uuid=${this.component?.uuid}
99
+ data-component-name=${this.component?.name}
100
+ style=${styleMap({
101
+ "width": RuntimeHelpers.extractUnit(this.componentStyles?.width) === "%" ? "100%" : this.componentStyles?.width ?? "auto",
102
+ ...this.getStyles(),
103
+ "min-height": this.childrenComponents.length ? "auto" : "300px"
104
+ })}
105
+ class=${classMap({
106
+ container: true,
107
+ vertical: this.inputHandlersValue.direction === "vertical",
108
+ boxed: this.inputHandlersValue.layout === "boxed",
109
+ "drag-over": this.dragOverSituation
110
+ })}
111
+ @mouseenter="${(e) => this.executeEvent("onMouseEnter", { ...e, unique: this.uniqueUUID })}"
112
+ @mouseleave="${(e) => this.executeEvent("onMouseLeave", { ...e, unique: this.uniqueUUID })}"
113
+ @click="${(e) => this.executeEvent("onClick", e)}"
114
+ >
115
+ ${this.childrenComponents.length ? renderComponent(this.childrenComponents.map((component) => ({ ...component, item: this.item })), this.item, this.isViewMode, { ...this.component, uniqueUUID: this.uniqueUUID }) : html`
116
+ <div class="container-placeholder">
117
+ <nr-icon name="layout-grid"></nr-icon>
118
+ <nr-label>No content</nr-label>
119
+ </div>
120
+ `}
121
+ </div>
122
+ `;
123
+ }
124
+ renderComponent() {
125
+ return html`
126
+ ${this.isViewMode ? this.renderView() : html`
127
+ <div
128
+ ${ref(this.inputRef)}
129
+ data-component-uuid=${this.component?.uuid}
130
+ data-component-name=${this.component?.name}
131
+ ${ref(this.containerRef)}
132
+ @click="${(e) => {
133
+ setContextMenuEvent(null);
134
+ this.executeEvent("onClick", e);
135
+ }}"
136
+ style=${styleMap({
137
+ ...this.getStyles(),
138
+ "min-height": this.childrenComponents.length ? "auto" : "300px"
139
+ })}
140
+ class=${classMap({
141
+ container: true,
142
+ vertical: this.inputHandlersValue.direction === "vertical",
143
+ horizontal: this.inputHandlersValue.direction !== "vertical",
144
+ boxed: this.inputHandlersValue.layout == "boxed"
145
+ })}
146
+ >
147
+ ${this.childrenComponents.length ? renderComponent(this.childrenComponents.map((component) => ({ ...component, item: this.item })), this.item, this.isViewMode, { ...this.component, uniqueUUID: this.uniqueUUID }) : html`
148
+ <div
149
+ class="container-placeholder"
150
+ @click="${() => setCurrentComponentIdAction(this.component?.uuid)}"
151
+ >
152
+ <nr-icon name="layout-grid"></nr-icon>
153
+ <nr-label>Add or drag an item into this container</nr-label>
154
+ <drag-wrapper
155
+ .where=${"inside"}
156
+ .message=${"Drop inside"}
157
+ .component=${{ ...this.component }}
158
+ .inputRef=${this.inputRef}
159
+ .isDragInitiator=${this.isDragInitiator}
160
+ >
161
+ </drag-wrapper>
162
+ </div>
163
+ `}
164
+ </div>
165
+ `}
166
+ `;
167
+ }
168
+ };
169
+ VerticalContainer.styles = styles;
170
+ __decorateClass([
171
+ property({ type: Object })
172
+ ], VerticalContainer.prototype, "component", 2);
173
+ __decorateClass([
174
+ property({ type: Object })
175
+ ], VerticalContainer.prototype, "item", 2);
176
+ __decorateClass([
177
+ property({ type: Object })
178
+ ], VerticalContainer.prototype, "draggingComponentInfo", 2);
179
+ __decorateClass([
180
+ property({ type: Boolean })
181
+ ], VerticalContainer.prototype, "isViewMode", 2);
182
+ __decorateClass([
183
+ state()
184
+ ], VerticalContainer.prototype, "dragOverSituation", 2);
185
+ __decorateClass([
186
+ state()
187
+ ], VerticalContainer.prototype, "selectedComponent", 2);
188
+ __decorateClass([
189
+ state()
190
+ ], VerticalContainer.prototype, "hoveredComponent", 2);
191
+ __decorateClass([
192
+ state()
193
+ ], VerticalContainer.prototype, "wrapperStyle", 2);
194
+ __decorateClass([
195
+ state()
196
+ ], VerticalContainer.prototype, "containerRef", 2);
197
+ __decorateClass([
198
+ state()
199
+ ], VerticalContainer.prototype, "childrenComponents", 2);
200
+ VerticalContainer = __decorateClass([
201
+ customElement("vertical-container-block")
202
+ ], VerticalContainer);
203
+
204
+ export { VerticalContainer };
@@ -0,0 +1,99 @@
1
+ import { html } from 'lit';
2
+ import { property, customElement } from 'lit/decorators.js';
3
+ import { ae as BaseElementBlock } from './BaseElement-wyA58UxT.js';
4
+ import { ref } 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
+ try {
17
+ await import('@nuralyui/datepicker');
18
+ } catch (error) {
19
+ console.warn("[@nuralyui/datepicker] Package not found or failed to load.");
20
+ }
21
+ let DatepickertBlock = class extends BaseElementBlock {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.handleDateChange = (customEvent) => {
25
+ this.executeEvent("onDateChange", customEvent, {
26
+ value: customEvent.detail?.value || customEvent.detail?.date || customEvent.detail
27
+ });
28
+ };
29
+ this.handleRangeChange = (customEvent) => {
30
+ this.executeEvent("onRangeChange", customEvent, {
31
+ startDate: customEvent.detail?.startDate,
32
+ endDate: customEvent.detail?.endDate,
33
+ value: customEvent.detail?.value
34
+ });
35
+ };
36
+ this.handleCalendarOpen = (customEvent) => {
37
+ this.executeEvent("onCalendarOpen", customEvent);
38
+ };
39
+ this.handleCalendarClose = (customEvent) => {
40
+ this.executeEvent("onCalendarClose", customEvent);
41
+ };
42
+ this.handleFocus = (customEvent) => {
43
+ this.executeEvent("onFocus", customEvent);
44
+ };
45
+ this.handleBlur = (customEvent) => {
46
+ this.executeEvent("onBlur", customEvent);
47
+ };
48
+ this.handleValidation = (customEvent) => {
49
+ this.executeEvent("onValidation", customEvent, {
50
+ isValid: customEvent.detail?.isValid,
51
+ message: customEvent.detail?.message
52
+ });
53
+ };
54
+ }
55
+ renderComponent() {
56
+ const datePickerStyles = this.component?.style || {};
57
+ const size = datePickerStyles.size || "medium";
58
+ const variant = datePickerStyles.variant || "default";
59
+ const placement = datePickerStyles.placement || "auto";
60
+ const state = datePickerStyles?.state || "default";
61
+ return html`
62
+ <nr-datepicker
63
+ ${ref(this.inputRef)}
64
+ class="${`drop-${this.component.uuid}`}"
65
+
66
+ .helper=${this.inputHandlersValue.helper || ""}
67
+ .label=${this.inputHandlersValue.label || ""}
68
+ .placeholder=${this.inputHandlersValue.placeholder || ""}
69
+ .locale=${this.inputHandlersValue.locale || "en"}
70
+ .state=${state}
71
+ .size=${this.inputHandlersValue.size ?? size}
72
+ .variant=${variant}
73
+ .placement=${placement}
74
+ ?disabled=${this.inputHandlersValue.disabled ?? false}
75
+ .dateValue=${this.inputHandlersValue.value || ""}
76
+ .fieldFormat=${this.inputHandlersValue.format || "DD/MM/YYYY"}
77
+ ?range=${this.inputHandlersValue.range ?? false}
78
+ .minDate=${this.inputHandlersValue.minDate}
79
+ .maxDate=${this.inputHandlersValue.maxDate}
80
+ ?required=${this.inputHandlersValue.required ?? false}
81
+ @nr-date-change=${this.handleDateChange}
82
+ @nr-range-change=${this.handleRangeChange}
83
+ @nr-calendar-open=${this.handleCalendarOpen}
84
+ @nr-calendar-close=${this.handleCalendarClose}
85
+ @nr-focus=${this.handleFocus}
86
+ @nr-blur=${this.handleBlur}
87
+ @nr-validation=${this.handleValidation}
88
+ ></nr-datepicker>
89
+ `;
90
+ }
91
+ };
92
+ __decorateClass([
93
+ property({ type: Object })
94
+ ], DatepickertBlock.prototype, "component", 2);
95
+ DatepickertBlock = __decorateClass([
96
+ customElement("date-picker-block")
97
+ ], DatepickertBlock);
98
+
99
+ export { DatepickertBlock };
@@ -0,0 +1,80 @@
1
+ import { B as h, n as u, b as o, c as p, t as c } from "./micro-app-entry-BgDXbkmh.js";
2
+ var $ = Object.defineProperty, g = Object.getOwnPropertyDescriptor, d = (e, t, l, n) => {
3
+ for (var a = n > 1 ? void 0 : n ? g(t, l) : t, i = e.length - 1, s; i >= 0; i--)
4
+ (s = e[i]) && (a = (n ? s(t, l, a) : s(a)) || a);
5
+ return n && a && $(t, l, a), a;
6
+ };
7
+ try {
8
+ await import("@nuralyui/datepicker");
9
+ } catch {
10
+ console.warn("[@nuralyui/datepicker] Package not found or failed to load.");
11
+ }
12
+ let r = class extends h {
13
+ constructor() {
14
+ super(...arguments), this.handleDateChange = (e) => {
15
+ this.executeEvent("onDateChange", e, {
16
+ value: e.detail?.value || e.detail?.date || e.detail
17
+ });
18
+ }, this.handleRangeChange = (e) => {
19
+ this.executeEvent("onRangeChange", e, {
20
+ startDate: e.detail?.startDate,
21
+ endDate: e.detail?.endDate,
22
+ value: e.detail?.value
23
+ });
24
+ }, this.handleCalendarOpen = (e) => {
25
+ this.executeEvent("onCalendarOpen", e);
26
+ }, this.handleCalendarClose = (e) => {
27
+ this.executeEvent("onCalendarClose", e);
28
+ }, this.handleFocus = (e) => {
29
+ this.executeEvent("onFocus", e);
30
+ }, this.handleBlur = (e) => {
31
+ this.executeEvent("onBlur", e);
32
+ }, this.handleValidation = (e) => {
33
+ this.executeEvent("onValidation", e, {
34
+ isValid: e.detail?.isValid,
35
+ message: e.detail?.message
36
+ });
37
+ };
38
+ }
39
+ renderComponent() {
40
+ const e = this.component?.style || {}, t = e.size || "medium", l = e.variant || "default", n = e.placement || "auto", a = e?.state || "default";
41
+ return o`
42
+ <nr-datepicker
43
+ ${u(this.inputRef)}
44
+ class="${`drop-${this.component.uuid}`}"
45
+
46
+ .helper=${this.inputHandlersValue.helper || ""}
47
+ .label=${this.inputHandlersValue.label || ""}
48
+ .placeholder=${this.inputHandlersValue.placeholder || ""}
49
+ .locale=${this.inputHandlersValue.locale || "en"}
50
+ .state=${a}
51
+ .size=${this.inputHandlersValue.size ?? t}
52
+ .variant=${l}
53
+ .placement=${n}
54
+ ?disabled=${this.inputHandlersValue.disabled ?? !1}
55
+ .dateValue=${this.inputHandlersValue.value || ""}
56
+ .fieldFormat=${this.inputHandlersValue.format || "DD/MM/YYYY"}
57
+ ?range=${this.inputHandlersValue.range ?? !1}
58
+ .minDate=${this.inputHandlersValue.minDate}
59
+ .maxDate=${this.inputHandlersValue.maxDate}
60
+ ?required=${this.inputHandlersValue.required ?? !1}
61
+ @nr-date-change=${this.handleDateChange}
62
+ @nr-range-change=${this.handleRangeChange}
63
+ @nr-calendar-open=${this.handleCalendarOpen}
64
+ @nr-calendar-close=${this.handleCalendarClose}
65
+ @nr-focus=${this.handleFocus}
66
+ @nr-blur=${this.handleBlur}
67
+ @nr-validation=${this.handleValidation}
68
+ ></nr-datepicker>
69
+ `;
70
+ }
71
+ };
72
+ d([
73
+ p({ type: Object })
74
+ ], r.prototype, "component", 2);
75
+ r = d([
76
+ c("date-picker-block")
77
+ ], r);
78
+ export {
79
+ r as DatepickertBlock
80
+ };