@stndrds/schema 1.0.0-alpha.162 → 1.0.0-alpha.163
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/{helpers-CoFQtNfq.d.mts → helpers-BDn1PUC2.d.mts} +1 -1
- package/dist/{helpers-D-4aV3ki.d.ts → helpers-oaW8DBAh.d.ts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -0
- package/dist/index.mjs +10 -0
- package/dist/validation/all.d.mts +1 -1
- package/dist/validation/all.d.ts +1 -1
- package/dist/validation/object/index.d.mts +2 -2
- package/dist/validation/object/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ type NumberFilterOperator = "eq" | "neq" | "lt" | "gt" | "lte" | "gte" | "is_emp
|
|
|
11
11
|
/** Operators for checkbox */
|
|
12
12
|
type CheckboxFilterOperator = "is_checked" | "is_not_checked";
|
|
13
13
|
/** Operators for date-based attributes */
|
|
14
|
-
type DateFilterOperator = "is" | "is_not" | "before" | "after" | "on_or_before" | "on_or_after" | "is_within" | "is_empty" | "is_not_empty";
|
|
14
|
+
type DateFilterOperator = "is" | "is_not" | "before" | "after" | "on_or_before" | "on_or_after" | "is_within" | "day_month_eq" | "is_empty" | "is_not_empty";
|
|
15
15
|
/** Operators for select-based attributes (supports single or multi-value filtering) */
|
|
16
16
|
type SelectFilterOperator = "is" | "is_not" | "any_of" | "none_of" | "is_empty" | "is_not_empty";
|
|
17
17
|
/** Operators for multiselect-based attributes */
|
|
@@ -11,7 +11,7 @@ type NumberFilterOperator = "eq" | "neq" | "lt" | "gt" | "lte" | "gte" | "is_emp
|
|
|
11
11
|
/** Operators for checkbox */
|
|
12
12
|
type CheckboxFilterOperator = "is_checked" | "is_not_checked";
|
|
13
13
|
/** Operators for date-based attributes */
|
|
14
|
-
type DateFilterOperator = "is" | "is_not" | "before" | "after" | "on_or_before" | "on_or_after" | "is_within" | "is_empty" | "is_not_empty";
|
|
14
|
+
type DateFilterOperator = "is" | "is_not" | "before" | "after" | "on_or_before" | "on_or_after" | "is_within" | "day_month_eq" | "is_empty" | "is_not_empty";
|
|
15
15
|
/** Operators for select-based attributes (supports single or multi-value filtering) */
|
|
16
16
|
type SelectFilterOperator = "is" | "is_not" | "any_of" | "none_of" | "is_empty" | "is_not_empty";
|
|
17
17
|
/** Operators for multiselect-based attributes */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SortRule, F as FilterState, T as Timestamps, V as ViewType, j as ViewConfig, C as ConfigOverrides, k as CompletionStatus, l as ObjectRecord, M as MigrationDefinition, O as ObjectDefinition, D as DetailViewConfig, m as DetailViewDefinition, n as DetailViewLayout, o as SidePanelConfig, p as Field, A as AttributeGroupField, q as FieldGroup, R as RelationGroup, G as Group, r as TableTab, s as CreateMode, t as Tab, L as ListViewConfig, u as ListViewDefinition, w as ViewDefinition, x as ListViewTab, y as FilterOperator, z as FilterValue } from './helpers-
|
|
2
|
-
export { B as ActivityTab, E as AdvancedFilterState, H as BuiltInTransform, I as CurrencyFilterValue, J as CustomTab, K as DocumentsTab, N as ExtendedFilterRule, P as FilterCombinator, Q as FilterGroup, U as FilterRule, W as FormDensity, X as FormTab, Y as FormsTab, Z as InverseSource, _ as ListViewLayout, $ as MigrationError, a0 as NO_VALUE_OPERATORS, a1 as NoValueOperator, a2 as OPERATORS_BY_TYPE, a3 as ObjectAttribute, a4 as PhoneFilterValue, a5 as QueryState, a6 as RESERVED_ATTRIBUTE_NAMES, a7 as RelationSource, a8 as RelativeDateValue, a9 as ReservedAttributeName, aa as RichtextTab, ab as SYSTEM_FIELD_NAMES, ac as SchemaOperation, ad as SchemaTransform, ae as SortDirection, af as SystemFieldName, ag as TabType, ah as TableSource, ai as TransformSource, aj as ViewOperation, ak as ViewOverlay, al as ViewTransform, c as computeRecordStatus, a as createFormAttributeValidator, am as getRollupFilterOperators, an as isDetailView, ao as isFieldGroup, ap as isListView, aq as isNoValueOperator, ar as isRelationGroup, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from './helpers-
|
|
1
|
+
import { S as SortRule, F as FilterState, T as Timestamps, V as ViewType, j as ViewConfig, C as ConfigOverrides, k as CompletionStatus, l as ObjectRecord, M as MigrationDefinition, O as ObjectDefinition, D as DetailViewConfig, m as DetailViewDefinition, n as DetailViewLayout, o as SidePanelConfig, p as Field, A as AttributeGroupField, q as FieldGroup, R as RelationGroup, G as Group, r as TableTab, s as CreateMode, t as Tab, L as ListViewConfig, u as ListViewDefinition, w as ViewDefinition, x as ListViewTab, y as FilterOperator, z as FilterValue } from './helpers-BDn1PUC2.mjs';
|
|
2
|
+
export { B as ActivityTab, E as AdvancedFilterState, H as BuiltInTransform, I as CurrencyFilterValue, J as CustomTab, K as DocumentsTab, N as ExtendedFilterRule, P as FilterCombinator, Q as FilterGroup, U as FilterRule, W as FormDensity, X as FormTab, Y as FormsTab, Z as InverseSource, _ as ListViewLayout, $ as MigrationError, a0 as NO_VALUE_OPERATORS, a1 as NoValueOperator, a2 as OPERATORS_BY_TYPE, a3 as ObjectAttribute, a4 as PhoneFilterValue, a5 as QueryState, a6 as RESERVED_ATTRIBUTE_NAMES, a7 as RelationSource, a8 as RelativeDateValue, a9 as ReservedAttributeName, aa as RichtextTab, ab as SYSTEM_FIELD_NAMES, ac as SchemaOperation, ad as SchemaTransform, ae as SortDirection, af as SystemFieldName, ag as TabType, ah as TableSource, ai as TransformSource, aj as ViewOperation, ak as ViewOverlay, al as ViewTransform, c as computeRecordStatus, a as createFormAttributeValidator, am as getRollupFilterOperators, an as isDetailView, ao as isFieldGroup, ap as isListView, aq as isNoValueOperator, ar as isRelationGroup, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from './helpers-BDn1PUC2.mjs';
|
|
3
3
|
import { j as AttributeType, A as Attribute, k as LocationGranularity, l as Location, e as FormulaAttribute, f as RollupAttribute, d as StatusAttribute, c as SelectAttribute, b as MultiselectAttribute, m as Phone, n as Currency, D as DateAttribute, U as UserAttribute, o as DocumentAttribute, p as FeatureGate, g as CheckboxAttribute, C as CurrencyAttribute, F as FileAttribute, q as FormulaReturnType, L as LocationAttribute, O as Option, N as NumberAttribute, P as PhoneAttribute, h as RatingAttribute, R as RelationAttribute, i as TextAttribute, T as TextAreaAttribute, B as BilateralConfig, S as SingleRelationAttribute, M as MultiRelationAttribute, r as RelationTarget, a as RichtextAttribute, s as RichtextFeature, t as RollupFunction, u as FlagValueType, v as FeatureFlagDefinition, w as FlagLevel, x as FeatureFlagsRepository, y as StaticFlagDefault, z as ResolvedFlag } from './attributes-DcHM27jS.mjs';
|
|
4
4
|
export { E as AttributeGroup, G as BaseAttribute, H as DateFormat, I as DateValue, J as FeatureFlagsConfig, K as FlagOverride, Q as NumberUnit, V as OptionPropertyAttribute, W as PropertyAttribute, X as PropertySchema, Y as PropertyType, Z as RELATION_TARGET_ANY, _ as StatusGroup, $ as hasOptions, a0 as inferInverseCardinality, a1 as isAttributeSortable, a2 as isBilateralRelation, a3 as isUniversalRelation } from './attributes-DcHM27jS.mjs';
|
|
5
5
|
import { MimeType, IconName, ColorId, CountryIso3, CurrencyCode } from '@stndrds/constants';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SortRule, F as FilterState, T as Timestamps, V as ViewType, j as ViewConfig, C as ConfigOverrides, k as CompletionStatus, l as ObjectRecord, M as MigrationDefinition, O as ObjectDefinition, D as DetailViewConfig, m as DetailViewDefinition, n as DetailViewLayout, o as SidePanelConfig, p as Field, A as AttributeGroupField, q as FieldGroup, R as RelationGroup, G as Group, r as TableTab, s as CreateMode, t as Tab, L as ListViewConfig, u as ListViewDefinition, w as ViewDefinition, x as ListViewTab, y as FilterOperator, z as FilterValue } from './helpers-
|
|
2
|
-
export { B as ActivityTab, E as AdvancedFilterState, H as BuiltInTransform, I as CurrencyFilterValue, J as CustomTab, K as DocumentsTab, N as ExtendedFilterRule, P as FilterCombinator, Q as FilterGroup, U as FilterRule, W as FormDensity, X as FormTab, Y as FormsTab, Z as InverseSource, _ as ListViewLayout, $ as MigrationError, a0 as NO_VALUE_OPERATORS, a1 as NoValueOperator, a2 as OPERATORS_BY_TYPE, a3 as ObjectAttribute, a4 as PhoneFilterValue, a5 as QueryState, a6 as RESERVED_ATTRIBUTE_NAMES, a7 as RelationSource, a8 as RelativeDateValue, a9 as ReservedAttributeName, aa as RichtextTab, ab as SYSTEM_FIELD_NAMES, ac as SchemaOperation, ad as SchemaTransform, ae as SortDirection, af as SystemFieldName, ag as TabType, ah as TableSource, ai as TransformSource, aj as ViewOperation, ak as ViewOverlay, al as ViewTransform, c as computeRecordStatus, a as createFormAttributeValidator, am as getRollupFilterOperators, an as isDetailView, ao as isFieldGroup, ap as isListView, aq as isNoValueOperator, ar as isRelationGroup, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from './helpers-
|
|
1
|
+
import { S as SortRule, F as FilterState, T as Timestamps, V as ViewType, j as ViewConfig, C as ConfigOverrides, k as CompletionStatus, l as ObjectRecord, M as MigrationDefinition, O as ObjectDefinition, D as DetailViewConfig, m as DetailViewDefinition, n as DetailViewLayout, o as SidePanelConfig, p as Field, A as AttributeGroupField, q as FieldGroup, R as RelationGroup, G as Group, r as TableTab, s as CreateMode, t as Tab, L as ListViewConfig, u as ListViewDefinition, w as ViewDefinition, x as ListViewTab, y as FilterOperator, z as FilterValue } from './helpers-oaW8DBAh.js';
|
|
2
|
+
export { B as ActivityTab, E as AdvancedFilterState, H as BuiltInTransform, I as CurrencyFilterValue, J as CustomTab, K as DocumentsTab, N as ExtendedFilterRule, P as FilterCombinator, Q as FilterGroup, U as FilterRule, W as FormDensity, X as FormTab, Y as FormsTab, Z as InverseSource, _ as ListViewLayout, $ as MigrationError, a0 as NO_VALUE_OPERATORS, a1 as NoValueOperator, a2 as OPERATORS_BY_TYPE, a3 as ObjectAttribute, a4 as PhoneFilterValue, a5 as QueryState, a6 as RESERVED_ATTRIBUTE_NAMES, a7 as RelationSource, a8 as RelativeDateValue, a9 as ReservedAttributeName, aa as RichtextTab, ab as SYSTEM_FIELD_NAMES, ac as SchemaOperation, ad as SchemaTransform, ae as SortDirection, af as SystemFieldName, ag as TabType, ah as TableSource, ai as TransformSource, aj as ViewOperation, ak as ViewOverlay, al as ViewTransform, c as computeRecordStatus, a as createFormAttributeValidator, am as getRollupFilterOperators, an as isDetailView, ao as isFieldGroup, ap as isListView, aq as isNoValueOperator, ar as isRelationGroup, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from './helpers-oaW8DBAh.js';
|
|
3
3
|
import { j as AttributeType, A as Attribute, k as LocationGranularity, l as Location, e as FormulaAttribute, f as RollupAttribute, d as StatusAttribute, c as SelectAttribute, b as MultiselectAttribute, m as Phone, n as Currency, D as DateAttribute, U as UserAttribute, o as DocumentAttribute, p as FeatureGate, g as CheckboxAttribute, C as CurrencyAttribute, F as FileAttribute, q as FormulaReturnType, L as LocationAttribute, O as Option, N as NumberAttribute, P as PhoneAttribute, h as RatingAttribute, R as RelationAttribute, i as TextAttribute, T as TextAreaAttribute, B as BilateralConfig, S as SingleRelationAttribute, M as MultiRelationAttribute, r as RelationTarget, a as RichtextAttribute, s as RichtextFeature, t as RollupFunction, u as FlagValueType, v as FeatureFlagDefinition, w as FlagLevel, x as FeatureFlagsRepository, y as StaticFlagDefault, z as ResolvedFlag } from './attributes-CNpcbVbv.js';
|
|
4
4
|
export { E as AttributeGroup, G as BaseAttribute, H as DateFormat, I as DateValue, J as FeatureFlagsConfig, K as FlagOverride, Q as NumberUnit, V as OptionPropertyAttribute, W as PropertyAttribute, X as PropertySchema, Y as PropertyType, Z as RELATION_TARGET_ANY, _ as StatusGroup, $ as hasOptions, a0 as inferInverseCardinality, a1 as isAttributeSortable, a2 as isBilateralRelation, a3 as isUniversalRelation } from './attributes-CNpcbVbv.js';
|
|
5
5
|
import { MimeType, IconName, ColorId, CountryIso3, CurrencyCode } from '@stndrds/constants';
|
package/dist/index.js
CHANGED
|
@@ -417,6 +417,7 @@ var OPERATORS_BY_TYPE = {
|
|
|
417
417
|
"on_or_before",
|
|
418
418
|
"on_or_after",
|
|
419
419
|
"is_within",
|
|
420
|
+
"day_month_eq",
|
|
420
421
|
"is_empty",
|
|
421
422
|
"is_not_empty"
|
|
422
423
|
],
|
|
@@ -5440,6 +5441,15 @@ var OPERATOR_SPECS = {
|
|
|
5440
5441
|
return rel.direction === "future" ? d >= /* @__PURE__ */ new Date() && d <= boundary : d >= boundary && d <= /* @__PURE__ */ new Date();
|
|
5441
5442
|
}
|
|
5442
5443
|
},
|
|
5444
|
+
day_month_eq: {
|
|
5445
|
+
appliesTo: ["date"],
|
|
5446
|
+
evaluateInMemory: (v, rv) => {
|
|
5447
|
+
const d = toDate(v);
|
|
5448
|
+
if (!d) return false;
|
|
5449
|
+
const rule = rv;
|
|
5450
|
+
return d.getMonth() + 1 === rule.month && d.getDate() === rule.day;
|
|
5451
|
+
}
|
|
5452
|
+
},
|
|
5443
5453
|
// ---- select multi-value ----
|
|
5444
5454
|
any_of: {
|
|
5445
5455
|
appliesTo: ["status", "select", "relation", "document"],
|
package/dist/index.mjs
CHANGED
|
@@ -413,6 +413,7 @@ var OPERATORS_BY_TYPE = {
|
|
|
413
413
|
"on_or_before",
|
|
414
414
|
"on_or_after",
|
|
415
415
|
"is_within",
|
|
416
|
+
"day_month_eq",
|
|
416
417
|
"is_empty",
|
|
417
418
|
"is_not_empty"
|
|
418
419
|
],
|
|
@@ -5436,6 +5437,15 @@ var OPERATOR_SPECS = {
|
|
|
5436
5437
|
return rel.direction === "future" ? d >= /* @__PURE__ */ new Date() && d <= boundary : d >= boundary && d <= /* @__PURE__ */ new Date();
|
|
5437
5438
|
}
|
|
5438
5439
|
},
|
|
5440
|
+
day_month_eq: {
|
|
5441
|
+
appliesTo: ["date"],
|
|
5442
|
+
evaluateInMemory: (v, rv) => {
|
|
5443
|
+
const d = toDate(v);
|
|
5444
|
+
if (!d) return false;
|
|
5445
|
+
const rule = rv;
|
|
5446
|
+
return d.getMonth() + 1 === rule.month && d.getDate() === rule.day;
|
|
5447
|
+
}
|
|
5448
|
+
},
|
|
5439
5449
|
// ---- select multi-value ----
|
|
5440
5450
|
any_of: {
|
|
5441
5451
|
appliesTo: ["status", "select", "relation", "document"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { V as ValidationMessages } from '../types-DT8dfR2I.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 validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-BDn1PUC2.mjs';
|
|
5
5
|
import '../attributes-DcHM27jS.mjs';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.mjs';
|
package/dist/validation/all.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { V as ValidationMessages } from '../types-CUbVw7X2.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 validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-oaW8DBAh.js';
|
|
5
5
|
import '../attributes-CNpcbVbv.js';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as ObjectDefinition } from '../../helpers-
|
|
2
|
-
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-BDn1PUC2.mjs';
|
|
2
|
+
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-BDn1PUC2.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../../attributes-DcHM27jS.mjs';
|
|
5
5
|
import '@stndrds/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as ObjectDefinition } from '../../helpers-
|
|
2
|
-
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-oaW8DBAh.js';
|
|
2
|
+
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-oaW8DBAh.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../../attributes-CNpcbVbv.js';
|
|
5
5
|
import '@stndrds/constants';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.163",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"expr-eval": "^2.0.2",
|
|
132
132
|
"libphonenumber-js": "^1.12.31",
|
|
133
133
|
"zod": "^4.2.1",
|
|
134
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
134
|
+
"@stndrds/constants": "1.0.0-alpha.163"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/node": "^25.0.3",
|