Repository Public License
1{2 "entrypoint": "contacts_page",3 "id": "app_contacts",4 "name": "Contacts",5 "objects": [6 {7 "id": "contacts",8 "name": "Contacts",9 "props": {10 "columns": [11 {12 "label": "Name",13 "name": "name",14 "required": true,15 "type": "text"16 },17 {18 "label": "Company",19 "name": "company",20 "type": "text"21 },22 {23 "label": "Email",24 "name": "email",25 "type": "text"26 },27 {28 "label": "Phone",29 "name": "phone",30 "type": "text"31 }32 ],33 "seed": [34 {35 "company": "Northwind Traders",36 "email": "ana.ruiz@northwind.example",37 "name": "Ana Ruiz",38 "phone": "+1 415 555 0142"39 },40 {41 "company": "Contoso Ltd",42 "email": "ben.okafor@contoso.example",43 "name": "Ben Okafor",44 "phone": "+1 212 555 0187"45 },46 {47 "company": "Fabrikam",48 "email": "chloe.martin@fabrikam.example",49 "name": "Chloé Martin",50 "phone": "+33 1 55 50 12 34"51 },52 {53 "company": "Northwind Traders",54 "email": "d.kim@northwind.example",55 "name": "David Kim",56 "phone": "+1 415 555 0199"57 },58 {59 "company": "Tailspin Toys",60 "email": "elena@tailspin.example",61 "name": "Elena Rossi",62 "phone": "+39 02 5550 1234"63 }64 ]65 },66 "provenance": {67 "source": "agent"68 },69 "schemaVersion": 1,70 "type": "prism.data.table",71 "version": 172 },73 {74 "dependencies": [75 "contacts"76 ],77 "id": "filtered_contacts",78 "name": "Contacts matching search",79 "props": {80 "query": {81 "search": {82 "columns": [83 "name",84 "company",85 "email",86 "phone"87 ],88 "text": {89 "$expr": "state.searchText"90 }91 },92 "sort": [93 {94 "column": "name"95 }96 ],97 "table": "contacts"98 }99 },100 "provenance": {101 "generated": true,102 "source": "agent"103 },104 "schemaVersion": 1,105 "type": "prism.data.query",106 "version": 1107 },108 {109 "children": [110 "root"111 ],112 "id": "contacts_page",113 "name": "Contacts",114 "props": {115 "icon": "person.crop.circle"116 },117 "provenance": {118 "source": "agent"119 },120 "schemaVersion": 1,121 "type": "prism.page",122 "version": 1123 },124 {125 "children": [126 "toolbar",127 "split",128 "notifications"129 ],130 "id": "root",131 "props": {132 "align": "stretch",133 "grow": true134 },135 "provenance": {136 "source": "agent"137 },138 "schemaVersion": 1,139 "type": "prism.stack",140 "version": 1141 },142 {143 "children": [144 "search",145 "new_contact",146 "export"147 ],148 "id": "toolbar",149 "provenance": {150 "source": "agent"151 },152 "schemaVersion": 1,153 "type": "prism.toolbar",154 "version": 1155 },156 {157 "children": [158 "contacts_table",159 "editor"160 ],161 "id": "split",162 "props": {163 "direction": "horizontal",164 "grow": true165 },166 "provenance": {167 "source": "agent"168 },169 "schemaVersion": 1,170 "type": "prism.split",171 "version": 1172 },173 {174 "id": "search",175 "props": {176 "accessibilityLabel": "Search contacts",177 "placeholder": "Search name, company, email or phone",178 "value": {179 "$bind": "searchText"180 },181 "width": 320182 },183 "provenance": {184 "source": "agent"185 },186 "schemaVersion": 1,187 "type": "prism.search",188 "version": 1189 },190 {191 "events": {192 "click": [193 {194 "key": "selectedContact",195 "type": "setState",196 "value": ""197 }198 ]199 },200 "id": "new_contact",201 "props": {202 "icon": "plus",203 "style": "primary",204 "title": "New Contact"205 },206 "provenance": {207 "source": "agent"208 },209 "schemaVersion": 1,210 "type": "prism.button",211 "version": 1212 },213 {214 "id": "export",215 "props": {216 "filename": "contacts.csv",217 "query": {218 "$ref": "filtered_contacts"219 },220 "title": "Export CSV…"221 },222 "provenance": {223 "source": "agent"224 },225 "schemaVersion": 1,226 "type": "prism.csvExport",227 "version": 1228 },229 {230 "id": "contacts_table",231 "props": {232 "columns": [233 {234 "column": "name",235 "title": "Name"236 },237 {238 "column": "company",239 "title": "Company"240 },241 {242 "column": "email",243 "title": "Email"244 },245 {246 "column": "phone",247 "title": "Phone"248 }249 ],250 "emptyMessage": "No contacts match your search, or none have been added yet.",251 "emptyTitle": "No contacts",252 "grow": true,253 "query": {254 "$ref": "filtered_contacts"255 },256 "selection": {257 "$bind": "selectedContact"258 }259 },260 "provenance": {261 "source": "agent"262 },263 "schemaVersion": 1,264 "type": "prism.table",265 "version": 1266 },267 {268 "dependencies": [269 "contacts"270 ],271 "events": {272 "deleted": [273 {274 "key": "selectedContact",275 "type": "setState",276 "value": ""277 },278 {279 "message": "Contact deleted",280 "tone": "info",281 "type": "showNotification"282 }283 ],284 "saved": [285 {286 "message": "Contact saved",287 "tone": "success",288 "type": "showNotification"289 }290 ]291 },292 "id": "editor",293 "props": {294 "allowDelete": true,295 "fields": [296 "name",297 "company",298 "email",299 "phone"300 ],301 "padding": 12,302 "recordId": {303 "$bind": "selectedContact"304 },305 "submitTitle": {306 "$expr": "isEmpty(state.selectedContact) ? 'Add Contact' : 'Save Changes'"307 },308 "table": "contacts",309 "width": 320310 },311 "provenance": {312 "source": "agent"313 },314 "schemaVersion": 1,315 "type": "prism.recordEditor",316 "version": 1317 },318 {319 "id": "notifications",320 "provenance": {321 "source": "agent"322 },323 "schemaVersion": 1,324 "type": "prism.notification",325 "version": 1326 }327 ],328 "permissions": [329 "storage.local",330 "files.export.userSelected"331 ],332 "schemaVersion": 1,333 "state": {334 "searchText": "",335 "selectedContact": ""336 },337 "summary": "A searchable contact list with name, company, email and phone, exportable to CSV.",338 "version": 1339}