@masterteam/properties
v0.0.71
Published
`PropertyForm` accepts a typed `scope` input. Route hosts should map their URL parameters to this domain contract instead of making the package understand application-specific route names.
Readme
@masterteam/properties
Property form scope
PropertyForm accepts a typed scope input. Route hosts should map their URL
parameters to this domain contract instead of making the package understand
application-specific route names.
import { type PropertiesScope, PropertyForm } from '@masterteam/properties';
readonly scope: PropertiesScope = {
target: { type: 'module', id: 21 },
parent: { type: 'level', id: 7 },
};<mt-property-form [propertyId]="propertyId" [scope]="scope" />When scope is supplied, the form applies it to PropertiesFacade and waits
for that dispatch to complete before loading an existing property. This is
required for cold create/edit routes because property requests, formula schema
IDs, and save endpoints all depend on the effective scope. Visiting a list page
first must never be required.
For backward compatibility, hosts that already initialize
PropertiesFacade.setModuleInfo(...) before constructing the form can omit the
input. New route and embedded integrations should prefer the explicit scope.
🤝 Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.
📄 License
This project is licensed under the MIT License.
