@stndrds/schema 0.1.0-alpha.16 → 0.1.0-alpha.17
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-4D23X5XN.mjs +7257 -0
- package/dist/chunk-6RPWHMTH.mjs +7101 -0
- package/dist/chunk-CMO3JEJL.mjs +7259 -0
- package/dist/chunk-JWRGX3UW.mjs +7265 -0
- package/dist/chunk-OUSLILLE.mjs +7259 -0
- package/dist/chunk-PMJZPJDP.mjs +7265 -0
- package/dist/chunk-YEV46K3M.mjs +7259 -0
- package/dist/index.d.mts +42 -3
- package/dist/index.d.ts +42 -3
- package/dist/index.js +398 -65
- package/dist/index.mjs +11 -1
- package/dist/runtime--rp-TG-h.d.mts +5181 -0
- package/dist/runtime--rp-TG-h.d.ts +5181 -0
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +497 -124
- package/dist/runtime.mjs +3 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime-
|
|
2
|
-
export {
|
|
1
|
+
import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime--rp-TG-h.mjs';
|
|
2
|
+
export { b7 as ActivityTab, cv as AddAttributeInput, an as AdvancedFilterState, aZ as AssignRoleInput, c5 as AttributeChange, w as AttributeGroup, u as AttributeType, ce as AttributesRepository, X as AuditAction, Y as AuditActorType, Z as AuditChange, a0 as AuditListOptions, _ as AuditLogEntry, ck as AuditRepository, W as AuditResourceType, cn as AuditService, a1 as AuditServiceOptions, B as BaseAttribute, a9 as CheckboxFilterOperator, aN as CompletionStatus, $ as CreateAuditLogInput, cu as CreateCustomObjectInput, d4 as CreateDBAttribute, di as CreateDBFlow, d0 as CreateDBObject, de as CreateDBView, a5 as CreateFile, cp as CreateFlowInput, d7 as CreateObjectRecord, aY as CreatePermissionInput, aW as CreateRoleInput, b1 as CreateUserProfile, cL as CreateViewInput, ag as CurrencyFilterValue, b6 as CustomTab, d3 as DBAttribute, dh as DBFlow, c$ as DBObject, dd as DBView, cW as DEFAULT_LABEL_FALLBACK, c4 as DatabaseAdapter, aa as DateFilterOperator, y as DateFormat, z as DateValue, I as DocumentFace, H as DocumentType, J as DocumentTypeConfig, aT as EffectivePermissions, a4 as File, dc as FileListOptions, co as FileService, K as FileVerificationConfig, a3 as FileVisibility, cg as FilesRepository, ak as FilterCombinator, am as FilterGroup, ae as FilterOperator, aj as FilterRule, al as FilterState, ai as FilterValue, aA as FlowRelation, az as FlowRowField, cr as FlowService, ay as FlowSlot, aB as FlowStatus, cj as FlowsRepository, b4 as FormTab, cU as FullSyncOptions, cT as FullSyncResult, aJ as GeocodingAdapter, aG as GeocodingAutocompleteParams, aI as GeocodingParams, cs as GeocodingService, aF as GeocodingSuggestion, cH as GetRelationOptionsParams, da as GlobalSearchOptions, db as GlobalSearchResultItem, ct as GlobalSearchService, c6 as HookContext, c7 as HookDefinition, c8 as HookHandler, cb as HookRegistry, c9 as HookType, d8 as ListOptions, E as LocationGranularity, ac as MultiselectFilterOperator, aw as NO_VALUE_OPERATORS, av as NoValueOperator, aK as NoopGeocodingAdapter, ca as NoopHookRegistry, a8 as NumberFilterOperator, x as NumberUnit, au as OPERATORS_BY_TYPE, aM as ObjectAttribute, aU as ObjectPermissions, aO as ObjectRecord, ch as ObjectRecordsRepository, cy as ObjectSchemaService, cx as ObjectSchemaServiceOptions, cd as ObjectsRepository, dk as OperationResult, aR as Permission, aP as PermissionScope, cA as PermissionService, cz as PermissionServiceOptions, cl as PermissionsRepository, ah as PhoneFilterValue, at as QueryState, cC as RecordService, cB as RecordServiceOptions, Q as RelationAttribute, ad as RelationFilterOperator, cF as RelationOption, cG as RelationOptionsResponse, cI as RelationService, cE as RelationValidationError, cD as RelationValidationResult, af as RelativeDateValue, aH as ReverseGeocodingParams, aQ as Role, d9 as SearchOptions, ab as SelectFilterOperator, ar as SortDirection, as as SortRule, v as StatusGroup, a2 as StorageProvider, cP as SyncOptions, cO as SyncResult, aV as SystemPermissions, b3 as TabType, b5 as TableTab, bd as TenantId, a7 as TextFilterOperator, aL as Timestamps, d5 as UpdateDBAttribute, dj as UpdateDBFlow, d1 as UpdateDBObject, df as UpdateDBView, a6 as UpdateFile, cq as UpdateFlowInput, cw as UpdateObjectInput, aX as UpdateRoleInput, b2 as UpdateUserProfile, cM as UpdateViewInput, d6 as UpsertDBAttribute, d2 as UpsertDBObject, dg as UpsertDBView, b0 as UserProfile, cK as UserProfileService, cJ as UserProfileServiceOptions, cf as UserProfilesRepository, a_ as UserRole, aS as UserRoleAssignment, a$ as UserStatus, bc as Uuid, bW as ValidationResult, cN as ViewService, dm as ViewSyncOptions, dl as ViewSyncResult, ci as ViewsRepository, by as attributeConfigSchemas, cm as buildAuditChanges, bl as checkboxConfigSchema, c3 as computeRecordStatus, bU as createAttributeValidator, bF as createCheckboxValidator, bI as createCurrencyValidator, bG as createDateValidator, b_ as createDraftValidator, bO as createFileValidator, bM as createLocationValidator, cc as createMockAdapter, bR as createMultiRelationValidator, bL as createMultiselectValidator, bE as createNumberValidator, bV as createObjectValidator, bH as createPhoneValidator, bT as createRatingValidator, bS as createRelationValidator, bK as createSelectValidator, bQ as createSingleRelationValidator, bJ as createStatusValidator, bD as createTextValidator, bN as createTimestampValidator, bP as createUserValidator, bo as currencyConfigSchema, bm as dateConfigSchema, c_ as enrichValuesWithSelectLabels, cZ as extractAttributeNames, bu as fileConfigSchema, be as generateId, bf as generatePrefixedId, bz as getAttributeConfigSchema, c1 as getMissingRequiredAttributes, cS as getSyncPreview, dq as getViewSyncPreview, bb as isActivityTab, ao as isAdvancedFilterState, ba as isCustomTab, aC as isFlowDefinition, aD as isFlowPublished, b8 as isFormTab, cY as isLabelExpression, ax as isNoValueOperator, c2 as isRecordComplete, aE as isSystemFlow, b9 as isTableTab, bq as locationConfigSchema, bt as multiselectConfigSchema, bk as numberConfigSchema, bB as parseAttributeConfig, bn as phoneConfigSchema, bx as ratingConfigSchema, bg as registry, bw as relationConfigSchema, cX as renderLabelExpression, bC as safeParseAttributeConfig, bs as selectConfigSchema, bp as statusConfigSchema, cV as syncAll, cQ as syncNativeObjects, dn as syncNativeViews, bi as textConfigSchema, bj as textareaConfigSchema, br as timestampConfigSchema, ap as toAdvancedFilterState, aq as toSimpleFilterState, bv as userConfigSchema, bX as validateAttribute, bA as validateAttributeConfig, b$ as validateDraft, c0 as validateDraftOrThrow, bY as validateObject, bZ as validateObjectOrThrow, cR as verifyNativeObjectsSync, dp as verifyNativeViewsSync, bh as viewRegistry } from './runtime--rp-TG-h.mjs';
|
|
3
3
|
import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -300,6 +300,45 @@ type ExtractAttributes<TBuilder> = TBuilder extends {
|
|
|
300
300
|
};
|
|
301
301
|
} ? A : never;
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Default empty value placeholder
|
|
305
|
+
*/
|
|
306
|
+
declare const EMPTY_VALUE_PLACEHOLDER = "\u2014";
|
|
307
|
+
/**
|
|
308
|
+
* Format an attribute value for display
|
|
309
|
+
*
|
|
310
|
+
* This function converts raw attribute values into human-readable strings
|
|
311
|
+
* based on the attribute type and configuration.
|
|
312
|
+
*
|
|
313
|
+
* @param value - The raw value to format
|
|
314
|
+
* @param attribute - The attribute definition
|
|
315
|
+
* @returns Formatted string representation
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```typescript
|
|
319
|
+
* // Text attribute
|
|
320
|
+
* formatAttributeValue("Hello", textAttr);
|
|
321
|
+
* // → "Hello"
|
|
322
|
+
*
|
|
323
|
+
* // Currency attribute
|
|
324
|
+
* formatAttributeValue({ value: 1500, code: "EUR" }, currencyAttr);
|
|
325
|
+
* // → "1,500.00 EUR"
|
|
326
|
+
*
|
|
327
|
+
* // Select attribute with options
|
|
328
|
+
* formatAttributeValue("active", statusAttr);
|
|
329
|
+
* // → "Active" (label from options)
|
|
330
|
+
*
|
|
331
|
+
* // Location with city granularity
|
|
332
|
+
* formatAttributeValue({ city: "Paris", country: "FRA" }, locationAttr);
|
|
333
|
+
* // → "Paris, FRA"
|
|
334
|
+
*
|
|
335
|
+
* // Empty value
|
|
336
|
+
* formatAttributeValue(null, textAttr);
|
|
337
|
+
* // → "—"
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
declare function formatAttributeValue(value: unknown, attribute: Attribute): string;
|
|
341
|
+
|
|
303
342
|
/**
|
|
304
343
|
* System resources that can be managed through permissions.
|
|
305
344
|
*/
|
|
@@ -1622,4 +1661,4 @@ declare function view(name: string, label: string): ViewBuilder;
|
|
|
1622
1661
|
*/
|
|
1623
1662
|
declare function group(id: string, label: string): GroupBuilder;
|
|
1624
1663
|
|
|
1625
|
-
export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
|
|
1664
|
+
export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, formatAttributeValue, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime-
|
|
2
|
-
export {
|
|
1
|
+
import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime--rp-TG-h.js';
|
|
2
|
+
export { b7 as ActivityTab, cv as AddAttributeInput, an as AdvancedFilterState, aZ as AssignRoleInput, c5 as AttributeChange, w as AttributeGroup, u as AttributeType, ce as AttributesRepository, X as AuditAction, Y as AuditActorType, Z as AuditChange, a0 as AuditListOptions, _ as AuditLogEntry, ck as AuditRepository, W as AuditResourceType, cn as AuditService, a1 as AuditServiceOptions, B as BaseAttribute, a9 as CheckboxFilterOperator, aN as CompletionStatus, $ as CreateAuditLogInput, cu as CreateCustomObjectInput, d4 as CreateDBAttribute, di as CreateDBFlow, d0 as CreateDBObject, de as CreateDBView, a5 as CreateFile, cp as CreateFlowInput, d7 as CreateObjectRecord, aY as CreatePermissionInput, aW as CreateRoleInput, b1 as CreateUserProfile, cL as CreateViewInput, ag as CurrencyFilterValue, b6 as CustomTab, d3 as DBAttribute, dh as DBFlow, c$ as DBObject, dd as DBView, cW as DEFAULT_LABEL_FALLBACK, c4 as DatabaseAdapter, aa as DateFilterOperator, y as DateFormat, z as DateValue, I as DocumentFace, H as DocumentType, J as DocumentTypeConfig, aT as EffectivePermissions, a4 as File, dc as FileListOptions, co as FileService, K as FileVerificationConfig, a3 as FileVisibility, cg as FilesRepository, ak as FilterCombinator, am as FilterGroup, ae as FilterOperator, aj as FilterRule, al as FilterState, ai as FilterValue, aA as FlowRelation, az as FlowRowField, cr as FlowService, ay as FlowSlot, aB as FlowStatus, cj as FlowsRepository, b4 as FormTab, cU as FullSyncOptions, cT as FullSyncResult, aJ as GeocodingAdapter, aG as GeocodingAutocompleteParams, aI as GeocodingParams, cs as GeocodingService, aF as GeocodingSuggestion, cH as GetRelationOptionsParams, da as GlobalSearchOptions, db as GlobalSearchResultItem, ct as GlobalSearchService, c6 as HookContext, c7 as HookDefinition, c8 as HookHandler, cb as HookRegistry, c9 as HookType, d8 as ListOptions, E as LocationGranularity, ac as MultiselectFilterOperator, aw as NO_VALUE_OPERATORS, av as NoValueOperator, aK as NoopGeocodingAdapter, ca as NoopHookRegistry, a8 as NumberFilterOperator, x as NumberUnit, au as OPERATORS_BY_TYPE, aM as ObjectAttribute, aU as ObjectPermissions, aO as ObjectRecord, ch as ObjectRecordsRepository, cy as ObjectSchemaService, cx as ObjectSchemaServiceOptions, cd as ObjectsRepository, dk as OperationResult, aR as Permission, aP as PermissionScope, cA as PermissionService, cz as PermissionServiceOptions, cl as PermissionsRepository, ah as PhoneFilterValue, at as QueryState, cC as RecordService, cB as RecordServiceOptions, Q as RelationAttribute, ad as RelationFilterOperator, cF as RelationOption, cG as RelationOptionsResponse, cI as RelationService, cE as RelationValidationError, cD as RelationValidationResult, af as RelativeDateValue, aH as ReverseGeocodingParams, aQ as Role, d9 as SearchOptions, ab as SelectFilterOperator, ar as SortDirection, as as SortRule, v as StatusGroup, a2 as StorageProvider, cP as SyncOptions, cO as SyncResult, aV as SystemPermissions, b3 as TabType, b5 as TableTab, bd as TenantId, a7 as TextFilterOperator, aL as Timestamps, d5 as UpdateDBAttribute, dj as UpdateDBFlow, d1 as UpdateDBObject, df as UpdateDBView, a6 as UpdateFile, cq as UpdateFlowInput, cw as UpdateObjectInput, aX as UpdateRoleInput, b2 as UpdateUserProfile, cM as UpdateViewInput, d6 as UpsertDBAttribute, d2 as UpsertDBObject, dg as UpsertDBView, b0 as UserProfile, cK as UserProfileService, cJ as UserProfileServiceOptions, cf as UserProfilesRepository, a_ as UserRole, aS as UserRoleAssignment, a$ as UserStatus, bc as Uuid, bW as ValidationResult, cN as ViewService, dm as ViewSyncOptions, dl as ViewSyncResult, ci as ViewsRepository, by as attributeConfigSchemas, cm as buildAuditChanges, bl as checkboxConfigSchema, c3 as computeRecordStatus, bU as createAttributeValidator, bF as createCheckboxValidator, bI as createCurrencyValidator, bG as createDateValidator, b_ as createDraftValidator, bO as createFileValidator, bM as createLocationValidator, cc as createMockAdapter, bR as createMultiRelationValidator, bL as createMultiselectValidator, bE as createNumberValidator, bV as createObjectValidator, bH as createPhoneValidator, bT as createRatingValidator, bS as createRelationValidator, bK as createSelectValidator, bQ as createSingleRelationValidator, bJ as createStatusValidator, bD as createTextValidator, bN as createTimestampValidator, bP as createUserValidator, bo as currencyConfigSchema, bm as dateConfigSchema, c_ as enrichValuesWithSelectLabels, cZ as extractAttributeNames, bu as fileConfigSchema, be as generateId, bf as generatePrefixedId, bz as getAttributeConfigSchema, c1 as getMissingRequiredAttributes, cS as getSyncPreview, dq as getViewSyncPreview, bb as isActivityTab, ao as isAdvancedFilterState, ba as isCustomTab, aC as isFlowDefinition, aD as isFlowPublished, b8 as isFormTab, cY as isLabelExpression, ax as isNoValueOperator, c2 as isRecordComplete, aE as isSystemFlow, b9 as isTableTab, bq as locationConfigSchema, bt as multiselectConfigSchema, bk as numberConfigSchema, bB as parseAttributeConfig, bn as phoneConfigSchema, bx as ratingConfigSchema, bg as registry, bw as relationConfigSchema, cX as renderLabelExpression, bC as safeParseAttributeConfig, bs as selectConfigSchema, bp as statusConfigSchema, cV as syncAll, cQ as syncNativeObjects, dn as syncNativeViews, bi as textConfigSchema, bj as textareaConfigSchema, br as timestampConfigSchema, ap as toAdvancedFilterState, aq as toSimpleFilterState, bv as userConfigSchema, bX as validateAttribute, bA as validateAttributeConfig, b$ as validateDraft, c0 as validateDraftOrThrow, bY as validateObject, bZ as validateObjectOrThrow, cR as verifyNativeObjectsSync, dp as verifyNativeViewsSync, bh as viewRegistry } from './runtime--rp-TG-h.js';
|
|
3
3
|
import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -300,6 +300,45 @@ type ExtractAttributes<TBuilder> = TBuilder extends {
|
|
|
300
300
|
};
|
|
301
301
|
} ? A : never;
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Default empty value placeholder
|
|
305
|
+
*/
|
|
306
|
+
declare const EMPTY_VALUE_PLACEHOLDER = "\u2014";
|
|
307
|
+
/**
|
|
308
|
+
* Format an attribute value for display
|
|
309
|
+
*
|
|
310
|
+
* This function converts raw attribute values into human-readable strings
|
|
311
|
+
* based on the attribute type and configuration.
|
|
312
|
+
*
|
|
313
|
+
* @param value - The raw value to format
|
|
314
|
+
* @param attribute - The attribute definition
|
|
315
|
+
* @returns Formatted string representation
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```typescript
|
|
319
|
+
* // Text attribute
|
|
320
|
+
* formatAttributeValue("Hello", textAttr);
|
|
321
|
+
* // → "Hello"
|
|
322
|
+
*
|
|
323
|
+
* // Currency attribute
|
|
324
|
+
* formatAttributeValue({ value: 1500, code: "EUR" }, currencyAttr);
|
|
325
|
+
* // → "1,500.00 EUR"
|
|
326
|
+
*
|
|
327
|
+
* // Select attribute with options
|
|
328
|
+
* formatAttributeValue("active", statusAttr);
|
|
329
|
+
* // → "Active" (label from options)
|
|
330
|
+
*
|
|
331
|
+
* // Location with city granularity
|
|
332
|
+
* formatAttributeValue({ city: "Paris", country: "FRA" }, locationAttr);
|
|
333
|
+
* // → "Paris, FRA"
|
|
334
|
+
*
|
|
335
|
+
* // Empty value
|
|
336
|
+
* formatAttributeValue(null, textAttr);
|
|
337
|
+
* // → "—"
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
declare function formatAttributeValue(value: unknown, attribute: Attribute): string;
|
|
341
|
+
|
|
303
342
|
/**
|
|
304
343
|
* System resources that can be managed through permissions.
|
|
305
344
|
*/
|
|
@@ -1622,4 +1661,4 @@ declare function view(name: string, label: string): ViewBuilder;
|
|
|
1622
1661
|
*/
|
|
1623
1662
|
declare function group(id: string, label: string): GroupBuilder;
|
|
1624
1663
|
|
|
1625
|
-
export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
|
|
1664
|
+
export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, formatAttributeValue, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
|