@nyaruka/temba-components 0.118.8 → 0.119.0

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.
@@ -1,37 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { css, html } from 'lit';
3
- import { property, customElement } from 'lit/decorators.js';
4
- import { RapidElement } from '../RapidElement';
5
- import { getUrl } from '../utils';
6
- import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
7
- let Remote = class Remote extends RapidElement {
8
- constructor() {
9
- super(...arguments);
10
- this.body = html `<temba-loading></temba-loading>`;
11
- }
12
- static get styles() {
13
- return css ``;
14
- }
15
- updated(changes) {
16
- super.updated(changes);
17
- if (changes.has('endpoint')) {
18
- getUrl(this.endpoint).then((response) => {
19
- this.body = unsafeHTML(response.body);
20
- });
21
- }
22
- }
23
- render() {
24
- return html `${this.body}`;
25
- }
26
- };
27
- __decorate([
28
- property({ type: String })
29
- ], Remote.prototype, "endpoint", void 0);
30
- __decorate([
31
- property({ attribute: false })
32
- ], Remote.prototype, "body", void 0);
33
- Remote = __decorate([
34
- customElement('temba-remote')
35
- ], Remote);
36
- export default Remote;
37
- //# sourceMappingURL=Remote.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Remote.js","sourceRoot":"","sources":["../../../src/remote/Remote.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAGjD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,YAAY;IAAjC;;QAKb,SAAI,GAAQ,IAAI,CAAA,iCAAiC,CAAC;IAmBpD,CAAC;IAjBC,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA,EAAE,CAAC;IACf,CAAC;IAEM,OAAO,CAAC,OAAyB;QACtC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACtC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CACF,CAAA;AAtBC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACV;AAGjB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;oCACmB;AAL/B,MAAM;IAD1B,aAAa,CAAC,cAAc,CAAC;GACT,MAAM,CAwB1B;eAxBoB,MAAM","sourcesContent":["import { css, html, TemplateResult } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { RapidElement } from '../RapidElement';\nimport { getUrl } from '../utils';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\n\n@customElement('temba-remote')\nexport default class Remote extends RapidElement {\n @property({ type: String })\n endpoint: string;\n\n @property({ attribute: false })\n body: any = html`<temba-loading></temba-loading>`;\n\n static get styles() {\n return css``;\n }\n\n public updated(changes: Map<string, any>) {\n super.updated(changes);\n\n if (changes.has('endpoint')) {\n getUrl(this.endpoint).then((response) => {\n this.body = unsafeHTML(response.body);\n });\n }\n }\n\n public render(): TemplateResult {\n return html`${this.body}`;\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { fixture, assert } from '@open-wc/testing';
2
- import Remote from './Remote';
3
- export const getHTML = () => {
4
- return `<temba-remote></temba-remove>`;
5
- };
6
- describe('temba-remote', () => {
7
- it('can be created', async () => {
8
- const remote = await fixture(getHTML());
9
- assert.instanceOf(remote, Remote);
10
- });
11
- });
12
- //# sourceMappingURL=Remote.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Remote.test.js","sourceRoot":"","sources":["../../../src/remote/Remote.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,+BAA+B,CAAC;AACzC,CAAC,CAAC;AAEF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,GAAW,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { fixture, assert } from '@open-wc/testing';\nimport Remote from './Remote';\n\nexport const getHTML = () => {\n return `<temba-remote></temba-remove>`;\n};\n\ndescribe('temba-remote', () => {\n it('can be created', async () => {\n const remote: Remote = await fixture(getHTML());\n assert.instanceOf(remote, Remote);\n });\n});\n"]}
@@ -1,13 +0,0 @@
1
- import { fixture, assert } from '@open-wc/testing';
2
- import Remote from './Remote';
3
-
4
- export const getHTML = () => {
5
- return `<temba-remote></temba-remove>`;
6
- };
7
-
8
- describe('temba-remote', () => {
9
- it('can be created', async () => {
10
- const remote: Remote = await fixture(getHTML());
11
- assert.instanceOf(remote, Remote);
12
- });
13
- });
@@ -1,32 +0,0 @@
1
- import { css, html, TemplateResult } from 'lit';
2
- import { property, customElement } from 'lit/decorators.js';
3
- import { RapidElement } from '../RapidElement';
4
- import { getUrl } from '../utils';
5
- import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
6
-
7
- @customElement('temba-remote')
8
- export default class Remote extends RapidElement {
9
- @property({ type: String })
10
- endpoint: string;
11
-
12
- @property({ attribute: false })
13
- body: any = html`<temba-loading></temba-loading>`;
14
-
15
- static get styles() {
16
- return css``;
17
- }
18
-
19
- public updated(changes: Map<string, any>) {
20
- super.updated(changes);
21
-
22
- if (changes.has('endpoint')) {
23
- getUrl(this.endpoint).then((response) => {
24
- this.body = unsafeHTML(response.body);
25
- });
26
- }
27
- }
28
-
29
- public render(): TemplateResult {
30
- return html`${this.body}`;
31
- }
32
- }