@stndrds/schema 1.0.0-alpha.168 → 1.0.0-alpha.170
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/{filters-zzsF0GxK.d.ts → filters-B2cCCbDq.d.ts} +7 -4
- package/dist/{filters-DRXk4dLI.d.mts → filters-B9Pjped4.d.mts} +7 -4
- package/dist/{helpers-BTuRte-r.d.mts → helpers-YWZowk1B.d.mts} +3 -3
- package/dist/{helpers-D3nsZLoE.d.ts → helpers-icxxQQJQ.d.ts} +3 -3
- package/dist/index.d.mts +91 -21
- package/dist/index.d.ts +91 -21
- package/dist/index.js +102 -68
- package/dist/index.mjs +98 -70
- package/dist/{types-Bemfgle3.d.ts → types-DGGecyHV.d.ts} +1 -1
- package/dist/{types-DxEobsMy.d.mts → types-DqpxKOcD.d.mts} +1 -1
- package/dist/validation/all.d.mts +3 -3
- package/dist/validation/all.d.ts +3 -3
- package/dist/validation/all.js +4 -0
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/file.d.mts +2 -2
- package/dist/validation/complex/file.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +3 -3
- package/dist/validation/object/index.d.ts +3 -3
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/rating.d.mts +2 -2
- package/dist/validation/primitives/rating.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY
|
|
|
3
3
|
import './chunk-SP3PNHYF.mjs';
|
|
4
4
|
export { parseAttributeConfig } from './chunk-SS2NR6DH.mjs';
|
|
5
5
|
import { createObjectValidator, createAttributeValidator } from './chunk-6JEQE4IP.mjs';
|
|
6
|
-
export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-6JEQE4IP.mjs';
|
|
6
|
+
export { computeRecordStatus, createFormAttributeValidator, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-6JEQE4IP.mjs';
|
|
7
7
|
import './chunk-TMYBEXBT.mjs';
|
|
8
8
|
import './chunk-4KRLCWJM.mjs';
|
|
9
9
|
import './chunk-KNYZH2WD.mjs';
|
|
@@ -744,6 +744,33 @@ function validateSlotAgainstConfig(slotName, mimeType, slots) {
|
|
|
744
744
|
}
|
|
745
745
|
return slot;
|
|
746
746
|
}
|
|
747
|
+
|
|
748
|
+
// src/lib/qualify-with.ts
|
|
749
|
+
var ALLOWED_PROPERTY_TYPES = Object.freeze([
|
|
750
|
+
"text",
|
|
751
|
+
"textarea",
|
|
752
|
+
"number",
|
|
753
|
+
"checkbox",
|
|
754
|
+
"date",
|
|
755
|
+
"phone",
|
|
756
|
+
"currency",
|
|
757
|
+
"status",
|
|
758
|
+
"select",
|
|
759
|
+
"multiselect",
|
|
760
|
+
"rating",
|
|
761
|
+
"location"
|
|
762
|
+
]);
|
|
763
|
+
function buildPropertySchema(builders) {
|
|
764
|
+
const definitions = [];
|
|
765
|
+
for (const builder of builders) {
|
|
766
|
+
const attr = builder.build();
|
|
767
|
+
if (!ALLOWED_PROPERTY_TYPES.includes(attr.type)) {
|
|
768
|
+
throw new Error(`Property type "${attr.type}" is not supported in .qualifyWith()`);
|
|
769
|
+
}
|
|
770
|
+
definitions.push(attr);
|
|
771
|
+
}
|
|
772
|
+
return { definitions };
|
|
773
|
+
}
|
|
747
774
|
var EMPTY_VALUE_PLACEHOLDER = "\u2014";
|
|
748
775
|
function formatText(value) {
|
|
749
776
|
return String(value);
|
|
@@ -1259,15 +1286,6 @@ function validateOptions(options, attributeName) {
|
|
|
1259
1286
|
}
|
|
1260
1287
|
|
|
1261
1288
|
// src/builders/attribute-builders.ts
|
|
1262
|
-
var FORBIDDEN_PROPERTY_TYPES = [
|
|
1263
|
-
"formula",
|
|
1264
|
-
"rollup",
|
|
1265
|
-
"relation",
|
|
1266
|
-
"file",
|
|
1267
|
-
"user",
|
|
1268
|
-
"document",
|
|
1269
|
-
"richtext"
|
|
1270
|
-
];
|
|
1271
1289
|
function asMutableArray(arr) {
|
|
1272
1290
|
return arr;
|
|
1273
1291
|
}
|
|
@@ -1875,14 +1893,7 @@ var BaseRelationAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1875
1893
|
'.qualifyWith() must be called AFTER .to(). Example: relation({ name: "companies" }).to("companies").qualifyWith(...)'
|
|
1876
1894
|
);
|
|
1877
1895
|
}
|
|
1878
|
-
|
|
1879
|
-
const attr = builder.build();
|
|
1880
|
-
if (FORBIDDEN_PROPERTY_TYPES.includes(attr.type)) {
|
|
1881
|
-
throw new Error(`Property type "${attr.type}" is not supported in .qualifyWith()`);
|
|
1882
|
-
}
|
|
1883
|
-
return attr;
|
|
1884
|
-
});
|
|
1885
|
-
this.attr.properties = { definitions };
|
|
1896
|
+
this.attr.properties = buildPropertySchema(builders);
|
|
1886
1897
|
return this;
|
|
1887
1898
|
}
|
|
1888
1899
|
/**
|
|
@@ -2136,7 +2147,7 @@ var DocumentAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2136
2147
|
}
|
|
2137
2148
|
/**
|
|
2138
2149
|
* Allow multiple documents.
|
|
2139
|
-
* Value becomes string[] instead of string.
|
|
2150
|
+
* Value becomes string[] instead of string (or Array<{ id; props }> when qualified).
|
|
2140
2151
|
*/
|
|
2141
2152
|
multiple() {
|
|
2142
2153
|
this.attr.multiple = true;
|
|
@@ -2180,6 +2191,24 @@ var DocumentAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2180
2191
|
this.attr.attributes = [...this.attr.attributes, builder.build()];
|
|
2181
2192
|
return this;
|
|
2182
2193
|
}
|
|
2194
|
+
/**
|
|
2195
|
+
* Add properties to qualify each document using existing attribute builders.
|
|
2196
|
+
* Returns a new builder type that carries the inferred props shape for $infer.
|
|
2197
|
+
*
|
|
2198
|
+
* @example
|
|
2199
|
+
* document({ name: "contracts", label: "Contracts" })
|
|
2200
|
+
* .multiple()
|
|
2201
|
+
* .qualifyWith(
|
|
2202
|
+
* select({ name: "kind", label: "Kind" }).options([...]),
|
|
2203
|
+
* number({ name: "amount", label: "Amount" }).min(0),
|
|
2204
|
+
* )
|
|
2205
|
+
*/
|
|
2206
|
+
qualifyWith(...builders) {
|
|
2207
|
+
this.attr.properties = buildPropertySchema(
|
|
2208
|
+
builders
|
|
2209
|
+
);
|
|
2210
|
+
return this;
|
|
2211
|
+
}
|
|
2183
2212
|
/**
|
|
2184
2213
|
* Mark this attribute as required.
|
|
2185
2214
|
*/
|
|
@@ -3002,6 +3031,35 @@ var RelationGroupBuilder = class {
|
|
|
3002
3031
|
return this.data;
|
|
3003
3032
|
}
|
|
3004
3033
|
};
|
|
3034
|
+
function assertViewVersion(version) {
|
|
3035
|
+
if (version < 1) throw new Error("View version must be >= 1");
|
|
3036
|
+
}
|
|
3037
|
+
function assertUniqueBy(items, getKey, buildError) {
|
|
3038
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3039
|
+
for (const item of items) {
|
|
3040
|
+
const key = getKey(item);
|
|
3041
|
+
if (seen.has(key)) {
|
|
3042
|
+
throw new Error(buildError(key));
|
|
3043
|
+
}
|
|
3044
|
+
seen.add(key);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
function validateViewName(name, builderName, examples) {
|
|
3048
|
+
const viewNameSchema = z.string().min(1, "View name cannot be empty").max(63, "View name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/, {
|
|
3049
|
+
message: `Invalid view name format.
|
|
3050
|
+
Name must be in kebab-case:
|
|
3051
|
+
\u2705 Valid: ${examples.valid}
|
|
3052
|
+
\u274C Invalid: ${examples.invalid}`
|
|
3053
|
+
});
|
|
3054
|
+
try {
|
|
3055
|
+
viewNameSchema.parse(name);
|
|
3056
|
+
} catch (error) {
|
|
3057
|
+
if (error instanceof z.ZodError) {
|
|
3058
|
+
throw new Error(`[${builderName}] ${error.issues[0].message}`);
|
|
3059
|
+
}
|
|
3060
|
+
throw error;
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3005
3063
|
var TableTabConfig = class {
|
|
3006
3064
|
/** @internal */
|
|
3007
3065
|
constructor(view, tabData) {
|
|
@@ -3412,7 +3470,10 @@ var TabBuilder = class {
|
|
|
3412
3470
|
var DetailViewBuilder = class {
|
|
3413
3471
|
constructor(name, label) {
|
|
3414
3472
|
this._version = 1;
|
|
3415
|
-
|
|
3473
|
+
validateViewName(name, "DetailViewBuilder", {
|
|
3474
|
+
valid: "'detail', 'list-view', 'company-detail'",
|
|
3475
|
+
invalid: "'Detail', 'listView', 'list_view'"
|
|
3476
|
+
});
|
|
3416
3477
|
this.data = {
|
|
3417
3478
|
name,
|
|
3418
3479
|
label,
|
|
@@ -3480,7 +3541,7 @@ var DetailViewBuilder = class {
|
|
|
3480
3541
|
* @default 1
|
|
3481
3542
|
*/
|
|
3482
3543
|
version(v) {
|
|
3483
|
-
|
|
3544
|
+
assertViewVersion(v);
|
|
3484
3545
|
this._version = v;
|
|
3485
3546
|
return this;
|
|
3486
3547
|
}
|
|
@@ -3524,13 +3585,11 @@ var DetailViewBuilder = class {
|
|
|
3524
3585
|
if (this.data.tabs.length === 0) {
|
|
3525
3586
|
throw new Error("[DetailViewBuilder] At least one tab is required");
|
|
3526
3587
|
}
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
tabNames.add(tab.name);
|
|
3533
|
-
}
|
|
3588
|
+
assertUniqueBy(
|
|
3589
|
+
this.data.tabs,
|
|
3590
|
+
(tab) => tab.name,
|
|
3591
|
+
(name) => `[DetailViewBuilder] Duplicate tab name "${name}"`
|
|
3592
|
+
);
|
|
3534
3593
|
if (this.data.layout === "modal") {
|
|
3535
3594
|
if (this.data.tabs.length !== 1) {
|
|
3536
3595
|
throw new Error("[DetailViewBuilder] Modal views must have exactly one tab");
|
|
@@ -3560,22 +3619,6 @@ var DetailViewBuilder = class {
|
|
|
3560
3619
|
schema_version: this._version
|
|
3561
3620
|
};
|
|
3562
3621
|
}
|
|
3563
|
-
/**
|
|
3564
|
-
* Validate view name format (kebab-case)
|
|
3565
|
-
*/
|
|
3566
|
-
validateName(name) {
|
|
3567
|
-
const viewNameSchema = z.string().min(1, "View name cannot be empty").max(63, "View name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/, {
|
|
3568
|
-
message: "Invalid view name format.\nName must be in kebab-case:\n \u2705 Valid: 'detail', 'list-view', 'company-detail'\n \u274C Invalid: 'Detail', 'listView', 'list_view'"
|
|
3569
|
-
});
|
|
3570
|
-
try {
|
|
3571
|
-
viewNameSchema.parse(name);
|
|
3572
|
-
} catch (error) {
|
|
3573
|
-
if (error instanceof z.ZodError) {
|
|
3574
|
-
throw new Error(`[DetailViewBuilder] ${error.issues[0].message}`);
|
|
3575
|
-
}
|
|
3576
|
-
throw error;
|
|
3577
|
-
}
|
|
3578
|
-
}
|
|
3579
3622
|
};
|
|
3580
3623
|
function detailView(name, label) {
|
|
3581
3624
|
return new DetailViewBuilder(name, label);
|
|
@@ -3583,7 +3626,10 @@ function detailView(name, label) {
|
|
|
3583
3626
|
var ListViewBuilder = class {
|
|
3584
3627
|
constructor(name, label) {
|
|
3585
3628
|
this._version = 1;
|
|
3586
|
-
|
|
3629
|
+
validateViewName(name, "ListViewBuilder", {
|
|
3630
|
+
valid: "'default', 'list-view', 'active-contacts'",
|
|
3631
|
+
invalid: "'Default', 'listView', 'list_view'"
|
|
3632
|
+
});
|
|
3587
3633
|
this.data = {
|
|
3588
3634
|
name,
|
|
3589
3635
|
label,
|
|
@@ -3633,7 +3679,7 @@ var ListViewBuilder = class {
|
|
|
3633
3679
|
* @default 1
|
|
3634
3680
|
*/
|
|
3635
3681
|
version(v) {
|
|
3636
|
-
|
|
3682
|
+
assertViewVersion(v);
|
|
3637
3683
|
this._version = v;
|
|
3638
3684
|
return this;
|
|
3639
3685
|
}
|
|
@@ -3675,13 +3721,11 @@ var ListViewBuilder = class {
|
|
|
3675
3721
|
if (this.data.tabs.length === 0) {
|
|
3676
3722
|
throw new Error("[ListViewBuilder] At least one tab is required");
|
|
3677
3723
|
}
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
tabIds.add(tab.id);
|
|
3684
|
-
}
|
|
3724
|
+
assertUniqueBy(
|
|
3725
|
+
this.data.tabs,
|
|
3726
|
+
(tab) => tab.id,
|
|
3727
|
+
(id) => `[ListViewBuilder] Duplicate tab id "${id}"`
|
|
3728
|
+
);
|
|
3685
3729
|
const defaultTabs = this.data.tabs.filter((t) => t.default);
|
|
3686
3730
|
if (defaultTabs.length > 1) {
|
|
3687
3731
|
throw new Error("[ListViewBuilder] Only one tab can be marked as default");
|
|
@@ -3736,22 +3780,6 @@ var ListViewBuilder = class {
|
|
|
3736
3780
|
schema_version: this._version
|
|
3737
3781
|
};
|
|
3738
3782
|
}
|
|
3739
|
-
/**
|
|
3740
|
-
* Validate view name format (kebab-case)
|
|
3741
|
-
*/
|
|
3742
|
-
validateName(name) {
|
|
3743
|
-
const viewNameSchema = z.string().min(1, "View name cannot be empty").max(63, "View name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/, {
|
|
3744
|
-
message: "Invalid view name format.\nName must be in kebab-case:\n \u2705 Valid: 'default', 'list-view', 'active-contacts'\n \u274C Invalid: 'Default', 'listView', 'list_view'"
|
|
3745
|
-
});
|
|
3746
|
-
try {
|
|
3747
|
-
viewNameSchema.parse(name);
|
|
3748
|
-
} catch (error) {
|
|
3749
|
-
if (error instanceof z.ZodError) {
|
|
3750
|
-
throw new Error(`[ListViewBuilder] ${error.issues[0].message}`);
|
|
3751
|
-
}
|
|
3752
|
-
throw error;
|
|
3753
|
-
}
|
|
3754
|
-
}
|
|
3755
3783
|
};
|
|
3756
3784
|
var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
3757
3785
|
/** @internal */
|
|
@@ -5539,4 +5567,4 @@ function evaluateRule(rule, values, attrByName) {
|
|
|
5539
5567
|
return spec.evaluateInMemory(values[rule.attribute], rule.value, attr);
|
|
5540
5568
|
}
|
|
5541
5569
|
|
|
5542
|
-
export { ALL_ACTIONS, ALL_SYSTEM_RESOURCES, AccessDeniedError, ActivityTabConfig, AttributeInUseError, AttributeNotFoundError, BEHAVIOR_PROPERTIES, ConcurrentModificationError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_DOCUMENT_SLOT, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentSlotValidationError, DocumentsTabConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, ForbiddenError, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, InvalidPathError, ListViewBuilder, ListViewTabConfigBuilder, MaxDepthExceededError, MemoryNotFoundError, NO_VALUE_OPERATORS, NoopGeocodingAdapter, NotFoundError, NotImplementedError, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectNotFoundError, ObjectReferencedError, PRESENTATION_PROPERTIES, PolicyViolationError, ProtectedResourceError, ProtectedRoleError, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RecordNotFoundError, RecordReferencedError, RelationGroupBuilder, RepositoryError, RichtextTabConfig, RoleNotFoundError, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, StorageError, SyncError, TabBuilder, TableTabConfig, USER_STATUSES, ValidationError, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasOptions, hasRelationReferences, inferInverseCardinality, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isUniversalRelation, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateSlotAgainstConfig, viewRegistry };
|
|
5570
|
+
export { ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, AccessDeniedError, ActivityTabConfig, AttributeInUseError, AttributeNotFoundError, BEHAVIOR_PROPERTIES, ConcurrentModificationError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_DOCUMENT_SLOT, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentSlotValidationError, DocumentsTabConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, ForbiddenError, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, InvalidPathError, ListViewBuilder, ListViewTabConfigBuilder, MaxDepthExceededError, MemoryNotFoundError, NO_VALUE_OPERATORS, NoopGeocodingAdapter, NotFoundError, NotImplementedError, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectNotFoundError, ObjectReferencedError, PRESENTATION_PROPERTIES, PolicyViolationError, ProtectedResourceError, ProtectedRoleError, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RecordNotFoundError, RecordReferencedError, RelationGroupBuilder, RepositoryError, RichtextTabConfig, RoleNotFoundError, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, StorageError, SyncError, TabBuilder, TableTabConfig, USER_STATUSES, ValidationError, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasOptions, hasRelationReferences, inferInverseCardinality, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isUniversalRelation, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateSlotAgainstConfig, viewRegistry };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { V as ValidationMessages } from '../types-
|
|
1
|
+
export { V as ValidationMessages } from '../types-DqpxKOcD.mjs';
|
|
2
2
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.mjs';
|
|
3
3
|
export { parseAttributeConfig } from './config/index.mjs';
|
|
4
|
-
export { c as computeRecordStatus, a as createFormAttributeValidator, v as
|
|
5
|
-
import '../filters-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-YWZowk1B.mjs';
|
|
5
|
+
import '../filters-B9Pjped4.mjs';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.mjs';
|
|
8
8
|
import 'zod';
|
package/dist/validation/all.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { V as ValidationMessages } from '../types-
|
|
1
|
+
export { V as ValidationMessages } from '../types-DGGecyHV.js';
|
|
2
2
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.js';
|
|
3
3
|
export { parseAttributeConfig } from './config/index.js';
|
|
4
|
-
export { c as computeRecordStatus, a as createFormAttributeValidator, v as
|
|
5
|
-
import '../filters-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-icxxQQJQ.js';
|
|
5
|
+
import '../filters-B2cCCbDq.js';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.js';
|
|
8
8
|
import 'zod';
|
package/dist/validation/all.js
CHANGED
|
@@ -34,6 +34,10 @@ Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
|
34
34
|
enumerable: true,
|
|
35
35
|
get: function () { return chunk64R5X3DF_js.createFormAttributeValidator; }
|
|
36
36
|
});
|
|
37
|
+
Object.defineProperty(exports, "validateDraft", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunk64R5X3DF_js.validateDraft; }
|
|
40
|
+
});
|
|
37
41
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
38
42
|
enumerable: true,
|
|
39
43
|
get: function () { return chunk64R5X3DF_js.validateDraftOrThrow; }
|
package/dist/validation/all.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../chunk-SP3PNHYF.mjs';
|
|
2
2
|
export { parseAttributeConfig } from '../chunk-SS2NR6DH.mjs';
|
|
3
|
-
export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-6JEQE4IP.mjs';
|
|
3
|
+
export { computeRecordStatus, createFormAttributeValidator, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-6JEQE4IP.mjs';
|
|
4
4
|
import '../chunk-TMYBEXBT.mjs';
|
|
5
5
|
import '../chunk-4KRLCWJM.mjs';
|
|
6
6
|
import '../chunk-KNYZH2WD.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as CurrencyAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { C as CurrencyAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as CurrencyAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { C as CurrencyAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { F as FileAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { F as FileAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { F as FileAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { F as FileAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { L as LocationAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { L as LocationAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { L as LocationAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { L as LocationAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { P as PhoneAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { P as PhoneAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { P as PhoneAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { P as PhoneAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { M as MultiRelationAttribute, R as RelationAttribute, S as SingleRelationAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { M as MultiRelationAttribute, R as RelationAttribute, S as SingleRelationAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { M as MultiRelationAttribute, R as RelationAttribute, S as SingleRelationAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { M as MultiRelationAttribute, R as RelationAttribute, S as SingleRelationAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as RichtextAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { a as RichtextAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as RichtextAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { a as RichtextAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { U as UserAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { U as UserAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { U as UserAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { U as UserAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { e as FormulaAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { e as FormulaAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { e as FormulaAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { e as FormulaAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { f as RollupAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { f as RollupAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { f as RollupAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { f as RollupAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
-
export { a as ValidationResult } from '../../types-
|
|
1
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
2
|
+
export { a as ValidationResult } from '../../types-DqpxKOcD.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import '../../filters-
|
|
4
|
+
import '../../filters-B9Pjped4.mjs';
|
|
5
5
|
import '@stndrds/constants';
|
|
6
6
|
import '../../utils.mjs';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
-
export { a as ValidationResult } from '../../types-
|
|
1
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
2
|
+
export { a as ValidationResult } from '../../types-DGGecyHV.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import '../../filters-
|
|
4
|
+
import '../../filters-B2cCCbDq.js';
|
|
5
5
|
import '@stndrds/constants';
|
|
6
6
|
import '../../utils.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as computeRecordStatus,
|
|
1
|
+
export { c as computeRecordStatus, f as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, h as validateAttribute, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../../helpers-YWZowk1B.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { O as ObjectDefinition } from '../../filters-
|
|
4
|
-
import '../../types-
|
|
3
|
+
import { O as ObjectDefinition } from '../../filters-B9Pjped4.mjs';
|
|
4
|
+
import '../../types-DqpxKOcD.mjs';
|
|
5
5
|
import '@stndrds/constants';
|
|
6
6
|
import '../../utils.mjs';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as computeRecordStatus,
|
|
1
|
+
export { c as computeRecordStatus, f as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, h as validateAttribute, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../../helpers-icxxQQJQ.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { O as ObjectDefinition } from '../../filters-
|
|
4
|
-
import '../../types-
|
|
3
|
+
import { O as ObjectDefinition } from '../../filters-B2cCCbDq.js';
|
|
4
|
+
import '../../types-DGGecyHV.js';
|
|
5
5
|
import '@stndrds/constants';
|
|
6
6
|
import '../../utils.js';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { g as CheckboxAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { g as CheckboxAttribute } from '../../filters-B9Pjped4.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DqpxKOcD.mjs';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { g as CheckboxAttribute } from '../../filters-
|
|
3
|
-
import { V as ValidationMessages } from '../../types-
|
|
2
|
+
import { g as CheckboxAttribute } from '../../filters-B2cCCbDq.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-DGGecyHV.js';
|
|
4
4
|
import '@stndrds/constants';
|
|
5
5
|
import '../../utils.js';
|
|
6
6
|
|