@proteos/sdk 0.54.1 → 0.55.0

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.
@@ -1317,6 +1317,37 @@ var PageLayoutSchema = z.object({
1317
1317
  side_panel: PageLayoutSidePanelSchema.optional(),
1318
1318
  style: PageStyleSchema.optional()
1319
1319
  });
1320
+
1321
+ // src/meta/record-title.ts
1322
+ var RECORD_TITLE_FIELD = "record_title";
1323
+ function isReservedAttributeName(name) {
1324
+ return name === RECORD_TITLE_FIELD;
1325
+ }
1326
+ function isTitleQueryable(template) {
1327
+ if (!template?.includes("{{")) return false;
1328
+ if (template.includes("{%") || template.includes("%}")) return false;
1329
+ let rest = template;
1330
+ while (rest !== "") {
1331
+ const open = rest.indexOf("{{");
1332
+ if (open < 0) return !rest.includes("}}");
1333
+ if (rest.slice(0, open).includes("}}")) return false;
1334
+ rest = rest.slice(open + 2);
1335
+ const close = rest.indexOf("}}");
1336
+ if (close < 0) return false;
1337
+ if (!/^[a-z][a-z0-9_]*$/.test(rest.slice(0, close).trim())) return false;
1338
+ rest = rest.slice(close + 2);
1339
+ }
1340
+ return true;
1341
+ }
1342
+ function titleTemplateVariables(template) {
1343
+ if (!template || !isTitleQueryable(template)) return [];
1344
+ const out = [];
1345
+ for (const match of template.matchAll(/\{\{\s*([a-z][a-z0-9_]*)\s*\}\}/g)) {
1346
+ const name = match[1];
1347
+ if (name && !out.includes(name)) out.push(name);
1348
+ }
1349
+ return out;
1350
+ }
1320
1351
  var ResponseMetaSchema = z.object({
1321
1352
  page: z.number(),
1322
1353
  page_size: z.number(),
@@ -1833,6 +1864,6 @@ var MetaClient = class {
1833
1864
  }
1834
1865
  };
1835
1866
 
1836
- export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, BUILT_IN_CONTROLS, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileAttributeMetaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, LayoutElementSchema, LayoutElementType, LayoutTabSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_BACKGROUND_TOKENS, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageLayoutSidePanelSchema, PageSchema, PageStyleSchema, PrincipalRefSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SizeValueSchema, SortConfigSchema, UserAttributeMetaSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isBuiltInControl, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, lookupCompatibleControls, lookupControls, lookupPrimaryControl, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parsePrincipalMeta, parseRelationMeta, parseUserMeta, platformAttributes };
1837
- //# sourceMappingURL=chunk-B2EZDFFH.js.map
1838
- //# sourceMappingURL=chunk-B2EZDFFH.js.map
1867
+ export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, BUILT_IN_CONTROLS, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileAttributeMetaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, LayoutElementSchema, LayoutElementType, LayoutTabSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_BACKGROUND_TOKENS, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageLayoutSidePanelSchema, PageSchema, PageStyleSchema, PrincipalRefSchema, RECORD_TITLE_FIELD, RelationAttributeMetaSchema, ResponseMetaSchema, SizeValueSchema, SortConfigSchema, UserAttributeMetaSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isBuiltInControl, isCurrentUserDefault, isPlatformAttributeName, isReservedAttributeName, isTitleQueryable, localeNumberSeparators, lookupCompatibleControls, lookupControls, lookupPrimaryControl, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parsePrincipalMeta, parseRelationMeta, parseUserMeta, platformAttributes, titleTemplateVariables };
1868
+ //# sourceMappingURL=chunk-WJYUQBEG.js.map
1869
+ //# sourceMappingURL=chunk-WJYUQBEG.js.map