@stndrds/schema 0.1.0-alpha.17 → 0.1.0-alpha.19
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/chunk-2PBQNUTS.mjs +7400 -0
- package/dist/chunk-4D476S25.mjs +7713 -0
- package/dist/chunk-BKOV4XVX.mjs +8816 -0
- package/dist/chunk-CWPOGEK2.mjs +7707 -0
- package/dist/chunk-DPOXIK3M.mjs +8816 -0
- package/dist/chunk-DU2HLOQH.mjs +8813 -0
- package/dist/chunk-EWNSOD22.mjs +7707 -0
- package/dist/chunk-JD2MVLTW.mjs +8814 -0
- package/dist/chunk-KZSM5546.mjs +7706 -0
- package/dist/chunk-L7AQ7SZC.mjs +7432 -0
- package/dist/chunk-LZW2MI43.mjs +7404 -0
- package/dist/chunk-SD2UXOSF.mjs +8814 -0
- package/dist/chunk-V5QXU2OK.mjs +82 -0
- package/dist/chunk-XMGMXAHW.mjs +7706 -0
- package/dist/chunk-YLVZT3H4.mjs +8793 -0
- package/dist/default-roles-AKWIWTLE.mjs +20 -0
- package/dist/index.d.mts +127 -8
- package/dist/index.d.ts +127 -8
- package/dist/index.js +1787 -182
- package/dist/index.mjs +90 -3
- package/dist/runtime-CPggQqoW.d.mts +6428 -0
- package/dist/runtime-CPggQqoW.d.ts +6428 -0
- package/dist/runtime-DSMMZRLE.d.mts +6430 -0
- package/dist/runtime-DSMMZRLE.d.ts +6430 -0
- package/dist/runtime-DWhSpnn4.d.mts +5256 -0
- package/dist/runtime-DWhSpnn4.d.ts +5256 -0
- package/dist/runtime-Dw2exb5q.d.mts +5601 -0
- package/dist/runtime-Dw2exb5q.d.ts +5601 -0
- package/dist/runtime-DySuNV6Y.d.mts +5245 -0
- package/dist/runtime-DySuNV6Y.d.ts +5245 -0
- package/dist/runtime-DzdsFCyL.d.mts +5601 -0
- package/dist/runtime-DzdsFCyL.d.ts +5601 -0
- package/dist/runtime-uXhTgSIx.d.mts +5260 -0
- package/dist/runtime-uXhTgSIx.d.ts +5260 -0
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1520 -59
- package/dist/runtime.mjs +59 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
GeocodingService,
|
|
17
17
|
GlobalSearchService,
|
|
18
18
|
GroupBuilder,
|
|
19
|
+
InvalidPathError,
|
|
20
|
+
MaxDepthExceededError,
|
|
19
21
|
NoopGeocodingAdapter,
|
|
20
22
|
NoopHookRegistry,
|
|
21
23
|
NotFoundError,
|
|
@@ -30,8 +32,11 @@ import {
|
|
|
30
32
|
RecordNotFoundError,
|
|
31
33
|
RecordReferencedError,
|
|
32
34
|
RecordService,
|
|
35
|
+
RelationResolverService,
|
|
33
36
|
RelationService,
|
|
34
37
|
RoleNotFoundError,
|
|
38
|
+
RollupScheduler,
|
|
39
|
+
RollupService,
|
|
35
40
|
SchemaError,
|
|
36
41
|
SchemaErrorCode,
|
|
37
42
|
SyncError,
|
|
@@ -39,6 +44,7 @@ import {
|
|
|
39
44
|
TableTabConfig,
|
|
40
45
|
UserProfileNotFoundError,
|
|
41
46
|
UserProfileService,
|
|
47
|
+
UserService,
|
|
42
48
|
ValidationError,
|
|
43
49
|
ViewBuilder,
|
|
44
50
|
ViewService,
|
|
@@ -53,6 +59,7 @@ import {
|
|
|
53
59
|
createDateValidator,
|
|
54
60
|
createDraftValidator,
|
|
55
61
|
createFileValidator,
|
|
62
|
+
createFormulaValidator,
|
|
56
63
|
createLocationValidator,
|
|
57
64
|
createMockAdapter,
|
|
58
65
|
createMultiRelationValidator,
|
|
@@ -62,6 +69,8 @@ import {
|
|
|
62
69
|
createPhoneValidator,
|
|
63
70
|
createRatingValidator,
|
|
64
71
|
createRelationValidator,
|
|
72
|
+
createRollupHooks,
|
|
73
|
+
createRollupValidator,
|
|
65
74
|
createSelectValidator,
|
|
66
75
|
createSingleRelationValidator,
|
|
67
76
|
createStatusValidator,
|
|
@@ -73,18 +82,34 @@ import {
|
|
|
73
82
|
date,
|
|
74
83
|
dateConfigSchema,
|
|
75
84
|
enrichValuesWithSelectLabels,
|
|
85
|
+
evaluateFormula,
|
|
86
|
+
evaluateFormulaAttribute,
|
|
87
|
+
evaluateFormulaAttributeWithRelations,
|
|
88
|
+
evaluateFormulaWithRelations,
|
|
89
|
+
evaluateFormulaWithResult,
|
|
76
90
|
extractAttributeNames,
|
|
91
|
+
extractFormulaVariables,
|
|
92
|
+
extractRelationNames,
|
|
93
|
+
extractRelationReferences,
|
|
77
94
|
file,
|
|
78
95
|
fileConfigSchema,
|
|
96
|
+
flattenRelationsForEval,
|
|
79
97
|
flow,
|
|
80
98
|
formatAttributeValue,
|
|
99
|
+
formatFormulaResult,
|
|
100
|
+
formula,
|
|
101
|
+
formulaConfigSchema,
|
|
81
102
|
generateId,
|
|
82
103
|
generatePrefixedId,
|
|
83
104
|
getAttributeConfigSchema,
|
|
84
105
|
getMissingRequiredAttributes,
|
|
106
|
+
getPathDepth,
|
|
107
|
+
getRelationPath,
|
|
85
108
|
getSyncPreview,
|
|
109
|
+
getTargetAttributeName,
|
|
86
110
|
getViewSyncPreview,
|
|
87
111
|
group,
|
|
112
|
+
hasRelationReferences,
|
|
88
113
|
isForbiddenError,
|
|
89
114
|
isLabelExpression,
|
|
90
115
|
isNotFoundError,
|
|
@@ -100,14 +125,21 @@ import {
|
|
|
100
125
|
numberConfigSchema,
|
|
101
126
|
object,
|
|
102
127
|
parseAttributeConfig,
|
|
128
|
+
parsePath,
|
|
129
|
+
pathHasManyCardinality,
|
|
103
130
|
phone,
|
|
104
131
|
phoneConfigSchema,
|
|
105
132
|
rating,
|
|
106
133
|
ratingConfigSchema,
|
|
134
|
+
registerAllRollupHooks,
|
|
107
135
|
registry,
|
|
108
136
|
relation,
|
|
109
137
|
relationConfigSchema,
|
|
110
138
|
renderLabelExpression,
|
|
139
|
+
resolveMultiplePaths,
|
|
140
|
+
resolveSingleValue,
|
|
141
|
+
rollup,
|
|
142
|
+
rollupConfigSchema,
|
|
111
143
|
safeParseAttributeConfig,
|
|
112
144
|
select,
|
|
113
145
|
selectConfigSchema,
|
|
@@ -122,18 +154,21 @@ import {
|
|
|
122
154
|
textareaConfigSchema,
|
|
123
155
|
timestamp,
|
|
124
156
|
timestampConfigSchema,
|
|
157
|
+
traversePath,
|
|
125
158
|
user,
|
|
126
159
|
userConfigSchema,
|
|
127
160
|
validateAttribute,
|
|
128
161
|
validateAttributeConfig,
|
|
129
162
|
validateDraft,
|
|
130
163
|
validateDraftOrThrow,
|
|
164
|
+
validateFormulaExpression,
|
|
131
165
|
validateObject,
|
|
132
166
|
validateObjectOrThrow,
|
|
167
|
+
validatePath,
|
|
133
168
|
verifyNativeObjectsSync,
|
|
134
169
|
verifyNativeViewsSync,
|
|
135
170
|
view
|
|
136
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-JD2MVLTW.mjs";
|
|
137
172
|
import {
|
|
138
173
|
ALL_SYSTEM_RESOURCES,
|
|
139
174
|
DEFAULT_ROLES,
|
|
@@ -143,7 +178,7 @@ import {
|
|
|
143
178
|
SYSTEM_RESOURCES,
|
|
144
179
|
SYSTEM_RESOURCE_LABELS,
|
|
145
180
|
isDefaultRole
|
|
146
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-V5QXU2OK.mjs";
|
|
147
182
|
|
|
148
183
|
// src/types/filters.ts
|
|
149
184
|
function isAdvancedFilterState(state) {
|
|
@@ -228,7 +263,24 @@ var OPERATORS_BY_TYPE = {
|
|
|
228
263
|
file: ["is_empty", "is_not_empty"],
|
|
229
264
|
user: ["contains", "not_contains", "is_empty", "is_not_empty"],
|
|
230
265
|
relation: ["any_of", "none_of", "contains", "not_contains", "is_empty", "is_not_empty"],
|
|
231
|
-
rating: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"]
|
|
266
|
+
rating: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"],
|
|
267
|
+
// Formula: operators depend on returnType, but we provide a general set
|
|
268
|
+
formula: [
|
|
269
|
+
"is",
|
|
270
|
+
"is_not",
|
|
271
|
+
"eq",
|
|
272
|
+
"neq",
|
|
273
|
+
"lt",
|
|
274
|
+
"gt",
|
|
275
|
+
"lte",
|
|
276
|
+
"gte",
|
|
277
|
+
"contains",
|
|
278
|
+
"not_contains",
|
|
279
|
+
"is_empty",
|
|
280
|
+
"is_not_empty"
|
|
281
|
+
],
|
|
282
|
+
// Rollup: typically numeric aggregations
|
|
283
|
+
rollup: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"]
|
|
232
284
|
};
|
|
233
285
|
var NO_VALUE_OPERATORS = [
|
|
234
286
|
"is_empty",
|
|
@@ -425,6 +477,8 @@ export {
|
|
|
425
477
|
GeocodingService,
|
|
426
478
|
GlobalSearchService,
|
|
427
479
|
GroupBuilder,
|
|
480
|
+
InvalidPathError,
|
|
481
|
+
MaxDepthExceededError,
|
|
428
482
|
NO_VALUE_OPERATORS,
|
|
429
483
|
NoopGeocodingAdapter,
|
|
430
484
|
NoopHookRegistry,
|
|
@@ -441,8 +495,11 @@ export {
|
|
|
441
495
|
RecordNotFoundError,
|
|
442
496
|
RecordReferencedError,
|
|
443
497
|
RecordService,
|
|
498
|
+
RelationResolverService,
|
|
444
499
|
RelationService,
|
|
445
500
|
RoleNotFoundError,
|
|
501
|
+
RollupScheduler,
|
|
502
|
+
RollupService,
|
|
446
503
|
SYSTEM_RESOURCES,
|
|
447
504
|
SYSTEM_RESOURCE_LABELS,
|
|
448
505
|
SchemaError,
|
|
@@ -452,6 +509,7 @@ export {
|
|
|
452
509
|
TableTabConfig,
|
|
453
510
|
UserProfileNotFoundError,
|
|
454
511
|
UserProfileService,
|
|
512
|
+
UserService,
|
|
455
513
|
ValidationError,
|
|
456
514
|
ViewBuilder,
|
|
457
515
|
ViewService,
|
|
@@ -466,6 +524,7 @@ export {
|
|
|
466
524
|
createDateValidator,
|
|
467
525
|
createDraftValidator,
|
|
468
526
|
createFileValidator,
|
|
527
|
+
createFormulaValidator,
|
|
469
528
|
createLocationValidator,
|
|
470
529
|
createMockAdapter,
|
|
471
530
|
createMultiRelationValidator,
|
|
@@ -475,6 +534,8 @@ export {
|
|
|
475
534
|
createPhoneValidator,
|
|
476
535
|
createRatingValidator,
|
|
477
536
|
createRelationValidator,
|
|
537
|
+
createRollupHooks,
|
|
538
|
+
createRollupValidator,
|
|
478
539
|
createSelectValidator,
|
|
479
540
|
createSingleRelationValidator,
|
|
480
541
|
createStatusValidator,
|
|
@@ -486,18 +547,34 @@ export {
|
|
|
486
547
|
date,
|
|
487
548
|
dateConfigSchema,
|
|
488
549
|
enrichValuesWithSelectLabels,
|
|
550
|
+
evaluateFormula,
|
|
551
|
+
evaluateFormulaAttribute,
|
|
552
|
+
evaluateFormulaAttributeWithRelations,
|
|
553
|
+
evaluateFormulaWithRelations,
|
|
554
|
+
evaluateFormulaWithResult,
|
|
489
555
|
extractAttributeNames,
|
|
556
|
+
extractFormulaVariables,
|
|
557
|
+
extractRelationNames,
|
|
558
|
+
extractRelationReferences,
|
|
490
559
|
file,
|
|
491
560
|
fileConfigSchema,
|
|
561
|
+
flattenRelationsForEval,
|
|
492
562
|
flow,
|
|
493
563
|
formatAttributeValue,
|
|
564
|
+
formatFormulaResult,
|
|
565
|
+
formula,
|
|
566
|
+
formulaConfigSchema,
|
|
494
567
|
generateId,
|
|
495
568
|
generatePrefixedId,
|
|
496
569
|
getAttributeConfigSchema,
|
|
497
570
|
getMissingRequiredAttributes,
|
|
571
|
+
getPathDepth,
|
|
572
|
+
getRelationPath,
|
|
498
573
|
getSyncPreview,
|
|
574
|
+
getTargetAttributeName,
|
|
499
575
|
getViewSyncPreview,
|
|
500
576
|
group,
|
|
577
|
+
hasRelationReferences,
|
|
501
578
|
isActivityTab,
|
|
502
579
|
isAdvancedFilterState,
|
|
503
580
|
isCustomTab,
|
|
@@ -523,14 +600,21 @@ export {
|
|
|
523
600
|
numberConfigSchema,
|
|
524
601
|
object,
|
|
525
602
|
parseAttributeConfig,
|
|
603
|
+
parsePath,
|
|
604
|
+
pathHasManyCardinality,
|
|
526
605
|
phone,
|
|
527
606
|
phoneConfigSchema,
|
|
528
607
|
rating,
|
|
529
608
|
ratingConfigSchema,
|
|
609
|
+
registerAllRollupHooks,
|
|
530
610
|
registry,
|
|
531
611
|
relation,
|
|
532
612
|
relationConfigSchema,
|
|
533
613
|
renderLabelExpression,
|
|
614
|
+
resolveMultiplePaths,
|
|
615
|
+
resolveSingleValue,
|
|
616
|
+
rollup,
|
|
617
|
+
rollupConfigSchema,
|
|
534
618
|
safeParseAttributeConfig,
|
|
535
619
|
select,
|
|
536
620
|
selectConfigSchema,
|
|
@@ -547,14 +631,17 @@ export {
|
|
|
547
631
|
timestampConfigSchema,
|
|
548
632
|
toAdvancedFilterState,
|
|
549
633
|
toSimpleFilterState,
|
|
634
|
+
traversePath,
|
|
550
635
|
user,
|
|
551
636
|
userConfigSchema,
|
|
552
637
|
validateAttribute,
|
|
553
638
|
validateAttributeConfig,
|
|
554
639
|
validateDraft,
|
|
555
640
|
validateDraftOrThrow,
|
|
641
|
+
validateFormulaExpression,
|
|
556
642
|
validateObject,
|
|
557
643
|
validateObjectOrThrow,
|
|
644
|
+
validatePath,
|
|
558
645
|
verifyNativeObjectsSync,
|
|
559
646
|
verifyNativeViewsSync,
|
|
560
647
|
view,
|