@nuraly/runtime 0.1.8 → 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 (106) hide show
  1. package/dist/AIChat-DP3ZdLL3.js +220 -0
  2. package/dist/AIChat-km1IYaR-.js +260 -0
  3. package/dist/Badge-BR94MUt5.js +48 -0
  4. package/dist/Badge-DzNZFKtC.js +70 -0
  5. package/dist/{BaseElement-BNBn_IJk.js → BaseElement-pS6m_x6Q.js} +153 -24
  6. package/dist/Button-BHAN7npC.js +92 -0
  7. package/dist/Button-DCqgsxrL.js +80 -0
  8. package/dist/Card-B70c8NFb.js +150 -0
  9. package/dist/Card-DhOCsGKC.js +120 -0
  10. package/dist/Checkbox-BZTcPwew.js +59 -0
  11. package/dist/Checkbox-LYTIBAUV.js +65 -0
  12. package/dist/Code-BWbiciC8.js +123 -0
  13. package/dist/Code-Ds0vFclr.js +109 -0
  14. package/dist/{CodeEditor-Bf4L2rO_.js → CodeEditor-ChuFC0ex.js} +22 -22
  15. package/dist/Col-B_wpWUcU.js +217 -0
  16. package/dist/Col-DYs8_65c.js +193 -0
  17. package/dist/Collapse-4kxbQ74u.js +74 -0
  18. package/dist/Collapse-Dkw6Ner6.js +96 -0
  19. package/dist/Collections-BSF-PqBz.js +122 -0
  20. package/dist/Collections-D5rwMFbv.js +151 -0
  21. package/dist/Container-DMNh5U4Y.js +204 -0
  22. package/dist/DatePicker-BmEOONiA.js +99 -0
  23. package/dist/DatePicker-VuUroOT4.js +80 -0
  24. package/dist/Divider-BfxR3rVl.js +86 -0
  25. package/dist/Divider-etMTYU3d.js +106 -0
  26. package/dist/Document-CHBcJciR.js +74 -0
  27. package/dist/Document-Cj-TmjAf.js +90 -0
  28. package/dist/Dropdown-BRtHvDa3.js +133 -0
  29. package/dist/Dropdown-C47Y11dj.js +112 -0
  30. package/dist/EmbedURL-BwbJRnY1.js +142 -0
  31. package/dist/EmbedURL-Ci5X1vQG.js +114 -0
  32. package/dist/FileUpload-BBgPcRag.js +54 -0
  33. package/dist/FileUpload-BgkhxtNe.js +47 -0
  34. package/dist/Form-BLq6U3In.js +339 -0
  35. package/dist/Form-E6zXqgsm.js +286 -0
  36. package/dist/Icon-CcLuhz6B.js +64 -0
  37. package/dist/Icon-_UiLblGb.js +74 -0
  38. package/dist/Image-B_VERIvH.js +111 -0
  39. package/dist/Image-hI8kIx8U.js +93 -0
  40. package/dist/Link-BVTo43Cc.js +76 -0
  41. package/dist/Link-xSrPxOLt.js +95 -0
  42. package/dist/Menu-CembLIjO.js +83 -0
  43. package/dist/Menu-D9ZjIOMg.js +73 -0
  44. package/dist/MicroApp-DI1kQwJk.js +100 -0
  45. package/dist/MicroApp-DJw57sLE.js +75 -0
  46. package/dist/NumberInput-DftAAKEs.js +84 -0
  47. package/dist/NumberInput-eOAk0-fb.js +95 -0
  48. package/dist/Panel-Bso5fv4i.js +127 -0
  49. package/dist/Panel-CwzW9iuA.js +161 -0
  50. package/dist/Radio-button-Sii5iveh.js +71 -0
  51. package/dist/Radio-button-YXsVqipQ.js +53 -0
  52. package/dist/RefComponent-Bwk_I0mK.js +79 -0
  53. package/dist/RefComponent-ZxafRVhZ.js +96 -0
  54. package/dist/RichText-CgYXXC_a.js +485 -0
  55. package/dist/RichText-DV46U7fI.js +449 -0
  56. package/dist/Row-Bb95f5DI.js +229 -0
  57. package/dist/Row-Dmd_61mR.js +202 -0
  58. package/dist/Select-Cma8JHAj.js +77 -0
  59. package/dist/Select-DqA08VYb.js +87 -0
  60. package/dist/Slider-B2_Qecjz.js +74 -0
  61. package/dist/Slider-DVY0N2YX.js +55 -0
  62. package/dist/Table-0WjrBnz-.js +159 -0
  63. package/dist/Table-dEma50kw.js +184 -0
  64. package/dist/Tabs-BDKEv1jn.js +131 -0
  65. package/dist/Tabs-Cvt3Q8vx.js +116 -0
  66. package/dist/Tag-BcZvQkE_.js +47 -0
  67. package/dist/Tag-DMZ0mu8y.js +61 -0
  68. package/dist/TextInput-KI6r9xET.js +193 -0
  69. package/dist/TextInput-hxK-HhJi.js +148 -0
  70. package/dist/TextLabel-DkV26yaL.js +102 -0
  71. package/dist/Textarea-Bzs3jSUm.js +117 -0
  72. package/dist/Textarea-CwK3SYbz.js +83 -0
  73. package/dist/Video-C4uBWCBb.js +100 -0
  74. package/dist/Video-CL1lgcvB.js +120 -0
  75. package/dist/aitchat-DjX5s7_8.js +23 -0
  76. package/dist/colorpicker-B-KETfWw.js +64 -0
  77. package/dist/colorpicker-DhB0AygJ.js +75 -0
  78. package/dist/constants-Bs_KQRi_.js +4 -0
  79. package/dist/constants-CXdpxgF2.js +4 -0
  80. package/dist/{cssMode-DMsdy1N0.js → cssMode-CV7QbFJv.js} +1 -1
  81. package/dist/{freemarker2-D51H9HYi.js → freemarker2-CqQxSEZa.js} +1 -1
  82. package/dist/{handlebars-CF6gdAX4.js → handlebars-a71LdN7X.js} +1 -1
  83. package/dist/{html-c2n_zkM3.js → html-D8UaB7IC.js} +1 -1
  84. package/dist/{htmlMode-9IJTuZUh.js → htmlMode-CqWQMFWX.js} +1 -1
  85. package/dist/iconbutton-DfnrRmmB.js +69 -0
  86. package/dist/iconbutton-DvIQHV8o.js +53 -0
  87. package/dist/{javascript-DhEEBMxD.js → javascript-D_jGqcRD.js} +1 -1
  88. package/dist/{jsonMode-CB6k-4rp.js → jsonMode-C3-m5xts.js} +1 -1
  89. package/dist/{liquid-CwtPiwnW.js → liquid-DLwYj6Te.js} +1 -1
  90. package/dist/{mdx-LewPRYF8.js → mdx-DhYjhxkW.js} +1 -1
  91. package/dist/micro-app-entry-DiNqE6xi.js +12042 -0
  92. package/dist/micro-app.bundle.js +1 -1
  93. package/dist/micro-app.js +6 -4940
  94. package/dist/{python-h5Z2g-yl.js → python-B-WcGqFq.js} +1 -1
  95. package/dist/{razor-D5ep1Doy.js → razor-JGACy1mz.js} +1 -1
  96. package/dist/runtime.js +4 -2
  97. package/dist/{tsMode-B_6LiBE1.js → tsMode-lzBM1oT2.js} +1 -1
  98. package/dist/{typescript-BBG0jH4p.js → typescript-CuL5pdO2.js} +1 -1
  99. package/dist/{xml-DgLB7rE6.js → xml-D1tacAKD.js} +1 -1
  100. package/dist/{yaml-DiI4HpSv.js → yaml-CjPB1g7v.js} +1 -1
  101. package/package.json +4 -1
  102. package/utils/index.ts +4 -1
  103. package/utils/lazy-component-loader.ts +120 -0
  104. package/utils/register-components.ts +14 -40
  105. package/utils/render-util.ts +84 -0
  106. package/dist/micro-app-entry-C3RDIukG.js +0 -15831
@@ -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-pS6m_x6Q.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,204 @@
1
+ import { ae as BaseElementBlock, $ as $components, aM as renderComponent, v as RuntimeHelpers, ap as setContextMenuEvent, ak as setCurrentComponentIdAction } from './BaseElement-pS6m_x6Q.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-pS6m_x6Q.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-DiNqE6xi.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
+ };
@@ -0,0 +1,86 @@
1
+ import { B as c, A as d, n as p, o as v, b as h, i as b, c as u, t as y } from "./micro-app-entry-DiNqE6xi.js";
2
+ var f = Object.defineProperty, H = Object.getOwnPropertyDescriptor, o = (e, a, s, i) => {
3
+ for (var t = i > 1 ? void 0 : i ? H(a, s) : a, n = e.length - 1, r; n >= 0; n--)
4
+ (r = e[n]) && (t = (i ? r(a, s, t) : r(t)) || t);
5
+ return i && t && f(a, s, t), t;
6
+ };
7
+ try {
8
+ await import("@nuralyui/divider");
9
+ } catch {
10
+ console.warn("[@nuralyui/divider] Package not found or failed to load.");
11
+ }
12
+ let l = class extends c {
13
+ connectedCallback() {
14
+ super.connectedCallback(), this.registerCallback("value", () => {
15
+ }), this.updateHostAttribute();
16
+ }
17
+ updated(e) {
18
+ super.updated(e), this.updateHostAttribute();
19
+ }
20
+ updateHostAttribute() {
21
+ const e = this.inputHandlersValue?.direction ?? "horizontal";
22
+ this.setAttribute("data-type", e);
23
+ }
24
+ disconnectedCallback() {
25
+ super.disconnectedCallback(), this.unsubscribe && this.unsubscribe();
26
+ }
27
+ render() {
28
+ const e = this.component?.style || {}, a = this.inputHandlersValue?.width, s = this.inputHandlersValue?.height, i = (this.inputHandlersValue?.direction ?? "horizontal") === "vertical", t = { ...e };
29
+ return i && s && delete t.height, h`
30
+ ${!this.inputHandlersValue?.display || this.inputHandlersValue.display == "show" ? h`
31
+ <nr-divider
32
+ ${p(this.inputRef)}
33
+ style=${v({
34
+ ...t,
35
+ width: a ? "100%" : e.width,
36
+ height: !i && s ? "auto" : t.height
37
+ })}
38
+ type=${this.inputHandlersValue?.direction ?? "horizontal"}
39
+ .variant=${this.inputHandlersValue?.variant || "solid"}
40
+ .orientation=${this.inputHandlersValue?.textOrientation || "center"}
41
+ .orientationMargin=${this.inputHandlersValue?.orientationMargin ?? d}
42
+ .plain=${this.inputHandlersValue?.plain !== !1}
43
+ .size=${this.inputHandlersValue?.size ?? d}
44
+ .dashed=${this.inputHandlersValue?.dashed || !1}
45
+ @click=${(n) => {
46
+ this.executeEvent("onClick", n);
47
+ }}
48
+ >
49
+ ${this.inputHandlersValue?.text || ""}
50
+ </nr-divider>
51
+ ` : d}
52
+ `;
53
+ }
54
+ };
55
+ l.styles = [
56
+ b`
57
+ :host {
58
+ display: block;
59
+ width: 100%;
60
+ }
61
+
62
+ :host([data-type="vertical"]) {
63
+ display: inline-flex;
64
+ width: auto;
65
+ align-self: stretch; /* This makes it fill the parent's height in flexbox */
66
+ }
67
+
68
+ :host([data-type="vertical"]) nr-divider {
69
+ height: 100%;
70
+ display: flex;
71
+ align-items: stretch;
72
+ }
73
+ `
74
+ ];
75
+ o([
76
+ u({ type: Object })
77
+ ], l.prototype, "component", 2);
78
+ o([
79
+ u({ type: Object })
80
+ ], l.prototype, "item", 2);
81
+ l = o([
82
+ y("divider-block")
83
+ ], l);
84
+ export {
85
+ l as DividerBlock
86
+ };