underpost 3.2.5 → 3.2.8
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/.github/workflows/release.cd.yml +1 -2
- package/CHANGELOG.md +251 -1
- package/CLI-HELP.md +26 -13
- package/Dockerfile +0 -4
- package/README.md +3 -3
- package/bin/build.js +13 -3
- package/bin/deploy.js +570 -1
- package/bin/file.js +5 -0
- package/conf.js +11 -2
- package/jsconfig.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -6
- package/manifests/deployment/dd-test-development/deployment.yaml +136 -66
- package/manifests/deployment/dd-test-development/proxy.yaml +41 -5
- package/package.json +20 -11
- package/src/api/core/core.controller.js +10 -10
- package/src/api/core/core.service.js +10 -10
- package/src/api/default/default.controller.js +10 -10
- package/src/api/default/default.service.js +10 -10
- package/src/api/document/document.controller.js +12 -12
- package/src/api/document/document.model.js +10 -16
- package/src/api/file/file.controller.js +8 -8
- package/src/api/file/file.model.js +10 -10
- package/src/api/file/file.service.js +36 -36
- package/src/api/test/test.controller.js +8 -8
- package/src/api/test/test.service.js +8 -8
- package/src/api/user/guest.service.js +99 -0
- package/src/api/user/user.controller.js +6 -6
- package/src/api/user/user.model.js +8 -13
- package/src/api/user/user.service.js +3 -20
- package/src/cli/deploy.js +33 -30
- package/src/cli/fs.js +62 -5
- package/src/cli/image.js +43 -1
- package/src/cli/index.js +5 -1
- package/src/cli/release.js +57 -1
- package/src/cli/repository.js +35 -3
- package/src/cli/run.js +300 -35
- package/src/cli/ssh.js +1 -1
- package/src/cli/static.js +43 -115
- package/src/client/Default.index.js +21 -33
- package/src/client/components/core/404.js +4 -4
- package/src/client/components/core/500.js +4 -4
- package/src/client/components/core/Account.js +73 -60
- package/src/client/components/core/AgGrid.js +23 -33
- package/src/client/components/core/Alert.js +12 -13
- package/src/client/components/core/AppStore.js +1 -1
- package/src/client/components/core/Auth.js +20 -32
- package/src/client/components/core/Badge.js +7 -13
- package/src/client/components/core/BtnIcon.js +15 -17
- package/src/client/components/core/CalendarCore.js +42 -63
- package/src/client/components/core/Chat.js +13 -15
- package/src/client/components/core/ClientEvents.js +87 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/Content.js +17 -14
- package/src/client/components/core/Css.js +15 -71
- package/src/client/components/core/CssCore.js +12 -16
- package/src/client/components/core/D3Chart.js +4 -4
- package/src/client/components/core/Docs.js +60 -59
- package/src/client/components/core/DropDown.js +69 -91
- package/src/client/components/core/EventBus.js +92 -0
- package/src/client/components/core/EventsUI.js +14 -17
- package/src/client/components/core/FileExplorer.js +102 -234
- package/src/client/components/core/FullScreen.js +47 -75
- package/src/client/components/core/Input.js +24 -69
- package/src/client/components/core/Keyboard.js +25 -18
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +25 -31
- package/src/client/components/core/LogIn.js +41 -41
- package/src/client/components/core/LogOut.js +23 -14
- package/src/client/components/core/Modal.js +397 -176
- package/src/client/components/core/NotificationManager.js +14 -18
- package/src/client/components/core/Panel.js +54 -50
- package/src/client/components/core/PanelForm.js +25 -125
- package/src/client/components/core/Polyhedron.js +110 -214
- package/src/client/components/core/PublicProfile.js +39 -32
- package/src/client/components/core/Recover.js +52 -48
- package/src/client/components/core/Responsive.js +88 -32
- package/src/client/components/core/RichText.js +9 -18
- package/src/client/components/core/Router.js +24 -3
- package/src/client/components/core/SearchBox.js +37 -37
- package/src/client/components/core/SignUp.js +39 -30
- package/src/client/components/core/SocketIo.js +31 -2
- package/src/client/components/core/SocketIoHandler.js +6 -6
- package/src/client/components/core/ToggleSwitch.js +8 -20
- package/src/client/components/core/ToolTip.js +5 -17
- package/src/client/components/core/Translate.js +56 -59
- package/src/client/components/core/Validator.js +26 -16
- package/src/client/components/core/Wallet.js +15 -26
- package/src/client/components/core/Worker.js +140 -25
- package/src/client/components/core/windowGetDimensions.js +7 -7
- package/src/client/components/default/{MenuDefault.js → AppShellDefault.js} +87 -87
- package/src/client/components/default/CssDefault.js +12 -12
- package/src/client/components/default/LogInDefault.js +6 -4
- package/src/client/components/default/LogOutDefault.js +6 -4
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +4 -4
- package/src/client/components/default/SignUpDefault.js +6 -4
- package/src/client/components/default/TranslateDefault.js +3 -3
- package/src/client/services/core/core.service.js +17 -49
- package/src/client/services/default/default.management.js +139 -242
- package/src/client/services/default/default.service.js +10 -16
- package/src/client/services/document/document.service.js +14 -19
- package/src/client/services/file/file.service.js +8 -13
- package/src/client/services/test/test.service.js +8 -13
- package/src/client/services/user/guest.service.js +79 -0
- package/src/client/services/user/user.management.js +5 -5
- package/src/client/services/user/user.service.js +14 -20
- package/src/client/ssr/body/404.js +3 -3
- package/src/client/ssr/body/500.js +3 -3
- package/src/client/ssr/body/CacheControl.js +5 -2
- package/src/client/ssr/body/DefaultSplashScreen.js +19 -12
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +19 -20
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +15 -16
- package/src/client/ssr/offline/Maintenance.js +12 -11
- package/src/client/ssr/offline/NoNetworkConnection.js +3 -3
- package/src/client/ssr/pages/Test.js +2 -2
- package/src/client/sw/core.sw.js +212 -0
- package/src/index.js +1 -1
- package/src/runtime/express/Dockerfile +4 -4
- package/src/runtime/lampp/Dockerfile +8 -7
- package/src/runtime/wp/Dockerfile +11 -17
- package/src/server/client-build-docs.js +45 -46
- package/src/server/client-build.js +334 -60
- package/src/server/client-formatted.js +47 -16
- package/src/server/conf.js +5 -4
- package/src/server/ipfs-client.js +232 -91
- package/src/server/process.js +13 -27
- package/src/server/start.js +6 -3
- package/src/server/valkey.js +134 -235
- package/tsconfig.docs.json +15 -0
- package/typedoc.json +20 -0
- package/jsdoc.json +0 -52
- package/src/client/components/core/ColorPalette.js +0 -5267
- package/src/client/components/core/JoyStick.js +0 -80
- package/src/client/components/default/RoutesDefault.js +0 -49
- package/src/client/sw/default.sw.js +0 -127
- package/src/client/sw/template.sw.js +0 -84
|
@@ -2,11 +2,10 @@ import { getId, getIsoDate } from './CommonJs.js';
|
|
|
2
2
|
import { Css, Themes } from './Css.js';
|
|
3
3
|
import { Modal } from './Modal.js';
|
|
4
4
|
import { append, prepend, s } from './VanillaJs.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.options = options;
|
|
5
|
+
class NotificationManager {
|
|
6
|
+
static Types = ['success', 'error', 'warning', 'info'];
|
|
7
|
+
static async RenderBoard(options) {
|
|
8
|
+
NotificationManager.options = options;
|
|
10
9
|
append(
|
|
11
10
|
'body',
|
|
12
11
|
html`
|
|
@@ -28,17 +27,17 @@ const NotificationManager = {
|
|
|
28
27
|
<div class="fix notification-board-container"></div>
|
|
29
28
|
`,
|
|
30
29
|
);
|
|
31
|
-
}
|
|
32
|
-
Tokens
|
|
33
|
-
|
|
30
|
+
}
|
|
31
|
+
static Tokens = {};
|
|
32
|
+
static async Push(options = { status: '', html: '' }) {
|
|
34
33
|
const { barConfig } = await Themes[Css.currentTheme](); // newInstance
|
|
35
34
|
barConfig.buttons.maximize.disabled = true;
|
|
36
35
|
barConfig.buttons.minimize.disabled = true;
|
|
37
36
|
barConfig.buttons.restore.disabled = true;
|
|
38
37
|
barConfig.buttons.menu.disabled = true;
|
|
39
|
-
const idNotification = getId(
|
|
40
|
-
|
|
41
|
-
await Modal.
|
|
38
|
+
const idNotification = getId(NotificationManager.Tokens, 'board-notification-');
|
|
39
|
+
NotificationManager.Tokens[idNotification] = {};
|
|
40
|
+
await Modal.instance({
|
|
42
41
|
title: html`<div class="in notification-manager-date">${getIsoDate(new Date())}</div>
|
|
43
42
|
${options.html}`,
|
|
44
43
|
html: '',
|
|
@@ -57,8 +56,8 @@ const NotificationManager = {
|
|
|
57
56
|
setTimeout(() => {
|
|
58
57
|
if (s(`.btn-close-${idNotification}`)) s(`.btn-close-${idNotification}`).click();
|
|
59
58
|
}, 2000);
|
|
60
|
-
}
|
|
61
|
-
NotificationScheme
|
|
59
|
+
}
|
|
60
|
+
static NotificationScheme = {
|
|
62
61
|
// Visual Options
|
|
63
62
|
body: '<String>',
|
|
64
63
|
icon: '<URL String>',
|
|
@@ -66,11 +65,9 @@ const NotificationManager = {
|
|
|
66
65
|
badge: '<URL String>',
|
|
67
66
|
dir: "<String of 'auto' | 'ltr' | 'rtl'>",
|
|
68
67
|
timestamp: '<Long>',
|
|
69
|
-
|
|
70
68
|
// Both visual & behavioral options
|
|
71
69
|
actions: '<Array of Strings>',
|
|
72
70
|
data: '<Anything>',
|
|
73
|
-
|
|
74
71
|
// Behavioral Options
|
|
75
72
|
tag: '<String>',
|
|
76
73
|
requireInteraction: '<boolean>',
|
|
@@ -78,7 +75,6 @@ const NotificationManager = {
|
|
|
78
75
|
vibrate: '<Array of Integers>',
|
|
79
76
|
sound: '<URL String>',
|
|
80
77
|
silent: '<Boolean>',
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
78
|
+
};
|
|
79
|
+
}
|
|
84
80
|
export { NotificationManager };
|
|
@@ -22,9 +22,10 @@ import { PublicProfile } from './PublicProfile.js';
|
|
|
22
22
|
|
|
23
23
|
const logger = loggerFactory(import.meta);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
Tokens
|
|
27
|
-
|
|
25
|
+
class Panel {
|
|
26
|
+
static Tokens = {};
|
|
27
|
+
|
|
28
|
+
static async instance(
|
|
28
29
|
options = {
|
|
29
30
|
idPanel: '',
|
|
30
31
|
parentIdModal: '',
|
|
@@ -106,7 +107,7 @@ const Panel = {
|
|
|
106
107
|
await copyData(shareUrl);
|
|
107
108
|
await NotificationManager.Push({
|
|
108
109
|
status: 'success',
|
|
109
|
-
html: html`<div>${Translate.
|
|
110
|
+
html: html`<div>${Translate.instance('link-copied')}</div>`,
|
|
110
111
|
});
|
|
111
112
|
// Track the copy share link event
|
|
112
113
|
await DocumentService.patch({ id: obj._id, action: 'copy-share-link' });
|
|
@@ -132,7 +133,7 @@ const Panel = {
|
|
|
132
133
|
logger.error('Error copying share link:', error);
|
|
133
134
|
await NotificationManager.Push({
|
|
134
135
|
status: 'error',
|
|
135
|
-
html: html`<div>${Translate.
|
|
136
|
+
html: html`<div>${Translate.instance('error-copying-link')}</div>`,
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
139
|
},
|
|
@@ -165,7 +166,7 @@ const Panel = {
|
|
|
165
166
|
await copyData(foundFiles.mdFileId.mdPlain);
|
|
166
167
|
await NotificationManager.Push({
|
|
167
168
|
status: 'success',
|
|
168
|
-
html: html`<div>${Translate.
|
|
169
|
+
html: html`<div>${Translate.instance('markdown-source-copied')}</div>`,
|
|
169
170
|
});
|
|
170
171
|
} else {
|
|
171
172
|
await NotificationManager.Push({
|
|
@@ -177,7 +178,7 @@ const Panel = {
|
|
|
177
178
|
logger.error('Error copying markdown source:', error);
|
|
178
179
|
await NotificationManager.Push({
|
|
179
180
|
status: 'error',
|
|
180
|
-
html: html`<div>${Translate.
|
|
181
|
+
html: html`<div>${Translate.instance('error-copying-markdown')}</div>`,
|
|
181
182
|
});
|
|
182
183
|
}
|
|
183
184
|
},
|
|
@@ -327,24 +328,24 @@ const Panel = {
|
|
|
327
328
|
|
|
328
329
|
return html` <div class="in box-shadow ${idPanel} ${idPanel}-${id}" style="position: relative;">
|
|
329
330
|
<div class="fl ${idPanel}-tools session-fl-log-in ${obj.tools ? '' : 'hide'}">
|
|
330
|
-
${await BtnIcon.
|
|
331
|
+
${await BtnIcon.instance({
|
|
331
332
|
class: `in flr main-btn-menu action-bar-box ${idPanel}-btn-tool ${idPanel}-btn-delete-${id}`,
|
|
332
333
|
label: html`<div class="abs center"><i class="fas fa-trash"></i></div>`,
|
|
333
334
|
useVisibilityHover: true,
|
|
334
|
-
tooltipHtml: await Badge.
|
|
335
|
+
tooltipHtml: await Badge.instance({
|
|
335
336
|
id: `tooltip-${idPanel}-${id}`,
|
|
336
|
-
text: `${Translate.
|
|
337
|
+
text: `${Translate.instance(`delete`)}`,
|
|
337
338
|
classList: '',
|
|
338
339
|
style: { top: `-22px`, left: '-13px' },
|
|
339
340
|
}),
|
|
340
341
|
})}
|
|
341
|
-
${await BtnIcon.
|
|
342
|
+
${await BtnIcon.instance({
|
|
342
343
|
class: `in flr main-btn-menu action-bar-box ${idPanel}-btn-tool ${idPanel}-btn-edit-${id}`,
|
|
343
344
|
label: html`<div class="abs center"><i class="fas fa-edit"></i></div>`,
|
|
344
345
|
useVisibilityHover: true,
|
|
345
|
-
tooltipHtml: await Badge.
|
|
346
|
+
tooltipHtml: await Badge.instance({
|
|
346
347
|
id: `tooltip-${idPanel}-${id}`,
|
|
347
|
-
text: `${Translate.
|
|
348
|
+
text: `${Translate.instance(`edit`)}`,
|
|
348
349
|
classList: '',
|
|
349
350
|
style: { top: `-22px`, left: '-5px' },
|
|
350
351
|
}),
|
|
@@ -451,7 +452,7 @@ const Panel = {
|
|
|
451
452
|
tagColor = hasThemeColor ? darkenHex(themeColor, 0.5) : '#ffffff';
|
|
452
453
|
}
|
|
453
454
|
|
|
454
|
-
tagRender += await Badge.
|
|
455
|
+
tagRender += await Badge.instance({
|
|
455
456
|
text: tag,
|
|
456
457
|
classList: 'inl panel-tag-clickable',
|
|
457
458
|
style: {
|
|
@@ -513,10 +514,10 @@ const Panel = {
|
|
|
513
514
|
if (obj[infoKey] && obj[infoKey].length > 0 && formDataObj)
|
|
514
515
|
return html`<div class="in ${idPanel}-row">
|
|
515
516
|
<span class="${idPanel}-row-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
516
|
-
${keyIcon} ${Translate.
|
|
517
|
+
${keyIcon} ${Translate.instance(infoKey)}:</span
|
|
517
518
|
>
|
|
518
519
|
<span class="${idPanel}-row-value"
|
|
519
|
-
>${valueIcon} ${obj[infoKey].map((k) => Translate.
|
|
520
|
+
>${valueIcon} ${obj[infoKey].map((k) => Translate.instance(k)).join(', ')}</span
|
|
520
521
|
>
|
|
521
522
|
</div> `;
|
|
522
523
|
}
|
|
@@ -530,8 +531,8 @@ const Panel = {
|
|
|
530
531
|
<span class="${idPanel}-row-pin-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
531
532
|
${keyIcon}
|
|
532
533
|
${formDataObj.translateCode
|
|
533
|
-
? Translate.
|
|
534
|
-
: Translate.
|
|
534
|
+
? Translate.instance(formDataObj.translateCode)
|
|
535
|
+
: Translate.instance(infoKey)}:</span
|
|
535
536
|
>
|
|
536
537
|
<span class="${idPanel}-row-pin-value">${valueIcon} ${obj[infoKey]}</span>
|
|
537
538
|
</div> `;
|
|
@@ -546,8 +547,8 @@ const Panel = {
|
|
|
546
547
|
<span class="${idPanel}-row-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
547
548
|
${keyIcon}
|
|
548
549
|
${formDataObj.translateCode
|
|
549
|
-
? Translate.
|
|
550
|
-
: Translate.
|
|
550
|
+
? Translate.instance(formDataObj.translateCode)
|
|
551
|
+
: Translate.instance(infoKey)}:</span
|
|
551
552
|
>
|
|
552
553
|
<span class="${idPanel}-row-value"> ${valueIcon} ${obj[infoKey]}</span>
|
|
553
554
|
</div> `;
|
|
@@ -583,7 +584,7 @@ const Panel = {
|
|
|
583
584
|
class="${idPanel}-share-tooltip-${id}"
|
|
584
585
|
style="position: absolute; bottom: 50px; right: 0; background: rgba(0,0,0,0.8); color: white; padding: 6px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;"
|
|
585
586
|
>
|
|
586
|
-
${Translate.
|
|
587
|
+
${Translate.instance('copy-share-link')}
|
|
587
588
|
</div>
|
|
588
589
|
</div>`
|
|
589
590
|
: ''}
|
|
@@ -610,9 +611,9 @@ const Panel = {
|
|
|
610
611
|
|
|
611
612
|
let render = '';
|
|
612
613
|
let renderForm = html` <div class="in modal" style="top: 0px; z-index: 1; padding-bottom: 5px">
|
|
613
|
-
${await BtnIcon.
|
|
614
|
+
${await BtnIcon.instance({
|
|
614
615
|
class: `inl section-mp btn-custom btn-${idPanel}-close`,
|
|
615
|
-
label: html`<i class="fa-solid fa-xmark"></i> ${Translate.
|
|
616
|
+
label: html`<i class="fa-solid fa-xmark"></i> ${Translate.instance('close')}`,
|
|
616
617
|
type: 'button',
|
|
617
618
|
})}
|
|
618
619
|
</div>
|
|
@@ -623,9 +624,9 @@ const Panel = {
|
|
|
623
624
|
switch (modelData.inputType) {
|
|
624
625
|
case 'dropdown-checkbox': {
|
|
625
626
|
renderForm += html`<div class="in section-mp">
|
|
626
|
-
${await DropDown.
|
|
627
|
+
${await DropDown.instance({
|
|
627
628
|
id: `${modelData.id}`,
|
|
628
|
-
label: html`${Translate.
|
|
629
|
+
label: html`${Translate.instance(modelData.model)}`,
|
|
629
630
|
type: 'checkbox',
|
|
630
631
|
value: modelData.dropdown.options[0],
|
|
631
632
|
resetOption: true,
|
|
@@ -635,7 +636,7 @@ const Panel = {
|
|
|
635
636
|
value: dKey,
|
|
636
637
|
data: dKey,
|
|
637
638
|
checked: false,
|
|
638
|
-
display: html`${Translate.
|
|
639
|
+
display: html`${Translate.instance(dKey)}`,
|
|
639
640
|
onClick: function () {
|
|
640
641
|
logger.info('DropDown onClick', this.checked);
|
|
641
642
|
},
|
|
@@ -647,9 +648,9 @@ const Panel = {
|
|
|
647
648
|
}
|
|
648
649
|
case 'dropdown':
|
|
649
650
|
renderForm += html` <div class="in section-mp">
|
|
650
|
-
${await DropDown.
|
|
651
|
+
${await DropDown.instance({
|
|
651
652
|
id: `${modelData.id}`,
|
|
652
|
-
label: html`${Translate.
|
|
653
|
+
label: html`${Translate.instance(modelData.model)}`,
|
|
653
654
|
containerClass: `${idPanel}-dropdown`,
|
|
654
655
|
// type: 'checkbox',
|
|
655
656
|
value: modelData.dropdown.options[0].replaceAll(' ', '-').toLowerCase(),
|
|
@@ -659,7 +660,7 @@ const Panel = {
|
|
|
659
660
|
value: key,
|
|
660
661
|
data: dKey,
|
|
661
662
|
// checked: true,
|
|
662
|
-
display: html`${Translate.
|
|
663
|
+
display: html`${Translate.instance(dKey)}`,
|
|
663
664
|
onClick: function () {},
|
|
664
665
|
};
|
|
665
666
|
}),
|
|
@@ -668,7 +669,7 @@ const Panel = {
|
|
|
668
669
|
break;
|
|
669
670
|
case 'md': {
|
|
670
671
|
renderForm += html`<div class="in section-mp">
|
|
671
|
-
${await RichText.
|
|
672
|
+
${await RichText.instance({ id: modelData.id, parentIdModal: options.parentIdModal })}
|
|
672
673
|
</div>`;
|
|
673
674
|
break;
|
|
674
675
|
}
|
|
@@ -688,11 +689,11 @@ const Panel = {
|
|
|
688
689
|
<div class="in fll" style="width: 70%">
|
|
689
690
|
<div class="in">
|
|
690
691
|
${modelData.panel && modelData.panel.icon ? modelData.panel.icon : ''}
|
|
691
|
-
${Translate.
|
|
692
|
+
${Translate.instance(modelData.model)}
|
|
692
693
|
</div>
|
|
693
694
|
</div>
|
|
694
695
|
<div class="in fll" style="width: 30%">
|
|
695
|
-
${await ToggleSwitch.
|
|
696
|
+
${await ToggleSwitch.instance({
|
|
696
697
|
id: `${modelData.id}`,
|
|
697
698
|
containerClass: 'inl',
|
|
698
699
|
disabledOnClick: true,
|
|
@@ -734,14 +735,14 @@ const Panel = {
|
|
|
734
735
|
htmls(`.file-name-render-${modelData.id}`, htmlFileRender);
|
|
735
736
|
};
|
|
736
737
|
});
|
|
737
|
-
renderForm += `${await Input.
|
|
738
|
+
renderForm += `${await Input.instance({
|
|
738
739
|
inputClass: 'hide',
|
|
739
740
|
id: `${modelData.id}`,
|
|
740
741
|
type: modelData.inputType,
|
|
741
742
|
multiple: true,
|
|
742
743
|
// autocomplete: 'new-password',
|
|
743
|
-
label: html`<i class="fa-solid fa-file-arrow-up"></i> ${Translate.
|
|
744
|
-
${Translate.
|
|
744
|
+
label: html`<i class="fa-solid fa-file-arrow-up"></i> ${Translate.instance('select')}
|
|
745
|
+
${Translate.instance('file')}`,
|
|
745
746
|
containerClass: 'in section-mp width-mini-box input-container',
|
|
746
747
|
placeholder: true,
|
|
747
748
|
extension: () =>
|
|
@@ -751,18 +752,18 @@ const Panel = {
|
|
|
751
752
|
// disabled: true,
|
|
752
753
|
// disabledEye: true,
|
|
753
754
|
})}
|
|
754
|
-
${await BtnIcon.
|
|
755
|
+
${await BtnIcon.instance({
|
|
755
756
|
class: `inl section-mp btn-custom btn-${idPanel}-clean-file`,
|
|
756
|
-
label: html`<i class="fa-solid fa-file-circle-xmark"></i> ${Translate.
|
|
757
|
+
label: html`<i class="fa-solid fa-file-circle-xmark"></i> ${Translate.instance('clear-file')}`,
|
|
757
758
|
type: 'button',
|
|
758
759
|
})}`;
|
|
759
760
|
break;
|
|
760
761
|
default:
|
|
761
|
-
renderForm += `${await Input.
|
|
762
|
+
renderForm += `${await Input.instance({
|
|
762
763
|
id: `${modelData.id}`,
|
|
763
764
|
type: modelData.inputType,
|
|
764
765
|
// autocomplete: 'new-password',
|
|
765
|
-
label: html`<i class="fa-solid fa-pen-to-square"></i> ${Translate.
|
|
766
|
+
label: html`<i class="fa-solid fa-pen-to-square"></i> ${Translate.instance(modelData.model)}`,
|
|
766
767
|
containerClass: 'in section-mp width-mini-box input-container',
|
|
767
768
|
placeholder: true,
|
|
768
769
|
// disabled: true,
|
|
@@ -772,15 +773,18 @@ const Panel = {
|
|
|
772
773
|
}
|
|
773
774
|
}
|
|
774
775
|
let renderFormBtn = html`
|
|
775
|
-
${await BtnIcon.
|
|
776
|
+
${await BtnIcon.instance({
|
|
776
777
|
class: `inl section-mp btn-custom btn-${idPanel}-submit`,
|
|
777
|
-
label: html`<span class="btn-${idPanel}-label-add"
|
|
778
|
-
|
|
778
|
+
label: html`<span class="btn-${idPanel}-label-add"
|
|
779
|
+
><i class="fas fa-plus"></i> ${Translate.instance('add')}</span
|
|
780
|
+
><span class="btn-${idPanel}-label-edit hide"
|
|
781
|
+
><i class="fas fa-edit"></i> ${Translate.instance('edit')}</span
|
|
782
|
+
>`,
|
|
779
783
|
type: 'submit',
|
|
780
784
|
})}
|
|
781
|
-
${await BtnIcon.
|
|
785
|
+
${await BtnIcon.instance({
|
|
782
786
|
class: `inl section-mp btn-custom btn-${idPanel}-clean`,
|
|
783
|
-
label: html`<i class="fa-solid fa-broom"></i> ${Translate.
|
|
787
|
+
label: html`<i class="fa-solid fa-broom"></i> ${Translate.instance('clear')}`,
|
|
784
788
|
type: 'button',
|
|
785
789
|
})}
|
|
786
790
|
`;
|
|
@@ -883,7 +887,7 @@ const Panel = {
|
|
|
883
887
|
if (data.length > 0) for (const obj of data) render += await renderPanel(obj);
|
|
884
888
|
else {
|
|
885
889
|
render += html`<div class="in" style="min-height: 200px">
|
|
886
|
-
<div class="abs center"><i class="fas fa-exclamation-circle"></i> ${Translate.
|
|
890
|
+
<div class="abs center"><i class="fas fa-exclamation-circle"></i> ${Translate.instance(`no-result-found`)}</div>
|
|
887
891
|
</div>`;
|
|
888
892
|
|
|
889
893
|
if (options.on.noResultFound) setTimeout(options.on.noResultFound);
|
|
@@ -902,7 +906,7 @@ const Panel = {
|
|
|
902
906
|
setTimeout(() => {
|
|
903
907
|
s(`.${btnSelector}`).onclick = () => dataBtn.onClick();
|
|
904
908
|
});
|
|
905
|
-
customButtonsRender += ` ${await BtnIcon.
|
|
909
|
+
customButtonsRender += ` ${await BtnIcon.instance({
|
|
906
910
|
class: `inl section-mp btn-custom ${btnSelector}`,
|
|
907
911
|
label: dataBtn.label,
|
|
908
912
|
type: 'button',
|
|
@@ -1089,11 +1093,11 @@ const Panel = {
|
|
|
1089
1093
|
<div class="${idPanel}-container">
|
|
1090
1094
|
<div class="in modal ${idPanel}-form-container ${options.formContainerClass ? options.formContainerClass : ''}">
|
|
1091
1095
|
<div class="in ${idPanel}-form-header">
|
|
1092
|
-
${await BtnIcon.
|
|
1096
|
+
${await BtnIcon.instance({
|
|
1093
1097
|
class: `inl section-mp btn-custom btn-${idPanel}-add ${
|
|
1094
1098
|
options?.role?.add ? (!options.role.add() ? 'hide' : '') : ''
|
|
1095
1099
|
}`,
|
|
1096
|
-
label: html`<i class="fas fa-plus"></i> ${Translate.
|
|
1100
|
+
label: html`<i class="fas fa-plus"></i> ${Translate.instance('add')}`,
|
|
1097
1101
|
type: 'button',
|
|
1098
1102
|
})}
|
|
1099
1103
|
<!-- pagination component -->
|
|
@@ -1116,8 +1120,8 @@ const Panel = {
|
|
|
1116
1120
|
<div class="in ${idPanel}-render">${render}</div>
|
|
1117
1121
|
</div>
|
|
1118
1122
|
`;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1121
1125
|
|
|
1122
1126
|
// Function to generate base styles
|
|
1123
1127
|
function getBaseStyles(idPanel, scrollClassContainer) {
|