@endge/core 1.2.12 → 1.2.13
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/dist/core.cjs +274 -266
- package/dist/core.js +18064 -17407
- package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +2 -1
- package/dist/domain/entities/runtime/hosts/CompositionRuntimeHost.d.ts +4 -0
- package/dist/domain/types/auth/auth-profile.types.d.ts +10 -0
- package/dist/domain/types/component/sfc/table-events.types.d.ts +1 -0
- package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +134 -0
- package/dist/domain/types/component/sfc/visual-projection.types.d.ts +5 -2
- package/dist/domain/types/document/document-move.type.d.ts +6 -0
- package/dist/domain/types/document/domain-provider.type.d.ts +24 -0
- package/dist/domain/types/program/program.types.d.ts +4 -0
- package/dist/domain/types/runtime/runtime-host.types.d.ts +23 -1
- package/dist/domain/types/source/composition-source.types.d.ts +6 -0
- package/dist/domain/types/source/data-view-source.types.d.ts +12 -0
- package/dist/domain/types/source/filter-source.types.d.ts +2 -0
- package/dist/domain/types/source/source-expression.types.d.ts +3 -0
- package/dist/domain/types/source/store-source.types.d.ts +1 -0
- package/dist/domain/types/ui/filter-view.type.d.ts +13 -0
- package/dist/main.d.ts +3 -0
- package/dist/model/modules/domain/endge-domain-repository.d.ts +3 -0
- package/dist/model/modules/runtime/execution/endge-data-view.d.ts +8 -6
- package/dist/model/modules/security/auth/AuthRequestResolver.d.ts +1 -1
- package/dist/model/modules/security/auth/AuthSessionManager.d.ts +20 -18
- package/dist/model/modules/security/endge-auth.d.ts +2 -2
- package/dist/model/services/compiler/component-sfc/component-sfc-attributes.d.ts +9 -0
- package/dist/model/services/compiler/component-sfc/component-sfc-table-menu.d.ts +5 -0
- package/package.json +4 -4
|
@@ -132,8 +132,9 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
|
|
|
132
132
|
private _makeBoundaryPatch;
|
|
133
133
|
private _makeTableRowPatch;
|
|
134
134
|
private _makeTableColumnPatch;
|
|
135
|
+
/** Собирает все keyed события frame-а, не теряя соседние SSE-изменения. */
|
|
136
|
+
private _makeCollectionPatch;
|
|
135
137
|
private _resolveBoundarySourcePath;
|
|
136
|
-
private _extractCollectionItemIndex;
|
|
137
138
|
private _extractChangedPath;
|
|
138
139
|
private _makeColumnProjection;
|
|
139
140
|
private _makeObservedRaphPaths;
|
|
@@ -21,6 +21,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
|
|
|
21
21
|
private _publicationDisposers;
|
|
22
22
|
private _disposers;
|
|
23
23
|
private _bridgePaths;
|
|
24
|
+
private _bindingDerivedHandles;
|
|
24
25
|
private _dataPaths;
|
|
25
26
|
private _storeRuntimeIds;
|
|
26
27
|
private _storeProviderRuntimeIds;
|
|
@@ -126,6 +127,8 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
|
|
|
126
127
|
private _subscribeBinding;
|
|
127
128
|
private _bindingPath;
|
|
128
129
|
private _materializeBinding;
|
|
130
|
+
/** Материализует parameterized DataView binding без отдельного runtime host. */
|
|
131
|
+
private _materializeDataViewBinding;
|
|
129
132
|
/** Гарантирует, что список outputs для fromOutput(runtime) был связан до запуска runtime. */
|
|
130
133
|
private _requireResolvedOutputs;
|
|
131
134
|
/** Читает и распаковывает один именованный runtime output. */
|
|
@@ -136,6 +139,7 @@ export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition
|
|
|
136
139
|
private _readRuntimeMetadata;
|
|
137
140
|
private _readExpressionSource;
|
|
138
141
|
private _collectExpressionReads;
|
|
142
|
+
private _flattenBindings;
|
|
139
143
|
private _subscribeExpressionRead;
|
|
140
144
|
private _readFilterFieldsBinding;
|
|
141
145
|
isFilterViewRuntime(runtime: RuntimeHost<any, any>): runtime is FilterViewRuntimeHost;
|
|
@@ -58,6 +58,16 @@ export interface AuthEnsureOptions {
|
|
|
58
58
|
/** Запрещает первичный auto-login service-профиля, сохраняя restore и refresh. */
|
|
59
59
|
allowServiceLogin?: boolean;
|
|
60
60
|
}
|
|
61
|
+
export interface AuthSessionSourceResolveOptions {
|
|
62
|
+
forceRefresh: boolean;
|
|
63
|
+
minValiditySeconds: number;
|
|
64
|
+
}
|
|
65
|
+
/** Host-owned источник session для внешнего Authorization Code/PKCE flow. */
|
|
66
|
+
export interface AuthSessionSource {
|
|
67
|
+
resolveToken: (options: AuthSessionSourceResolveOptions) => Promise<AuthTokenSet | null>;
|
|
68
|
+
logout?: () => Promise<void>;
|
|
69
|
+
loadUserInfo?: () => Promise<Record<string, unknown> | null>;
|
|
70
|
+
}
|
|
61
71
|
/** Минимальный синхронный auth context без tokens и полного claims payload. */
|
|
62
72
|
export interface EndgeAuthContext {
|
|
63
73
|
authenticated: boolean;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/** Статическое значение атрибута, которое можно безопасно предлагать в Source Editor. */
|
|
2
|
+
export type ComponentSFCTagAttributeLiteral = string | number | boolean;
|
|
3
|
+
/** Renderer-neutral контракт атрибута встроенного SFC tag с конечным набором значений. */
|
|
4
|
+
export interface ComponentSFCTagAttributeContract {
|
|
5
|
+
/** Каноническое имя для нового source. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Совместимые имена, которые уже принимает compiler/runtime. */
|
|
8
|
+
aliases?: readonly string[];
|
|
9
|
+
/** Полный набор допустимых статических значений. */
|
|
10
|
+
values: readonly ComponentSFCTagAttributeLiteral[];
|
|
11
|
+
/** Значение, которое применяется при отсутствии атрибута. */
|
|
12
|
+
defaultValue?: ComponentSFCTagAttributeLiteral;
|
|
13
|
+
/** Краткое описание для completion и hover. */
|
|
14
|
+
description: string;
|
|
15
|
+
/** false, когда более контекстная проверка уже выполняется compiler-ом. */
|
|
16
|
+
validate?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Дополнительные контракты tag, например literal-union props пользовательского компонента. */
|
|
19
|
+
export interface ComponentSFCAttributeAnalysisOptions {
|
|
20
|
+
resolveTagAttributeContracts?: (tag: string) => readonly ComponentSFCTagAttributeContract[] | null | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare const ENDGE_SFC_TABLE_SELECTION_MODES: readonly ["none", "single", "multiple"];
|
|
23
|
+
export declare const ENDGE_SFC_TABLE_SELECTION_TRIGGERS: readonly ["auto", "control", "row", "both"];
|
|
24
|
+
export declare const ENDGE_SFC_TABLE_PAGING_MODES: readonly ["pages", "virtual"];
|
|
25
|
+
export declare const ENDGE_SFC_TABLE_SORT_MODES: readonly ["multiple", "single", "fixed", "disabled"];
|
|
26
|
+
export declare const ENDGE_SFC_TABLE_SORT_COMPARATORS: readonly ["natural", "text", "number", "date", "time", "boolean"];
|
|
27
|
+
export declare const ENDGE_SFC_TABLE_COLUMN_PIN_MODES: readonly ["enabled", "disabled"];
|
|
28
|
+
export declare const ENDGE_SFC_TABLE_COLUMN_MENU_MODES: readonly ["default", "disabled"];
|
|
29
|
+
export declare const ENDGE_SFC_TABLE_CELL_ALIGNMENTS: readonly ["left", "center", "right"];
|
|
30
|
+
export declare const ENDGE_SFC_TABLE_CELL_VERTICAL_ALIGNMENTS: readonly ["top", "middle", "bottom"];
|
|
31
|
+
export declare const ENDGE_SFC_GRID_AUTO_FLOWS: readonly ["row", "column", "row dense", "column dense"];
|
|
32
|
+
export declare const ENDGE_SFC_GRID_ALIGNMENTS: readonly ["start", "center", "end", "stretch"];
|
|
33
|
+
export declare const ENDGE_SFC_FLEX_DIRECTIONS: readonly ["row", "column"];
|
|
34
|
+
export declare const ENDGE_SFC_DIVIDER_ORIENTATIONS: readonly ["horizontal", "vertical"];
|
|
35
|
+
export declare const ENDGE_SFC_INPUT_TYPES: readonly ["String", "Number", "Date", "Time", "DateTime"];
|
|
36
|
+
/** Конечные значения встроенных SFC tags. Свободные string/number props сюда не входят. */
|
|
37
|
+
export declare const ENDGE_SFC_TAG_ATTRIBUTE_CONTRACTS: {
|
|
38
|
+
readonly Table: readonly [{
|
|
39
|
+
readonly name: "selection-mode";
|
|
40
|
+
readonly aliases: readonly ["selectionMode"];
|
|
41
|
+
readonly values: readonly ["none", "single", "multiple"];
|
|
42
|
+
readonly defaultValue: "none";
|
|
43
|
+
readonly description: "Допустимое количество выбранных строк.";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "selection-trigger";
|
|
46
|
+
readonly aliases: readonly ["selectionTrigger"];
|
|
47
|
+
readonly values: readonly ["auto", "control", "row", "both"];
|
|
48
|
+
readonly defaultValue: "auto";
|
|
49
|
+
readonly description: "Действие, которое меняет состояние выбора строки.";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "paging";
|
|
52
|
+
readonly values: readonly ["pages", "virtual"];
|
|
53
|
+
readonly defaultValue: "pages";
|
|
54
|
+
readonly description: "Страничное или виртуализированное отображение строк.";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "sort-mode";
|
|
57
|
+
readonly aliases: readonly ["sortMode"];
|
|
58
|
+
readonly values: readonly ["multiple", "single", "fixed", "disabled"];
|
|
59
|
+
readonly defaultValue: "multiple";
|
|
60
|
+
readonly description: "Режим пользовательской сортировки Table.";
|
|
61
|
+
readonly validate: false;
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "column-pin";
|
|
64
|
+
readonly aliases: readonly ["columnPin"];
|
|
65
|
+
readonly values: readonly ["enabled", "disabled"];
|
|
66
|
+
readonly defaultValue: "enabled";
|
|
67
|
+
readonly description: "Разрешает или запрещает runtime-закрепление колонок.";
|
|
68
|
+
readonly validate: false;
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "column-menu";
|
|
71
|
+
readonly aliases: readonly ["columnMenu"];
|
|
72
|
+
readonly values: readonly ["default", "disabled"];
|
|
73
|
+
readonly defaultValue: "default";
|
|
74
|
+
readonly description: "Стандартное или отключённое меню заголовка колонки.";
|
|
75
|
+
readonly validate: false;
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "cell-align";
|
|
78
|
+
readonly aliases: readonly ["cellAlign"];
|
|
79
|
+
readonly values: readonly ["left", "center", "right"];
|
|
80
|
+
readonly defaultValue: "left";
|
|
81
|
+
readonly description: "Горизонтальное выравнивание содержимого ячеек.";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "cell-vertical-align";
|
|
84
|
+
readonly aliases: readonly ["cellVerticalAlign"];
|
|
85
|
+
readonly values: readonly ["top", "middle", "bottom"];
|
|
86
|
+
readonly defaultValue: "middle";
|
|
87
|
+
readonly description: "Вертикальное выравнивание содержимого ячеек.";
|
|
88
|
+
}];
|
|
89
|
+
readonly Column: readonly [{
|
|
90
|
+
readonly name: "sort";
|
|
91
|
+
readonly values: readonly ["natural", "text", "number", "date", "time", "boolean"];
|
|
92
|
+
readonly defaultValue: "natural";
|
|
93
|
+
readonly description: "Comparator для значений колонки.";
|
|
94
|
+
readonly validate: false;
|
|
95
|
+
}];
|
|
96
|
+
readonly Grid: readonly [{
|
|
97
|
+
readonly name: "autoFlow";
|
|
98
|
+
readonly values: readonly ["row", "column", "row dense", "column dense"];
|
|
99
|
+
readonly defaultValue: "row";
|
|
100
|
+
readonly description: "Направление автоматического размещения CSS Grid.";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "align";
|
|
103
|
+
readonly values: readonly ["start", "center", "end", "stretch"];
|
|
104
|
+
readonly defaultValue: "stretch";
|
|
105
|
+
readonly description: "Выравнивание элементов по вертикальной оси Grid.";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "justify";
|
|
108
|
+
readonly values: readonly ["start", "center", "end", "stretch"];
|
|
109
|
+
readonly defaultValue: "stretch";
|
|
110
|
+
readonly description: "Выравнивание элементов по горизонтальной оси Grid.";
|
|
111
|
+
}];
|
|
112
|
+
readonly Flex: readonly [{
|
|
113
|
+
readonly name: "direction";
|
|
114
|
+
readonly values: readonly ["row", "column"];
|
|
115
|
+
readonly defaultValue: "row";
|
|
116
|
+
readonly description: "Направление основной оси Flex.";
|
|
117
|
+
}];
|
|
118
|
+
readonly Divider: readonly [{
|
|
119
|
+
readonly name: "orientation";
|
|
120
|
+
readonly values: readonly ["horizontal", "vertical"];
|
|
121
|
+
readonly defaultValue: "horizontal";
|
|
122
|
+
readonly description: "Ориентация разделителя.";
|
|
123
|
+
}];
|
|
124
|
+
readonly Input: readonly [{
|
|
125
|
+
readonly name: "type";
|
|
126
|
+
readonly values: readonly ["String", "Number", "Date", "Time", "DateTime"];
|
|
127
|
+
readonly defaultValue: "String";
|
|
128
|
+
readonly description: "Семантический тип значения Input.";
|
|
129
|
+
}];
|
|
130
|
+
};
|
|
131
|
+
/** Возвращает строгие контракты атрибутов одного встроенного SFC tag. */
|
|
132
|
+
export declare function getComponentSFCTagAttributeContracts(tag: string): readonly ComponentSFCTagAttributeContract[];
|
|
133
|
+
/** Находит строгий контракт по каноническому или совместимому имени атрибута. */
|
|
134
|
+
export declare function getComponentSFCTagAttributeContract(tag: string, attributeName: string): ComponentSFCTagAttributeContract | null;
|
|
@@ -42,6 +42,8 @@ export type ComponentSFCTableCellProjection = {
|
|
|
42
42
|
export interface ComponentSFCVisualInspectionOptions {
|
|
43
43
|
resolveComponentTag?: (tag: string) => string | null;
|
|
44
44
|
resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
|
|
45
|
+
/** Direct Action identities available to source-authored MenuItem bindings. */
|
|
46
|
+
actionIdentities?: Iterable<string>;
|
|
45
47
|
}
|
|
46
48
|
/** Visual read-model одной прямой Column внутри корневого Table. */
|
|
47
49
|
export interface ComponentSFCTableColumnProjection {
|
|
@@ -64,7 +66,7 @@ export type ComponentSFCTableVisualMenuKind = 'column' | 'row';
|
|
|
64
66
|
export type ComponentSFCTableVisualMenuMode = 'default' | 'disabled' | 'none' | 'custom' | 'source';
|
|
65
67
|
export interface ComponentSFCTableMenuActionOption {
|
|
66
68
|
identity: string;
|
|
67
|
-
source: 'intrinsic' | 'built-in' | 'required' | 'provided' | 'forwarded';
|
|
69
|
+
source: 'intrinsic' | 'built-in' | 'external' | 'required' | 'provided' | 'forwarded';
|
|
68
70
|
}
|
|
69
71
|
export type ComponentSFCTableMenuNodeProjection = {
|
|
70
72
|
kind: 'separator';
|
|
@@ -106,7 +108,7 @@ export type ComponentSFCTableSourcePatch = {
|
|
|
106
108
|
value: string | null;
|
|
107
109
|
} | {
|
|
108
110
|
type: 'set-table-attribute';
|
|
109
|
-
name: 'ref' | 'selection-mode' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
|
|
111
|
+
name: 'ref' | 'selection-mode' | 'selection-trigger' | 'paging' | 'page-size' | 'page-sizes' | 'default-pin' | 'default-sort' | 'default-hidden';
|
|
110
112
|
value: string | null;
|
|
111
113
|
} | {
|
|
112
114
|
type: 'set-column-component';
|
|
@@ -163,6 +165,7 @@ export interface ComponentSFCTableVisualProjection {
|
|
|
163
165
|
kind: 'table';
|
|
164
166
|
ref: ComponentSFCVisualSourceValue | null;
|
|
165
167
|
selectionMode: ComponentSFCVisualSourceValue | null;
|
|
168
|
+
selectionTrigger: ComponentSFCVisualSourceValue | null;
|
|
166
169
|
rows: ComponentSFCVisualSourceValue | null;
|
|
167
170
|
rowKey: ComponentSFCVisualSourceValue | null;
|
|
168
171
|
paging: ComponentSFCVisualSourceValue | null;
|
|
@@ -25,6 +25,29 @@ export interface EndgeDocumentMutationResult {
|
|
|
25
25
|
document: EndgeLiveDomainDocument;
|
|
26
26
|
etag: string | null;
|
|
27
27
|
}
|
|
28
|
+
/** Документ с optimistic revision для атомарного перемещения. */
|
|
29
|
+
export interface EndgeDocumentMoveRequestItem {
|
|
30
|
+
collection: EndgeDomainCollection;
|
|
31
|
+
identity: string;
|
|
32
|
+
expectedRevision: number;
|
|
33
|
+
}
|
|
34
|
+
/** Запрос атомарного перемещения документов в одну папку. */
|
|
35
|
+
export interface EndgeDocumentsMoveRequest {
|
|
36
|
+
workspaceIdentity: string;
|
|
37
|
+
documents: EndgeDocumentMoveRequestItem[];
|
|
38
|
+
folderIdentity: string;
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}
|
|
41
|
+
/** Актуальный документ и его transport-коллекция после перемещения. */
|
|
42
|
+
export interface EndgeMovedDocument {
|
|
43
|
+
collection: EndgeDomainCollection;
|
|
44
|
+
document: EndgeLiveDomainDocument;
|
|
45
|
+
}
|
|
46
|
+
/** Результат атомарного перемещения документов. */
|
|
47
|
+
export interface EndgeDocumentsMoveResult {
|
|
48
|
+
documents: EndgeMovedDocument[];
|
|
49
|
+
moved: number;
|
|
50
|
+
}
|
|
28
51
|
export interface EndgeWorkspaceMutationRequest {
|
|
29
52
|
workspaceIdentity: string;
|
|
30
53
|
document: Record<string, unknown>;
|
|
@@ -47,6 +70,7 @@ export interface EndgeDomainProvider {
|
|
|
47
70
|
updateDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
48
71
|
softDeleteDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
49
72
|
restoreDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
73
|
+
moveDocuments?(request: EndgeDocumentsMoveRequest): Promise<EndgeDocumentsMoveResult>;
|
|
50
74
|
updateWorkspace(request: EndgeWorkspaceMutationRequest): Promise<EndgeWorkspaceMutationResult>;
|
|
51
75
|
}
|
|
52
76
|
export type EndgeDomainRepositoryProviderId = 'service-backend' | 'bundle' | 'plain';
|
|
@@ -167,6 +167,10 @@ export interface DataViewProgramPayload {
|
|
|
167
167
|
sourceDocument: DataViewSourceDocument | null;
|
|
168
168
|
/** Декларативный входной и выходной тип DataView. */
|
|
169
169
|
contract?: DataViewSourceDocument['contract'];
|
|
170
|
+
/** Контракт внешних параметров одного materialized DataView instance. */
|
|
171
|
+
props?: SourceFieldDefinition[];
|
|
172
|
+
/** Row-local predicate, применяемый после pipeline steps. */
|
|
173
|
+
filter?: SourceExpressionIR | null;
|
|
170
174
|
/** Compiled manual transform. Используется только в mode=manual. */
|
|
171
175
|
transform: DataViewManualTransform | null;
|
|
172
176
|
/** Compiled pipeline steps. Используется только в mode=pipeline. */
|
|
@@ -279,8 +279,30 @@ export interface RuntimeCollectionProjectionUpdatePatch {
|
|
|
279
279
|
/** Raph-нода, которая стала верхней dirty boundary. */
|
|
280
280
|
node: RaphNode;
|
|
281
281
|
}
|
|
282
|
+
/** Одно keyed изменение строки внутри пакетного patch коллекции. */
|
|
283
|
+
export interface RuntimeCollectionItemPatch {
|
|
284
|
+
/** Текущий индекс строки; null означает, что строка удалена из результата. */
|
|
285
|
+
itemIndex: number | null;
|
|
286
|
+
/** Стабильный ключ строки из selector или актуального snapshot. */
|
|
287
|
+
itemKey: unknown;
|
|
288
|
+
/** Актуальный snapshot строки; null/undefined означает удаление. */
|
|
289
|
+
itemSnapshot: unknown;
|
|
290
|
+
/** Измененные относительные paths внутри строки. */
|
|
291
|
+
changedPaths: string[][];
|
|
292
|
+
}
|
|
293
|
+
/** Пакет keyed изменений одной коллекции за один Raph frame. */
|
|
294
|
+
export interface RuntimeCollectionProjectionBatchPatch {
|
|
295
|
+
kind: 'collection-projection-batch';
|
|
296
|
+
boundaryId: string;
|
|
297
|
+
boundaryType: 'table';
|
|
298
|
+
sourcePath: string;
|
|
299
|
+
items: RuntimeCollectionItemPatch[];
|
|
300
|
+
affectedProjections: RuntimeCollectionProjectionPatch[];
|
|
301
|
+
events: PhaseEvent[];
|
|
302
|
+
node: RaphNode;
|
|
303
|
+
}
|
|
282
304
|
/** Нейтральный patch runtime boundary для render adapter-а. */
|
|
283
|
-
export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch;
|
|
305
|
+
export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch | RuntimeCollectionProjectionBatchPatch;
|
|
284
306
|
export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType, TContext extends RuntimeHostContext<TType> = RuntimeHostContext<TType>, TArtifactPayload = unknown> extends RuntimeHostLifecycle {
|
|
285
307
|
/** Уникальный runtime-id host. */
|
|
286
308
|
readonly id: string;
|
|
@@ -73,6 +73,12 @@ export type CompositionBindingValue = {
|
|
|
73
73
|
kind: 'filter-fields';
|
|
74
74
|
runtime: string;
|
|
75
75
|
fields: string[];
|
|
76
|
+
} | {
|
|
77
|
+
kind: 'data-view';
|
|
78
|
+
data: string;
|
|
79
|
+
path: string;
|
|
80
|
+
identity: string;
|
|
81
|
+
props: Record<string, CompositionBindingValue>;
|
|
76
82
|
} | {
|
|
77
83
|
kind: 'expression';
|
|
78
84
|
expression: SourceExpressionIR;
|
|
@@ -9,12 +9,18 @@ export type DataViewIncrementalRequest = {
|
|
|
9
9
|
} | {
|
|
10
10
|
mode: 'collection-by-key';
|
|
11
11
|
key: string;
|
|
12
|
+
} | {
|
|
13
|
+
mode: 'filter-by-key';
|
|
14
|
+
key: string;
|
|
12
15
|
};
|
|
13
16
|
export type DataViewMaterializationStrategy = {
|
|
14
17
|
kind: 'full';
|
|
15
18
|
} | {
|
|
16
19
|
kind: 'collection-by-key';
|
|
17
20
|
key: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'filter-by-key';
|
|
23
|
+
key: string;
|
|
18
24
|
};
|
|
19
25
|
export interface DataViewSourceContract {
|
|
20
26
|
input: SourceFieldDefinition;
|
|
@@ -23,12 +29,18 @@ export interface DataViewSourceContract {
|
|
|
23
29
|
export interface DataViewSourceDocument {
|
|
24
30
|
mode: DataViewSourceMode;
|
|
25
31
|
incremental: DataViewIncrementalRequest;
|
|
32
|
+
props: SourceFieldDefinition[];
|
|
26
33
|
contract?: DataViewSourceContract | null;
|
|
34
|
+
filter?: SourceExpressionIR | null;
|
|
27
35
|
transform?: DataViewManualTransform;
|
|
28
36
|
steps?: DataViewPipelineStep[];
|
|
29
37
|
output?: Record<string, SourceExpressionIR>;
|
|
30
38
|
expression?: SourceExpressionIR;
|
|
31
39
|
}
|
|
40
|
+
/** Runtime-контекст одного вызова parameterized DataView. */
|
|
41
|
+
export interface DataViewRunContext {
|
|
42
|
+
props?: Record<string, unknown>;
|
|
43
|
+
}
|
|
32
44
|
export interface DataViewManualTransform {
|
|
33
45
|
params: string[];
|
|
34
46
|
body: string;
|
|
@@ -58,12 +58,14 @@ export interface FilterProgramJsonOutput {
|
|
|
58
58
|
key: string;
|
|
59
59
|
kind: 'json';
|
|
60
60
|
expression: SourceExpressionIR;
|
|
61
|
+
dependencies?: string[];
|
|
61
62
|
}
|
|
62
63
|
/** Локальный predicate, вычисляемый над строкой и state фильтра. */
|
|
63
64
|
export interface FilterProgramPredicateOutput {
|
|
64
65
|
key: string;
|
|
65
66
|
kind: 'predicate';
|
|
66
67
|
expression: SourceExpressionIR;
|
|
68
|
+
dependencies?: string[];
|
|
67
69
|
}
|
|
68
70
|
export type FilterProgramOutput = FilterProgramJsonOutput | FilterProgramPredicateOutput;
|
|
69
71
|
/** Payload Filter artifact без persisted source и diagnostics envelope. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../program/program-metadata.types';
|
|
1
2
|
import { TypeSourceExpression } from './type-source.types';
|
|
2
3
|
/** Type Registry identity used by Query/Filter field contracts. */
|
|
3
4
|
export type SourceFieldType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Time' | 'DateTime' | 'Object' | 'Any' | (string & {});
|
|
@@ -51,6 +52,8 @@ export interface SourceFieldDefinition {
|
|
|
51
52
|
defaultValue?: SourceExpressionIR;
|
|
52
53
|
options?: SourceFieldOption[];
|
|
53
54
|
vocab?: SourceFieldVocab;
|
|
55
|
+
/** Статическая presentation metadata поля, не влияющая на Filter state. */
|
|
56
|
+
metadata?: ProgramMetadataMap;
|
|
54
57
|
}
|
|
55
58
|
/** Default value prop, вычисляемый через output внешнего или локального Filter. */
|
|
56
59
|
export type SourceFieldDefaultSource = {
|
|
@@ -18,6 +18,7 @@ export interface StoreDerivedDescriptor {
|
|
|
18
18
|
kind: 'derived';
|
|
19
19
|
source: string;
|
|
20
20
|
dataViews: DataViewRef[];
|
|
21
|
+
materializationStrategy?: import('./data-view-source.types').DataViewMaterializationStrategy;
|
|
21
22
|
contract?: SourceFieldDefinition | null;
|
|
22
23
|
}
|
|
23
24
|
export interface StoreSourceDocument {
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { SourceFieldDefinition, SourceFieldOption } from '../source/source-expression.types';
|
|
2
|
+
export declare const ENDGE_UI_SELECT_METADATA_NAMESPACE = "endge.ui.select";
|
|
3
|
+
export declare const FILTER_SELECT_AUTO_OPTIMIZE_THRESHOLD = 10;
|
|
4
|
+
/** Presentation hints встроенного Select; неизвестные metadata adapters игнорируют. */
|
|
5
|
+
export interface FilterSelectPresentationMetadata {
|
|
6
|
+
searchable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Результат применения metadata и безопасных adapter defaults к Select. */
|
|
9
|
+
export interface FilterSelectPresentation {
|
|
10
|
+
searchable: boolean;
|
|
11
|
+
virtualized: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Применяет явный searchable override и автоматическую оптимизацию больших списков. */
|
|
14
|
+
export declare function resolveFilterSelectPresentation(field: Pick<SourceFieldDefinition, 'metadata'>, optionCount: number): FilterSelectPresentation;
|
|
2
15
|
/** Renderer-neutral primitive, выбранный для поля Filter view. */
|
|
3
16
|
export type FilterViewControlType = 'Input' | 'Textarea' | 'Checkbox' | 'Select';
|
|
4
17
|
/** Явное переопределение автоматически выбранного контрола. */
|
package/dist/main.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from './domain/types/component/sfc/table-visibility.types';
|
|
|
40
40
|
export * from './domain/types/component/sfc/table-events.types';
|
|
41
41
|
export * from './domain/types/component/sfc/intrinsic-events.types';
|
|
42
42
|
export * from './domain/types/component/sfc/tag-input-contract.types';
|
|
43
|
+
export * from './domain/types/component/sfc/tag-attribute-contract.types';
|
|
43
44
|
export * from './domain/types/component/sfc/location.types';
|
|
44
45
|
export * from './domain/types/component/sfc/ast.types';
|
|
45
46
|
export * from './domain/types/component/sfc/ir.types';
|
|
@@ -57,6 +58,7 @@ export * from './domain/types/document/codegen.types';
|
|
|
57
58
|
export * from './domain/types/document/document.types';
|
|
58
59
|
export * from './domain/types/document/document-create.type';
|
|
59
60
|
export * from './domain/types/document/document-draft.type';
|
|
61
|
+
export * from './domain/types/document/document-move.type';
|
|
60
62
|
export * from './domain/types/document/domain-export.type';
|
|
61
63
|
export * from './domain/types/document/domain-provider.type';
|
|
62
64
|
export * from './domain/types/document/domain-snapshot.type';
|
|
@@ -194,6 +196,7 @@ export * from './domain/entities/runtime/hosts/CompositionRuntimeHost';
|
|
|
194
196
|
export * from './domain/entities/runtime/hosts/StoreRuntimeHost';
|
|
195
197
|
export * from './domain/entities/runtime/hosts/ActionRuntimeHost';
|
|
196
198
|
export * from './model/services/compiler/component-sfc/component-sfc-compile';
|
|
199
|
+
export * from './model/services/compiler/component-sfc/component-sfc-attributes';
|
|
197
200
|
export * from './model/services/compiler/component-sfc/component-sfc-expression';
|
|
198
201
|
export * from './model/services/compiler/component-sfc/component-sfc-parse';
|
|
199
202
|
export * from './model/services/compiler/component-sfc/component-sfc-script';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DomainDocumentType } from '../../../domain/types/document/document.types';
|
|
2
2
|
import { DocumentCreateRequest, DocumentCreateResult } from '../../../domain/types/document/document-create.type';
|
|
3
|
+
import { EndgeDomainDocumentMove } from '../../../domain/types/document/document-move.type';
|
|
3
4
|
import { EndgeDomainRepositoryCapabilities } from '../../../domain/types/document/domain-provider.type';
|
|
4
5
|
import { EndgeDocumentServerState, EndgeLiveDomainSnapshot } from '../../../domain/types/document/domain-snapshot.type';
|
|
5
6
|
import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
|
|
@@ -31,6 +32,8 @@ export declare class EndgeDomainRepository extends EndgeModule {
|
|
|
31
32
|
deleteDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
32
33
|
restoreDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
33
34
|
changeDocumentFolder(documentId: string | number, documentType: DomainDocumentType, folderIdOrIdentity: string | number | null): Promise<void>;
|
|
35
|
+
/** Атомарно переносит несколько persisted-документов в одну папку. */
|
|
36
|
+
changeDocumentsFolder(documents: readonly EndgeDomainDocumentMove[], folderIdOrIdentity: string | number): Promise<number>;
|
|
34
37
|
saveFolder(folderId: string): Promise<void>;
|
|
35
38
|
deleteFolder(folderIdentity: string): Promise<void>;
|
|
36
39
|
restoreFolder(folderIdentity: string): Promise<void>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DataViewRef, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
|
|
1
|
+
import { DataViewRef, DataViewRunContext, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
|
|
2
2
|
import { DataViewProgramPayload, ProgramArtifact } from '../../../../domain/types/program/program.types';
|
|
3
3
|
import { RDataView } from '../../../../domain/entities/reflect/RDataView';
|
|
4
4
|
/** Модуль выполнения скомпилированных RDataView artifacts. */
|
|
5
5
|
export declare class EndgeDataView {
|
|
6
6
|
/** Выполняет DataView по id/identity/model над переданным input object. */
|
|
7
|
-
run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools
|
|
7
|
+
run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
8
8
|
/** Выполняет уже скомпилированный DataView artifact без поиска в домене. */
|
|
9
|
-
runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools
|
|
9
|
+
runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
10
10
|
/** Выполняет уже скомпилированный DataView payload. */
|
|
11
|
-
runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
|
|
11
|
+
runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
|
|
12
12
|
children?: ProgramArtifact[];
|
|
13
13
|
}): unknown;
|
|
14
14
|
/** Вычисляет object projection один раз над целым DataView input. */
|
|
@@ -16,11 +16,11 @@ export declare class EndgeDataView {
|
|
|
16
16
|
/** Вычисляет root ValueExpression без object projection wrapper. */
|
|
17
17
|
private _runExpression;
|
|
18
18
|
/** Выполняет DataView-ссылку из query/DataView artifact. */
|
|
19
|
-
runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
|
|
19
|
+
runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
|
|
20
20
|
children?: ProgramArtifact[];
|
|
21
21
|
}): unknown;
|
|
22
22
|
/** Выполняет DataView source без записи artifact в `Endge.program`. */
|
|
23
|
-
runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools
|
|
23
|
+
runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
24
24
|
/** Возвращает DataView model из домена или входного экземпляра. */
|
|
25
25
|
private _resolveDataView;
|
|
26
26
|
/** Возвращает compiled artifact, компилируя DataView локально при необходимости. */
|
|
@@ -29,6 +29,8 @@ export declare class EndgeDataView {
|
|
|
29
29
|
private _runManual;
|
|
30
30
|
/** Интерпретирует декларативные pipeline steps без eval. */
|
|
31
31
|
private _runPipeline;
|
|
32
|
+
/** Заполняет отсутствующие props декларативными defaults DataView artifact. */
|
|
33
|
+
private _resolveProps;
|
|
32
34
|
/** Последовательно вычисляет whole-value steps; каждый select получает результат предыдущего. */
|
|
33
35
|
private _runSelectPipeline;
|
|
34
36
|
/** Собирает базовый output для map step из spread-источников. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthRequestPolicy, AuthResolvedSession, AuthResolveOptions } from '../../../../domain/types/auth/auth-profile.types';
|
|
2
2
|
import { AuthProfileRegistry } from './AuthProfileRegistry';
|
|
3
3
|
import { AuthSessionManager } from './AuthSessionManager';
|
|
4
|
-
/** Разрешает auth policy запроса без изменения
|
|
4
|
+
/** Разрешает auth policy запроса без изменения sessions других profiles. */
|
|
5
5
|
export declare class AuthRequestResolver {
|
|
6
6
|
private readonly _profiles;
|
|
7
7
|
private readonly _sessions;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AuthEnsureOptions, AuthLoginCredentials, AuthProfileSchema, AuthResolvedSession, AuthTokenSet, EndgeAuthContext } from '../../../../domain/types/auth/auth-profile.types';
|
|
1
|
+
import { AuthEnsureOptions, AuthLoginCredentials, AuthProfileSchema, AuthResolvedSession, AuthSessionSource, AuthTokenSet, EndgeAuthContext } from '../../../../domain/types/auth/auth-profile.types';
|
|
2
2
|
import { AuthAdapterRegistry } from './AuthAdapterRegistry';
|
|
3
3
|
import { AuthProfileRegistry } from './AuthProfileRegistry';
|
|
4
4
|
import { AuthSessionStore } from './AuthSessionStore';
|
|
5
5
|
interface AuthSessionManagerDependencies {
|
|
6
6
|
getWorkspaceIdentity: () => string;
|
|
7
|
-
|
|
7
|
+
onSessionChange: () => void;
|
|
8
8
|
now?: () => number;
|
|
9
9
|
}
|
|
10
|
-
/** Владеет
|
|
10
|
+
/** Владеет изолированными sessions runtime auth profiles. */
|
|
11
11
|
export declare class AuthSessionManager {
|
|
12
12
|
private readonly _profiles;
|
|
13
13
|
private readonly _adapters;
|
|
@@ -15,35 +15,36 @@ export declare class AuthSessionManager {
|
|
|
15
15
|
private readonly _dependencies;
|
|
16
16
|
private readonly _states;
|
|
17
17
|
private readonly _operations;
|
|
18
|
+
private readonly _sources;
|
|
18
19
|
private readonly _now;
|
|
19
|
-
private
|
|
20
|
+
private _defaultProfile;
|
|
20
21
|
constructor(_profiles: AuthProfileRegistry, _adapters: AuthAdapterRegistry, _store: AuthSessionStore, _dependencies: AuthSessionManagerDependencies);
|
|
21
|
-
/** Identity
|
|
22
|
+
/** Identity default runtime profile. */
|
|
22
23
|
get profileIdentity(): string | null;
|
|
23
|
-
/**
|
|
24
|
-
getApplicationProfile(): AuthProfileSchema | null;
|
|
25
|
-
/** Показывает наличие действующей application session. */
|
|
24
|
+
/** Показывает наличие действующей session default runtime profile. */
|
|
26
25
|
get isAuthenticated(): boolean;
|
|
27
26
|
/** Безопасный actor/session context без tokens. */
|
|
28
27
|
get context(): EndgeAuthContext;
|
|
29
|
-
/** Claims
|
|
28
|
+
/** Claims default profile session только для presentation, не для authorization decisions. */
|
|
30
29
|
get claims(): Record<string, unknown>;
|
|
31
|
-
/** Загруженный OIDC userinfo
|
|
30
|
+
/** Загруженный OIDC userinfo default profile session. */
|
|
32
31
|
get userInfo(): Record<string, unknown> | null;
|
|
33
|
-
/** Выбирает default
|
|
32
|
+
/** Выбирает default runtime profile и восстанавливает его snapshot. */
|
|
34
33
|
configureDefault(profile: AuthProfileSchema | null): void;
|
|
35
|
-
/**
|
|
34
|
+
/** Подключает host-owned session source и запрещает смешивание с persisted snapshot profile. */
|
|
35
|
+
connect(profileIdentity: string, source: AuthSessionSource): void;
|
|
36
|
+
/** Выполняет interactive login default runtime profile. */
|
|
36
37
|
login(credentials: AuthLoginCredentials): Promise<void>;
|
|
37
|
-
/** Входит в указанный Keycloak profile
|
|
38
|
+
/** Входит в указанный Keycloak profile, не меняя default profile. */
|
|
38
39
|
loginWithProfile(profileIdentity: string, credentials: AuthLoginCredentials): Promise<void>;
|
|
39
40
|
private _loginWithProfile;
|
|
40
|
-
/** Гарантирует действующую
|
|
41
|
+
/** Гарантирует действующую session default runtime profile. */
|
|
41
42
|
ensureValid(options?: AuthEnsureOptions): Promise<boolean>;
|
|
42
|
-
/** Загружает userinfo для
|
|
43
|
+
/** Загружает userinfo для session default runtime profile. */
|
|
43
44
|
ensureUserInfo(): Promise<Record<string, unknown> | null>;
|
|
44
|
-
/** Завершает
|
|
45
|
+
/** Завершает session default runtime profile и всегда очищает local snapshot. */
|
|
45
46
|
logout(): Promise<void>;
|
|
46
|
-
/** Гарантирует session указанного profile, не меняя
|
|
47
|
+
/** Гарантирует session указанного profile, не меняя default profile. */
|
|
47
48
|
ensureProfile(profileInput: AuthProfileSchema, options?: AuthEnsureOptions): Promise<AuthTokenSet | null>;
|
|
48
49
|
/** Преобразует token set в transport-neutral request session. */
|
|
49
50
|
toResolvedSession(profile: AuthProfileSchema, token: AuthTokenSet): AuthResolvedSession;
|
|
@@ -53,9 +54,10 @@ export declare class AuthSessionManager {
|
|
|
53
54
|
private _authenticate;
|
|
54
55
|
private _setState;
|
|
55
56
|
private _clearState;
|
|
56
|
-
private
|
|
57
|
+
private _defaultState;
|
|
57
58
|
private _isAccessTokenUsable;
|
|
58
59
|
private _isAccessTokenFresh;
|
|
60
|
+
private _refreshSkewMs;
|
|
59
61
|
private _isRefreshExpired;
|
|
60
62
|
private _workspaceIdentity;
|
|
61
63
|
private _singleFlight;
|
|
@@ -4,7 +4,7 @@ import { AuthAdapterRegistry } from './auth/AuthAdapterRegistry';
|
|
|
4
4
|
import { AuthProfileRegistry } from './auth/AuthProfileRegistry';
|
|
5
5
|
import { AuthRequestResolver } from './auth/AuthRequestResolver';
|
|
6
6
|
import { AuthSessionManager } from './auth/AuthSessionManager';
|
|
7
|
-
/** Единый lifecycle owner
|
|
7
|
+
/** Единый lifecycle owner runtime auth profile sessions и request authentication. */
|
|
8
8
|
export declare class EndgeAuth extends EndgeModule {
|
|
9
9
|
readonly adapters: AuthAdapterRegistry;
|
|
10
10
|
readonly profiles: AuthProfileRegistry;
|
|
@@ -20,7 +20,7 @@ export declare class EndgeAuth extends EndgeModule {
|
|
|
20
20
|
constructor();
|
|
21
21
|
/** Подключает host credential port и безопасные context providers. */
|
|
22
22
|
setup(ctx: EndgeBootContext): void;
|
|
23
|
-
/** Валидирует Domain profiles и восстанавливает default
|
|
23
|
+
/** Валидирует Domain profiles и восстанавливает session default runtime profile. */
|
|
24
24
|
build(): void;
|
|
25
25
|
/** Сбрасывает runtime state, не удаляя persisted browser session. */
|
|
26
26
|
reset(): void;
|