Changeset - 4031e511bca9
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 20 months ago 2023-05-30 08:00:32
drewp@bigasterisk.com
resource-display uri can no longer be a string
2 files changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/web/EditChoice.ts
Show inline comments
 
@@ -58,13 +58,13 @@ function setupDrop(
 

	
 
// Picks a URI based on the caller setting the property OR
 
// the user drag-and-dropping a text/uri-list resource (probably
 
// an <resource-display> or <a href> tag)
 
@customElement("edit-choice")
 
export class EditChoice extends LitElement {
 
  @property() uri: NamedNode | null = null;
 
  @property() uri?: NamedNode
 
  static styles = [
 
    css`
 
      :host {
 
        display: inline-block;
 
        background: #141448;
 
        min-width: 10em;
 
@@ -99,15 +99,15 @@ export class EditChoice extends LitEleme
 
  //   if (changedProperties.has("box")) {
 
  //     log('setupdrop', this.box)
 
  //     setupDrop(this.box, this.box, null, this._setUri.bind(this));
 
  //   }
 
  // }
 

	
 
  _setUri(u: any) {
 
  _setUri(u?: NamedNode) {
 
    this.uri = u;
 
    this.dispatchEvent(new CustomEvent("edited", {detail: {newValue: u}}));
 
  }
 

	
 
  unlink() {
 
    return this._setUri(null);
 
    return this._setUri(undefined);
 
  }
 
}
light9/web/ResourceDisplay.ts
Show inline comments
 
@@ -69,14 +69,13 @@ export class ResourceDisplay extends Lit
 
    //       <paper-button dialog-confirm>OK</paper-button>
 
    //     </div>
 
    //   </paper-dialog>
 
    // </template>
 
    //    `;
 
  }
 
  // callers might set this as string or pass a NamedNode.
 
  @property() uri?: NamedNode | string;
 
  @property() uri?: NamedNode;
 

	
 
  @state() label: string = "";
 
  
 
  @property({type: Boolean}) rename: boolean = false;
 
  @property({type: Boolean}) minor: boolean = false;
 
  // @state() renameTo: String; notify: true };
0 comments (0 inline, 0 general)