@openremote/or-mwc-components 1.0.3 → 1.2.0-snapshot.20240512160221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +6 -5
  2. package/{dist → lib}/or-mwc-dialog.d.ts +22 -18
  3. package/lib/or-mwc-dialog.js +78 -0
  4. package/lib/or-mwc-dialog.js.map +1 -0
  5. package/{dist → lib}/or-mwc-drawer.d.ts +3 -3
  6. package/lib/or-mwc-drawer.js +10 -0
  7. package/lib/or-mwc-drawer.js.map +1 -0
  8. package/lib/or-mwc-input.d.ts +145 -0
  9. package/lib/or-mwc-input.js +436 -0
  10. package/lib/or-mwc-input.js.map +1 -0
  11. package/{dist → lib}/or-mwc-list.d.ts +17 -7
  12. package/lib/or-mwc-list.js +71 -0
  13. package/lib/or-mwc-list.js.map +1 -0
  14. package/{dist → lib}/or-mwc-menu.d.ts +13 -23
  15. package/lib/or-mwc-menu.js +45 -0
  16. package/lib/or-mwc-menu.js.map +1 -0
  17. package/lib/or-mwc-snackbar.d.ts +40 -0
  18. package/lib/or-mwc-snackbar.js +17 -0
  19. package/lib/or-mwc-snackbar.js.map +1 -0
  20. package/lib/or-mwc-table.d.ts +56 -0
  21. package/lib/or-mwc-table.js +256 -0
  22. package/lib/or-mwc-table.js.map +1 -0
  23. package/lib/or-mwc-tabs.d.ts +20 -0
  24. package/lib/or-mwc-tabs.js +57 -0
  25. package/lib/or-mwc-tabs.js.map +1 -0
  26. package/lib/style.d.ts +1 -0
  27. package/lib/style.js +121 -0
  28. package/lib/style.js.map +1 -0
  29. package/package.json +40 -12
  30. package/src/or-mwc-dialog.ts +150 -47
  31. package/src/or-mwc-drawer.ts +6 -4
  32. package/src/or-mwc-input.ts +1841 -0
  33. package/src/or-mwc-list.ts +213 -187
  34. package/src/or-mwc-menu.ts +69 -106
  35. package/src/or-mwc-snackbar.ts +157 -0
  36. package/src/or-mwc-table.ts +598 -0
  37. package/src/or-mwc-tabs.ts +175 -0
  38. package/src/style.ts +122 -59
  39. package/tsconfig.json +3 -3
  40. package/tsconfig.tsbuildinfo +1 -0
  41. package/webpack.config.js +2 -2
  42. package/.project +0 -17
  43. package/.settings/org.eclipse.buildship.core.prefs +0 -2
  44. package/LICENSE.txt +0 -2359
  45. package/dist/.tsbuildinfo +0 -10419
  46. package/dist/or-mwc-dialog.js +0 -219
  47. package/dist/or-mwc-dialog.js.map +0 -1
  48. package/dist/or-mwc-drawer.js +0 -111
  49. package/dist/or-mwc-drawer.js.map +0 -1
  50. package/dist/or-mwc-list.js +0 -242
  51. package/dist/or-mwc-list.js.map +0 -1
  52. package/dist/or-mwc-menu.js +0 -239
  53. package/dist/or-mwc-menu.js.map +0 -1
  54. package/dist/style.d.ts +0 -1
  55. package/dist/style.js +0 -62
  56. package/dist/style.js.map +0 -1
package/README.md CHANGED
@@ -1,14 +1,15 @@
1
- # @openremote/or-input \<or-input\>
1
+ # @openremote/or-mwc-* \<or-mwc-*\>
2
2
  [![NPM Version][npm-image]][npm-url]
3
3
  [![Linux Build][travis-image]][travis-url]
4
4
  [![Test Coverage][coveralls-image]][coveralls-url]
5
5
 
6
- Web Component for displaying an input control.
6
+ Web components wrapper for `MDC` web UI components, the standard `MWC` components are not complete, and they have a
7
+ horrible icon font dependency (hopefully this will removed) whereas we use `SVG` based icon sets.
7
8
 
8
9
  ## Install
9
10
  ```bash
10
- npm i @openremote/or-input
11
- yarn add @openremote/or-input
11
+ npm i @openremote/or-mwc-components
12
+ yarn add @openremote/or-mwc-components
12
13
  ```
13
14
 
14
15
  ## Usage
@@ -24,7 +25,7 @@ Internet Explorer 11 is also supported.
24
25
  [GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
25
26
 
26
27
  [npm-image]: https://img.shields.io/npm/v/live-xxx.svg
27
- [npm-url]: https://npmjs.org/package/@openremote/or-input
28
+ [npm-url]: https://npmjs.org/package/@openremote/or-mwc-components
28
29
  [travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
29
30
  [travis-url]: https://travis-ci.org/live-js/live-xxx
30
31
  [coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
@@ -1,15 +1,7 @@
1
- import { LitElement, TemplateResult, PropertyValues } from "lit-element";
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { MDCDialog } from "@material/dialog";
3
3
  import "@openremote/or-translate";
4
- import "@openremote/or-input";
5
- export interface DialogConfig {
6
- title?: TemplateResult | string;
7
- content?: TemplateResult;
8
- actions?: DialogAction[];
9
- avatar?: boolean;
10
- styles?: TemplateResult | string;
11
- dismissAction?: DialogActionBase | null;
12
- }
4
+ import "./or-mwc-input";
13
5
  export interface DialogActionBase {
14
6
  actionName: string;
15
7
  action?: (dialog: OrMwcDialog) => void;
@@ -33,13 +25,19 @@ declare global {
33
25
  [OrMwcDialogClosedEvent.NAME]: OrMwcDialogClosedEvent;
34
26
  }
35
27
  }
36
- export declare function showDialog(config: DialogConfig, hostElement?: HTMLElement): OrMwcDialog;
28
+ export declare function showErrorDialog(errorMessage: string, hostElement?: HTMLElement): Promise<boolean>;
29
+ export declare function showOkCancelDialog(title: string, content: string | TemplateResult, okText?: string, hostElement?: HTMLElement): Promise<boolean>;
30
+ export declare function showOkDialog(title: string, content: string | TemplateResult, okText?: string, hostElement?: HTMLElement): Promise<boolean>;
31
+ export declare function showDialog<T extends OrMwcDialog>(dialog: T, hostElement?: HTMLElement): T;
37
32
  export declare class OrMwcDialog extends LitElement {
38
- static get styles(): import("lit-element").CSSResult[];
39
- set config(config: DialogConfig);
40
- dialogTitle?: string | TemplateResult;
41
- dialogContent?: TemplateResult;
42
- dialogActions?: DialogAction[];
33
+ /**
34
+ * Can be set by apps to control where in the DOM dialogs are added
35
+ */
36
+ static DialogHostElement: HTMLElement;
37
+ static get styles(): import("lit").CSSResult[];
38
+ heading?: string | TemplateResult;
39
+ content?: TemplateResult | (() => TemplateResult);
40
+ actions?: DialogAction[];
43
41
  dismissAction: DialogActionBase | null | undefined;
44
42
  avatar?: boolean;
45
43
  styles?: TemplateResult | string;
@@ -47,11 +45,17 @@ export declare class OrMwcDialog extends LitElement {
47
45
  protected _mdcElem: HTMLElement;
48
46
  protected _mdcComponent?: MDCDialog;
49
47
  get isOpen(): boolean;
50
- set isOpen(isOpen: boolean);
48
+ setOpen(isOpen: boolean): OrMwcDialog;
49
+ setHeading(heading: TemplateResult | string | undefined): OrMwcDialog;
50
+ setContent(content: TemplateResult | (() => TemplateResult) | undefined): OrMwcDialog;
51
+ setActions(actions: DialogAction[] | undefined): OrMwcDialog;
52
+ setDismissAction(action: DialogActionBase | null | undefined): OrMwcDialog;
53
+ setStyles(styles: string | TemplateResult | undefined): OrMwcDialog;
54
+ setAvatar(avatar: boolean | undefined): OrMwcDialog;
51
55
  open(): void;
52
56
  close(action?: string): void;
53
57
  disconnectedCallback(): void;
54
- protected render(): TemplateResult;
58
+ protected render(): TemplateResult<1>;
55
59
  protected updated(_changedProperties: PropertyValues): void;
56
60
  protected _onDialogOpened(): void;
57
61
  protected _onDialogClosed(action?: string): void;
@@ -0,0 +1,78 @@
1
+ var __decorate=this&&this.__decorate||function(t,e,o,i){var n,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,o,a):n(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a},__awaiter=this&&this.__awaiter||function(t,e,o,i){return new(o||(o=Promise))((function(n,s){function a(t){try{c(i.next(t))}catch(t){s(t)}}function r(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(a,r)}c((i=i.apply(t,e||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query}from"lit/decorators.js";import{MDCDialog}from"@material/dialog";import"@openremote/or-translate";import"./or-mwc-input";import{InputType}from"./or-mwc-input";import{i18next}from"@openremote/or-translate";import{Util}from"@openremote/core";const dialogStyle=require("@material/dialog/dist/mdc.dialog.css"),listStyle=require("@material/list/dist/mdc.list.css");export class OrMwcDialogOpenedEvent extends CustomEvent{constructor(){super(OrMwcDialogOpenedEvent.NAME,{bubbles:!0,composed:!0})}}OrMwcDialogOpenedEvent.NAME="or-mwc-dialog-opened";export class OrMwcDialogClosedEvent extends CustomEvent{constructor(t){super(OrMwcDialogClosedEvent.NAME,{detail:t,bubbles:!0,composed:!0})}}OrMwcDialogClosedEvent.NAME="or-mwc-dialog-closed";export function showErrorDialog(t,e){return __awaiter(this,void 0,void 0,(function*(){return showOkDialog("error",html`
2
+ <div>
3
+ <p><or-translate value="errorOccurred"></or-translate>
4
+ ${t?html`
5
+ :</p>
6
+ <p>
7
+ <or-translate value="error"></or-translate>
8
+ <span> = </span>
9
+ <or-translate .value="${t}"></or-translate>
10
+ `:""}
11
+ </p>
12
+ </div>`,void 0,e)}))}export function showOkCancelDialog(t,e,o,i){return __awaiter(this,void 0,void 0,(function*(){const n=new Util.Deferred;return showDialog((new OrMwcDialog).setContent("string"==typeof e?html`<p>${e}</p>`:e).setActions([{actionName:"cancel",content:"cancel",default:!0,action:()=>n.resolve(!1)},{actionName:"ok",content:o||i18next.t("ok"),action:()=>n.resolve(!0)}]).setHeading(t).setStyles(html`
13
+ <style>
14
+ .mdc-dialog__content {
15
+ white-space: pre-wrap
16
+ }
17
+ </style>
18
+ `),i),yield n.promise}))}export function showOkDialog(t,e,o,i){return __awaiter(this,void 0,void 0,(function*(){const n=new Util.Deferred;return showDialog((new OrMwcDialog).setContent("string"==typeof e?html`<p>${e}</p>`:e).setActions([{actionName:"ok",default:!0,content:o||i18next.t("ok"),action:()=>n.resolve(!0)}]).setHeading(t),i),yield n.promise}))}export function showDialog(t,e){return e||(e=OrMwcDialog.DialogHostElement||document.body),t.setOpen(!0),t.addEventListener(OrMwcDialogOpenedEvent.NAME,(t=>{t.stopPropagation()})),t.addEventListener(OrMwcDialogClosedEvent.NAME,(e=>{e.stopPropagation(),window.setTimeout((()=>{t.parentElement&&t.parentElement.removeChild(t)}),0)})),e.append(t),t}const style=css`
19
+ :host {
20
+ position: relative;
21
+ }
22
+
23
+ .dialog-container {
24
+ display: flex;
25
+ flex-direction: row;
26
+ }
27
+
28
+ .dialog-container > * {
29
+ flex: 1 1 0;
30
+ }
31
+
32
+ .mdc-list {
33
+ padding: 0 24px
34
+ }
35
+
36
+ .mdc-dialog .mdc-dialog__surface {
37
+ outline: none;
38
+ }
39
+
40
+ @media (min-width: 1280px) {
41
+ .mdc-dialog .mdc-dialog__surface {
42
+ max-width: 1024px;
43
+ }
44
+ }
45
+ `;let OrMwcDialog=class extends LitElement{constructor(){super(...arguments),this._open=!1}static get styles(){return[css`${unsafeCSS(dialogStyle)}`,css`${unsafeCSS(listStyle)}`,style]}get isOpen(){return!!this._mdcComponent&&this._mdcComponent.isOpen}setOpen(t){return this._open=!0,this}setHeading(t){return this.heading=t,this}setContent(t){return this.content=t,this}setActions(t){return this.actions=t,this}setDismissAction(t){return this.dismissAction=t,this}setStyles(t){return this.styles=t,this}setAvatar(t){return this.avatar=t,this}open(){this._mdcElem&&!this._mdcComponent&&(this._mdcComponent=new MDCDialog(this._mdcElem),this._mdcComponent.scrimClickAction=this.dismissAction||null===this.dismissAction?"close":""),this._mdcComponent&&this._mdcComponent.open()}close(t){this._mdcComponent&&this._mdcComponent.close(t)}disconnectedCallback(){super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0)}render(){return html`
46
+ ${"string"==typeof this.styles?html`<style>${this.styles}</style>`:this.styles||""}
47
+
48
+ <div id="dialog"
49
+ class="mdc-dialog"
50
+ role="alertdialog"
51
+ aria-modal="true"
52
+ aria-labelledby="dialog-title"
53
+ aria-describedby="dialog-content"
54
+ @MDCDialog:opened="${()=>this._onDialogOpened()}"
55
+ @MDCDialog:closed="${t=>this._onDialogClosed(t.detail.action)}">
56
+ <div class="mdc-dialog__container">
57
+ <div class="mdc-dialog__surface" tabindex="0">
58
+ ${"string"==typeof this.heading?html`<h2 class="mdc-dialog__title" id="dialog-title"><or-translate value="${this.heading}"></or-translate></h2>`:this.heading?html`<span class="mdc-dialog__title" id="dialog-title">${this.heading}</span>`:""}
59
+ ${this.content?html`
60
+ <div class="dialog-container mdc-dialog__content" id="dialog-content">
61
+ ${"function"==typeof this.content?this.content():this.content}
62
+ </div>
63
+ <footer class="mdc-dialog__actions">
64
+ ${this.actions?this.actions.map((t=>html`
65
+ <div class="mdc-button mdc-dialog__button" ?data-mdc-dialog-button-default="${t.default}" data-mdc-dialog-action="${t.disabled?void 0:t.actionName}">
66
+ ${"string"==typeof t.content?html`<or-mwc-input .type="${InputType.BUTTON}" @or-mwc-input-changed="${t=>{t.currentTarget.disabled&&t.stopPropagation()}}" .disabled="${t.disabled}" .label="${t.content}"></or-mwc-input>`:t.content}
67
+ </div>`)):""}
68
+ </footer>
69
+ `:html`
70
+ <ul class="mdc-list ${this.avatar?"mdc-list--avatar-list":""}">
71
+ ${this.actions?this.actions.map(((t,e)=>html`<li class="mdc-list-item" data-mdc-dialog-action="${t.actionName}"><span class="mdc-list-item__text">${t.content}</span></li>`)):""}
72
+ </ul>
73
+ `}
74
+ </div>
75
+ </div>
76
+ <div class="mdc-dialog__scrim"></div>
77
+ </div>
78
+ `}updated(t){super.updated(t),t.has("_open")&&this._open&&this.open()}_onDialogOpened(){this.dispatchEvent(new OrMwcDialogOpenedEvent)}_onDialogClosed(t){if("close"===t&&this.dismissAction&&this.dismissAction.action)this.dismissAction.action(this);else if(t&&this.actions){const e=this.actions.find((e=>e.actionName===t));e&&e.action&&e.action(this)}this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this.dispatchEvent(new OrMwcDialogClosedEvent(t))}};__decorate([property({type:String})],OrMwcDialog.prototype,"heading",void 0),__decorate([property({type:Object,attribute:!1})],OrMwcDialog.prototype,"content",void 0),__decorate([property({type:Array,attribute:!1})],OrMwcDialog.prototype,"actions",void 0),__decorate([property({type:Object,attribute:!1})],OrMwcDialog.prototype,"dismissAction",void 0),__decorate([property({type:Boolean})],OrMwcDialog.prototype,"avatar",void 0),__decorate([property()],OrMwcDialog.prototype,"styles",void 0),__decorate([property({attribute:!1})],OrMwcDialog.prototype,"_open",void 0),__decorate([query("#dialog")],OrMwcDialog.prototype,"_mdcElem",void 0),OrMwcDialog=__decorate([customElement("or-mwc-dialog")],OrMwcDialog);export{OrMwcDialog};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-mwc-dialog.js","sourceRoot":"","sources":["../src/or-mwc-dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkC,SAAS,EAAC,MAAM,KAAK,CAAC;AACrF,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,0BAA0B,CAAC;AAClC,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAC,SAAS,EAAa,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAEtC,MAAM,WAAW,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;AACpE,MAAM,SAAS,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAa9D,MAAM,OAAO,sBAAuB,SAAQ,WAAiB;IAIzD;QACI,KAAK,CAAC,sBAAsB,CAAC,IAAI,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACjB,CAAC,CAAC;IACP,CAAC;;AAPsB,2BAAI,GAAG,sBAAsB,CAAC;AAUzD,MAAM,O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I,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC;YAC9F,IAAI,aAAa,IAAI,aAAa,CAAC,MAAM,EAAE,CAAC;gBACxC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AA7JU;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CACgB;AAGlC;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAC,CAAC;4CACc;AAGlD;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAC,CAAC;4CACV;AAGzB;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAC,CAAC;kDACe;AAGnD;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;2CACF;AAGjB;IADN,QAAQ,EAAE;2CAC6B;AAG9B;IADT,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;0CACI;AAGvB;IADT,KAAK,CAAC,SAAS,CAAC;6CACgB;AArCxB,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CA6KvB"}
@@ -1,11 +1,11 @@
1
- import { LitElement, TemplateResult } from "lit-element";
1
+ import { LitElement, TemplateResult } from "lit";
2
2
  import { MDCDrawer } from "@material/drawer";
3
3
  export declare class OrMwcDrawerChangedEvent extends CustomEvent<boolean> {
4
4
  static readonly NAME = "or-mwc-drawer-changed";
5
5
  constructor(value: boolean);
6
6
  }
7
7
  export declare class OrMwcDrawer extends LitElement {
8
- static get styles(): import("lit-element").CSSResult[];
8
+ static get styles(): import("lit").CSSResult[];
9
9
  header: TemplateResult;
10
10
  dismissible: boolean;
11
11
  rightSided: boolean;
@@ -17,7 +17,7 @@ export declare class OrMwcDrawer extends LitElement {
17
17
  protected drawer?: MDCDrawer;
18
18
  toggle(): void;
19
19
  disconnectedCallback(): void;
20
- protected render(): TemplateResult;
20
+ protected render(): TemplateResult<1>;
21
21
  protected updated(): void;
22
22
  protected dispatchChangedEvent(value: boolean): void;
23
23
  protected firstUpdated(): void;
@@ -0,0 +1,10 @@
1
+ var __decorate=this&&this.__decorate||function(e,r,t,a){var s,o=arguments.length,d=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,r,t,a);else for(var i=e.length-1;i>=0;i--)(s=e[i])&&(d=(o<3?s(d):o>3?s(r,t,d):s(r,t))||d);return o>3&&d&&Object.defineProperty(r,t,d),d};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query}from"lit/decorators.js";import{MDCDrawer}from"@material/drawer";import{classMap}from"lit/directives/class-map.js";const drawerStyle=require("@material/drawer/dist/mdc.drawer.css");export class OrMwcDrawerChangedEvent extends CustomEvent{constructor(e){super(OrMwcDrawerChangedEvent.NAME,{detail:e,bubbles:!0,composed:!0})}}OrMwcDrawerChangedEvent.NAME="or-mwc-drawer-changed";let OrMwcDrawer=class extends LitElement{constructor(){super(...arguments),this.dismissible=!1,this.rightSided=!1,this.transparent=!1,this.open=!1}static get styles(){return[css`${unsafeCSS(drawerStyle)}`,css`
2
+ .transparent{
3
+ background: none;
4
+ }`]}toggle(){this.open=!this.open}disconnectedCallback(){super.disconnectedCallback(),this.drawer&&(this.drawer.destroy(),this.drawer=void 0)}render(){const e=!this.dismissible,r={"mdc-drawer--dismissible":this.dismissible,"mdc-drawer--modal":e,transparent:this.transparent};return html`
5
+ <aside class="mdc-drawer ${classMap(r)}" dir="${this.rightSided?"rtl":"ltr"}">
6
+ ${this.header}
7
+ <div class="mdc-drawer__content" dir="ltr">
8
+ <slot></slot>
9
+ </div>
10
+ </aside>`}updated(){this.drawer.open!==this.open&&(this.drawer.open=this.open)}dispatchChangedEvent(e){this.dispatchEvent(new OrMwcDrawerChangedEvent(e))}firstUpdated(){this.drawer=MDCDrawer.attachTo(this.drawerElement),this.drawer.listen("MDCDrawer:opened",(()=>{this.dispatchChangedEvent(!0)})),this.drawer.listen("MDCDrawer:closed",(()=>{this.dispatchChangedEvent(!1)})),this.appContent&&this.appContent.classList.add("mdc-drawer-app-content"),this.topBar&&this.topBar.classList.add("mdc-top-app-bar")}};__decorate([property({attribute:!1})],OrMwcDrawer.prototype,"header",void 0),__decorate([property({type:Boolean})],OrMwcDrawer.prototype,"dismissible",void 0),__decorate([property({type:Boolean})],OrMwcDrawer.prototype,"rightSided",void 0),__decorate([property({type:Boolean})],OrMwcDrawer.prototype,"transparent",void 0),__decorate([property({type:Boolean})],OrMwcDrawer.prototype,"open",void 0),__decorate([property({attribute:!1})],OrMwcDrawer.prototype,"appContent",void 0),__decorate([property({attribute:!1})],OrMwcDrawer.prototype,"topBar",void 0),__decorate([query(".mdc-drawer")],OrMwcDrawer.prototype,"drawerElement",void 0),OrMwcDrawer=__decorate([customElement("or-mwc-drawer")],OrMwcDrawer);export{OrMwcDrawer};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-mwc-drawer.js","sourceRoot":"","sources":["../src/or-mwc-drawer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,SAAS,EAAC,MAAM,KAAK,CAAC;AACtE,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBA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,KAAK,EAAE,CAAC;2CAAgC;AAE3B;IAAnC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAqC;AAC7B;IAAnC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAAoC;AAC5B;IAAnC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAqC;AAC7B;IAAnC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAA8B;AAEnB;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+CAAiC;AACzB;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2CAA6B;AAGlD;IADT,KAAK,CAAC,aAAa,CAAC;kDACiB;AAvB3B,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CA8EvB"}
@@ -0,0 +1,145 @@
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
+ import { MDCComponent } from "@material/base";
3
+ import "@openremote/or-icon";
4
+ import { AssetDescriptor, NameHolder, ValueDescriptor, ValueDescriptorHolder, ValueFormat, ValueHolder } from "@openremote/model";
5
+ export declare class OrInputChangedEvent extends CustomEvent<OrInputChangedEventDetail> {
6
+ static readonly NAME = "or-mwc-input-changed";
7
+ constructor(value?: any, previousValue?: any, enterPressed?: boolean);
8
+ }
9
+ export interface OrInputChangedEventDetail {
10
+ value?: any;
11
+ previousValue?: any;
12
+ enterPressed?: boolean;
13
+ }
14
+ declare global {
15
+ export interface HTMLElementEventMap {
16
+ [OrInputChangedEvent.NAME]: OrInputChangedEvent;
17
+ }
18
+ }
19
+ export declare enum InputType {
20
+ BUTTON = "button",
21
+ BUTTON_TOGGLE = "button-toggle",
22
+ BUTTON_MOMENTARY = "button-momentary",
23
+ CHECKBOX = "checkbox",
24
+ CHECKBOX_LIST = "checkbox-list",
25
+ COLOUR = "color",
26
+ DATE = "date",
27
+ DATETIME = "datetime-local",
28
+ EMAIL = "email",
29
+ JSON = "json",
30
+ JSON_OBJECT = "json-object",
31
+ MONTH = "month",
32
+ NUMBER = "number",
33
+ BIG_INT = "big-int",
34
+ PASSWORD = "password",
35
+ RADIO = "radio",
36
+ SWITCH = "switch",
37
+ RANGE = "range",
38
+ TELEPHONE = "tel",
39
+ TEXT = "text",
40
+ TEXTAREA = "textarea",
41
+ TIME = "time",
42
+ URL = "url",
43
+ WEEK = "week",
44
+ SELECT = "select",
45
+ LIST = "list",
46
+ CRON = "cron",
47
+ DURATION = "duration",
48
+ DURATION_TIME = "duration-time",
49
+ DURATION_PERIOD = "duration-period"
50
+ }
51
+ export interface ValueInputProviderOptions {
52
+ label?: string;
53
+ required?: boolean;
54
+ readonly?: boolean;
55
+ disabled?: boolean;
56
+ compact?: boolean;
57
+ rounded?: boolean;
58
+ outlined?: boolean;
59
+ comfortable?: boolean;
60
+ resizeVertical?: boolean;
61
+ inputType?: InputType;
62
+ }
63
+ export interface ValueInputProvider {
64
+ templateFunction: ValueInputTemplateFunction;
65
+ supportsHelperText: boolean;
66
+ supportsLabel: boolean;
67
+ supportsSendButton: boolean;
68
+ validator?: () => boolean;
69
+ }
70
+ export type ValueInputTemplateFunction = ((value: any, focused: boolean, loading: boolean, sending: boolean, error: boolean, helperText: string | undefined) => TemplateResult | PromiseLike<TemplateResult>) | undefined;
71
+ export type ValueInputProviderGenerator = (assetDescriptor: AssetDescriptor | string, valueHolder: NameHolder & ValueHolder<any> | undefined, valueHolderDescriptor: ValueDescriptorHolder | undefined, valueDescriptor: ValueDescriptor, valueChangeNotifier: (value: OrInputChangedEventDetail | undefined) => void, options: ValueInputProviderOptions) => ValueInputProvider;
72
+ export declare const getValueHolderInputTemplateProvider: ValueInputProviderGenerator;
73
+ export declare class OrMwcInput extends LitElement {
74
+ static get styles(): import("lit").CSSResult[];
75
+ focused?: boolean;
76
+ value?: any;
77
+ type?: InputType;
78
+ name?: String;
79
+ readonly: boolean;
80
+ required: boolean;
81
+ max?: any;
82
+ min?: any;
83
+ step?: number;
84
+ checked: boolean;
85
+ indeterminate: boolean;
86
+ maxLength?: number;
87
+ minLength?: number;
88
+ rows?: number;
89
+ cols?: number;
90
+ multiple: boolean;
91
+ pattern?: string;
92
+ placeHolder?: string;
93
+ options?: any[] | any;
94
+ autoSelect?: boolean;
95
+ searchProvider?: (search?: string) => Promise<[any, string][]>;
96
+ icon?: string;
97
+ iconColor?: string;
98
+ iconOn?: string;
99
+ iconTrailing?: string;
100
+ compact: boolean;
101
+ comfortable: boolean;
102
+ raised: boolean;
103
+ action: boolean;
104
+ unElevated: boolean;
105
+ outlined: boolean;
106
+ rounded: boolean;
107
+ format?: ValueFormat;
108
+ disableSliderNumberInput: boolean;
109
+ fullWidth: boolean;
110
+ helperText?: string;
111
+ helperPersistent: boolean;
112
+ validationMessage?: string;
113
+ autoValidate: boolean;
114
+ charCounter: boolean;
115
+ label?: string;
116
+ disabled: boolean;
117
+ continuous: boolean;
118
+ resizeVertical: boolean;
119
+ get nativeValue(): any;
120
+ protected _mdcComponent?: MDCComponent<any>;
121
+ protected _mdcComponent2?: MDCComponent<any>;
122
+ protected _selectedIndex: number;
123
+ protected _menuObserver?: IntersectionObserver;
124
+ protected _tempValue: any;
125
+ protected isUiValid: boolean;
126
+ searchableValue?: string;
127
+ protected errorMessage?: string;
128
+ disconnectedCallback(): void;
129
+ protected shouldUpdate(_changedProperties: PropertyValues): boolean;
130
+ focus(): void;
131
+ protected render(): TemplateResult | undefined;
132
+ protected _getFormat(): ValueFormat | undefined;
133
+ update(_changedProperties: PropertyValues): void;
134
+ firstUpdated(_changedProperties: PropertyValues): void;
135
+ protected updated(_changedProperties: PropertyValues): void;
136
+ protected renderOutlined(labelTemplate: TemplateResult | undefined): TemplateResult<1>;
137
+ setCustomValidity(msg: string | undefined): void;
138
+ checkValidity(): boolean;
139
+ reportValidity(): boolean;
140
+ protected onValueChange(elem: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | undefined, newValue: any | undefined, enterPressed?: boolean): void;
141
+ get valid(): boolean;
142
+ get currentValue(): any;
143
+ protected resolveOptions(options: any[] | undefined): [any, string][] | undefined;
144
+ protected getSelectedTextValue(options?: [string, string][] | undefined): string;
145
+ }