@operato/scene-news-ticker 8.0.0-beta.2 → 8.0.1
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/news-ticker-element.d.ts +2 -2
- package/dist/news-ticker-element.js +2 -2
- package/dist/news-ticker-element.js.map +1 -1
- package/dist/news-ticker.d.ts +1 -1
- package/dist/news-ticker.js +1 -1
- package/dist/news-ticker.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as NewsTicker } from './news-ticker';
|
|
1
|
+
export { default as NewsTicker } from './news-ticker.js';
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA","sourcesContent":["/*\n * Copyright © 2017 HatioLab Inc. All rights reserved.\n */\n\nexport { default as NewsTicker } from './news-ticker.js'\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
|
-
import './news-ticker-horizontal';
|
|
6
|
-
import './news-ticker-vertical';
|
|
5
|
+
import './news-ticker-horizontal.js';
|
|
6
|
+
import './news-ticker-vertical.js';
|
|
7
7
|
import { html, LitElement } from 'lit';
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
9
|
let ThingsNewsTicker = class ThingsNewsTicker extends LitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"news-ticker-element.js","sourceRoot":"","sources":["../src/news-ticker-element.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"news-ticker-element.js","sourceRoot":"","sources":["../src/news-ticker-element.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,6BAA6B,CAAA;AACpC,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QACe,aAAQ,GAAW,EAAE,CAAA;QACrB,eAAU,GAAW,EAAE,CAAA;QACvB,cAAS,GAAW,EAAE,CAAA;QACtB,aAAQ,GAAW,EAAE,CAAA;QACrB,cAAS,GAAW,EAAE,CAAA;QACrB,cAAS,GAAY,KAAK,CAAA;QAC1B,qBAAgB,GAAY,KAAK,CAAA;QAElC,aAAQ,GAAW,KAAK,CAAA;IA8BtD,CAAC;IA5BC,MAAM;QACJ,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,SAAS,IAAI,UAAU;YAC5B,CAAC,CAAC,IAAI,CAAA;;0BAEY,IAAI,CAAC,QAAQ;2BACZ,IAAI,CAAC,SAAS;kCACP,IAAI,CAAC,gBAAgB;0BAC7B,IAAI,CAAC,QAAQ;;WAE5B;YACH,CAAC,CAAC,IAAI,CAAA;;0BAEY,IAAI,CAAC,QAAQ;2BACZ,IAAI,CAAC,SAAS;kCACP,IAAI,CAAC,gBAAgB;0BAC7B,IAAI,CAAC,QAAQ;;WAE5B;KACN,CAAA;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,8BAA8B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;QACvE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QACnE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QACrE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAtC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAsB;AACrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAwB;AACvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAsB;AACrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AACrB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDAA2B;AAC1B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DAAkC;AAClC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAsC;AACrC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAyB;AATjC,gBAAgB;IADpC,aAAa,CAAC,gBAAgB,CAAC;GACX,gBAAgB,CAuCpC;eAvCoB,gBAAgB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './news-ticker-horizontal.js'\nimport './news-ticker-vertical.js'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-news-ticker')\nexport default class ThingsNewsTicker extends LitElement {\n @property({ type: String }) textData: string = ''\n @property({ type: String }) fontFamily: string = ''\n @property({ type: String }) fontColor: string = ''\n @property({ type: String }) fontSize: string = ''\n @property({ type: String }) textAlign: string = ''\n @property({ type: Boolean }) isReverse: boolean = false\n @property({ type: Boolean }) isTextOverflowed: boolean = false\n @property({ type: String }) direction?: 'vertical' | 'horizontal'\n @property({ type: Number }) duration: number = 30000\n\n render() {\n return html`\n ${this.direction == 'vertical'\n ? html`\n <ox-news-ticker-vertical\n .duration=${this.duration}\n .isReverse=${this.isReverse}\n .isTextOverflowed=${this.isTextOverflowed}\n .textData=${this.textData}\n ></ox-news-ticker-vertical>\n `\n : html`\n <ox-news-ticker-horizontal\n .duration=${this.duration}\n .isReverse=${this.isReverse}\n .isTextOverflowed=${this.isTextOverflowed}\n .textData=${this.textData}\n ></ox-news-ticker-horizontal>\n `}\n `\n }\n\n updated() {\n this.style.setProperty('--ox-news-ticker-font-family', this.fontFamily)\n this.style.setProperty('--ox-news-ticker-font-size', this.fontSize)\n this.style.setProperty('--ox-news-ticker-font-color', this.fontColor)\n this.style.setProperty('--ox-news-ticker-text-align', this.textAlign)\n }\n}\n"]}
|
package/dist/news-ticker.d.ts
CHANGED
package/dist/news-ticker.js
CHANGED
package/dist/news-ticker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"news-ticker.js","sourceRoot":"","sources":["../src/news-ticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"news-ticker.js","sourceRoot":"","sources":["../src/news-ticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAI9F,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,W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AAW,CAAC,IAAI,CAAC,CAAA;QAE/B,OAAO,YAAY,CAAA;IACrB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA","sourcesContent":["/*\n * Copyright © 2017 HatioLab Inc. All rights reserved.\n */\n\nimport './news-ticker-element.js'\n\nimport { Component, ComponentNature, error, HTMLOverlayElement } from '@hatiolab/things-scene'\n\nimport ThingsNewsTicker from './news-ticker-element.js'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'direction',\n name: 'direction',\n property: {\n options: [\n {\n display: 'horizontal',\n value: 'horizontal'\n },\n {\n display: 'vertical',\n value: 'vertical'\n }\n ]\n }\n },\n {\n type: 'checkbox',\n label: 'reverse',\n name: 'reverse'\n },\n {\n type: 'number',\n label: 'duration',\n name: 'duration',\n placeholder: 'seconds'\n }\n ],\n help: 'scene/component/news-ticker'\n}\n\nexport default class NewsTicker extends HTMLOverlayElement {\n get nature() {\n return NATURE\n }\n\n get hasTextProperty() {\n return true\n }\n\n get tagName() {\n return 'ox-news-ticker'\n }\n\n createElement() {\n super.createElement()\n\n this.setState('text', '#{data}')\n\n var element = this.element\n\n element.style.overflow = 'hidden'\n }\n\n /* component.property => element.property */\n setElementProperties(element: HTMLElement) {\n try {\n var {\n direction = 'horizontal',\n reverse,\n textAlign,\n fontColor = 'black',\n fontSize = 13,\n font,\n duration = 30\n } = this.state\n\n var text = this.text\n\n var isReverse = reverse\n var isTextOverflowed = this.isTextOverflowed\n\n var newsTicker = element as ThingsNewsTicker\n\n newsTicker.direction = direction\n newsTicker.duration = duration * 1000\n newsTicker.fontColor = fontColor\n newsTicker.fontFamily = font\n newsTicker.fontSize = `${fontSize}px`\n newsTicker.textAlign = textAlign\n newsTicker.isReverse = isReverse\n newsTicker.isTextOverflowed = isTextOverflowed\n newsTicker.textData = text\n } catch (e) {\n error(e)\n }\n }\n\n get isTextOverflowed() {\n var { width } = this.bounds\n var span = document.createElement('span')\n\n // @ts-ignore\n span.style.font = this.font\n span.style.position = 'fixed'\n span.style.left = '-100%'\n span.style.visibility = 'none'\n\n span.textContent = this.text\n\n document.body.appendChild(span)\n\n var textBounds = span.getBoundingClientRect()\n var isOverflowed = width < textBounds.width\n\n document.body.removeChild(span)\n\n return isOverflowed\n }\n}\n\nComponent.register('news-ticker', NewsTicker)\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/scene-news-ticker",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "News ticker Component for Things Scene.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"things-scene": true,
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"migration": "things-factory-migration"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hatiolab/things-scene": "^
|
|
30
|
+
"@hatiolab/things-scene": "^3.4.0",
|
|
31
31
|
"lit": "^3.1.2",
|
|
32
32
|
"web-animations-js": "^2.3.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
36
|
-
"@things-factory/builder": "^8.0.0
|
|
37
|
-
"@things-factory/operato-board": "^8.0.0
|
|
36
|
+
"@things-factory/builder": "^8.0.0",
|
|
37
|
+
"@things-factory/operato-board": "^8.0.0",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
39
39
|
"@typescript-eslint/parser": "^4.33.0",
|
|
40
40
|
"@web/dev-server": "^0.1.28",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"prettier --write"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "daedde221bb0afaa12079e47f12660921e960672"
|
|
63
63
|
}
|