odant-work 1.0.80 → 1.0.82
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/#system/package-manifest.json +40 -38
- package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/calendar.js +38 -8
- package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/chat.js +91 -9
- package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/video.html +8 -0
- package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/email.js +95 -8
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/system.js +33 -0
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/database.js +22 -1
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/messengers.js +7 -7
- package/$server/$folder/$class/handlers/pages/form/object/$handler/object.js +8 -6
- package/$server/$folder/$class/handlers/pages/form/objects/$handler/objects.js +14 -2
- package/$server/$folder/handlers/pages/form/$handler/form.js +47 -6
- package/$server/$folder/lib/calendar-form/calendar-form.js +7 -5
- package/$server/$folder/lib/class-picker/class-picker.js +5 -2
- package/$server/$folder/lib/dialogs/confirm/confirm.js +6 -2
- package/$server/$folder/lib/dialogs/input/input.js +15 -9
- package/$server/$folder/lib/editor-form/editor-form.js +8 -5
- package/$server/$folder/lib/explorer/explorer.js +76 -13
- package/$server/$folder/lib/local-models-transfer/local-models-transfer.js +3 -2
- package/$server/$folder/lib/messenger-settings/messenger-settings.js +4 -4
- package/$server/$folder/lib/prompt-bar/prompt-bar.js +2 -2
- package/$server/$folder/lib/support/support.js +1373 -0
- package/oda/components/containers/containers.js +2 -2
- package/oda/components/containers/popover/popover.js +83 -18
- package/oda/components/inputs/link/link.js +7 -5
- package/oda/components/layouts/app-layout/app-layout.js +33 -10
- package/oda/components/menus/menu/menu.js +2 -2
- package/oda/oda.js +13 -2
- package/oda/tools/styles/styles.js +68 -0
- package/package.json +1 -1
- package/sources/client/folder.js +1 -0
- package/sources/index.html +7 -4
- package/sources/manifest.json +12 -6
- package/sources/modules/support/index.js +414 -0
- package/sources/modules/user-profile/user-profile.js +27 -5
- package/sources/page.html +7 -4
- package/sources/server/access/gateway.js +3 -0
- package/sources/server/class.js +11 -0
- package/sources/tester.html +4 -4
|
@@ -164,7 +164,7 @@ ODA.showMenu = async function (params = {}, e) {
|
|
|
164
164
|
return ODA.showPopover(menu, { ...params, popoverType: 'menu' }, e);
|
|
165
165
|
};
|
|
166
166
|
ODA.showConfirm = function (textContent = 'Подтвердить?', params = {}) {
|
|
167
|
-
const el = ODA.createElement('p', { textContent, style: 'margin: var(--space-l);' });
|
|
167
|
+
const el = ODA.createElement('p', { textContent, style: 'margin: var(--space-l); max-width: min(440px, 100%); word-break: break-word;' });
|
|
168
168
|
return ODA.showDialog(el, {
|
|
169
169
|
allowClose: true,
|
|
170
170
|
TITLE: { label: 'Подтверждение' },
|
|
@@ -176,7 +176,7 @@ ODA.showConfirm = function (textContent = 'Подтвердить?', params = {}
|
|
|
176
176
|
/** Ввод строки: результат — введённое значение (пусто → отмена). */
|
|
177
177
|
ODA.showPrompt = function (label = '', params = {}) {
|
|
178
178
|
const input = ODA.createElement('input', { value: params.value ?? '', placeholder: params.placeholder ?? '' });
|
|
179
|
-
input.style.cssText = 'margin: var(--space-l); padding: var(--control-padding); border: 1px solid var(--control-border-color); border-radius: var(--control-radius); font: inherit;';
|
|
179
|
+
input.style.cssText = 'margin: var(--space-l); width: min(360px, calc(100% - 32px)); box-sizing: border-box; padding: var(--control-padding); border: 1px solid var(--control-border-color); border-radius: var(--control-radius); font: inherit;';
|
|
180
180
|
queueMicrotask(() => input.focus());
|
|
181
181
|
return ODA.showDialog(input, {
|
|
182
182
|
allowClose: true,
|
|
@@ -11,13 +11,14 @@ ODA({
|
|
|
11
11
|
:host {
|
|
12
12
|
border: none;
|
|
13
13
|
visibility: hidden;
|
|
14
|
-
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
max-width: calc(100vw - 16px - var(--safe-left, 0px) - var(--safe-right, 0px));
|
|
15
16
|
transition: opacity var(--duration) ease-in;
|
|
16
17
|
opacity: 1;
|
|
17
18
|
position: absolute;
|
|
18
19
|
margin: {{position ? '0px' : 'auto'}} !important;
|
|
19
|
-
min-width: {{width === undefined ? 'min-content' : width + 'px'}};
|
|
20
|
-
max-height: {{height === undefined ? '
|
|
20
|
+
min-width: {{width === undefined ? 'min(min-content, calc(100vw - 16px - var(--safe-left, 0px) - var(--safe-right, 0px)))' : 'min(' + width + 'px, calc(100vw - 16px - var(--safe-left, 0px) - var(--safe-right, 0px)))'}};
|
|
21
|
+
max-height: {{height === undefined ? 'calc(100dvh - 16px - var(--safe-top, 0px) - var(--safe-bottom, 0px)) !important' : 'min(' + height + 'px, calc(100dvh - 16px - var(--safe-top, 0px) - var(--safe-bottom, 0px)))'}};
|
|
21
22
|
padding: 0;
|
|
22
23
|
overflow: hidden;
|
|
23
24
|
box-shadow: var(--elevation-3);
|
|
@@ -27,6 +28,10 @@ ODA({
|
|
|
27
28
|
{{position ? 'bottom: auto; right: auto;' : 'bottom: 0; right: 0;'}}
|
|
28
29
|
@apply --content;
|
|
29
30
|
}
|
|
31
|
+
:host([popover-type="dialog"]),
|
|
32
|
+
:host([popover-type="modal"]) {
|
|
33
|
+
border-radius: var(--radius-m, 12px);
|
|
34
|
+
}
|
|
30
35
|
:host([visible]) {
|
|
31
36
|
visibility: visible;
|
|
32
37
|
}
|
|
@@ -34,17 +39,55 @@ ODA({
|
|
|
34
39
|
align-items: center;
|
|
35
40
|
gap: var(--space-s);
|
|
36
41
|
padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-m);
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
}
|
|
45
|
+
.title > div {
|
|
46
|
+
min-width: 0;
|
|
37
47
|
}
|
|
38
48
|
.title label {
|
|
39
49
|
font-weight: bold;
|
|
40
50
|
text-overflow: ellipsis;
|
|
41
51
|
white-space: nowrap;
|
|
42
52
|
overflow: hidden;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
}
|
|
55
|
+
.popover-body {
|
|
56
|
+
flex: 1 1 auto;
|
|
57
|
+
min-height: 0;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
overflow: auto;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
overscroll-behavior: contain;
|
|
43
63
|
}
|
|
44
64
|
.footer {
|
|
45
65
|
align-items: center;
|
|
66
|
+
justify-content: flex-end;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
flex-shrink: 0;
|
|
46
69
|
gap: var(--space-m);
|
|
47
70
|
padding: var(--space-m);
|
|
71
|
+
min-width: 0;
|
|
72
|
+
border-top: 1px solid var(--subtle-border);
|
|
73
|
+
}
|
|
74
|
+
.footer-extra {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--space-m);
|
|
80
|
+
flex: 1 1 auto;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
}
|
|
83
|
+
.footer-actions {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: row;
|
|
86
|
+
flex-wrap: wrap;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: flex-end;
|
|
89
|
+
gap: var(--space-m);
|
|
90
|
+
margin-left: auto;
|
|
48
91
|
}
|
|
49
92
|
.btn {
|
|
50
93
|
border-radius: var(--control-radius);
|
|
@@ -52,37 +95,55 @@ ODA({
|
|
|
52
95
|
box-shadow: var(--elevation-1);
|
|
53
96
|
}
|
|
54
97
|
::slotted(:not([slot])) {
|
|
55
|
-
|
|
98
|
+
flex: 1 1 auto;
|
|
99
|
+
min-width: 0;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
box-sizing: border-box;
|
|
56
102
|
}
|
|
57
103
|
.message {
|
|
58
104
|
margin: var(--space-l);
|
|
105
|
+
word-break: break-word;
|
|
106
|
+
}
|
|
107
|
+
@media (max-width: 640px) {
|
|
108
|
+
:host([popover-type="dialog"]),
|
|
109
|
+
:host([popover-type="modal"]) {
|
|
110
|
+
max-width: calc(100vw - 12px - var(--safe-left, 0px) - var(--safe-right, 0px));
|
|
111
|
+
max-height: calc(100dvh - 12px - var(--safe-top, 0px) - var(--safe-bottom, 0px)) !important;
|
|
112
|
+
}
|
|
113
|
+
.footer {
|
|
114
|
+
padding: var(--space-m) var(--space-m) calc(var(--space-m) + var(--safe-bottom, 0px));
|
|
115
|
+
}
|
|
59
116
|
}
|
|
60
117
|
</style>
|
|
61
118
|
<div no-flex ~if="hasTitle" accent-invert horizontal class="title">
|
|
62
119
|
<div vertical flex>
|
|
63
120
|
<slot name="title"></slot>
|
|
64
|
-
<div ~if="TITLE?.label" flex horizontal style="align-items: center; gap: var(--space-s);">
|
|
121
|
+
<div ~if="TITLE?.label" flex horizontal style="align-items: center; gap: var(--space-s); min-width: 0;">
|
|
65
122
|
<oda-icon ~if="TITLE.icon" :icon="TITLE.icon"></oda-icon>
|
|
66
123
|
<label flex>{{TITLE.label}}</label>
|
|
67
124
|
</div>
|
|
68
125
|
</div>
|
|
69
126
|
<oda-button ~if="allowClose" no-flex error icon="icons:close" @pointerdown="close()"></oda-button>
|
|
70
127
|
</div>
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
|
|
128
|
+
<div class="popover-body">
|
|
129
|
+
<slot>
|
|
130
|
+
<label flex ~if="message" class="message">{{message}}</label>
|
|
131
|
+
</slot>
|
|
132
|
+
</div>
|
|
74
133
|
<div ~if="popoverType === 'dialog'" horizontal no-flex header class="footer">
|
|
75
|
-
<div
|
|
134
|
+
<div ~if="BUTTONS?.length" class="footer-extra">
|
|
76
135
|
<oda-button ~for="BUTTONS" ~is="$for.item.is || 'oda-button'" class="btn" no-flex
|
|
77
136
|
:icon="$for.item.icon" :label="$for.item.label" :title="$for.item.title || ''"
|
|
78
137
|
:disabled="!!$for.item.disabled" :color-mode="$for.item.colorMode"
|
|
79
138
|
:tabindex="$for.index + 2"
|
|
80
139
|
@tap="$for.item.tap ? $for.item.tap($event) : ok($for.index + 1)"></oda-button>
|
|
81
140
|
</div>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
:
|
|
141
|
+
<div class="footer-actions">
|
|
142
|
+
<oda-button ~if="OK" tabindex="0" class="btn bold" :icon="OK.icon" :hide-icon="!OK.icon" :icon-size="OK.iconSize || iconSize"
|
|
143
|
+
:label="OK.label" :color-mode="OK.colorMode" :disabled="!enable" @tap="ok()"></oda-button>
|
|
144
|
+
<oda-button ~if="CANCEL" tabindex="1" class="btn" :icon="CANCEL.icon" :hide-icon="!CANCEL.icon" :icon-size="CANCEL.iconSize || iconSize"
|
|
145
|
+
:label="CANCEL.label" :color-mode="CANCEL.colorMode" @tap="close()"></oda-button>
|
|
146
|
+
</div>
|
|
86
147
|
</div>
|
|
87
148
|
`,
|
|
88
149
|
message: '',
|
|
@@ -105,7 +166,10 @@ ODA({
|
|
|
105
166
|
},
|
|
106
167
|
allowClose: false,
|
|
107
168
|
/** modal | dialog | dropdown | menu */
|
|
108
|
-
popoverType:
|
|
169
|
+
popoverType: {
|
|
170
|
+
$def: '',
|
|
171
|
+
$attr: true
|
|
172
|
+
},
|
|
109
173
|
position: undefined,
|
|
110
174
|
/** '' | 'top' | 'bottom' — предпочтительное направление раскрытия относительно якоря */
|
|
111
175
|
placement: '',
|
|
@@ -150,12 +214,14 @@ ODA({
|
|
|
150
214
|
const pos = this.position;
|
|
151
215
|
if (!pos)
|
|
152
216
|
return;
|
|
217
|
+
const vw = Math.round(window.visualViewport?.width || window.innerWidth);
|
|
218
|
+
const vh = Math.round(window.visualViewport?.height || window.innerHeight);
|
|
153
219
|
let left, top, width, height;
|
|
154
220
|
if (pos.tagName) {
|
|
155
221
|
const r = pos.getBoundingClientRect();
|
|
156
222
|
left = r.left;
|
|
157
223
|
width = r.width;
|
|
158
|
-
const below = Math.max(0,
|
|
224
|
+
const below = Math.max(0, vh - r.bottom);
|
|
159
225
|
const above = Math.max(0, r.top);
|
|
160
226
|
const maxAvail = Math.max(above, below);
|
|
161
227
|
let openUp;
|
|
@@ -185,8 +251,8 @@ ODA({
|
|
|
185
251
|
left = pos.x ?? pos.left ?? 0;
|
|
186
252
|
top = pos.y ?? pos.top ?? 0;
|
|
187
253
|
}
|
|
188
|
-
left = Math.max(0, Math.min(left,
|
|
189
|
-
top = Math.max(0, Math.min(top,
|
|
254
|
+
left = Math.max(0, Math.min(left, vw - this.offsetWidth));
|
|
255
|
+
top = Math.max(0, Math.min(top, vh - this.offsetHeight));
|
|
190
256
|
// гейты: layout зовётся из resize-наблюдателя, а каждая запись пропа — это
|
|
191
257
|
// notify + ререндер + новый замер; без гейтов размер гуляет и круг не рвётся
|
|
192
258
|
if (width !== undefined && !Object.is(this.width, width))
|
|
@@ -212,7 +278,6 @@ ODA({
|
|
|
212
278
|
clearTimeout(this._safetyTimer);
|
|
213
279
|
this.layout(true);
|
|
214
280
|
this.visible = true;
|
|
215
|
-
this.style.maxWidth = this.getBoundingClientRect().width + 'px';
|
|
216
281
|
},
|
|
217
282
|
ok(result) {
|
|
218
283
|
this.close(result ?? this.OK?.result ?? 'ok');
|
|
@@ -72,8 +72,9 @@ ODA({is: 'oda-table-link-picker',
|
|
|
72
72
|
<style>
|
|
73
73
|
:host {
|
|
74
74
|
@apply --vertical;
|
|
75
|
-
min-width: min(620px,
|
|
76
|
-
max-
|
|
75
|
+
min-width: min(620px, calc(100vw - 24px));
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
max-height: 74dvh;
|
|
77
78
|
background: var(--content-background, #ffffff);
|
|
78
79
|
color: var(--content-color, #1f2937);
|
|
79
80
|
font-size: 13px;
|
|
@@ -81,6 +82,7 @@ ODA({is: 'oda-table-link-picker',
|
|
|
81
82
|
}
|
|
82
83
|
.picker-top {
|
|
83
84
|
@apply --horizontal;
|
|
85
|
+
flex-wrap: wrap;
|
|
84
86
|
align-items: center;
|
|
85
87
|
gap: 8px;
|
|
86
88
|
padding: 8px 12px;
|
|
@@ -119,9 +121,9 @@ ODA({is: 'oda-table-link-picker',
|
|
|
119
121
|
}
|
|
120
122
|
.list-wrap {
|
|
121
123
|
@apply --vertical;
|
|
122
|
-
flex: 1;
|
|
123
|
-
min-height:
|
|
124
|
-
max-height:
|
|
124
|
+
flex: 1 1 auto;
|
|
125
|
+
min-height: min(200px, 32dvh);
|
|
126
|
+
max-height: 52dvh;
|
|
125
127
|
overflow-y: auto;
|
|
126
128
|
}
|
|
127
129
|
.item-row {
|
|
@@ -162,14 +162,15 @@ ODA({is: 'app-layout-drawer',
|
|
|
162
162
|
transition: opacity ease-in-out .5s, transform ease-in-out .2s;
|
|
163
163
|
flex-direction: row{{align === 'right'?'-reverse':''}};
|
|
164
164
|
border-color: var(--border-color);
|
|
165
|
-
width: {{(
|
|
165
|
+
width: {{(mobile && !closed)?'100%':'auto'}};
|
|
166
166
|
}
|
|
167
167
|
.drawer {
|
|
168
168
|
height: 100%;
|
|
169
169
|
position: relative;
|
|
170
170
|
overflow: hidden;
|
|
171
171
|
z-index: 1;
|
|
172
|
-
width: {{!closed ? (width + 'px'): 'auto'}} !important;
|
|
172
|
+
width: {{mobile ? '100%' : (!closed ? (width + 'px'): 'auto')}} !important;
|
|
173
|
+
max-width: 100%;
|
|
173
174
|
flex-direction: {{!!mobile ? 'column' : (align === 'right') ? 'row-reverse' : 'row'}} !important;
|
|
174
175
|
}
|
|
175
176
|
|
|
@@ -188,24 +189,25 @@ ODA({is: 'app-layout-drawer',
|
|
|
188
189
|
white-space: nowrap;
|
|
189
190
|
}
|
|
190
191
|
.back {
|
|
191
|
-
position:
|
|
192
|
-
|
|
192
|
+
position: fixed;
|
|
193
|
+
bottom: calc(14px + var(--safe-bottom, 0px));
|
|
194
|
+
{{align === 'right' ? 'right: calc(12px + var(--safe-right, 0px));' : 'left: calc(12px + var(--safe-left, 0px));'}}
|
|
193
195
|
z-index: 100;
|
|
194
|
-
|
|
196
|
+
opacity: 0.92;
|
|
195
197
|
}
|
|
196
198
|
</style>
|
|
197
199
|
|
|
198
200
|
<div :vertical="mobile" :horizontal="!mobile" ~show="(!mobile && showTabs) || !closed" class="drawer" flex>
|
|
199
201
|
<app-tabs ~if="showTabs" accent-invert no-flex :buttons :items :horizontal="mobile" ::focused-index></app-tabs>
|
|
200
|
-
<div horizontal header flex style="overflow: hidden; min-height: 0;">
|
|
201
|
-
<div flex vertical style="overflow: hidden; min-height: 0;" ~show="!closed">
|
|
202
|
+
<div horizontal header flex style="overflow: hidden; min-height: 0; min-width: 0;">
|
|
203
|
+
<div flex vertical style="overflow: hidden; min-height: 0; min-width: 0;" ~show="!closed">
|
|
202
204
|
<slot name="title" horizontal></slot>
|
|
203
|
-
<slot id="slot" @slotchange="_onSlotchange" flex vertical style="min-height: 0; overflow: hidden;"></slot>
|
|
205
|
+
<slot id="slot" @slotchange="_onSlotchange" flex vertical style="min-height: 0; min-width: 0; overflow: hidden;"></slot>
|
|
204
206
|
</div>
|
|
205
207
|
</div>
|
|
206
208
|
</div>
|
|
207
209
|
<oda-splitter ~if="!mobile && !closed" ::width right :reverse @touchstart.stop></oda-splitter>
|
|
208
|
-
<oda-button info round shadow class='back' ~if="mobile && closed && showTabs" @tap="closed = false" :rotate="align === 'right'? 180: 0" icon="icons:
|
|
210
|
+
<oda-button info round shadow class='back' ~if="mobile && closed && showTabs && !hideBackButton" @tap="closed = false" :rotate="align === 'right'? 180: 0" icon="icons:menu" title="Навигация"></oda-button>
|
|
209
211
|
`,
|
|
210
212
|
get mobile() {
|
|
211
213
|
return this.host.mobile;
|
|
@@ -320,6 +322,10 @@ ODA({is: 'app-layout-drawer',
|
|
|
320
322
|
$def: false,
|
|
321
323
|
$type: Boolean,
|
|
322
324
|
},
|
|
325
|
+
hideBackButton: {
|
|
326
|
+
$def: false,
|
|
327
|
+
$type: Boolean,
|
|
328
|
+
},
|
|
323
329
|
width: {
|
|
324
330
|
$def: 340,
|
|
325
331
|
$save: true
|
|
@@ -386,12 +392,22 @@ ODA({is: 'app-tabs',
|
|
|
386
392
|
order: {{mobile?1:0}};
|
|
387
393
|
user-select: none;
|
|
388
394
|
}
|
|
395
|
+
:host([horizontal]) {
|
|
396
|
+
flex-direction: row;
|
|
397
|
+
width: 100%;
|
|
398
|
+
min-width: 0;
|
|
399
|
+
padding: 4px 8px calc(4px + var(--safe-bottom, 0px));
|
|
400
|
+
overflow-x: auto;
|
|
401
|
+
overflow-y: hidden;
|
|
402
|
+
gap: 4px;
|
|
403
|
+
}
|
|
389
404
|
.nav-list {
|
|
390
405
|
display: flex;
|
|
391
406
|
flex-direction: column;
|
|
392
407
|
align-items: center;
|
|
393
408
|
gap: 4px;
|
|
394
409
|
width: 100%;
|
|
410
|
+
flex-shrink: 0;
|
|
395
411
|
}
|
|
396
412
|
.nav-list[horizontal] {
|
|
397
413
|
flex-direction: row;
|
|
@@ -404,6 +420,7 @@ ODA({is: 'app-tabs',
|
|
|
404
420
|
min-height: 44px;
|
|
405
421
|
padding: 4px 2px !important;
|
|
406
422
|
box-sizing: border-box;
|
|
423
|
+
flex-shrink: 0;
|
|
407
424
|
transition: background 140ms ease, transform 120ms ease, box-shadow 140ms ease;
|
|
408
425
|
}
|
|
409
426
|
.nav-list oda-button:not([light]):hover {
|
|
@@ -413,12 +430,18 @@ ODA({is: 'app-tabs',
|
|
|
413
430
|
font-weight: 700;
|
|
414
431
|
box-shadow: 0 2px 6px var(--shadow-color);
|
|
415
432
|
}
|
|
433
|
+
.tab-action-btn {
|
|
434
|
+
margin: 4px;
|
|
435
|
+
flex-shrink: 0;
|
|
436
|
+
overflow: hidden;
|
|
437
|
+
text-overflow: ellipsis;
|
|
438
|
+
}
|
|
416
439
|
</style>
|
|
417
440
|
<div class="nav-list" :horizontal="mobile">
|
|
418
441
|
<oda-button :label="$for.item.label" :light="focusedIndex === $for?.index" ~for="items" ~props="$for.item" icon-pos="top" style="min-width: 44px; max-width: 44px; font-size: xx-small;" @tap="setIndex($for.index)"></oda-button>
|
|
419
442
|
</div>
|
|
420
443
|
<div flex></div>
|
|
421
|
-
<span ~is="$for.item.is || 'oda-button'" ~for="buttons" ~props="$for.item"
|
|
444
|
+
<span class="tab-action-btn" ~is="$for.item.is || 'oda-button'" ~for="buttons" ~props="$for.item" @tap="($for.item.click?.($event), $pdp.closed = true)"></span>
|
|
422
445
|
`,
|
|
423
446
|
get mobile() {
|
|
424
447
|
return this.host.mobile
|
|
@@ -8,8 +8,8 @@ ODA({ is: 'oda-menu',
|
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
margin: 0px;
|
|
10
10
|
padding: 0px;
|
|
11
|
-
max-height:
|
|
12
|
-
max-width: 300px;
|
|
11
|
+
max-height: calc(100dvh - 16px);
|
|
12
|
+
max-width: min(300px, calc(100vw - 16px));
|
|
13
13
|
animation: fadeIn .1s ease-in;
|
|
14
14
|
border-radius: 4px;
|
|
15
15
|
}
|
package/oda/oda.js
CHANGED
|
@@ -464,12 +464,23 @@ else {
|
|
|
464
464
|
window.addEventListener('load', loadedCallback);
|
|
465
465
|
}
|
|
466
466
|
globalThis.ODA.states = {}
|
|
467
|
+
const _mobileMql = (typeof window !== 'undefined' && typeof window.matchMedia === 'function')
|
|
468
|
+
? window.matchMedia('(max-width: 768px), (max-height: 500px) and (pointer: coarse)')
|
|
469
|
+
: null;
|
|
467
470
|
Object.defineProperty(globalThis.ODA.states, 'mobileMode', {
|
|
468
471
|
enumerable: true,
|
|
469
472
|
get(){
|
|
470
|
-
|
|
473
|
+
if (_mobileMql)
|
|
474
|
+
return _mobileMql.matches;
|
|
475
|
+
return typeof window !== 'undefined' && window.innerWidth <= 768;
|
|
471
476
|
}
|
|
472
|
-
})
|
|
477
|
+
});
|
|
478
|
+
if (_mobileMql) {
|
|
479
|
+
const _onMobileModeChange = () => {
|
|
480
|
+
try { window.dispatchEvent(new Event('resize')); } catch {}
|
|
481
|
+
};
|
|
482
|
+
_mobileMql.addEventListener?.('change', _onMobileModeChange);
|
|
483
|
+
}
|
|
473
484
|
|
|
474
485
|
Object.defineProperty(String.prototype, 'fixKeyboardLayout', {
|
|
475
486
|
enumerable: true,
|
|
@@ -154,8 +154,72 @@ let style = /*css*/`
|
|
|
154
154
|
--duration-fast: 120ms;
|
|
155
155
|
--duration: 200ms;
|
|
156
156
|
--easing: cubic-bezier(.2, 0, 0, 1);
|
|
157
|
+
|
|
158
|
+
/* Адаптивные отступы PWA (вырезы экрана / жестовая полоса iOS и Android) и единые размеры диалогов */
|
|
159
|
+
--safe-top: env(safe-area-inset-top, 0px);
|
|
160
|
+
--safe-right: env(safe-area-inset-right, 0px);
|
|
161
|
+
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
|
162
|
+
--safe-left: env(safe-area-inset-left, 0px);
|
|
163
|
+
--dialog-max-h: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
|
|
164
|
+
--dialog-max-w: calc(100vw - 24px - var(--safe-left) - var(--safe-right));
|
|
157
165
|
}
|
|
158
166
|
:root {
|
|
167
|
+
/* Единый трёхсекционный flex-каркас для диалогов и модальных окон (шапка / скролл-тело / закреплённый футер) */
|
|
168
|
+
--dialog-card: {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
max-width: var(--dialog-max-w);
|
|
172
|
+
max-height: var(--dialog-max-h);
|
|
173
|
+
min-height: 0;
|
|
174
|
+
min-width: 0;
|
|
175
|
+
box-sizing: border-box;
|
|
176
|
+
background-color: var(--content-background);
|
|
177
|
+
color: var(--content-color);
|
|
178
|
+
border: 1px solid var(--subtle-border);
|
|
179
|
+
border-radius: var(--radius-m);
|
|
180
|
+
box-shadow: var(--elevation-3);
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
};
|
|
183
|
+
--dialog-head: {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
flex-wrap: wrap;
|
|
187
|
+
gap: var(--space-m);
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
min-width: 0;
|
|
190
|
+
box-sizing: border-box;
|
|
191
|
+
};
|
|
192
|
+
--dialog-body: {
|
|
193
|
+
flex: 1 1 auto;
|
|
194
|
+
min-height: 0;
|
|
195
|
+
min-width: 0;
|
|
196
|
+
overflow-y: auto;
|
|
197
|
+
overflow-x: hidden;
|
|
198
|
+
overscroll-behavior: contain;
|
|
199
|
+
box-sizing: border-box;
|
|
200
|
+
};
|
|
201
|
+
--dialog-footer: {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: flex-end;
|
|
205
|
+
flex-wrap: wrap;
|
|
206
|
+
gap: var(--space-m);
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
min-width: 0;
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
};
|
|
211
|
+
--flex-shrink: {
|
|
212
|
+
flex: 1 1 0%;
|
|
213
|
+
min-width: 0;
|
|
214
|
+
min-height: 0;
|
|
215
|
+
};
|
|
216
|
+
--wrap-row: {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
flex-wrap: wrap;
|
|
220
|
+
align-items: center;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
};
|
|
159
223
|
/* рамка поля ввода; состояния (:hover/:focus-within/[invalid]/[disabled]) — в oda-input */
|
|
160
224
|
--control: {
|
|
161
225
|
box-sizing: border-box;
|
|
@@ -345,6 +409,7 @@ html {
|
|
|
345
409
|
-ms-text-size-adjust: 100%;
|
|
346
410
|
-webkit-text-size-adjust: 100%;
|
|
347
411
|
height: 100%;
|
|
412
|
+
height: 100dvh;
|
|
348
413
|
}
|
|
349
414
|
@media print {
|
|
350
415
|
html, body {
|
|
@@ -419,6 +484,9 @@ body{
|
|
|
419
484
|
margin: 0px;
|
|
420
485
|
padding: 0px;
|
|
421
486
|
height: 100%;
|
|
487
|
+
height: 100dvh;
|
|
488
|
+
min-height: 0;
|
|
489
|
+
box-sizing: border-box;
|
|
422
490
|
overscroll-behavior: contain;
|
|
423
491
|
}
|
|
424
492
|
[hidden]{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sources/work.js",
|
package/sources/client/folder.js
CHANGED
|
@@ -272,6 +272,7 @@ export class $folder extends $item {
|
|
|
272
272
|
|| method.startsWith('trainer_')
|
|
273
273
|
|| method.startsWith('provider_')
|
|
274
274
|
|| method.startsWith('license_')
|
|
275
|
+
|| method.startsWith('support_')
|
|
275
276
|
|| method.startsWith('messenger_')
|
|
276
277
|
|| method.startsWith('distro_')
|
|
277
278
|
|| method.startsWith('agent_')
|
package/sources/index.html
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="
|
|
2
|
+
<html lang="ru">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
|
-
<meta name="theme-color" content="
|
|
5
|
+
<meta name="theme-color" content="#4b0082">
|
|
6
6
|
<meta name="color-scheme" id="color-scheme" content="light dark">
|
|
7
|
-
<meta name="viewport" content="initial-scale=1, maximum-scale=3">
|
|
8
|
-
<meta name="
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, viewport-fit=cover">
|
|
8
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
11
|
+
<meta name="description" content="ODANT-WORK">
|
|
9
12
|
<link rel="shortcut icon" type="image/x-icon" href="@icon" crossorigin="use-credentials">
|
|
10
13
|
<title>{title}</title>
|
|
11
14
|
<style>
|
package/sources/manifest.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"id": "/",
|
|
3
|
+
"scope": "/",
|
|
4
|
+
"lang": "ru",
|
|
5
|
+
"name": "ODANT-WORK",
|
|
3
6
|
"short_name": "WORK",
|
|
4
7
|
"start_url": "/",
|
|
5
|
-
"display"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
+
"display": "standalone",
|
|
9
|
+
"orientation": "any",
|
|
10
|
+
"background_color": "#4b0082",
|
|
11
|
+
"theme_color": "#4b0082",
|
|
8
12
|
"icons": [
|
|
9
13
|
{
|
|
10
14
|
"src": "/sources/odant.png?mode=preview72",
|
|
@@ -34,7 +38,8 @@
|
|
|
34
38
|
{
|
|
35
39
|
"src": "/sources/odant.png?mode=preview192",
|
|
36
40
|
"sizes": "192x192",
|
|
37
|
-
"type": "image/png"
|
|
41
|
+
"type": "image/png",
|
|
42
|
+
"purpose": "any maskable"
|
|
38
43
|
},
|
|
39
44
|
{
|
|
40
45
|
"src": "/sources/odant.png?mode=preview384",
|
|
@@ -44,7 +49,8 @@
|
|
|
44
49
|
{
|
|
45
50
|
"src": "/sources/odant.png?mode=preview512",
|
|
46
51
|
"sizes": "512x512",
|
|
47
|
-
"type": "image/png"
|
|
52
|
+
"type": "image/png",
|
|
53
|
+
"purpose": "any maskable"
|
|
48
54
|
}
|
|
49
55
|
]
|
|
50
56
|
}
|