- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
New Components - mural #14632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    New Components - mural #14632
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            4 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| import mural from "../../mural.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "mural-create-mural", | ||
| name: "Create Mural", | ||
| description: "Create a new mural within a specified workspace. [See the documentation](https://developers.mural.co/public/reference/createmural)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| mural, | ||
| workspaceId: { | ||
| propDefinition: [ | ||
| mural, | ||
| "workspaceId", | ||
| ], | ||
| }, | ||
| roomId: { | ||
| propDefinition: [ | ||
| mural, | ||
| "roomId", | ||
| (c) => ({ | ||
| workspaceId: c.workspaceId, | ||
| }), | ||
| ], | ||
| }, | ||
| title: { | ||
| type: "string", | ||
| label: "Title", | ||
| description: "The title of the Mural.", | ||
| }, | ||
| backgroundColor: { | ||
| type: "string", | ||
| label: "Background Color", | ||
| description: "The background color of the mural. Example: `#FAFAFAFF`", | ||
| optional: true, | ||
| }, | ||
|         
                  michelle0927 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| height: { | ||
| type: "integer", | ||
| label: "Height", | ||
| description: "The height of the mural in px", | ||
| optional: true, | ||
| }, | ||
| width: { | ||
| type: "integer", | ||
| label: "Width", | ||
| description: "The width of the mural in px", | ||
| optional: true, | ||
| }, | ||
|         
                  michelle0927 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| infinite: { | ||
| type: "boolean", | ||
| label: "Infinite", | ||
| description: "When `true`, this indicates that the mural canvas is borderless and grows as you add widgets to it.", | ||
| optional: true, | ||
| }, | ||
| timerSoundTheme: { | ||
| type: "string", | ||
| label: "Timer Sound Theme", | ||
| description: "The timer sound theme for the mural", | ||
| options: [ | ||
| "airplane", | ||
| "cello", | ||
| "cuckoo", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| visitorAvatarTheme: { | ||
| type: "string", | ||
| label: "Visitor Avatar Theme", | ||
| description: "The visitor avatar theme for the mural", | ||
| options: [ | ||
| "animals", | ||
| "music", | ||
| "travel", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.mural.createMural({ | ||
| $, | ||
| data: { | ||
| roomId: this.roomId, | ||
| title: this.title, | ||
| backgroundColor: this.backgroundColor, | ||
| height: this.height, | ||
| width: this.width, | ||
| infinite: this.infinite, | ||
| timerSoundTheme: this.timerSoundTheme, | ||
| visitorAvatarTheme: this.visitorAvatarTheme, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully created mural "${this.title}"`); | ||
| return response; | ||
| }, | ||
|         
                  michelle0927 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }; | ||
        
          
          
            117 changes: 117 additions & 0 deletions
          
          117 
        
  components/mural/actions/create-sticky/create-sticky.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| import mural from "../../mural.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "mural-create-sticky", | ||
| name: "Create Sticky", | ||
| description: "Create a new sticky note within a given mural. [See the documentation](https://developers.mural.co/public/reference/createstickynote)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| mural, | ||
| workspaceId: { | ||
| propDefinition: [ | ||
| mural, | ||
| "workspaceId", | ||
| ], | ||
| }, | ||
| muralId: { | ||
| propDefinition: [ | ||
| mural, | ||
| "muralId", | ||
| (c) => ({ | ||
| workspaceId: c.workspaceId, | ||
| }), | ||
| ], | ||
| }, | ||
| shape: { | ||
| type: "string", | ||
| label: "Shape", | ||
| description: "The shape of the sticky note widget", | ||
| options: [ | ||
| "circle", | ||
| "rectangle", | ||
| ], | ||
| }, | ||
| xPosition: { | ||
| type: "integer", | ||
| label: "X Position", | ||
| description: "The horizontal position of the widget in px. This is the distance from the left of the parent widget, such as an area. If the widget has no parent widget, this is the distance from the left of the mural.", | ||
| }, | ||
| yPosition: { | ||
| type: "integer", | ||
| label: "Y Position", | ||
| description: "The vertical position of the widget in px. This is the distance from the top of the parent widget, such as an area. If the widget has no parent widget, this is the distance from the top of the mural.", | ||
| }, | ||
| text: { | ||
| type: "string", | ||
| label: "Text", | ||
| description: "The text in the widget", | ||
| }, | ||
| title: { | ||
| type: "string", | ||
| label: "Title", | ||
| description: "The title of the widget in the outline", | ||
| optional: true, | ||
| }, | ||
| height: { | ||
| type: "integer", | ||
| label: "Height", | ||
| description: "The height of the widget in px", | ||
| optional: true, | ||
| }, | ||
| width: { | ||
| type: "integer", | ||
| label: "Width", | ||
| description: "The width of the widget in px", | ||
| optional: true, | ||
| }, | ||
| hidden: { | ||
| type: "boolean", | ||
| label: "Hidden", | ||
| description: "If `true`, the widget is hidden from non-facilitators. Applies only when the widget is in the outline", | ||
| optional: true, | ||
| }, | ||
| tagIds: { | ||
| propDefinition: [ | ||
| mural, | ||
| "tagIds", | ||
| (c) => ({ | ||
| muralId: c.muralId, | ||
| }), | ||
| ], | ||
| }, | ||
| parentId: { | ||
| propDefinition: [ | ||
| mural, | ||
| "widgetId", | ||
| (c) => ({ | ||
| muralId: c.muralId, | ||
| type: "areas", | ||
| }), | ||
| ], | ||
| label: "Parent ID", | ||
| description: "The ID of the area widget that contains the widget", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.mural.createSticky({ | ||
| $, | ||
| muralId: this.muralId, | ||
| data: [ | ||
| { | ||
| shape: this.shape, | ||
| x: this.xPosition, | ||
| y: this.yPosition, | ||
| text: this.text, | ||
| title: this.title, | ||
| height: this.height, | ||
| width: this.width, | ||
| hidden: this.hidden, | ||
| parentId: this.parentId, | ||
| }, | ||
| ], | ||
| }); | ||
| $.export("$summary", `Successfully created sticky note with ID: ${response.value[0].id}`); | ||
| return response; | ||
| }, | ||
|         
                  michelle0927 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }; | ||
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.