underpost 2.85.7 → 2.89.0
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 -1
- package/README.md +2 -2
- package/bin/build.js +8 -10
- package/cli.md +3 -2
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +50 -50
- package/manifests/deployment/dd-test-development/proxy.yaml +4 -4
- package/package.json +1 -1
- package/src/api/file/file.service.js +29 -3
- package/src/cli/baremetal.js +1 -2
- package/src/cli/index.js +1 -0
- package/src/cli/repository.js +8 -1
- package/src/cli/run.js +97 -36
- package/src/client/components/core/AgGrid.js +42 -3
- package/src/client/components/core/CommonJs.js +4 -0
- package/src/client/components/core/Css.js +95 -48
- package/src/client/components/core/CssCore.js +0 -1
- package/src/client/components/core/LoadingAnimation.js +2 -2
- package/src/client/components/core/Logger.js +2 -9
- package/src/client/components/core/Modal.js +22 -14
- package/src/client/components/core/ObjectLayerEngine.js +300 -9
- package/src/client/components/core/ObjectLayerEngineModal.js +686 -148
- package/src/client/components/core/ObjectLayerEngineViewer.js +1061 -0
- package/src/client/components/core/Pagination.js +15 -5
- package/src/client/components/core/Router.js +5 -1
- package/src/client/components/core/Translate.js +4 -0
- package/src/client/components/core/Worker.js +8 -1
- package/src/client/services/default/default.management.js +86 -16
- package/src/db/mariadb/MariaDB.js +2 -2
- package/src/index.js +1 -1
- package/src/server/client-build.js +57 -2
- package/src/server/object-layer.js +44 -0
- package/src/server/start.js +12 -0
- package/src/ws/IoInterface.js +2 -3
- package/AUTHORS.md +0 -21
- package/src/server/network.js +0 -72
|
@@ -11,7 +11,7 @@ const AgGrid = {
|
|
|
11
11
|
grids: {},
|
|
12
12
|
theme: `ag-theme-alpine`, // quartz
|
|
13
13
|
Render: async function (options) {
|
|
14
|
-
let { id } = options;
|
|
14
|
+
let { id, paginationOptions } = options;
|
|
15
15
|
setTimeout(() => {
|
|
16
16
|
// Grid Options: Contains all of the grid configurations
|
|
17
17
|
const gridOptions = {
|
|
@@ -34,6 +34,38 @@ const AgGrid = {
|
|
|
34
34
|
return params.data && params.data._new;
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
// Cell rendering events
|
|
38
|
+
onFirstDataRendered: options?.onFirstDataRendered,
|
|
39
|
+
onViewportChanged: options?.onViewportChanged,
|
|
40
|
+
onModelUpdated: options?.onModelUpdated,
|
|
41
|
+
onVirtualRowRemoved: options?.onVirtualRowRemoved,
|
|
42
|
+
// Cell interaction events
|
|
43
|
+
onCellClicked: options?.onCellClicked,
|
|
44
|
+
onCellDoubleClicked: options?.onCellDoubleClicked,
|
|
45
|
+
onCellFocused: options?.onCellFocused,
|
|
46
|
+
onCellMouseOver: options?.onCellMouseOver,
|
|
47
|
+
onCellMouseOut: options?.onCellMouseOut,
|
|
48
|
+
onCellValueChanged: options?.onCellValueChanged,
|
|
49
|
+
// set background colour on every row, this is probably bad, should be using CSS classes
|
|
50
|
+
// rowStyle: { background: 'black' },
|
|
51
|
+
|
|
52
|
+
// set background colour on even rows again, this looks bad, should be using CSS classes
|
|
53
|
+
// getRowStyle: (params) => {
|
|
54
|
+
// if (params.node.rowIndex % 2 === 0) {
|
|
55
|
+
// return { background: 'red' };
|
|
56
|
+
// }
|
|
57
|
+
// },
|
|
58
|
+
|
|
59
|
+
// all rows assigned CSS class 'my-green-class'
|
|
60
|
+
// rowClass: 'my-green-class',
|
|
61
|
+
|
|
62
|
+
// all even rows assigned 'my-shaded-effect'
|
|
63
|
+
// getRowClass: (params) => {
|
|
64
|
+
// if (params.node.rowIndex % 2 === 0) {
|
|
65
|
+
// return 'my-shaded-effect';
|
|
66
|
+
// }
|
|
67
|
+
// },
|
|
68
|
+
|
|
37
69
|
// domLayout: 'autoHeight', || 'normal'
|
|
38
70
|
// Column Definitions: Defines & controls grid columns.
|
|
39
71
|
columnDefs: options?.gridOptions?.rowData?.[0]
|
|
@@ -62,7 +94,9 @@ const AgGrid = {
|
|
|
62
94
|
if (!options.style || !options.style.height) {
|
|
63
95
|
if (options.parentModal && Modal.Data[options.parentModal].options.observer) {
|
|
64
96
|
Modal.Data[options.parentModal].onObserverListener[id + '-observer'] = ({ width, height }) => {
|
|
65
|
-
if (s(`.${id}`))
|
|
97
|
+
if (s(`.${id}`))
|
|
98
|
+
s(`.${id}`).style.height =
|
|
99
|
+
`${height - 180 + (options.customHeightOffset ? options.customHeightOffset : 0)}px`;
|
|
66
100
|
else delete Modal.Data[options.parentModal].onObserverListener[id + '-observer'];
|
|
67
101
|
};
|
|
68
102
|
s(`.${id}`).style.height = `${s(`.${options.parentModal}`).offsetHeight - 180}px`;
|
|
@@ -70,6 +104,9 @@ const AgGrid = {
|
|
|
70
104
|
}
|
|
71
105
|
});
|
|
72
106
|
const usePagination = options?.usePagination;
|
|
107
|
+
const limitOptionsAttr = paginationOptions?.limitOptions
|
|
108
|
+
? `limit-options='${JSON.stringify(paginationOptions.limitOptions)}'`
|
|
109
|
+
: '';
|
|
73
110
|
return html`
|
|
74
111
|
<div
|
|
75
112
|
class="${id} ${this.theme}${options?.darkTheme ? `-dark` : ''}"
|
|
@@ -77,7 +114,7 @@ const AgGrid = {
|
|
|
77
114
|
? Object.keys(options.style).map((styleKey) => `${styleKey}: ${options.style[styleKey]}; `)
|
|
78
115
|
: ''}"
|
|
79
116
|
></div>
|
|
80
|
-
${usePagination ? `<ag-pagination id="ag-pagination-${id}"></ag-pagination>` : ''}
|
|
117
|
+
${usePagination ? `<ag-pagination id="ag-pagination-${id}" ${limitOptionsAttr}></ag-pagination>` : ''}
|
|
81
118
|
`;
|
|
82
119
|
},
|
|
83
120
|
RenderStyle: async function (
|
|
@@ -159,6 +196,7 @@ const AgGrid = {
|
|
|
159
196
|
${darkTheme
|
|
160
197
|
? html`
|
|
161
198
|
<style>
|
|
199
|
+
.row-new-highlight,
|
|
162
200
|
.ag-row.row-new-highlight {
|
|
163
201
|
background-color: #6d68ff !important;
|
|
164
202
|
transition: background-color 1s ease-out;
|
|
@@ -172,6 +210,7 @@ const AgGrid = {
|
|
|
172
210
|
</style>
|
|
173
211
|
`
|
|
174
212
|
: html`<style>
|
|
213
|
+
.row-new-highlight,
|
|
175
214
|
.ag-row.row-new-highlight {
|
|
176
215
|
background-color: #d0eaf8 !important;
|
|
177
216
|
transition: background-color 1s ease-out;
|
|
@@ -947,6 +947,8 @@ const emotionsData = [
|
|
|
947
947
|
const userRoleEnum = ['admin', 'moderator', 'user', 'guest'];
|
|
948
948
|
const commonAdminGuard = (role) => userRoleEnum.indexOf(role) === userRoleEnum.indexOf('admin');
|
|
949
949
|
const commonModeratorGuard = (role) => userRoleEnum.indexOf(role) <= userRoleEnum.indexOf('moderator');
|
|
950
|
+
const commonUserGuard = (role) => userRoleEnum.indexOf(role) <= userRoleEnum.indexOf('user');
|
|
951
|
+
const commonGuestGuard = (role) => userRoleEnum.indexOf(role) <= userRoleEnum.indexOf('guest');
|
|
950
952
|
|
|
951
953
|
export {
|
|
952
954
|
s4,
|
|
@@ -1003,6 +1005,8 @@ export {
|
|
|
1003
1005
|
generateRandomPasswordSelection,
|
|
1004
1006
|
commonAdminGuard,
|
|
1005
1007
|
commonModeratorGuard,
|
|
1008
|
+
commonUserGuard,
|
|
1009
|
+
commonGuestGuard,
|
|
1006
1010
|
isChileanIdentityDocument,
|
|
1007
1011
|
getCurrentTrace,
|
|
1008
1012
|
userRoleEnum,
|
|
@@ -221,8 +221,11 @@ const borderChar = (px, color, selectors, hover = false) => {
|
|
|
221
221
|
(selector) => html`
|
|
222
222
|
<style>
|
|
223
223
|
${selector}${hover ? ':hover' : ''} {
|
|
224
|
-
text-shadow:
|
|
225
|
-
|
|
224
|
+
text-shadow:
|
|
225
|
+
${px}px -${px}px ${px}px ${color},
|
|
226
|
+
-${px}px ${px}px ${px}px ${color},
|
|
227
|
+
-${px}px -${px}px ${px}px ${color},
|
|
228
|
+
${px}px ${px}px ${px}px ${color};
|
|
226
229
|
}
|
|
227
230
|
</style>
|
|
228
231
|
`,
|
|
@@ -239,20 +242,28 @@ const boxShadow = ({ selector }) => html`
|
|
|
239
242
|
? html`
|
|
240
243
|
<style>
|
|
241
244
|
${selector} {
|
|
242
|
-
box-shadow:
|
|
245
|
+
box-shadow:
|
|
246
|
+
0 4px 8px 0 rgba(255, 255, 255, 0.1),
|
|
247
|
+
0 6px 20px 0 rgba(255, 255, 255, 0.08);
|
|
243
248
|
}
|
|
244
249
|
${selector}:hover {
|
|
245
|
-
box-shadow:
|
|
250
|
+
box-shadow:
|
|
251
|
+
0 8px 16px 0 rgba(255, 255, 255, 0.15),
|
|
252
|
+
0 10px 30px 0 rgba(255, 255, 255, 0.1);
|
|
246
253
|
}
|
|
247
254
|
</style>
|
|
248
255
|
`
|
|
249
256
|
: html`
|
|
250
257
|
<style>
|
|
251
258
|
${selector} {
|
|
252
|
-
box-shadow:
|
|
259
|
+
box-shadow:
|
|
260
|
+
0 4px 8px 0 rgba(0, 0, 0, 0.2),
|
|
261
|
+
0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
253
262
|
}
|
|
254
263
|
${selector}:hover {
|
|
255
|
-
box-shadow:
|
|
264
|
+
box-shadow:
|
|
265
|
+
0 8px 16px 0 rgba(0, 0, 0, 0.2),
|
|
266
|
+
0 10px 30px 0 rgba(0, 0, 0, 0.3);
|
|
256
267
|
}
|
|
257
268
|
</style>
|
|
258
269
|
`}
|
|
@@ -452,7 +463,9 @@ const typeWriter = async function ({ id, html, seconds, endHideBlink, container
|
|
|
452
463
|
overflow: hidden;
|
|
453
464
|
border-right: 0.15em solid orange;
|
|
454
465
|
white-space: nowrap;
|
|
455
|
-
animation:
|
|
466
|
+
animation:
|
|
467
|
+
typing-${id} ${typingAnimationTransitionStyle[1]},
|
|
468
|
+
blink-caret-${id} 0.5s step-end infinite;
|
|
456
469
|
animation-fill-mode: forwards;
|
|
457
470
|
width: 0;
|
|
458
471
|
}
|
|
@@ -517,12 +530,20 @@ const dashRange = ({ selector, color }) => {
|
|
|
517
530
|
return html`
|
|
518
531
|
<style>
|
|
519
532
|
.${selector} {
|
|
520
|
-
background:
|
|
521
|
-
linear-gradient(90deg, ${color} 50%, transparent 50%), linear-gradient(
|
|
522
|
-
linear-gradient(0deg, ${color} 50%, transparent 50%);
|
|
533
|
+
background:
|
|
534
|
+
linear-gradient(90deg, ${color} 50%, transparent 50%), linear-gradient(90deg, ${color} 50%, transparent 50%),
|
|
535
|
+
linear-gradient(0deg, ${color} 50%, transparent 50%), linear-gradient(0deg, ${color} 50%, transparent 50%);
|
|
523
536
|
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
524
|
-
background-size:
|
|
525
|
-
|
|
537
|
+
background-size:
|
|
538
|
+
16px 4px,
|
|
539
|
+
16px 4px,
|
|
540
|
+
4px 16px,
|
|
541
|
+
4px 16px;
|
|
542
|
+
background-position:
|
|
543
|
+
0% 0%,
|
|
544
|
+
100% 100%,
|
|
545
|
+
0% 100%,
|
|
546
|
+
100% 0px;
|
|
526
547
|
border-radius: 5px;
|
|
527
548
|
padding: 10px;
|
|
528
549
|
animation: ${selector}_dash_range 5s linear infinite;
|
|
@@ -530,7 +551,11 @@ const dashRange = ({ selector, color }) => {
|
|
|
530
551
|
|
|
531
552
|
@keyframes ${selector}_dash_range {
|
|
532
553
|
to {
|
|
533
|
-
background-position:
|
|
554
|
+
background-position:
|
|
555
|
+
100% 0%,
|
|
556
|
+
0% 100%,
|
|
557
|
+
0% 0%,
|
|
558
|
+
100% 100%;
|
|
534
559
|
}
|
|
535
560
|
}
|
|
536
561
|
</style>
|
|
@@ -660,8 +685,8 @@ const scrollBarLightRender = () => {
|
|
|
660
685
|
::-` +
|
|
661
686
|
b +
|
|
662
687
|
`-scrollbar {
|
|
663
|
-
width: 5px;
|
|
664
|
-
height: 5px;
|
|
688
|
+
width: 5px;
|
|
689
|
+
height: 5px;
|
|
665
690
|
}
|
|
666
691
|
|
|
667
692
|
/* Track */
|
|
@@ -690,6 +715,10 @@ const scrollBarLightRender = () => {
|
|
|
690
715
|
.join('');
|
|
691
716
|
};
|
|
692
717
|
|
|
718
|
+
// adjustHex: supports #RGB #RGBA #RRGGBB #RRGGBBAA
|
|
719
|
+
// preserves alpha channel if present (does not modify it)
|
|
720
|
+
// usage: adjustHex('#24FBFFFF', 0.1)
|
|
721
|
+
|
|
693
722
|
function adjustHex(hex, factor = 0.1, options = {}) {
|
|
694
723
|
if (typeof hex !== 'string') throw new TypeError('hex must be a string');
|
|
695
724
|
if (typeof factor !== 'number') throw new TypeError('factor must be a number');
|
|
@@ -701,27 +730,34 @@ function adjustHex(hex, factor = 0.1, options = {}) {
|
|
|
701
730
|
|
|
702
731
|
const mode = options.mode === 'hsl' ? 'hsl' : 'mix';
|
|
703
732
|
|
|
704
|
-
// normalize hex
|
|
733
|
+
// normalize hex: accept 3,4,6,8 (with or without #)
|
|
705
734
|
let h = hex.replace(/^#/, '').trim();
|
|
706
|
-
if (!
|
|
707
|
-
|
|
735
|
+
if (![3, 4, 6, 8].includes(h.length)) {
|
|
736
|
+
throw new Error('Invalid hex format — expected 3, 4, 6 or 8 hex digits');
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// expand shorthand (#RGB or #RGBA -> #RRGGBB or #RRGGBBAA)
|
|
740
|
+
if (h.length === 3 || h.length === 4) {
|
|
708
741
|
h = h
|
|
709
742
|
.split('')
|
|
710
743
|
.map((c) => c + c)
|
|
711
744
|
.join('');
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
const hasAlpha = h.length === 8;
|
|
712
748
|
|
|
713
749
|
const r = parseInt(h.slice(0, 2), 16);
|
|
714
750
|
const g = parseInt(h.slice(2, 4), 16);
|
|
715
751
|
const b = parseInt(h.slice(4, 6), 16);
|
|
752
|
+
const a = hasAlpha ? parseInt(h.slice(6, 8), 16) : null; // keep alpha as-is if present
|
|
716
753
|
|
|
717
|
-
const clamp = (v,
|
|
754
|
+
const clamp = (v, a0 = 0, z = 255) => Math.max(a0, Math.min(z, v));
|
|
718
755
|
|
|
719
|
-
const rgbToHex = (rr, gg, bb) =>
|
|
720
|
-
'
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
.toLowerCase();
|
|
756
|
+
const rgbToHex = (rr, gg, bb, aa = null) => {
|
|
757
|
+
const parts = [rr, gg, bb].map((v) => Math.round(v).toString(16).padStart(2, '0'));
|
|
758
|
+
if (aa !== null) parts.push(Math.round(aa).toString(16).padStart(2, '0'));
|
|
759
|
+
return '#' + parts.join('').toLowerCase();
|
|
760
|
+
};
|
|
725
761
|
|
|
726
762
|
if (mode === 'mix') {
|
|
727
763
|
// positive: mix toward white (255); negative: mix toward black (0)
|
|
@@ -729,11 +765,15 @@ function adjustHex(hex, factor = 0.1, options = {}) {
|
|
|
729
765
|
if (factor >= 0) {
|
|
730
766
|
return clamp(Math.round(c + (255 - c) * factor));
|
|
731
767
|
} else {
|
|
732
|
-
const
|
|
733
|
-
return clamp(Math.round(c * (1 -
|
|
768
|
+
const aFactor = Math.abs(factor);
|
|
769
|
+
return clamp(Math.round(c * (1 - aFactor)));
|
|
734
770
|
}
|
|
735
771
|
};
|
|
736
|
-
|
|
772
|
+
|
|
773
|
+
const rr = mixChannel(r);
|
|
774
|
+
const gg = mixChannel(g);
|
|
775
|
+
const bb = mixChannel(b);
|
|
776
|
+
return rgbToHex(rr, gg, bb, a);
|
|
737
777
|
} else {
|
|
738
778
|
// HSL mode: convert rgb to hsl, adjust L by factor, convert back
|
|
739
779
|
const rgbToHsl = (r, g, b) => {
|
|
@@ -791,10 +831,16 @@ function adjustHex(hex, factor = 0.1, options = {}) {
|
|
|
791
831
|
let newL = ll + factor;
|
|
792
832
|
newL = Math.max(0, Math.min(1, newL));
|
|
793
833
|
const { r: r2, g: g2, b: b2 } = hslToRgb(hh, ss, newL);
|
|
794
|
-
return rgbToHex(r2, g2, b2);
|
|
834
|
+
return rgbToHex(r2, g2, b2, a);
|
|
795
835
|
}
|
|
796
836
|
}
|
|
797
837
|
|
|
838
|
+
// Examples (uncomment to test):
|
|
839
|
+
// console.log(adjustHex('#24FBFFFF', 0.1)); // accepts 8-digit input
|
|
840
|
+
// console.log(adjustHex('#24FBFF', 0.1)); // 6-digit
|
|
841
|
+
// console.log(adjustHex('#4bf', -0.2)); // 3-digit
|
|
842
|
+
// console.log(adjustHex('#4bf8', -0.2)); // 4-digit (with alpha)
|
|
843
|
+
|
|
798
844
|
// Convenience helpers:
|
|
799
845
|
function lightenHex(hex, percentOr01 = 0.1, options = {}) {
|
|
800
846
|
return adjustHex(hex, Math.abs(percentOr01), options);
|
|
@@ -867,7 +913,7 @@ const scrollBarDarkRender = () => {
|
|
|
867
913
|
b +
|
|
868
914
|
`-scrollbar {
|
|
869
915
|
width: 8px;
|
|
870
|
-
height: 8px;
|
|
916
|
+
height: 8px;
|
|
871
917
|
/* line-height: 1em; */
|
|
872
918
|
}
|
|
873
919
|
|
|
@@ -1011,29 +1057,30 @@ const cssEffect = async (containerSelector, event) => {
|
|
|
1011
1057
|
}, 600);
|
|
1012
1058
|
};
|
|
1013
1059
|
|
|
1014
|
-
const imageShimmer = () =>
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
style: {
|
|
1018
|
-
width: '95%',
|
|
1019
|
-
height: '95%',
|
|
1020
|
-
'border-radius': '10px',
|
|
1021
|
-
overflow: 'hidden',
|
|
1022
|
-
},
|
|
1023
|
-
})}"
|
|
1024
|
-
>
|
|
1025
|
-
<div
|
|
1026
|
-
class="abs center"
|
|
1060
|
+
const imageShimmer = () =>
|
|
1061
|
+
html`<div
|
|
1062
|
+
class="abs center ssr-shimmer-search-box"
|
|
1027
1063
|
style="${renderCssAttr({
|
|
1028
1064
|
style: {
|
|
1029
|
-
|
|
1030
|
-
|
|
1065
|
+
width: '95%',
|
|
1066
|
+
height: '95%',
|
|
1067
|
+
'border-radius': '10px',
|
|
1068
|
+
overflow: 'hidden',
|
|
1031
1069
|
},
|
|
1032
1070
|
})}"
|
|
1033
1071
|
>
|
|
1034
|
-
<
|
|
1035
|
-
|
|
1036
|
-
|
|
1072
|
+
<div
|
|
1073
|
+
class="abs center"
|
|
1074
|
+
style="${renderCssAttr({
|
|
1075
|
+
style: {
|
|
1076
|
+
'font-size': '70px',
|
|
1077
|
+
color: `#bababa`,
|
|
1078
|
+
},
|
|
1079
|
+
})}"
|
|
1080
|
+
>
|
|
1081
|
+
<i class="fa-solid fa-photo-film"></i>
|
|
1082
|
+
</div>
|
|
1083
|
+
</div>`;
|
|
1037
1084
|
|
|
1038
1085
|
const renderChessPattern = (patternSize = 20) =>
|
|
1039
1086
|
`background: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / ${patternSize}px ${patternSize}px`;
|
|
@@ -57,7 +57,7 @@ const LoadingAnimation = {
|
|
|
57
57
|
},
|
|
58
58
|
spinner: {
|
|
59
59
|
getId: (id) => `spinner-progress-${id.slice(1)}`,
|
|
60
|
-
play: async function (container, spinner) {
|
|
60
|
+
play: async function (container, spinner, options = { append: '', prepend: '' }) {
|
|
61
61
|
if (!s(container)) return;
|
|
62
62
|
const id = this.getId(container);
|
|
63
63
|
|
|
@@ -85,7 +85,7 @@ const LoadingAnimation = {
|
|
|
85
85
|
style,
|
|
86
86
|
})}"
|
|
87
87
|
>
|
|
88
|
-
${render}
|
|
88
|
+
${options.prepend ? options.prepend : ''} ${render} ${options.append ? options.append : ''}
|
|
89
89
|
</div>
|
|
90
90
|
`,
|
|
91
91
|
);
|
|
@@ -5,16 +5,9 @@ const loggerFactory = (meta, options = { trace: false }) => {
|
|
|
5
5
|
const types = ['error', 'warn', 'info', 'debug'];
|
|
6
6
|
const logger = {
|
|
7
7
|
log: function (type, args) {
|
|
8
|
-
if (
|
|
9
|
-
console.log = () => null;
|
|
10
|
-
console.error = () => null;
|
|
11
|
-
console.info = () => null;
|
|
12
|
-
console.warn = () => null;
|
|
13
|
-
}
|
|
8
|
+
if (!window.renderPayload.dev) return;
|
|
14
9
|
if (options.trace === true) args.push(getCurrentTrace().split('Logger.js:23')[1]);
|
|
15
|
-
return
|
|
16
|
-
? console[type](`[${meta}] ${new Date().toISOString()} ${type}:`, ...args)
|
|
17
|
-
: null;
|
|
10
|
+
return console[type](`[${meta}] ${new Date().toISOString()} ${type}:`, ...args);
|
|
18
11
|
},
|
|
19
12
|
};
|
|
20
13
|
types.map(
|
|
@@ -465,6 +465,7 @@ const Modal = {
|
|
|
465
465
|
>
|
|
466
466
|
${await Input.Render({
|
|
467
467
|
id: inputSearchBoxId,
|
|
468
|
+
autocomplete: 'off',
|
|
468
469
|
placeholder: Modal.mobileModal() ? Translate.Render('search', '.top-bar-search-box') : undefined, // html`<i class="fa-solid fa-magnifying-glass"></i> ${Translate.Render('search')}`,
|
|
469
470
|
placeholderIcon: html`<div
|
|
470
471
|
class="in fll"
|
|
@@ -619,12 +620,12 @@ const Modal = {
|
|
|
619
620
|
result.fontAwesomeIcon
|
|
620
621
|
? html`<i class="${result.fontAwesomeIcon.classList.toString()}"></i> `
|
|
621
622
|
: result.imgElement
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
? html`<img
|
|
624
|
+
class="inl"
|
|
625
|
+
src="${result.imgElement.src}"
|
|
626
|
+
style="${renderCssAttr({ style: { width: '25px', height: '25px' } })}"
|
|
627
|
+
/>`
|
|
628
|
+
: ''
|
|
628
629
|
} ${Translate.Render(result.routerId)}`,
|
|
629
630
|
class: `wfa search-result-btn-${result.routerId} ${
|
|
630
631
|
indexResult === currentKeyBoardSearchBoxIndex ? 'main-btn-menu-active' : ''
|
|
@@ -692,10 +693,12 @@ const Modal = {
|
|
|
692
693
|
});
|
|
693
694
|
const imgElement = getAllChildNodes(s(`.main-btn-${routerId}`)).find((e) => {
|
|
694
695
|
return (
|
|
695
|
-
typeof e.src === 'string' &&
|
|
696
|
-
e.src.match(routerId) &&
|
|
697
696
|
e.classList &&
|
|
698
|
-
Array.from(e.classList).find((e) =>
|
|
697
|
+
Array.from(e.classList).find((e) =>
|
|
698
|
+
options.searchCustomImgClass
|
|
699
|
+
? e.match(options.searchCustomImgClass)
|
|
700
|
+
: e.match('img-btn-square-menu'),
|
|
701
|
+
)
|
|
699
702
|
);
|
|
700
703
|
});
|
|
701
704
|
if (imgElement || fontAwesomeIcon) {
|
|
@@ -1896,8 +1899,8 @@ const Modal = {
|
|
|
1896
1899
|
const idSlide = this.Data[options.slideMenu]['slide-menu']
|
|
1897
1900
|
? 'slide-menu'
|
|
1898
1901
|
: this.Data[options.slideMenu]['slide-menu-right']
|
|
1899
|
-
|
|
1900
|
-
|
|
1902
|
+
? 'slide-menu-right'
|
|
1903
|
+
: 'slide-menu-left';
|
|
1901
1904
|
const callBack = () => {
|
|
1902
1905
|
s(`.${idModal}`).style.transition = '0.3s';
|
|
1903
1906
|
s(`.${idModal}`).style.width = `${windowGetW() - this.Data[options.slideMenu][idSlide].width}px`;
|
|
@@ -2038,7 +2041,10 @@ const Modal = {
|
|
|
2038
2041
|
setTopModal();
|
|
2039
2042
|
this.Data[idModal].onClickListener[`${idModal}-z-index`] = () => {
|
|
2040
2043
|
if (s(`.${idModal}`) && s(`.${idModal}`).style.zIndex === '3') {
|
|
2041
|
-
if (this.Data[idModal].options.route)
|
|
2044
|
+
if (this.Data[idModal].options.route)
|
|
2045
|
+
setPath(
|
|
2046
|
+
`${getProxyPath()}${this.Data[idModal].options.route}${location.search ?? ''}${location.hash ?? ''}`,
|
|
2047
|
+
);
|
|
2042
2048
|
cleanTopModal();
|
|
2043
2049
|
setTopModal();
|
|
2044
2050
|
}
|
|
@@ -2159,6 +2165,8 @@ const Modal = {
|
|
|
2159
2165
|
};
|
|
2160
2166
|
});
|
|
2161
2167
|
},
|
|
2168
|
+
labelSelectorTopOffsetStartAnimation: `-40px`,
|
|
2169
|
+
labelSelectorTopOffsetEndAnimation: `-3px`,
|
|
2162
2170
|
menuTextLabelAnimation: (idModal, subMenuId) => {
|
|
2163
2171
|
if (
|
|
2164
2172
|
!s(
|
|
@@ -2193,12 +2201,12 @@ const Modal = {
|
|
|
2193
2201
|
el.style.transition = null;
|
|
2194
2202
|
});
|
|
2195
2203
|
sa(labelSelector).forEach((el) => {
|
|
2196
|
-
el.style.top =
|
|
2204
|
+
el.style.top = Modal.labelSelectorTopOffsetStartAnimation;
|
|
2197
2205
|
});
|
|
2198
2206
|
}, 300);
|
|
2199
2207
|
setTimeout(() => {
|
|
2200
2208
|
sa(labelSelector).forEach((el) => {
|
|
2201
|
-
el.style.top =
|
|
2209
|
+
el.style.top = Modal.labelSelectorTopOffsetEndAnimation;
|
|
2202
2210
|
});
|
|
2203
2211
|
}, 400);
|
|
2204
2212
|
}
|