@stndrds/schema 1.0.0-alpha.293 → 1.0.0-alpha.68
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-36UBIXJN.js +82 -0
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-IXHWBBIY.mjs +721 -0
- package/dist/chunk-KG75T7MA.mjs +18664 -0
- package/dist/chunk-NEVERCM3.js +41 -0
- package/dist/chunk-V2RPPE2Y.mjs +41 -0
- package/dist/chunk-V32FQLWX.js +721 -0
- package/dist/chunk-V5QXU2OK.mjs +82 -0
- package/dist/chunk-XGFBT4K2.js +18664 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/default-roles-42X3TJI5.mjs +21 -0
- package/dist/default-roles-C3FYDYMN.js +21 -0
- package/dist/index.d.mts +3392 -10860
- package/dist/index.d.ts +3392 -10860
- package/dist/index.js +1705 -10255
- package/dist/index.mjs +1735 -9398
- package/dist/runtime-B0G6eBXO.d.ts +12810 -0
- package/dist/runtime-fj4EKCWH.d.mts +12810 -0
- package/dist/runtime.d.mts +6 -0
- package/dist/runtime.d.ts +6 -0
- package/dist/runtime.js +323 -0
- package/dist/runtime.mjs +323 -0
- package/dist/utils.d.mts +55 -35
- package/dist/utils.d.ts +55 -35
- package/dist/utils.js +19 -31
- package/dist/utils.mjs +19 -2
- package/dist/validation/validators.d.mts +4 -0
- package/dist/validation/validators.d.ts +4 -0
- package/dist/validation/validators.js +121 -0
- package/dist/validation/validators.mjs +121 -0
- package/dist/validators-B6L_hVBw.d.ts +1564 -0
- package/dist/validators-CgiGGhyH.d.mts +1564 -0
- package/package.json +16 -106
- package/dist/all-CDJSpI46.d.ts +0 -978
- package/dist/all-Cru_CaSY.d.mts +0 -978
- package/dist/attributes-CNYwg_Nr.d.ts +0 -584
- package/dist/attributes-CWPLbp7c.d.mts +0 -584
- package/dist/capabilities.d.mts +0 -146
- package/dist/capabilities.d.ts +0 -146
- package/dist/capabilities.js +0 -77
- package/dist/capabilities.mjs +0 -70
- package/dist/chunk-5N7OSHVX.js +0 -657
- package/dist/chunk-5WATIVCA.js +0 -10
- package/dist/chunk-ACKMC6FL.js +0 -17
- package/dist/chunk-APRL56F4.mjs +0 -226
- package/dist/chunk-AYVHMVKQ.mjs +0 -15
- package/dist/chunk-C32UUQ6D.js +0 -241
- package/dist/chunk-E6JUYGJX.js +0 -22
- package/dist/chunk-EEH4XQ7W.js +0 -61
- package/dist/chunk-EW5XR2X3.js +0 -12
- package/dist/chunk-GO6LQADH.mjs +0 -57
- package/dist/chunk-GRUSTQK3.mjs +0 -641
- package/dist/chunk-HRQEZUAA.mjs +0 -29
- package/dist/chunk-HTSTPTNZ.js +0 -10
- package/dist/chunk-KNGWHQLR.js +0 -16
- package/dist/chunk-LV3FEUKU.mjs +0 -14
- package/dist/chunk-NS63SPNN.mjs +0 -8
- package/dist/chunk-O73ROMWQ.mjs +0 -85
- package/dist/chunk-OASIPLEB.js +0 -1504
- package/dist/chunk-OSSGN43B.mjs +0 -8
- package/dist/chunk-P4VCAPJT.js +0 -81
- package/dist/chunk-Q44QKLN4.mjs +0 -43
- package/dist/chunk-Q4SZAMJT.js +0 -72
- package/dist/chunk-QVLQPW3O.mjs +0 -10
- package/dist/chunk-QWKLQRBX.js +0 -35
- package/dist/chunk-R5LAJCBU.mjs +0 -67
- package/dist/chunk-SI34M4IC.js +0 -45
- package/dist/chunk-UANQJ2GH.mjs +0 -25
- package/dist/chunk-ULM2BA5A.mjs +0 -1432
- package/dist/chunk-UXAHLSWC.mjs +0 -8
- package/dist/chunk-V2UA2D4E.js +0 -10
- package/dist/chunk-VGGGLTYJ.mjs +0 -74
- package/dist/chunk-Y3UPKP2B.js +0 -605
- package/dist/chunk-YIP5FJ5H.js +0 -27
- package/dist/chunk-YKWSHBT5.js +0 -32
- package/dist/chunk-YUFTHPOE.mjs +0 -20
- package/dist/chunk-Z5OPSBMQ.mjs +0 -566
- package/dist/chunk-ZDQ5AP26.mjs +0 -31
- package/dist/chunk-ZPFOKBIN.js +0 -89
- package/dist/exceptions.d.mts +0 -507
- package/dist/exceptions.d.ts +0 -507
- package/dist/exceptions.js +0 -158
- package/dist/exceptions.mjs +0 -1
- package/dist/helpers-CXkVwpsl.d.ts +0 -76
- package/dist/helpers-Dul_r9rJ.d.mts +0 -76
- package/dist/index-BdVnHL3F.d.mts +0 -853
- package/dist/index-CFhPHQaI.d.ts +0 -853
- package/dist/migrations-DaFneOfx.d.ts +0 -39
- package/dist/migrations-fRvadl6i.d.mts +0 -39
- package/dist/objects-CDwMSnqv.d.mts +0 -250
- package/dist/objects-DJv6WrDE.d.ts +0 -250
- package/dist/types-CVYiFc69.d.mts +0 -38
- package/dist/types-NGEww_ln.d.ts +0 -38
- package/dist/validation/all.d.mts +0 -11
- package/dist/validation/all.d.ts +0 -11
- package/dist/validation/all.js +0 -131
- package/dist/validation/all.mjs +0 -18
- package/dist/validation/complex/currency.d.mts +0 -15
- package/dist/validation/complex/currency.d.ts +0 -15
- package/dist/validation/complex/currency.js +0 -11
- package/dist/validation/complex/currency.mjs +0 -2
- package/dist/validation/complex/location.d.mts +0 -22
- package/dist/validation/complex/location.d.ts +0 -22
- package/dist/validation/complex/location.js +0 -11
- package/dist/validation/complex/location.mjs +0 -2
- package/dist/validation/complex/phone.d.mts +0 -22
- package/dist/validation/complex/phone.d.ts +0 -22
- package/dist/validation/complex/phone.js +0 -11
- package/dist/validation/complex/phone.mjs +0 -2
- package/dist/validation/complex/relation.d.mts +0 -25
- package/dist/validation/complex/relation.d.ts +0 -25
- package/dist/validation/complex/relation.js +0 -19
- package/dist/validation/complex/relation.mjs +0 -2
- package/dist/validation/complex/richtext.d.mts +0 -13
- package/dist/validation/complex/richtext.d.ts +0 -13
- package/dist/validation/complex/richtext.js +0 -11
- package/dist/validation/complex/richtext.mjs +0 -2
- package/dist/validation/complex/select.d.mts +0 -20
- package/dist/validation/complex/select.d.ts +0 -20
- package/dist/validation/complex/select.js +0 -19
- package/dist/validation/complex/select.mjs +0 -2
- package/dist/validation/complex/user.d.mts +0 -13
- package/dist/validation/complex/user.d.ts +0 -13
- package/dist/validation/complex/user.js +0 -11
- package/dist/validation/complex/user.mjs +0 -2
- package/dist/validation/computed/formula.d.mts +0 -14
- package/dist/validation/computed/formula.d.ts +0 -14
- package/dist/validation/computed/formula.js +0 -11
- package/dist/validation/computed/formula.mjs +0 -2
- package/dist/validation/computed/rollup.d.mts +0 -14
- package/dist/validation/computed/rollup.d.ts +0 -14
- package/dist/validation/computed/rollup.js +0 -11
- package/dist/validation/computed/rollup.mjs +0 -2
- package/dist/validation/config/index.d.mts +0 -7
- package/dist/validation/config/index.d.ts +0 -7
- package/dist/validation/config/index.js +0 -52
- package/dist/validation/config/index.mjs +0 -7
- package/dist/validation/core/index.d.mts +0 -19
- package/dist/validation/core/index.d.ts +0 -19
- package/dist/validation/core/index.js +0 -14
- package/dist/validation/core/index.mjs +0 -1
- package/dist/validation/object/index.d.mts +0 -32
- package/dist/validation/object/index.d.ts +0 -32
- package/dist/validation/object/index.js +0 -69
- package/dist/validation/object/index.mjs +0 -16
- package/dist/validation/primitives/checkbox.d.mts +0 -12
- package/dist/validation/primitives/checkbox.d.ts +0 -12
- package/dist/validation/primitives/checkbox.js +0 -11
- package/dist/validation/primitives/checkbox.mjs +0 -2
- package/dist/validation/primitives/date.d.mts +0 -25
- package/dist/validation/primitives/date.d.ts +0 -25
- package/dist/validation/primitives/date.js +0 -11
- package/dist/validation/primitives/date.mjs +0 -2
- package/dist/validation/primitives/number.d.mts +0 -12
- package/dist/validation/primitives/number.d.ts +0 -12
- package/dist/validation/primitives/number.js +0 -11
- package/dist/validation/primitives/number.mjs +0 -2
- package/dist/validation/primitives/text.d.mts +0 -12
- package/dist/validation/primitives/text.d.ts +0 -12
- package/dist/validation/primitives/text.js +0 -11
- package/dist/validation/primitives/text.mjs +0 -2
package/dist/chunk-OASIPLEB.js
DELETED
|
@@ -1,1504 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk5N7OSHVX_js = require('./chunk-5N7OSHVX.js');
|
|
4
|
-
var chunkY3UPKP2B_js = require('./chunk-Y3UPKP2B.js');
|
|
5
|
-
var zod = require('zod');
|
|
6
|
-
|
|
7
|
-
// src/types/system-attributes.ts
|
|
8
|
-
var SYSTEM_ATTRIBUTE_I18N_KEYS = {
|
|
9
|
-
createdAt: "createdAt",
|
|
10
|
-
updatedAt: "updatedAt",
|
|
11
|
-
createdBy: "createdBy",
|
|
12
|
-
lastUpdatedBy: "lastUpdatedBy",
|
|
13
|
-
attachments: "attachments"
|
|
14
|
-
};
|
|
15
|
-
function getSystemAttributeI18nKey(name) {
|
|
16
|
-
return SYSTEM_ATTRIBUTE_I18N_KEYS[name];
|
|
17
|
-
}
|
|
18
|
-
var SYSTEM_ATTRIBUTES = {
|
|
19
|
-
createdAt: {
|
|
20
|
-
id: "system:createdAt",
|
|
21
|
-
name: "createdAt",
|
|
22
|
-
label: "Created time",
|
|
23
|
-
type: "date",
|
|
24
|
-
required: false,
|
|
25
|
-
system: true,
|
|
26
|
-
icon: "clock-circle",
|
|
27
|
-
description: "When this record was created"
|
|
28
|
-
},
|
|
29
|
-
updatedAt: {
|
|
30
|
-
id: "system:updatedAt",
|
|
31
|
-
name: "updatedAt",
|
|
32
|
-
label: "Last edited time",
|
|
33
|
-
type: "date",
|
|
34
|
-
required: false,
|
|
35
|
-
system: true,
|
|
36
|
-
icon: "clock-circle",
|
|
37
|
-
description: "When this record was last modified"
|
|
38
|
-
},
|
|
39
|
-
createdBy: {
|
|
40
|
-
id: "system:createdBy",
|
|
41
|
-
name: "createdBy",
|
|
42
|
-
label: "Created by",
|
|
43
|
-
type: "user",
|
|
44
|
-
required: false,
|
|
45
|
-
system: true,
|
|
46
|
-
multiple: false,
|
|
47
|
-
icon: "user",
|
|
48
|
-
description: "Actor who created this record"
|
|
49
|
-
},
|
|
50
|
-
lastUpdatedBy: {
|
|
51
|
-
id: "system:lastUpdatedBy",
|
|
52
|
-
name: "lastUpdatedBy",
|
|
53
|
-
label: "Last edited by",
|
|
54
|
-
type: "user",
|
|
55
|
-
required: false,
|
|
56
|
-
system: true,
|
|
57
|
-
multiple: false,
|
|
58
|
-
icon: "user",
|
|
59
|
-
description: "Actor who last modified this record"
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* System attribute for free-form document attachments.
|
|
63
|
-
* Hidden from forms, visible in Documents tab.
|
|
64
|
-
* Users can attach any document without template constraints.
|
|
65
|
-
*/
|
|
66
|
-
attachments: {
|
|
67
|
-
id: "system:attachments",
|
|
68
|
-
name: "attachments",
|
|
69
|
-
label: "Attachments",
|
|
70
|
-
type: "document",
|
|
71
|
-
required: false,
|
|
72
|
-
system: true,
|
|
73
|
-
hidden: true,
|
|
74
|
-
// Hidden from regular form views
|
|
75
|
-
icon: "paperclip",
|
|
76
|
-
description: "Free-form document attachments"
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
function getSystemAttributeList() {
|
|
80
|
-
return Object.values(SYSTEM_ATTRIBUTES);
|
|
81
|
-
}
|
|
82
|
-
function isManagedSystemAttribute(attribute) {
|
|
83
|
-
return attribute.id?.startsWith("system:") ?? false;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// src/types/attribute-capabilities.ts
|
|
87
|
-
var TEXT_OPERATORS = [
|
|
88
|
-
"is",
|
|
89
|
-
"is_not",
|
|
90
|
-
"contains",
|
|
91
|
-
"not_contains",
|
|
92
|
-
"starts_with",
|
|
93
|
-
"ends_with",
|
|
94
|
-
"is_empty",
|
|
95
|
-
"is_not_empty"
|
|
96
|
-
];
|
|
97
|
-
var NUMBER_OPERATORS = [
|
|
98
|
-
"is",
|
|
99
|
-
"is_not",
|
|
100
|
-
"less_than",
|
|
101
|
-
"greater_than",
|
|
102
|
-
"less_or_equal",
|
|
103
|
-
"greater_or_equal",
|
|
104
|
-
"is_empty",
|
|
105
|
-
"is_not_empty"
|
|
106
|
-
];
|
|
107
|
-
var CHECKBOX_OPERATORS = ["is"];
|
|
108
|
-
var DATE_OPERATORS = [
|
|
109
|
-
"is",
|
|
110
|
-
"is_not",
|
|
111
|
-
"less_than",
|
|
112
|
-
"greater_than",
|
|
113
|
-
"less_or_equal",
|
|
114
|
-
"greater_or_equal",
|
|
115
|
-
"is_within",
|
|
116
|
-
"on_day_month",
|
|
117
|
-
"is_empty",
|
|
118
|
-
"is_not_empty"
|
|
119
|
-
];
|
|
120
|
-
var SELECT_OPERATORS = [
|
|
121
|
-
"is",
|
|
122
|
-
"is_not",
|
|
123
|
-
"any_of",
|
|
124
|
-
"none_of",
|
|
125
|
-
"is_empty",
|
|
126
|
-
"is_not_empty"
|
|
127
|
-
];
|
|
128
|
-
var MULTISELECT_OPERATORS = [
|
|
129
|
-
"any_of",
|
|
130
|
-
"none_of",
|
|
131
|
-
"is_empty",
|
|
132
|
-
"is_not_empty"
|
|
133
|
-
];
|
|
134
|
-
var REFERENCE_OPERATORS = [
|
|
135
|
-
"is",
|
|
136
|
-
"is_not",
|
|
137
|
-
"any_of",
|
|
138
|
-
"none_of",
|
|
139
|
-
"is_empty",
|
|
140
|
-
"is_not_empty"
|
|
141
|
-
];
|
|
142
|
-
var PRESENCE_OPERATORS = [
|
|
143
|
-
"is_empty",
|
|
144
|
-
"is_not_empty"
|
|
145
|
-
];
|
|
146
|
-
var FORMULA_OPERATORS = [
|
|
147
|
-
"is",
|
|
148
|
-
"is_not",
|
|
149
|
-
"less_than",
|
|
150
|
-
"greater_than",
|
|
151
|
-
"less_or_equal",
|
|
152
|
-
"greater_or_equal",
|
|
153
|
-
"contains",
|
|
154
|
-
"not_contains",
|
|
155
|
-
"is_empty",
|
|
156
|
-
"is_not_empty"
|
|
157
|
-
];
|
|
158
|
-
var LOCATION_FILTER_PROPERTIES = ["city", "postalCode", "country"];
|
|
159
|
-
function isLocationFilterProperty(name) {
|
|
160
|
-
return LOCATION_FILTER_PROPERTIES.includes(name);
|
|
161
|
-
}
|
|
162
|
-
function isLocationPartOperator(operator) {
|
|
163
|
-
return TEXT_OPERATORS.includes(operator);
|
|
164
|
-
}
|
|
165
|
-
var ATTRIBUTE_FILTER_OPERATORS = {
|
|
166
|
-
text: TEXT_OPERATORS,
|
|
167
|
-
richtext: [],
|
|
168
|
-
number: NUMBER_OPERATORS,
|
|
169
|
-
checkbox: CHECKBOX_OPERATORS,
|
|
170
|
-
date: DATE_OPERATORS,
|
|
171
|
-
phone: ["is", "is_not", "contains", "not_contains", "starts_with", "is_empty", "is_not_empty"],
|
|
172
|
-
currency: NUMBER_OPERATORS,
|
|
173
|
-
status: SELECT_OPERATORS,
|
|
174
|
-
select: SELECT_OPERATORS,
|
|
175
|
-
multiselect: MULTISELECT_OPERATORS,
|
|
176
|
-
location: [],
|
|
177
|
-
user: REFERENCE_OPERATORS,
|
|
178
|
-
relation: REFERENCE_OPERATORS,
|
|
179
|
-
formula: FORMULA_OPERATORS,
|
|
180
|
-
document: PRESENCE_OPERATORS
|
|
181
|
-
};
|
|
182
|
-
var COMPUTED_TYPES = /* @__PURE__ */ new Set(["formula", "rollup"]);
|
|
183
|
-
var EDGE_BACKED_TYPES = /* @__PURE__ */ new Set(["user", "relation", "document"]);
|
|
184
|
-
var STATIC_DEFAULT_TYPES = /* @__PURE__ */ new Set([
|
|
185
|
-
"text",
|
|
186
|
-
"richtext",
|
|
187
|
-
"number",
|
|
188
|
-
"select",
|
|
189
|
-
"multiselect",
|
|
190
|
-
"status",
|
|
191
|
-
"date",
|
|
192
|
-
"phone",
|
|
193
|
-
"currency",
|
|
194
|
-
"location",
|
|
195
|
-
"user",
|
|
196
|
-
"relation",
|
|
197
|
-
"document"
|
|
198
|
-
]);
|
|
199
|
-
var PLACEHOLDER_TYPES = /* @__PURE__ */ new Set([
|
|
200
|
-
"text",
|
|
201
|
-
"number",
|
|
202
|
-
"date",
|
|
203
|
-
"phone",
|
|
204
|
-
"currency",
|
|
205
|
-
"select",
|
|
206
|
-
"multiselect"
|
|
207
|
-
]);
|
|
208
|
-
var SEARCHABLE_TYPES = /* @__PURE__ */ new Set([
|
|
209
|
-
"text",
|
|
210
|
-
"phone",
|
|
211
|
-
"status",
|
|
212
|
-
"select",
|
|
213
|
-
"multiselect"
|
|
214
|
-
]);
|
|
215
|
-
var SORTABLE_TYPES = /* @__PURE__ */ new Set([
|
|
216
|
-
"text",
|
|
217
|
-
"number",
|
|
218
|
-
"checkbox",
|
|
219
|
-
"date",
|
|
220
|
-
"phone",
|
|
221
|
-
"currency",
|
|
222
|
-
"status",
|
|
223
|
-
"select"
|
|
224
|
-
]);
|
|
225
|
-
function getAttributeCapabilities(attribute) {
|
|
226
|
-
const suppressed = Boolean(attribute.hidden || attribute.archived);
|
|
227
|
-
const active = !attribute.archived;
|
|
228
|
-
const computed = COMPUTED_TYPES.has(attribute.type);
|
|
229
|
-
const document = attribute.type === "document";
|
|
230
|
-
const edgeBacked = EDGE_BACKED_TYPES.has(attribute.type);
|
|
231
|
-
const cardinality = getAttributeCardinality(attribute);
|
|
232
|
-
const operators = suppressed ? [] : getRawFilterOperators(attribute);
|
|
233
|
-
const filterable = operators.length > 0 && !suppressed;
|
|
234
|
-
const searchable = !suppressed && SEARCHABLE_TYPES.has(attribute.type);
|
|
235
|
-
const sortable = !suppressed && SORTABLE_TYPES.has(attribute.type);
|
|
236
|
-
const groupable = !suppressed && isGroupableType(attribute.type);
|
|
237
|
-
const kanbanGroupable = !suppressed && attribute.type === "status";
|
|
238
|
-
const managed = isManagedSystemAttribute(attribute);
|
|
239
|
-
const readOnly = computed || document || managed;
|
|
240
|
-
const editable = !(suppressed || readOnly);
|
|
241
|
-
const required = isRequiredForbidden(attribute.type) ? "forbidden" : "allowed";
|
|
242
|
-
const defaultValue = getDefaultValueCapability(attribute.type);
|
|
243
|
-
const maxItems = supportsMaxItems(attribute);
|
|
244
|
-
const placeholder = PLACEHOLDER_TYPES.has(attribute.type);
|
|
245
|
-
const warningWhenDeprecated = Boolean(attribute.deprecated && !suppressed);
|
|
246
|
-
const editMode = resolveEditMode(attribute);
|
|
247
|
-
return {
|
|
248
|
-
lifecycle: {
|
|
249
|
-
active,
|
|
250
|
-
deprecated: Boolean(attribute.deprecated),
|
|
251
|
-
visibleInArchitect: true,
|
|
252
|
-
visibleInRuntime: !suppressed,
|
|
253
|
-
warningWhenDeprecated
|
|
254
|
-
},
|
|
255
|
-
storage: {
|
|
256
|
-
mode: computed ? "computed" : edgeBacked ? "edge" : "value",
|
|
257
|
-
cardinality,
|
|
258
|
-
edgeBacked,
|
|
259
|
-
preservesExistingValues: Boolean(attribute.archived),
|
|
260
|
-
qualifiedProperties: supportsQualifiedProperties(attribute.type),
|
|
261
|
-
polymorphic: getPolymorphicCapability(attribute),
|
|
262
|
-
maxItems
|
|
263
|
-
},
|
|
264
|
-
authoring: {
|
|
265
|
-
editable,
|
|
266
|
-
readOnly,
|
|
267
|
-
directEdit: editable && editMode === "inline",
|
|
268
|
-
required,
|
|
269
|
-
defaultValue,
|
|
270
|
-
placeholder,
|
|
271
|
-
maxItems
|
|
272
|
-
},
|
|
273
|
-
presentation: {
|
|
274
|
-
formField: !suppressed && isFormFieldType(attribute.type),
|
|
275
|
-
tableCell: !suppressed && isTableCellType(attribute.type),
|
|
276
|
-
defaultColumn: !suppressed && isDefaultColumnType(attribute.type),
|
|
277
|
-
compactDisplay: !suppressed,
|
|
278
|
-
popoverEditor: !suppressed && editMode === "popover",
|
|
279
|
-
placeholder,
|
|
280
|
-
warningWhenDeprecated
|
|
281
|
-
},
|
|
282
|
-
query: {
|
|
283
|
-
filterable,
|
|
284
|
-
searchable,
|
|
285
|
-
sortable,
|
|
286
|
-
groupable,
|
|
287
|
-
kanbanGroupable,
|
|
288
|
-
operators
|
|
289
|
-
},
|
|
290
|
-
agent: {
|
|
291
|
-
readable: !suppressed,
|
|
292
|
-
writable: editable && !document,
|
|
293
|
-
compactReadable: !suppressed,
|
|
294
|
-
contentReadable: !suppressed && isContentReadableType(attribute.type),
|
|
295
|
-
requiresDedicatedTool: document
|
|
296
|
-
},
|
|
297
|
-
exchange: {
|
|
298
|
-
importable: !suppressed,
|
|
299
|
-
exportable: !suppressed,
|
|
300
|
-
schemaExportable: true,
|
|
301
|
-
metadataExportable: false
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
function getAttributeFilterOperators(attribute) {
|
|
306
|
-
return getAttributeCapabilities(attribute).query.operators;
|
|
307
|
-
}
|
|
308
|
-
function isAttributeFilterable(attribute) {
|
|
309
|
-
return getAttributeCapabilities(attribute).query.filterable;
|
|
310
|
-
}
|
|
311
|
-
function isAttributeSearchable(attribute) {
|
|
312
|
-
return getAttributeCapabilities(attribute).query.searchable;
|
|
313
|
-
}
|
|
314
|
-
function isAttributeSortable(attribute) {
|
|
315
|
-
return getAttributeCapabilities(attribute).query.sortable;
|
|
316
|
-
}
|
|
317
|
-
function isAttributeGroupable(attribute) {
|
|
318
|
-
return getAttributeCapabilities(attribute).query.groupable;
|
|
319
|
-
}
|
|
320
|
-
function isAttributeKanbanGroupable(attribute) {
|
|
321
|
-
return getAttributeCapabilities(attribute).query.kanbanGroupable;
|
|
322
|
-
}
|
|
323
|
-
function resolveEffectiveFilterType(attribute) {
|
|
324
|
-
if (attribute.type !== "rollup") return attribute.type;
|
|
325
|
-
const rollup = attribute;
|
|
326
|
-
if (rollup.function === "earliest" || rollup.function === "latest") return "date";
|
|
327
|
-
if (rollup.function === "original") {
|
|
328
|
-
const targetType = rollup.targetAttributeType;
|
|
329
|
-
if (targetType && hasFilterOperatorEntry(targetType)) return targetType;
|
|
330
|
-
}
|
|
331
|
-
return "number";
|
|
332
|
-
}
|
|
333
|
-
function getRollupFilterOperators(attr) {
|
|
334
|
-
const effectiveType = resolveEffectiveFilterType(attr);
|
|
335
|
-
return hasFilterOperatorEntry(effectiveType) ? ATTRIBUTE_FILTER_OPERATORS[effectiveType] : ATTRIBUTE_FILTER_OPERATORS.number;
|
|
336
|
-
}
|
|
337
|
-
function getRawFilterOperators(attribute) {
|
|
338
|
-
if (attribute.type === "rollup") {
|
|
339
|
-
return getRollupFilterOperators(attribute);
|
|
340
|
-
}
|
|
341
|
-
return ATTRIBUTE_FILTER_OPERATORS[attribute.type] ?? [];
|
|
342
|
-
}
|
|
343
|
-
function getAttributeCardinality(attribute) {
|
|
344
|
-
if (attribute.type === "multiselect" || attribute.type === "document") return "many";
|
|
345
|
-
if (attribute.type === "user" && attribute.multiple === true) return "many";
|
|
346
|
-
if (attribute.type === "relation") return attribute.cardinality === "many" ? "many" : "one";
|
|
347
|
-
return "one";
|
|
348
|
-
}
|
|
349
|
-
function getPolymorphicCapability(attribute) {
|
|
350
|
-
if (attribute.type !== "relation") return "none";
|
|
351
|
-
const relation = attribute;
|
|
352
|
-
const targets = relation.targets ?? [];
|
|
353
|
-
if (targets.length === 1 && targets[0]?.object === "*") return "internal";
|
|
354
|
-
return targets.length > 1 ? "code-only" : "none";
|
|
355
|
-
}
|
|
356
|
-
function supportsMaxItems(attribute) {
|
|
357
|
-
if (attribute.type === "multiselect") return true;
|
|
358
|
-
if (attribute.type === "relation") return attribute.cardinality === "many";
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
function supportsQualifiedProperties(type) {
|
|
362
|
-
return type === "relation" || type === "document";
|
|
363
|
-
}
|
|
364
|
-
function isRequiredForbidden(type) {
|
|
365
|
-
return type === "checkbox" || type === "formula" || type === "rollup";
|
|
366
|
-
}
|
|
367
|
-
function getDefaultValueCapability(type) {
|
|
368
|
-
if (type === "checkbox") return "automatic";
|
|
369
|
-
if (type === "formula" || type === "rollup") return "forbidden";
|
|
370
|
-
if (STATIC_DEFAULT_TYPES.has(type)) return "static";
|
|
371
|
-
return "forbidden";
|
|
372
|
-
}
|
|
373
|
-
function isDefaultColumnType(type) {
|
|
374
|
-
return isTableCellType(type);
|
|
375
|
-
}
|
|
376
|
-
function isTableCellType(type) {
|
|
377
|
-
return type !== "richtext" && type !== "document";
|
|
378
|
-
}
|
|
379
|
-
function isFormFieldType(type) {
|
|
380
|
-
return type !== "richtext";
|
|
381
|
-
}
|
|
382
|
-
function resolveEditMode(attribute) {
|
|
383
|
-
switch (attribute.type) {
|
|
384
|
-
case "checkbox":
|
|
385
|
-
return "inline";
|
|
386
|
-
case "number":
|
|
387
|
-
return attribute.renderAs === "rating" ? "inline" : "default";
|
|
388
|
-
case "select":
|
|
389
|
-
case "multiselect":
|
|
390
|
-
return attribute.renderAs === "badges" ? "inline" : "popover";
|
|
391
|
-
case "status":
|
|
392
|
-
case "relation":
|
|
393
|
-
case "user":
|
|
394
|
-
case "date":
|
|
395
|
-
return "popover";
|
|
396
|
-
default:
|
|
397
|
-
return "default";
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function isGroupableType(type) {
|
|
401
|
-
return type === "status" || type === "currency";
|
|
402
|
-
}
|
|
403
|
-
function isContentReadableType(type) {
|
|
404
|
-
return type === "richtext" || type === "document";
|
|
405
|
-
}
|
|
406
|
-
function hasFilterOperatorEntry(type) {
|
|
407
|
-
return Object.prototype.hasOwnProperty.call(ATTRIBUTE_FILTER_OPERATORS, type);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// src/types/filters.ts
|
|
411
|
-
var OPERATORS_BY_TYPE = ATTRIBUTE_FILTER_OPERATORS;
|
|
412
|
-
var NO_VALUE_OPERATORS = ["is_empty", "is_not_empty"];
|
|
413
|
-
function isNoValueOperator(operator) {
|
|
414
|
-
return NO_VALUE_OPERATORS.includes(operator);
|
|
415
|
-
}
|
|
416
|
-
function getRollupFilterOperators2(attr) {
|
|
417
|
-
return getRollupFilterOperators(attr);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// src/filters/dynamic-value.ts
|
|
421
|
-
function isDynamicValue(value) {
|
|
422
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) && "dynamic" in value;
|
|
423
|
-
}
|
|
424
|
-
function currentActor() {
|
|
425
|
-
return { dynamic: "actor", ref: "current" };
|
|
426
|
-
}
|
|
427
|
-
function today() {
|
|
428
|
-
return { dynamic: "date", anchor: "today" };
|
|
429
|
-
}
|
|
430
|
-
function now() {
|
|
431
|
-
return { dynamic: "date", anchor: "now" };
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// src/filters/extract-filter-value.ts
|
|
435
|
-
function toAmount(value) {
|
|
436
|
-
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
437
|
-
if (typeof value === "string" && value.trim() !== "") {
|
|
438
|
-
const parsed = Number(value);
|
|
439
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
440
|
-
}
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
|
-
function extractCurrencyFilterValue(value) {
|
|
444
|
-
if (value !== null && typeof value === "object") {
|
|
445
|
-
return "value" in value ? toAmount(value.value) : null;
|
|
446
|
-
}
|
|
447
|
-
return toAmount(value);
|
|
448
|
-
}
|
|
449
|
-
function extractFilterValue(value) {
|
|
450
|
-
if (value === null || value === void 0) return null;
|
|
451
|
-
if (typeof value === "object" && "value" in value) {
|
|
452
|
-
return value.value ?? null;
|
|
453
|
-
}
|
|
454
|
-
return value;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
// src/filters/polarity.ts
|
|
458
|
-
var NEGATIVE_OPERATORS = /* @__PURE__ */ new Set([
|
|
459
|
-
"is_not",
|
|
460
|
-
"not_contains",
|
|
461
|
-
"none_of",
|
|
462
|
-
"is_empty"
|
|
463
|
-
]);
|
|
464
|
-
var NEGATIVE_TO_POSITIVE = {
|
|
465
|
-
is_not: "is",
|
|
466
|
-
not_contains: "contains",
|
|
467
|
-
none_of: "any_of",
|
|
468
|
-
is_empty: "is_not_empty"
|
|
469
|
-
};
|
|
470
|
-
function getOperatorPolarity(op) {
|
|
471
|
-
return NEGATIVE_OPERATORS.has(op) ? "none" : "any";
|
|
472
|
-
}
|
|
473
|
-
function normalizeForEdgeRpc(op) {
|
|
474
|
-
return NEGATIVE_TO_POSITIVE[op] ?? op;
|
|
475
|
-
}
|
|
476
|
-
var SINGLE_TO_MULTI = {
|
|
477
|
-
is: "any_of",
|
|
478
|
-
is_not: "none_of"
|
|
479
|
-
};
|
|
480
|
-
function toMultiValueOperator(op) {
|
|
481
|
-
return SINGLE_TO_MULTI[op] ?? op;
|
|
482
|
-
}
|
|
483
|
-
var SET_MEMBERSHIP_OPERATORS = new Set(
|
|
484
|
-
Object.values(SINGLE_TO_MULTI).filter((op) => op !== void 0)
|
|
485
|
-
);
|
|
486
|
-
function isSetMembershipOperator(op) {
|
|
487
|
-
return SET_MEMBERSHIP_OPERATORS.has(op);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
// src/filters/canonicalize-value.ts
|
|
491
|
-
function canonicalizeFilterValue(rule, effectiveType) {
|
|
492
|
-
const value = rule.value;
|
|
493
|
-
if (isNoValueOperator(rule.operator)) return;
|
|
494
|
-
if (value === null || value === void 0) return;
|
|
495
|
-
if (isDynamicValue(value)) return;
|
|
496
|
-
if (isSetMembershipOperator(rule.operator)) {
|
|
497
|
-
if (!Array.isArray(value)) rule.value = [value];
|
|
498
|
-
return;
|
|
499
|
-
}
|
|
500
|
-
if (effectiveType !== "currency") return;
|
|
501
|
-
const amount = extractCurrencyFilterValue(value);
|
|
502
|
-
if (amount !== null) {
|
|
503
|
-
rule.value = amount;
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
if (!hasCurrencyAmount(value)) return;
|
|
507
|
-
const message = `Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(
|
|
508
|
-
value
|
|
509
|
-
)}`;
|
|
510
|
-
throw new chunkY3UPKP2B_js.ValidationError(message, [{ path: ["value"], message }]);
|
|
511
|
-
}
|
|
512
|
-
function hasCurrencyAmount(value) {
|
|
513
|
-
if (typeof value !== "object") return true;
|
|
514
|
-
if (!("value" in value)) return false;
|
|
515
|
-
return value.value != null;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// src/filters/normalize-operator.ts
|
|
519
|
-
var SYNONYM_ALIASES = {
|
|
520
|
-
// equality
|
|
521
|
-
eq: "is",
|
|
522
|
-
equals: "is",
|
|
523
|
-
equal: "is",
|
|
524
|
-
"==": "is",
|
|
525
|
-
"=": "is",
|
|
526
|
-
neq: "is_not",
|
|
527
|
-
notEqual: "is_not",
|
|
528
|
-
isNot: "is_not",
|
|
529
|
-
"!=": "is_not",
|
|
530
|
-
"<>": "is_not",
|
|
531
|
-
// ordering
|
|
532
|
-
lt: "less_than",
|
|
533
|
-
"<": "less_than",
|
|
534
|
-
gt: "greater_than",
|
|
535
|
-
">": "greater_than",
|
|
536
|
-
lte: "less_or_equal",
|
|
537
|
-
"<=": "less_or_equal",
|
|
538
|
-
gte: "greater_or_equal",
|
|
539
|
-
">=": "greater_or_equal",
|
|
540
|
-
// set
|
|
541
|
-
in: "any_of",
|
|
542
|
-
isAnyOf: "any_of",
|
|
543
|
-
anyOf: "any_of",
|
|
544
|
-
oneOf: "any_of",
|
|
545
|
-
notIn: "none_of",
|
|
546
|
-
not_in: "none_of",
|
|
547
|
-
isNoneOf: "none_of",
|
|
548
|
-
noneOf: "none_of",
|
|
549
|
-
notOneOf: "none_of",
|
|
550
|
-
// text
|
|
551
|
-
startsWith: "starts_with",
|
|
552
|
-
beginsWith: "starts_with",
|
|
553
|
-
endsWith: "ends_with",
|
|
554
|
-
doesNotContain: "not_contains",
|
|
555
|
-
notContain: "not_contains",
|
|
556
|
-
// nullity
|
|
557
|
-
isEmpty: "is_empty",
|
|
558
|
-
isNotEmpty: "is_not_empty"
|
|
559
|
-
};
|
|
560
|
-
function normalizeOperator(rawOp) {
|
|
561
|
-
return SYNONYM_ALIASES[rawOp] ?? rawOp;
|
|
562
|
-
}
|
|
563
|
-
function normalizeFilterRule(rule) {
|
|
564
|
-
const normalized = normalizeOperator(rule.operator);
|
|
565
|
-
return normalized === rule.operator ? rule : { ...rule, operator: normalized };
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
// src/filters/relative-date.ts
|
|
569
|
-
var MS_PER_DAY = 864e5;
|
|
570
|
-
var RELATIVE_DATE_UNITS = /* @__PURE__ */ new Set(["days", "weeks", "months", "years"]);
|
|
571
|
-
var RELATIVE_DATE_DIRECTIONS = /* @__PURE__ */ new Set(["past", "future"]);
|
|
572
|
-
function isRelativeDateValue(value) {
|
|
573
|
-
if (typeof value !== "object" || value === null) return false;
|
|
574
|
-
const rel = value;
|
|
575
|
-
return typeof rel.amount === "number" && Number.isFinite(rel.amount) && rel.amount > 0 && typeof rel.unit === "string" && RELATIVE_DATE_UNITS.has(rel.unit) && typeof rel.direction === "string" && RELATIVE_DATE_DIRECTIONS.has(rel.direction);
|
|
576
|
-
}
|
|
577
|
-
function utcDayStart(date) {
|
|
578
|
-
return Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
579
|
-
}
|
|
580
|
-
function shiftUtcDay(dayStartMs, amount, unit) {
|
|
581
|
-
if (unit === "days") return dayStartMs + amount * MS_PER_DAY;
|
|
582
|
-
if (unit === "weeks") return dayStartMs + amount * 7 * MS_PER_DAY;
|
|
583
|
-
const from = new Date(dayStartMs);
|
|
584
|
-
const year = from.getUTCFullYear() + (unit === "years" ? amount : 0);
|
|
585
|
-
const month = from.getUTCMonth() + (unit === "months" ? amount : 0);
|
|
586
|
-
const lastDayOfTargetMonth = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
|
587
|
-
return Date.UTC(year, month, Math.min(from.getUTCDate(), lastDayOfTargetMonth));
|
|
588
|
-
}
|
|
589
|
-
function resolveIsWithinBounds(value, now2 = /* @__PURE__ */ new Date()) {
|
|
590
|
-
if (!isRelativeDateValue(value)) return null;
|
|
591
|
-
const todayStart = utcDayStart(now2);
|
|
592
|
-
const amount = Math.trunc(value.amount);
|
|
593
|
-
const bounds = value.direction === "past" ? {
|
|
594
|
-
startMs: shiftUtcDay(todayStart, -amount, value.unit),
|
|
595
|
-
endMs: todayStart + MS_PER_DAY
|
|
596
|
-
} : {
|
|
597
|
-
startMs: todayStart,
|
|
598
|
-
endMs: shiftUtcDay(todayStart, amount, value.unit) + MS_PER_DAY
|
|
599
|
-
};
|
|
600
|
-
if (!(Number.isFinite(bounds.startMs) && Number.isFinite(bounds.endMs))) return null;
|
|
601
|
-
return bounds;
|
|
602
|
-
}
|
|
603
|
-
function resolveUtcDayBounds(ms) {
|
|
604
|
-
if (!Number.isFinite(ms)) return null;
|
|
605
|
-
const startMs = utcDayStart(new Date(ms));
|
|
606
|
-
if (!Number.isFinite(startMs)) return null;
|
|
607
|
-
return { startMs, endMs: startMs + MS_PER_DAY };
|
|
608
|
-
}
|
|
609
|
-
function toUtcDayString(ms) {
|
|
610
|
-
return new Date(ms).toISOString().slice(0, 10);
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
// src/filters/validation.ts
|
|
614
|
-
var REFERENCE_TYPES = /* @__PURE__ */ new Set(["relation", "document", "user"]);
|
|
615
|
-
var ID_LIKE_OPERATORS = [
|
|
616
|
-
"is",
|
|
617
|
-
"is_not",
|
|
618
|
-
"any_of",
|
|
619
|
-
"none_of",
|
|
620
|
-
"is_empty",
|
|
621
|
-
"is_not_empty"
|
|
622
|
-
];
|
|
623
|
-
var SYSTEM_FILTER_OPERATORS = {
|
|
624
|
-
// Identifier columns (uuid)
|
|
625
|
-
id: ID_LIKE_OPERATORS,
|
|
626
|
-
objectId: ID_LIKE_OPERATORS,
|
|
627
|
-
tenantId: ID_LIKE_OPERATORS,
|
|
628
|
-
// Free-form text columns share their counterpart's operator set
|
|
629
|
-
label: OPERATORS_BY_TYPE.text,
|
|
630
|
-
// Date columns
|
|
631
|
-
createdAt: OPERATORS_BY_TYPE.date,
|
|
632
|
-
updatedAt: OPERATORS_BY_TYPE.date,
|
|
633
|
-
deletedAt: OPERATORS_BY_TYPE.date,
|
|
634
|
-
// User columns (uuid → actor identity)
|
|
635
|
-
createdBy: OPERATORS_BY_TYPE.user,
|
|
636
|
-
lastUpdatedBy: OPERATORS_BY_TYPE.user
|
|
637
|
-
};
|
|
638
|
-
var SYSTEM_FILTER_ATTRIBUTE_TYPES = {
|
|
639
|
-
id: "text",
|
|
640
|
-
objectId: "text",
|
|
641
|
-
objectName: "text",
|
|
642
|
-
tenantId: "text",
|
|
643
|
-
label: "text",
|
|
644
|
-
createdAt: "date",
|
|
645
|
-
updatedAt: "date",
|
|
646
|
-
deletedAt: "date",
|
|
647
|
-
deletedBy: "user",
|
|
648
|
-
createdBy: "user",
|
|
649
|
-
lastUpdatedBy: "user",
|
|
650
|
-
visibility: "select",
|
|
651
|
-
ownedBy: "user"
|
|
652
|
-
};
|
|
653
|
-
var REMOVED_OPERATOR_REPLACEMENTS = {
|
|
654
|
-
before: '"less_than"',
|
|
655
|
-
after: '"greater_than"',
|
|
656
|
-
on_or_before: '"less_or_equal"',
|
|
657
|
-
on_or_after: '"greater_or_equal"',
|
|
658
|
-
is_checked: '"is" with value true',
|
|
659
|
-
is_not_checked: '"is" with value false',
|
|
660
|
-
day_month_eq: '"on_day_month"'
|
|
661
|
-
};
|
|
662
|
-
var SET_MEMBERSHIP_TYPES = new Set(
|
|
663
|
-
Object.entries(ATTRIBUTE_FILTER_OPERATORS).filter(([, ops]) => ops.includes("any_of") && !ops.includes("contains")).map(([type]) => type)
|
|
664
|
-
);
|
|
665
|
-
var SUBSTRING_TO_MEMBERSHIP = {
|
|
666
|
-
contains: "any_of",
|
|
667
|
-
not_contains: "none_of"
|
|
668
|
-
};
|
|
669
|
-
function resolveCanonicalOperator(rawOperator, effectiveType) {
|
|
670
|
-
const replacement = REMOVED_OPERATOR_REPLACEMENTS[rawOperator];
|
|
671
|
-
if (replacement) {
|
|
672
|
-
const m = `Unknown filter operator "${rawOperator}" \u2014 use ${replacement}`;
|
|
673
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["operator"], message: m }]);
|
|
674
|
-
}
|
|
675
|
-
const normalized = normalizeOperator(rawOperator);
|
|
676
|
-
const membership = SUBSTRING_TO_MEMBERSHIP[normalized];
|
|
677
|
-
if (membership && SET_MEMBERSHIP_TYPES.has(effectiveType)) {
|
|
678
|
-
const m = `Operator "${normalized}" is not valid for type "${effectiveType}" \u2014 use "${membership}"`;
|
|
679
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["operator"], message: m }]);
|
|
680
|
-
}
|
|
681
|
-
return normalized;
|
|
682
|
-
}
|
|
683
|
-
function assertOperatorForType(operator, type, context) {
|
|
684
|
-
const normalized = resolveCanonicalOperator(operator, type);
|
|
685
|
-
const ops = OPERATORS_BY_TYPE[type];
|
|
686
|
-
if (!ops?.includes(normalized)) {
|
|
687
|
-
const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
|
|
688
|
-
const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
|
|
689
|
-
throw new chunkY3UPKP2B_js.ValidationError(summary, [
|
|
690
|
-
{
|
|
691
|
-
path: ["operator"],
|
|
692
|
-
message: summary
|
|
693
|
-
}
|
|
694
|
-
]);
|
|
695
|
-
}
|
|
696
|
-
return normalized;
|
|
697
|
-
}
|
|
698
|
-
function assertRelativeDateValue(rule) {
|
|
699
|
-
if (rule.operator !== "is_within") return;
|
|
700
|
-
if (!isRelativeDateValue(rule.value)) {
|
|
701
|
-
const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
|
|
702
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
function applyCanonicalForm(rule, operator, effectiveType) {
|
|
706
|
-
rule.operator = operator;
|
|
707
|
-
canonicalizeFilterValue(rule, effectiveType);
|
|
708
|
-
assertRelativeDateValue(rule);
|
|
709
|
-
}
|
|
710
|
-
function assertDynamicValueForAttribute(rule, attrType) {
|
|
711
|
-
if (!isDynamicValue(rule.value)) return;
|
|
712
|
-
const v = rule.value;
|
|
713
|
-
if (v.dynamic === "actor" && attrType !== "user") {
|
|
714
|
-
const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
|
|
715
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
716
|
-
}
|
|
717
|
-
if (v.dynamic === "date" && attrType !== "date") {
|
|
718
|
-
const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
|
|
719
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
var LOCATION_PARTS_LIST = LOCATION_FILTER_PROPERTIES.map((part) => `"${part}"`).join(", ");
|
|
723
|
-
function locationPartsHint(type) {
|
|
724
|
-
return type === "location" ? ` A location is filtered on one of its parts: set "property" to one of ${LOCATION_PARTS_LIST} and use a text operator (e.g. contains).` : "";
|
|
725
|
-
}
|
|
726
|
-
function collectQualifiedRuleIssues(rule, context) {
|
|
727
|
-
try {
|
|
728
|
-
validateQualifiedRule({ ...rule }, context);
|
|
729
|
-
return [];
|
|
730
|
-
} catch (error) {
|
|
731
|
-
if (!(error instanceof chunkY3UPKP2B_js.ValidationError)) throw error;
|
|
732
|
-
return error.errors.map((issue) => ({ ...issue, path: [...issue.path] }));
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
function validateQualifiedRule(rule, context) {
|
|
736
|
-
const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
|
|
737
|
-
const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
|
|
738
|
-
if (!(rootAttr || systemOps)) {
|
|
739
|
-
const [head, ...tail] = rule.attribute.split(".");
|
|
740
|
-
const dottedRoot = tail.length > 0 ? context.attributes.find((a) => a.name === head) : void 0;
|
|
741
|
-
const dottedHint = dottedRoot?.type === "location" ? ` Dotted paths are not supported \u2014 set "attribute" to "${head}" and "property" to ${isLocationFilterProperty(tail[0] ?? "") ? `"${tail[0]}"` : `one of ${LOCATION_PARTS_LIST}`}.` : rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
|
|
742
|
-
const m = `Unknown attribute: ${rule.attribute}${dottedHint}`;
|
|
743
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["attribute"], message: m }]);
|
|
744
|
-
}
|
|
745
|
-
if (rule.quantifier !== void 0 && !rule.property) {
|
|
746
|
-
const m = `quantifier is only valid on qualified edge rules (set "property")`;
|
|
747
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
|
|
748
|
-
}
|
|
749
|
-
if (!rootAttr) {
|
|
750
|
-
if (rule.property) {
|
|
751
|
-
throw new chunkY3UPKP2B_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
|
|
752
|
-
{ path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
|
|
753
|
-
]);
|
|
754
|
-
}
|
|
755
|
-
const effectiveType = SYSTEM_FILTER_ATTRIBUTE_TYPES[rule.attribute] ?? "text";
|
|
756
|
-
const normalizedOperator2 = resolveCanonicalOperator(rule.operator, effectiveType);
|
|
757
|
-
if (!systemOps.includes(normalizedOperator2)) {
|
|
758
|
-
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
759
|
-
throw new chunkY3UPKP2B_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
760
|
-
}
|
|
761
|
-
applyCanonicalForm(rule, normalizedOperator2, effectiveType);
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
if (!rule.property) {
|
|
765
|
-
assertDynamicValueForAttribute(rule, rootAttr.type);
|
|
766
|
-
const ops = getAttributeFilterOperators(rootAttr);
|
|
767
|
-
const normalizedOperator2 = resolveCanonicalOperator(rule.operator, rootAttr.type);
|
|
768
|
-
if (!ops.includes(normalizedOperator2)) {
|
|
769
|
-
const validList = ops.length ? ops.join(", ") : "(not filterable)";
|
|
770
|
-
const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationPartsHint(rootAttr.type)}`;
|
|
771
|
-
throw new chunkY3UPKP2B_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
772
|
-
}
|
|
773
|
-
applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
if (rootAttr.type === "location") {
|
|
777
|
-
if (rule.quantifier !== void 0) {
|
|
778
|
-
const m = "quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";
|
|
779
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
|
|
780
|
-
}
|
|
781
|
-
if (!isLocationFilterProperty(rule.property)) {
|
|
782
|
-
const m = `Property "${rule.property}" is not a part of location "${rule.attribute}". Valid parts: ${LOCATION_PARTS_LIST}.`;
|
|
783
|
-
throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["property"], message: m }]);
|
|
784
|
-
}
|
|
785
|
-
assertDynamicValueForAttribute(rule, "text");
|
|
786
|
-
const normalizedOperator2 = assertOperatorForType(rule.operator, "text", "property");
|
|
787
|
-
applyCanonicalForm(rule, normalizedOperator2, "text");
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
791
|
-
throw new chunkY3UPKP2B_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
|
|
792
|
-
{ path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
|
|
793
|
-
]);
|
|
794
|
-
}
|
|
795
|
-
const propSchema = rootAttr.properties;
|
|
796
|
-
if (!propSchema) {
|
|
797
|
-
throw new chunkY3UPKP2B_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
|
|
798
|
-
{ path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
|
|
799
|
-
]);
|
|
800
|
-
}
|
|
801
|
-
const propDef = propSchema.definitions.find((p) => p.name === rule.property);
|
|
802
|
-
if (!propDef) {
|
|
803
|
-
throw new chunkY3UPKP2B_js.ValidationError(
|
|
804
|
-
`Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
|
|
805
|
-
[{ path: ["property"], message: `Unknown property: ${rule.property}` }]
|
|
806
|
-
);
|
|
807
|
-
}
|
|
808
|
-
const normalizedOperator = assertOperatorForType(rule.operator, propDef.type, "property");
|
|
809
|
-
applyCanonicalForm(rule, normalizedOperator, propDef.type);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
// src/types/objects.ts
|
|
813
|
-
var RESOURCE_VISIBILITIES = ["workspace", "private"];
|
|
814
|
-
var LIST_VIEW_TAB_VISIBILITIES = ["all", ...RESOURCE_VISIBILITIES];
|
|
815
|
-
function parseResourceVisibility(value) {
|
|
816
|
-
if (typeof value === "string" && RESOURCE_VISIBILITIES.includes(value)) {
|
|
817
|
-
return value;
|
|
818
|
-
}
|
|
819
|
-
throw new chunkY3UPKP2B_js.ValidationError(
|
|
820
|
-
`visibility must be one of: ${RESOURCE_VISIBILITIES.join(", ")} (received: ${String(value)})`,
|
|
821
|
-
[]
|
|
822
|
-
);
|
|
823
|
-
}
|
|
824
|
-
var SYSTEM_FIELD_NAMES = [
|
|
825
|
-
"id",
|
|
826
|
-
"createdAt",
|
|
827
|
-
"updatedAt",
|
|
828
|
-
"createdBy",
|
|
829
|
-
"lastUpdatedBy",
|
|
830
|
-
"visibility",
|
|
831
|
-
"ownedBy"
|
|
832
|
-
];
|
|
833
|
-
var RESERVED_ATTRIBUTE_NAMES = [
|
|
834
|
-
// System fields (auto-managed)
|
|
835
|
-
...SYSTEM_FIELD_NAMES,
|
|
836
|
-
// Other ObjectRecord properties
|
|
837
|
-
"objectId",
|
|
838
|
-
"label",
|
|
839
|
-
"embeddingText",
|
|
840
|
-
"values",
|
|
841
|
-
"metadata",
|
|
842
|
-
"deletedAt",
|
|
843
|
-
"deletedBy",
|
|
844
|
-
"schemaVersion",
|
|
845
|
-
// Physical SQL alias; custom attributes may otherwise use snake_case names.
|
|
846
|
-
"owned_by"
|
|
847
|
-
];
|
|
848
|
-
var RESERVED_OBJECT_NAMES = ["skill"];
|
|
849
|
-
|
|
850
|
-
// src/validators/view-config.schema.ts
|
|
851
|
-
var createModeSchema = zod.z.enum(["redirect", "inline", "peek"]);
|
|
852
|
-
var nonEmptyStringArraySchema = zod.z.array(zod.z.string()).min(1);
|
|
853
|
-
var columnsSchema = zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.columnsPerTab);
|
|
854
|
-
var displayAttributesSchema = zod.z.array(zod.z.string().min(1)).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.columnsPerTab).refine((names) => new Set(names).size === names.length, {
|
|
855
|
-
message: "Displayed attribute names must be unique"
|
|
856
|
-
});
|
|
857
|
-
var sortRuleSchema = zod.z.object({
|
|
858
|
-
attribute: zod.z.string(),
|
|
859
|
-
direction: zod.z.enum(["asc", "desc"])
|
|
860
|
-
}).strict();
|
|
861
|
-
var sortsSchema = zod.z.array(sortRuleSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sortsPerTab);
|
|
862
|
-
var relativeDateValueSchema = zod.z.object({
|
|
863
|
-
amount: zod.z.number(),
|
|
864
|
-
unit: zod.z.enum(["days", "weeks", "months", "years"]),
|
|
865
|
-
direction: zod.z.enum(["past", "future"])
|
|
866
|
-
}).strict();
|
|
867
|
-
var currencyFilterValueSchema = zod.z.object({
|
|
868
|
-
value: zod.z.number().nullable(),
|
|
869
|
-
code: zod.z.array(zod.z.string()).optional()
|
|
870
|
-
}).strict();
|
|
871
|
-
var phoneFilterValueSchema = zod.z.object({
|
|
872
|
-
phoneNumber: zod.z.string().nullable(),
|
|
873
|
-
countryCode: zod.z.string().optional()
|
|
874
|
-
}).strict();
|
|
875
|
-
var dynamicFilterValueSchema = zod.z.discriminatedUnion("dynamic", [
|
|
876
|
-
zod.z.object({
|
|
877
|
-
dynamic: zod.z.literal("actor"),
|
|
878
|
-
ref: zod.z.literal("current")
|
|
879
|
-
}).strict(),
|
|
880
|
-
zod.z.object({
|
|
881
|
-
dynamic: zod.z.literal("date"),
|
|
882
|
-
anchor: zod.z.enum(["today", "now"])
|
|
883
|
-
}).strict()
|
|
884
|
-
]);
|
|
885
|
-
var dayMonthValueSchema = zod.z.object({
|
|
886
|
-
month: zod.z.number(),
|
|
887
|
-
day: zod.z.number()
|
|
888
|
-
}).strict();
|
|
889
|
-
var filterValueSchema = zod.z.union([
|
|
890
|
-
zod.z.string(),
|
|
891
|
-
zod.z.number(),
|
|
892
|
-
zod.z.boolean(),
|
|
893
|
-
zod.z.array(zod.z.string()),
|
|
894
|
-
relativeDateValueSchema,
|
|
895
|
-
currencyFilterValueSchema,
|
|
896
|
-
phoneFilterValueSchema,
|
|
897
|
-
dayMonthValueSchema,
|
|
898
|
-
dynamicFilterValueSchema,
|
|
899
|
-
zod.z.null()
|
|
900
|
-
]);
|
|
901
|
-
var filterOperatorSchema = zod.z.enum(
|
|
902
|
-
[
|
|
903
|
-
"is",
|
|
904
|
-
"is_not",
|
|
905
|
-
"contains",
|
|
906
|
-
"not_contains",
|
|
907
|
-
"starts_with",
|
|
908
|
-
"ends_with",
|
|
909
|
-
"is_empty",
|
|
910
|
-
"is_not_empty",
|
|
911
|
-
"less_than",
|
|
912
|
-
"greater_than",
|
|
913
|
-
"less_or_equal",
|
|
914
|
-
"greater_or_equal",
|
|
915
|
-
"is_within",
|
|
916
|
-
"on_day_month",
|
|
917
|
-
"any_of",
|
|
918
|
-
"none_of"
|
|
919
|
-
],
|
|
920
|
-
{
|
|
921
|
-
error: (issue) => {
|
|
922
|
-
const input = issue.input;
|
|
923
|
-
const replacement = typeof input === "string" ? REMOVED_OPERATOR_REPLACEMENTS[input] : void 0;
|
|
924
|
-
return replacement ? `Unknown filter operator "${input}" \u2014 use ${replacement}` : void 0;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
);
|
|
928
|
-
var filterRuleSchema = zod.z.object({
|
|
929
|
-
attribute: zod.z.string(),
|
|
930
|
-
property: zod.z.string().optional(),
|
|
931
|
-
quantifier: zod.z.enum(["any", "none"]).optional(),
|
|
932
|
-
operator: filterOperatorSchema,
|
|
933
|
-
value: filterValueSchema
|
|
934
|
-
}).strict();
|
|
935
|
-
var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.filterRulesPerTab);
|
|
936
|
-
var filterStateSchema = zod.z.object({
|
|
937
|
-
combinator: zod.z.enum(["and", "or"]),
|
|
938
|
-
rules: filterRulesSchema
|
|
939
|
-
}).strict();
|
|
940
|
-
var filterGroupSchema = zod.z.object({
|
|
941
|
-
id: zod.z.string(),
|
|
942
|
-
combinator: zod.z.enum(["and", "or"]),
|
|
943
|
-
rules: filterRulesSchema
|
|
944
|
-
}).strict();
|
|
945
|
-
function addDuplicateIdIssues(values, ctx, pathPrefix = []) {
|
|
946
|
-
const seen = /* @__PURE__ */ new Set();
|
|
947
|
-
values.forEach((value, index) => {
|
|
948
|
-
if (seen.has(value.id)) {
|
|
949
|
-
ctx.addIssue({
|
|
950
|
-
code: "custom",
|
|
951
|
-
message: `Duplicate id "${value.id}"`,
|
|
952
|
-
path: [...pathPrefix, index, "id"]
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
seen.add(value.id);
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
function addDuplicateNameIssues(values, ctx, pathPrefix = []) {
|
|
959
|
-
const seen = /* @__PURE__ */ new Set();
|
|
960
|
-
values.forEach((value, index) => {
|
|
961
|
-
if (seen.has(value.name)) {
|
|
962
|
-
ctx.addIssue({
|
|
963
|
-
code: "custom",
|
|
964
|
-
message: `Duplicate name "${value.name}"`,
|
|
965
|
-
path: [...pathPrefix, index, "name"]
|
|
966
|
-
});
|
|
967
|
-
}
|
|
968
|
-
seen.add(value.name);
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
var attributeGroupFieldSchema = zod.z.object({
|
|
972
|
-
id: zod.z.string(),
|
|
973
|
-
label: zod.z.string(),
|
|
974
|
-
description: zod.z.string().optional(),
|
|
975
|
-
attributes: nonEmptyStringArraySchema,
|
|
976
|
-
displayTemplate: zod.z.string().optional()
|
|
977
|
-
}).strict();
|
|
978
|
-
var fieldPresentationShape = {
|
|
979
|
-
span: zod.z.union([
|
|
980
|
-
zod.z.literal(1),
|
|
981
|
-
zod.z.literal(2),
|
|
982
|
-
zod.z.literal(3),
|
|
983
|
-
zod.z.literal(4),
|
|
984
|
-
zod.z.literal(5),
|
|
985
|
-
zod.z.literal(6),
|
|
986
|
-
zod.z.literal(7),
|
|
987
|
-
zod.z.literal(8),
|
|
988
|
-
zod.z.literal(9),
|
|
989
|
-
zod.z.literal(10),
|
|
990
|
-
zod.z.literal(11),
|
|
991
|
-
zod.z.literal(12)
|
|
992
|
-
]).optional(),
|
|
993
|
-
label: zod.z.string().optional(),
|
|
994
|
-
readOnly: zod.z.boolean().optional()
|
|
995
|
-
};
|
|
996
|
-
var fieldShape = {
|
|
997
|
-
attribute: zod.z.string().optional(),
|
|
998
|
-
attributeGroup: attributeGroupFieldSchema.optional(),
|
|
999
|
-
...fieldPresentationShape
|
|
1000
|
-
};
|
|
1001
|
-
function refineField(field, ctx) {
|
|
1002
|
-
if (field.attribute === void 0 === (field.attributeGroup === void 0)) {
|
|
1003
|
-
ctx.addIssue({
|
|
1004
|
-
code: "custom",
|
|
1005
|
-
message: "A field must define exactly one of attribute or attributeGroup"
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
var fieldSchema = zod.z.object({
|
|
1010
|
-
/** Stable slot identity. Optional: a builder may omit it, `ensureFieldIds` assigns it. */
|
|
1011
|
-
id: zod.z.string().optional(),
|
|
1012
|
-
...fieldShape
|
|
1013
|
-
}).strict().superRefine(refineField);
|
|
1014
|
-
var fieldSlotSchema = zod.z.object({ id: zod.z.string().min(1), ...fieldShape }).strict().superRefine(refineField);
|
|
1015
|
-
var baseGroupShape = {
|
|
1016
|
-
id: zod.z.string(),
|
|
1017
|
-
label: zod.z.string(),
|
|
1018
|
-
description: zod.z.string().optional(),
|
|
1019
|
-
collapsible: zod.z.boolean().optional(),
|
|
1020
|
-
collapsed: zod.z.boolean().optional(),
|
|
1021
|
-
order: zod.z.number().optional()
|
|
1022
|
-
};
|
|
1023
|
-
var fieldGroupWriteSchema = zod.z.object({
|
|
1024
|
-
...baseGroupShape,
|
|
1025
|
-
type: zod.z.literal("fields"),
|
|
1026
|
-
fields: zod.z.array(fieldSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerGroup)
|
|
1027
|
-
}).strict();
|
|
1028
|
-
var groupWriteSchema = fieldGroupWriteSchema;
|
|
1029
|
-
var baseTabShape = {
|
|
1030
|
-
id: zod.z.string(),
|
|
1031
|
-
name: zod.z.string(),
|
|
1032
|
-
label: zod.z.string(),
|
|
1033
|
-
icon: chunk5N7OSHVX_js.iconNameSchema.optional(),
|
|
1034
|
-
order: zod.z.number().optional()
|
|
1035
|
-
};
|
|
1036
|
-
var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.groupsPerFormTab);
|
|
1037
|
-
var formTabShape = {
|
|
1038
|
-
...baseTabShape,
|
|
1039
|
-
type: zod.z.literal("form"),
|
|
1040
|
-
groups: formTabGroupsSchema,
|
|
1041
|
-
formColumns: zod.z.union([zod.z.literal(1), zod.z.literal(2), zod.z.literal(3)]).optional(),
|
|
1042
|
-
density: zod.z.enum(["compact", "comfortable", "spacious"]).optional()
|
|
1043
|
-
};
|
|
1044
|
-
var formTabDraftObjectSchema = zod.z.object(formTabShape).strict();
|
|
1045
|
-
function refineFormTab(tab, ctx) {
|
|
1046
|
-
addDuplicateIdIssues(tab.groups, ctx, ["groups"]);
|
|
1047
|
-
const totalFields = tab.groups.reduce(
|
|
1048
|
-
(count, group) => count + (group.type === "fields" ? group.fields.length : 0),
|
|
1049
|
-
0
|
|
1050
|
-
);
|
|
1051
|
-
if (totalFields > chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab) {
|
|
1052
|
-
ctx.addIssue({
|
|
1053
|
-
code: "too_big",
|
|
1054
|
-
origin: "array",
|
|
1055
|
-
maximum: chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab,
|
|
1056
|
-
inclusive: true,
|
|
1057
|
-
message: `A form tab can contain at most ${chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
|
|
1058
|
-
path: ["groups"]
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
const seenAttributeGroupIds = /* @__PURE__ */ new Set();
|
|
1062
|
-
tab.groups.forEach((group, groupIndex) => {
|
|
1063
|
-
if (group.type !== "fields") return;
|
|
1064
|
-
group.fields.forEach((field, fieldIndex) => {
|
|
1065
|
-
if (field.attributeGroup === void 0) return;
|
|
1066
|
-
const { id } = field.attributeGroup;
|
|
1067
|
-
if (seenAttributeGroupIds.has(id)) {
|
|
1068
|
-
ctx.addIssue({
|
|
1069
|
-
code: "custom",
|
|
1070
|
-
message: `Duplicate attribute group id "${id}"`,
|
|
1071
|
-
path: ["groups", groupIndex, "fields", fieldIndex, "attributeGroup", "id"]
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
seenAttributeGroupIds.add(id);
|
|
1075
|
-
});
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
var formTabWriteSchema = zod.z.object({ ...formTabShape, groups: formTabGroupsSchema.min(1) }).strict().superRefine(refineFormTab);
|
|
1079
|
-
var formTabDraftSchema = formTabDraftObjectSchema.superRefine(refineFormTab);
|
|
1080
|
-
var relationSourceSchema = zod.z.object({
|
|
1081
|
-
type: zod.z.literal("relation"),
|
|
1082
|
-
attribute: zod.z.string()
|
|
1083
|
-
}).strict();
|
|
1084
|
-
var inverseSourceSchema = zod.z.object({
|
|
1085
|
-
type: zod.z.literal("inverse"),
|
|
1086
|
-
object: zod.z.string(),
|
|
1087
|
-
attribute: zod.z.string()
|
|
1088
|
-
}).strict();
|
|
1089
|
-
var tableSourceSchema = zod.z.discriminatedUnion("type", [
|
|
1090
|
-
relationSourceSchema,
|
|
1091
|
-
inverseSourceSchema
|
|
1092
|
-
]);
|
|
1093
|
-
var tableTabSchema = zod.z.object({
|
|
1094
|
-
...baseTabShape,
|
|
1095
|
-
type: zod.z.literal("table"),
|
|
1096
|
-
source: tableSourceSchema,
|
|
1097
|
-
columns: columnsSchema,
|
|
1098
|
-
allowCreate: zod.z.boolean().optional(),
|
|
1099
|
-
createMode: createModeSchema.optional(),
|
|
1100
|
-
allowEdit: zod.z.boolean().optional(),
|
|
1101
|
-
allowDelete: zod.z.boolean().optional(),
|
|
1102
|
-
filters: filterStateSchema.optional(),
|
|
1103
|
-
sorts: sortsSchema.optional()
|
|
1104
|
-
}).strict();
|
|
1105
|
-
var JSON_PROPS_MAX_DEPTH = 64;
|
|
1106
|
-
var JSON_PROPS_MAX_NODES = 1e4;
|
|
1107
|
-
function isPlainJsonObject(value) {
|
|
1108
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1109
|
-
return prototype === Object.prototype || prototype === null;
|
|
1110
|
-
}
|
|
1111
|
-
function addJsonIssue(ctx, message, path = []) {
|
|
1112
|
-
ctx.addIssue({ code: "custom", message, path });
|
|
1113
|
-
}
|
|
1114
|
-
function pushJsonArrayChildren(current, frame, stack, ctx) {
|
|
1115
|
-
for (const key of Reflect.ownKeys(current)) {
|
|
1116
|
-
if (key === "length") continue;
|
|
1117
|
-
if (key === "__proto__") {
|
|
1118
|
-
addJsonIssue(ctx, "The __proto__ key is not allowed in custom props", [...frame.path, key]);
|
|
1119
|
-
continue;
|
|
1120
|
-
}
|
|
1121
|
-
if (typeof key === "symbol" || !/^(0|[1-9]\d*)$/.test(key)) {
|
|
1122
|
-
addJsonIssue(ctx, "Arrays cannot contain non-index JSON properties", [...frame.path, key]);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
for (let index = current.length - 1; index >= 0; index--) {
|
|
1126
|
-
const descriptor = Object.getOwnPropertyDescriptor(current, String(index));
|
|
1127
|
-
const path = [...frame.path, index];
|
|
1128
|
-
if (!(descriptor && "value" in descriptor)) {
|
|
1129
|
-
addJsonIssue(ctx, "Sparse arrays are not valid JSON values", path);
|
|
1130
|
-
continue;
|
|
1131
|
-
}
|
|
1132
|
-
stack.push({ kind: "enter", value: descriptor.value, path, depth: frame.depth + 1 });
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
function pushJsonObjectChildren(current, frame, stack, ctx) {
|
|
1136
|
-
const keys = Reflect.ownKeys(current);
|
|
1137
|
-
for (let index = keys.length - 1; index >= 0; index--) {
|
|
1138
|
-
const key = keys[index];
|
|
1139
|
-
const path = [...frame.path, key];
|
|
1140
|
-
if (key === "__proto__") {
|
|
1141
|
-
addJsonIssue(ctx, "The __proto__ key is not allowed in custom props", path);
|
|
1142
|
-
continue;
|
|
1143
|
-
}
|
|
1144
|
-
if (typeof key === "symbol") {
|
|
1145
|
-
addJsonIssue(ctx, "Symbol keys are not valid JSON keys", path);
|
|
1146
|
-
continue;
|
|
1147
|
-
}
|
|
1148
|
-
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
1149
|
-
if (!(descriptor?.enumerable && "value" in descriptor)) {
|
|
1150
|
-
addJsonIssue(ctx, "Custom props must contain enumerable data properties only", path);
|
|
1151
|
-
continue;
|
|
1152
|
-
}
|
|
1153
|
-
stack.push({ kind: "enter", value: descriptor.value, path, depth: frame.depth + 1 });
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
function validateJsonProps(value, ctx) {
|
|
1157
|
-
if (value === null || typeof value !== "object") {
|
|
1158
|
-
addJsonIssue(ctx, "Expected a plain JSON object");
|
|
1159
|
-
return;
|
|
1160
|
-
}
|
|
1161
|
-
try {
|
|
1162
|
-
if (Array.isArray(value) || !isPlainJsonObject(value)) {
|
|
1163
|
-
addJsonIssue(ctx, "Expected a plain JSON object");
|
|
1164
|
-
return;
|
|
1165
|
-
}
|
|
1166
|
-
} catch {
|
|
1167
|
-
addJsonIssue(ctx, "Custom props contain an object that cannot be safely inspected");
|
|
1168
|
-
return;
|
|
1169
|
-
}
|
|
1170
|
-
const activeChain = /* @__PURE__ */ new WeakSet();
|
|
1171
|
-
const stack = [{ kind: "enter", value, path: [], depth: 0 }];
|
|
1172
|
-
let visitedNodes = 0;
|
|
1173
|
-
while (stack.length > 0) {
|
|
1174
|
-
const frame = stack.pop();
|
|
1175
|
-
if (!frame) break;
|
|
1176
|
-
if (frame.kind === "exit") {
|
|
1177
|
-
activeChain.delete(frame.value);
|
|
1178
|
-
continue;
|
|
1179
|
-
}
|
|
1180
|
-
visitedNodes++;
|
|
1181
|
-
if (visitedNodes > JSON_PROPS_MAX_NODES) {
|
|
1182
|
-
addJsonIssue(
|
|
1183
|
-
ctx,
|
|
1184
|
-
`Custom props cannot exceed ${JSON_PROPS_MAX_NODES.toLocaleString("en-US")} total JSON nodes`,
|
|
1185
|
-
frame.path
|
|
1186
|
-
);
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
if (frame.depth > JSON_PROPS_MAX_DEPTH) {
|
|
1190
|
-
addJsonIssue(ctx, `Custom props cannot exceed depth ${JSON_PROPS_MAX_DEPTH}`, frame.path);
|
|
1191
|
-
continue;
|
|
1192
|
-
}
|
|
1193
|
-
const current = frame.value;
|
|
1194
|
-
if (current === null || typeof current === "string" || typeof current === "boolean" || typeof current === "number" && Number.isFinite(current)) {
|
|
1195
|
-
continue;
|
|
1196
|
-
}
|
|
1197
|
-
if (typeof current !== "object") {
|
|
1198
|
-
addJsonIssue(ctx, "Expected a JSON value", frame.path);
|
|
1199
|
-
continue;
|
|
1200
|
-
}
|
|
1201
|
-
if (activeChain.has(current)) {
|
|
1202
|
-
addJsonIssue(ctx, "Custom props cannot contain circular references", frame.path);
|
|
1203
|
-
continue;
|
|
1204
|
-
}
|
|
1205
|
-
try {
|
|
1206
|
-
if (Array.isArray(current)) {
|
|
1207
|
-
activeChain.add(current);
|
|
1208
|
-
stack.push({ kind: "exit", value: current });
|
|
1209
|
-
pushJsonArrayChildren(current, frame, stack, ctx);
|
|
1210
|
-
continue;
|
|
1211
|
-
}
|
|
1212
|
-
if (!isPlainJsonObject(current)) {
|
|
1213
|
-
addJsonIssue(ctx, "Expected an array or plain JSON object", frame.path);
|
|
1214
|
-
continue;
|
|
1215
|
-
}
|
|
1216
|
-
activeChain.add(current);
|
|
1217
|
-
stack.push({ kind: "exit", value: current });
|
|
1218
|
-
pushJsonObjectChildren(current, frame, stack, ctx);
|
|
1219
|
-
} catch {
|
|
1220
|
-
addJsonIssue(
|
|
1221
|
-
ctx,
|
|
1222
|
-
"Custom props contain an object that cannot be safely inspected",
|
|
1223
|
-
frame.path
|
|
1224
|
-
);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
var jsonPropsSchema = zod.z.unknown().superRefine(validateJsonProps).transform((value) => value);
|
|
1229
|
-
var customTabSchema = zod.z.object({
|
|
1230
|
-
...baseTabShape,
|
|
1231
|
-
type: zod.z.literal("custom"),
|
|
1232
|
-
component: zod.z.string(),
|
|
1233
|
-
props: jsonPropsSchema.optional()
|
|
1234
|
-
}).strict();
|
|
1235
|
-
var activityTabSchema = zod.z.object({
|
|
1236
|
-
...baseTabShape,
|
|
1237
|
-
type: zod.z.literal("activity"),
|
|
1238
|
-
limit: zod.z.number().optional()
|
|
1239
|
-
}).strict();
|
|
1240
|
-
var richtextTabSchema = zod.z.object({
|
|
1241
|
-
...baseTabShape,
|
|
1242
|
-
type: zod.z.literal("richtext"),
|
|
1243
|
-
attribute: zod.z.string(),
|
|
1244
|
-
titleAttribute: zod.z.string().optional()
|
|
1245
|
-
}).strict();
|
|
1246
|
-
var documentsTabSchema = zod.z.object({
|
|
1247
|
-
...baseTabShape,
|
|
1248
|
-
type: zod.z.literal("documents"),
|
|
1249
|
-
allowUpload: zod.z.boolean().optional(),
|
|
1250
|
-
allowRemove: zod.z.boolean().optional(),
|
|
1251
|
-
hideAttachments: zod.z.boolean().optional()
|
|
1252
|
-
}).strict();
|
|
1253
|
-
var formsTabSchema = zod.z.object({
|
|
1254
|
-
...baseTabShape,
|
|
1255
|
-
type: zod.z.literal("forms"),
|
|
1256
|
-
objectName: zod.z.string().optional()
|
|
1257
|
-
}).strict();
|
|
1258
|
-
var emailsTabSchema = zod.z.object({
|
|
1259
|
-
...baseTabShape,
|
|
1260
|
-
type: zod.z.literal("emails"),
|
|
1261
|
-
emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.emailAttributesPerTab)
|
|
1262
|
-
}).strict();
|
|
1263
|
-
var meetingsTabSchema = zod.z.object({
|
|
1264
|
-
...baseTabShape,
|
|
1265
|
-
type: zod.z.literal("meetings"),
|
|
1266
|
-
emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.emailAttributesPerTab)
|
|
1267
|
-
}).strict();
|
|
1268
|
-
var nonFormDetailTabSchemas = [
|
|
1269
|
-
tableTabSchema,
|
|
1270
|
-
customTabSchema,
|
|
1271
|
-
activityTabSchema,
|
|
1272
|
-
richtextTabSchema,
|
|
1273
|
-
documentsTabSchema,
|
|
1274
|
-
formsTabSchema,
|
|
1275
|
-
emailsTabSchema,
|
|
1276
|
-
meetingsTabSchema
|
|
1277
|
-
];
|
|
1278
|
-
var detailTabSchema = zod.z.discriminatedUnion("type", [
|
|
1279
|
-
formTabWriteSchema,
|
|
1280
|
-
...nonFormDetailTabSchemas
|
|
1281
|
-
]);
|
|
1282
|
-
var detailTabDraftSchema = zod.z.discriminatedUnion("type", [
|
|
1283
|
-
formTabDraftSchema,
|
|
1284
|
-
...nonFormDetailTabSchemas
|
|
1285
|
-
]);
|
|
1286
|
-
var listTabCommonShape = {
|
|
1287
|
-
id: zod.z.string(),
|
|
1288
|
-
label: zod.z.string(),
|
|
1289
|
-
icon: chunk5N7OSHVX_js.iconNameSchema.optional(),
|
|
1290
|
-
default: zod.z.boolean().optional(),
|
|
1291
|
-
// Which records the tab scopes to. `"all"` is the default and means "impose
|
|
1292
|
-
// no scope" — the mandatory viewer predicate alone decides, so the tab shows
|
|
1293
|
-
// workspace records plus the viewer's own private ones. Defaulted rather than
|
|
1294
|
-
// required so configs stored before the field existed still parse.
|
|
1295
|
-
visibility: zod.z.enum(LIST_VIEW_TAB_VISIBILITIES).default("all"),
|
|
1296
|
-
columns: columnsSchema,
|
|
1297
|
-
descriptionAttribute: zod.z.string().min(1).optional(),
|
|
1298
|
-
displayAttributes: displayAttributesSchema.optional(),
|
|
1299
|
-
filters: filterGroupSchema.optional(),
|
|
1300
|
-
sorts: sortsSchema.optional(),
|
|
1301
|
-
readOnly: zod.z.boolean().optional(),
|
|
1302
|
-
createMode: createModeSchema.optional()
|
|
1303
|
-
};
|
|
1304
|
-
var listTableTabSchema = zod.z.object({
|
|
1305
|
-
...listTabCommonShape,
|
|
1306
|
-
layout: zod.z.literal("table"),
|
|
1307
|
-
columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
|
|
1308
|
-
// Opted-in system views expose their immutable code grouping as an inert
|
|
1309
|
-
// hint so Architect can return to Kanban after a saved layout change.
|
|
1310
|
-
groupByAttribute: zod.z.string().min(1).optional()
|
|
1311
|
-
}).strict();
|
|
1312
|
-
var listKanbanTabSchema = zod.z.object({
|
|
1313
|
-
...listTabCommonShape,
|
|
1314
|
-
layout: zod.z.literal("kanban"),
|
|
1315
|
-
columns: columnsSchema.default([]),
|
|
1316
|
-
groupByAttribute: zod.z.string(),
|
|
1317
|
-
cardUserAttribute: zod.z.string().optional(),
|
|
1318
|
-
cardDateAttribute: zod.z.string().optional(),
|
|
1319
|
-
kanbanColumnOrder: zod.z.array(zod.z.string()).optional(),
|
|
1320
|
-
kanbanColumnVisibility: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
|
|
1321
|
-
kanbanPinnedColumns: zod.z.array(zod.z.string()).optional()
|
|
1322
|
-
}).strict();
|
|
1323
|
-
var listRowsTabSchema = zod.z.object({
|
|
1324
|
-
...listTabCommonShape,
|
|
1325
|
-
layout: zod.z.literal("list"),
|
|
1326
|
-
columns: columnsSchema.default([]),
|
|
1327
|
-
columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
|
|
1328
|
-
groupByAttribute: zod.z.string().min(1).optional()
|
|
1329
|
-
}).strict();
|
|
1330
|
-
var listViewTabSchema = zod.z.discriminatedUnion("layout", [
|
|
1331
|
-
listTableTabSchema,
|
|
1332
|
-
listRowsTabSchema,
|
|
1333
|
-
listKanbanTabSchema
|
|
1334
|
-
]);
|
|
1335
|
-
var _listViewConfigSchema = zod.z.object({
|
|
1336
|
-
allowPresentationCustomization: zod.z.boolean().optional(),
|
|
1337
|
-
defaultFilters: filterGroupSchema.optional(),
|
|
1338
|
-
tabs: zod.z.array(listViewTabSchema).min(1).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.tabsPerView)
|
|
1339
|
-
}).strict().superRefine((config, ctx) => {
|
|
1340
|
-
addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
|
|
1341
|
-
let hasDefault = false;
|
|
1342
|
-
config.tabs.forEach((tab, index) => {
|
|
1343
|
-
if (tab.layout !== "kanban" && tab.groupByAttribute !== void 0 && config.allowPresentationCustomization !== true) {
|
|
1344
|
-
ctx.addIssue({
|
|
1345
|
-
code: "unrecognized_keys",
|
|
1346
|
-
keys: ["groupByAttribute"],
|
|
1347
|
-
path: ["tabs", index]
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
if (!tab.default) return;
|
|
1351
|
-
if (hasDefault) {
|
|
1352
|
-
ctx.addIssue({
|
|
1353
|
-
code: "custom",
|
|
1354
|
-
message: "Only one list tab can be the default",
|
|
1355
|
-
path: ["tabs", index, "default"]
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
hasDefault = true;
|
|
1359
|
-
});
|
|
1360
|
-
});
|
|
1361
|
-
var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
|
|
1362
|
-
zod.z.object({
|
|
1363
|
-
kind: zod.z.literal("fields"),
|
|
1364
|
-
id: zod.z.string().optional(),
|
|
1365
|
-
label: zod.z.string().optional(),
|
|
1366
|
-
attributes: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelAttributes)
|
|
1367
|
-
}).strict(),
|
|
1368
|
-
zod.z.object({
|
|
1369
|
-
kind: zod.z.literal("activity"),
|
|
1370
|
-
id: zod.z.string().optional(),
|
|
1371
|
-
label: zod.z.string().optional()
|
|
1372
|
-
}).strict(),
|
|
1373
|
-
zod.z.object({
|
|
1374
|
-
kind: zod.z.literal("documents"),
|
|
1375
|
-
// Required here alone: the documents content keys its stored sort mode
|
|
1376
|
-
// on this id, so a pane without one would share the main-column
|
|
1377
|
-
// documents tab's sort.
|
|
1378
|
-
id: zod.z.string(),
|
|
1379
|
-
label: zod.z.string().optional(),
|
|
1380
|
-
allowUpload: zod.z.boolean().optional(),
|
|
1381
|
-
allowRemove: zod.z.boolean().optional()
|
|
1382
|
-
}).strict()
|
|
1383
|
-
]);
|
|
1384
|
-
var _detailViewConfigSchema = zod.z.object({
|
|
1385
|
-
tabs: zod.z.array(detailTabSchema).min(1).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.tabsPerView),
|
|
1386
|
-
sidePanel: zod.z.object({
|
|
1387
|
-
attributes: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
|
|
1388
|
-
panes: zod.z.array(sidePanelPaneSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
|
|
1389
|
-
width: zod.z.number().optional()
|
|
1390
|
-
}).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
|
|
1391
|
-
message: "sidePanel requires attributes or panes"
|
|
1392
|
-
}).refine((sidePanel) => sidePanel.panes === void 0 || sidePanel.panes.length > 0, {
|
|
1393
|
-
message: "sidePanel panes must not be empty"
|
|
1394
|
-
}).refine((sidePanel) => sidePanel.attributes === void 0 || sidePanel.panes === void 0, {
|
|
1395
|
-
message: "sidePanel takes attributes or panes, not both"
|
|
1396
|
-
}).optional()
|
|
1397
|
-
}).strict().superRefine((config, ctx) => {
|
|
1398
|
-
addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
|
|
1399
|
-
addDuplicateNameIssues(config.tabs, ctx, ["tabs"]);
|
|
1400
|
-
});
|
|
1401
|
-
var listViewConfigSchema = _listViewConfigSchema;
|
|
1402
|
-
var detailViewConfigSchema = _detailViewConfigSchema;
|
|
1403
|
-
var viewTypeSchema = zod.z.enum(["list", "detail"]);
|
|
1404
|
-
var viewConfigByTypeSchema = zod.z.discriminatedUnion("type", [
|
|
1405
|
-
zod.z.object({
|
|
1406
|
-
type: zod.z.literal("list"),
|
|
1407
|
-
config: listViewConfigSchema
|
|
1408
|
-
}).strict(),
|
|
1409
|
-
zod.z.object({
|
|
1410
|
-
type: zod.z.literal("detail"),
|
|
1411
|
-
config: detailViewConfigSchema
|
|
1412
|
-
}).strict()
|
|
1413
|
-
]);
|
|
1414
|
-
function parseViewConfig(type, input) {
|
|
1415
|
-
switch (type) {
|
|
1416
|
-
case "list":
|
|
1417
|
-
return listViewConfigSchema.parse(input);
|
|
1418
|
-
case "detail":
|
|
1419
|
-
return detailViewConfigSchema.parse(input);
|
|
1420
|
-
default:
|
|
1421
|
-
return viewConfigByTypeSchema.parse({ type, config: input }).config;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
var LIST_TAB_TABLE_KEYS = ["columnSizing"];
|
|
1425
|
-
var LIST_TAB_KANBAN_KEYS = [
|
|
1426
|
-
"groupByAttribute",
|
|
1427
|
-
"cardUserAttribute",
|
|
1428
|
-
"cardDateAttribute",
|
|
1429
|
-
"kanbanColumnOrder",
|
|
1430
|
-
"kanbanColumnVisibility",
|
|
1431
|
-
"kanbanPinnedColumns"
|
|
1432
|
-
];
|
|
1433
|
-
|
|
1434
|
-
exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
|
|
1435
|
-
exports.LIST_TAB_KANBAN_KEYS = LIST_TAB_KANBAN_KEYS;
|
|
1436
|
-
exports.LIST_TAB_TABLE_KEYS = LIST_TAB_TABLE_KEYS;
|
|
1437
|
-
exports.LIST_VIEW_TAB_VISIBILITIES = LIST_VIEW_TAB_VISIBILITIES;
|
|
1438
|
-
exports.LOCATION_FILTER_PROPERTIES = LOCATION_FILTER_PROPERTIES;
|
|
1439
|
-
exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS;
|
|
1440
|
-
exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
|
|
1441
|
-
exports.REMOVED_OPERATOR_REPLACEMENTS = REMOVED_OPERATOR_REPLACEMENTS;
|
|
1442
|
-
exports.RESERVED_ATTRIBUTE_NAMES = RESERVED_ATTRIBUTE_NAMES;
|
|
1443
|
-
exports.RESERVED_OBJECT_NAMES = RESERVED_OBJECT_NAMES;
|
|
1444
|
-
exports.RESOURCE_VISIBILITIES = RESOURCE_VISIBILITIES;
|
|
1445
|
-
exports.SYNONYM_ALIASES = SYNONYM_ALIASES;
|
|
1446
|
-
exports.SYSTEM_ATTRIBUTES = SYSTEM_ATTRIBUTES;
|
|
1447
|
-
exports.SYSTEM_ATTRIBUTE_I18N_KEYS = SYSTEM_ATTRIBUTE_I18N_KEYS;
|
|
1448
|
-
exports.SYSTEM_FIELD_NAMES = SYSTEM_FIELD_NAMES;
|
|
1449
|
-
exports.SYSTEM_FILTER_ATTRIBUTE_TYPES = SYSTEM_FILTER_ATTRIBUTE_TYPES;
|
|
1450
|
-
exports.canonicalizeFilterValue = canonicalizeFilterValue;
|
|
1451
|
-
exports.collectQualifiedRuleIssues = collectQualifiedRuleIssues;
|
|
1452
|
-
exports.columnsSchema = columnsSchema;
|
|
1453
|
-
exports.currentActor = currentActor;
|
|
1454
|
-
exports.detailTabDraftSchema = detailTabDraftSchema;
|
|
1455
|
-
exports.detailTabSchema = detailTabSchema;
|
|
1456
|
-
exports.detailViewConfigSchema = detailViewConfigSchema;
|
|
1457
|
-
exports.displayAttributesSchema = displayAttributesSchema;
|
|
1458
|
-
exports.extractCurrencyFilterValue = extractCurrencyFilterValue;
|
|
1459
|
-
exports.extractFilterValue = extractFilterValue;
|
|
1460
|
-
exports.fieldSchema = fieldSchema;
|
|
1461
|
-
exports.fieldShape = fieldShape;
|
|
1462
|
-
exports.fieldSlotSchema = fieldSlotSchema;
|
|
1463
|
-
exports.filterGroupSchema = filterGroupSchema;
|
|
1464
|
-
exports.filterStateSchema = filterStateSchema;
|
|
1465
|
-
exports.getAttributeCapabilities = getAttributeCapabilities;
|
|
1466
|
-
exports.getAttributeFilterOperators = getAttributeFilterOperators;
|
|
1467
|
-
exports.getOperatorPolarity = getOperatorPolarity;
|
|
1468
|
-
exports.getRollupFilterOperators = getRollupFilterOperators2;
|
|
1469
|
-
exports.getSystemAttributeI18nKey = getSystemAttributeI18nKey;
|
|
1470
|
-
exports.getSystemAttributeList = getSystemAttributeList;
|
|
1471
|
-
exports.groupWriteSchema = groupWriteSchema;
|
|
1472
|
-
exports.inverseSourceSchema = inverseSourceSchema;
|
|
1473
|
-
exports.isAttributeFilterable = isAttributeFilterable;
|
|
1474
|
-
exports.isAttributeGroupable = isAttributeGroupable;
|
|
1475
|
-
exports.isAttributeKanbanGroupable = isAttributeKanbanGroupable;
|
|
1476
|
-
exports.isAttributeSearchable = isAttributeSearchable;
|
|
1477
|
-
exports.isAttributeSortable = isAttributeSortable;
|
|
1478
|
-
exports.isDynamicValue = isDynamicValue;
|
|
1479
|
-
exports.isLocationFilterProperty = isLocationFilterProperty;
|
|
1480
|
-
exports.isLocationPartOperator = isLocationPartOperator;
|
|
1481
|
-
exports.isManagedSystemAttribute = isManagedSystemAttribute;
|
|
1482
|
-
exports.isNoValueOperator = isNoValueOperator;
|
|
1483
|
-
exports.isRelativeDateValue = isRelativeDateValue;
|
|
1484
|
-
exports.isSetMembershipOperator = isSetMembershipOperator;
|
|
1485
|
-
exports.listViewConfigSchema = listViewConfigSchema;
|
|
1486
|
-
exports.listViewTabSchema = listViewTabSchema;
|
|
1487
|
-
exports.normalizeFilterRule = normalizeFilterRule;
|
|
1488
|
-
exports.normalizeForEdgeRpc = normalizeForEdgeRpc;
|
|
1489
|
-
exports.normalizeOperator = normalizeOperator;
|
|
1490
|
-
exports.now = now;
|
|
1491
|
-
exports.parseResourceVisibility = parseResourceVisibility;
|
|
1492
|
-
exports.parseViewConfig = parseViewConfig;
|
|
1493
|
-
exports.relationSourceSchema = relationSourceSchema;
|
|
1494
|
-
exports.resolveEffectiveFilterType = resolveEffectiveFilterType;
|
|
1495
|
-
exports.resolveIsWithinBounds = resolveIsWithinBounds;
|
|
1496
|
-
exports.resolveUtcDayBounds = resolveUtcDayBounds;
|
|
1497
|
-
exports.sortsSchema = sortsSchema;
|
|
1498
|
-
exports.tableSourceSchema = tableSourceSchema;
|
|
1499
|
-
exports.toMultiValueOperator = toMultiValueOperator;
|
|
1500
|
-
exports.toUtcDayString = toUtcDayString;
|
|
1501
|
-
exports.today = today;
|
|
1502
|
-
exports.validateQualifiedRule = validateQualifiedRule;
|
|
1503
|
-
exports.viewConfigByTypeSchema = viewConfigByTypeSchema;
|
|
1504
|
-
exports.viewTypeSchema = viewTypeSchema;
|