@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.
- package/components/ui/components/base/controllers/InputHandlerController.ts +5 -0
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +1 -7
- package/components/ui/components/inputs/Form/Form.ts +3 -11
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +1 -7
- package/components/ui/components/inputs/Select/Select.ts +1 -7
- package/components/ui/components/layout/Grid/Col.ts +2 -6
- package/components/ui/components/layout/Grid/Row.ts +2 -6
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +4 -16
- package/dist/AIChat-C-wFf4PD.js +220 -0
- package/dist/AIChat-Cly-frW6.js +260 -0
- package/dist/Badge-BUm76SZ2.js +70 -0
- package/dist/Badge-BarGcY8u.js +48 -0
- package/dist/{BaseElement-BNBn_IJk.js → BaseElement-wyA58UxT.js} +156 -24
- package/dist/Button-BEgayuX9.js +80 -0
- package/dist/Button-wgwjzM_f.js +92 -0
- package/dist/Card-B4r5RQgn.js +120 -0
- package/dist/Card-a1sdDpKe.js +150 -0
- package/dist/Checkbox-CC9PkwpC.js +59 -0
- package/dist/Checkbox-WVmAN9ZP.js +65 -0
- package/dist/Code-Dc66ui4C.js +109 -0
- package/dist/Code-kVoVXBbt.js +123 -0
- package/dist/{CodeEditor-B1gNuvPb.js → CodeEditor-2QHTZxKN.js} +22 -22
- package/dist/Col-BKbQ2o0P.js +217 -0
- package/dist/Col-x4rRO4dz.js +193 -0
- package/dist/Collapse-Dd2GfevD.js +74 -0
- package/dist/Collapse-Xo-jb8zs.js +96 -0
- package/dist/Collections-DEqUHWFe.js +151 -0
- package/dist/Collections-DsTr-Zt7.js +122 -0
- package/dist/Container-C1HjQgb7.js +204 -0
- package/dist/DatePicker-DRVwFJmL.js +99 -0
- package/dist/DatePicker-oAOJyU3e.js +80 -0
- package/dist/Divider-BMA6S7Pd.js +106 -0
- package/dist/Divider-zbcO-KF9.js +86 -0
- package/dist/Document-BqVezrmJ.js +90 -0
- package/dist/Document-C2lg-jdj.js +74 -0
- package/dist/Dropdown-BRN-hpgd.js +133 -0
- package/dist/Dropdown-j62nqdd-.js +112 -0
- package/dist/EmbedURL-Bgr2pdf_.js +114 -0
- package/dist/EmbedURL-DFt6rN3J.js +142 -0
- package/dist/FileUpload-B5TBQJPC.js +54 -0
- package/dist/FileUpload-sYxMn9Rj.js +47 -0
- package/dist/Form-7ZWgBVzR.js +286 -0
- package/dist/Form-CsN7UMF-.js +339 -0
- package/dist/Icon-B_2ZWGd0.js +64 -0
- package/dist/Icon-CkLIObME.js +74 -0
- package/dist/Image-CcswllGj.js +93 -0
- package/dist/Image-CihbGdKt.js +111 -0
- package/dist/Link-BEUscah_.js +95 -0
- package/dist/Link-C4HV3i5L.js +76 -0
- package/dist/Menu-B98hcumz.js +83 -0
- package/dist/Menu-BEzo-k-M.js +73 -0
- package/dist/MicroApp-BDPSu_XC.js +75 -0
- package/dist/MicroApp-DCBOKAJ4.js +100 -0
- package/dist/NumberInput-Bbo10XmQ.js +95 -0
- package/dist/NumberInput-YJKsJDcd.js +84 -0
- package/dist/Panel-C1tcqveD.js +161 -0
- package/dist/Panel-DidE5uT5.js +127 -0
- package/dist/Radio-button-CuVS3-fC.js +71 -0
- package/dist/Radio-button-Cxj0bL8i.js +53 -0
- package/dist/RefComponent-BgOcavVg.js +79 -0
- package/dist/RefComponent-DTerPZ8J.js +96 -0
- package/dist/RichText-BiZgSdNO.js +449 -0
- package/dist/RichText-CwMNVuR_.js +485 -0
- package/dist/Row-BEx5bGTR.js +202 -0
- package/dist/Row-XczXHjOV.js +229 -0
- package/dist/Select-Bd16OOiE.js +87 -0
- package/dist/Select-D0xinu-U.js +77 -0
- package/dist/Slider-BVFPWYh3.js +55 -0
- package/dist/Slider-DGulvswN.js +74 -0
- package/dist/Table-C44wa8yn.js +159 -0
- package/dist/Table-CQiS_Q-s.js +184 -0
- package/dist/Tabs-CPQxFISc.js +131 -0
- package/dist/Tabs-DW2Su8xF.js +116 -0
- package/dist/Tag-BEfAQrjG.js +61 -0
- package/dist/Tag-BLxTFDcC.js +47 -0
- package/dist/TextInput-BWhdGS3a.js +148 -0
- package/dist/TextInput-CV850FvO.js +193 -0
- package/dist/TextLabel-CbSGmoVY.js +102 -0
- package/dist/Textarea-Bncyxfts.js +83 -0
- package/dist/Textarea-SEbx4KI5.js +117 -0
- package/dist/Video--shJ014h.js +120 -0
- package/dist/Video-CflXfaiK.js +100 -0
- package/dist/aitchat-Btz9TPEN.js +23 -0
- package/dist/colorpicker-BO_4CeX4.js +64 -0
- package/dist/colorpicker-UzXsx6gP.js +75 -0
- package/dist/constants-Bs_KQRi_.js +4 -0
- package/dist/constants-CXdpxgF2.js +4 -0
- package/dist/{cssMode-D82-gS78.js → cssMode-tpaxIZJS.js} +1 -1
- package/dist/{freemarker2-CYRLpyjt.js → freemarker2-Nx-tkO9y.js} +1 -1
- package/dist/{handlebars-R8Efxi60.js → handlebars-CF3Jmmto.js} +1 -1
- package/dist/{html-czhjovcp.js → html-CdZEJTJR.js} +1 -1
- package/dist/{htmlMode-DpyKDYYs.js → htmlMode-CztruwTl.js} +1 -1
- package/dist/iconbutton-BwuZYQyh.js +53 -0
- package/dist/iconbutton-CE0Vxu1G.js +69 -0
- package/dist/{javascript-DwqkMEdb.js → javascript-CVODTc2t.js} +1 -1
- package/dist/{jsonMode-Cmxxe0W9.js → jsonMode-ChPl6moP.js} +1 -1
- package/dist/{liquid-2spuEcBh.js → liquid-BckHw388.js} +1 -1
- package/dist/{mdx-BjBXyEeR.js → mdx-DB1fiwuN.js} +1 -1
- package/dist/micro-app-entry-BgDXbkmh.js +12042 -0
- package/dist/micro-app.bundle.js +1 -1
- package/dist/micro-app.js +6 -4969
- package/dist/{python-DLI1ji08.js → python-DOQt67t7.js} +1 -1
- package/dist/{razor-oAnIJsrL.js → razor-D65ZeXuP.js} +1 -1
- package/dist/runtime.js +4 -2
- package/dist/{tsMode-D_PMsbjK.js → tsMode-CXrSAnjJ.js} +1 -1
- package/dist/{typescript-Bu3ZbtQI.js → typescript-BuKvlC_a.js} +1 -1
- package/dist/{xml-CNSSkPqy.js → xml-_nj2r-yt.js} +1 -1
- package/dist/{yaml-5RF_PGNe.js → yaml-m8PrW_TL.js} +1 -1
- package/package.json +1 -1
- package/utils/index.ts +4 -1
- package/utils/lazy-component-loader.ts +120 -0
- package/utils/register-components.ts +14 -40
- package/utils/render-util.ts +84 -0
- package/dist/micro-app-entry-DYAnCRDo.js +0 -15860
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { ae as BaseElementBlock, $ as $components, aM as renderComponent, ak as setCurrentComponentIdAction, ap as setContextMenuEvent } from './BaseElement-wyA58UxT.js';
|
|
2
|
+
import { css, nothing, html } from 'lit';
|
|
3
|
+
import { property, state, customElement } from 'lit/decorators.js';
|
|
4
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
6
|
+
import '@nuralyui/grid';
|
|
7
|
+
|
|
8
|
+
const styles = css`
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.grid-row {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-flow: row wrap;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.grid-row.no-wrap {
|
|
22
|
+
flex-wrap: nowrap;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Alignment */
|
|
26
|
+
.grid-row.align-top {
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.grid-row.align-middle {
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.grid-row.align-bottom {
|
|
35
|
+
align-items: flex-end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.grid-row.align-stretch {
|
|
39
|
+
align-items: stretch;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Justify */
|
|
43
|
+
.grid-row.justify-start {
|
|
44
|
+
justify-content: flex-start;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.grid-row.justify-end {
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.grid-row.justify-center {
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.grid-row.justify-space-around {
|
|
56
|
+
justify-content: space-around;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.grid-row.justify-space-between {
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.grid-row.justify-space-evenly {
|
|
64
|
+
justify-content: space-evenly;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.empty-message {
|
|
68
|
+
display: flex;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
align-items: center;
|
|
71
|
+
width: 100%;
|
|
72
|
+
min-height: 100px;
|
|
73
|
+
border: 2px dashed #ccc;
|
|
74
|
+
color: #999;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
position: relative;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
var __defProp = Object.defineProperty;
|
|
81
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
82
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
83
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
84
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
85
|
+
if (decorator = decorators[i])
|
|
86
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
87
|
+
if (kind && result) __defProp(target, key, result);
|
|
88
|
+
return result;
|
|
89
|
+
};
|
|
90
|
+
const ROW_INPUT_PROPS = ["gutter", "align", "justify", "wrap"];
|
|
91
|
+
let GridRow = class extends BaseElementBlock {
|
|
92
|
+
constructor() {
|
|
93
|
+
super(...arguments);
|
|
94
|
+
this.isViewMode = false;
|
|
95
|
+
this.childrenComponents = [];
|
|
96
|
+
this.containerRef = createRef();
|
|
97
|
+
}
|
|
98
|
+
connectedCallback() {
|
|
99
|
+
super.connectedCallback();
|
|
100
|
+
this.updateChildrenComponents();
|
|
101
|
+
ROW_INPUT_PROPS.forEach((prop) => this.registerCallback(prop, () => this.requestUpdate()));
|
|
102
|
+
}
|
|
103
|
+
willUpdate(changedProperties) {
|
|
104
|
+
super.willUpdate(changedProperties);
|
|
105
|
+
if (changedProperties.has("component")) {
|
|
106
|
+
this.updateChildrenComponents();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
updateChildrenComponents() {
|
|
110
|
+
this.childrenComponents = this.component?.childrenIds?.map((id) => {
|
|
111
|
+
return $components.get()[this.component?.application_id]?.find((component) => component.uuid === id);
|
|
112
|
+
}).filter(Boolean) ?? [];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Parse gutter value - supports number, [h, v] array, or responsive object
|
|
116
|
+
*/
|
|
117
|
+
parseGutter(gutter) {
|
|
118
|
+
if (!gutter) return 0;
|
|
119
|
+
if (typeof gutter === "number" || Array.isArray(gutter)) return gutter;
|
|
120
|
+
if (typeof gutter === "string" && !isNaN(Number(gutter))) return Number(gutter);
|
|
121
|
+
return gutter;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get all row properties from input handlers
|
|
125
|
+
*/
|
|
126
|
+
getRowProps() {
|
|
127
|
+
const input = this.inputHandlersValue;
|
|
128
|
+
return {
|
|
129
|
+
gutter: this.parseGutter(input?.gutter),
|
|
130
|
+
align: input?.align || "",
|
|
131
|
+
justify: input?.justify || "",
|
|
132
|
+
wrap: input?.wrap !== false
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Render children components
|
|
137
|
+
*/
|
|
138
|
+
renderChildren() {
|
|
139
|
+
return this.childrenComponents.length ? renderComponent(
|
|
140
|
+
this.childrenComponents.map((component) => ({ ...component, item: this.item })),
|
|
141
|
+
this.item,
|
|
142
|
+
this.isViewMode,
|
|
143
|
+
{ ...this.component, uniqueUUID: this.uniqueUUID }
|
|
144
|
+
) : nothing;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Render empty state placeholder for editor mode
|
|
148
|
+
*/
|
|
149
|
+
renderEmptyState() {
|
|
150
|
+
return html`
|
|
151
|
+
<div
|
|
152
|
+
class="empty-message"
|
|
153
|
+
@click="${() => setCurrentComponentIdAction(this.component?.uuid)}"
|
|
154
|
+
>
|
|
155
|
+
Add Grid Columns (nr-col) to this row
|
|
156
|
+
<drag-wrapper
|
|
157
|
+
.where=${"inside"}
|
|
158
|
+
.message=${"Drop inside"}
|
|
159
|
+
.component=${{ ...this.component }}
|
|
160
|
+
.inputRef=${this.inputRef}
|
|
161
|
+
.isDragInitiator=${this.isDragInitiator}
|
|
162
|
+
>
|
|
163
|
+
</drag-wrapper>
|
|
164
|
+
</div>
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
167
|
+
renderComponent() {
|
|
168
|
+
const props = this.getRowProps();
|
|
169
|
+
if (this.isViewMode) {
|
|
170
|
+
return html`
|
|
171
|
+
<nr-row
|
|
172
|
+
${ref(this.inputRef)}
|
|
173
|
+
data-component-uuid=${this.component?.uuid}
|
|
174
|
+
data-component-name=${this.component?.name}
|
|
175
|
+
style=${styleMap(this.getStyles())}
|
|
176
|
+
.gutter=${props.gutter}
|
|
177
|
+
align=${props.align || nothing}
|
|
178
|
+
justify=${props.justify || nothing}
|
|
179
|
+
?wrap=${props.wrap}
|
|
180
|
+
>
|
|
181
|
+
${this.renderChildren()}
|
|
182
|
+
</nr-row>
|
|
183
|
+
`;
|
|
184
|
+
}
|
|
185
|
+
return html`
|
|
186
|
+
<nr-row
|
|
187
|
+
${ref(this.inputRef)}
|
|
188
|
+
${ref(this.containerRef)}
|
|
189
|
+
data-component-uuid=${this.component?.uuid}
|
|
190
|
+
data-component-name=${this.component?.name}
|
|
191
|
+
@click="${(e) => {
|
|
192
|
+
setContextMenuEvent(null);
|
|
193
|
+
this.executeEvent("onClick", e);
|
|
194
|
+
}}"
|
|
195
|
+
style=${styleMap({
|
|
196
|
+
...this.getStyles(),
|
|
197
|
+
"min-height": this.childrenComponents.length ? "auto" : "100px"
|
|
198
|
+
})}
|
|
199
|
+
.gutter=${props.gutter}
|
|
200
|
+
align=${props.align || nothing}
|
|
201
|
+
justify=${props.justify || nothing}
|
|
202
|
+
?wrap=${props.wrap}
|
|
203
|
+
>
|
|
204
|
+
${this.childrenComponents.length ? this.renderChildren() : this.renderEmptyState()}
|
|
205
|
+
</nr-row>
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
GridRow.styles = styles;
|
|
210
|
+
__decorateClass([
|
|
211
|
+
property({ type: Object })
|
|
212
|
+
], GridRow.prototype, "component", 2);
|
|
213
|
+
__decorateClass([
|
|
214
|
+
property({ type: Object })
|
|
215
|
+
], GridRow.prototype, "item", 2);
|
|
216
|
+
__decorateClass([
|
|
217
|
+
property({ type: Boolean })
|
|
218
|
+
], GridRow.prototype, "isViewMode", 2);
|
|
219
|
+
__decorateClass([
|
|
220
|
+
state()
|
|
221
|
+
], GridRow.prototype, "childrenComponents", 2);
|
|
222
|
+
__decorateClass([
|
|
223
|
+
state()
|
|
224
|
+
], GridRow.prototype, "containerRef", 2);
|
|
225
|
+
GridRow = __decorateClass([
|
|
226
|
+
customElement("grid-row-block")
|
|
227
|
+
], GridRow);
|
|
228
|
+
|
|
229
|
+
export { GridRow };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { nothing, html } 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 { E as EMPTY_STRING } from './constants-Bs_KQRi_.js';
|
|
6
|
+
import { ref } from 'lit/directives/ref.js';
|
|
7
|
+
import '@nuralyui/select';
|
|
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 SelectBlock = class extends BaseElementBlock {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
this.registerCallback("value", (v) => {
|
|
26
|
+
this.requestUpdate();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
renderComponent() {
|
|
30
|
+
return html`
|
|
31
|
+
<nr-select
|
|
32
|
+
${ref(this.inputRef)}
|
|
33
|
+
style=${styleMap({
|
|
34
|
+
...this.getStyles(),
|
|
35
|
+
"--nuraly-select-width": this.getStyles()["--nuraly-select-width"] ?? this.getStyles().width
|
|
36
|
+
})}
|
|
37
|
+
?multiple=${this.inputHandlersValue?.selectionMode === "multiple"}
|
|
38
|
+
?searchable=${this.inputHandlersValue?.searchable ?? false}
|
|
39
|
+
?clearable=${this.inputHandlersValue?.clearable ?? false}
|
|
40
|
+
?required=${this.inputHandlersValue?.required ?? false}
|
|
41
|
+
?block=${this.inputHandlersValue?.block ?? false}
|
|
42
|
+
.options=${this.inputHandlersValue?.options ?? []}
|
|
43
|
+
.value=${this.inputHandlersValue?.value ?? EMPTY_STRING}
|
|
44
|
+
.placeholder=${this.inputHandlersValue?.placeholder || "Select an option"}
|
|
45
|
+
.searchPlaceholder=${this.inputHandlersValue?.searchPlaceholder || "Search options..."}
|
|
46
|
+
.status=${this.inputHandlersValue?.state ?? nothing}
|
|
47
|
+
.size=${this.inputHandlersValue?.size ?? nothing}
|
|
48
|
+
.disabled=${this.inputHandlersValue?.disabled ?? this.inputHandlersValue.state == "disabled"}
|
|
49
|
+
.type=${this.inputHandlersValue?.type || "default"}
|
|
50
|
+
@nr-change=${(e) => {
|
|
51
|
+
this.executeEvent("onChange", e, {
|
|
52
|
+
value: e.detail.value ?? EMPTY_STRING
|
|
53
|
+
});
|
|
54
|
+
}}
|
|
55
|
+
@nr-focus=${(e) => {
|
|
56
|
+
this.executeEvent("onFocus", e);
|
|
57
|
+
}}
|
|
58
|
+
@nr-blur=${(e) => {
|
|
59
|
+
this.executeEvent("onBlur", e);
|
|
60
|
+
}}
|
|
61
|
+
@nr-dropdown-open=${(e) => {
|
|
62
|
+
this.executeEvent("onDropdownOpen", e);
|
|
63
|
+
}}
|
|
64
|
+
@nr-dropdown-close=${(e) => {
|
|
65
|
+
this.executeEvent("onDropdownClose", e);
|
|
66
|
+
}}
|
|
67
|
+
@nr-validation=${(e) => {
|
|
68
|
+
this.executeEvent("onValidation", e, {
|
|
69
|
+
isValid: e.detail.isValid,
|
|
70
|
+
message: e.detail.message
|
|
71
|
+
});
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
<span slot="label">${this.inputHandlersValue.label ?? nothing}</span>
|
|
75
|
+
<span slot="helper-text">${this.inputHandlersValue.helper ?? nothing}</span>
|
|
76
|
+
</nr-select>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
__decorateClass([
|
|
81
|
+
property({ type: Object })
|
|
82
|
+
], SelectBlock.prototype, "component", 2);
|
|
83
|
+
SelectBlock = __decorateClass([
|
|
84
|
+
customElement("select-block")
|
|
85
|
+
], SelectBlock);
|
|
86
|
+
|
|
87
|
+
export { SelectBlock };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { B as c, n as d, o as h, A as a, b as $, c as b, t as v } from "./micro-app-entry-BgDXbkmh.js";
|
|
2
|
+
import { E as o } from "./constants-CXdpxgF2.js";
|
|
3
|
+
import "@nuralyui/select";
|
|
4
|
+
var V = Object.defineProperty, H = Object.getOwnPropertyDescriptor, p = (e, l, n, s) => {
|
|
5
|
+
for (var t = s > 1 ? void 0 : s ? H(l, n) : l, i = e.length - 1, r; i >= 0; i--)
|
|
6
|
+
(r = e[i]) && (t = (s ? r(l, n, t) : r(t)) || t);
|
|
7
|
+
return s && t && V(l, n, t), t;
|
|
8
|
+
};
|
|
9
|
+
let u = class extends c {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
super.connectedCallback(), this.registerCallback("value", (e) => {
|
|
15
|
+
this.requestUpdate();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
renderComponent() {
|
|
19
|
+
return $`
|
|
20
|
+
<nr-select
|
|
21
|
+
${d(this.inputRef)}
|
|
22
|
+
style=${h({
|
|
23
|
+
...this.getStyles(),
|
|
24
|
+
"--nuraly-select-width": this.getStyles()["--nuraly-select-width"] ?? this.getStyles().width
|
|
25
|
+
})}
|
|
26
|
+
?multiple=${this.inputHandlersValue?.selectionMode === "multiple"}
|
|
27
|
+
?searchable=${this.inputHandlersValue?.searchable ?? !1}
|
|
28
|
+
?clearable=${this.inputHandlersValue?.clearable ?? !1}
|
|
29
|
+
?required=${this.inputHandlersValue?.required ?? !1}
|
|
30
|
+
?block=${this.inputHandlersValue?.block ?? !1}
|
|
31
|
+
.options=${this.inputHandlersValue?.options ?? []}
|
|
32
|
+
.value=${this.inputHandlersValue?.value ?? o}
|
|
33
|
+
.placeholder=${this.inputHandlersValue?.placeholder || "Select an option"}
|
|
34
|
+
.searchPlaceholder=${this.inputHandlersValue?.searchPlaceholder || "Search options..."}
|
|
35
|
+
.status=${this.inputHandlersValue?.state ?? a}
|
|
36
|
+
.size=${this.inputHandlersValue?.size ?? a}
|
|
37
|
+
.disabled=${this.inputHandlersValue?.disabled ?? this.inputHandlersValue.state == "disabled"}
|
|
38
|
+
.type=${this.inputHandlersValue?.type || "default"}
|
|
39
|
+
@nr-change=${(e) => {
|
|
40
|
+
this.executeEvent("onChange", e, {
|
|
41
|
+
value: e.detail.value ?? o
|
|
42
|
+
});
|
|
43
|
+
}}
|
|
44
|
+
@nr-focus=${(e) => {
|
|
45
|
+
this.executeEvent("onFocus", e);
|
|
46
|
+
}}
|
|
47
|
+
@nr-blur=${(e) => {
|
|
48
|
+
this.executeEvent("onBlur", e);
|
|
49
|
+
}}
|
|
50
|
+
@nr-dropdown-open=${(e) => {
|
|
51
|
+
this.executeEvent("onDropdownOpen", e);
|
|
52
|
+
}}
|
|
53
|
+
@nr-dropdown-close=${(e) => {
|
|
54
|
+
this.executeEvent("onDropdownClose", e);
|
|
55
|
+
}}
|
|
56
|
+
@nr-validation=${(e) => {
|
|
57
|
+
this.executeEvent("onValidation", e, {
|
|
58
|
+
isValid: e.detail.isValid,
|
|
59
|
+
message: e.detail.message
|
|
60
|
+
});
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<span slot="label">${this.inputHandlersValue.label ?? a}</span>
|
|
64
|
+
<span slot="helper-text">${this.inputHandlersValue.helper ?? a}</span>
|
|
65
|
+
</nr-select>
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
p([
|
|
70
|
+
b({ type: Object })
|
|
71
|
+
], u.prototype, "component", 2);
|
|
72
|
+
u = p([
|
|
73
|
+
v("select-block")
|
|
74
|
+
], u);
|
|
75
|
+
export {
|
|
76
|
+
u as SelectBlock
|
|
77
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { B as m, n as f, o as $, b as w, i as b, c as p, t as y } from "./micro-app-entry-BgDXbkmh.js";
|
|
2
|
+
var H = Object.defineProperty, V = Object.getOwnPropertyDescriptor, u = (s, t, a, n) => {
|
|
3
|
+
for (var e = n > 1 ? void 0 : n ? V(t, a) : t, l = s.length - 1, i; l >= 0; l--)
|
|
4
|
+
(i = s[l]) && (e = (n ? i(t, a, e) : i(e)) || e);
|
|
5
|
+
return n && e && H(t, a, e), e;
|
|
6
|
+
};
|
|
7
|
+
try {
|
|
8
|
+
await import("@nuralyui/slider-input");
|
|
9
|
+
} catch {
|
|
10
|
+
console.warn("[@nuralyui/slider-input] Package not found or failed to load.");
|
|
11
|
+
}
|
|
12
|
+
let r = class extends m {
|
|
13
|
+
renderComponent() {
|
|
14
|
+
const s = this.component?.style || {}, t = this.component?.input?.value?.value ?? this.inputHandlersValue?.value ?? 0, a = this.component?.input?.min?.value ?? this.inputHandlersValue?.min ?? 0, n = this.component?.input?.max?.value ?? this.inputHandlersValue?.max ?? 100, e = this.component?.input?.step?.value ?? this.inputHandlersValue?.step ?? 1, l = this.component?.input?.disabled?.value ?? this.inputHandlersValue?.disabled ?? !1, i = this.component?.input?.vertical?.value ?? this.inputHandlersValue?.vertical ?? !1, c = this.component?.input?.showTooltip?.value ?? this.inputHandlersValue?.showTooltip ?? !0, h = this.component?.input?.showMarks?.value ?? this.inputHandlersValue?.showMarks ?? !1, d = this.component?.input?.range?.value ?? this.inputHandlersValue?.range ?? !1, v = this.inputHandlersValue?.marks;
|
|
15
|
+
return w`
|
|
16
|
+
<nr-slider-input
|
|
17
|
+
${f(this.inputRef)}
|
|
18
|
+
style=${$(s)}
|
|
19
|
+
.value=${t}
|
|
20
|
+
.min=${a}
|
|
21
|
+
.max=${n}
|
|
22
|
+
.step=${e}
|
|
23
|
+
.marks=${v}
|
|
24
|
+
?disabled=${l}
|
|
25
|
+
?vertical=${i}
|
|
26
|
+
?showTooltip=${c}
|
|
27
|
+
?showMarks=${h}
|
|
28
|
+
?range=${d}
|
|
29
|
+
@nr-change=${(o) => {
|
|
30
|
+
this.executeEvent("onChange", o, {
|
|
31
|
+
value: o.detail.value
|
|
32
|
+
});
|
|
33
|
+
}}
|
|
34
|
+
@nr-after-change=${(o) => {
|
|
35
|
+
this.executeEvent("onAfterChange", o, {
|
|
36
|
+
value: o.detail.value
|
|
37
|
+
});
|
|
38
|
+
}}
|
|
39
|
+
></nr-slider-input>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
r.styles = [b``];
|
|
44
|
+
u([
|
|
45
|
+
p({ type: Object })
|
|
46
|
+
], r.prototype, "component", 2);
|
|
47
|
+
u([
|
|
48
|
+
p({ type: Object })
|
|
49
|
+
], r.prototype, "item", 2);
|
|
50
|
+
r = u([
|
|
51
|
+
y("slider-block")
|
|
52
|
+
], r);
|
|
53
|
+
export {
|
|
54
|
+
r as SliderBlock
|
|
55
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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/slider-input');
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.warn("[@nuralyui/slider-input] Package not found or failed to load.");
|
|
21
|
+
}
|
|
22
|
+
let SliderBlock = class extends BaseElementBlock {
|
|
23
|
+
renderComponent() {
|
|
24
|
+
const sliderStyles = this.component?.style || {};
|
|
25
|
+
const value = this.component?.input?.value?.value ?? this.inputHandlersValue?.value ?? 0;
|
|
26
|
+
const min = this.component?.input?.min?.value ?? this.inputHandlersValue?.min ?? 0;
|
|
27
|
+
const max = this.component?.input?.max?.value ?? this.inputHandlersValue?.max ?? 100;
|
|
28
|
+
const step = this.component?.input?.step?.value ?? this.inputHandlersValue?.step ?? 1;
|
|
29
|
+
const disabled = this.component?.input?.disabled?.value ?? this.inputHandlersValue?.disabled ?? false;
|
|
30
|
+
const vertical = this.component?.input?.vertical?.value ?? this.inputHandlersValue?.vertical ?? false;
|
|
31
|
+
const showTooltip = this.component?.input?.showTooltip?.value ?? this.inputHandlersValue?.showTooltip ?? true;
|
|
32
|
+
const showMarks = this.component?.input?.showMarks?.value ?? this.inputHandlersValue?.showMarks ?? false;
|
|
33
|
+
const range = this.component?.input?.range?.value ?? this.inputHandlersValue?.range ?? false;
|
|
34
|
+
const marks = this.inputHandlersValue?.marks;
|
|
35
|
+
return html`
|
|
36
|
+
<nr-slider-input
|
|
37
|
+
${ref(this.inputRef)}
|
|
38
|
+
style=${styleMap(sliderStyles)}
|
|
39
|
+
.value=${value}
|
|
40
|
+
.min=${min}
|
|
41
|
+
.max=${max}
|
|
42
|
+
.step=${step}
|
|
43
|
+
.marks=${marks}
|
|
44
|
+
?disabled=${disabled}
|
|
45
|
+
?vertical=${vertical}
|
|
46
|
+
?showTooltip=${showTooltip}
|
|
47
|
+
?showMarks=${showMarks}
|
|
48
|
+
?range=${range}
|
|
49
|
+
@nr-change=${(e) => {
|
|
50
|
+
this.executeEvent("onChange", e, {
|
|
51
|
+
value: e.detail.value
|
|
52
|
+
});
|
|
53
|
+
}}
|
|
54
|
+
@nr-after-change=${(e) => {
|
|
55
|
+
this.executeEvent("onAfterChange", e, {
|
|
56
|
+
value: e.detail.value
|
|
57
|
+
});
|
|
58
|
+
}}
|
|
59
|
+
></nr-slider-input>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
SliderBlock.styles = [css``];
|
|
64
|
+
__decorateClass([
|
|
65
|
+
property({ type: Object })
|
|
66
|
+
], SliderBlock.prototype, "component", 2);
|
|
67
|
+
__decorateClass([
|
|
68
|
+
property({ type: Object })
|
|
69
|
+
], SliderBlock.prototype, "item", 2);
|
|
70
|
+
SliderBlock = __decorateClass([
|
|
71
|
+
customElement("slider-block")
|
|
72
|
+
], SliderBlock);
|
|
73
|
+
|
|
74
|
+
export { SliderBlock };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { B as H, n as x, o as $, A as p, b as C, i as w, c as u, d as c, t as v } from "./micro-app-entry-BgDXbkmh.js";
|
|
2
|
+
var O = Object.defineProperty, D = Object.getOwnPropertyDescriptor, d = (t, s, l, i) => {
|
|
3
|
+
for (var e = i > 1 ? void 0 : i ? D(s, l) : s, o = t.length - 1, r; o >= 0; o--)
|
|
4
|
+
(r = t[o]) && (e = (i ? r(s, l, e) : r(e)) || e);
|
|
5
|
+
return i && e && O(s, l, e), e;
|
|
6
|
+
};
|
|
7
|
+
try {
|
|
8
|
+
await import("@nuralyui/table");
|
|
9
|
+
} catch {
|
|
10
|
+
console.warn("[@nuralyui/table] Package not found or failed to load.");
|
|
11
|
+
}
|
|
12
|
+
let n = class extends H {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.headers = [
|
|
15
|
+
{
|
|
16
|
+
name: "Id",
|
|
17
|
+
key: "id"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "Status",
|
|
21
|
+
key: "status"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Priority",
|
|
25
|
+
key: "priority"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "Title",
|
|
29
|
+
key: "title"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "Assignee",
|
|
33
|
+
key: "assignee"
|
|
34
|
+
}
|
|
35
|
+
], this.rows = [
|
|
36
|
+
{
|
|
37
|
+
id: 1,
|
|
38
|
+
status: "Open",
|
|
39
|
+
priority: "Normal",
|
|
40
|
+
title: "Product Details Page - Variant Component (1)",
|
|
41
|
+
assignee: "William Jones"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 2,
|
|
45
|
+
status: "Open",
|
|
46
|
+
priority: "High",
|
|
47
|
+
title: "Product Details Page - Variant Component (2)",
|
|
48
|
+
assignee: "Natalia Hayward"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 3,
|
|
52
|
+
status: "Closed",
|
|
53
|
+
priority: "Normal",
|
|
54
|
+
title: "Product Details Page - Variant Component (3)",
|
|
55
|
+
assignee: "Jess Plant"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 4,
|
|
59
|
+
status: "Open",
|
|
60
|
+
priority: "Normal",
|
|
61
|
+
title: "Product Details Page - Variant Component (4)",
|
|
62
|
+
assignee: "William Jones"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 5,
|
|
66
|
+
status: "Open",
|
|
67
|
+
priority: "Normal",
|
|
68
|
+
title: "Product Details Page - Variant Component (5)",
|
|
69
|
+
assignee: "Kathleen Knowles"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 6,
|
|
73
|
+
status: "Open",
|
|
74
|
+
priority: "High",
|
|
75
|
+
title: "Product Details Page - Variant Component (6)",
|
|
76
|
+
assignee: "Mel Young"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 7,
|
|
80
|
+
status: "Closed",
|
|
81
|
+
priority: "Normal",
|
|
82
|
+
title: "Product Details Page - Variant Component (7)",
|
|
83
|
+
assignee: "Zahid Allison"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 8,
|
|
87
|
+
status: "Closed",
|
|
88
|
+
priority: "High",
|
|
89
|
+
title: "Product Details Page - Variant Component (8)",
|
|
90
|
+
assignee: "William Jones"
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
disconnectedCallback() {
|
|
95
|
+
super.disconnectedCallback(), this.unsubscribe && this.unsubscribe();
|
|
96
|
+
}
|
|
97
|
+
renderComponent() {
|
|
98
|
+
const t = this.component?.style || {}, s = this.inputHandlersValue?.width;
|
|
99
|
+
this.inputHandlersValue?.height;
|
|
100
|
+
const l = this.inputHandlersValue?.data ? this.inputHandlersValue?.data?.headers : this.headers, i = this.inputHandlersValue?.data ? this.inputHandlersValue?.data?.rows : this.rows, e = t.size || "normal", o = this.component?.input?.selectionMode?.value || this.inputHandlersValue?.selectionMode, r = o === "multiple" ? "multiple" : o === "single" ? "single" : void 0, h = this.inputHandlersValue?.filter, m = this.inputHandlersValue?.fixedHeader ?? !1, g = this.inputHandlersValue?.loading ?? !1, y = this.inputHandlersValue?.expandable ?? !1, P = this.inputHandlersValue?.emptyText ?? "No data available", V = this.inputHandlersValue?.emptyIcon, f = this.inputHandlersValue?.expansionRenderer, b = this.inputHandlersValue?.scrollConfig;
|
|
101
|
+
return C`
|
|
102
|
+
<nr-table
|
|
103
|
+
${x(this.inputRef)}
|
|
104
|
+
style=${$({
|
|
105
|
+
...t,
|
|
106
|
+
width: s ? "auto" : t.width,
|
|
107
|
+
overflow: "auto"
|
|
108
|
+
})}
|
|
109
|
+
.headers="${l}"
|
|
110
|
+
.rows="${i}"
|
|
111
|
+
.size=${e}
|
|
112
|
+
.withFilter=${h === "filter"}
|
|
113
|
+
.expandable=${y ?? p}
|
|
114
|
+
.expansionRenderer=${f ?? p}
|
|
115
|
+
.selectionMode=${r}
|
|
116
|
+
.fixedHeader=${m}
|
|
117
|
+
.scrollConfig=${b ?? p}
|
|
118
|
+
.loading=${g}
|
|
119
|
+
.emptyText=${P}
|
|
120
|
+
.emptyIcon=${V ?? p}
|
|
121
|
+
@onPaginate=${(a) => {
|
|
122
|
+
this.executeEvent("onPaginate", a);
|
|
123
|
+
}}
|
|
124
|
+
@nr-select=${(a) => {
|
|
125
|
+
this.executeEvent("onSelect", a);
|
|
126
|
+
}}
|
|
127
|
+
@onSearch=${(a) => {
|
|
128
|
+
this.executeEvent("onSearch", a);
|
|
129
|
+
}}
|
|
130
|
+
@onSort=${(a) => {
|
|
131
|
+
this.executeEvent("onSort", a);
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
</nr-table>
|
|
135
|
+
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
n.styles = [
|
|
140
|
+
w``
|
|
141
|
+
];
|
|
142
|
+
d([
|
|
143
|
+
u({ type: Object })
|
|
144
|
+
], n.prototype, "component", 2);
|
|
145
|
+
d([
|
|
146
|
+
u({ type: Object })
|
|
147
|
+
], n.prototype, "item", 2);
|
|
148
|
+
d([
|
|
149
|
+
c()
|
|
150
|
+
], n.prototype, "headers", 2);
|
|
151
|
+
d([
|
|
152
|
+
c()
|
|
153
|
+
], n.prototype, "rows", 2);
|
|
154
|
+
n = d([
|
|
155
|
+
v("table-block")
|
|
156
|
+
], n);
|
|
157
|
+
export {
|
|
158
|
+
n as TextInputBlock
|
|
159
|
+
};
|