underpost 2.7.7 → 2.7.9
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/ghpkg.yml +115 -0
- package/.github/workflows/publish.yml +20 -3
- package/.github/workflows/pwa-microservices-template.page.yml +54 -0
- package/.github/workflows/pwa-microservices-template.test.yml +30 -0
- package/.vscode/settings.json +6 -0
- package/CHANGELOG.md +64 -16
- package/bin/cron.js +47 -0
- package/bin/db.js +9 -1
- package/bin/deploy.js +207 -11
- package/bin/file.js +17 -1
- package/bin/index.js +1 -1
- package/bin/util.js +22 -0
- package/conf.js +18 -4
- package/docker-compose.yml +1 -1
- package/package.json +3 -3
- package/src/api/core/core.router.js +9 -9
- package/src/api/core/core.service.js +6 -4
- package/src/api/default/default.service.js +4 -4
- package/src/api/file/file.service.js +3 -3
- package/src/api/user/user.service.js +7 -7
- package/src/client/components/core/Css.js +0 -222
- package/src/client/components/core/CssCore.js +30 -3
- package/src/client/components/core/Docs.js +110 -10
- package/src/client/components/core/Modal.js +224 -22
- package/src/client/components/core/Panel.js +1 -1
- package/src/client/components/core/PanelForm.js +2 -1
- package/src/client/components/core/Responsive.js +15 -0
- package/src/client/components/core/RichText.js +4 -2
- package/src/client/components/core/Translate.js +6 -2
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Worker.js +12 -4
- package/src/client/public/default/plantuml/client-conf.svg +1 -1
- package/src/client/public/default/plantuml/client-schema.svg +1 -1
- package/src/client/public/default/plantuml/cron-conf.svg +1 -1
- package/src/client/public/default/plantuml/cron-schema.svg +1 -1
- package/src/client/public/default/plantuml/server-conf.svg +1 -1
- package/src/client/public/default/plantuml/server-schema.svg +1 -1
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -1
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -1
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/services/default/default.management.js +118 -120
- package/src/client/ssr/Render.js +224 -3
- package/src/client/ssr/common/Alert.js +75 -0
- package/src/client/ssr/common/SsrCore.js +91 -0
- package/src/client/ssr/common/Translate.js +26 -0
- package/src/client/ssr/common/Worker.js +28 -0
- package/src/client/ssr/{body-components → components/body}/CacheControl.js +1 -1
- package/src/client/ssr/{body-components → components/body}/DefaultSplashScreen.js +15 -4
- package/src/client/ssr/components/head/Pwa.js +146 -0
- package/src/client/ssr/pages/404.js +12 -0
- package/src/client/ssr/pages/500.js +12 -0
- package/src/client/ssr/pages/maintenance.js +14 -0
- package/src/client/ssr/pages/offline.js +21 -0
- package/src/client/sw/default.sw.js +13 -9
- package/src/db/DataBaseProvider.js +12 -1
- package/src/db/mongo/MongooseDB.js +0 -1
- package/src/mailer/EmailRender.js +1 -1
- package/src/server/backup.js +82 -70
- package/src/server/client-build-live.js +6 -0
- package/src/server/client-build.js +76 -73
- package/src/server/client-formatted.js +11 -1
- package/src/server/client-icons.js +1 -1
- package/src/server/conf.js +60 -12
- package/src/server/crypto.js +91 -0
- package/src/server/dns.js +42 -13
- package/src/server/network.js +94 -7
- package/src/server/proxy.js +27 -27
- package/src/server/runtime.js +27 -8
- package/.github/workflows/test.yml +0 -80
- package/src/client/ssr/head-components/Microdata.js +0 -11
- package/src/cron.js +0 -30
- package/src/server/cron.js +0 -35
- /package/src/client/ssr/{email-components → components/email}/DefaultRecoverEmail.js +0 -0
- /package/src/client/ssr/{email-components → components/email}/DefaultVerifyEmail.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/Css.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/DefaultScripts.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/Production.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/PwaDefault.js +0 -0
- /package/src/client/ssr/{head-components → components/head}/Seo.js +0 -0
|
@@ -31,228 +31,6 @@ const Css = {
|
|
|
31
31
|
Init: async function (options) {
|
|
32
32
|
if (!options) options = ThemesScope[0];
|
|
33
33
|
const { theme } = options;
|
|
34
|
-
append(
|
|
35
|
-
'body',
|
|
36
|
-
html`
|
|
37
|
-
<style>
|
|
38
|
-
html {
|
|
39
|
-
scroll-behavior: smooth;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
body {
|
|
43
|
-
/* overscroll-behavior: contain; */
|
|
44
|
-
/* box-sizing: border-box; */
|
|
45
|
-
padding: 0px;
|
|
46
|
-
margin: 0px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.fl {
|
|
50
|
-
position: relative;
|
|
51
|
-
display: flow-root;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.abs,
|
|
55
|
-
.in {
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.fll {
|
|
60
|
-
float: left;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.flr {
|
|
64
|
-
float: right;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.abs {
|
|
68
|
-
position: absolute;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.in,
|
|
72
|
-
.inl {
|
|
73
|
-
position: relative;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.inl {
|
|
77
|
-
display: inline-table;
|
|
78
|
-
display: -webkit-inline-table;
|
|
79
|
-
display: -moz-inline-table;
|
|
80
|
-
display: -ms-inline-table;
|
|
81
|
-
display: -o-inline-table;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.fix {
|
|
85
|
-
position: fixed;
|
|
86
|
-
display: block;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.stq {
|
|
90
|
-
position: sticky;
|
|
91
|
-
/* require defined at least top, bottom, left o right */
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.wfa {
|
|
95
|
-
width: available;
|
|
96
|
-
width: -webkit-available;
|
|
97
|
-
width: -moz-available;
|
|
98
|
-
width: -ms-available;
|
|
99
|
-
width: -o-available;
|
|
100
|
-
|
|
101
|
-
width: fill-available;
|
|
102
|
-
width: -webkit-fill-available;
|
|
103
|
-
width: -moz-fill-available;
|
|
104
|
-
width: -ms-fill-available;
|
|
105
|
-
width: -o-fill-available;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.wft {
|
|
109
|
-
width: fit-content;
|
|
110
|
-
width: -webkit-fit-content;
|
|
111
|
-
width: -moz-fit-content;
|
|
112
|
-
width: -ms-fit-content;
|
|
113
|
-
width: -o-fit-content;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.wfm {
|
|
117
|
-
width: max-content;
|
|
118
|
-
width: -webkit-max-content;
|
|
119
|
-
width: -moz-max-content;
|
|
120
|
-
width: -ms-max-content;
|
|
121
|
-
width: -o-max-content;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.negative-color {
|
|
125
|
-
filter: invert(1);
|
|
126
|
-
-webkit-filter: invert(1);
|
|
127
|
-
-moz-filter: invert(1);
|
|
128
|
-
-ms-filter: invert(1);
|
|
129
|
-
-o-filter: invert(1);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.no-drag {
|
|
133
|
-
user-drag: none;
|
|
134
|
-
-webkit-user-drag: none;
|
|
135
|
-
-moz-user-drag: none;
|
|
136
|
-
-ms-user-drag: none;
|
|
137
|
-
-o-user-drag: none;
|
|
138
|
-
user-select: none;
|
|
139
|
-
-webkit-user-select: none;
|
|
140
|
-
-moz-user-select: none;
|
|
141
|
-
-ms-user-select: none;
|
|
142
|
-
-o-user-select: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.center {
|
|
146
|
-
transform: translate(-50%, -50%);
|
|
147
|
-
top: 50%;
|
|
148
|
-
left: 50%;
|
|
149
|
-
width: 100%;
|
|
150
|
-
text-align: center;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
input {
|
|
154
|
-
outline: none !important;
|
|
155
|
-
border: none;
|
|
156
|
-
padding-block: 0;
|
|
157
|
-
padding-inline: 0;
|
|
158
|
-
}
|
|
159
|
-
input::file-selector-button {
|
|
160
|
-
outline: none !important;
|
|
161
|
-
border: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.hide {
|
|
165
|
-
display: none !important;
|
|
166
|
-
}
|
|
167
|
-
/*
|
|
168
|
-
|
|
169
|
-
placeholder
|
|
170
|
-
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
|
-
::placeholder {
|
|
174
|
-
color: black;
|
|
175
|
-
opacity: 1;
|
|
176
|
-
/* Firefox */
|
|
177
|
-
background: none;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
:-ms-input-placeholder {
|
|
181
|
-
/* Internet Explorer 10-11 */
|
|
182
|
-
color: black;
|
|
183
|
-
background: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
::-ms-input-placeholder {
|
|
187
|
-
/* Microsoft Edge */
|
|
188
|
-
color: black;
|
|
189
|
-
background: none;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/*
|
|
193
|
-
|
|
194
|
-
selection
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
::-moz-selection {
|
|
199
|
-
/* Code for Firefox */
|
|
200
|
-
color: black;
|
|
201
|
-
background: rgb(208, 208, 208);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
::selection {
|
|
205
|
-
color: black;
|
|
206
|
-
background: rgb(208, 208, 208);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.lowercase {
|
|
210
|
-
text-transform: lowercase;
|
|
211
|
-
}
|
|
212
|
-
.uppercase {
|
|
213
|
-
text-transform: uppercase;
|
|
214
|
-
}
|
|
215
|
-
.capitalize {
|
|
216
|
-
text-transform: capitalize;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.bold {
|
|
220
|
-
font-weight: bold;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.m {
|
|
224
|
-
font-family: monospace;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.gray {
|
|
228
|
-
filter: grayscale(1);
|
|
229
|
-
}
|
|
230
|
-
</style>
|
|
231
|
-
<div class="session">
|
|
232
|
-
<style>
|
|
233
|
-
.session-in-log-out {
|
|
234
|
-
display: block;
|
|
235
|
-
}
|
|
236
|
-
.session-inl-log-out {
|
|
237
|
-
display: inline-table;
|
|
238
|
-
}
|
|
239
|
-
.session-fl-log-out {
|
|
240
|
-
display: flow-root;
|
|
241
|
-
}
|
|
242
|
-
.session-in-log-in {
|
|
243
|
-
display: none;
|
|
244
|
-
}
|
|
245
|
-
.session-inl-log-in {
|
|
246
|
-
display: none;
|
|
247
|
-
}
|
|
248
|
-
.session-fl-log-in {
|
|
249
|
-
display: none;
|
|
250
|
-
}
|
|
251
|
-
</style>
|
|
252
|
-
</div>
|
|
253
|
-
<div class="theme"></div>
|
|
254
|
-
`,
|
|
255
|
-
);
|
|
256
34
|
return await Themes[theme](options);
|
|
257
35
|
},
|
|
258
36
|
RenderSetting: async function () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgGrid } from './AgGrid.js';
|
|
2
|
-
import { boxShadow, scrollBarDarkRender, scrollBarLightRender } from './Css.js';
|
|
2
|
+
import { borderChar, boxShadow, scrollBarDarkRender, scrollBarLightRender } from './Css.js';
|
|
3
3
|
import { LoadingAnimation } from './LoadingAnimation.js';
|
|
4
4
|
import { append, getProxyPath, s } from './VanillaJs.js';
|
|
5
5
|
|
|
@@ -135,6 +135,21 @@ const CssCommonCore = async () => {
|
|
|
135
135
|
width: 100%;
|
|
136
136
|
height: auto;
|
|
137
137
|
}
|
|
138
|
+
.down-arrow-submenu {
|
|
139
|
+
top: -20px;
|
|
140
|
+
text-align: right;
|
|
141
|
+
padding-right: 42px;
|
|
142
|
+
color: #5f5f5f;
|
|
143
|
+
}
|
|
144
|
+
.main-body-btn {
|
|
145
|
+
width: 50px;
|
|
146
|
+
height: 50px;
|
|
147
|
+
font-size: 18px;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
}
|
|
150
|
+
.main-body-btn:hover {
|
|
151
|
+
font-size: 21px;
|
|
152
|
+
}
|
|
138
153
|
</style>
|
|
139
154
|
<style>
|
|
140
155
|
.lds-dual-ring,
|
|
@@ -484,6 +499,12 @@ const CssCoreDark = {
|
|
|
484
499
|
a:hover {
|
|
485
500
|
color: #cdcdcd;
|
|
486
501
|
}
|
|
502
|
+
.ac {
|
|
503
|
+
color: #b1a7a7 !important;
|
|
504
|
+
}
|
|
505
|
+
.ahc {
|
|
506
|
+
color: #cdcdcd !important;
|
|
507
|
+
}
|
|
487
508
|
.content-render {
|
|
488
509
|
font-size: 16px;
|
|
489
510
|
font-family: monospace;
|
|
@@ -499,7 +520,7 @@ const CssCoreDark = {
|
|
|
499
520
|
.btn-input-extension:hover {
|
|
500
521
|
}
|
|
501
522
|
</style>
|
|
502
|
-
${scrollBarDarkRender()}
|
|
523
|
+
${scrollBarDarkRender()} ${borderChar(1, 'black', ['.main-body-btn-container'])}
|
|
503
524
|
`,
|
|
504
525
|
};
|
|
505
526
|
|
|
@@ -795,6 +816,12 @@ const CssCoreLight = {
|
|
|
795
816
|
a:hover {
|
|
796
817
|
color: #e89f4c;
|
|
797
818
|
}
|
|
819
|
+
.ac {
|
|
820
|
+
color: #6d68ff !important;
|
|
821
|
+
}
|
|
822
|
+
.ahc {
|
|
823
|
+
color: #e89f4c !important;
|
|
824
|
+
}
|
|
798
825
|
.content-render {
|
|
799
826
|
font-size: 16px;
|
|
800
827
|
font-family: monospace;
|
|
@@ -810,7 +837,7 @@ const CssCoreLight = {
|
|
|
810
837
|
.btn-input-extension:hover {
|
|
811
838
|
}
|
|
812
839
|
</style>
|
|
813
|
-
${scrollBarLightRender()}
|
|
840
|
+
${scrollBarLightRender()} ${borderChar(1, 'white', ['.main-body-btn-container'])}
|
|
814
841
|
`,
|
|
815
842
|
};
|
|
816
843
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { Badge } from './Badge.js';
|
|
1
2
|
import { BtnIcon } from './BtnIcon.js';
|
|
2
3
|
import { rgbToHex } from './CommonJs.js';
|
|
3
4
|
import { Css, darkTheme, dynamicCol, renderCssAttr, ThemeEvents, Themes } from './Css.js';
|
|
4
5
|
import { DropDown } from './DropDown.js';
|
|
5
|
-
import { Modal, renderMenuLabel, renderViewTitle } from './Modal.js';
|
|
6
|
+
import { buildBadgeToolTipMenuOption, Modal, renderMenuLabel, renderViewTitle } from './Modal.js';
|
|
6
7
|
import { listenQueryPathInstance, setQueryPath } from './Router.js';
|
|
7
8
|
import { Translate } from './Translate.js';
|
|
8
9
|
import { getProxyPath, getQueryParams, htmls, s } from './VanillaJs.js';
|
|
10
|
+
import Sortable from 'sortablejs';
|
|
9
11
|
|
|
10
12
|
// https://mintlify.com/docs/quickstart
|
|
11
13
|
|
|
@@ -55,7 +57,21 @@ const Docs = {
|
|
|
55
57
|
icon: html`<i class="fab fa-github"></i>`,
|
|
56
58
|
text: `Last Release`,
|
|
57
59
|
url: function () {
|
|
58
|
-
return `https://github.com/underpostnet/
|
|
60
|
+
return `https://github.com/underpostnet/pwa-microservices-template-ghpkg/`;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'demo',
|
|
65
|
+
icon: html`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 32">
|
|
66
|
+
<path fill="currentColor" d="M20 2v12l10-6z" />
|
|
67
|
+
<path
|
|
68
|
+
fill="currentColor"
|
|
69
|
+
d="M28 14v8H4V6h10V4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2v-8zM18 28h-4v-4h4z"
|
|
70
|
+
/>
|
|
71
|
+
</svg>`,
|
|
72
|
+
text: html`Demo`,
|
|
73
|
+
url: function () {
|
|
74
|
+
return `https://underpostnet.github.io/pwa-microservices-template-ghpkg/`;
|
|
59
75
|
},
|
|
60
76
|
},
|
|
61
77
|
{
|
|
@@ -63,7 +79,7 @@ const Docs = {
|
|
|
63
79
|
icon: html`<i class="fa-brands fa-osi"></i>`,
|
|
64
80
|
text: 'Source Docs',
|
|
65
81
|
url: function () {
|
|
66
|
-
return `${getProxyPath()}docs/engine/2.7.
|
|
82
|
+
return `${getProxyPath()}docs/engine/2.7.9`;
|
|
67
83
|
},
|
|
68
84
|
},
|
|
69
85
|
{
|
|
@@ -109,6 +125,9 @@ const Docs = {
|
|
|
109
125
|
type: umlId,
|
|
110
126
|
icon: html`<i class="fas fa-sitemap"></i>`,
|
|
111
127
|
text: Translate.Render(`${umlType} config uml`),
|
|
128
|
+
url: function () {
|
|
129
|
+
return `/docs/?cid=${umlId}`;
|
|
130
|
+
},
|
|
112
131
|
renderHtml: function () {
|
|
113
132
|
return html` <div class="in section-mp">
|
|
114
133
|
<div class="in sub-title-modal"><i class="fas fa-project-diagram"></i> Schema</div>
|
|
@@ -130,19 +149,36 @@ const Docs = {
|
|
|
130
149
|
};
|
|
131
150
|
}),
|
|
132
151
|
),
|
|
152
|
+
Tokens: {},
|
|
133
153
|
Init: async function (options) {
|
|
134
154
|
const { idModal } = options;
|
|
155
|
+
this.Tokens[idModal] = options;
|
|
135
156
|
setTimeout(() => {
|
|
157
|
+
const cleanActive = () => {
|
|
158
|
+
s(`.btn-docs-src`).classList.remove('main-btn-menu-active');
|
|
159
|
+
s(`.btn-docs-api`).classList.remove('main-btn-menu-active');
|
|
160
|
+
s(`.btn-docs-coverage`).classList.remove('main-btn-menu-active');
|
|
161
|
+
for (const umlType of umlTypes) {
|
|
162
|
+
const umlId = `uml-${umlType}`;
|
|
163
|
+
s(`.btn-docs-${umlId}`).classList.remove('main-btn-menu-active');
|
|
164
|
+
}
|
|
165
|
+
};
|
|
136
166
|
s(`.btn-docs-src`).onclick = async () => {
|
|
137
167
|
setQueryPath({ path: 'docs', queryPath: 'src' });
|
|
168
|
+
cleanActive();
|
|
169
|
+
s(`.btn-docs-src`).classList.add('main-btn-menu-active');
|
|
138
170
|
await this.RenderModal('src', options.modalOptions);
|
|
139
171
|
};
|
|
140
172
|
s(`.btn-docs-api`).onclick = async () => {
|
|
141
173
|
setQueryPath({ path: 'docs', queryPath: 'api' });
|
|
174
|
+
cleanActive();
|
|
175
|
+
s(`.btn-docs-api`).classList.add('main-btn-menu-active');
|
|
142
176
|
await this.RenderModal('api', options.modalOptions);
|
|
143
177
|
};
|
|
144
178
|
s(`.btn-docs-coverage`).onclick = async () => {
|
|
145
179
|
setQueryPath({ path: 'docs', queryPath: 'coverage' });
|
|
180
|
+
cleanActive();
|
|
181
|
+
s(`.btn-docs-coverage`).classList.add('main-btn-menu-active');
|
|
146
182
|
await this.RenderModal('coverage', options.modalOptions);
|
|
147
183
|
};
|
|
148
184
|
|
|
@@ -154,10 +190,16 @@ const Docs = {
|
|
|
154
190
|
const docData = this.Data.find((d) => d.type === 'repo');
|
|
155
191
|
location.href = docData.url();
|
|
156
192
|
};
|
|
193
|
+
s(`.btn-docs-demo`).onclick = () => {
|
|
194
|
+
const docData = this.Data.find((d) => d.type === 'demo');
|
|
195
|
+
location.href = docData.url();
|
|
196
|
+
};
|
|
157
197
|
|
|
158
198
|
for (const umlType of umlTypes) {
|
|
159
199
|
const umlId = `uml-${umlType}`;
|
|
160
200
|
s(`.btn-docs-${umlId}`).onclick = async () => {
|
|
201
|
+
cleanActive();
|
|
202
|
+
s(`.btn-docs-${umlId}`).classList.add('main-btn-menu-active');
|
|
161
203
|
setQueryPath({ path: 'docs', queryPath: umlId });
|
|
162
204
|
await this.RenderModal(umlId, { ...options.modalOptions, handleType: 'bar' });
|
|
163
205
|
};
|
|
@@ -181,7 +223,6 @@ const Docs = {
|
|
|
181
223
|
switch (docData.type) {
|
|
182
224
|
case 'repo':
|
|
183
225
|
case 'coverage-link':
|
|
184
|
-
tabHref = docData.url();
|
|
185
226
|
style = renderCssAttr({ style: { height: '45px' } });
|
|
186
227
|
labelStyle = renderCssAttr({ style: { top: '8px', left: '9px' } });
|
|
187
228
|
break;
|
|
@@ -189,16 +230,75 @@ const Docs = {
|
|
|
189
230
|
default:
|
|
190
231
|
break;
|
|
191
232
|
}
|
|
192
|
-
|
|
233
|
+
tabHref = docData.url();
|
|
234
|
+
docMenuRender += html`
|
|
193
235
|
${await BtnIcon.Render({
|
|
194
|
-
class: `
|
|
195
|
-
label: html
|
|
236
|
+
class: `in wfa main-btn-menu btn-docs-${docData.type}`,
|
|
237
|
+
label: html`<span class="menu-btn-icon">${docData.icon}</span
|
|
238
|
+
><span class="menu-label-text"> ${docData.text} </span>`,
|
|
196
239
|
tabHref,
|
|
197
|
-
|
|
198
|
-
|
|
240
|
+
handleContainerClass: 'handle-btn-container',
|
|
241
|
+
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption(docData.text, 'right')),
|
|
242
|
+
attrs: `data-id="${docData.type}"`,
|
|
243
|
+
handleContainerClass: 'handle-btn-container',
|
|
199
244
|
})}
|
|
200
|
-
|
|
245
|
+
`;
|
|
201
246
|
}
|
|
247
|
+
|
|
248
|
+
htmls('.menu-btn-container-children', html` <div class="fl menu-btn-container-docs">${docMenuRender}</div>`);
|
|
249
|
+
if (s(`.menu-btn-container-main`)) s(`.menu-btn-container-main`).classList.add('hide');
|
|
250
|
+
htmls(`.nav-path-display-${'modal-menu'}`, location.pathname);
|
|
251
|
+
|
|
252
|
+
this.Tokens[idModal] = new Sortable(s(`.menu-btn-container-docs`), {
|
|
253
|
+
animation: 150,
|
|
254
|
+
group: `docs-sortable`,
|
|
255
|
+
forceFallback: true,
|
|
256
|
+
fallbackOnBody: true,
|
|
257
|
+
handle: '.handle-btn-container',
|
|
258
|
+
store: {
|
|
259
|
+
/**
|
|
260
|
+
* Get the order of elements. Called once during initialization.
|
|
261
|
+
* @param {Sortable} sortable
|
|
262
|
+
* @returns {Array}
|
|
263
|
+
*/
|
|
264
|
+
get: function (sortable) {
|
|
265
|
+
const order = localStorage.getItem(sortable.options.group.name);
|
|
266
|
+
return order ? order.split('|') : [];
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Save the order of elements. Called onEnd (when the item is dropped).
|
|
271
|
+
* @param {Sortable} sortable
|
|
272
|
+
*/
|
|
273
|
+
set: function (sortable) {
|
|
274
|
+
const order = sortable.toArray();
|
|
275
|
+
localStorage.setItem(sortable.options.group.name, order.join('|'));
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
// chosenClass: 'css-class',
|
|
279
|
+
// ghostClass: 'css-class',
|
|
280
|
+
// Element dragging ended
|
|
281
|
+
onEnd: function (/**Event*/ evt) {
|
|
282
|
+
// console.log('Sortable onEnd', evt);
|
|
283
|
+
// console.log('evt.oldIndex', evt.oldIndex);
|
|
284
|
+
// console.log('evt.newIndex', evt.newIndex);
|
|
285
|
+
const slotId = Array.from(evt.item.classList).pop();
|
|
286
|
+
// console.log('slotId', slotId);
|
|
287
|
+
if (evt.oldIndex === evt.newIndex) s(`.${slotId}`).click();
|
|
288
|
+
|
|
289
|
+
// var itemEl = evt.item; // dragged HTMLElement
|
|
290
|
+
// evt.to; // target list
|
|
291
|
+
// evt.from; // previous list
|
|
292
|
+
// evt.oldIndex; // element's old index within old parent
|
|
293
|
+
// evt.newIndex; // element's new index within new parent
|
|
294
|
+
// evt.oldDraggableIndex; // element's old index within old parent, only counting draggable elements
|
|
295
|
+
// evt.newDraggableIndex; // element's new index within new parent, only counting draggable elements
|
|
296
|
+
// evt.clone; // the clone element
|
|
297
|
+
// evt.pullMode; // when item is in another sortable: `"clone"` if cloning, `true` if moving
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
return '';
|
|
202
302
|
return html` <div class="in section-mp">${docMenuRender}</div>`;
|
|
203
303
|
return html` <div class="in section-mp">
|
|
204
304
|
${await DropDown.Render({
|