{"id":13698544,"url":"https://github.com/SenseNet/sn-controls-react","last_synced_at":"2025-05-04T03:31:28.257Z","repository":{"id":57364436,"uuid":"92176223","full_name":"SenseNet/sn-controls-react","owner":"SenseNet","description":"React controls for sensenet","archived":true,"fork":false,"pushed_at":"2018-12-11T12:08:44.000Z","size":436,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-13T03:34:44.483Z","etag":null,"topics":["controls","ecm","react","reactjs","sensenet"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SenseNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-23T13:29:00.000Z","updated_at":"2023-01-28T19:22:30.000Z","dependencies_parsed_at":"2022-09-13T02:32:17.016Z","dependency_job_id":null,"html_url":"https://github.com/SenseNet/sn-controls-react","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenseNet%2Fsn-controls-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenseNet%2Fsn-controls-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenseNet%2Fsn-controls-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenseNet%2Fsn-controls-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SenseNet","download_url":"https://codeload.github.com/SenseNet/sn-controls-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252283606,"owners_count":21723507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["controls","ecm","react","reactjs","sensenet"],"created_at":"2024-08-02T19:00:48.998Z","updated_at":"2025-05-04T03:31:27.536Z","avatar_url":"https://github.com/SenseNet.png","language":"TypeScript","funding_links":[],"categories":["Components"],"sub_categories":[],"readme":"# sn-controls-react\n\n------\n### This package is not under active development. You can find our latest packages in the [sensenset/sn-client](https://github.com/sensenet/sn-client) monorepo.\n------\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/SenseNet/sn-controls-react.svg)](https://greenkeeper.io/)\n[![Join the chat at https://gitter.im/SenseNet/sn-controls-react](https://badges.gitter.im/SenseNet/sn-controls-react.svg)](https://gitter.im/SenseNet/sn-controls-react?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![License](https://img.shields.io/github/license/SenseNet/sn-controls-react.svg?style=flat)](https://github.com/SenseNet/sn-controls-react/LICENSE.txt)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat)](http://commitizen.github.io/cz-cli/)\n\nCollection of [React](https://facebook.github.io/react/) components for [sensenet ECM](https://www.sensenet.com/) with [Material-UI](https://github.com/mui-org/material-ui)\n\n[![Sense/Net Services](https://img.shields.io/badge/sensenet-7.0.0--beta3%20tested-green.svg)](https://github.com/SenseNet/sensenet/releases/tag/v7.0.0-beta3)\n\n## Usage and installation\n\nYou can install the latest version from NPM\n\n```\nnpm install --save sn-controls-react\n```\n\nYou can import fieldcontrol and viewcontrol components into your React App the conventional way.\n\n```ts\n\nimport { NewView, EditView, CommandButtons } 'sn-controls-react';\n\n...\n\n```\n\n## View Controls\n\nView Controls are almost the same as the .ascx [Content Views](http://wiki.sensenet.com/Content_View) in [sensenet Webpages](https://github.com/SenseNet/sn-webpages). This components define how the given Content will be rendered. As a Content is built up of Fields the View Control displays the Content using Field Controls to provide a surface to display/modify the Field values of the Content. View Control therefore depends on the Content Type of the specific Content.\n\n### Content creation form (NewView)\n\n```tsx\nimport { NewView } from 'sn-controls-react'\nimport createBrowserHistory from 'history/createBrowserHistory'\nconst history = createBrowserHistory()\n\n// content: Content | required  | empty Content Object\n// history: history Object made with createBrowserHistory() | optional | called after submit | default: window.history.back()\n// onSubmit: Function | optional | called on submit event | default: window.history.back()\n\n\u003cNewView \ncontent={content} \nhistory={history} \nonSubmit={() =\u003e {})} /\u003e\n```\n\n### Content editor form (EditView)\n\n```tsx\nimport { EditView } from 'sn-controls-react'\nimport createBrowserHistory from 'history/createBrowserHistory'\nconst history = createBrowserHistory()\n\n// content: Content | required  | empty Content Object\n// history: history Object made with createBrowserHistory() | optional | called after submit | default: window.history.back()\n// onSubmit: Function | optional | called on submit event | default: window.history.back()\n\n\u003cEditView \ncontent={content} \nhistory={history} \nonSubmit={() =\u003e {})} /\u003e\n```\n\n### Content browse view (BrowseView)\n\n```tsx\nimport { BrowseView } from 'sn-controls-react'\n\n// content: Content | required  | empty Content Object\n\n\u003cBrowseView \ncontent={content} /\u003e\n```\n\n## Field Controls\n\nJust as legacy controls in [sensenet Webpages](https://github.com/SenseNet/sn-webpages) Field Control components provide GUI for setting/modifying Field values of a Content but this time not as .ascx views but [React](https://facebook.github.io/react/) Components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSenseNet%2Fsn-controls-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSenseNet%2Fsn-controls-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSenseNet%2Fsn-controls-react/lists"}