nexus-admin 1.0.1
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/USER-GUIDE.md +166 -0
- package/dist/index.cjs +3000 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +975 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1010 -0
- package/dist/index.d.ts +1010 -0
- package/dist/index.js +2854 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3000 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Link = require('next/link');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var google = require('next/font/google');
|
|
7
|
+
var Script = require('next/script');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
14
|
+
|
|
15
|
+
// src/api-services/preference-service.tsx
|
|
16
|
+
var CreateUpdatePreference = async (target, key, value) => {
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// src/interfaces/icon-interfaces.tsx
|
|
20
|
+
var DEFAULT_ICON_ELEMENT_NAME = "ion-icon";
|
|
21
|
+
var DEFAULT_SMALL_ICON_BOX_SIZE = 1 / 1.25;
|
|
22
|
+
var EIconTypes = /* @__PURE__ */ ((EIconTypes2) => {
|
|
23
|
+
EIconTypes2["OUTLINED"] = "-outline";
|
|
24
|
+
EIconTypes2["SHARP"] = "-sharp";
|
|
25
|
+
EIconTypes2["FILLED"] = "";
|
|
26
|
+
return EIconTypes2;
|
|
27
|
+
})(EIconTypes || {});
|
|
28
|
+
var EIcons = /* @__PURE__ */ ((EIcons2) => {
|
|
29
|
+
EIcons2["COPYRIGHT"] = "copyright";
|
|
30
|
+
EIcons2["WOMAN"] = "woman";
|
|
31
|
+
EIcons2["MAN"] = "man";
|
|
32
|
+
EIcons2["AT"] = "at";
|
|
33
|
+
EIcons2["BRIEFCASE"] = "briefcase";
|
|
34
|
+
EIcons2["LOCK_CLOSED"] = "lock-closed";
|
|
35
|
+
EIcons2["BOOKMARK"] = "bookmark";
|
|
36
|
+
EIcons2["CODE_WORKING"] = "code-working";
|
|
37
|
+
EIcons2["BOOKMARKS"] = "bookmarks";
|
|
38
|
+
EIcons2["READER"] = "reader";
|
|
39
|
+
EIcons2["SHARE_SOCIAL"] = "share-social";
|
|
40
|
+
EIcons2["ALERT_CIRCLE"] = "alert-circle";
|
|
41
|
+
EIcons2["SEND"] = "send";
|
|
42
|
+
EIcons2["FOOTBALL"] = "football";
|
|
43
|
+
EIcons2["BALLOON"] = "balloon";
|
|
44
|
+
EIcons2["SCHOOL"] = "school";
|
|
45
|
+
EIcons2["WALK"] = "walk";
|
|
46
|
+
EIcons2["GAME_CONTROLLER"] = "game-controller";
|
|
47
|
+
EIcons2["WATER"] = "water";
|
|
48
|
+
EIcons2["NOTIFICATIONS"] = "notifications";
|
|
49
|
+
EIcons2["LANGUAGE"] = "language";
|
|
50
|
+
EIcons2["CUBE"] = "cube";
|
|
51
|
+
EIcons2["FLAME"] = "flame";
|
|
52
|
+
EIcons2["BED"] = "bed";
|
|
53
|
+
EIcons2["DOCUMENT"] = "document";
|
|
54
|
+
EIcons2["START"] = "star";
|
|
55
|
+
EIcons2["CALENDAR"] = "calendar";
|
|
56
|
+
EIcons2["START_HALF"] = "star-half";
|
|
57
|
+
EIcons2["PEOPLE"] = "people";
|
|
58
|
+
EIcons2["MEGAPHONE"] = "megaphone";
|
|
59
|
+
EIcons2["SETTINGS"] = "settings";
|
|
60
|
+
EIcons2["PERSON_ADD"] = "person-add";
|
|
61
|
+
EIcons2["ANALYTICS"] = "analytics";
|
|
62
|
+
EIcons2["HOURGLASS"] = "hourglass";
|
|
63
|
+
EIcons2["STATS_CHART"] = "stats-chart";
|
|
64
|
+
EIcons2["GRID"] = "grid";
|
|
65
|
+
EIcons2["HEART"] = "heart";
|
|
66
|
+
EIcons2["CART"] = "cart";
|
|
67
|
+
EIcons2["REPEAT"] = "repeat";
|
|
68
|
+
EIcons2["HOME"] = "home";
|
|
69
|
+
EIcons2["WALLET"] = "wallet";
|
|
70
|
+
EIcons2["RELOAD"] = "reload";
|
|
71
|
+
EIcons2["CASH"] = "cash";
|
|
72
|
+
EIcons2["IMAGES"] = "images";
|
|
73
|
+
EIcons2["IMAGE"] = "image";
|
|
74
|
+
EIcons2["LOCK_OPEN"] = "lock-open";
|
|
75
|
+
EIcons2["CHATBOT_ELLIPSES"] = "chatbox-ellipses";
|
|
76
|
+
EIcons2["LOCATION"] = "location";
|
|
77
|
+
EIcons2["BUSINESS"] = "business";
|
|
78
|
+
EIcons2["CONSTRUCT"] = "construct";
|
|
79
|
+
EIcons2["CALENDER_NUMBER"] = "calendar-number";
|
|
80
|
+
EIcons2["HEART_CIRCLE"] = "heart-circle";
|
|
81
|
+
EIcons2["PERSON"] = "person";
|
|
82
|
+
EIcons2["CALL"] = "call";
|
|
83
|
+
EIcons2["FLAG"] = "flag";
|
|
84
|
+
EIcons2["TRANSGENDER"] = "transgender";
|
|
85
|
+
EIcons2["CARD"] = "card";
|
|
86
|
+
EIcons2["ID_CARD"] = "id-card";
|
|
87
|
+
EIcons2["MAIL"] = "mail";
|
|
88
|
+
EIcons2["MAIL_UNREAD"] = "mail-unread";
|
|
89
|
+
EIcons2["KEY"] = "key";
|
|
90
|
+
EIcons2["CREATE"] = "create";
|
|
91
|
+
EIcons2["MENU"] = "menu";
|
|
92
|
+
EIcons2["ARCHIVE"] = "archive";
|
|
93
|
+
EIcons2["ELLIPSIS_HORIZONTAL"] = "ellipsis-horizontal";
|
|
94
|
+
EIcons2["CHEVRON_DOWN"] = "chevron-down";
|
|
95
|
+
EIcons2["ARROW_FORWARD"] = "arrow-forward";
|
|
96
|
+
EIcons2["CHECKMARK_DOUBLE"] = "checkmark-done";
|
|
97
|
+
EIcons2["CLOSE"] = "close";
|
|
98
|
+
EIcons2["WARNING"] = "warning";
|
|
99
|
+
EIcons2["INFORMATION"] = "information";
|
|
100
|
+
EIcons2["HELP"] = "help";
|
|
101
|
+
EIcons2["HELP_CIRCLE"] = "help-circle";
|
|
102
|
+
EIcons2["TRASH_BIN"] = "trash-bin";
|
|
103
|
+
EIcons2["CLOUD_DOWNLOAD"] = "cloud-download";
|
|
104
|
+
EIcons2["CLOUD_UPLOAD"] = "cloud-upload";
|
|
105
|
+
EIcons2["EXIT"] = "exit";
|
|
106
|
+
EIcons2["CAMERA"] = "camera";
|
|
107
|
+
EIcons2["SUNNY"] = "sunny";
|
|
108
|
+
EIcons2["MOON"] = "moon";
|
|
109
|
+
EIcons2["COLOR_PALETTE"] = "color-palette";
|
|
110
|
+
EIcons2["RESIZE"] = "resize";
|
|
111
|
+
EIcons2["EXPAND"] = "expand";
|
|
112
|
+
EIcons2["REMOVE"] = "remove";
|
|
113
|
+
EIcons2["EYE"] = "eye";
|
|
114
|
+
EIcons2["OPTIONS"] = "options";
|
|
115
|
+
EIcons2["SEARCH"] = "search";
|
|
116
|
+
EIcons2["LIST"] = "list";
|
|
117
|
+
EIcons2["TRASH"] = "trash";
|
|
118
|
+
EIcons2["ADD"] = "add";
|
|
119
|
+
EIcons2["ADD_CIRCLE"] = "add-circle";
|
|
120
|
+
EIcons2["CARET_DOWN"] = "caret-down";
|
|
121
|
+
EIcons2["CARET_UP"] = "caret-up";
|
|
122
|
+
EIcons2["FUNNEL"] = "funnel";
|
|
123
|
+
EIcons2["BARBELL"] = "barbell";
|
|
124
|
+
EIcons2["DESKTOP"] = "desktop";
|
|
125
|
+
EIcons2["BUILD"] = "build";
|
|
126
|
+
EIcons2["BULB"] = "bulb";
|
|
127
|
+
EIcons2["NEWSPAPER"] = "newspaper";
|
|
128
|
+
EIcons2["CODE_SLASH"] = "code-slash";
|
|
129
|
+
EIcons2["GLOBE"] = "globe";
|
|
130
|
+
EIcons2["LEAF"] = "leaf";
|
|
131
|
+
EIcons2["REFRESH"] = "refresh";
|
|
132
|
+
EIcons2["LOGIN"] = "log-in";
|
|
133
|
+
EIcons2["SAVE"] = "save";
|
|
134
|
+
EIcons2["STOREFRONT"] = "storefront";
|
|
135
|
+
EIcons2["TEXT"] = "text";
|
|
136
|
+
EIcons2["LOGO_GOOGLE"] = "logo-google";
|
|
137
|
+
EIcons2["LOGO_FACEBOOK"] = "logo-facebook";
|
|
138
|
+
EIcons2["LOGO_INSTAGRAM"] = "logo-instagram";
|
|
139
|
+
EIcons2["LOGO_TIKTOK"] = "logo-tiktok";
|
|
140
|
+
EIcons2["LOGO_LINKEDIN"] = "logo-linkedin";
|
|
141
|
+
EIcons2["LOGO_GITHUB"] = "logo-github";
|
|
142
|
+
EIcons2["LOGO_TWITTER"] = "logo-twitter";
|
|
143
|
+
EIcons2["LOGO_WHATSAPP"] = "logo-whatsapp";
|
|
144
|
+
EIcons2["LOGO_YOUTUBE"] = "logo-youtube";
|
|
145
|
+
return EIcons2;
|
|
146
|
+
})(EIcons || {});
|
|
147
|
+
|
|
148
|
+
// src/interfaces/menu-interfaces.tsx
|
|
149
|
+
var UTILITIES_BUTTON_PREFIX = "btn-utility-";
|
|
150
|
+
var GetUtilityMenuCode = (utilityCode) => `${UTILITIES_BUTTON_PREFIX}${utilityCode}`;
|
|
151
|
+
var EMenuTargets = /* @__PURE__ */ ((EMenuTargets2) => {
|
|
152
|
+
EMenuTargets2[EMenuTargets2["ClientModule"] = 1] = "ClientModule";
|
|
153
|
+
EMenuTargets2[EMenuTargets2["PublicAdminModule"] = 2] = "PublicAdminModule";
|
|
154
|
+
EMenuTargets2[EMenuTargets2["AdminModule"] = 4] = "AdminModule";
|
|
155
|
+
return EMenuTargets2;
|
|
156
|
+
})(EMenuTargets || {});
|
|
157
|
+
var EMenuVisibility = /* @__PURE__ */ ((EMenuVisibility2) => {
|
|
158
|
+
EMenuVisibility2[EMenuVisibility2["GuestOnly"] = 1] = "GuestOnly";
|
|
159
|
+
EMenuVisibility2[EMenuVisibility2["AuthenticatedOnly"] = 2] = "AuthenticatedOnly";
|
|
160
|
+
return EMenuVisibility2;
|
|
161
|
+
})(EMenuVisibility || {});
|
|
162
|
+
|
|
163
|
+
// src/api-services/system-service.tsx
|
|
164
|
+
var GetClientMenus = async () => {
|
|
165
|
+
return [
|
|
166
|
+
{
|
|
167
|
+
id: 1,
|
|
168
|
+
menuCode: "home",
|
|
169
|
+
menuIcon: "home" /* HOME */,
|
|
170
|
+
menuName: "Home",
|
|
171
|
+
menuUrl: "/home",
|
|
172
|
+
documentTitle: "Home Page",
|
|
173
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
174
|
+
displayOrder: 1,
|
|
175
|
+
pageTitle: "Home Page",
|
|
176
|
+
breadcrumbTitle: "Home"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 2,
|
|
180
|
+
menuCode: "about-me",
|
|
181
|
+
menuIcon: "person" /* PERSON */,
|
|
182
|
+
menuName: "About Me",
|
|
183
|
+
menuUrl: "/about-me",
|
|
184
|
+
documentTitle: "About Me",
|
|
185
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
186
|
+
displayOrder: 2,
|
|
187
|
+
pageTitle: "About Me",
|
|
188
|
+
breadcrumbTitle: "About Me"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 3,
|
|
192
|
+
menuCode: "about-us",
|
|
193
|
+
menuIcon: "person" /* PERSON */,
|
|
194
|
+
menuName: "About Us",
|
|
195
|
+
menuUrl: "/about-us",
|
|
196
|
+
documentTitle: "About Us",
|
|
197
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
198
|
+
displayOrder: 2,
|
|
199
|
+
pageTitle: "About Us",
|
|
200
|
+
breadcrumbTitle: "About Us"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: 4,
|
|
204
|
+
menuCode: "my-projects",
|
|
205
|
+
menuIcon: "briefcase" /* BRIEFCASE */,
|
|
206
|
+
menuName: "My Projects",
|
|
207
|
+
menuUrl: "/my-projects",
|
|
208
|
+
documentTitle: "My Projects",
|
|
209
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
210
|
+
displayOrder: 3,
|
|
211
|
+
pageTitle: "My Projects",
|
|
212
|
+
breadcrumbTitle: "My Projects"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: 5,
|
|
216
|
+
menuCode: "products",
|
|
217
|
+
menuIcon: "cube" /* CUBE */,
|
|
218
|
+
menuName: "My Products",
|
|
219
|
+
menuUrl: "/products",
|
|
220
|
+
documentTitle: "My Products",
|
|
221
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
222
|
+
displayOrder: 4,
|
|
223
|
+
pageTitle: "My Products",
|
|
224
|
+
breadcrumbTitle: "My Products"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: 6,
|
|
228
|
+
menuCode: "products",
|
|
229
|
+
menuIcon: "cube" /* CUBE */,
|
|
230
|
+
menuName: "Our Products",
|
|
231
|
+
menuUrl: "/our-products",
|
|
232
|
+
documentTitle: "Our Products",
|
|
233
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
234
|
+
displayOrder: 4,
|
|
235
|
+
pageTitle: "Our Products",
|
|
236
|
+
breadcrumbTitle: "Our Products"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: 7,
|
|
240
|
+
menuCode: "blog",
|
|
241
|
+
menuIcon: "newspaper" /* NEWSPAPER */,
|
|
242
|
+
menuName: "Blog",
|
|
243
|
+
menuUrl: "/blog",
|
|
244
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
245
|
+
displayOrder: 5,
|
|
246
|
+
pageTitle: "Blog",
|
|
247
|
+
breadcrumbTitle: "Blog",
|
|
248
|
+
documentTitle: "Blog"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: 8,
|
|
252
|
+
menuCode: "portfolio-gallery",
|
|
253
|
+
menuIcon: "images" /* IMAGES */,
|
|
254
|
+
menuName: "Portfolio Gallery",
|
|
255
|
+
menuUrl: "/portfolio-gallery",
|
|
256
|
+
documentTitle: "Portfolio Gallery",
|
|
257
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
258
|
+
displayOrder: 6,
|
|
259
|
+
pageTitle: "Portfolio Gallery",
|
|
260
|
+
breadcrumbTitle: "Portfolio Gallery"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: 9,
|
|
264
|
+
menuCode: "our-gallery",
|
|
265
|
+
menuIcon: "images" /* IMAGES */,
|
|
266
|
+
menuName: "Our Gallery",
|
|
267
|
+
menuUrl: "/our-gallery",
|
|
268
|
+
documentTitle: "Our Gallery",
|
|
269
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
270
|
+
displayOrder: 6,
|
|
271
|
+
pageTitle: "Our Gallery",
|
|
272
|
+
breadcrumbTitle: "Our Gallery"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: 10,
|
|
276
|
+
menuCode: "services",
|
|
277
|
+
menuIcon: "construct" /* CONSTRUCT */,
|
|
278
|
+
menuName: "Services",
|
|
279
|
+
menuUrl: "/services",
|
|
280
|
+
documentTitle: "Services",
|
|
281
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
282
|
+
displayOrder: 7,
|
|
283
|
+
pageTitle: "Services",
|
|
284
|
+
breadcrumbTitle: "Services"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: 11,
|
|
288
|
+
menuCode: "faq",
|
|
289
|
+
menuIcon: "help-circle" /* HELP_CIRCLE */,
|
|
290
|
+
menuName: "FAQ",
|
|
291
|
+
menuUrl: "/faq",
|
|
292
|
+
documentTitle: "FAQ",
|
|
293
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
294
|
+
displayOrder: 8,
|
|
295
|
+
pageTitle: "FAQ",
|
|
296
|
+
breadcrumbTitle: "FAQ"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: 12,
|
|
300
|
+
menuCode: "contact-me",
|
|
301
|
+
menuIcon: "call" /* CALL */,
|
|
302
|
+
menuName: "Contact Me",
|
|
303
|
+
menuUrl: "/contact-me",
|
|
304
|
+
documentTitle: "Contact Me",
|
|
305
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
306
|
+
displayOrder: 9,
|
|
307
|
+
pageTitle: "Contact Me",
|
|
308
|
+
breadcrumbTitle: "Contact Me"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: 13,
|
|
312
|
+
menuCode: "contact-us",
|
|
313
|
+
menuIcon: "call" /* CALL */,
|
|
314
|
+
menuName: "Contact Us",
|
|
315
|
+
menuUrl: "/contact-us",
|
|
316
|
+
documentTitle: "Contact Us",
|
|
317
|
+
menuVisibilities: 1 /* GuestOnly */ | 2 /* AuthenticatedOnly */,
|
|
318
|
+
displayOrder: 9,
|
|
319
|
+
pageTitle: "Contact Us",
|
|
320
|
+
breadcrumbTitle: "Contact Us"
|
|
321
|
+
}
|
|
322
|
+
];
|
|
323
|
+
};
|
|
324
|
+
var GetUtilityMenus = async () => {
|
|
325
|
+
return [
|
|
326
|
+
{
|
|
327
|
+
id: 1,
|
|
328
|
+
menuCode: "root-search",
|
|
329
|
+
menuIcon: "search" /* SEARCH */,
|
|
330
|
+
menuName: "Search",
|
|
331
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
332
|
+
displayOrder: 1
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: 2,
|
|
336
|
+
menuCode: "favorite-menu",
|
|
337
|
+
menuIcon: "heart" /* HEART */,
|
|
338
|
+
menuName: "Favorite",
|
|
339
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
340
|
+
displayOrder: 2
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: 3,
|
|
344
|
+
menuCode: "cart-menu",
|
|
345
|
+
menuIcon: "cart" /* CART */,
|
|
346
|
+
menuName: "Cart",
|
|
347
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
348
|
+
displayOrder: 3
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: 4,
|
|
352
|
+
menuCode: "switch-theme",
|
|
353
|
+
menuIcon: "color-palette" /* COLOR_PALETTE */,
|
|
354
|
+
menuName: "Theme",
|
|
355
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
356
|
+
displayOrder: 4
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: 5,
|
|
360
|
+
menuCode: "mega-menu",
|
|
361
|
+
menuIcon: "grid" /* GRID */,
|
|
362
|
+
menuName: "Mega Menu",
|
|
363
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
364
|
+
displayOrder: 5
|
|
365
|
+
}
|
|
366
|
+
];
|
|
367
|
+
};
|
|
368
|
+
var GetUserPanels = async () => {
|
|
369
|
+
return [
|
|
370
|
+
{
|
|
371
|
+
id: 1,
|
|
372
|
+
menuCode: "message-menu",
|
|
373
|
+
menuIcon: "mail" /* MAIL */,
|
|
374
|
+
menuName: "Messages",
|
|
375
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
376
|
+
displayOrder: 1,
|
|
377
|
+
groupOrder: 1
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: 2,
|
|
381
|
+
menuCode: "notification-menu",
|
|
382
|
+
menuIcon: "notifications" /* NOTIFICATIONS */,
|
|
383
|
+
menuName: "Notifications",
|
|
384
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
385
|
+
displayOrder: 2,
|
|
386
|
+
groupOrder: 1
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: 3,
|
|
390
|
+
menuCode: "switch-theme",
|
|
391
|
+
menuIcon: "color-palette" /* COLOR_PALETTE */,
|
|
392
|
+
menuName: "Theme Mode",
|
|
393
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
394
|
+
displayOrder: 2,
|
|
395
|
+
groupOrder: 2
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: 4,
|
|
399
|
+
menuCode: "language",
|
|
400
|
+
menuIcon: "language" /* LANGUAGE */,
|
|
401
|
+
menuName: "Language",
|
|
402
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
403
|
+
displayOrder: 2,
|
|
404
|
+
groupOrder: 2
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: 5,
|
|
408
|
+
menuCode: "currency",
|
|
409
|
+
menuIcon: "cash" /* CASH */,
|
|
410
|
+
menuName: "Currency Format",
|
|
411
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
412
|
+
displayOrder: 2,
|
|
413
|
+
groupOrder: 2
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
id: 6,
|
|
417
|
+
menuCode: "calendar-date",
|
|
418
|
+
menuIcon: "calendar" /* CALENDAR */,
|
|
419
|
+
menuName: "Calendar Date",
|
|
420
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
421
|
+
displayOrder: 2,
|
|
422
|
+
groupOrder: 2
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
id: 7,
|
|
426
|
+
menuCode: "help-support",
|
|
427
|
+
menuIcon: "help-circle" /* HELP_CIRCLE */,
|
|
428
|
+
menuName: "Help & Support",
|
|
429
|
+
menuVisibilities: 2 /* AuthenticatedOnly */ | 1 /* GuestOnly */,
|
|
430
|
+
displayOrder: 2,
|
|
431
|
+
groupOrder: 2
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
id: 8,
|
|
435
|
+
menuCode: "settings",
|
|
436
|
+
menuIcon: "settings" /* SETTINGS */,
|
|
437
|
+
menuName: "Account Settings",
|
|
438
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
439
|
+
displayOrder: 3,
|
|
440
|
+
groupOrder: 3
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: 9,
|
|
444
|
+
menuCode: "switch-branch",
|
|
445
|
+
menuIcon: "repeat" /* REPEAT */,
|
|
446
|
+
menuName: "Switch Branch",
|
|
447
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
448
|
+
displayOrder: 3,
|
|
449
|
+
groupOrder: 3
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: 10,
|
|
453
|
+
menuCode: "switch-fiscal-year",
|
|
454
|
+
menuIcon: "calendar" /* CALENDAR */,
|
|
455
|
+
menuName: "Switch Fiscal Year",
|
|
456
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
457
|
+
displayOrder: 3,
|
|
458
|
+
groupOrder: 3
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: 11,
|
|
462
|
+
menuCode: "sign-out",
|
|
463
|
+
menuIcon: "exit" /* EXIT */,
|
|
464
|
+
menuName: "Sign Out",
|
|
465
|
+
menuVisibilities: 2 /* AuthenticatedOnly */,
|
|
466
|
+
displayOrder: 3,
|
|
467
|
+
groupOrder: 3
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
id: 12,
|
|
471
|
+
menuCode: "sign-in",
|
|
472
|
+
menuIcon: "log-in" /* LOGIN */,
|
|
473
|
+
menuName: "Sign In",
|
|
474
|
+
menuVisibilities: 1 /* GuestOnly */,
|
|
475
|
+
displayOrder: 3,
|
|
476
|
+
groupOrder: 3
|
|
477
|
+
}
|
|
478
|
+
];
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// src/interfaces/layout-interfaces.tsx
|
|
482
|
+
var ROOT_LOADER_IDENTITY = "root-loader";
|
|
483
|
+
var DEFAULT_FONT_WEIGHTS = ["300", "400", "500", "600", "700", "800"];
|
|
484
|
+
var DEFAULT_ANIMATION_DURATION = 300;
|
|
485
|
+
var COLUMN_SIZE_ATTRIBUTE_KEY = "data-column-size";
|
|
486
|
+
var EFontWeights = /* @__PURE__ */ ((EFontWeights2) => {
|
|
487
|
+
EFontWeights2["LIGHT"] = "300";
|
|
488
|
+
EFontWeights2["REGULAR"] = "400";
|
|
489
|
+
EFontWeights2["MEDIUM"] = "500";
|
|
490
|
+
EFontWeights2["SEMI_BOLD"] = "600";
|
|
491
|
+
EFontWeights2["BOLD"] = "700";
|
|
492
|
+
EFontWeights2["EXTRA_BOLD"] = "800";
|
|
493
|
+
return EFontWeights2;
|
|
494
|
+
})(EFontWeights || {});
|
|
495
|
+
var GetGlobalLayout = (defaultDocumentTitle, defaultDocumentDescription, defaultDocumentKeywords) => {
|
|
496
|
+
return {
|
|
497
|
+
defaultDocumentTitle,
|
|
498
|
+
defaultDocumentDescription,
|
|
499
|
+
defaultDocumentKeywords
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
var EAnimations = /* @__PURE__ */ ((EAnimations2) => {
|
|
503
|
+
EAnimations2["FADE_IN"] = "fadeIn";
|
|
504
|
+
EAnimations2["FADE_OUT"] = "fadeOut";
|
|
505
|
+
EAnimations2["FADE_IN_OUT"] = "fadeInOut";
|
|
506
|
+
EAnimations2["BOUNCE"] = "bounce";
|
|
507
|
+
EAnimations2["PULSE_IN"] = "pulseIn";
|
|
508
|
+
EAnimations2["PULSE_OUT"] = "pulseOut";
|
|
509
|
+
EAnimations2["PULSE_IN_OUT"] = "pulseInOut";
|
|
510
|
+
EAnimations2["SPIN"] = "spin";
|
|
511
|
+
EAnimations2["SLIDE_BAR"] = "slideBar";
|
|
512
|
+
EAnimations2["BOUNCE_BAR"] = "bounceBar";
|
|
513
|
+
return EAnimations2;
|
|
514
|
+
})(EAnimations || {});
|
|
515
|
+
var EAnimationClasses = /* @__PURE__ */ ((EAnimationClasses2) => {
|
|
516
|
+
EAnimationClasses2["FADE_IN"] = "an-fa";
|
|
517
|
+
EAnimationClasses2["FADE_OUT"] = "an-fo";
|
|
518
|
+
EAnimationClasses2["FADE_IN_OUT"] = "an-fio";
|
|
519
|
+
EAnimationClasses2["BOUNCE"] = "an-bounce";
|
|
520
|
+
EAnimationClasses2["PULSE_IN"] = "an-pi";
|
|
521
|
+
EAnimationClasses2["PULSE_OUT"] = "an-po";
|
|
522
|
+
EAnimationClasses2["PULSE_IN_OUT"] = "an-pio";
|
|
523
|
+
EAnimationClasses2["SPIN"] = "an-spin";
|
|
524
|
+
EAnimationClasses2["SLIDE_BAR"] = "an-sbar";
|
|
525
|
+
EAnimationClasses2["BOUNCE_BAR"] = "an-bbar";
|
|
526
|
+
return EAnimationClasses2;
|
|
527
|
+
})(EAnimationClasses || {});
|
|
528
|
+
var ESizes = /* @__PURE__ */ ((ESizes2) => {
|
|
529
|
+
ESizes2["VeryTiny"] = "xxs";
|
|
530
|
+
ESizes2["Tiny"] = "xs";
|
|
531
|
+
ESizes2["VerySmall"] = "ssm";
|
|
532
|
+
ESizes2["Small"] = "sm";
|
|
533
|
+
ESizes2["Normal"] = "nr";
|
|
534
|
+
ESizes2["Medium"] = "med";
|
|
535
|
+
ESizes2["Large"] = "lg";
|
|
536
|
+
ESizes2["ExtraLarge"] = "xl";
|
|
537
|
+
ESizes2["VeryExtraLarge"] = "xxl";
|
|
538
|
+
ESizes2["FullSize"] = "fs";
|
|
539
|
+
return ESizes2;
|
|
540
|
+
})(ESizes || {});
|
|
541
|
+
var EBadgeTypes = /* @__PURE__ */ ((EBadgeTypes2) => {
|
|
542
|
+
EBadgeTypes2["Dot"] = "dot";
|
|
543
|
+
EBadgeTypes2["Count"] = "count";
|
|
544
|
+
return EBadgeTypes2;
|
|
545
|
+
})(EBadgeTypes || {});
|
|
546
|
+
var EOpacity = /* @__PURE__ */ ((EOpacity2) => {
|
|
547
|
+
EOpacity2["O05"] = "o05";
|
|
548
|
+
EOpacity2["O06"] = "o06";
|
|
549
|
+
EOpacity2["O07"] = "o07";
|
|
550
|
+
EOpacity2["O08"] = "o08";
|
|
551
|
+
EOpacity2["O09"] = "o09";
|
|
552
|
+
EOpacity2["FULL"] = "o1";
|
|
553
|
+
EOpacity2["NONE"] = "o0";
|
|
554
|
+
return EOpacity2;
|
|
555
|
+
})(EOpacity || {});
|
|
556
|
+
var EPositions = /* @__PURE__ */ ((EPositions2) => {
|
|
557
|
+
EPositions2["Left"] = "left";
|
|
558
|
+
EPositions2["Right"] = "right";
|
|
559
|
+
EPositions2["Top"] = "top";
|
|
560
|
+
EPositions2["Bottom"] = "bottom";
|
|
561
|
+
EPositions2["Center"] = "center";
|
|
562
|
+
return EPositions2;
|
|
563
|
+
})(EPositions || {});
|
|
564
|
+
var ETextPositions = /* @__PURE__ */ ((ETextPositions2) => {
|
|
565
|
+
ETextPositions2["Left"] = "tl";
|
|
566
|
+
ETextPositions2["Right"] = "tr";
|
|
567
|
+
ETextPositions2["Center"] = "tc";
|
|
568
|
+
return ETextPositions2;
|
|
569
|
+
})(ETextPositions || {});
|
|
570
|
+
var EFlexPositions = /* @__PURE__ */ ((EFlexPositions2) => {
|
|
571
|
+
EFlexPositions2["Left"] = "jl";
|
|
572
|
+
EFlexPositions2["Right"] = "jr";
|
|
573
|
+
EFlexPositions2["Center"] = "jc";
|
|
574
|
+
return EFlexPositions2;
|
|
575
|
+
})(EFlexPositions || {});
|
|
576
|
+
|
|
577
|
+
// src/interfaces/theme-interfaces.tsx
|
|
578
|
+
var DEFAULT_THEME_NAME = "light";
|
|
579
|
+
var EBackgroundColors = /* @__PURE__ */ ((EBackgroundColors2) => {
|
|
580
|
+
EBackgroundColors2["Background1"] = "var(--B1)";
|
|
581
|
+
EBackgroundColors2["Background2"] = "var(--B2)";
|
|
582
|
+
EBackgroundColors2["Background3"] = "var(--B3)";
|
|
583
|
+
EBackgroundColors2["SuccessColor"] = "var(--B10)";
|
|
584
|
+
EBackgroundColors2["WarningColor"] = "var(--B11)";
|
|
585
|
+
EBackgroundColors2["InfoColor"] = "var(--B12)";
|
|
586
|
+
EBackgroundColors2["ErrorColor"] = "var(--B13)";
|
|
587
|
+
EBackgroundColors2["PrimaryColor"] = "var(--B20)";
|
|
588
|
+
EBackgroundColors2["BorderColor"] = "var(--B30)";
|
|
589
|
+
EBackgroundColors2["BoxShadowColor"] = "var(--B41)";
|
|
590
|
+
EBackgroundColors2["PopupBackgroundColor"] = "var(--B51)";
|
|
591
|
+
EBackgroundColors2["AlwaysDarkBackgroundColor"] = "var(--B52)";
|
|
592
|
+
EBackgroundColors2["ThemeColor100"] = "var(--B100)";
|
|
593
|
+
EBackgroundColors2["ThemeColor200"] = "var(--B200)";
|
|
594
|
+
EBackgroundColors2["ThemeColor400"] = "var(--B400)";
|
|
595
|
+
EBackgroundColors2["ThemeColor600"] = "var(--B600)";
|
|
596
|
+
EBackgroundColors2["ThemeColor800"] = "var(--B800)";
|
|
597
|
+
EBackgroundColors2["ThemeColor950"] = "var(--B950)";
|
|
598
|
+
return EBackgroundColors2;
|
|
599
|
+
})(EBackgroundColors || {});
|
|
600
|
+
var EBackgrounds = /* @__PURE__ */ ((EBackgrounds2) => {
|
|
601
|
+
EBackgrounds2["None"] = "no-background";
|
|
602
|
+
EBackgrounds2["Background1"] = "bg1";
|
|
603
|
+
EBackgrounds2["Background2"] = "bg2";
|
|
604
|
+
EBackgrounds2["Background3"] = "bg3";
|
|
605
|
+
EBackgrounds2["SuccessColor"] = "bg10";
|
|
606
|
+
EBackgrounds2["WarningColor"] = "bg11";
|
|
607
|
+
EBackgrounds2["InfoColor"] = "bg12";
|
|
608
|
+
EBackgrounds2["ErrorColor"] = "bg13";
|
|
609
|
+
EBackgrounds2["PrimaryColor"] = "bg20";
|
|
610
|
+
EBackgrounds2["BorderColor"] = "bg30";
|
|
611
|
+
EBackgrounds2["BoxShadowColor"] = "bg41";
|
|
612
|
+
EBackgrounds2["PopupBackgroundColor"] = "bg51";
|
|
613
|
+
EBackgrounds2["AlwaysDarkBackgroundColor"] = "bg52";
|
|
614
|
+
EBackgrounds2["ThemeColor100"] = "bg100";
|
|
615
|
+
EBackgrounds2["ThemeColor200"] = "bg200";
|
|
616
|
+
EBackgrounds2["ThemeColor400"] = "bg400";
|
|
617
|
+
EBackgrounds2["ThemeColor600"] = "bg600";
|
|
618
|
+
EBackgrounds2["ThemeColor800"] = "bg800";
|
|
619
|
+
EBackgrounds2["ThemeColor950"] = "bg950";
|
|
620
|
+
return EBackgrounds2;
|
|
621
|
+
})(EBackgrounds || {});
|
|
622
|
+
var DEFAULT_THEME_INFORMATIONS = [
|
|
623
|
+
{
|
|
624
|
+
displayName: "Light",
|
|
625
|
+
systemName: DEFAULT_THEME_NAME,
|
|
626
|
+
displayOrder: 0,
|
|
627
|
+
icon: "sunny" /* SUNNY */,
|
|
628
|
+
themeColors: {
|
|
629
|
+
C1: "rgb(255, 255, 255)|rgb(240, 240, 240)|rgb(225, 225, 225)|rgb(0, 0, 0)",
|
|
630
|
+
C2: "rgb(245, 245, 245)|rgb(230, 230, 230)|rgb(215, 215, 215)|rgb(0, 0, 0)",
|
|
631
|
+
C3: "rgb(230, 230, 230)|rgb(200, 200, 200)|rgb(185, 185, 185)|rgb(0, 0, 0)",
|
|
632
|
+
C10: "rgb(34, 187, 51)|rgb(0, 150, 80)|rgb(20, 120, 40)|rgb(255, 255, 255)",
|
|
633
|
+
C11: "rgb(240, 173, 78)|rgb(210, 140, 50)|rgb(180, 110, 20)|rgb(255, 255, 255)",
|
|
634
|
+
C12: "rgb(76, 185, 255)|rgb(100, 180, 255)|rgb(80, 160, 220)|rgb(255, 255, 255)",
|
|
635
|
+
C13: "rgb(255, 102, 102)|rgb(220, 80, 80)|rgb(190, 60, 60)|rgb(255, 255, 255)",
|
|
636
|
+
C20: "rgb(47, 81, 255)|rgb(30, 60, 220)|rgb(20, 40, 180)|rgb(255, 255, 255)",
|
|
637
|
+
C30: "rgb(200, 200, 200)|rgb(180, 180, 180)|rgb(160, 160, 160)|rgb(0, 0, 0)",
|
|
638
|
+
C41: "rgba(0, 0, 0, 0.4)|rgb(150, 150, 150)|rgb(120, 120, 120)|rgb(0, 0, 0)",
|
|
639
|
+
C51: "rgba(0, 0, 0, 0.6)|rgb(0, 0, 0, 0.8)|rgb(0, 0, 0, 0.9)|rgb(255, 255, 255)",
|
|
640
|
+
C52: "rgb(60, 60, 60)|rgb(85, 85, 85)|rgb(35, 35, 35)|rgb(255, 255, 255)",
|
|
641
|
+
C100: "rgb(213, 228, 255)|rgb(200, 210, 255)|rgb(185, 200, 220)|rgb(0, 0, 0)",
|
|
642
|
+
C200: "rgb(179, 205, 255)|rgb(160, 180, 255)|rgb(140, 160, 220)|rgb(0, 0, 0)",
|
|
643
|
+
C400: "rgb(86, 126, 255)|rgb(60, 90, 220)|rgb(40, 60, 180)|rgb(255, 255, 255)",
|
|
644
|
+
C600: "rgb(12, 33, 255)|rgb(10, 20, 220)|rgb(8, 15, 180)|rgb(255, 255, 255)",
|
|
645
|
+
C800: "rgb(6, 22, 205)|rgb(4, 15, 180)|rgb(2, 10, 120)|rgb(255, 255, 255)",
|
|
646
|
+
C950: "rgb(10, 17, 92)|rgb(8, 12, 70)|rgb(6, 9, 40)|rgb(255, 255, 255)"
|
|
647
|
+
},
|
|
648
|
+
isSystemTheme: true
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
displayName: "Dark",
|
|
652
|
+
displayOrder: 1,
|
|
653
|
+
icon: "moon" /* MOON */,
|
|
654
|
+
systemName: "dark",
|
|
655
|
+
themeColors: {
|
|
656
|
+
C1: "rgb(50, 50, 50)|rgb(40, 40, 40)|rgb(30, 30, 30)|rgb(220, 220, 220)",
|
|
657
|
+
C2: "rgb(65, 65, 65)|rgb(55, 55, 55)|rgb(45, 45, 45)|rgb(220, 220, 220)",
|
|
658
|
+
C3: "rgb(70, 70, 70)|rgb(60, 60, 60)|rgb(50, 50, 50)|rgb(220, 220, 220)",
|
|
659
|
+
C10: "rgb(34, 187, 51)|rgb(0, 150, 80)|rgb(20, 120, 40)|rgb(255, 255, 255)",
|
|
660
|
+
C11: "rgb(240, 173, 78)|rgb(210, 140, 50)|rgb(180, 110, 20)|rgb(255, 255, 255)",
|
|
661
|
+
C12: "rgb(76, 185, 255)|rgb(100, 180, 255)|rgb(80, 160, 220)|rgb(255, 255, 255)",
|
|
662
|
+
C13: "rgb(255, 102, 102)|rgb(220, 80, 80)|rgb(190, 60, 60)|rgb(255, 255, 255)",
|
|
663
|
+
C20: "rgb(47, 81, 255)|rgb(30, 60, 220)|rgb(20, 40, 180)|rgb(255, 255, 255)",
|
|
664
|
+
C30: "rgb(100, 100, 100)|rgb(90, 90, 90)|rgb(80, 80, 80)|rgb(220, 220, 220)",
|
|
665
|
+
C41: "rgb(100, 100, 100)|rgb(255, 255, 255)|rgb(120, 120, 120)|rgb(0, 0, 0)",
|
|
666
|
+
C51: "rgba(0, 0, 0, 0.6)|rgb(0, 0, 0, 0.8)|rgb(0, 0, 0, 0.9)|rgb(255, 255, 255)",
|
|
667
|
+
C52: "rgb(60, 60, 60)|rgb(85, 85, 85)|rgb(35, 35, 35)|rgb(255, 255, 255)",
|
|
668
|
+
C100: "rgb(213, 228, 255)|rgb(200, 210, 255)|rgb(185, 200, 220)|rgb(0, 0, 0)",
|
|
669
|
+
C200: "rgb(179, 205, 255)|rgb(160, 180, 255)|rgb(140, 160, 220)|rgb(0, 0, 0)",
|
|
670
|
+
C400: "rgb(86, 126, 255)|rgb(60, 90, 220)|rgb(40, 60, 180)|rgb(255, 255, 255)",
|
|
671
|
+
C600: "rgb(12, 33, 255)|rgb(10, 20, 220)|rgb(8, 15, 180)|rgb(255, 255, 255)",
|
|
672
|
+
C800: "rgb(6, 22, 205)|rgb(4, 15, 180)|rgb(2, 10, 120)|rgb(255, 255, 255)",
|
|
673
|
+
C950: "rgb(10, 17, 92)|rgb(8, 12, 70)|rgb(6, 9, 40)|rgb(255, 255, 255)"
|
|
674
|
+
},
|
|
675
|
+
isSystemTheme: true
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
displayName: "Light2",
|
|
679
|
+
systemName: "light2",
|
|
680
|
+
displayOrder: 0,
|
|
681
|
+
icon: "sunny" /* SUNNY */,
|
|
682
|
+
themeColors: {
|
|
683
|
+
C1: "rgb(255, 255, 255)|rgb(240, 240, 240)|rgb(225, 225, 225)|rgb(0, 0, 0)",
|
|
684
|
+
C2: "rgb(245, 245, 245)|rgb(230, 230, 230)|rgb(215, 215, 215)|rgb(0, 0, 0)",
|
|
685
|
+
C3: "rgb(230, 230, 230)|rgb(200, 200, 200)|rgb(185, 185, 185)|rgb(0, 0, 0)",
|
|
686
|
+
C10: "rgb(34, 187, 51)|rgb(0, 150, 80)|rgb(20, 120, 40)|rgb(255, 255, 255)",
|
|
687
|
+
C11: "rgb(240, 173, 78)|rgb(210, 140, 50)|rgb(180, 110, 20)|rgb(255, 255, 255)",
|
|
688
|
+
C12: "rgb(76, 185, 255)|rgb(100, 180, 255)|rgb(80, 160, 220)|rgb(255, 255, 255)",
|
|
689
|
+
C13: "rgb(255, 102, 102)|rgb(220, 80, 80)|rgb(190, 60, 60)|rgb(255, 255, 255)",
|
|
690
|
+
C20: "rgb(47, 81, 255)|rgb(30, 60, 220)|rgb(20, 40, 180)|rgb(255, 255, 255)",
|
|
691
|
+
C30: "rgb(200, 200, 200)|rgb(180, 180, 180)|rgb(160, 160, 160)|rgb(0, 0, 0)",
|
|
692
|
+
C41: "rgba(0, 0, 0, 0.4)|rgb(150, 150, 150)|rgb(120, 120, 120)|rgb(0, 0, 0)",
|
|
693
|
+
C51: "rgba(0, 0, 0, 0.6)|rgb(0, 0, 0, 0.8)|rgb(0, 0, 0, 0.9)|rgb(255, 255, 255)",
|
|
694
|
+
C52: "rgb(60, 60, 60)|rgb(85, 85, 85)|rgb(35, 35, 35)|rgb(255, 255, 255)",
|
|
695
|
+
C100: "rgb(213, 228, 255)|rgb(200, 210, 255)|rgb(185, 200, 220)|rgb(0, 0, 0)",
|
|
696
|
+
C200: "rgb(179, 205, 255)|rgb(160, 180, 255)|rgb(140, 160, 220)|rgb(0, 0, 0)",
|
|
697
|
+
C400: "rgb(86, 126, 255)|rgb(60, 90, 220)|rgb(40, 60, 180)|rgb(255, 255, 255)",
|
|
698
|
+
C600: "rgb(12, 33, 255)|rgb(10, 20, 220)|rgb(8, 15, 180)|rgb(255, 255, 255)",
|
|
699
|
+
C800: "rgb(6, 22, 205)|rgb(4, 15, 180)|rgb(2, 10, 120)|rgb(255, 255, 255)",
|
|
700
|
+
C950: "rgb(10, 17, 92)|rgb(8, 12, 70)|rgb(6, 9, 40)|rgb(255, 255, 255)"
|
|
701
|
+
},
|
|
702
|
+
isSystemTheme: true
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
displayName: "Dark2",
|
|
706
|
+
displayOrder: 1,
|
|
707
|
+
icon: "moon" /* MOON */,
|
|
708
|
+
systemName: "dark2",
|
|
709
|
+
themeColors: {
|
|
710
|
+
C1: "rgb(50, 50, 50)|rgb(40, 40, 40)|rgb(30, 30, 30)|rgb(220, 220, 220)",
|
|
711
|
+
C2: "rgb(65, 65, 65)|rgb(55, 55, 55)|rgb(45, 45, 45)|rgb(220, 220, 220)",
|
|
712
|
+
C3: "rgb(70, 70, 70)|rgb(60, 60, 60)|rgb(50, 50, 50)|rgb(220, 220, 220)",
|
|
713
|
+
C10: "rgb(34, 187, 51)|rgb(0, 150, 80)|rgb(20, 120, 40)|rgb(255, 255, 255)",
|
|
714
|
+
C11: "rgb(240, 173, 78)|rgb(210, 140, 50)|rgb(180, 110, 20)|rgb(255, 255, 255)",
|
|
715
|
+
C12: "rgb(76, 185, 255)|rgb(100, 180, 255)|rgb(80, 160, 220)|rgb(255, 255, 255)",
|
|
716
|
+
C13: "rgb(255, 102, 102)|rgb(220, 80, 80)|rgb(190, 60, 60)|rgb(255, 255, 255)",
|
|
717
|
+
C20: "rgb(47, 81, 255)|rgb(30, 60, 220)|rgb(20, 40, 180)|rgb(255, 255, 255)",
|
|
718
|
+
C30: "rgb(100, 100, 100)|rgb(90, 90, 90)|rgb(80, 80, 80)|rgb(220, 220, 220)",
|
|
719
|
+
C41: "rgb(100, 100, 100)|rgb(255, 255, 255)|rgb(120, 120, 120)|rgb(0, 0, 0)",
|
|
720
|
+
C51: "rgba(0, 0, 0, 0.6)|rgb(0, 0, 0, 0.8)|rgb(0, 0, 0, 0.9)|rgb(255, 255, 255)",
|
|
721
|
+
C52: "rgb(60, 60, 60)|rgb(85, 85, 85)|rgb(35, 35, 35)|rgb(255, 255, 255)",
|
|
722
|
+
C100: "rgb(213, 228, 255)|rgb(200, 210, 255)|rgb(185, 200, 220)|rgb(0, 0, 0)",
|
|
723
|
+
C200: "rgb(179, 205, 255)|rgb(160, 180, 255)|rgb(140, 160, 220)|rgb(0, 0, 0)",
|
|
724
|
+
C400: "rgb(86, 126, 255)|rgb(60, 90, 220)|rgb(40, 60, 180)|rgb(255, 255, 255)",
|
|
725
|
+
C600: "rgb(12, 33, 255)|rgb(10, 20, 220)|rgb(8, 15, 180)|rgb(255, 255, 255)",
|
|
726
|
+
C800: "rgb(6, 22, 205)|rgb(4, 15, 180)|rgb(2, 10, 120)|rgb(255, 255, 255)",
|
|
727
|
+
C950: "rgb(10, 17, 92)|rgb(8, 12, 70)|rgb(6, 9, 40)|rgb(255, 255, 255)"
|
|
728
|
+
},
|
|
729
|
+
isSystemTheme: true
|
|
730
|
+
}
|
|
731
|
+
];
|
|
732
|
+
|
|
733
|
+
// src/nexus.environments.tsx
|
|
734
|
+
var APIS = {
|
|
735
|
+
DRIVE: ""
|
|
736
|
+
};
|
|
737
|
+
var FILES = {
|
|
738
|
+
LOGO: {
|
|
739
|
+
ICON: "/static-files/logos/icon-logo.png",
|
|
740
|
+
FULL: "/static-files/logos/full-logo.png",
|
|
741
|
+
FULL_TEXT: "/static-files/logos/full-text-logo.png"
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
var NEXUS_INFO = {
|
|
745
|
+
CURRENT_MODULE: process.env.CURRENT_MODULE !== void 0 ? parseInt(process.env.CURRENT_MODULE) : void 0,
|
|
746
|
+
CURRENT_MODULE_NAME: process.env.CURRENT_MODULE_NAME,
|
|
747
|
+
CURRENT_MODULE_SHORT_NAME: process.env.CURRENT_MODULE_SHORT_NAME,
|
|
748
|
+
IS_PRODUCTION: process.env.NODE_ENV === "production",
|
|
749
|
+
SOFTWARE_COMPANY_SHORT_NAME: "Nexus Solutions",
|
|
750
|
+
SOFTWARE_COMPANY_FULL_NAME: "Nexus Solutions Pvt. Ltd.",
|
|
751
|
+
SOFTWARE_VERSION: process.env.SOFTWARE_VERSION,
|
|
752
|
+
SOFTWARE_LAST_UPDATE_DATE: process.env.SOFTWARE_LAST_UPDATE_DATE,
|
|
753
|
+
SOFTWARE_COMPANY_WEBSITE: "https://www.bjadhikari.com.np"
|
|
754
|
+
};
|
|
755
|
+
var NEXUS_CONFIG = {
|
|
756
|
+
/** Default revalidate time for static generation (in minutes) */
|
|
757
|
+
DEFAULT_REVALIDATE_TIME: NEXUS_INFO.IS_PRODUCTION ? 60 * 24 : 0,
|
|
758
|
+
/** Default timeout for HTTP requests (in milliseconds) */
|
|
759
|
+
DEFAULT_HTTP_REQUEST_TIMEOUT: NEXUS_INFO.IS_PRODUCTION ? 6e4 : 1e6,
|
|
760
|
+
DEFAULT_BACKGROUND: "bg1" /* Background1 */
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
// src/interfaces/browser-interfaces.tsx
|
|
764
|
+
var EKeys = /* @__PURE__ */ ((EKeys2) => {
|
|
765
|
+
EKeys2["TAB"] = "Tab";
|
|
766
|
+
EKeys2["DELETE"] = "Delete";
|
|
767
|
+
EKeys2["ENTER"] = "Enter";
|
|
768
|
+
EKeys2["ESCAPE"] = "Escape";
|
|
769
|
+
EKeys2["SPACE"] = " ";
|
|
770
|
+
EKeys2["BACKSPACE"] = "Backspace";
|
|
771
|
+
EKeys2["ARROW_UP"] = "ArrowUp";
|
|
772
|
+
EKeys2["ARROW_DOWN"] = "ArrowDown";
|
|
773
|
+
EKeys2["ARROW_LEFT"] = "ArrowLeft";
|
|
774
|
+
EKeys2["ARROW_RIGHT"] = "ArrowRight";
|
|
775
|
+
EKeys2["A"] = "a";
|
|
776
|
+
EKeys2["B"] = "b";
|
|
777
|
+
EKeys2["C"] = "c";
|
|
778
|
+
EKeys2["D"] = "d";
|
|
779
|
+
EKeys2["DOT"] = ".";
|
|
780
|
+
return EKeys2;
|
|
781
|
+
})(EKeys || {});
|
|
782
|
+
var EKeyModifier = /* @__PURE__ */ ((EKeyModifier2) => {
|
|
783
|
+
EKeyModifier2[EKeyModifier2["None"] = 0] = "None";
|
|
784
|
+
EKeyModifier2[EKeyModifier2["Shift"] = 1] = "Shift";
|
|
785
|
+
EKeyModifier2[EKeyModifier2["Ctrl"] = 2] = "Ctrl";
|
|
786
|
+
EKeyModifier2[EKeyModifier2["Alt"] = 4] = "Alt";
|
|
787
|
+
return EKeyModifier2;
|
|
788
|
+
})(EKeyModifier || {});
|
|
789
|
+
|
|
790
|
+
// src/helpers/bitwise-helpers.tsx
|
|
791
|
+
function HasFlag(state, flag) {
|
|
792
|
+
return (state & flag) === flag;
|
|
793
|
+
}
|
|
794
|
+
function BitwiseToList(enumType, bitwiseValue) {
|
|
795
|
+
return Object.values(enumType).filter((v) => typeof v === "number").filter((v) => (bitwiseValue & v) === v && v !== 0);
|
|
796
|
+
}
|
|
797
|
+
function ListToBitwise(values) {
|
|
798
|
+
return values.reduce((acc, curr) => acc | curr, 0);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// src/helpers/utility-helpers.tsx
|
|
802
|
+
var DEFAULT_DELAY = 500;
|
|
803
|
+
function Debounce(func, delay) {
|
|
804
|
+
let timer;
|
|
805
|
+
let lastArgs;
|
|
806
|
+
let isPending = false;
|
|
807
|
+
const debounced = (...args) => {
|
|
808
|
+
lastArgs = args;
|
|
809
|
+
isPending = true;
|
|
810
|
+
clearTimeout(timer);
|
|
811
|
+
timer = setTimeout(() => {
|
|
812
|
+
timer = void 0;
|
|
813
|
+
isPending = false;
|
|
814
|
+
lastArgs = void 0;
|
|
815
|
+
func(...args);
|
|
816
|
+
}, delay ?? DEFAULT_DELAY);
|
|
817
|
+
};
|
|
818
|
+
debounced.cancel = () => {
|
|
819
|
+
clearTimeout(timer);
|
|
820
|
+
timer = void 0;
|
|
821
|
+
isPending = false;
|
|
822
|
+
lastArgs = void 0;
|
|
823
|
+
};
|
|
824
|
+
debounced.executeImmediately = (...args) => {
|
|
825
|
+
clearTimeout(timer);
|
|
826
|
+
timer = void 0;
|
|
827
|
+
const invokeArgs = args.length > 0 ? args : isPending ? lastArgs : void 0;
|
|
828
|
+
isPending = false;
|
|
829
|
+
lastArgs = void 0;
|
|
830
|
+
if (invokeArgs !== void 0) func(...invokeArgs);
|
|
831
|
+
};
|
|
832
|
+
return debounced;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// src/helpers/browser-helpers.tsx
|
|
836
|
+
var IsBrowser = () => typeof window !== "undefined" && typeof document !== "undefined";
|
|
837
|
+
var RemoveElement = async (elementIdentity, timeout, animation) => {
|
|
838
|
+
return new Promise(async (resolve) => {
|
|
839
|
+
if (!IsBrowser() || !elementIdentity) return resolve(false);
|
|
840
|
+
else if (typeof elementIdentity === "string") {
|
|
841
|
+
const element = document.getElementById(elementIdentity);
|
|
842
|
+
if (element) return await RemoveElement(element, timeout);
|
|
843
|
+
} else if (elementIdentity instanceof HTMLElement || elementIdentity) {
|
|
844
|
+
const timeoutIdentifier = setTimeout(() => {
|
|
845
|
+
elementIdentity.remove();
|
|
846
|
+
clearTimeout(timeoutIdentifier);
|
|
847
|
+
elementIdentity.remove();
|
|
848
|
+
return resolve(true);
|
|
849
|
+
}, timeout ?? 0);
|
|
850
|
+
elementIdentity.classList.add(animation ?? "an-fo" /* FADE_OUT */);
|
|
851
|
+
return resolve(true);
|
|
852
|
+
} else return resolve(false);
|
|
853
|
+
});
|
|
854
|
+
};
|
|
855
|
+
var setDocumentTitle = (title) => IsBrowser() && (document.title = `Nexus - ${title ?? NEXUS_INFO.CURRENT_MODULE_SHORT_NAME ?? "Solutions"}`);
|
|
856
|
+
var SetDocumentTitleDebounce = Debounce(setDocumentTitle, 100);
|
|
857
|
+
var ConvertRemToPixels = (rem) => {
|
|
858
|
+
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
859
|
+
return Math.round(rem * fontSize * 1e3) / 1e3;
|
|
860
|
+
};
|
|
861
|
+
var ConvertPixelsToRem = (px) => {
|
|
862
|
+
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
863
|
+
return Math.round(px / fontSize * 1e3) / 1e3;
|
|
864
|
+
};
|
|
865
|
+
var IsKeyPressed = (event, key, modifier) => {
|
|
866
|
+
const isPressed = (event?.key ?? event?.nativeEvent?.data) === key;
|
|
867
|
+
if (!isPressed) return isPressed;
|
|
868
|
+
if (!modifier) return isPressed;
|
|
869
|
+
if (HasFlag(modifier, 1 /* Shift */) && !event.shiftKey) return false;
|
|
870
|
+
if (HasFlag(modifier, 2 /* Ctrl */) && !event.ctrlKey) return false;
|
|
871
|
+
if (HasFlag(modifier, 4 /* Alt */) && !event.altKey) return false;
|
|
872
|
+
return isPressed;
|
|
873
|
+
};
|
|
874
|
+
var IsValidURL = (url) => url !== void 0 && url !== null && url !== "#" && url.length > 0;
|
|
875
|
+
var FindChildElement = (parent, childSelector, shouldScanAllChildren = false) => {
|
|
876
|
+
if (!parent || !childSelector) return null;
|
|
877
|
+
if (shouldScanAllChildren) {
|
|
878
|
+
const children = parent.querySelectorAll(childSelector);
|
|
879
|
+
return children.length > 0 ? children[0] : null;
|
|
880
|
+
} else return parent.querySelector(childSelector);
|
|
881
|
+
};
|
|
882
|
+
var FindChildElements = (parent, childSelector, shouldScanAllChildren = false) => {
|
|
883
|
+
if (!parent || !childSelector) return [];
|
|
884
|
+
if (shouldScanAllChildren) {
|
|
885
|
+
const children = parent.querySelectorAll(childSelector);
|
|
886
|
+
return children.length > 0 ? children : [];
|
|
887
|
+
} else {
|
|
888
|
+
const children = parent.querySelectorAll(childSelector);
|
|
889
|
+
return children.length > 0 ? [children[0]] : [];
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
// src/helpers/element-helpers.tsx
|
|
894
|
+
function RenderChildren(parentContainer, elementList, toggleButton, activeItem, visibleItems, hiddenItems, createItem, refreshElementClass, isInit, isHiddenItemClicked, dataUniqueKey, dataAttributeKey) {
|
|
895
|
+
if (!isInit) {
|
|
896
|
+
for (const element of elementList) refreshElementClass(element, activeItem);
|
|
897
|
+
if (isHiddenItemClicked && activeItem) {
|
|
898
|
+
const newActiveItem = createItem(activeItem);
|
|
899
|
+
const lastItemElement = elementList[elementList.length - 1];
|
|
900
|
+
if (lastItemElement) {
|
|
901
|
+
lastItemElement.replaceWith(newActiveItem);
|
|
902
|
+
elementList[elementList.length - 1].remove();
|
|
903
|
+
elementList[elementList.length - 1] = newActiveItem;
|
|
904
|
+
}
|
|
905
|
+
} else {
|
|
906
|
+
const lastVisible = visibleItems[visibleItems.length - 1];
|
|
907
|
+
const lastDomItem = elementList[elementList.length - 1];
|
|
908
|
+
const currentItemCode = lastDomItem?.getAttribute(dataAttributeKey);
|
|
909
|
+
if (lastVisible && lastDomItem && currentItemCode !== lastVisible[dataUniqueKey]) {
|
|
910
|
+
const correctedItem = createItem(lastVisible);
|
|
911
|
+
lastDomItem.replaceWith(correctedItem);
|
|
912
|
+
lastDomItem.remove();
|
|
913
|
+
elementList[elementList.length - 1] = correctedItem;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
elementList.length = 0;
|
|
919
|
+
parentContainer.innerHTML = "";
|
|
920
|
+
for (const item of visibleItems) {
|
|
921
|
+
const itemItem = createItem(item);
|
|
922
|
+
parentContainer.appendChild(itemItem);
|
|
923
|
+
elementList.push(itemItem);
|
|
924
|
+
}
|
|
925
|
+
if (hiddenItems.length > 0) {
|
|
926
|
+
parentContainer.appendChild(toggleButton);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
var SetElementStyles = (element, styles) => {
|
|
930
|
+
if (!element || !styles) return;
|
|
931
|
+
if (typeof styles === "object") {
|
|
932
|
+
Object.keys(styles).forEach((key) => {
|
|
933
|
+
const value = styles[key];
|
|
934
|
+
if (value === void 0) return;
|
|
935
|
+
element.style.setProperty(key, value === null ? null : String(value));
|
|
936
|
+
});
|
|
937
|
+
} else element.style.setProperty(styles, styles);
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
// src/interfaces/button-interfaces.tsx
|
|
941
|
+
var DEFAULT_BUTTON_CLASS = (column, padding, borderSize, background, defaultClass, needColumnSize) => {
|
|
942
|
+
const col = `btn pr h w100 sn db toh p${padding ?? 3} ${background ?? "bg1" /* Background1 */} df ac ${borderSize ? "bb" + borderSize : ""} ${defaultClass ?? ""}`;
|
|
943
|
+
if (needColumnSize !== false) return `${col} col-sm-12 ${`col-${column ?? 12}`}`;
|
|
944
|
+
return col;
|
|
945
|
+
};
|
|
946
|
+
var DEFAULT_LINK_BUTTON_STYLE = {
|
|
947
|
+
color: "var(--B20)",
|
|
948
|
+
borderBottom: "var(--BRD1) solid var(--B20)",
|
|
949
|
+
width: "fit-content"
|
|
950
|
+
};
|
|
951
|
+
var ETargets = /* @__PURE__ */ ((ETargets2) => {
|
|
952
|
+
ETargets2["Blank"] = "_blank";
|
|
953
|
+
ETargets2["Self"] = "_self";
|
|
954
|
+
ETargets2["Parent"] = "_parent";
|
|
955
|
+
ETargets2["Top"] = "_top";
|
|
956
|
+
return ETargets2;
|
|
957
|
+
})(ETargets || {});
|
|
958
|
+
var EButtonTypes = /* @__PURE__ */ ((EButtonTypes2) => {
|
|
959
|
+
EButtonTypes2["BUTTON"] = "button";
|
|
960
|
+
EButtonTypes2["SUBMIT"] = "submit";
|
|
961
|
+
return EButtonTypes2;
|
|
962
|
+
})(EButtonTypes || {});
|
|
963
|
+
var GetButton = (label, id, url, icon, onClick, data, background, defaultClass, displayOrder, iconType, iconSize, columnSize, borderSize, target) => {
|
|
964
|
+
return {
|
|
965
|
+
label,
|
|
966
|
+
id,
|
|
967
|
+
icon,
|
|
968
|
+
onClick,
|
|
969
|
+
url,
|
|
970
|
+
background,
|
|
971
|
+
defaultClass,
|
|
972
|
+
displayOrder,
|
|
973
|
+
data,
|
|
974
|
+
iconType,
|
|
975
|
+
iconSize,
|
|
976
|
+
columnSize,
|
|
977
|
+
borderSize,
|
|
978
|
+
target
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
var _getIconClass = (size, defaultClass, opacity) => `icon ${size ?? "nr" /* Normal */} ${defaultClass ?? ""} ${opacity ?? "o08" /* O08 */}`;
|
|
982
|
+
var Icon = ({ icon, type, size, style, defaultClass, opacity }) => {
|
|
983
|
+
const c = _getIconClass(size, defaultClass, opacity ?? "o06" /* O06 */);
|
|
984
|
+
return React__default.default.createElement(DEFAULT_ICON_ELEMENT_NAME, {
|
|
985
|
+
name: `${icon ?? "home" /* HOME */}${type ?? "-outline" /* OUTLINED */}`,
|
|
986
|
+
style: style ?? void 0,
|
|
987
|
+
className: c
|
|
988
|
+
});
|
|
989
|
+
};
|
|
990
|
+
var CreateIcon = (icon, parent, type, size, defaultClass, opacity, style) => {
|
|
991
|
+
const iconElement = document.createElement(DEFAULT_ICON_ELEMENT_NAME);
|
|
992
|
+
iconElement.name = `${icon ?? "home" /* HOME */}${type ?? "-outline" /* OUTLINED */}`;
|
|
993
|
+
SetElementStyles(iconElement, style);
|
|
994
|
+
iconElement.className = _getIconClass(size, defaultClass, opacity);
|
|
995
|
+
if (parent) parent.appendChild(iconElement);
|
|
996
|
+
return iconElement;
|
|
997
|
+
};
|
|
998
|
+
var _getBoxClass = (background, makeRound, defaultClass, boxSize, isNeedHover) => `ib ${background} ${makeRound !== false ? "r" : ""} r item ${defaultClass ?? ""} ${boxSize ?? "nr" /* Normal */} ${isNeedHover ? "h" : ""}`;
|
|
999
|
+
var Iconbox = ({ children, id, icon, iconType, iconSize, boxSize, background, defaultClass, iconDefaultClass, badgeType, badgeCount, iconOpacity, title, dataKeys, makeRound, boxStyle, onClicked: onClicked2, onMouseEnter, disabledHoverEffect }) => {
|
|
1000
|
+
background = background ?? "bg1" /* Background1 */;
|
|
1001
|
+
const isNeedHover = disabledHoverEffect !== false;
|
|
1002
|
+
const c = _getBoxClass(background, makeRound, defaultClass, boxSize, isNeedHover);
|
|
1003
|
+
const dataAttributes = (dataKeys ?? []).reduce((acc, { key, val }) => {
|
|
1004
|
+
acc[`data-${key}`] = val;
|
|
1005
|
+
return acc;
|
|
1006
|
+
}, {});
|
|
1007
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...dataAttributes, id: id ?? void 0, style: boxStyle ?? void 0, className: c, onClick: onClicked2 ?? void 0, onMouseEnter: onMouseEnter ?? void 0, children: [
|
|
1008
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "title nw", children: title }),
|
|
1009
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { icon, opacity: iconOpacity, type: iconType, size: iconSize, defaultClass: iconDefaultClass }),
|
|
1010
|
+
children
|
|
1011
|
+
] });
|
|
1012
|
+
};
|
|
1013
|
+
var CreateIconBox = (icon, parent, children, id, iconType, background, boxSize, iconSize, defaultClass, iconDefaultClass, badgeType, badgeCount, iconOpacity, title, dataKeys, makeRound, boxStyle, onClicked2, onMouseEnter, disabledHoverEffect) => {
|
|
1014
|
+
background = background ?? "bg1" /* Background1 */;
|
|
1015
|
+
const isNeedHover = disabledHoverEffect !== false;
|
|
1016
|
+
const iconBox = document.createElement("div");
|
|
1017
|
+
iconBox.className = _getBoxClass(background, makeRound, defaultClass, boxSize, isNeedHover);
|
|
1018
|
+
SetElementStyles(iconBox, boxStyle);
|
|
1019
|
+
if (onClicked2) iconBox.onclick = onClicked2;
|
|
1020
|
+
if (onMouseEnter) iconBox.onmouseenter = onMouseEnter;
|
|
1021
|
+
if (parent) parent.appendChild(iconBox);
|
|
1022
|
+
CreateIcon(icon, iconBox, iconType, iconSize, iconDefaultClass, iconOpacity);
|
|
1023
|
+
if (children) iconBox.appendChild(children);
|
|
1024
|
+
return iconBox;
|
|
1025
|
+
};
|
|
1026
|
+
var CreateToggleButton = (parentElement, children, id, boxSize, iconSize, opacity, iconType, boxBackground) => CreateIconBox("ellipsis-horizontal" /* ELLIPSIS_HORIZONTAL */, parentElement, children, id, iconType, boxBackground, boxSize, iconSize, `h ${boxBackground ?? "bg1"} ml5`, "r90");
|
|
1027
|
+
var SET_BUTTON_ACTIVE_CLASS = (isActive, element, overrideColor, overrideActive) => {
|
|
1028
|
+
if (!element) return;
|
|
1029
|
+
if (overrideColor) element.style.setProperty("--ACTIVE_BORDER_COLOR", overrideColor);
|
|
1030
|
+
if (isActive) element.classList.add(overrideActive ?? "active");
|
|
1031
|
+
else element.classList.remove(overrideActive ?? "active");
|
|
1032
|
+
};
|
|
1033
|
+
var Button = ({ button, buttonType, styles, needColumnSize }) => {
|
|
1034
|
+
return IsValidURL(button.url) ? /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: button.url ?? "#", style: styles ?? void 0, className: DEFAULT_BUTTON_CLASS(button.columnSize, void 0, button.borderSize, button.background, button.defaultClass, needColumnSize), type: buttonType ?? "button" /* BUTTON */, onClick: (event) => button.onClick?.(event, event.currentTarget, button.data, button.displayOrder), children: [
|
|
1035
|
+
button.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: button.icon, type: button.iconType ?? "" /* FILLED */, opacity: "o08" /* O08 */, size: "sm" /* Small */, defaultClass: "mr4" }),
|
|
1036
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: button.label instanceof Function ? button.label(button.data) : button.label })
|
|
1037
|
+
] }, button.displayOrder ?? 0) : /* @__PURE__ */ jsxRuntime.jsxs("button", { style: styles ?? void 0, className: DEFAULT_BUTTON_CLASS(button.columnSize, void 0, button.borderSize, button.background, button.defaultClass, needColumnSize), type: buttonType ?? "button" /* BUTTON */, onClick: (event) => button.onClick?.(event, event.currentTarget, button.data, button.displayOrder), children: [
|
|
1038
|
+
button.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: button.icon, type: button.iconType ?? "" /* FILLED */, opacity: "o08" /* O08 */, size: "sm" /* Small */, defaultClass: "mr4" }),
|
|
1039
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: button.label instanceof Function ? button.label(button.data) : button.label })
|
|
1040
|
+
] }, button.displayOrder);
|
|
1041
|
+
};
|
|
1042
|
+
var CreateButton = (param, parent, styles, needColumnSize) => {
|
|
1043
|
+
const button = document.createElement(param.url ? "a" : "button");
|
|
1044
|
+
button.setAttribute(COLUMN_SIZE_ATTRIBUTE_KEY, (param.columnSize ?? 12).toString());
|
|
1045
|
+
if (param.icon) {
|
|
1046
|
+
const icon = CreateIcon(param.icon, button, param.iconType, param.iconSize ?? "sm" /* Small */, null, null);
|
|
1047
|
+
icon.classList.add("mr4");
|
|
1048
|
+
}
|
|
1049
|
+
SetElementStyles(button, styles);
|
|
1050
|
+
button.className = DEFAULT_BUTTON_CLASS(param.columnSize, void 0, param.borderSize, param.background ?? NEXUS_CONFIG.DEFAULT_BACKGROUND, void 0, needColumnSize);
|
|
1051
|
+
const span = document.createElement("span");
|
|
1052
|
+
span.textContent = param.label instanceof Function ? param.label(param.data) ?? null : param.label ?? null;
|
|
1053
|
+
button.appendChild(span);
|
|
1054
|
+
button.onclick = (e) => param.onClick?.(e, button, param.data, param.displayOrder);
|
|
1055
|
+
if (param.url) {
|
|
1056
|
+
button.href = param.url;
|
|
1057
|
+
button.target = param.target ?? "_blank" /* Blank */;
|
|
1058
|
+
}
|
|
1059
|
+
if (parent) parent.appendChild(button);
|
|
1060
|
+
return button;
|
|
1061
|
+
};
|
|
1062
|
+
var Buttons = ({ buttons, buttonStyles, padding, border, maxHeight, boxDefaultClass, needColumnSize, pt }) => {
|
|
1063
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `row ${maxHeight ? "sb" : ""} ${boxDefaultClass ?? ""} r sm p${padding ?? 5} b${border ?? 0} ${pt !== void 0 ? `pt${pt}` : ""}`, children: buttons.map((button) => /* @__PURE__ */ jsxRuntime.jsx(Button, { button, needColumnSize, styles: buttonStyles }, button.id)) });
|
|
1064
|
+
};
|
|
1065
|
+
var CreateButtons = (buttons, parent, buttonStyles, columns, padding, border, maxHeight, boxDefaultClass, needColumnSize) => {
|
|
1066
|
+
if (!buttons || buttons.length === 0) return;
|
|
1067
|
+
maxHeight ?? (maxHeight = 25);
|
|
1068
|
+
const sortButtons = buttons.sort((a, b) => (a.displayOrder ?? 0) - (b.displayOrder ?? 0));
|
|
1069
|
+
const buttonBox = document.createElement("div");
|
|
1070
|
+
if (maxHeight) buttonBox.style.maxHeight = `${maxHeight}rem`;
|
|
1071
|
+
buttonBox.className = `row ${maxHeight ? "sb" : ""} ${boxDefaultClass ?? ""} r sm p${padding ?? 5} b${border ?? 0}`;
|
|
1072
|
+
for (const button of sortButtons) {
|
|
1073
|
+
if (columns && !button.columnSize) button.columnSize = columns;
|
|
1074
|
+
CreateButton(button, buttonBox, buttonStyles, needColumnSize);
|
|
1075
|
+
}
|
|
1076
|
+
if (parent) parent.appendChild(buttonBox);
|
|
1077
|
+
return buttonBox;
|
|
1078
|
+
};
|
|
1079
|
+
var _getPDefaultClass = (defaultClass, position) => `${defaultClass ?? ""} df ${position ?? "jc" /* Center */}`;
|
|
1080
|
+
var _getLinkDefaultClass = (linkDefaultClass, background) => `${background ?? "bg1" /* Background1 */} ${linkDefaultClass ?? "o08 ho1"} db h p2 r`;
|
|
1081
|
+
var _getLinkDefaultStyle = (borderBottom) => borderBottom ? DEFAULT_LINK_BUTTON_STYLE : { width: "fit-content" };
|
|
1082
|
+
var LinkButton = ({ url, label, defaultClass, linkDefaultClass, onClicked: onClicked2, borderBottom, background, target, position }) => {
|
|
1083
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: _getPDefaultClass(defaultClass, position), children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { style: _getLinkDefaultStyle(borderBottom), onClick: onClicked2 ?? void 0, target: target ?? void 0, className: _getLinkDefaultClass(linkDefaultClass, background), href: url, children: label }) });
|
|
1084
|
+
};
|
|
1085
|
+
var CreateLinkButton = (parent, url, label, onClicked2, defaultClass, linkDefaultClass, borderBottom, background, target, position) => {
|
|
1086
|
+
const p = document.createElement("p");
|
|
1087
|
+
p.className = _getPDefaultClass(defaultClass, position);
|
|
1088
|
+
const link = document.createElement("a");
|
|
1089
|
+
link.href = url;
|
|
1090
|
+
link.className = _getLinkDefaultClass(linkDefaultClass, background);
|
|
1091
|
+
link.onclick = onClicked2 ?? null;
|
|
1092
|
+
link.innerText = label;
|
|
1093
|
+
if (parent) parent.appendChild(p);
|
|
1094
|
+
p.appendChild(link);
|
|
1095
|
+
if (target) link.target = target;
|
|
1096
|
+
return p;
|
|
1097
|
+
};
|
|
1098
|
+
var GLOBAL_PAGE_TITLE_CLASS = (defaultClass, borderBottom, marginBottom, paddingBottom) => `fs-12 o09 fw600 ${defaultClass ?? ""} bb${borderBottom ?? 0} mb${marginBottom ?? 0} pb${paddingBottom ?? 0}`;
|
|
1099
|
+
var PageTitle = ({ title, defaultClass, borderBottom, marginBottom }) => {
|
|
1100
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h6", { className: GLOBAL_PAGE_TITLE_CLASS(defaultClass, borderBottom, marginBottom, borderBottom ? 2 : 0), children: title });
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
// src/helpers/string-helpers.tsx
|
|
1104
|
+
var ConvertToCode = (text) => text?.toString().toLowerCase().replace(/\s+/g, "-") ?? null;
|
|
1105
|
+
var IsNullOrEmpty = (value) => !(value !== null && value !== void 0 && value.toString().trim().length > 0);
|
|
1106
|
+
function MakeFirstLetterUpperCase(str) {
|
|
1107
|
+
if (!str) return str;
|
|
1108
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1109
|
+
}
|
|
1110
|
+
var GetRandomNumber = (min = 0, max = 100) => Math.floor(Math.random() * (max - min + 1)) + min;
|
|
1111
|
+
var GetRandomString = (length = 10, includeNumbers = true, includeSpecialChars = false) => {
|
|
1112
|
+
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + (includeNumbers ? "0123456789" : "") + (includeSpecialChars ? "!@#$%^&*()_+-=[]{}|;:,.<>?/" : "");
|
|
1113
|
+
let result = "";
|
|
1114
|
+
for (let i = 0; i < length; i++) {
|
|
1115
|
+
const randomIndex = Math.floor(Math.random() * characters.length);
|
|
1116
|
+
result += characters[randomIndex];
|
|
1117
|
+
}
|
|
1118
|
+
return result;
|
|
1119
|
+
};
|
|
1120
|
+
function PadStart(value, targetLength, padString = "0") {
|
|
1121
|
+
if (value == null || value === void 0) return "";
|
|
1122
|
+
const str = value?.toString();
|
|
1123
|
+
if (str.length >= targetLength) return str;
|
|
1124
|
+
return padString.repeat(targetLength - str.length) + str;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
// src/helpers/datasource-helpers.tsx
|
|
1128
|
+
function GetVisibleAndHiddenItems(allItems, visibleRef, hiddenRef, activeItem, maxVisibleCount) {
|
|
1129
|
+
let visibleItems = [];
|
|
1130
|
+
let hiddenItems = [];
|
|
1131
|
+
visibleRef.length = 0;
|
|
1132
|
+
hiddenRef.length = 0;
|
|
1133
|
+
if (allItems.length <= maxVisibleCount) {
|
|
1134
|
+
const _ = {
|
|
1135
|
+
visibleItems: allItems,
|
|
1136
|
+
hiddenItems: []
|
|
1137
|
+
};
|
|
1138
|
+
visibleRef.push(..._.visibleItems);
|
|
1139
|
+
hiddenRef.push(..._.hiddenItems);
|
|
1140
|
+
return _;
|
|
1141
|
+
}
|
|
1142
|
+
if (!activeItem || !allItems.includes(activeItem)) {
|
|
1143
|
+
visibleItems = allItems.slice(0, maxVisibleCount);
|
|
1144
|
+
hiddenItems = allItems.slice(maxVisibleCount);
|
|
1145
|
+
} else {
|
|
1146
|
+
const index = allItems.indexOf(activeItem);
|
|
1147
|
+
const selectedItem = allItems[index];
|
|
1148
|
+
visibleItems = allItems.slice(0, maxVisibleCount - 1);
|
|
1149
|
+
visibleItems.push(selectedItem);
|
|
1150
|
+
hiddenItems = allItems.slice(maxVisibleCount - 1);
|
|
1151
|
+
hiddenItems = hiddenItems.filter((item) => item !== selectedItem);
|
|
1152
|
+
if (index > maxVisibleCount - 1) ; else {
|
|
1153
|
+
visibleItems = allItems.slice(0, maxVisibleCount);
|
|
1154
|
+
hiddenItems = allItems.slice(maxVisibleCount);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
visibleRef.push(...visibleItems);
|
|
1158
|
+
hiddenRef.push(...hiddenItems);
|
|
1159
|
+
return { visibleItems, hiddenItems };
|
|
1160
|
+
}
|
|
1161
|
+
function DynamicSorting(data, key, isAsc) {
|
|
1162
|
+
return [...data].sort((a, b) => {
|
|
1163
|
+
const aValue = a[key];
|
|
1164
|
+
const bValue = b[key];
|
|
1165
|
+
let result = 0;
|
|
1166
|
+
if (aValue == null && bValue == null) return 0;
|
|
1167
|
+
if (aValue == null) return isAsc ? -1 : 1;
|
|
1168
|
+
if (bValue == null) return isAsc ? 1 : -1;
|
|
1169
|
+
if (typeof aValue === "number" && typeof bValue === "number") result = aValue - bValue;
|
|
1170
|
+
else if (typeof aValue === "string" && typeof bValue === "string") result = aValue.localeCompare(bValue);
|
|
1171
|
+
else if (aValue instanceof Date && bValue instanceof Date) result = aValue.getTime() - bValue.getTime();
|
|
1172
|
+
else if (typeof aValue === "object" && typeof bValue === "object") result = JSON.stringify(aValue).localeCompare(JSON.stringify(bValue));
|
|
1173
|
+
else result = String(aValue).localeCompare(String(bValue));
|
|
1174
|
+
return isAsc ? result : -result;
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
function CreateClone(data, index, object) {
|
|
1178
|
+
if (Array.isArray(data)) {
|
|
1179
|
+
let clonedArray = data.map((item) => ({ ...item }));
|
|
1180
|
+
if (index !== void 0 && object !== void 0) {
|
|
1181
|
+
clonedArray.splice(index, 0, { ...object });
|
|
1182
|
+
}
|
|
1183
|
+
return clonedArray;
|
|
1184
|
+
} else if (typeof data === "object" && data !== null)
|
|
1185
|
+
return { ...data };
|
|
1186
|
+
else throw new Error("Input must be an object or an array of objects");
|
|
1187
|
+
}
|
|
1188
|
+
var SearchDatasourceUsingColumns = (dataSource, searchText, columns) => {
|
|
1189
|
+
if (!dataSource || !Array.isArray(dataSource) || dataSource.length === 0 || !columns || columns.length === 0 || IsNullOrEmpty(searchText)) return dataSource;
|
|
1190
|
+
const searchableColumns = columns.filter((column) => column.isSearchable);
|
|
1191
|
+
if (searchableColumns.length === 0) return dataSource;
|
|
1192
|
+
const searchLower = searchText?.toLowerCase().trim();
|
|
1193
|
+
return dataSource.filter((data) => {
|
|
1194
|
+
return searchableColumns.some((column) => {
|
|
1195
|
+
if (column.systemName) {
|
|
1196
|
+
const value = data[column.systemName];
|
|
1197
|
+
return value && value.toString().toLowerCase().includes(searchLower);
|
|
1198
|
+
}
|
|
1199
|
+
return false;
|
|
1200
|
+
});
|
|
1201
|
+
});
|
|
1202
|
+
};
|
|
1203
|
+
var GetDialogId = (buttonIdentity) => `dialog-${buttonIdentity}`;
|
|
1204
|
+
var VISIBILITY_KEY = "data-dialog-visibility";
|
|
1205
|
+
var DEFAULT_DIALOGBOX_HOVER_EFFECT_DELAY = 500;
|
|
1206
|
+
var dialogRegistry = /* @__PURE__ */ new Map();
|
|
1207
|
+
var openDialogs = /* @__PURE__ */ new Set();
|
|
1208
|
+
var globalDocumentClickAttached = false;
|
|
1209
|
+
var globalDocumentClickTimeout;
|
|
1210
|
+
var shouldKeepDialogOpen = (entry, path, target) => {
|
|
1211
|
+
if (entry.iggnoreChildClick === false) return target === entry.triggerElement;
|
|
1212
|
+
return path.includes(entry.triggerElement) || path.includes(entry.affectedElement) || isClickInsideOpenNestedDialog(entry.triggerElement, path) || entry.triggerElement.contains(target);
|
|
1213
|
+
};
|
|
1214
|
+
var isClickInsideOpenNestedDialog = (parentTrigger, path) => {
|
|
1215
|
+
for (const trigger of openDialogs) {
|
|
1216
|
+
if (trigger === parentTrigger) continue;
|
|
1217
|
+
const nested = dialogRegistry.get(trigger);
|
|
1218
|
+
if (!nested || !parentTrigger.contains(nested.triggerElement)) continue;
|
|
1219
|
+
if (path.includes(nested.triggerElement) || path.includes(nested.affectedElement)) return true;
|
|
1220
|
+
}
|
|
1221
|
+
return false;
|
|
1222
|
+
};
|
|
1223
|
+
var onGlobalDocumentClick = (e) => {
|
|
1224
|
+
if (openDialogs.size === 0) return;
|
|
1225
|
+
const path = e.composedPath();
|
|
1226
|
+
const target = e.target;
|
|
1227
|
+
for (const trigger of [...openDialogs]) {
|
|
1228
|
+
const entry = dialogRegistry.get(trigger);
|
|
1229
|
+
if (!entry || shouldKeepDialogOpen(entry, path, target)) continue;
|
|
1230
|
+
entry.close(false);
|
|
1231
|
+
}
|
|
1232
|
+
};
|
|
1233
|
+
var scheduleGlobalDocumentClick = () => {
|
|
1234
|
+
clearTimeout(globalDocumentClickTimeout);
|
|
1235
|
+
globalDocumentClickTimeout = setTimeout(() => {
|
|
1236
|
+
if (openDialogs.size === 0) return;
|
|
1237
|
+
if (!globalDocumentClickAttached) {
|
|
1238
|
+
document.addEventListener("click", onGlobalDocumentClick);
|
|
1239
|
+
globalDocumentClickAttached = true;
|
|
1240
|
+
}
|
|
1241
|
+
}, 0);
|
|
1242
|
+
};
|
|
1243
|
+
var teardownGlobalDocumentClick = () => {
|
|
1244
|
+
if (openDialogs.size > 0) return;
|
|
1245
|
+
clearTimeout(globalDocumentClickTimeout);
|
|
1246
|
+
document.removeEventListener("click", onGlobalDocumentClick);
|
|
1247
|
+
globalDocumentClickAttached = false;
|
|
1248
|
+
};
|
|
1249
|
+
var closeOtherDialogs = (currentTrigger, isInitial) => {
|
|
1250
|
+
for (const trigger of openDialogs) {
|
|
1251
|
+
if (trigger === currentTrigger) continue;
|
|
1252
|
+
const entry = dialogRegistry.get(trigger);
|
|
1253
|
+
if (!entry) continue;
|
|
1254
|
+
if (entry.triggerElement.contains(currentTrigger)) continue;
|
|
1255
|
+
entry.close(isInitial);
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
var closeNestedDialogs = (parentTrigger, isInitial) => {
|
|
1259
|
+
for (const trigger of openDialogs) {
|
|
1260
|
+
if (trigger === parentTrigger) continue;
|
|
1261
|
+
const entry = dialogRegistry.get(trigger);
|
|
1262
|
+
if (!entry || !parentTrigger.contains(entry.triggerElement)) continue;
|
|
1263
|
+
entry.close(isInitial);
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
var registerDialog = (entry) => {
|
|
1267
|
+
dialogRegistry.set(entry.triggerElement, entry);
|
|
1268
|
+
};
|
|
1269
|
+
var unregisterDialog = (triggerElement) => {
|
|
1270
|
+
openDialogs.delete(triggerElement);
|
|
1271
|
+
dialogRegistry.delete(triggerElement);
|
|
1272
|
+
teardownGlobalDocumentClick();
|
|
1273
|
+
};
|
|
1274
|
+
var GlobalDialogbox = ({ children, hoverEffectDelay, position, buttonIdentity, background, defaultWidth, defaultPadding, iggnoreChildClick, isFixedHeight, defaultClass, preferTopWhenEnoughSpace }) => {
|
|
1275
|
+
const [isVisible, setIsVisible] = React__default.default.useState(false);
|
|
1276
|
+
const onVisibilityChanged = (visible) => {
|
|
1277
|
+
setIsVisible(visible);
|
|
1278
|
+
};
|
|
1279
|
+
const onDisposed = () => {
|
|
1280
|
+
};
|
|
1281
|
+
React.useEffect(() => {
|
|
1282
|
+
let dialogResults = null;
|
|
1283
|
+
const timeout = setTimeout(() => {
|
|
1284
|
+
clearTimeout(timeout);
|
|
1285
|
+
const button = document.getElementById(buttonIdentity);
|
|
1286
|
+
const dialog = document.getElementById(GetDialogId(buttonIdentity));
|
|
1287
|
+
if (!button || !dialog) return;
|
|
1288
|
+
const defaultHeight = isFixedHeight ? "80vh" : void 0;
|
|
1289
|
+
dialogResults = InitializeDialogbox(button, dialog, hoverEffectDelay, defaultHeight, defaultPadding, defaultWidth, background, onVisibilityChanged, onDisposed, iggnoreChildClick, position, defaultClass, preferTopWhenEnoughSpace, null);
|
|
1290
|
+
}, 0);
|
|
1291
|
+
return () => {
|
|
1292
|
+
dialogResults?.destroy();
|
|
1293
|
+
clearTimeout(timeout);
|
|
1294
|
+
};
|
|
1295
|
+
}, []);
|
|
1296
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { id: GetDialogId(buttonIdentity), children: isVisible && children });
|
|
1297
|
+
};
|
|
1298
|
+
var InitializeDialogbox = (triggerElement, affectedElement, hoverEffectDelay, defaultHeight, defaultPadding, defaultWidth, background, onVisibilityChanged, onDisposed, iggnoreChildClick, position, defaultClass, preferTopWhenEnoughSpace, targetInput, isAutoHideInInitialization) => {
|
|
1299
|
+
if (!triggerElement || !affectedElement) return null;
|
|
1300
|
+
defaultPadding = defaultPadding ?? 5;
|
|
1301
|
+
defaultWidth = defaultWidth ?? 34;
|
|
1302
|
+
const isTargetForInput = targetInput ? true : false;
|
|
1303
|
+
const forceUpdate = (index) => {
|
|
1304
|
+
if (index === 0) {
|
|
1305
|
+
affectedElement.classList.remove("anim", "dn");
|
|
1306
|
+
} else if (index === 1) {
|
|
1307
|
+
affectedElement.classList.add("dn");
|
|
1308
|
+
affectedElement.classList.remove("anim");
|
|
1309
|
+
}
|
|
1310
|
+
};
|
|
1311
|
+
const forceUpdateDebounced = Debounce(forceUpdate, 300);
|
|
1312
|
+
const refreshDialog = () => {
|
|
1313
|
+
const dialog = affectedElement;
|
|
1314
|
+
const parentElement = triggerElement;
|
|
1315
|
+
if (!parentElement) return;
|
|
1316
|
+
const inputRec = parentElement.getBoundingClientRect();
|
|
1317
|
+
const boxRec = dialog.getBoundingClientRect();
|
|
1318
|
+
const style = window.getComputedStyle(parentElement);
|
|
1319
|
+
const inputHeight = inputRec.height + parseFloat(style.borderBottomWidth) + parseFloat(style.borderTopWidth);
|
|
1320
|
+
const top = inputRec.top + inputHeight;
|
|
1321
|
+
const windowHeight = window.innerHeight;
|
|
1322
|
+
const bottomOverflow = top + boxRec.height;
|
|
1323
|
+
dialog.classList.remove("T");
|
|
1324
|
+
const topSpace = inputRec.top - boxRec.height;
|
|
1325
|
+
const bottomSpace = windowHeight - (inputRec.top + inputHeight + boxRec.height);
|
|
1326
|
+
if (!isTargetForInput) {
|
|
1327
|
+
if (preferTopWhenEnoughSpace && topSpace > 0 && bottomSpace > 0) {
|
|
1328
|
+
dialog.classList.add("T");
|
|
1329
|
+
dialog.style.top = `${top - inputHeight - boxRec.height}px`;
|
|
1330
|
+
} else if (bottomOverflow > windowHeight) {
|
|
1331
|
+
if (top - inputHeight - boxRec.height > 0) {
|
|
1332
|
+
dialog.classList.add("T");
|
|
1333
|
+
dialog.style.top = `${top - inputHeight - boxRec.height}px`;
|
|
1334
|
+
} else {
|
|
1335
|
+
dialog.style.top = `${windowHeight - boxRec.height}px`;
|
|
1336
|
+
}
|
|
1337
|
+
} else {
|
|
1338
|
+
dialog.style.top = `${top}px`;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
const DEFAULT_PADDING = ConvertRemToPixels(1);
|
|
1342
|
+
if (position === "right" /* Right */) dialog.style.left = `${inputRec.right - boxRec.width}px`;
|
|
1343
|
+
else if (position === "left" /* Left */) dialog.style.left = `${inputRec.left}px`;
|
|
1344
|
+
else if (position === "center" /* Center */) dialog.style.left = `${inputRec.left + inputRec.width / 2 - boxRec.width / 2}px`;
|
|
1345
|
+
if (!position) {
|
|
1346
|
+
if (inputRec.left + boxRec.width > window.innerWidth) dialog.style.left = `${window.innerWidth - boxRec.width - DEFAULT_PADDING}px`;
|
|
1347
|
+
else dialog.style.left = `${inputRec.left}px`;
|
|
1348
|
+
} else {
|
|
1349
|
+
const currentLeft = parseFloat(dialog.style.left);
|
|
1350
|
+
if (!isNaN(currentLeft) && currentLeft + boxRec.width > window.innerWidth) {
|
|
1351
|
+
dialog.style.left = `${window.innerWidth - boxRec.width - DEFAULT_PADDING}px`;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
if (parseFloat(dialog.style.left) < DEFAULT_PADDING) dialog.style.left = `${DEFAULT_PADDING}px`;
|
|
1355
|
+
const dialogRect = dialog.getBoundingClientRect();
|
|
1356
|
+
const inputCenterX = inputRec.left + inputRec.width / 2;
|
|
1357
|
+
let arrowLeft = inputCenterX - dialogRect.left + ConvertRemToPixels(0.15);
|
|
1358
|
+
const ARROW_MARGIN = ConvertRemToPixels(1);
|
|
1359
|
+
arrowLeft = Math.max(ARROW_MARGIN, Math.min(arrowLeft, boxRec.width - ARROW_MARGIN));
|
|
1360
|
+
dialog.style.setProperty("--arrow-left", `${arrowLeft}px`);
|
|
1361
|
+
const pxWidth = inputRec.width;
|
|
1362
|
+
const DEFAULT_WIDTH = ConvertRemToPixels(defaultWidth);
|
|
1363
|
+
dialog.style.width = `${Math.max(pxWidth, DEFAULT_WIDTH)}px`;
|
|
1364
|
+
};
|
|
1365
|
+
const _onMouseEnter = (e) => {
|
|
1366
|
+
if (!triggerElement.matches(":hover")) return;
|
|
1367
|
+
if (e.target !== triggerElement) return;
|
|
1368
|
+
const isVisible = triggerElement.getAttribute(VISIBILITY_KEY) === "true";
|
|
1369
|
+
if (!isVisible) visibility(true, false);
|
|
1370
|
+
};
|
|
1371
|
+
let hoverListenersAttached = false;
|
|
1372
|
+
let onMouseEnterDebounced = null;
|
|
1373
|
+
const getHoverDebounce = () => {
|
|
1374
|
+
if (!onMouseEnterDebounced) {
|
|
1375
|
+
onMouseEnterDebounced = Debounce(_onMouseEnter, (hoverEffectDelay === true ? DEFAULT_DIALOGBOX_HOVER_EFFECT_DELAY : hoverEffectDelay) ?? DEFAULT_DIALOGBOX_HOVER_EFFECT_DELAY);
|
|
1376
|
+
}
|
|
1377
|
+
return onMouseEnterDebounced;
|
|
1378
|
+
};
|
|
1379
|
+
const onMouseLeaveCancelHover = () => {
|
|
1380
|
+
onMouseEnterDebounced?.cancel();
|
|
1381
|
+
};
|
|
1382
|
+
const attachHoverListeners = () => {
|
|
1383
|
+
if (!hoverEffectDelay || hoverListenersAttached) return;
|
|
1384
|
+
triggerElement.addEventListener("mouseenter", getHoverDebounce());
|
|
1385
|
+
triggerElement.addEventListener("mouseleave", onMouseLeaveCancelHover);
|
|
1386
|
+
hoverListenersAttached = true;
|
|
1387
|
+
};
|
|
1388
|
+
const onHoverProxy = (e) => {
|
|
1389
|
+
attachHoverListeners();
|
|
1390
|
+
triggerElement.removeEventListener("mouseenter", onHoverProxy);
|
|
1391
|
+
getHoverDebounce()(e);
|
|
1392
|
+
};
|
|
1393
|
+
const setupDialog = () => {
|
|
1394
|
+
triggerElement.addEventListener("click", onClick);
|
|
1395
|
+
if (hoverEffectDelay) triggerElement.addEventListener("mouseenter", onHoverProxy);
|
|
1396
|
+
if (isTargetForInput) {
|
|
1397
|
+
triggerElement.addEventListener("focusin", onFocus);
|
|
1398
|
+
triggerElement.addEventListener("focusout", onFocusOut);
|
|
1399
|
+
document.addEventListener("keydown", onKeyDown, true);
|
|
1400
|
+
}
|
|
1401
|
+
const timeout = setTimeout(() => {
|
|
1402
|
+
clearTimeout(timeout);
|
|
1403
|
+
refreshDialog();
|
|
1404
|
+
isAutoHideInInitialization = isAutoHideInInitialization ?? true;
|
|
1405
|
+
visibility(!isAutoHideInInitialization, true);
|
|
1406
|
+
}, 0);
|
|
1407
|
+
};
|
|
1408
|
+
const cleanupDialog = () => {
|
|
1409
|
+
triggerElement.setAttribute(VISIBILITY_KEY, "false");
|
|
1410
|
+
triggerElement.removeEventListener("click", onClick);
|
|
1411
|
+
if (hoverEffectDelay) {
|
|
1412
|
+
triggerElement.removeEventListener("mouseenter", onHoverProxy);
|
|
1413
|
+
if (hoverListenersAttached) {
|
|
1414
|
+
triggerElement.removeEventListener("mouseenter", getHoverDebounce());
|
|
1415
|
+
triggerElement.removeEventListener("mouseleave", onMouseLeaveCancelHover);
|
|
1416
|
+
onMouseEnterDebounced?.cancel();
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
clearTimeout(visibilityTimeout);
|
|
1420
|
+
teardownGlobalDocumentClick();
|
|
1421
|
+
if (isTargetForInput) {
|
|
1422
|
+
triggerElement.removeEventListener("focusin", onFocus);
|
|
1423
|
+
triggerElement.removeEventListener("focusout", onFocusOut);
|
|
1424
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
1425
|
+
document.removeEventListener("scroll", onDocumentScroll);
|
|
1426
|
+
}
|
|
1427
|
+
unregisterDialog(triggerElement);
|
|
1428
|
+
onDisposed?.();
|
|
1429
|
+
};
|
|
1430
|
+
let visibilityTimeout;
|
|
1431
|
+
const visibility = (visible, isInitial) => {
|
|
1432
|
+
const isVisible = visible;
|
|
1433
|
+
if (!triggerElement) return;
|
|
1434
|
+
if (isVisible) {
|
|
1435
|
+
if (!isInitial) closeOtherDialogs(triggerElement, false);
|
|
1436
|
+
openDialogs.add(triggerElement);
|
|
1437
|
+
scheduleGlobalDocumentClick();
|
|
1438
|
+
clearTimeout(visibilityTimeout);
|
|
1439
|
+
forceUpdateDebounced.cancel();
|
|
1440
|
+
onMouseEnterDebounced?.cancel();
|
|
1441
|
+
onVisibilityChanged?.(isVisible);
|
|
1442
|
+
refreshDialog();
|
|
1443
|
+
const timeout2 = setTimeout(() => {
|
|
1444
|
+
clearTimeout(timeout2);
|
|
1445
|
+
refreshDialog();
|
|
1446
|
+
}, 0);
|
|
1447
|
+
affectedElement.classList.remove("dn");
|
|
1448
|
+
affectedElement.style.pointerEvents = "";
|
|
1449
|
+
const timeout = setTimeout(() => {
|
|
1450
|
+
clearTimeout(timeout);
|
|
1451
|
+
affectedElement.classList.remove("o0");
|
|
1452
|
+
affectedElement.classList.add("anim");
|
|
1453
|
+
triggerElement.setAttribute(VISIBILITY_KEY, "true");
|
|
1454
|
+
}, 10);
|
|
1455
|
+
forceUpdateDebounced(0);
|
|
1456
|
+
if (isTargetForInput) document.addEventListener("scroll", onDocumentScroll);
|
|
1457
|
+
} else {
|
|
1458
|
+
if (!isInitial) closeNestedDialogs(triggerElement, false);
|
|
1459
|
+
openDialogs.delete(triggerElement);
|
|
1460
|
+
teardownGlobalDocumentClick();
|
|
1461
|
+
if (isTargetForInput) document.removeEventListener("scroll", onDocumentScroll);
|
|
1462
|
+
affectedElement.classList.add("o0", "anim");
|
|
1463
|
+
affectedElement.style.pointerEvents = "none";
|
|
1464
|
+
if (isInitial) forceUpdate(1);
|
|
1465
|
+
forceUpdateDebounced(1);
|
|
1466
|
+
visibilityTimeout = setTimeout(() => {
|
|
1467
|
+
if (!isInitial) onVisibilityChanged?.(false);
|
|
1468
|
+
clearTimeout(visibilityTimeout);
|
|
1469
|
+
triggerElement.setAttribute(VISIBILITY_KEY, "false");
|
|
1470
|
+
}, DEFAULT_ANIMATION_DURATION);
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1473
|
+
const onKeyDown = (e) => {
|
|
1474
|
+
if (IsKeyPressed(e, "Tab" /* TAB */)) {
|
|
1475
|
+
if (document.activeElement !== triggerElement) visibility(false, false);
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
const onClick = (e) => {
|
|
1479
|
+
const isOpen = triggerElement.getAttribute(VISIBILITY_KEY) === "true";
|
|
1480
|
+
const target = e.target;
|
|
1481
|
+
if (isOpen && target.id !== triggerElement.id && target !== triggerElement) return;
|
|
1482
|
+
if (isOpen && isTargetForInput) return;
|
|
1483
|
+
visibility(!isOpen, false);
|
|
1484
|
+
e.stopPropagation();
|
|
1485
|
+
};
|
|
1486
|
+
const onFocus = (e) => {
|
|
1487
|
+
if (isTargetForInput) visibility(true, false);
|
|
1488
|
+
};
|
|
1489
|
+
const onFocusOut = (e) => {
|
|
1490
|
+
if (!isTargetForInput) return;
|
|
1491
|
+
if (!triggerElement) return;
|
|
1492
|
+
if (!e.relatedTarget || triggerElement.contains(e.relatedTarget)) return;
|
|
1493
|
+
visibility(false, false);
|
|
1494
|
+
};
|
|
1495
|
+
const onDocumentScroll = (e) => {
|
|
1496
|
+
};
|
|
1497
|
+
registerDialog({
|
|
1498
|
+
triggerElement,
|
|
1499
|
+
affectedElement,
|
|
1500
|
+
iggnoreChildClick,
|
|
1501
|
+
close: (isInitial) => visibility(false, isInitial)
|
|
1502
|
+
});
|
|
1503
|
+
if (!affectedElement.classList.contains("dialog")) {
|
|
1504
|
+
affectedElement.className = defaultClass ?? "dialog";
|
|
1505
|
+
affectedElement.classList.add("pf", "r", "bs2", "b1", "df", "ddc", `p${defaultPadding}`, background ?? NEXUS_CONFIG.DEFAULT_BACKGROUND, position ?? "left" /* Left */);
|
|
1506
|
+
setupDialog();
|
|
1507
|
+
affectedElement.style.maxWidth = `calc(100vw - ${ConvertRemToPixels(2)}px)`;
|
|
1508
|
+
affectedElement.style.maxHeight = `calc(80vh)`;
|
|
1509
|
+
}
|
|
1510
|
+
if (isTargetForInput && !affectedElement.classList.contains("input-dialog")) affectedElement.classList.add("input-dialog");
|
|
1511
|
+
return {
|
|
1512
|
+
destroy: cleanupDialog,
|
|
1513
|
+
visibility,
|
|
1514
|
+
isValid: () => !!affectedElement?.parentElement
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
var THEME_MENU_ELIPSE_BTN_ID = "theme-menu-ellipse-btn";
|
|
1518
|
+
var GetMaxVisibleButtons = (parentWidth) => parentWidth > 1400 ? 8 : parentWidth > 1200 ? 7 : parentWidth > 1e3 ? 6 : parentWidth > 950 ? 5 : parentWidth > 750 ? 4 : parentWidth > 600 ? 3 : 2;
|
|
1519
|
+
function CreateTabButtons(buttons, parent, activeButton, onClicked2) {
|
|
1520
|
+
if (!buttons || buttons.length === 0) return null;
|
|
1521
|
+
const elementList = [];
|
|
1522
|
+
const toggleButton = CreateToggleButton();
|
|
1523
|
+
const themeContainer = document.createElement("div");
|
|
1524
|
+
const visibleItems = [];
|
|
1525
|
+
const hiddenItems = [];
|
|
1526
|
+
const dataKey = "code";
|
|
1527
|
+
const dataAttributeKey = "data-menu-code";
|
|
1528
|
+
let dialogBoxObject = null;
|
|
1529
|
+
let maxVisible = 6;
|
|
1530
|
+
let activeItem = activeButton ?? buttons[0];
|
|
1531
|
+
let linkButtons = void 0;
|
|
1532
|
+
toggleButton.appendChild(themeContainer);
|
|
1533
|
+
const buttonContainer = document.createElement("div");
|
|
1534
|
+
buttonContainer.className = "df ac jc r";
|
|
1535
|
+
if (parent) parent.appendChild(buttonContainer);
|
|
1536
|
+
const onButtonClicked = (event, element, button, index) => {
|
|
1537
|
+
if (button === activeItem) return;
|
|
1538
|
+
activeItem = button;
|
|
1539
|
+
if (onClicked2) onClicked2(event, element, button, index);
|
|
1540
|
+
const isHiddenItemClicked = hiddenItems.some((item) => item === button);
|
|
1541
|
+
GetVisibleAndHiddenItems(buttons, visibleItems, hiddenItems, activeItem, maxVisible);
|
|
1542
|
+
RenderChildren(buttonContainer, elementList, toggleButton, activeItem, visibleItems, hiddenItems, createButton, refreshElementClass, false, isHiddenItemClicked, dataKey, dataAttributeKey);
|
|
1543
|
+
};
|
|
1544
|
+
for (const button of buttons) button.onClick = (event, element, data, index) => onButtonClicked(event, element, button);
|
|
1545
|
+
const createButton = (button) => {
|
|
1546
|
+
const btn = CreateButton(button, buttonContainer, null, false);
|
|
1547
|
+
if (button.id) {
|
|
1548
|
+
btn.setAttribute(dataAttributeKey, `btn-code-${button.id}`);
|
|
1549
|
+
btn.id = button.id;
|
|
1550
|
+
}
|
|
1551
|
+
btn.classList.add("jc");
|
|
1552
|
+
btn.style.height = "var(--IW)";
|
|
1553
|
+
refreshElementClass(btn, activeItem);
|
|
1554
|
+
return btn;
|
|
1555
|
+
};
|
|
1556
|
+
const refreshElementClass = (element, activeItem2) => {
|
|
1557
|
+
const menuCode = element?.getAttribute(dataAttributeKey);
|
|
1558
|
+
const isActive = activeItem2?.id && `btn-code-${activeItem2?.id}` === menuCode;
|
|
1559
|
+
SET_BUTTON_ACTIVE_CLASS(isActive, element);
|
|
1560
|
+
const icon = element.querySelector(DEFAULT_ICON_ELEMENT_NAME);
|
|
1561
|
+
if (isActive) {
|
|
1562
|
+
element.classList.add("active");
|
|
1563
|
+
if (document.activeElement) document.activeElement.blur();
|
|
1564
|
+
if (icon) icon.setAttribute("name", activeItem2.icon ?? "");
|
|
1565
|
+
} else {
|
|
1566
|
+
element.classList.remove("active");
|
|
1567
|
+
if (activeItem2) {
|
|
1568
|
+
if (icon) {
|
|
1569
|
+
let iconName = icon.getAttribute("name");
|
|
1570
|
+
if (iconName && !iconName.endsWith("-outline")) iconName += "-outline";
|
|
1571
|
+
icon.setAttribute("name", iconName ?? "");
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
const onVisibility = (isVisible) => {
|
|
1577
|
+
if (linkButtons) linkButtons.remove();
|
|
1578
|
+
linkButtons = CreateButtons(hiddenItems, themeContainer, null, 6, 0);
|
|
1579
|
+
};
|
|
1580
|
+
const parentBound = parent?.getBoundingClientRect();
|
|
1581
|
+
const parentWidth = parentBound ? parentBound.width : 1e3;
|
|
1582
|
+
maxVisible = GetMaxVisibleButtons(parentWidth);
|
|
1583
|
+
GetVisibleAndHiddenItems(buttons, visibleItems, hiddenItems, activeItem, maxVisible);
|
|
1584
|
+
RenderChildren(buttonContainer, elementList, toggleButton, activeItem, visibleItems, hiddenItems, createButton, refreshElementClass, true, false, dataKey, dataAttributeKey);
|
|
1585
|
+
if (hiddenItems.length > 0) {
|
|
1586
|
+
linkButtons = CreateButtons(hiddenItems, themeContainer, null, 6, 0);
|
|
1587
|
+
dialogBoxObject = InitializeDialogbox(toggleButton, themeContainer, true, void 0, void 0, 40, void 0, onVisibility, void 0, false, "right" /* Right */, void 0, void 0, void 0, true);
|
|
1588
|
+
dialogBoxObject?.visibility(false, true);
|
|
1589
|
+
}
|
|
1590
|
+
return buttonContainer;
|
|
1591
|
+
}
|
|
1592
|
+
var TabButtons = ({ buttons, activeButton, onClicked: onClicked2 }) => {
|
|
1593
|
+
const [tabButtons, setTabButtons] = React.useState({ visibleButtons: null, hiddenButtons: null });
|
|
1594
|
+
const [activeItem, setActiveItem] = React.useState(null);
|
|
1595
|
+
const tabContainerRef = React__default.default.useRef(null);
|
|
1596
|
+
React.useEffect(() => {
|
|
1597
|
+
const timeout = setTimeout(() => {
|
|
1598
|
+
clearTimeout(timeout);
|
|
1599
|
+
const tabContainer = tabContainerRef.current;
|
|
1600
|
+
if (!tabContainer || !buttons || buttons.length === 0) return;
|
|
1601
|
+
const sortingButtons = DynamicSorting(buttons, "displayOrder", true);
|
|
1602
|
+
const newButtons = CreateClone(sortingButtons);
|
|
1603
|
+
const parentBound = tabContainer.getBoundingClientRect();
|
|
1604
|
+
const parentWidth = parentBound.width;
|
|
1605
|
+
const maxVisible = GetMaxVisibleButtons(parentWidth);
|
|
1606
|
+
const visibleItems = [];
|
|
1607
|
+
const hiddenItems = [];
|
|
1608
|
+
const active = typeof activeButton === "function" ? newButtons.find((btn) => btn.id === activeButton()) ?? newButtons[0] : newButtons.find((btn) => btn.id === (activeItem ?? activeButton)) ?? newButtons[0];
|
|
1609
|
+
GetVisibleAndHiddenItems(newButtons, visibleItems, hiddenItems, active, maxVisible);
|
|
1610
|
+
for (const btn of visibleItems) {
|
|
1611
|
+
if (active && active.id && btn.id === active.id) {
|
|
1612
|
+
btn.iconType = "" /* FILLED */;
|
|
1613
|
+
btn.defaultClass = "btn active jc r";
|
|
1614
|
+
} else btn.defaultClass = "bg1 jc r";
|
|
1615
|
+
}
|
|
1616
|
+
for (const btn of hiddenItems) btn.defaultClass = "bg1";
|
|
1617
|
+
for (const btn of newButtons) {
|
|
1618
|
+
btn.onClick = (event, element, data, index) => {
|
|
1619
|
+
if (btn.id === activeItem) return;
|
|
1620
|
+
if (onClicked2) onClicked2(event, element, btn, index);
|
|
1621
|
+
setActiveItem(btn.id ?? null);
|
|
1622
|
+
};
|
|
1623
|
+
}
|
|
1624
|
+
setTabButtons({ visibleButtons: visibleItems, hiddenButtons: hiddenItems.length > 0 ? hiddenItems : null });
|
|
1625
|
+
}, 0);
|
|
1626
|
+
return () => clearTimeout(timeout);
|
|
1627
|
+
}, [buttons, activeItem, onClicked2]);
|
|
1628
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: tabContainerRef, className: "df ac jc r", children: [
|
|
1629
|
+
tabButtons.visibleButtons?.map((btn) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1630
|
+
Button,
|
|
1631
|
+
{
|
|
1632
|
+
styles: {
|
|
1633
|
+
height: "var(--IW)"
|
|
1634
|
+
},
|
|
1635
|
+
button: btn
|
|
1636
|
+
},
|
|
1637
|
+
btn.id
|
|
1638
|
+
)),
|
|
1639
|
+
tabButtons.hiddenButtons && /* @__PURE__ */ jsxRuntime.jsx(Iconbox, { defaultClass: "ml5", icon: "ellipsis-horizontal" /* ELLIPSIS_HORIZONTAL */, iconType: "" /* FILLED */, iconDefaultClass: "r90", id: THEME_MENU_ELIPSE_BTN_ID, children: /* @__PURE__ */ jsxRuntime.jsx(GlobalDialogbox, { defaultPadding: 0, iggnoreChildClick: false, buttonIdentity: THEME_MENU_ELIPSE_BTN_ID, position: "right" /* Right */, children: /* @__PURE__ */ jsxRuntime.jsx(Buttons, { buttons: tabButtons.hiddenButtons }) }) })
|
|
1640
|
+
] });
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
// src/interfaces/input-interfaces.tsx
|
|
1644
|
+
var DEFAULT_INPUT_BACKGROUND = "bg1" /* Background1 */;
|
|
1645
|
+
var MAX_INPUT_TYPE = 1900;
|
|
1646
|
+
var DEFAULT_INPUT_BORDER_SIZE = 1;
|
|
1647
|
+
var DEFAULT_TEXTAREA_ROWS = 3;
|
|
1648
|
+
var REQUIRED_TEXT1 = "\u2732";
|
|
1649
|
+
var EValueChangeTypes = /* @__PURE__ */ ((EValueChangeTypes2) => {
|
|
1650
|
+
EValueChangeTypes2[EValueChangeTypes2["Default"] = 0] = "Default";
|
|
1651
|
+
EValueChangeTypes2[EValueChangeTypes2["ForceChanged"] = 1] = "ForceChanged";
|
|
1652
|
+
EValueChangeTypes2[EValueChangeTypes2["FormCleared"] = 2] = "FormCleared";
|
|
1653
|
+
EValueChangeTypes2[EValueChangeTypes2["FormReset"] = 3] = "FormReset";
|
|
1654
|
+
EValueChangeTypes2[EValueChangeTypes2["Disposed"] = 4] = "Disposed";
|
|
1655
|
+
return EValueChangeTypes2;
|
|
1656
|
+
})(EValueChangeTypes || {});
|
|
1657
|
+
var ERegexs = /* @__PURE__ */ ((ERegexs2) => {
|
|
1658
|
+
ERegexs2["Fullname"] = "^[A-Za-z]+(?: [A-Za-z]+)*[0-9]?$";
|
|
1659
|
+
ERegexs2["Username"] = "^[A-Za-z0-9]{7,30}$";
|
|
1660
|
+
ERegexs2["ContactNumber"] = "^[0-9]{10}$";
|
|
1661
|
+
ERegexs2["ContactNumber_NULL"] = "^$|^[0-9]{10}$";
|
|
1662
|
+
ERegexs2["Email"] = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$";
|
|
1663
|
+
ERegexs2["Email_NULL"] = "^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$";
|
|
1664
|
+
ERegexs2["EmailUsername"] = "^(?=.*[a-zA-Z0-9])[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]{2,}$|[a-zA-Z0-9]{8,100}$";
|
|
1665
|
+
ERegexs2["Password"] = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*()_+{}|:,.<>?/~]).{8,30}$";
|
|
1666
|
+
ERegexs2["EmailUsernameContact"] = "^(?:[A-Za-z]+[A-Za-z0-9]{2,30}|[0-9]{10}|[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})$";
|
|
1667
|
+
ERegexs2["Hexadecimal"] = "^[0-9A-Fa-f]{8}$";
|
|
1668
|
+
ERegexs2["ContactEmail"] = "^(?:[0-9]{10}|[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})$";
|
|
1669
|
+
return ERegexs2;
|
|
1670
|
+
})(ERegexs || {});
|
|
1671
|
+
var EInputTypes = /* @__PURE__ */ ((EInputTypes2) => {
|
|
1672
|
+
EInputTypes2[EInputTypes2["Textbox"] = 1] = "Textbox";
|
|
1673
|
+
EInputTypes2[EInputTypes2["Textarea"] = 5] = "Textarea";
|
|
1674
|
+
EInputTypes2[EInputTypes2["Texteditor"] = 10] = "Texteditor";
|
|
1675
|
+
EInputTypes2[EInputTypes2["Timepicker"] = 15] = "Timepicker";
|
|
1676
|
+
EInputTypes2[EInputTypes2["Datepicker"] = 20] = "Datepicker";
|
|
1677
|
+
EInputTypes2[EInputTypes2["Datetimepicker"] = 25] = "Datetimepicker";
|
|
1678
|
+
EInputTypes2[EInputTypes2["DateRangepicker"] = 30] = "DateRangepicker";
|
|
1679
|
+
EInputTypes2[EInputTypes2["DatetimeRangepicker"] = 35] = "DatetimeRangepicker";
|
|
1680
|
+
EInputTypes2[EInputTypes2["SingleSelection"] = 40] = "SingleSelection";
|
|
1681
|
+
EInputTypes2[EInputTypes2["MultiSelection"] = 45] = "MultiSelection";
|
|
1682
|
+
EInputTypes2[EInputTypes2["Checkbox"] = 50] = "Checkbox";
|
|
1683
|
+
EInputTypes2[EInputTypes2["Radiobox"] = 55] = "Radiobox";
|
|
1684
|
+
EInputTypes2[EInputTypes2["Radiogroup"] = 60] = "Radiogroup";
|
|
1685
|
+
EInputTypes2[EInputTypes2["Number"] = 65] = "Number";
|
|
1686
|
+
EInputTypes2[EInputTypes2["TabularForm"] = 70] = "TabularForm";
|
|
1687
|
+
EInputTypes2[EInputTypes2["InputForm"] = 75] = "InputForm";
|
|
1688
|
+
EInputTypes2[EInputTypes2["Range"] = 80] = "Range";
|
|
1689
|
+
EInputTypes2[EInputTypes2["Slider"] = 85] = "Slider";
|
|
1690
|
+
EInputTypes2[EInputTypes2["LinkButton"] = 2e3] = "LinkButton";
|
|
1691
|
+
EInputTypes2[EInputTypes2["HtmlElement"] = 3e3] = "HtmlElement";
|
|
1692
|
+
EInputTypes2[EInputTypes2["FormTitle"] = 4e3] = "FormTitle";
|
|
1693
|
+
EInputTypes2[EInputTypes2["SubmitButton"] = 5e3] = "SubmitButton";
|
|
1694
|
+
return EInputTypes2;
|
|
1695
|
+
})(EInputTypes || {});
|
|
1696
|
+
var GetForms = {
|
|
1697
|
+
FORM: (inputs, parentIdentifier, onChanged, defaultValue, index, isTabularForm) => ({ inputs, onChanged, index: index ?? 0, isTabularForm: isTabularForm ?? false, parentIdentifier, defaultValue })
|
|
1698
|
+
};
|
|
1699
|
+
var GetInputs = {
|
|
1700
|
+
ICON: (icon, iconSize, boxSize, opacity, type, background, onClicked2, onMouseEnter) => ({
|
|
1701
|
+
icon,
|
|
1702
|
+
iconSize,
|
|
1703
|
+
boxSize,
|
|
1704
|
+
opacity,
|
|
1705
|
+
type,
|
|
1706
|
+
background,
|
|
1707
|
+
onClicked: onClicked2,
|
|
1708
|
+
onMouseEnter
|
|
1709
|
+
}),
|
|
1710
|
+
TEXTBOX: (id, columnSize, displayOrder, label, placeholder, validatorKey, minLength, maxLength, regexKey, isPassword, isReadonly, isAutoComplete, defaultValue, background, borderSize, inputSize, icon, defaultClass, onChanged) => ({
|
|
1711
|
+
id,
|
|
1712
|
+
columnSize,
|
|
1713
|
+
displayOrder,
|
|
1714
|
+
label,
|
|
1715
|
+
placeholder,
|
|
1716
|
+
validatorKey,
|
|
1717
|
+
minLength,
|
|
1718
|
+
maxLength,
|
|
1719
|
+
regexKey,
|
|
1720
|
+
defaultValue,
|
|
1721
|
+
background,
|
|
1722
|
+
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
1723
|
+
inputSize,
|
|
1724
|
+
isPassword,
|
|
1725
|
+
icon,
|
|
1726
|
+
isReadonly,
|
|
1727
|
+
defaultClass,
|
|
1728
|
+
onChanged,
|
|
1729
|
+
isRequired: (minLength !== void 0 && minLength !== null && minLength > 0) ?? false,
|
|
1730
|
+
inputType: 1 /* Textbox */,
|
|
1731
|
+
autoComplete: isAutoComplete !== false ? void 0 : "off"
|
|
1732
|
+
}),
|
|
1733
|
+
TEXTAREA: (id, columnSize, displayOrder, label, placeholder, validatorKey, minLength, maxLength, rows, isShowPreview, defaultValue, regexKey, isReadonly, isAutoComplete, background, borderSize, inputSize, icon, defaultClass, onChanged) => ({
|
|
1734
|
+
id,
|
|
1735
|
+
columnSize,
|
|
1736
|
+
displayOrder,
|
|
1737
|
+
label,
|
|
1738
|
+
placeholder,
|
|
1739
|
+
validatorKey,
|
|
1740
|
+
minLength,
|
|
1741
|
+
maxLength,
|
|
1742
|
+
isShowPreview,
|
|
1743
|
+
rows: rows ?? DEFAULT_TEXTAREA_ROWS,
|
|
1744
|
+
regexKey,
|
|
1745
|
+
defaultValue,
|
|
1746
|
+
background,
|
|
1747
|
+
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
1748
|
+
inputSize,
|
|
1749
|
+
icon,
|
|
1750
|
+
isReadonly,
|
|
1751
|
+
defaultClass,
|
|
1752
|
+
onChanged,
|
|
1753
|
+
isRequired: (minLength !== void 0 && minLength !== null && minLength > 0) ?? false,
|
|
1754
|
+
inputType: 5 /* Textarea */,
|
|
1755
|
+
autoComplete: isAutoComplete !== false ? void 0 : "off"
|
|
1756
|
+
}),
|
|
1757
|
+
NUMBER: (id, columnSize, displayOrder, label, placeholder, validatorKey, floatingPoint, isAutoAdjust, step, minLength, maxLength, defaultValue, isAutoComplete, background, borderSize, inputSize, icon, isReadonly, defaultClass, onChanged) => ({
|
|
1758
|
+
id,
|
|
1759
|
+
columnSize,
|
|
1760
|
+
displayOrder,
|
|
1761
|
+
label,
|
|
1762
|
+
placeholder,
|
|
1763
|
+
validatorKey,
|
|
1764
|
+
minLength,
|
|
1765
|
+
maxLength,
|
|
1766
|
+
floatingPoint,
|
|
1767
|
+
isAutoAdjust,
|
|
1768
|
+
step,
|
|
1769
|
+
defaultValue,
|
|
1770
|
+
background,
|
|
1771
|
+
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
1772
|
+
inputSize,
|
|
1773
|
+
icon,
|
|
1774
|
+
isReadonly,
|
|
1775
|
+
defaultClass,
|
|
1776
|
+
onChanged,
|
|
1777
|
+
isRequired: (minLength !== void 0 && minLength !== null && minLength > 0) ?? false,
|
|
1778
|
+
inputType: 65 /* Number */,
|
|
1779
|
+
autoComplete: isAutoComplete !== false ? void 0 : "off"
|
|
1780
|
+
}),
|
|
1781
|
+
CHECKBOX: (id, columnSize, displayOrder, label, defaultValue, groupId, checkedValue, isAutoComplete, background, borderSize, inputSize, icon, isRequired, isReadonly, defaultClass, onChanged) => ({
|
|
1782
|
+
id,
|
|
1783
|
+
columnSize,
|
|
1784
|
+
displayOrder,
|
|
1785
|
+
label,
|
|
1786
|
+
defaultValue,
|
|
1787
|
+
groupId,
|
|
1788
|
+
checkedValue,
|
|
1789
|
+
background,
|
|
1790
|
+
borderSize: borderSize ?? 0,
|
|
1791
|
+
inputSize,
|
|
1792
|
+
icon,
|
|
1793
|
+
isReadonly,
|
|
1794
|
+
defaultClass,
|
|
1795
|
+
onChanged,
|
|
1796
|
+
isRequired: isRequired ?? false,
|
|
1797
|
+
inputType: 50 /* Checkbox */,
|
|
1798
|
+
autoComplete: isAutoComplete !== false ? void 0 : "off"
|
|
1799
|
+
}),
|
|
1800
|
+
RADIOBOX: (id, columnSize, displayOrder, label, defaultValue, groupId, checkedValue, isAutoComplete, background, borderSize, inputSize, icon, isRequired, isReadonly, defaultClass, onChanged) => ({
|
|
1801
|
+
id,
|
|
1802
|
+
columnSize,
|
|
1803
|
+
displayOrder,
|
|
1804
|
+
label,
|
|
1805
|
+
groupId,
|
|
1806
|
+
checkedValue,
|
|
1807
|
+
defaultValue,
|
|
1808
|
+
background,
|
|
1809
|
+
borderSize: borderSize ?? 0,
|
|
1810
|
+
inputSize,
|
|
1811
|
+
icon,
|
|
1812
|
+
isReadonly,
|
|
1813
|
+
defaultClass,
|
|
1814
|
+
onChanged,
|
|
1815
|
+
isRequired: isRequired ?? false,
|
|
1816
|
+
inputType: 55 /* Radiobox */,
|
|
1817
|
+
autoComplete: isAutoComplete !== false ? void 0 : "off"
|
|
1818
|
+
}),
|
|
1819
|
+
LINKBUTTON: (id, columnSize, displayOrder, href, label, onClicked2, onLoad, borderBottom, opacity, position, target, background, borderSize, inputSize, defaultClass) => ({
|
|
1820
|
+
id,
|
|
1821
|
+
columnSize,
|
|
1822
|
+
displayOrder,
|
|
1823
|
+
href,
|
|
1824
|
+
label,
|
|
1825
|
+
onClicked: onClicked2,
|
|
1826
|
+
onLoad,
|
|
1827
|
+
borderBottom,
|
|
1828
|
+
opacity,
|
|
1829
|
+
position,
|
|
1830
|
+
target,
|
|
1831
|
+
background,
|
|
1832
|
+
borderSize: borderSize ?? 0,
|
|
1833
|
+
inputSize,
|
|
1834
|
+
defaultClass,
|
|
1835
|
+
inputType: 2e3 /* LinkButton */
|
|
1836
|
+
}),
|
|
1837
|
+
BUTTON: (id, columnSize, displayOrder, label, onClicked2, type, onLoad, background, borderSize, inputSize, defaultClass, icon) => ({
|
|
1838
|
+
id,
|
|
1839
|
+
columnSize,
|
|
1840
|
+
displayOrder,
|
|
1841
|
+
label,
|
|
1842
|
+
type,
|
|
1843
|
+
onClicked: onClicked2,
|
|
1844
|
+
onLoad,
|
|
1845
|
+
background: background ?? "bg20" /* PrimaryColor */,
|
|
1846
|
+
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
1847
|
+
inputSize,
|
|
1848
|
+
defaultClass,
|
|
1849
|
+
inputType: 5e3 /* SubmitButton */,
|
|
1850
|
+
icon
|
|
1851
|
+
})
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
// src/helpers/input-helpers.tsx
|
|
1855
|
+
var GetParentKey = (parentKey) => {
|
|
1856
|
+
if (parentKey) return parentKey.split("|")[0];
|
|
1857
|
+
return void 0;
|
|
1858
|
+
};
|
|
1859
|
+
var GetInputId = (param) => param.id.split("-")[0];
|
|
1860
|
+
var GetInputClasses = (size, cls) => `ipt pr sn ${size ?? ""} ${cls ?? ""}`;
|
|
1861
|
+
var SetHaveValueClass = (input, isHaveValue) => {
|
|
1862
|
+
if (!input) return;
|
|
1863
|
+
input.classList.toggle("txhv", isHaveValue);
|
|
1864
|
+
};
|
|
1865
|
+
var ForceSetValues = (inputs, keys, value, timeout, invokeOnChanged) => {
|
|
1866
|
+
if (!inputs || inputs.length === 0) return;
|
|
1867
|
+
for (const input of inputs) if (!keys || keys.length === 0 || keys.includes(GetInputId(input.input))) ForceSetValue(input, value, timeout, invokeOnChanged);
|
|
1868
|
+
};
|
|
1869
|
+
var ForceSetValue = (input, value, timeout, invokeOnChanged) => {
|
|
1870
|
+
const timeoutValue = setTimeout(() => {
|
|
1871
|
+
input?.forceChangeDefaultValue && input.forceChangeDefaultValue(value, 1 /* ForceChanged */, invokeOnChanged);
|
|
1872
|
+
clearTimeout(timeoutValue);
|
|
1873
|
+
}, timeout ?? 0);
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
// src/components/inputs/input-box.tsx
|
|
1877
|
+
var CreateInputBox = (param, child, parent, isTabular) => {
|
|
1878
|
+
const bg = param.background ?? "bg1";
|
|
1879
|
+
const BORDER_SIZE = param.borderSize ?? DEFAULT_INPUT_BORDER_SIZE;
|
|
1880
|
+
const border = BORDER_SIZE > 0 ? `b${BORDER_SIZE}` : "bat1";
|
|
1881
|
+
const box = document.createElement("div");
|
|
1882
|
+
box.className = `ipt-bx ${param.inputSize ?? ""} db bb anim ${border} pr r ${bg}`;
|
|
1883
|
+
if (child) box.appendChild(child);
|
|
1884
|
+
if (param.label && !isTabular) {
|
|
1885
|
+
const label = document.createElement("label");
|
|
1886
|
+
label.className = "pa t50 ty50 left ilb en anim ml2";
|
|
1887
|
+
label.innerHTML = param.label + (param.isRequired ? `<span class="tx21 fs-08 ml1">${REQUIRED_TEXT1}</span>` : "");
|
|
1888
|
+
label.htmlFor = param.id;
|
|
1889
|
+
box.appendChild(label);
|
|
1890
|
+
}
|
|
1891
|
+
if (param.icon) {
|
|
1892
|
+
box.classList.add("df", "ac");
|
|
1893
|
+
const I2 = param.icon;
|
|
1894
|
+
CreateIconBox(I2.icon, box, null, null, I2.type, I2.background ?? param.background ?? "no-background" /* None */, I2.boxSize, I2.iconSize, null, null, null, null, I2.opacity, null, null, null, null, I2.onClicked, I2.onMouseEnter, (I2.onClicked || I2.onMouseEnter) !== void 0);
|
|
1895
|
+
}
|
|
1896
|
+
if (parent) parent.appendChild(box);
|
|
1897
|
+
return box;
|
|
1898
|
+
};
|
|
1899
|
+
var CreateInputWrapper = (param, child, parent) => {
|
|
1900
|
+
const col = document.createElement("div");
|
|
1901
|
+
const wp = document.createElement("div");
|
|
1902
|
+
const smb = document.createElement("div");
|
|
1903
|
+
col.className = !param.columnSize || param.columnSize === 12 ? "col-12" : `col-${param.columnSize}`;
|
|
1904
|
+
if (param.autoAdjustColumn !== false) col.classList.add("col-sm-12");
|
|
1905
|
+
wp.className = "ipt-wp";
|
|
1906
|
+
smb.className = "smb";
|
|
1907
|
+
if (child) wp.appendChild(child);
|
|
1908
|
+
wp.appendChild(smb);
|
|
1909
|
+
col.appendChild(wp);
|
|
1910
|
+
if (parent) parent.appendChild(col);
|
|
1911
|
+
return wp;
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
// src/components/inputs/input-element.tsx
|
|
1915
|
+
var CreateElement = (param, parentElement, isTabular) => {
|
|
1916
|
+
const ELEMENT_ID = GetInputId(param);
|
|
1917
|
+
const box = CreateInputBox(param, null, null, isTabular);
|
|
1918
|
+
const label = box.querySelector("label");
|
|
1919
|
+
if (label) label.remove();
|
|
1920
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
1921
|
+
return {
|
|
1922
|
+
input: param,
|
|
1923
|
+
inputElement: box,
|
|
1924
|
+
rootElement: wrapper,
|
|
1925
|
+
forceChangeDefaultValue: null,
|
|
1926
|
+
dispose: function(invokeOnChanged) {
|
|
1927
|
+
if (invokeOnChanged !== false) param.onLoad?.(null, null, false, false, true, ELEMENT_ID, 0);
|
|
1928
|
+
box.remove();
|
|
1929
|
+
wrapper.remove();
|
|
1930
|
+
}
|
|
1931
|
+
};
|
|
1932
|
+
};
|
|
1933
|
+
var CreateInputLink = (param, parentElement, isTabular) => {
|
|
1934
|
+
const elementObject = CreateElement(param, parentElement, isTabular);
|
|
1935
|
+
const box = elementObject.inputElement;
|
|
1936
|
+
box.classList.add("bat1", "df", "ac", "ipt-bxh");
|
|
1937
|
+
box.classList.remove("ipt-bx");
|
|
1938
|
+
const link = CreateLinkButton(box, param.href, param.label ?? "Nexus Link", param.onClicked, param.defaultClass, null, param.borderBottom, param.background, param.target, param.position);
|
|
1939
|
+
link.classList.add("w100");
|
|
1940
|
+
box.appendChild(link);
|
|
1941
|
+
return elementObject;
|
|
1942
|
+
};
|
|
1943
|
+
var CreateInputButton = (param, parentElement, isTabular) => {
|
|
1944
|
+
const iconParam = param.icon;
|
|
1945
|
+
const button = document.createElement("button");
|
|
1946
|
+
param.icon = void 0;
|
|
1947
|
+
const elementObject = CreateElement(param, parentElement, isTabular);
|
|
1948
|
+
const box = elementObject.inputElement;
|
|
1949
|
+
box.appendChild(button);
|
|
1950
|
+
box.classList.add("h");
|
|
1951
|
+
button.type = param.type ?? "submit" /* SUBMIT */;
|
|
1952
|
+
button.classList.add("h", "df", "ac", "jc", "ipt", "h100", "sn", "w100", "r", param.background ?? "bg20" /* PrimaryColor */);
|
|
1953
|
+
const value = param.placeholder ?? param.label ?? "Submit";
|
|
1954
|
+
if (iconParam) {
|
|
1955
|
+
const span = document.createElement("span");
|
|
1956
|
+
span.textContent = value;
|
|
1957
|
+
span.classList.add("nw", "toh", "fs-10", "fw-600");
|
|
1958
|
+
const icon = CreateIconBox(iconParam.icon, button, null, null, iconParam.type ?? "" /* FILLED */, iconParam.background ?? param.background ?? "no-background" /* None */, iconParam.boxSize, iconParam.iconSize, null, null, null, null, iconParam.opacity, null, null, null, null, iconParam.onClicked, iconParam.onMouseEnter);
|
|
1959
|
+
icon.classList.add("mr3");
|
|
1960
|
+
button.appendChild(span);
|
|
1961
|
+
} else button.innerText = value;
|
|
1962
|
+
return elementObject;
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
|
+
// src/components/inputs/number-input.tsx
|
|
1966
|
+
function getDecimalPlaces(param) {
|
|
1967
|
+
const fp = param.floatingPoint;
|
|
1968
|
+
if (fp === void 0 || fp === null || fp < 0) return 0;
|
|
1969
|
+
return Math.floor(fp);
|
|
1970
|
+
}
|
|
1971
|
+
function roundToDecimalPlaces(value, decimalPlaces) {
|
|
1972
|
+
if (decimalPlaces <= 0) return Math.round(value);
|
|
1973
|
+
const factor = Math.pow(10, decimalPlaces);
|
|
1974
|
+
return Math.round(value * factor) / factor;
|
|
1975
|
+
}
|
|
1976
|
+
function parseNumber(raw) {
|
|
1977
|
+
const trimmed = raw.trim();
|
|
1978
|
+
if (trimmed === "") return null;
|
|
1979
|
+
const parsed = Number(trimmed);
|
|
1980
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
1981
|
+
}
|
|
1982
|
+
function adjustValue(value, raw, param, decimalPlaces, forceClamp = false) {
|
|
1983
|
+
let result = roundToDecimalPlaces(value, decimalPlaces);
|
|
1984
|
+
if (!param.isAutoAdjust) return result;
|
|
1985
|
+
const inputLength = raw.trim().length;
|
|
1986
|
+
if (param.minLength !== void 0 && param.minLength !== null) {
|
|
1987
|
+
const minLength = String(param.minLength).length;
|
|
1988
|
+
if ((forceClamp || inputLength >= minLength) && result < param.minLength) result = param.minLength;
|
|
1989
|
+
}
|
|
1990
|
+
if (param.maxLength !== void 0 && param.maxLength !== null) {
|
|
1991
|
+
const maxLength = String(param.maxLength).length;
|
|
1992
|
+
if ((forceClamp || inputLength >= maxLength) && result > param.maxLength) result = param.maxLength;
|
|
1993
|
+
}
|
|
1994
|
+
return result;
|
|
1995
|
+
}
|
|
1996
|
+
var CreateNumber = (param, parentElement, isTabular = false) => {
|
|
1997
|
+
const ELEMENT_ID = GetInputId(param);
|
|
1998
|
+
const hasPlaceholder = !IsNullOrEmpty(param.placeholder);
|
|
1999
|
+
const decimalPlaces = getDecimalPlaces(param);
|
|
2000
|
+
const input = CreateInput(param);
|
|
2001
|
+
const box = CreateInputBox(param, input, null, isTabular);
|
|
2002
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
2003
|
+
function handleChanged(val, isInit, isForced, isDisposed) {
|
|
2004
|
+
param.onChanged?.(val ?? null, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2005
|
+
SetHaveValueClass(input, val !== void 0 && val !== null || hasPlaceholder);
|
|
2006
|
+
}
|
|
2007
|
+
function forceChangeDefaultValue2(defaultValue) {
|
|
2008
|
+
if (defaultValue === null || defaultValue === void 0) {
|
|
2009
|
+
input.value = "";
|
|
2010
|
+
handleChanged(null, false, true, false);
|
|
2011
|
+
return true;
|
|
2012
|
+
}
|
|
2013
|
+
const adjusted = adjustValue(defaultValue, defaultValue.toString(), param, decimalPlaces, true);
|
|
2014
|
+
input.value = adjusted.toString();
|
|
2015
|
+
handleChanged(adjusted, false, true, false);
|
|
2016
|
+
return true;
|
|
2017
|
+
}
|
|
2018
|
+
function onInputChanged() {
|
|
2019
|
+
if (param.isAutoAdjust) return;
|
|
2020
|
+
const parsed = parseNumber(input.value);
|
|
2021
|
+
handleChanged(parsed, false, false, false);
|
|
2022
|
+
}
|
|
2023
|
+
function onBlur() {
|
|
2024
|
+
if (!param.isAutoAdjust) return;
|
|
2025
|
+
const raw = input.value;
|
|
2026
|
+
const parsed = parseNumber(raw);
|
|
2027
|
+
if (parsed === null) {
|
|
2028
|
+
handleChanged(null, false, false, false);
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2031
|
+
const adjusted = adjustValue(parsed, raw, param, decimalPlaces, true);
|
|
2032
|
+
input.value = adjusted.toString();
|
|
2033
|
+
handleChanged(adjusted, false, false, false);
|
|
2034
|
+
}
|
|
2035
|
+
if (!param.isAutoAdjust) input.addEventListener("input", onInputChanged);
|
|
2036
|
+
if (param.isAutoAdjust) input.addEventListener("blur", onBlur);
|
|
2037
|
+
handleChanged(param.defaultValue ?? null, true, false, false);
|
|
2038
|
+
return {
|
|
2039
|
+
input: param,
|
|
2040
|
+
inputElement: input,
|
|
2041
|
+
rootElement: wrapper,
|
|
2042
|
+
forceChangeDefaultValue: forceChangeDefaultValue2,
|
|
2043
|
+
dispose: function(invokeOnChanged) {
|
|
2044
|
+
if (invokeOnChanged !== false) handleChanged(null, false, true, true);
|
|
2045
|
+
input.removeEventListener("input", onInputChanged);
|
|
2046
|
+
input.removeEventListener("blur", onBlur);
|
|
2047
|
+
input.remove();
|
|
2048
|
+
box.remove();
|
|
2049
|
+
wrapper.remove();
|
|
2050
|
+
}
|
|
2051
|
+
};
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2054
|
+
// src/components/inputs/radiobox-input.tsx
|
|
2055
|
+
var CreateRadiobox = (param, parentElement, isTabular, isCheckbox = false) => {
|
|
2056
|
+
const input = CreateInput(param);
|
|
2057
|
+
const ELEMENT_ID = GetInputId(param);
|
|
2058
|
+
input.classList.add("pr");
|
|
2059
|
+
input.classList.remove("ipt");
|
|
2060
|
+
input.defaultChecked = param.defaultValue ?? false;
|
|
2061
|
+
input.type = "radio";
|
|
2062
|
+
if (isCheckbox) input.classList.add("checkbox");
|
|
2063
|
+
const box = CreateInputBox(param, input, null, isTabular);
|
|
2064
|
+
const label = box.querySelector("label");
|
|
2065
|
+
if (label) label.className = "p2 ilb hc o08";
|
|
2066
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
2067
|
+
box.classList.add("df", "ac", "pl3", "ipt-bxh");
|
|
2068
|
+
box.classList.remove("ipt-bx");
|
|
2069
|
+
function handleChanged(val, isInit, isForced, isDisposed) {
|
|
2070
|
+
if (!val) return;
|
|
2071
|
+
param.onChanged?.(param.checkedValue, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2072
|
+
}
|
|
2073
|
+
function forceChangeDefaultValue2(defaultValue) {
|
|
2074
|
+
input.value = defaultValue.toString();
|
|
2075
|
+
handleChanged(defaultValue, false, true, false);
|
|
2076
|
+
return true;
|
|
2077
|
+
}
|
|
2078
|
+
function onInputChanged(e) {
|
|
2079
|
+
handleChanged(input.checked, false, false, false);
|
|
2080
|
+
}
|
|
2081
|
+
input.addEventListener("input", onInputChanged);
|
|
2082
|
+
SetHaveValueClass(input, true);
|
|
2083
|
+
handleChanged(input.checked, true, false, false);
|
|
2084
|
+
return {
|
|
2085
|
+
input: param,
|
|
2086
|
+
inputElement: input,
|
|
2087
|
+
rootElement: wrapper,
|
|
2088
|
+
forceChangeDefaultValue: forceChangeDefaultValue2,
|
|
2089
|
+
dispose: function(invokeOnChanged) {
|
|
2090
|
+
if (invokeOnChanged !== false) handleChanged(param.defaultValue ?? false, false, true, true);
|
|
2091
|
+
input.removeEventListener("input", onInputChanged);
|
|
2092
|
+
input.remove();
|
|
2093
|
+
box.remove();
|
|
2094
|
+
wrapper.remove();
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
|
|
2099
|
+
// src/components/inputs/textarea-input.tsx
|
|
2100
|
+
var CreateTextarea = (param, parentElement, isTabular = false) => {
|
|
2101
|
+
const ELEMENT_ID = GetInputId(param);
|
|
2102
|
+
const hasPlaceholder = !IsNullOrEmpty(param.placeholder);
|
|
2103
|
+
const input = CreateInput(param);
|
|
2104
|
+
const box = CreateInputBox(param, input, null, isTabular);
|
|
2105
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
2106
|
+
box.classList.add("textarea-box");
|
|
2107
|
+
function handleChanged(val, isInit, isForced, isDisposed) {
|
|
2108
|
+
const value = val?.trim() ?? null;
|
|
2109
|
+
const isNullorEmpty = IsNullOrEmpty(value);
|
|
2110
|
+
param.onChanged?.(isNullorEmpty ? null : value, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2111
|
+
SetHaveValueClass(input, !isNullorEmpty || hasPlaceholder);
|
|
2112
|
+
}
|
|
2113
|
+
function forceChangeDefaultValue2(defaultValue) {
|
|
2114
|
+
input.value = defaultValue ?? "";
|
|
2115
|
+
handleChanged(defaultValue, false, true, false);
|
|
2116
|
+
return true;
|
|
2117
|
+
}
|
|
2118
|
+
function onInputChanged(e) {
|
|
2119
|
+
handleChanged(e.currentTarget.value, false, false, false);
|
|
2120
|
+
}
|
|
2121
|
+
input.addEventListener("input", onInputChanged);
|
|
2122
|
+
handleChanged(param.defaultValue, true, false, false);
|
|
2123
|
+
return {
|
|
2124
|
+
input: param,
|
|
2125
|
+
inputElement: input,
|
|
2126
|
+
rootElement: wrapper,
|
|
2127
|
+
forceChangeDefaultValue: forceChangeDefaultValue2,
|
|
2128
|
+
dispose: function(invokeOnChanged) {
|
|
2129
|
+
if (invokeOnChanged !== false) handleChanged(null, false, true, true);
|
|
2130
|
+
input.removeEventListener("input", onInputChanged);
|
|
2131
|
+
input.remove();
|
|
2132
|
+
box.remove();
|
|
2133
|
+
wrapper.remove();
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
|
|
2138
|
+
// src/components/inputs/textbox-input.tsx
|
|
2139
|
+
var CreateTextbox = (param, parentElement, isTabular = false) => {
|
|
2140
|
+
const ELEMENT_ID = GetInputId(param);
|
|
2141
|
+
const hasPlaceholder = !IsNullOrEmpty(param.placeholder);
|
|
2142
|
+
const input = CreateInput(param);
|
|
2143
|
+
const box = CreateInputBox(param, input, null, isTabular);
|
|
2144
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
2145
|
+
function handleChanged(val, isInit, isForced, isDisposed) {
|
|
2146
|
+
const value = val?.trim() ?? null;
|
|
2147
|
+
const isNullorEmpty = IsNullOrEmpty(value);
|
|
2148
|
+
param.onChanged?.(isNullorEmpty ? null : value, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2149
|
+
SetHaveValueClass(input, !isNullorEmpty || hasPlaceholder);
|
|
2150
|
+
}
|
|
2151
|
+
function forceChangeDefaultValue2(defaultValue) {
|
|
2152
|
+
input.value = defaultValue ?? "";
|
|
2153
|
+
handleChanged(defaultValue, false, true, false);
|
|
2154
|
+
return true;
|
|
2155
|
+
}
|
|
2156
|
+
function onInputChanged(e) {
|
|
2157
|
+
handleChanged(e.currentTarget.value, false, false, false);
|
|
2158
|
+
}
|
|
2159
|
+
input.addEventListener("input", onInputChanged);
|
|
2160
|
+
handleChanged(param.defaultValue, true, false, false);
|
|
2161
|
+
return {
|
|
2162
|
+
input: param,
|
|
2163
|
+
inputElement: input,
|
|
2164
|
+
rootElement: wrapper,
|
|
2165
|
+
forceChangeDefaultValue: forceChangeDefaultValue2,
|
|
2166
|
+
dispose: function(invokeOnChanged) {
|
|
2167
|
+
if (invokeOnChanged !== false) handleChanged(null, false, true, true);
|
|
2168
|
+
input.removeEventListener("input", onInputChanged);
|
|
2169
|
+
input.remove();
|
|
2170
|
+
box.remove();
|
|
2171
|
+
wrapper.remove();
|
|
2172
|
+
}
|
|
2173
|
+
};
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
// src/components/inputs/input.tsx
|
|
2177
|
+
var _getInputType = (inputType) => {
|
|
2178
|
+
switch (inputType) {
|
|
2179
|
+
case 50 /* Checkbox */:
|
|
2180
|
+
return "checkbox";
|
|
2181
|
+
case 5 /* Textarea */:
|
|
2182
|
+
return "textarea";
|
|
2183
|
+
case 65 /* Number */:
|
|
2184
|
+
return "number";
|
|
2185
|
+
case 85 /* Slider */:
|
|
2186
|
+
case 80 /* Range */:
|
|
2187
|
+
return "range";
|
|
2188
|
+
default:
|
|
2189
|
+
return "text";
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
function CreateInput(param) {
|
|
2193
|
+
const isTextarea = param.inputType === 5 /* Textarea */;
|
|
2194
|
+
const isNumber = param.inputType === 65 /* Number */;
|
|
2195
|
+
const isSlider = param.inputType === 85 /* Slider */ || param.inputType === 80 /* Range */;
|
|
2196
|
+
const isCheckbox = param.inputType === 50 /* Checkbox */;
|
|
2197
|
+
const isRadiobox = param.inputType === 55 /* Radiobox */;
|
|
2198
|
+
const inputType = _getInputType(param.inputType);
|
|
2199
|
+
const input = document.createElement(isTextarea ? "textarea" : "input");
|
|
2200
|
+
if (!isTextarea) input.type = inputType;
|
|
2201
|
+
if (isCheckbox || isRadiobox) {
|
|
2202
|
+
if (param.groupId) input.name = param.groupId;
|
|
2203
|
+
else if (isRadiobox) input.name = GetInputId(param);
|
|
2204
|
+
} else if (isTextarea) input.rows = param.rows ?? DEFAULT_TEXTAREA_ROWS;
|
|
2205
|
+
else if (isNumber) {
|
|
2206
|
+
const numberParam = param;
|
|
2207
|
+
const numberInput = input;
|
|
2208
|
+
const decimalPlaces = numberParam.floatingPoint ?? 0;
|
|
2209
|
+
numberInput.type = "number";
|
|
2210
|
+
if (numberParam.step) numberInput.step = numberParam.step.toString();
|
|
2211
|
+
else numberInput.step = decimalPlaces > 0 ? (1 / Math.pow(10, decimalPlaces)).toString() : "1";
|
|
2212
|
+
if (numberParam.minLength !== void 0 && numberParam.minLength !== null) numberInput.min = numberParam.minLength.toString();
|
|
2213
|
+
if (numberParam.maxLength !== void 0 && numberParam.maxLength !== null) numberInput.max = numberParam.maxLength.toString();
|
|
2214
|
+
} else if (isSlider) {
|
|
2215
|
+
input.type = "range";
|
|
2216
|
+
input.step = param.step?.toString() ?? "1";
|
|
2217
|
+
input.min = param.minLength?.toString() ?? "0";
|
|
2218
|
+
input.max = param.maxLength?.toString() ?? "100";
|
|
2219
|
+
} else input.type = param.isPassword ? "password" : "text";
|
|
2220
|
+
if (!isSlider && !isNumber) {
|
|
2221
|
+
if (param.minLength) input.minLength = param.minLength ?? 0;
|
|
2222
|
+
if (param.maxLength) input.maxLength = param.maxLength ?? 0;
|
|
2223
|
+
}
|
|
2224
|
+
input.className = `${GetInputClasses(param.inputSize, param.defaultClass)}${isTextarea ? " sb" : ""}`;
|
|
2225
|
+
input.autocomplete = param.autoComplete ?? "on";
|
|
2226
|
+
input.required = !!param.isRequired;
|
|
2227
|
+
input.readOnly = !!param.isReadonly;
|
|
2228
|
+
input.disabled = !!param.isReadonly;
|
|
2229
|
+
input.id = param.id;
|
|
2230
|
+
input.placeholder = param.placeholder ?? "";
|
|
2231
|
+
input.value = param.defaultValue?.toString() ?? "";
|
|
2232
|
+
return input;
|
|
2233
|
+
}
|
|
2234
|
+
var CreateInputs = (inputs, onChanged, index, isTabularForm, parentElement, defaultValue) => {
|
|
2235
|
+
if (inputs.length === 0 || !onChanged) {
|
|
2236
|
+
return [];
|
|
2237
|
+
}
|
|
2238
|
+
const inputValues = {};
|
|
2239
|
+
const onChangedDebounced = Debounce(onChanged, 10);
|
|
2240
|
+
const results = [];
|
|
2241
|
+
const pushResult = (result) => results.push(result);
|
|
2242
|
+
const handleInputChange = (currentValue, isInitilizing, isForcedChanged, isDisposed, currentKey, dataSource) => {
|
|
2243
|
+
if (inputValues[currentKey] === currentValue && !isForcedChanged && !isDisposed) return;
|
|
2244
|
+
inputValues[currentKey] = currentValue;
|
|
2245
|
+
(isInitilizing && !isTabularForm ? onChangedDebounced : onChanged)(inputValues, isInitilizing, isForcedChanged, isDisposed, currentKey, index, void 0, dataSource);
|
|
2246
|
+
const result = results.find((x) => GetInputId(x.input) === currentKey);
|
|
2247
|
+
if (result) {
|
|
2248
|
+
const timeout = setTimeout(() => {
|
|
2249
|
+
clearTimeout(timeout);
|
|
2250
|
+
const children = results.filter((x) => GetParentKey(x.input.parentKey) === currentKey);
|
|
2251
|
+
for (const child of children) {
|
|
2252
|
+
child.input.defaultValue = inputValues[child.input.id];
|
|
2253
|
+
child.onParentChanged?.(currentValue, isInitilizing, isForcedChanged, isDisposed, currentKey, index, void 0, dataSource);
|
|
2254
|
+
}
|
|
2255
|
+
}, 1);
|
|
2256
|
+
}
|
|
2257
|
+
};
|
|
2258
|
+
const udpatedInputs = CreateClone(inputs).sort((a, b) => a.displayOrder - b.displayOrder);
|
|
2259
|
+
for (const ipt of udpatedInputs) {
|
|
2260
|
+
const ELEMENT_ID = GetInputId(ipt);
|
|
2261
|
+
ipt.defaultValue = defaultValue?.[ELEMENT_ID] ?? ipt.defaultValue;
|
|
2262
|
+
if (ipt.inputType < MAX_INPUT_TYPE) {
|
|
2263
|
+
ipt.onChanged = (currentValue, isInitilizing, isForcedChanged, isDisposed, currentKey, dataSource) => handleInputChange(currentValue, isInitilizing, isForcedChanged, isDisposed, currentKey, dataSource);
|
|
2264
|
+
if (ipt.isRequired && !IsNullOrEmpty(ipt.placeholder)) ipt.placeholder += ` ${REQUIRED_TEXT1}`;
|
|
2265
|
+
}
|
|
2266
|
+
switch (ipt.inputType) {
|
|
2267
|
+
case 1 /* Textbox */: {
|
|
2268
|
+
pushResult(CreateTextbox(ipt, parentElement, isTabularForm));
|
|
2269
|
+
break;
|
|
2270
|
+
}
|
|
2271
|
+
case 65 /* Number */: {
|
|
2272
|
+
pushResult(CreateNumber(ipt, parentElement, isTabularForm));
|
|
2273
|
+
break;
|
|
2274
|
+
}
|
|
2275
|
+
case 5 /* Textarea */: {
|
|
2276
|
+
pushResult(CreateTextarea(ipt, parentElement, isTabularForm));
|
|
2277
|
+
break;
|
|
2278
|
+
}
|
|
2279
|
+
case 50 /* Checkbox */: {
|
|
2280
|
+
pushResult(CreateCheckbox(ipt, parentElement, isTabularForm));
|
|
2281
|
+
break;
|
|
2282
|
+
}
|
|
2283
|
+
case 55 /* Radiobox */: {
|
|
2284
|
+
pushResult(CreateRadiobox(ipt, parentElement, isTabularForm));
|
|
2285
|
+
break;
|
|
2286
|
+
}
|
|
2287
|
+
case 2e3 /* LinkButton */: {
|
|
2288
|
+
pushResult(CreateInputLink(ipt, parentElement, isTabularForm));
|
|
2289
|
+
break;
|
|
2290
|
+
}
|
|
2291
|
+
case 3e3 /* HtmlElement */: {
|
|
2292
|
+
pushResult(CreateElement(ipt, parentElement, isTabularForm));
|
|
2293
|
+
break;
|
|
2294
|
+
}
|
|
2295
|
+
case 5e3 /* SubmitButton */: {
|
|
2296
|
+
pushResult(CreateInputButton(ipt, parentElement, isTabularForm));
|
|
2297
|
+
break;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
return results;
|
|
2302
|
+
};
|
|
2303
|
+
var DisposeInputs = (inputs, invokeOnChanged) => {
|
|
2304
|
+
if (!inputs || inputs.length === 0) return;
|
|
2305
|
+
for (const input of inputs) input.dispose(invokeOnChanged);
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
// src/components/inputs/checkbox-input.tsx
|
|
2309
|
+
var CreateCheckbox = (param, parentElement, isTabular) => {
|
|
2310
|
+
if (param.groupId) return CreateRadiobox(param, parentElement, isTabular, true);
|
|
2311
|
+
const input = CreateInput(param);
|
|
2312
|
+
const ELEMENT_ID = GetInputId(param);
|
|
2313
|
+
input.classList.add("pr");
|
|
2314
|
+
input.classList.remove("ipt");
|
|
2315
|
+
input.defaultChecked = param.defaultValue ?? false;
|
|
2316
|
+
const box = CreateInputBox(param, input, null, isTabular);
|
|
2317
|
+
const label = box.querySelector("label");
|
|
2318
|
+
if (label) label.className = "p2 ilb hc o08";
|
|
2319
|
+
const wrapper = isTabular ? box : CreateInputWrapper(param, box, parentElement);
|
|
2320
|
+
box.classList.add("df", "ac", "pl3", "ipt-bxh");
|
|
2321
|
+
box.classList.remove("ipt-bx");
|
|
2322
|
+
function notifyChanged(val, isInit, isForced, isDisposed) {
|
|
2323
|
+
if (!param.checkedValue) param.onChanged?.(val, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2324
|
+
else param.onChanged?.(val ? param.checkedValue : null, isInit, isForced, isDisposed, ELEMENT_ID, void 0);
|
|
2325
|
+
}
|
|
2326
|
+
function handleChanged(val, isInit, isForced, isDisposed, type, invokeOnChanged) {
|
|
2327
|
+
SetHaveValueClass(input, val);
|
|
2328
|
+
if (invokeOnChanged === false) return;
|
|
2329
|
+
if (isInit && param.groupId && !val) return;
|
|
2330
|
+
notifyChanged(val, isInit, isForced, isDisposed);
|
|
2331
|
+
}
|
|
2332
|
+
function forceChangeDefaultValue2(defaultValue, type, invokeOnChanged) {
|
|
2333
|
+
input.checked = defaultValue;
|
|
2334
|
+
handleChanged(defaultValue, false, true, false, type, invokeOnChanged);
|
|
2335
|
+
return true;
|
|
2336
|
+
}
|
|
2337
|
+
function onInputChanged() {
|
|
2338
|
+
handleChanged(input.checked, false, false, false);
|
|
2339
|
+
}
|
|
2340
|
+
input.addEventListener("input", onInputChanged);
|
|
2341
|
+
input.checked = param.defaultValue ?? false;
|
|
2342
|
+
handleChanged(input.checked, true, false, false);
|
|
2343
|
+
return {
|
|
2344
|
+
input: param,
|
|
2345
|
+
inputElement: input,
|
|
2346
|
+
rootElement: wrapper,
|
|
2347
|
+
forceChangeDefaultValue: forceChangeDefaultValue2,
|
|
2348
|
+
dispose: function(invokeOnChanged) {
|
|
2349
|
+
if (invokeOnChanged !== false) handleChanged(param.defaultValue ?? false, false, true, true);
|
|
2350
|
+
input.removeEventListener("input", onInputChanged);
|
|
2351
|
+
input.remove();
|
|
2352
|
+
box.remove();
|
|
2353
|
+
wrapper.remove();
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
};
|
|
2357
|
+
var forceChangeDefaultValue = (inputResults, newDefaultValue) => {
|
|
2358
|
+
let isChanged = true;
|
|
2359
|
+
for (const inputResult of inputResults) {
|
|
2360
|
+
if (inputResult.forceChangeDefaultValue) {
|
|
2361
|
+
const value = newDefaultValue ? newDefaultValue[GetInputId(inputResult.input)] ?? null : void 0;
|
|
2362
|
+
const success = inputResult.forceChangeDefaultValue(value);
|
|
2363
|
+
if (isChanged) isChanged = success;
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
return isChanged;
|
|
2367
|
+
};
|
|
2368
|
+
var CreateForm = (param, rowGap) => {
|
|
2369
|
+
const { inputs, onChanged, index, isTabularForm, parentIdentifier } = param;
|
|
2370
|
+
const parentElement = typeof parentIdentifier === "string" ? document.getElementById(parentIdentifier) : parentIdentifier;
|
|
2371
|
+
if (!parentElement || inputs.length === 0 || !onChanged) {
|
|
2372
|
+
return null;
|
|
2373
|
+
}
|
|
2374
|
+
const parent = document.createElement("div");
|
|
2375
|
+
parent.className = `row g${rowGap ?? 3} sb fg`;
|
|
2376
|
+
parent.style.paddingTop = "var(--IEM)";
|
|
2377
|
+
if (parentElement) parentElement.appendChild(parent);
|
|
2378
|
+
const inputResults = CreateInputs(inputs, onChanged, index, isTabularForm, parent, param.defaultValue);
|
|
2379
|
+
return {
|
|
2380
|
+
inputResults,
|
|
2381
|
+
formElement: parent,
|
|
2382
|
+
dispose: (invokeOnChanged) => {
|
|
2383
|
+
DisposeInputs(inputResults, invokeOnChanged);
|
|
2384
|
+
parent.remove();
|
|
2385
|
+
},
|
|
2386
|
+
forceChangeDefaultValue: (newDefaultValue) => forceChangeDefaultValue(inputResults, newDefaultValue)
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
var Form = ({ param, rowGap }) => {
|
|
2390
|
+
React.useEffect(() => {
|
|
2391
|
+
const formResults = CreateForm(param, rowGap);
|
|
2392
|
+
return () => formResults?.dispose();
|
|
2393
|
+
}, [param, rowGap]);
|
|
2394
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React__default.default.Fragment, {});
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2397
|
+
// src/nexus-client.tsx
|
|
2398
|
+
var _globalObject = {
|
|
2399
|
+
systemThemes: void 0
|
|
2400
|
+
};
|
|
2401
|
+
var NEXUS_OBJECT = (systemThemes, access, isAdminModule) => {
|
|
2402
|
+
if (!_globalObject.systemThemes && systemThemes) {
|
|
2403
|
+
_globalObject.accessActions = access ?? [];
|
|
2404
|
+
_globalObject.systemThemes = systemThemes;
|
|
2405
|
+
_globalObject.isAdminModule = isAdminModule;
|
|
2406
|
+
}
|
|
2407
|
+
return _globalObject;
|
|
2408
|
+
};
|
|
2409
|
+
var O = _globalObject;
|
|
2410
|
+
|
|
2411
|
+
// src/interfaces/storage-interfaces.tsx
|
|
2412
|
+
var LOCAL_STORAGE_KEYS = {
|
|
2413
|
+
ACTIVE_THEME: "nexus-themes"
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
// src/interfaces/system-interfaces.tsx
|
|
2417
|
+
var ENexusModules = /* @__PURE__ */ ((ENexusModules2) => {
|
|
2418
|
+
ENexusModules2[ENexusModules2["None"] = 0] = "None";
|
|
2419
|
+
ENexusModules2[ENexusModules2["Migrations"] = 1] = "Migrations";
|
|
2420
|
+
ENexusModules2[ENexusModules2["Configuration"] = 2] = "Configuration";
|
|
2421
|
+
ENexusModules2[ENexusModules2["Identity"] = 4] = "Identity";
|
|
2422
|
+
ENexusModules2[ENexusModules2["Enterprise"] = 8] = "Enterprise";
|
|
2423
|
+
ENexusModules2[ENexusModules2["Drive"] = 16] = "Drive";
|
|
2424
|
+
ENexusModules2[ENexusModules2["Message"] = 32] = "Message";
|
|
2425
|
+
ENexusModules2[ENexusModules2["Accounting"] = 64] = "Accounting";
|
|
2426
|
+
ENexusModules2[ENexusModules2["Report"] = 128] = "Report";
|
|
2427
|
+
ENexusModules2[ENexusModules2["Portfolio"] = 256] = "Portfolio";
|
|
2428
|
+
ENexusModules2[ENexusModules2["Subscription"] = 512] = "Subscription";
|
|
2429
|
+
ENexusModules2[ENexusModules2["Reservation"] = 1024] = "Reservation";
|
|
2430
|
+
return ENexusModules2;
|
|
2431
|
+
})(ENexusModules || {});
|
|
2432
|
+
var EPreferenceTargets = /* @__PURE__ */ ((EPreferenceTargets2) => {
|
|
2433
|
+
EPreferenceTargets2[EPreferenceTargets2["Company"] = 1] = "Company";
|
|
2434
|
+
EPreferenceTargets2[EPreferenceTargets2["Branch"] = 2] = "Branch";
|
|
2435
|
+
EPreferenceTargets2[EPreferenceTargets2["User"] = 4] = "User";
|
|
2436
|
+
EPreferenceTargets2[EPreferenceTargets2["Application"] = 8] = "Application";
|
|
2437
|
+
EPreferenceTargets2[EPreferenceTargets2["Compiler"] = 16] = "Compiler";
|
|
2438
|
+
return EPreferenceTargets2;
|
|
2439
|
+
})(EPreferenceTargets || {});
|
|
2440
|
+
|
|
2441
|
+
// src/services/localstorage-service.tsx
|
|
2442
|
+
var _createUpdatePreferenceDebounce = Debounce(CreateUpdatePreference, 1e3);
|
|
2443
|
+
var _syncStorageToServer = async (key, value, isSyncWithServer, target) => {
|
|
2444
|
+
if (!IsBrowser() || !isSyncWithServer || !target) return;
|
|
2445
|
+
await _createUpdatePreferenceDebounce(target, key, value);
|
|
2446
|
+
};
|
|
2447
|
+
var SetLocalStorage = (key, value, isSyncWithServer, target) => {
|
|
2448
|
+
if (!IsBrowser()) return;
|
|
2449
|
+
_syncStorageToServer(key, value, isSyncWithServer, target);
|
|
2450
|
+
localStorage.setItem(key, value);
|
|
2451
|
+
};
|
|
2452
|
+
var RemoveLocalStorage = (key, isSyncWithServer, target) => {
|
|
2453
|
+
_syncStorageToServer(key, null, isSyncWithServer, target);
|
|
2454
|
+
localStorage.removeItem(key);
|
|
2455
|
+
};
|
|
2456
|
+
function GetLocalStorage(key) {
|
|
2457
|
+
if (!IsBrowser()) return null;
|
|
2458
|
+
const data = localStorage.getItem(key);
|
|
2459
|
+
if (!data) return null;
|
|
2460
|
+
return data;
|
|
2461
|
+
}
|
|
2462
|
+
var SetCurrentTheme = (themeCode) => SetLocalStorage(LOCAL_STORAGE_KEYS.ACTIVE_THEME, themeCode, true, 4 /* User */);
|
|
2463
|
+
var GetCurrentTheme = () => {
|
|
2464
|
+
const themeInformations = O.systemThemes;
|
|
2465
|
+
if (!themeInformations || themeInformations.length === 0) throw new Error("No theme information found");
|
|
2466
|
+
const activeTheme = GetLocalStorage(LOCAL_STORAGE_KEYS.ACTIVE_THEME);
|
|
2467
|
+
if (!activeTheme) return themeInformations[0];
|
|
2468
|
+
return themeInformations.find((theme) => theme.systemName === activeTheme) || themeInformations[0];
|
|
2469
|
+
};
|
|
2470
|
+
var GetCurrentThemeName = () => GetCurrentTheme().systemName;
|
|
2471
|
+
|
|
2472
|
+
// src/services/theme-service.tsx
|
|
2473
|
+
var I = "!important;";
|
|
2474
|
+
var _setVariable = (key, value) => {
|
|
2475
|
+
if (value) document.documentElement.style.setProperty(key, value);
|
|
2476
|
+
};
|
|
2477
|
+
var _initializeThemes = (themeInformations) => {
|
|
2478
|
+
if (!themeInformations || themeInformations.length === 0) return false;
|
|
2479
|
+
const activeTheme = GetCurrentTheme();
|
|
2480
|
+
return _initializeTheme(activeTheme);
|
|
2481
|
+
};
|
|
2482
|
+
var _setRule = (sheet, s, r) => sheet.insertRule(`${s} { ${r} }`, sheet.cssRules.length);
|
|
2483
|
+
var _setResponsiveRule = (sheet, i, max, pre, w, g) => sheet.insertRule(`@media (max-width: ${max}px) { ${g !== void 0 ? `.g${g} > ` : ""}.col-${pre}-${i} { width: ${w}${I} } }`, sheet.cssRules.length);
|
|
2484
|
+
var _initializeTheme = (theme) => {
|
|
2485
|
+
if (!theme) return false;
|
|
2486
|
+
SetCurrentTheme(theme.systemName);
|
|
2487
|
+
const THEME_KEYS = Object.keys(theme.themeColors);
|
|
2488
|
+
for (const key of THEME_KEYS) {
|
|
2489
|
+
const color = theme.themeColors[key];
|
|
2490
|
+
const [background, hover, focus, text] = color.split("|");
|
|
2491
|
+
if (!background) continue;
|
|
2492
|
+
const keyNumber = key.replace("C", "");
|
|
2493
|
+
if (background !== "NULL") _setVariable(`--B${keyNumber}`, background);
|
|
2494
|
+
if (hover !== "NULL") _setVariable(`--H${keyNumber}`, hover);
|
|
2495
|
+
if (focus !== "NULL") _setVariable(`--F${keyNumber}`, focus);
|
|
2496
|
+
if (text !== "NULL") _setVariable(`--T${keyNumber}`, text);
|
|
2497
|
+
}
|
|
2498
|
+
return true;
|
|
2499
|
+
};
|
|
2500
|
+
var InitializeStyles = () => {
|
|
2501
|
+
const el = document.getElementById("nexus-styles");
|
|
2502
|
+
if (!el || !el.classList.contains("nexus-styles")) el.classList.add("nexus-styles");
|
|
2503
|
+
const sheet = el.sheet;
|
|
2504
|
+
const themeInformations = O.systemThemes;
|
|
2505
|
+
if (!themeInformations || themeInformations.length === 0) return;
|
|
2506
|
+
_initializeThemes(themeInformations);
|
|
2507
|
+
const BREAK_POINTS = { xl: 1200, lg: 1050, med: 900, nr: 800, sm: 700, xs: 600 };
|
|
2508
|
+
const SUFFIXES = ["", "-top", "-right", "-bottom", "-left"];
|
|
2509
|
+
const DIRECTIONS = ["", "t", "r", "b", "l"];
|
|
2510
|
+
Array.from({ length: 12 }, (_, i) => i + 1).forEach((i) => {
|
|
2511
|
+
const w = `${i / 12 * 100}%`;
|
|
2512
|
+
_setRule(sheet, `.col-${i}`, `float: left; box-sizing: border-box; width: ${w};`);
|
|
2513
|
+
Object.keys(BREAK_POINTS).forEach((b) => _setResponsiveRule(sheet, i, BREAK_POINTS[b], b, w));
|
|
2514
|
+
});
|
|
2515
|
+
Array.from({ length: 10 }, (_, i) => i + 1).forEach((i) => {
|
|
2516
|
+
const m = 0.2 * i, w = `calc((100% / 12) * ${i} - ${m * 2}rem)`;
|
|
2517
|
+
_setRule(sheet, `.g${i}`, `padding: 0 ${m}rem;`);
|
|
2518
|
+
_setRule(sheet, `.g${i} > [class*='col-']`, `margin: 0 ${m}rem; float: left; box-sizing: border-box;`);
|
|
2519
|
+
_setRule(sheet, `.g${i} > .col-12`, `width: ${w}; float: left; box-sizing: border-box;`);
|
|
2520
|
+
Array.from({ length: 12 }, (_, j) => j + 1).forEach((j) => {
|
|
2521
|
+
const wj = `calc((100% / 12) * ${j} - ${m * 2}rem)`;
|
|
2522
|
+
_setRule(sheet, `.g${i} > .col-${j}`, `width: ${wj}; float: left; box-sizing: border-box;`);
|
|
2523
|
+
Object.keys(BREAK_POINTS).forEach((b) => _setResponsiveRule(sheet, j, BREAK_POINTS[b], b, wj, i));
|
|
2524
|
+
});
|
|
2525
|
+
});
|
|
2526
|
+
Array.from({ length: 11 }, (_, i) => {
|
|
2527
|
+
const v = 0.2 * (10 - i);
|
|
2528
|
+
DIRECTIONS.forEach((d, idx) => {
|
|
2529
|
+
const imp = d ? I : ";";
|
|
2530
|
+
_setRule(sheet, `.m${d}${10 - i}`, `margin${SUFFIXES[idx]}: ${v}rem${imp}`);
|
|
2531
|
+
_setRule(sheet, `.p${d}${10 - i}`, `padding${SUFFIXES[idx]}: ${v}rem${imp}`);
|
|
2532
|
+
});
|
|
2533
|
+
_setRule(sheet, `.g${10 - i}`, `gap: ${v}rem;`);
|
|
2534
|
+
_setRule(sheet, `.cg${10 - i}`, `column-gap: ${v}rem;`);
|
|
2535
|
+
_setRule(sheet, `.rg${10 - i}`, `row-gap: ${v}rem;`);
|
|
2536
|
+
if (i > 0 && i <= 6) _setRule(sheet, `.h${i}, h${i}`, `font-size: ${(6 - i) * 0.3 + 1}rem;font-weight: 600;`);
|
|
2537
|
+
});
|
|
2538
|
+
Array.from({ length: 13 }, (_, i) => 0.6 + 0.1 * i).forEach((v) => _setRule(sheet, `.fs-${v.toFixed(1).replace(".", "")}`, `font-size: ${v.toFixed(1)}rem;`));
|
|
2539
|
+
Array.from({ length: 4 }, (_, i) => 0.5 + 0.1 * i).forEach((v) => _setRule(sheet, `.o${v.toFixed(1).replace(".", "")}`, `opacity: ${v.toFixed(1)};`));
|
|
2540
|
+
Array.from({ length: 9 }, (_, i) => {
|
|
2541
|
+
_setRule(sheet, `.tl${i}`, `display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: ${i};`);
|
|
2542
|
+
if (i <= 8) _setRule(sheet, `.bs${i}`, `box-shadow: var(--BS${i});`);
|
|
2543
|
+
});
|
|
2544
|
+
DEFAULT_FONT_WEIGHTS.forEach((weight) => _setRule(sheet, `.fw${weight}`, `font-weight: ${weight};`));
|
|
2545
|
+
[90, 180, 270].forEach((r) => _setRule(sheet, `.r${r}`, `transform: rotate(${r}deg);`));
|
|
2546
|
+
[1, 2, 3].forEach((s) => {
|
|
2547
|
+
const b = `var(--BRD${s}) solid var(--B30)`;
|
|
2548
|
+
DIRECTIONS.forEach((d, i) => _setRule(sheet, `.b${d}${s}`, `border${SUFFIXES[i]}: ${b}${d ? ` ${I}` : ""}`));
|
|
2549
|
+
_setRule(sheet, `.bat${s}`, `border: var(--BRD${s}) solid transparent`);
|
|
2550
|
+
});
|
|
2551
|
+
const THEME_KEYS = Object.keys(themeInformations[0].themeColors);
|
|
2552
|
+
for (const key of THEME_KEYS) {
|
|
2553
|
+
const keyNumber = key.replace("C", "");
|
|
2554
|
+
_setRule(sheet, `.bg${keyNumber}`, `background-color: var(--B${keyNumber}) ${I}; color: var(--T${keyNumber});`);
|
|
2555
|
+
_setRule(sheet, `.h.bg${keyNumber}:hover`, `background-color: var(--H${keyNumber}) ${I}`);
|
|
2556
|
+
_setRule(sheet, `.h.bg${keyNumber}:focus`, `background-color: var(--F${keyNumber}) ${I}`);
|
|
2557
|
+
_setRule(sheet, `.tx${keyNumber}`, `color: var(--T${keyNumber}) ${I}`);
|
|
2558
|
+
}
|
|
2559
|
+
const ICON_SIZES = {
|
|
2560
|
+
xxs: 0.8,
|
|
2561
|
+
xs: 1,
|
|
2562
|
+
ssm: 1.25,
|
|
2563
|
+
sm: 1.4,
|
|
2564
|
+
nr: 1.55,
|
|
2565
|
+
med: 1.75,
|
|
2566
|
+
lg: 1.95,
|
|
2567
|
+
xl: 2.2,
|
|
2568
|
+
xxl: 2.5,
|
|
2569
|
+
fs: 2.85
|
|
2570
|
+
};
|
|
2571
|
+
const ICON_BOX_SCALES = {
|
|
2572
|
+
xxs: 1 / 1.7,
|
|
2573
|
+
xs: 1 / 1.5,
|
|
2574
|
+
sm: DEFAULT_SMALL_ICON_BOX_SIZE,
|
|
2575
|
+
ssm: 1 / 1.35,
|
|
2576
|
+
lg: 1.25,
|
|
2577
|
+
med: 1.1,
|
|
2578
|
+
xl: 1.5,
|
|
2579
|
+
xxl: 1.8
|
|
2580
|
+
};
|
|
2581
|
+
Object.entries(ICON_SIZES).forEach(([k, v]) => _setRule(sheet, `.icon.${k}`, `font-size: ${v}rem;`));
|
|
2582
|
+
Object.entries(ICON_BOX_SCALES).forEach(([k, s]) => {
|
|
2583
|
+
const size = `calc(var(--IH) * ${s})`;
|
|
2584
|
+
const css = `min-width: ${size} ${I}; min-height: ${size} ${I}; max-width: ${size} ${I}; max-height: ${size} ${I};`;
|
|
2585
|
+
_setRule(sheet, `.ib.${k}`, css);
|
|
2586
|
+
});
|
|
2587
|
+
};
|
|
2588
|
+
var SwitchTheme = (themeCode) => {
|
|
2589
|
+
const themeInformations = O.systemThemes;
|
|
2590
|
+
if (!themeInformations || themeInformations.length === 0) return false;
|
|
2591
|
+
const theme = themeInformations.find((theme2) => theme2.systemName === themeCode);
|
|
2592
|
+
if (!theme) return false;
|
|
2593
|
+
SetCurrentTheme(theme.systemName);
|
|
2594
|
+
return _initializeTheme(theme);
|
|
2595
|
+
};
|
|
2596
|
+
var LayoutHelpers = ({ globalLayout }) => {
|
|
2597
|
+
React.useEffect(() => {
|
|
2598
|
+
globalLayout.systemThemes = DEFAULT_THEME_INFORMATIONS;
|
|
2599
|
+
O.systemThemes = DEFAULT_THEME_INFORMATIONS;
|
|
2600
|
+
const timeout = setTimeout(() => {
|
|
2601
|
+
clearTimeout(timeout);
|
|
2602
|
+
RemoveElement(ROOT_LOADER_IDENTITY, 500);
|
|
2603
|
+
InitializeStyles();
|
|
2604
|
+
}, 50);
|
|
2605
|
+
}, []);
|
|
2606
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-popup-container" });
|
|
2607
|
+
};
|
|
2608
|
+
var inter = google.Inter({ weight: ["300", "400", "500", "600", "700", "800"], subsets: ["latin"] });
|
|
2609
|
+
var GlobalLayout = async ({ children, globalLayout }) => {
|
|
2610
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("html", { lang: "en", children: [
|
|
2611
|
+
/* @__PURE__ */ jsxRuntime.jsxs("head", { children: [
|
|
2612
|
+
/* @__PURE__ */ jsxRuntime.jsx("title", { children: globalLayout.defaultDocumentTitle }),
|
|
2613
|
+
/* @__PURE__ */ jsxRuntime.jsx("meta", { name: "description", content: globalLayout.defaultDocumentDescription }),
|
|
2614
|
+
/* @__PURE__ */ jsxRuntime.jsx("meta", { name: "keywords", content: globalLayout.defaultDocumentKeywords.join(", ") }),
|
|
2615
|
+
/* @__PURE__ */ jsxRuntime.jsx("link", { rel: "icon", href: "/favicon.ico" }),
|
|
2616
|
+
/* @__PURE__ */ jsxRuntime.jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }),
|
|
2617
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { id: "nexus-styles" })
|
|
2618
|
+
] }),
|
|
2619
|
+
/* @__PURE__ */ jsxRuntime.jsxs("body", { className: inter.className, children: [
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx(LayoutHelpers, { globalLayout }),
|
|
2621
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2622
|
+
"div",
|
|
2623
|
+
{
|
|
2624
|
+
style: {
|
|
2625
|
+
zIndex: "1000",
|
|
2626
|
+
width: "100vw",
|
|
2627
|
+
height: "100vh",
|
|
2628
|
+
position: "fixed",
|
|
2629
|
+
display: "flex",
|
|
2630
|
+
justifyContent: "center",
|
|
2631
|
+
alignItems: "center",
|
|
2632
|
+
backgroundColor: "rgb(40, 40, 40)"
|
|
2633
|
+
},
|
|
2634
|
+
id: ROOT_LOADER_IDENTITY,
|
|
2635
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: FILES.LOGO.ICON, alt: "logo", style: { minHeight: "3rem", minWidth: "3rem", width: "3rem", height: "3rem" } })
|
|
2636
|
+
}
|
|
2637
|
+
),
|
|
2638
|
+
children,
|
|
2639
|
+
/* @__PURE__ */ jsxRuntime.jsx(Script__default.default, { type: "module", src: "https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.esm.js", strategy: "lazyOnload" }),
|
|
2640
|
+
/* @__PURE__ */ jsxRuntime.jsx(Script__default.default, { noModule: true, src: "https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.js", strategy: "lazyOnload" })
|
|
2641
|
+
] })
|
|
2642
|
+
] });
|
|
2643
|
+
};
|
|
2644
|
+
var onClicked = (event, element, button) => {
|
|
2645
|
+
if (button.id === GetCurrentThemeName()) return;
|
|
2646
|
+
const themeCode = button.id;
|
|
2647
|
+
if (!themeCode) return;
|
|
2648
|
+
SwitchTheme(themeCode);
|
|
2649
|
+
SetCurrentTheme(themeCode);
|
|
2650
|
+
};
|
|
2651
|
+
var RenderSwitchTheme = (baseElement) => {
|
|
2652
|
+
if (!baseElement || baseElement.classList.contains("ddcc")) return;
|
|
2653
|
+
baseElement.classList.add("ddcc");
|
|
2654
|
+
const currentTheme = GetCurrentThemeName();
|
|
2655
|
+
const themes = O.systemThemes;
|
|
2656
|
+
if (!themes || themes.length === 0) {
|
|
2657
|
+
const p = document.createElement("p");
|
|
2658
|
+
p.textContent = "No theme available!";
|
|
2659
|
+
p.className = "o08 p5 bg3 tc";
|
|
2660
|
+
baseElement.appendChild(p);
|
|
2661
|
+
return;
|
|
2662
|
+
}
|
|
2663
|
+
const themeButtons = themes.map((theme, index) => GetButton(theme.displayName, theme.systemName, null, theme.icon, onClicked, theme, null, null, theme.displayOrder, "" /* FILLED */, null));
|
|
2664
|
+
const activeButton = themeButtons.find((button) => button.id === currentTheme);
|
|
2665
|
+
CreateTabButtons(themeButtons, baseElement, activeButton, onClicked);
|
|
2666
|
+
return "Theme Settings";
|
|
2667
|
+
};
|
|
2668
|
+
var ThemePanel = () => {
|
|
2669
|
+
const containerRef = React__default.default.useRef(null);
|
|
2670
|
+
React.useEffect(() => {
|
|
2671
|
+
if (containerRef.current) RenderSwitchTheme(containerRef.current);
|
|
2672
|
+
}, [containerRef.current]);
|
|
2673
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef });
|
|
2674
|
+
};
|
|
2675
|
+
var BUTTON_IDENTITY = (isneedPrefix) => {
|
|
2676
|
+
const _ = isneedPrefix ? UTILITIES_BUTTON_PREFIX : "";
|
|
2677
|
+
return {
|
|
2678
|
+
PROFILE_BOX: `${_}profile`,
|
|
2679
|
+
SEARCH_BOX: `${_}root-search`,
|
|
2680
|
+
FAVORITE_BOX: `${_}favorite-menu`,
|
|
2681
|
+
CARD_BOX: `${_}cart-menu`,
|
|
2682
|
+
THEME_BOX: `${_}switch-theme`,
|
|
2683
|
+
MEGA_BOX: `${_}mega-menu`,
|
|
2684
|
+
SIGN_IN_BUTTON: `${_}sign-in`,
|
|
2685
|
+
SIGN_OUT_BUTTON: `${_}sign-out`
|
|
2686
|
+
};
|
|
2687
|
+
};
|
|
2688
|
+
var UtilityMenu = ({ utilityMenus, userPanels, column, paddingRight, globalLayout, iconBoxBackground }) => {
|
|
2689
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { paddingRight: paddingRight ?? 0, zIndex: 3 }, className: `utilities df fr ac jr h100p col-${column ?? 12}`, children: [
|
|
2690
|
+
utilityMenus.map((utilityMenu, index) => /* @__PURE__ */ jsxRuntime.jsx(UtilityIcon, { utilityMenu, boxBackground: iconBoxBackground, globalLayout }, index)),
|
|
2691
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProfilePanel, { globalLayout, boxBackground: iconBoxBackground, userPanels })
|
|
2692
|
+
] });
|
|
2693
|
+
};
|
|
2694
|
+
var UtilityIcon = ({ utilityMenu, globalLayout, boxBackground }) => {
|
|
2695
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Iconbox, { id: GetUtilityMenuCode(utilityMenu.menuCode), icon: utilityMenu.menuIcon, iconType: "" /* FILLED */, iconSize: "sm" /* Small */, boxSize: "sm" /* Small */, background: boxBackground, defaultClass: "mr2", children: /* @__PURE__ */ jsxRuntime.jsx(UtilityDialogBox, { utilityMenu, globalLayout }) });
|
|
2696
|
+
};
|
|
2697
|
+
var ProfilePanel = ({ globalLayout, userPanels, boxBackground }) => {
|
|
2698
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `pr ${"sm" /* Small */} ib ${boxBackground} h p2 r`, children: /* @__PURE__ */ jsxRuntime.jsx("h6", { children: "BA" }) });
|
|
2699
|
+
};
|
|
2700
|
+
var UtilityDialogBox = ({ utilityMenu, globalLayout }) => {
|
|
2701
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GlobalDialogbox, { hoverEffectDelay: true, defaultPadding: 5, position: "left" /* Left */, buttonIdentity: GetUtilityMenuCode(utilityMenu.menuCode), defaultWidth: 30, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2702
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageTitle, { marginBottom: 5, borderBottom: 1, title: utilityMenu.menuName }),
|
|
2703
|
+
/* @__PURE__ */ jsxRuntime.jsx(UtilityPanel, { utilityMenu, globalLayout })
|
|
2704
|
+
] }) });
|
|
2705
|
+
};
|
|
2706
|
+
var UtilityPanel = ({ utilityMenu, globalLayout }) => {
|
|
2707
|
+
switch (utilityMenu.menuCode) {
|
|
2708
|
+
case BUTTON_IDENTITY(false).THEME_BOX:
|
|
2709
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemePanel, {});
|
|
2710
|
+
default:
|
|
2711
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2712
|
+
"Unknown Panel: ",
|
|
2713
|
+
utilityMenu.menuName
|
|
2714
|
+
] });
|
|
2715
|
+
}
|
|
2716
|
+
};
|
|
2717
|
+
|
|
2718
|
+
// src/interfaces/http-interfaces.tsx
|
|
2719
|
+
var EActionMethods = /* @__PURE__ */ ((EActionMethods2) => {
|
|
2720
|
+
EActionMethods2[EActionMethods2["Get"] = 1] = "Get";
|
|
2721
|
+
EActionMethods2[EActionMethods2["Post"] = 2] = "Post";
|
|
2722
|
+
EActionMethods2[EActionMethods2["Put"] = 3] = "Put";
|
|
2723
|
+
EActionMethods2[EActionMethods2["Delete"] = 4] = "Delete";
|
|
2724
|
+
return EActionMethods2;
|
|
2725
|
+
})(EActionMethods || {});
|
|
2726
|
+
|
|
2727
|
+
// src/services/loader-service.tsx
|
|
2728
|
+
var DEFAULT_LOADER_TYPE = "an-spin" /* SPIN */;
|
|
2729
|
+
var DEFAULT_LOADER_SIZE = "med" /* Medium */;
|
|
2730
|
+
var DEFAULT_LOADER_DELAY = 0;
|
|
2731
|
+
var LOADER_IDENTITY = "nexus-loader";
|
|
2732
|
+
var LOADER_DATA_COUNT_ATTRIBUTE = "data-count";
|
|
2733
|
+
var LOADER_DATA_TYPE_ATTRIBUTE = "data-type";
|
|
2734
|
+
var LOADER_DATA_SIZE_ATTRIBUTE = "data-size";
|
|
2735
|
+
var LOADER_DATA_DISABLED_INPUTS_ATTRIBUTE = "data-disabled-inputs";
|
|
2736
|
+
var DISPOSED_LOADER_CLASS = "disposed";
|
|
2737
|
+
var DEFAULT_LOADER_BACKGROUND = "bg51" /* PopupBackgroundColor */;
|
|
2738
|
+
var _findParentElement = (parent) => {
|
|
2739
|
+
if (parent) {
|
|
2740
|
+
if (typeof parent === "string") return document.getElementById(parent) ?? document.body;
|
|
2741
|
+
else if (parent instanceof HTMLElement) return parent ?? document.body;
|
|
2742
|
+
}
|
|
2743
|
+
return document.body;
|
|
2744
|
+
};
|
|
2745
|
+
var _findExistingLoader = (parent) => {
|
|
2746
|
+
const loaderElement = FindChildElement(parent, `#${LOADER_IDENTITY}`);
|
|
2747
|
+
return loaderElement;
|
|
2748
|
+
};
|
|
2749
|
+
var _updateLoaderProperties = (loaderElement, type, size) => {
|
|
2750
|
+
if (type === "an-spin" /* SPIN */) {
|
|
2751
|
+
if (size === "xxs" /* VeryTiny */) {
|
|
2752
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "2.5rem");
|
|
2753
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.34rem");
|
|
2754
|
+
} else if (size === "xs" /* Tiny */) {
|
|
2755
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "2.8rem");
|
|
2756
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.36rem");
|
|
2757
|
+
} else if (size === "ssm" /* VerySmall */) {
|
|
2758
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "3rem");
|
|
2759
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.38rem");
|
|
2760
|
+
} else if (size === "sm" /* Small */) {
|
|
2761
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "3.5rem");
|
|
2762
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.45rem");
|
|
2763
|
+
} else if (size === "med" /* Medium */) {
|
|
2764
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "4rem");
|
|
2765
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.5rem");
|
|
2766
|
+
} else if (size === "lg" /* Large */) {
|
|
2767
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "4.8rem");
|
|
2768
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.55rem");
|
|
2769
|
+
} else if (size === "xl" /* ExtraLarge */) {
|
|
2770
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "5.5rem");
|
|
2771
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.6rem");
|
|
2772
|
+
} else if (size === "xxl" /* VeryExtraLarge */) {
|
|
2773
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "6.5rem");
|
|
2774
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.7rem");
|
|
2775
|
+
} else if (size === "fs" /* FullSize */) {
|
|
2776
|
+
loaderElement.style.setProperty("--SPIN_BOX_SIZE", "8rem");
|
|
2777
|
+
loaderElement.style.setProperty("--SPIN_BOX_BORDER_SIZE", "0.8rem");
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
};
|
|
2781
|
+
var _updateLoaderAttributes = (loaderElement, type, size, disabledInputs, count) => {
|
|
2782
|
+
loaderElement.setAttribute(LOADER_DATA_COUNT_ATTRIBUTE, count.toString());
|
|
2783
|
+
loaderElement.setAttribute(LOADER_DATA_TYPE_ATTRIBUTE, type);
|
|
2784
|
+
loaderElement.setAttribute(LOADER_DATA_SIZE_ATTRIBUTE, size);
|
|
2785
|
+
loaderElement.setAttribute(LOADER_DATA_DISABLED_INPUTS_ATTRIBUTE, disabledInputs ? "true" : "false");
|
|
2786
|
+
};
|
|
2787
|
+
var _createLoaderElement = (parent, type, size, showLogo, disabledInputs, background) => {
|
|
2788
|
+
const loaderElement = _findExistingLoader(parent);
|
|
2789
|
+
if (loaderElement && !loaderElement.classList.contains(DISPOSED_LOADER_CLASS)) {
|
|
2790
|
+
const count = parseInt(loaderElement.getAttribute(LOADER_DATA_COUNT_ATTRIBUTE) ?? "0") + 1;
|
|
2791
|
+
_updateLoaderAttributes(loaderElement, type, size, disabledInputs, count);
|
|
2792
|
+
_updateLoaderProperties(loaderElement, type, size);
|
|
2793
|
+
return loaderElement;
|
|
2794
|
+
}
|
|
2795
|
+
const newLoaderElement = document.createElement("div");
|
|
2796
|
+
newLoaderElement.id = LOADER_IDENTITY;
|
|
2797
|
+
newLoaderElement.classList.add("nexus-container", "o0", "an-fa" /* FADE_IN */, background);
|
|
2798
|
+
_updateLoaderAttributes(newLoaderElement, type, size, disabledInputs, 1);
|
|
2799
|
+
const loader = document.createElement("div");
|
|
2800
|
+
newLoaderElement.appendChild(loader);
|
|
2801
|
+
loader.classList.add(size, type);
|
|
2802
|
+
const isTextLoader = (type === "an-bounce" /* BOUNCE */ || type === "an-fio" /* FADE_IN_OUT */ || type === "an-pio" /* PULSE_IN_OUT */) && parent === document.body;
|
|
2803
|
+
if (isTextLoader && !showLogo) {
|
|
2804
|
+
loader.innerText = "Loading...";
|
|
2805
|
+
loader.classList.add("tx52");
|
|
2806
|
+
loader.style.fontSize = "1.5rem";
|
|
2807
|
+
} else if (showLogo) {
|
|
2808
|
+
_updateLoaderProperties(newLoaderElement, type, size);
|
|
2809
|
+
const logoElement = document.createElement("img");
|
|
2810
|
+
logoElement.src = FILES.LOGO.ICON;
|
|
2811
|
+
logoElement.alt = "Logo";
|
|
2812
|
+
logoElement.className = "pa bg52";
|
|
2813
|
+
logoElement.style.width = "calc(var(--SPIN_BOX_SIZE) - var(--SPIN_BOX_BORDER_SIZE))";
|
|
2814
|
+
logoElement.style.height = "calc(var(--SPIN_BOX_SIZE) - var(--SPIN_BOX_BORDER_SIZE))";
|
|
2815
|
+
logoElement.style.zIndex = "-1";
|
|
2816
|
+
if (isTextLoader) {
|
|
2817
|
+
logoElement.style.padding = `var(--SPIN_BOX_BORDER_SIZE)`;
|
|
2818
|
+
logoElement.classList.add("txy50", "r2");
|
|
2819
|
+
loader.appendChild(logoElement);
|
|
2820
|
+
} else {
|
|
2821
|
+
logoElement.style.padding = `calc(var(--SPIN_BOX_BORDER_SIZE) * 1.3)`;
|
|
2822
|
+
logoElement.style.borderRadius = `35%`;
|
|
2823
|
+
newLoaderElement.appendChild(logoElement);
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
parent.appendChild(newLoaderElement);
|
|
2827
|
+
return newLoaderElement;
|
|
2828
|
+
};
|
|
2829
|
+
var ShowLoader = async (parent, type, disabledInputs, size, delay, showLogo, background) => {
|
|
2830
|
+
if (!IsBrowser()) return Promise.resolve(null);
|
|
2831
|
+
type = type ?? DEFAULT_LOADER_TYPE;
|
|
2832
|
+
size = size ?? DEFAULT_LOADER_SIZE;
|
|
2833
|
+
background = background ?? DEFAULT_LOADER_BACKGROUND;
|
|
2834
|
+
return new Promise((resolve) => {
|
|
2835
|
+
const timeout = setTimeout(() => {
|
|
2836
|
+
clearTimeout(timeout);
|
|
2837
|
+
const parentElement = _findParentElement(parent);
|
|
2838
|
+
const loaderElement = _createLoaderElement(parentElement, type, size, showLogo ?? true, disabledInputs ?? false, background);
|
|
2839
|
+
resolve(loaderElement);
|
|
2840
|
+
}, delay ?? DEFAULT_LOADER_DELAY);
|
|
2841
|
+
});
|
|
2842
|
+
};
|
|
2843
|
+
var HideLoader = (parent, force, delay) => {
|
|
2844
|
+
if (!IsBrowser()) return Promise.resolve(false);
|
|
2845
|
+
const parentElement = _findParentElement(parent);
|
|
2846
|
+
return new Promise((resolve) => {
|
|
2847
|
+
const timeout = setTimeout(() => {
|
|
2848
|
+
clearTimeout(timeout);
|
|
2849
|
+
const loaderElement = _findExistingLoader(parentElement);
|
|
2850
|
+
if (!loaderElement) return resolve(false);
|
|
2851
|
+
const count = parseInt(loaderElement.getAttribute(LOADER_DATA_COUNT_ATTRIBUTE) ?? "0");
|
|
2852
|
+
if (force || count <= 1) {
|
|
2853
|
+
RemoveElement(loaderElement, 300);
|
|
2854
|
+
} else loaderElement.setAttribute(LOADER_DATA_COUNT_ATTRIBUTE, (count - 1).toString());
|
|
2855
|
+
return resolve(true);
|
|
2856
|
+
}, delay ?? DEFAULT_LOADER_DELAY);
|
|
2857
|
+
});
|
|
2858
|
+
};
|
|
2859
|
+
|
|
2860
|
+
exports.APIS = APIS;
|
|
2861
|
+
exports.BUTTON_IDENTITY = BUTTON_IDENTITY;
|
|
2862
|
+
exports.BitwiseToList = BitwiseToList;
|
|
2863
|
+
exports.Button = Button;
|
|
2864
|
+
exports.Buttons = Buttons;
|
|
2865
|
+
exports.COLUMN_SIZE_ATTRIBUTE_KEY = COLUMN_SIZE_ATTRIBUTE_KEY;
|
|
2866
|
+
exports.ConvertPixelsToRem = ConvertPixelsToRem;
|
|
2867
|
+
exports.ConvertRemToPixels = ConvertRemToPixels;
|
|
2868
|
+
exports.ConvertToCode = ConvertToCode;
|
|
2869
|
+
exports.CreateButton = CreateButton;
|
|
2870
|
+
exports.CreateButtons = CreateButtons;
|
|
2871
|
+
exports.CreateCheckbox = CreateCheckbox;
|
|
2872
|
+
exports.CreateClone = CreateClone;
|
|
2873
|
+
exports.CreateElement = CreateElement;
|
|
2874
|
+
exports.CreateForm = CreateForm;
|
|
2875
|
+
exports.CreateIcon = CreateIcon;
|
|
2876
|
+
exports.CreateIconBox = CreateIconBox;
|
|
2877
|
+
exports.CreateInput = CreateInput;
|
|
2878
|
+
exports.CreateInputBox = CreateInputBox;
|
|
2879
|
+
exports.CreateInputButton = CreateInputButton;
|
|
2880
|
+
exports.CreateInputLink = CreateInputLink;
|
|
2881
|
+
exports.CreateInputWrapper = CreateInputWrapper;
|
|
2882
|
+
exports.CreateInputs = CreateInputs;
|
|
2883
|
+
exports.CreateLinkButton = CreateLinkButton;
|
|
2884
|
+
exports.CreateNumber = CreateNumber;
|
|
2885
|
+
exports.CreateRadiobox = CreateRadiobox;
|
|
2886
|
+
exports.CreateTabButtons = CreateTabButtons;
|
|
2887
|
+
exports.CreateTextarea = CreateTextarea;
|
|
2888
|
+
exports.CreateTextbox = CreateTextbox;
|
|
2889
|
+
exports.CreateToggleButton = CreateToggleButton;
|
|
2890
|
+
exports.CreateUpdatePreference = CreateUpdatePreference;
|
|
2891
|
+
exports.DEFAULT_ANIMATION_DURATION = DEFAULT_ANIMATION_DURATION;
|
|
2892
|
+
exports.DEFAULT_BUTTON_CLASS = DEFAULT_BUTTON_CLASS;
|
|
2893
|
+
exports.DEFAULT_DIALOGBOX_HOVER_EFFECT_DELAY = DEFAULT_DIALOGBOX_HOVER_EFFECT_DELAY;
|
|
2894
|
+
exports.DEFAULT_FONT_WEIGHTS = DEFAULT_FONT_WEIGHTS;
|
|
2895
|
+
exports.DEFAULT_ICON_ELEMENT_NAME = DEFAULT_ICON_ELEMENT_NAME;
|
|
2896
|
+
exports.DEFAULT_INPUT_BACKGROUND = DEFAULT_INPUT_BACKGROUND;
|
|
2897
|
+
exports.DEFAULT_INPUT_BORDER_SIZE = DEFAULT_INPUT_BORDER_SIZE;
|
|
2898
|
+
exports.DEFAULT_LINK_BUTTON_STYLE = DEFAULT_LINK_BUTTON_STYLE;
|
|
2899
|
+
exports.DEFAULT_SMALL_ICON_BOX_SIZE = DEFAULT_SMALL_ICON_BOX_SIZE;
|
|
2900
|
+
exports.DEFAULT_TEXTAREA_ROWS = DEFAULT_TEXTAREA_ROWS;
|
|
2901
|
+
exports.DEFAULT_THEME_INFORMATIONS = DEFAULT_THEME_INFORMATIONS;
|
|
2902
|
+
exports.DEFAULT_THEME_NAME = DEFAULT_THEME_NAME;
|
|
2903
|
+
exports.Debounce = Debounce;
|
|
2904
|
+
exports.DisposeInputs = DisposeInputs;
|
|
2905
|
+
exports.DynamicSorting = DynamicSorting;
|
|
2906
|
+
exports.EActionMethods = EActionMethods;
|
|
2907
|
+
exports.EAnimationClasses = EAnimationClasses;
|
|
2908
|
+
exports.EAnimations = EAnimations;
|
|
2909
|
+
exports.EBackgroundColors = EBackgroundColors;
|
|
2910
|
+
exports.EBackgrounds = EBackgrounds;
|
|
2911
|
+
exports.EBadgeTypes = EBadgeTypes;
|
|
2912
|
+
exports.EButtonTypes = EButtonTypes;
|
|
2913
|
+
exports.EFlexPositions = EFlexPositions;
|
|
2914
|
+
exports.EFontWeights = EFontWeights;
|
|
2915
|
+
exports.EIconTypes = EIconTypes;
|
|
2916
|
+
exports.EIcons = EIcons;
|
|
2917
|
+
exports.EInputTypes = EInputTypes;
|
|
2918
|
+
exports.EKeyModifier = EKeyModifier;
|
|
2919
|
+
exports.EKeys = EKeys;
|
|
2920
|
+
exports.EMenuTargets = EMenuTargets;
|
|
2921
|
+
exports.EMenuVisibility = EMenuVisibility;
|
|
2922
|
+
exports.ENexusModules = ENexusModules;
|
|
2923
|
+
exports.EOpacity = EOpacity;
|
|
2924
|
+
exports.EPositions = EPositions;
|
|
2925
|
+
exports.EPreferenceTargets = EPreferenceTargets;
|
|
2926
|
+
exports.ERegexs = ERegexs;
|
|
2927
|
+
exports.ESizes = ESizes;
|
|
2928
|
+
exports.ETargets = ETargets;
|
|
2929
|
+
exports.ETextPositions = ETextPositions;
|
|
2930
|
+
exports.EValueChangeTypes = EValueChangeTypes;
|
|
2931
|
+
exports.FILES = FILES;
|
|
2932
|
+
exports.FindChildElement = FindChildElement;
|
|
2933
|
+
exports.FindChildElements = FindChildElements;
|
|
2934
|
+
exports.ForceSetValue = ForceSetValue;
|
|
2935
|
+
exports.ForceSetValues = ForceSetValues;
|
|
2936
|
+
exports.Form = Form;
|
|
2937
|
+
exports.GLOBAL_PAGE_TITLE_CLASS = GLOBAL_PAGE_TITLE_CLASS;
|
|
2938
|
+
exports.GetButton = GetButton;
|
|
2939
|
+
exports.GetClientMenus = GetClientMenus;
|
|
2940
|
+
exports.GetCurrentTheme = GetCurrentTheme;
|
|
2941
|
+
exports.GetCurrentThemeName = GetCurrentThemeName;
|
|
2942
|
+
exports.GetForms = GetForms;
|
|
2943
|
+
exports.GetGlobalLayout = GetGlobalLayout;
|
|
2944
|
+
exports.GetInputClasses = GetInputClasses;
|
|
2945
|
+
exports.GetInputId = GetInputId;
|
|
2946
|
+
exports.GetInputs = GetInputs;
|
|
2947
|
+
exports.GetLocalStorage = GetLocalStorage;
|
|
2948
|
+
exports.GetParentKey = GetParentKey;
|
|
2949
|
+
exports.GetRandomNumber = GetRandomNumber;
|
|
2950
|
+
exports.GetRandomString = GetRandomString;
|
|
2951
|
+
exports.GetUserPanels = GetUserPanels;
|
|
2952
|
+
exports.GetUtilityMenuCode = GetUtilityMenuCode;
|
|
2953
|
+
exports.GetUtilityMenus = GetUtilityMenus;
|
|
2954
|
+
exports.GetVisibleAndHiddenItems = GetVisibleAndHiddenItems;
|
|
2955
|
+
exports.GlobalDialogbox = GlobalDialogbox;
|
|
2956
|
+
exports.GlobalLayout = GlobalLayout;
|
|
2957
|
+
exports.HasFlag = HasFlag;
|
|
2958
|
+
exports.HideLoader = HideLoader;
|
|
2959
|
+
exports.Icon = Icon;
|
|
2960
|
+
exports.Iconbox = Iconbox;
|
|
2961
|
+
exports.InitializeDialogbox = InitializeDialogbox;
|
|
2962
|
+
exports.InitializeStyles = InitializeStyles;
|
|
2963
|
+
exports.IsBrowser = IsBrowser;
|
|
2964
|
+
exports.IsKeyPressed = IsKeyPressed;
|
|
2965
|
+
exports.IsNullOrEmpty = IsNullOrEmpty;
|
|
2966
|
+
exports.IsValidURL = IsValidURL;
|
|
2967
|
+
exports.LOCAL_STORAGE_KEYS = LOCAL_STORAGE_KEYS;
|
|
2968
|
+
exports.LayoutHelpers = LayoutHelpers;
|
|
2969
|
+
exports.LinkButton = LinkButton;
|
|
2970
|
+
exports.ListToBitwise = ListToBitwise;
|
|
2971
|
+
exports.MAX_INPUT_TYPE = MAX_INPUT_TYPE;
|
|
2972
|
+
exports.MakeFirstLetterUpperCase = MakeFirstLetterUpperCase;
|
|
2973
|
+
exports.NEXUS_CONFIG = NEXUS_CONFIG;
|
|
2974
|
+
exports.NEXUS_INFO = NEXUS_INFO;
|
|
2975
|
+
exports.NEXUS_OBJECT = NEXUS_OBJECT;
|
|
2976
|
+
exports.O = O;
|
|
2977
|
+
exports.PadStart = PadStart;
|
|
2978
|
+
exports.PageTitle = PageTitle;
|
|
2979
|
+
exports.ProfilePanel = ProfilePanel;
|
|
2980
|
+
exports.REQUIRED_TEXT1 = REQUIRED_TEXT1;
|
|
2981
|
+
exports.ROOT_LOADER_IDENTITY = ROOT_LOADER_IDENTITY;
|
|
2982
|
+
exports.RemoveElement = RemoveElement;
|
|
2983
|
+
exports.RemoveLocalStorage = RemoveLocalStorage;
|
|
2984
|
+
exports.RenderChildren = RenderChildren;
|
|
2985
|
+
exports.SET_BUTTON_ACTIVE_CLASS = SET_BUTTON_ACTIVE_CLASS;
|
|
2986
|
+
exports.SearchDatasourceUsingColumns = SearchDatasourceUsingColumns;
|
|
2987
|
+
exports.SetCurrentTheme = SetCurrentTheme;
|
|
2988
|
+
exports.SetDocumentTitleDebounce = SetDocumentTitleDebounce;
|
|
2989
|
+
exports.SetElementStyles = SetElementStyles;
|
|
2990
|
+
exports.SetHaveValueClass = SetHaveValueClass;
|
|
2991
|
+
exports.SetLocalStorage = SetLocalStorage;
|
|
2992
|
+
exports.ShowLoader = ShowLoader;
|
|
2993
|
+
exports.SwitchTheme = SwitchTheme;
|
|
2994
|
+
exports.THEME_MENU_ELIPSE_BTN_ID = THEME_MENU_ELIPSE_BTN_ID;
|
|
2995
|
+
exports.TabButtons = TabButtons;
|
|
2996
|
+
exports.ThemePanel = ThemePanel;
|
|
2997
|
+
exports.UTILITIES_BUTTON_PREFIX = UTILITIES_BUTTON_PREFIX;
|
|
2998
|
+
exports.UtilityMenu = UtilityMenu;
|
|
2999
|
+
//# sourceMappingURL=index.cjs.map
|
|
3000
|
+
//# sourceMappingURL=index.cjs.map
|