بنقرة واحدة
add-field
Adds a new field to an existing Ybyra schema with proper type, configuration, i18n keys, and event wiring.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Adds a new field to an existing Ybyra schema with proper type, configuration, i18n keys, and event wiring.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Adds a custom action to a Ybyra schema with handler, positioning, variant, and scope configuration.
Generate or update internationalization (i18n) locale files for an Ybyra domain. Use when the user asks to add translations, create locale files, or update labels for a domain's fields, groups, and actions.
Creates a complete domain structure for Ybyra — schema, events, handlers, and hooks — from a natural language description of the entity.
Creates all CRUD pages (list, add, view, edit) with routing for a Ybyra domain in any supported framework — React Web, React Native, Vue/Quasar, or SvelteKit.
Creates a service layer with persistence for a Ybyra domain, implementing ServiceContract with optional custom methods.
| name | add-field |
| description | Adds a new field to an existing Ybyra schema with proper type, configuration, i18n keys, and event wiring. |
Add a new field to an existing Ybyra domain schema.
schema.ts)Choose the right factory function and chain configuration methods:
fields: {
// ... existing fields
newField: text().width(50).required().column().group("basic"),
}
| Type | Factory | Specific Methods |
|---|---|---|
| Text | text() | .kind(Text.Email|Phone|Url|...), .minLength(n), .maxLength(n), .pattern(regex) |
| Number | number() | .min(n), .max(n), .precision(n) |
| Date | date() | .min(date), .max(date) |
| Datetime | datetime() | .min(date), .max(date) |
| Currency | currency() | .min(n), .max(n), .precision(n), .prefix(str) |
| Toggle | toggle() | — |
| Checkbox | checkbox() | — |
| Select | select<V>() | generic over value type |
| File | file() | .accept(types), .maxSize(bytes) |
.width(n) — percentage width (100 = full row)
.height(n) — height in units
.default(value) — initial value
.required() — required validation
.hidden() — hidden by default
.disabled() — read-only by default
.column() — show in table
.filterable() — searchable in table
.group("name") — visual group
.scopes(Scope.add) — only in these scopes
.excludeScopes() — hidden in these scopes
In locale file (e.g., locales/pt-BR.ts):
{domain}: {
// ... existing keys
fields: {
// ... existing keys
"newField": "Label do Campo",
"newField.placeholder":"Digite...", // optional
}
}
events.ts)export const { domain }
Events = { Domain }
Schema.events({
// ... existing events
newField: {
change ({ state, schema }) {
// React to field changes
},
},
});
schema.ts)And add i18n key:
export const ExampleSchema = schema.create("example", {
// ... existing keys
groups: {
// ... existing keys
newGroup: group(),
}
// ... existing keys
}
{domain}: {
// ... existing keys
groups: {
// ... existing keys
"newGroup": "The group label",
}
},