Skip to content

Commit

Permalink
small modifications to appkit (#4021)
Browse files Browse the repository at this point in the history
  • Loading branch information
humandad authored Jun 21, 2024
1 parent b1d2c0f commit 99aceb2
Show file tree
Hide file tree
Showing 11 changed files with 424 additions and 1 deletion.
131 changes: 131 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/form_detail.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: form_detail
category: LAYOUT
type: DECLARATIVE
slots:
- name: extra_actions
- name: content
definition:
- uesio/io.item:
wire: $Prop{wire}
uesio.id: $Prop{wire}_item
components:
- uesio/io.titlebar:
title: $If{[$Prop{title}][$Prop{title}][$RecordMeta{name}]}
subtitle: $If{[$Prop{subtitle}][$Prop{subtitle}][$Collection{label}]}
uesio.variant: uesio/appkit.main
actions:
- uesio/io.group:
components:
- uesio/core.slot:
name: extra_actions
- uesio/io.button:
signals:
- signal: wire/SAVE
wires:
- $Prop{wire}
text: Save
hotkey: "meta+s"
uesio.variant: uesio/appkit.primary
uesio.display:
- type: wireHasChanges
operator: EQUALS
wire: $Prop{wire}
- uesio/io.button:
signals:
- signal: wire/CANCEL
wire: $Prop{wire}
text: Cancel
uesio.variant: uesio/appkit.secondary
uesio.display:
- type: wireHasChanges
operator: EQUALS
wire: $Prop{wire}
- uesio/io.button:
signals:
- signal: component/CALL
component: uesio/io.item
componentsignal: TOGGLE_MODE
targettype: specific
componentid: $Prop{wire}_item
text: Read
uesio.variant: uesio/appkit.secondary
icon: task_alt
uesio.display:
- type: mergeValue
operator: EQUALS
sourceValue: $FieldMode{}
value: EDIT
- type: wireHasNoChanges
operator: EQUALS
wire: $Prop{wire}
- uesio/io.button:
signals:
- signal: component/CALL
component: uesio/io.item
componentsignal: TOGGLE_MODE
targettype: specific
componentid: $Prop{wire}_item
text: EDIT
uesio.variant: uesio/appkit.secondary
icon: edit_square
iconFill: false
uesio.display:
- type: mergeValue
operator: NOT_EQUALS
sourceValue: $FieldMode{}
value: EDIT
- type: wireHasNoChanges
operator: EQUALS
wire: $Prop{wire}
avatar:
- uesio/io.menu:
uesio.display:
- type: hasValue
value: $Prop{imagefield}
uesio.variant: uesio/appkit.upload
arrow: true
closeButton: true
trigger:
- uesio/io.avatar:
text: $Prop{initials}
image: $UserFile{$Prop{imagefield}}
uesio.variant: uesio/appkit.main
content:
- uesio/io.box:
components:
- uesio/io.titlebar:
uesio.variant: uesio/appkit.sub
title: Upload or Delete $Collection{label} Image
- uesio/io.field:
labelPosition: none
uesio.context:
fieldMode: EDIT
fieldId: $Prop{imagefield}
displayAs: IMAGE
- uesio/io.avatar:
uesio.display:
- type: hasNoValue
value: $Prop{imagefield}
- type: hasValue
value: $Prop{initials}
text: $Prop{initials}
uesio.variant: uesio/appkit.main
- uesio/io.text:
uesio.display:
- type: hasNoValue
value: $Prop{imagefield}
- type: hasNoValue
value: $Prop{initials}
text: $Prop{avataricon}
uesio.variant: uesio/io.icon
- uesio/core.slot:
name: content
- uesio/appkit.audit_info_section:
- uesio/appkit.delete_section:
title: Detail Form Component
discoverable: true
description: A component for a record detail form.
sections:
- type: HOME
properties:
- type: DISPLAY
49 changes: 49 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/form_new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: form_new
category: LAYOUT
type: DECLARATIVE
slots:
- name: content
definition:
- uesio/io.item:
wire: $Prop{wire}
uesio.id: $Prop{wire}_item
mode: EDIT
components:
- uesio/io.titlebar:
title: $If{[$Prop{title}][$Prop{title}][New $Collection{label}]}
subtitle: $If{[$Prop{subtitle}][$Prop{subtitle}][$RecordMeta{name}]}
uesio.variant: uesio/appkit.main
avatar:
- uesio/io.text:
text: $Prop{avataricon}
uesio.variant: uesio/io.icon
actions:
- uesio/io.group:
components:
- uesio/io.button:
signals:
- signal: wire/SAVE
wires:
- $Prop{wire}
- signal: route/NAVIGATE_TO_ASSIGNMENT
collection: $Collection{id}
viewtype: detail
recordid: ${uesio/core.id}
text: Create $Collection{label}
hotkey: "meta+s"
uesio.variant: uesio/appkit.primary
- uesio/io.button:
signals:
- signal: wire/RESET
wire: $Prop{wire}
text: Reset
uesio.variant: uesio/appkit.secondary
- uesio/core.slot:
name: content
title: New Record Form
discoverable: true
description: A component for a record create form.
sections:
- type: HOME
properties:
- type: DISPLAY
46 changes: 46 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/layout_detail_split.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: layout_detail_split
category: LAYOUT
type: DECLARATIVE
slots:
- name: main
- name: left
definition:
- uesio/io.grid:
uesio.variant: uesio/io.three_columns
uesio.styleTokens:
root:
- gap-0
- h-screen
- overflow-auto
items:
- uesio/io.box:
uesio.styleTokens:
root:
- col-span-2
components:
- uesio/core.slot:
name: main
- uesio/io.box:
uesio.styleTokens:
root:
- lg:h-screen
- lg:relative
- lg:sticky
- lg:inset-0
- lg:grid
- lg:grid-cols-[100%]
- lg:grid-rows-[100%]
- lg:pl-0
- lg:pt-10
- p-10
- pt-0
components:
- uesio/core.slot:
name: left
title: Detail Split Component
discoverable: true
description: A component for detail page layout
sections:
- type: HOME
properties:
- type: DISPLAY
30 changes: 30 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/section_audit_info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: section_audit_info
category: LAYOUT
type: DECLARATIVE
definition:
- uesio/io.box:
uesio.variant: uesio/appkit.section
components:
- uesio/io.titlebar:
title: Audit Information
uesio.variant: uesio/appkit.sub
- uesio/io.grid:
uesio.variant: uesio/appkit.three_columns
items:
- uesio/io.field:
fieldId: uesio/core.owner
- uesio/io.field:
fieldId: uesio/core.createdby
user:
subtitle: $Time{uesio/core.createdat}
- uesio/io.field:
fieldId: uesio/core.updatedby
user:
subtitle: $Time{uesio/core.updatedat}
title: Audit Info Section
discoverable: true
description: Audit Info Section
sections:
- type: HOME
properties:
- type: DISPLAY
41 changes: 41 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/section_delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: section_delete
category: LAYOUT
type: DECLARATIVE
definition:
- uesio/io.box:
uesio.variant: uesio/appkit.section
uesio.display:
- type: fieldMode
mode: EDIT
components:
- uesio/io.titlebar:
title: Danger Zone
uesio.variant: uesio/appkit.sub
uesio.styleTokens:
root:
- border-red-600
title:
- text-red-600
- uesio/io.titlebar:
actions:
- uesio/io.button:
uesio.styleTokens:
root:
- mt-4
- border-red-600
- text-red-600
uesio.variant: uesio/appkit.secondary
text: Delete $Collection{label}
signals:
- signal: wire/MARK_FOR_DELETE
- signal: wire/SAVE
- signal: route/NAVIGATE_TO_ASSIGNMENT
collection: $Collection{id}
viewtype: list
title: Delete Section Component
discoverable: true
description: Delete Section
sections:
- type: HOME
properties:
- type: DISPLAY
25 changes: 25 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/section_user_primary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: section_user_primary
category: LAYOUT
type: DECLARATIVE
definition:
- uesio/io.box:
components:
- uesio/io.grid:
uesio.variant: uesio/appkit.two_columns
items:
- uesio/io.field:
fieldId: uesio/core.firstname
- uesio/io.field:
fieldId: uesio/core.lastname
- uesio/io.field:
fieldId: uesio/core.username
- uesio/io.field:
fieldId: uesio/core.email
uesio.variant: uesio/appkit.primarysection
title: User Primary Section
discoverable: true
description: User Primary Section
sections:
- type: HOME
properties:
- type: DISPLAY
22 changes: 22 additions & 0 deletions libs/apps/uesio/appkit/bundle/components/tile_user.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: tile_user
category: LAYOUT
type: DECLARATIVE
definition:
- uesio/io.tile:
uesio.variant: uesio/appkit.item
content:
- uesio/io.titlebar:
uesio.variant: uesio/appkit.item
title: ${firstname} ${lastname}
subtitle: ${username}
avatar:
- uesio/io.avatar:
text: ${initials}
image: $UserFile{picture}
title: User Tile Component
discoverable: true
description: A user tile
sections:
- type: HOME
properties:
- type: DISPLAY
Loading

0 comments on commit 99aceb2

Please sign in to comment.