@stndrds/schema 1.0.0-alpha.280 → 1.0.0-alpha.282
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/{all-Ig0ig9wp.d.ts → all-C3EaFLCU.d.ts} +7 -17
- package/dist/{all-C0hXd79K.d.mts → all-CQMswOrw.d.mts} +7 -17
- package/dist/{attributes-D8eHv5Kf.d.ts → attributes-CU871AfG.d.ts} +12 -12
- package/dist/{attributes--M1ifW8_.d.mts → attributes-DoiGyNFk.d.mts} +12 -12
- package/dist/{chunk-FAEOVIDJ.js → chunk-DIMTNM3F.js} +7 -3
- package/dist/{chunk-NUEIGMYS.mjs → chunk-EFSS7PGC.mjs} +1 -1
- package/dist/{chunk-XDA5PZRT.mjs → chunk-HOVUEYEQ.mjs} +34 -0
- package/dist/{chunk-MXYCCUNB.js → chunk-KIMECN6D.js} +68 -44
- package/dist/{chunk-M3WFXOA4.js → chunk-L4KLYMUI.js} +34 -0
- package/dist/{chunk-XTBGGJ3G.js → chunk-LBGLB443.js} +3 -3
- package/dist/{chunk-PUMM6SPY.mjs → chunk-PLTLAMWJ.mjs} +1 -1
- package/dist/{chunk-TBAD2T7Q.mjs → chunk-QGRYOIHT.mjs} +37 -13
- package/dist/{chunk-MSIGO7JA.mjs → chunk-R34LOMT7.mjs} +5 -1
- package/dist/{chunk-3PGLMGTR.js → chunk-V4MZOTLV.js} +4 -4
- package/dist/exceptions.d.mts +22 -3
- package/dist/exceptions.d.ts +22 -3
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{helpers-DyoPqiSz.d.ts → helpers-BNr-Dppk.d.ts} +3 -3
- package/dist/{helpers-BiABdSxK.d.mts → helpers-CfEOUBmB.d.mts} +3 -3
- package/dist/{index-SpFpkWVC.d.ts → index-Br7koyHF.d.ts} +53 -27
- package/dist/{index-C3P5Dnwt.d.mts → index-D9XBjFnu.d.mts} +53 -27
- package/dist/index.d.mts +568 -151
- package/dist/index.d.ts +568 -151
- package/dist/index.js +1389 -292
- package/dist/index.mjs +1174 -99
- package/dist/{migrations-B1kkIhIX.d.ts → migrations-BGWgXHXb.d.ts} +1 -1
- package/dist/{migrations-BNlQVzDC.d.mts → migrations-C-GN1xx_.d.mts} +1 -1
- package/dist/{objects-DmMqHn3L.d.mts → objects-BRypaBpi.d.mts} +2 -4
- package/dist/{objects-DgFojgwH.d.ts → objects-BiOMwzLL.d.ts} +2 -4
- package/dist/{types-DHqXzkgW.d.mts → types-80c2rOUZ.d.mts} +1 -1
- package/dist/{types-DYYFto8d.d.ts → types-DqYz8Iv_.d.ts} +1 -1
- package/dist/utils.js +8 -8
- package/dist/utils.mjs +2 -2
- package/dist/validation/all.d.mts +7 -7
- package/dist/validation/all.d.ts +7 -7
- package/dist/validation/all.js +29 -29
- package/dist/validation/all.mjs +4 -4
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.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 +4 -4
- package/dist/validation/config/index.d.ts +4 -4
- package/dist/validation/config/index.js +11 -11
- package/dist/validation/config/index.mjs +2 -2
- 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 +5 -5
- package/dist/validation/object/index.d.ts +5 -5
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +2 -2
- 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/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-
|
|
2
|
+
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-CU871AfG.js';
|
|
3
3
|
import { IconName } from '@stndrds/constants';
|
|
4
|
-
import { L as ListViewTabVisibility } from './objects-
|
|
4
|
+
import { L as ListViewTabVisibility } from './objects-BiOMwzLL.js';
|
|
5
5
|
|
|
6
6
|
/** Operators for text-based attributes */
|
|
7
7
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -218,6 +218,13 @@ interface AttributeGroupField {
|
|
|
218
218
|
* Can be either a single attribute or an inline attribute group
|
|
219
219
|
*/
|
|
220
220
|
interface Field {
|
|
221
|
+
/**
|
|
222
|
+
* Stable identity of this slot, assigned by `ensureFieldIds` and backfilled
|
|
223
|
+
* for existing configs. Architect operations address a slot by this id, never
|
|
224
|
+
* by position — a composite field has no attribute name to be addressed by.
|
|
225
|
+
* Optional so a builder may omit it; every persisted config has one.
|
|
226
|
+
*/
|
|
227
|
+
id?: string;
|
|
221
228
|
/** Attribute name to display (for single attribute fields) */
|
|
222
229
|
attribute?: string;
|
|
223
230
|
/** Inline attribute group (groups multiple attributes into one composite field) */
|
|
@@ -249,23 +256,10 @@ interface FieldGroup extends BaseGroup {
|
|
|
249
256
|
fields: Field[];
|
|
250
257
|
}
|
|
251
258
|
/**
|
|
252
|
-
*
|
|
253
|
-
|
|
254
|
-
interface RelationGroup extends BaseGroup {
|
|
255
|
-
type: "relation";
|
|
256
|
-
/** Relation attribute name on the source object */
|
|
257
|
-
attribute: string;
|
|
258
|
-
/** Columns to display (auto-detected from target object if empty) */
|
|
259
|
-
columns?: string[];
|
|
260
|
-
/** Read-only mode */
|
|
261
|
-
readOnly?: boolean;
|
|
262
|
-
/** Allow creating new related records */
|
|
263
|
-
allowCreate?: boolean;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Discriminated union of all group types
|
|
259
|
+
* A form tab's groups. Only field groups exist: related records are shown by a
|
|
260
|
+
* table tab (`table()` / `tableFrom()`), which rendered the same thing.
|
|
267
261
|
*/
|
|
268
|
-
type Group = FieldGroup
|
|
262
|
+
type Group = FieldGroup;
|
|
269
263
|
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms" | "emails" | "meetings";
|
|
270
264
|
/**
|
|
271
265
|
* Base properties shared by all tab types
|
|
@@ -473,14 +467,49 @@ interface ListViewTab {
|
|
|
473
467
|
/** Pinned kanban columns (by option value) - for kanban layout only */
|
|
474
468
|
kanbanPinnedColumns?: string[];
|
|
475
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* One stacked section of the detail side panel.
|
|
472
|
+
*
|
|
473
|
+
* The panel is a column beside the main tabs, so its sections stack — a second
|
|
474
|
+
* tab row inside it would compete with the first. Only the three kinds below
|
|
475
|
+
* exist in v1; `table`, `custom`, `richtext`, `forms`, `emails` and `meetings`
|
|
476
|
+
* stay out until width and UX prove out, and their absence from this union is
|
|
477
|
+
* what enforces that.
|
|
478
|
+
*/
|
|
479
|
+
type SidePanelPane = {
|
|
480
|
+
kind: "fields";
|
|
481
|
+
id?: string;
|
|
482
|
+
label?: string;
|
|
483
|
+
attributes: string[];
|
|
484
|
+
} | {
|
|
485
|
+
kind: "activity";
|
|
486
|
+
id?: string;
|
|
487
|
+
label?: string;
|
|
488
|
+
} | {
|
|
489
|
+
kind: "documents";
|
|
490
|
+
/**
|
|
491
|
+
* Required, unlike the other kinds: `DocumentsTabContent` keys its
|
|
492
|
+
* sort-mode persistence on it, so a pane without one would share the
|
|
493
|
+
* main-column documents tab's stored sort.
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
allowUpload?: boolean;
|
|
498
|
+
allowRemove?: boolean;
|
|
499
|
+
};
|
|
476
500
|
/**
|
|
477
501
|
* Configuration for the side panel displayed alongside tab content.
|
|
478
502
|
* When present, a right-side panel shows the configured attributes as flat fields.
|
|
479
503
|
*/
|
|
480
504
|
interface SidePanelConfig {
|
|
481
|
-
/**
|
|
482
|
-
|
|
483
|
-
|
|
505
|
+
/**
|
|
506
|
+
* Flat fields, the original shape. Equivalent to a single `fields` pane and
|
|
507
|
+
* still supported unchanged; supply this or `panes`, not both.
|
|
508
|
+
*/
|
|
509
|
+
attributes?: string[];
|
|
510
|
+
/** Ordered stacked sections, rendered top to bottom. */
|
|
511
|
+
panes?: SidePanelPane[];
|
|
512
|
+
/** Width in pixels. @default 480 */
|
|
484
513
|
width?: number;
|
|
485
514
|
}
|
|
486
515
|
/**
|
|
@@ -586,13 +615,10 @@ declare function isDetailView(view: ViewDefinition): view is DetailViewDefinitio
|
|
|
586
615
|
*/
|
|
587
616
|
declare function isListView(view: ViewDefinition): view is ListViewDefinition;
|
|
588
617
|
/**
|
|
589
|
-
* Check if a group is a field group
|
|
618
|
+
* Check if a group is a field group. Kept because persisted configs written
|
|
619
|
+
* before the relation group was removed may still carry another discriminant.
|
|
590
620
|
*/
|
|
591
621
|
declare function isFieldGroup(group: Group): group is FieldGroup;
|
|
592
|
-
/**
|
|
593
|
-
* Check if a group is a relation group
|
|
594
|
-
*/
|
|
595
|
-
declare function isRelationGroup(group: Group): group is RelationGroup;
|
|
596
622
|
|
|
597
623
|
interface AddAttributeInput {
|
|
598
624
|
name: string;
|
|
@@ -787,4 +813,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
787
813
|
*/
|
|
788
814
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
789
815
|
|
|
790
|
-
export { type
|
|
816
|
+
export { type SidePanelPane as $, type AttributeGroupField as A, type FilterGroup as B, type ConfigOverrides as C, type DetailViewConfig as D, type EmailsTab as E, type FilterState as F, type Group as G, type FormDensity as H, type FormTab as I, type FormsTab as J, type InverseSource as K, type ListViewConfig as L, type MeetingsTab as M, type ListViewLayout as N, NO_VALUE_OPERATORS as O, type NoValueOperator as P, OPERATORS_BY_TYPE as Q, type RelativeDateValue as R, type SortRule as S, type TableTab as T, type PhoneFilterValue as U, type ViewType as V, type QueryState as W, type RelationOption as X, type RelationOptionsResponse as Y, type RelationSource as Z, type RichtextTab as _, type ViewConfig as a, type SortDirection as a0, type TabType as a1, type TableSource as a2, type UpdateObjectInput as a3, type UpdateViewInput as a4, type ViewOverlay as a5, getRollupFilterOperators as a6, isDetailView as a7, isFieldGroup as a8, isListView as a9, isNoValueOperator as aa, multiselectOptionWriteSchema as ab, parseAttributeConfig as ac, parseAttributeConfigForCreate as ad, parseAttributeConfigForUpdate as ae, selectOptionWriteSchema as af, statusGroupSchema as ag, statusOptionWriteSchema as ah, attributeConfigSchemas as ai, getAttributeConfigSchema as aj, type FilterOperator as b, type DetailViewDefinition as c, type SidePanelConfig as d, type Field as e, type FieldGroup as f, type CreateMode as g, type Tab as h, type ListViewDefinition as i, type ViewDefinition as j, type ListViewTab as k, type FilterValue as l, type FilterRule as m, type DynamicValue as n, type ActivityTab as o, type AddAttributeInput as p, type AdvancedFilterState as q, type CreateCustomObjectInput as r, type CreateViewInput as s, type CurrencyFilterValue as t, type CustomTab as u, type DayMonthValue as v, type DocumentsTab as w, type EdgeQuantifier as x, type ExtendedFilterRule as y, type FilterCombinator as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes
|
|
2
|
+
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-DoiGyNFk.mjs';
|
|
3
3
|
import { IconName } from '@stndrds/constants';
|
|
4
|
-
import { L as ListViewTabVisibility } from './objects-
|
|
4
|
+
import { L as ListViewTabVisibility } from './objects-BRypaBpi.mjs';
|
|
5
5
|
|
|
6
6
|
/** Operators for text-based attributes */
|
|
7
7
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -218,6 +218,13 @@ interface AttributeGroupField {
|
|
|
218
218
|
* Can be either a single attribute or an inline attribute group
|
|
219
219
|
*/
|
|
220
220
|
interface Field {
|
|
221
|
+
/**
|
|
222
|
+
* Stable identity of this slot, assigned by `ensureFieldIds` and backfilled
|
|
223
|
+
* for existing configs. Architect operations address a slot by this id, never
|
|
224
|
+
* by position — a composite field has no attribute name to be addressed by.
|
|
225
|
+
* Optional so a builder may omit it; every persisted config has one.
|
|
226
|
+
*/
|
|
227
|
+
id?: string;
|
|
221
228
|
/** Attribute name to display (for single attribute fields) */
|
|
222
229
|
attribute?: string;
|
|
223
230
|
/** Inline attribute group (groups multiple attributes into one composite field) */
|
|
@@ -249,23 +256,10 @@ interface FieldGroup extends BaseGroup {
|
|
|
249
256
|
fields: Field[];
|
|
250
257
|
}
|
|
251
258
|
/**
|
|
252
|
-
*
|
|
253
|
-
|
|
254
|
-
interface RelationGroup extends BaseGroup {
|
|
255
|
-
type: "relation";
|
|
256
|
-
/** Relation attribute name on the source object */
|
|
257
|
-
attribute: string;
|
|
258
|
-
/** Columns to display (auto-detected from target object if empty) */
|
|
259
|
-
columns?: string[];
|
|
260
|
-
/** Read-only mode */
|
|
261
|
-
readOnly?: boolean;
|
|
262
|
-
/** Allow creating new related records */
|
|
263
|
-
allowCreate?: boolean;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Discriminated union of all group types
|
|
259
|
+
* A form tab's groups. Only field groups exist: related records are shown by a
|
|
260
|
+
* table tab (`table()` / `tableFrom()`), which rendered the same thing.
|
|
267
261
|
*/
|
|
268
|
-
type Group = FieldGroup
|
|
262
|
+
type Group = FieldGroup;
|
|
269
263
|
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms" | "emails" | "meetings";
|
|
270
264
|
/**
|
|
271
265
|
* Base properties shared by all tab types
|
|
@@ -473,14 +467,49 @@ interface ListViewTab {
|
|
|
473
467
|
/** Pinned kanban columns (by option value) - for kanban layout only */
|
|
474
468
|
kanbanPinnedColumns?: string[];
|
|
475
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* One stacked section of the detail side panel.
|
|
472
|
+
*
|
|
473
|
+
* The panel is a column beside the main tabs, so its sections stack — a second
|
|
474
|
+
* tab row inside it would compete with the first. Only the three kinds below
|
|
475
|
+
* exist in v1; `table`, `custom`, `richtext`, `forms`, `emails` and `meetings`
|
|
476
|
+
* stay out until width and UX prove out, and their absence from this union is
|
|
477
|
+
* what enforces that.
|
|
478
|
+
*/
|
|
479
|
+
type SidePanelPane = {
|
|
480
|
+
kind: "fields";
|
|
481
|
+
id?: string;
|
|
482
|
+
label?: string;
|
|
483
|
+
attributes: string[];
|
|
484
|
+
} | {
|
|
485
|
+
kind: "activity";
|
|
486
|
+
id?: string;
|
|
487
|
+
label?: string;
|
|
488
|
+
} | {
|
|
489
|
+
kind: "documents";
|
|
490
|
+
/**
|
|
491
|
+
* Required, unlike the other kinds: `DocumentsTabContent` keys its
|
|
492
|
+
* sort-mode persistence on it, so a pane without one would share the
|
|
493
|
+
* main-column documents tab's stored sort.
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
allowUpload?: boolean;
|
|
498
|
+
allowRemove?: boolean;
|
|
499
|
+
};
|
|
476
500
|
/**
|
|
477
501
|
* Configuration for the side panel displayed alongside tab content.
|
|
478
502
|
* When present, a right-side panel shows the configured attributes as flat fields.
|
|
479
503
|
*/
|
|
480
504
|
interface SidePanelConfig {
|
|
481
|
-
/**
|
|
482
|
-
|
|
483
|
-
|
|
505
|
+
/**
|
|
506
|
+
* Flat fields, the original shape. Equivalent to a single `fields` pane and
|
|
507
|
+
* still supported unchanged; supply this or `panes`, not both.
|
|
508
|
+
*/
|
|
509
|
+
attributes?: string[];
|
|
510
|
+
/** Ordered stacked sections, rendered top to bottom. */
|
|
511
|
+
panes?: SidePanelPane[];
|
|
512
|
+
/** Width in pixels. @default 480 */
|
|
484
513
|
width?: number;
|
|
485
514
|
}
|
|
486
515
|
/**
|
|
@@ -586,13 +615,10 @@ declare function isDetailView(view: ViewDefinition): view is DetailViewDefinitio
|
|
|
586
615
|
*/
|
|
587
616
|
declare function isListView(view: ViewDefinition): view is ListViewDefinition;
|
|
588
617
|
/**
|
|
589
|
-
* Check if a group is a field group
|
|
618
|
+
* Check if a group is a field group. Kept because persisted configs written
|
|
619
|
+
* before the relation group was removed may still carry another discriminant.
|
|
590
620
|
*/
|
|
591
621
|
declare function isFieldGroup(group: Group): group is FieldGroup;
|
|
592
|
-
/**
|
|
593
|
-
* Check if a group is a relation group
|
|
594
|
-
*/
|
|
595
|
-
declare function isRelationGroup(group: Group): group is RelationGroup;
|
|
596
622
|
|
|
597
623
|
interface AddAttributeInput {
|
|
598
624
|
name: string;
|
|
@@ -787,4 +813,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
787
813
|
*/
|
|
788
814
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
789
815
|
|
|
790
|
-
export { type
|
|
816
|
+
export { type SidePanelPane as $, type AttributeGroupField as A, type FilterGroup as B, type ConfigOverrides as C, type DetailViewConfig as D, type EmailsTab as E, type FilterState as F, type Group as G, type FormDensity as H, type FormTab as I, type FormsTab as J, type InverseSource as K, type ListViewConfig as L, type MeetingsTab as M, type ListViewLayout as N, NO_VALUE_OPERATORS as O, type NoValueOperator as P, OPERATORS_BY_TYPE as Q, type RelativeDateValue as R, type SortRule as S, type TableTab as T, type PhoneFilterValue as U, type ViewType as V, type QueryState as W, type RelationOption as X, type RelationOptionsResponse as Y, type RelationSource as Z, type RichtextTab as _, type ViewConfig as a, type SortDirection as a0, type TabType as a1, type TableSource as a2, type UpdateObjectInput as a3, type UpdateViewInput as a4, type ViewOverlay as a5, getRollupFilterOperators as a6, isDetailView as a7, isFieldGroup as a8, isListView as a9, isNoValueOperator as aa, multiselectOptionWriteSchema as ab, parseAttributeConfig as ac, parseAttributeConfigForCreate as ad, parseAttributeConfigForUpdate as ae, selectOptionWriteSchema as af, statusGroupSchema as ag, statusOptionWriteSchema as ah, attributeConfigSchemas as ai, getAttributeConfigSchema as aj, type FilterOperator as b, type DetailViewDefinition as c, type SidePanelConfig as d, type Field as e, type FieldGroup as f, type CreateMode as g, type Tab as h, type ListViewDefinition as i, type ViewDefinition as j, type ListViewTab as k, type FilterValue as l, type FilterRule as m, type DynamicValue as n, type ActivityTab as o, type AddAttributeInput as p, type AdvancedFilterState as q, type CreateCustomObjectInput as r, type CreateViewInput as s, type CurrencyFilterValue as t, type CustomTab as u, type DayMonthValue as v, type DocumentsTab as w, type EdgeQuantifier as x, type ExtendedFilterRule as y, type FilterCombinator as z };
|