odant-work 1.0.85 → 1.0.86
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.86",
|
|
4
4
|
"createdAt": 1795100682741,
|
|
5
|
-
"updatedAt":
|
|
5
|
+
"updatedAt": 1795763259447,
|
|
6
6
|
"files": {
|
|
7
7
|
"run.mjs": "f8918c612e8641e9beee06221be6680aa6fd21f25468451f2ac857fd51772266",
|
|
8
|
-
"package.json": "
|
|
9
|
-
"package-lock.json": "
|
|
8
|
+
"package.json": "6f13439458bef973245a92bdd4cd01b934ec3765a78ca31ce3ee1556cddfeb7a",
|
|
9
|
+
"package-lock.json": "938d04579cfb71dfe0a5424c2d6a708792e45701a2c78927a9b3a42a858dea71",
|
|
10
10
|
"sources/client/class.js": "c3fb8f143fc83aaa2df1ddeddd412d2d4dfe88656578095babe2df34fb3b3922",
|
|
11
11
|
"sources/client/field.js": "ffdd50fa8b6ec515cc42da5fca96658ff2b20e274601a1f926e0031372467a19",
|
|
12
12
|
"sources/client/file.js": "667101d75fa30840370d5be232e518aaac7c1fd52ca05a12da560eef6c0848b0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"sources/modules/agent/log.js": "03ae1979e2b00459178deda49847c30ed75937fc4f3eea9b778ca6c0f8c4ded0",
|
|
71
71
|
"sources/modules/agent/loop.js": "c7e732fba6d180f1728c927d542901be064e950899541f18575c9e9eb6365a97",
|
|
72
72
|
"sources/modules/agent/mcp-pool.js": "aa4e75e2fcfe07883f9b721b33cee642fbbe11b8f416f8cd6a81f9c1ab39edde",
|
|
73
|
-
"sources/modules/agent/node-rules.js": "
|
|
73
|
+
"sources/modules/agent/node-rules.js": "7a00651181afd3b125858b6fd53efa4382de1036dd71144c9f0adcb90857b98e",
|
|
74
74
|
"sources/modules/agent/permissions.js": "f4c0fd43fe04e778f0f3aa730a597578541bdb770227e58bfdc1de531dd2f263",
|
|
75
75
|
"sources/modules/agent/plugins.js": "9aed13c2d7bbf66dcd165f23b3969874561aea470dc16dac1435d183696cfda5",
|
|
76
76
|
"sources/modules/agent/readme.md": "c8d461218b8b552be58697f154c5bc4dba9858e6387aff6acfbc794c1286b89d",
|
|
@@ -631,7 +631,7 @@
|
|
|
631
631
|
"$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/license.js": "331e04fa43103e9e73bbfd7959c39bae8413e79711d5ba4838f3197452ada201",
|
|
632
632
|
"$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/messengers.js": "531aa0c5d1daba334aa5c3ca6a9fc25d4e3a9d0b4f7f6bc489a2233a990d5e28",
|
|
633
633
|
"$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/modules.js": "b5722e8da7e06e25bd5efa56df7c8a3cf30d5530d5666b970cbd4dced91eefe3",
|
|
634
|
-
"$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/staff.js": "
|
|
634
|
+
"$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/staff.js": "3d128b94b141bd343141f2ba0d22b122d80326d6f5f9c2a4f83cb7ec731782f9",
|
|
635
635
|
"$server/$folder/$class/$structure/handlers/pages/site/$handler/class.js": "2651e21b62b4662a03222e01d305c6bbf79ab15acfc6f043967dff2d8e5f1fac",
|
|
636
636
|
"$server/$folder/$class/$structure/handlers/pages/site/$handler/readme.md": "b5aaa3e3771c31acb7b99d734955f546bde05628990856d2b30aa87a7fd27e39",
|
|
637
637
|
"$server/$folder/$class/$structure/handlers/pages/site/$handler/site.js": "cd6b70c123beab93a8490254e402b4a856940620c4b9ab69866ef73412ef2f0d",
|
|
@@ -24,6 +24,13 @@ function normPath(p) {
|
|
|
24
24
|
return s || '/';
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/** Стабильный порядок узлов дерева прав: по названию, затем по пути. */
|
|
28
|
+
const CLASS_LABEL_COLLATOR = new Intl.Collator('ru', { numeric: true, sensitivity: 'base' });
|
|
29
|
+
function compareClassNodes(a, b) {
|
|
30
|
+
return CLASS_LABEL_COLLATOR.compare(String(a?.label || a?.id || ''), String(b?.label || b?.id || ''))
|
|
31
|
+
|| String(a?.id || '').localeCompare(String(b?.id || ''), 'ru');
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
function parseDroppedItem(e) {
|
|
28
35
|
const dt = e?.dataTransfer;
|
|
29
36
|
if (!dt)
|
|
@@ -1039,6 +1046,7 @@ if (typeof ODA === 'function' && !customElements.get('staff-role-node')) {
|
|
|
1039
1046
|
});
|
|
1040
1047
|
}
|
|
1041
1048
|
}
|
|
1049
|
+
res.sort(compareClassNodes);
|
|
1042
1050
|
return res;
|
|
1043
1051
|
};
|
|
1044
1052
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.86",
|
|
4
4
|
"description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sources/work.js",
|
|
@@ -15,6 +15,11 @@ import { FS } from '../../server/index.js';
|
|
|
15
15
|
|
|
16
16
|
const ACCESS_DENIED = 'Доступ запрещён';
|
|
17
17
|
const SAFE_RULE_NAME_RE = /^[A-Za-z0-9\u0400-\u04FF_-]{1,64}$/;
|
|
18
|
+
/** Единый порядок классов и модулей в дереве прав: по названию, без зависимости от порядка файлов. */
|
|
19
|
+
const TREE_LABEL_COLLATOR = new Intl.Collator('ru', { numeric: true, sensitivity: 'base' });
|
|
20
|
+
function compareTreeLabels(a, b) {
|
|
21
|
+
return TREE_LABEL_COLLATOR.compare(String(a?.label ?? a?.id ?? ''), String(b?.label ?? b?.id ?? ''));
|
|
22
|
+
}
|
|
18
23
|
|
|
19
24
|
async function assertBoss(storage, params = {}) {
|
|
20
25
|
if (DEV_MODE || !params?.session || params.session.$user === globalThis.WORK)
|
|
@@ -892,6 +897,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
892
897
|
if (built)
|
|
893
898
|
children.push(built);
|
|
894
899
|
}
|
|
900
|
+
children.sort(compareTreeLabels);
|
|
895
901
|
return {
|
|
896
902
|
id: node.id,
|
|
897
903
|
path: node.path,
|
|
@@ -913,6 +919,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
913
919
|
baseClasses.push(built);
|
|
914
920
|
}
|
|
915
921
|
}
|
|
922
|
+
baseClasses.sort(compareTreeLabels);
|
|
916
923
|
|
|
917
924
|
// 5. Доступные эталонные модули в корневом /MODULES
|
|
918
925
|
const systemModules = [];
|