@oicl/openbridge-webcomponents 0.0.15-dev-20240923194534 → 0.0.15-dev-20240925080218
Sign up to get free protection for your applications and to get access to all the features.
- package/custom-elements.json +2726 -2726
- package/dist/navigation-instruments/instrument-field/instrument-field.d.ts +1 -2
- package/dist/navigation-instruments/instrument-field/instrument-field.d.ts.map +1 -1
- package/dist/navigation-instruments/instrument-field/instrument-field.js.map +1 -1
- package/package.json +1 -1
- package/src/navigation-instruments/instrument-field/instrument-field.ts +1 -7
@@ -6,9 +6,8 @@ export declare enum InstrumentFieldSize {
|
|
6
6
|
large = "large",
|
7
7
|
largeEnhanced = "large-enhanced"
|
8
8
|
}
|
9
|
-
export type InstrumentFieldSizeType = 'small' | 'regular' | 'enhanced' | 'large' | 'large-enhanced';
|
10
9
|
export declare class ObcInstrumentField extends LitElement {
|
11
|
-
size:
|
10
|
+
size: InstrumentFieldSize;
|
12
11
|
setpoint: number;
|
13
12
|
hasSetpoint: boolean;
|
14
13
|
value: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"instrument-field.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/instrument-field/instrument-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,aAAa,mBAAmB;CACjC;
|
1
|
+
{"version":3,"file":"instrument-field.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/instrument-field/instrument-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,aAAa,mBAAmB;CACjC;AAED,qBACa,kBAAmB,SAAQ,UAAU;IACtB,IAAI,EAAE,mBAAmB,CACrB;IACJ,QAAQ,SAAK;IACZ,WAAW,UAAS;IACrB,KAAK,SAAK;IACT,MAAM,UAAS;IAChB,SAAS,SAAK;IACd,cAAc,SAAK;IACnB,GAAG,SAAM;IACT,IAAI,SAAM;IACV,MAAM,SAAM;IACX,SAAS,UAAS;IAEpC,MAAM;IAmDf,IAAI,wBAAwB,IAAI,MAAM,CAErC;IAED,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,IAAI,SAAS,IAAI,MAAM,CAUtB;IAED,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"instrument-field.js","sources":["../../../src/navigation-instruments/instrument-field/instrument-field.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './instrument-field.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport enum InstrumentFieldSize {\n small = 'small',\n regular = 'regular',\n enhanced = 'enhanced',\n large = 'large',\n largeEnhanced = 'large-enhanced',\n}\
|
1
|
+
{"version":3,"file":"instrument-field.js","sources":["../../../src/navigation-instruments/instrument-field/instrument-field.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './instrument-field.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport enum InstrumentFieldSize {\n small = 'small',\n regular = 'regular',\n enhanced = 'enhanced',\n large = 'large',\n largeEnhanced = 'large-enhanced',\n}\n\n@customElement('obc-instrument-field')\nexport class ObcInstrumentField extends LitElement {\n @property({type: String}) size: InstrumentFieldSize =\n InstrumentFieldSize.regular;\n @property({type: Number}) setpoint = 0;\n @property({type: Boolean}) hasSetpoint = false;\n @property({type: Number}) value = 0;\n @property({type: Boolean}) degree = false;\n @property({type: Number}) maxDigits = 3;\n @property({type: Number}) fractionDigits = 0;\n @property({type: String}) tag = '';\n @property({type: String}) unit = '';\n @property({type: String}) source = '';\n @property({type: Boolean}) hasSource = false;\n\n override render() {\n return html`\n <div class=${classMap({wrapper: true, [this.size]: true})}>\n ${this.hasSetpoint\n ? html`<div class=\"setpoint\">\n ${this.size === 'small' || this.size === 'regular'\n ? html`<svg\n class=\"setpoint-arrow\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4 4C4 3.17595 4.94076 2.70557 5.6 3.2L12 8L5.6 12.8C4.94076 13.2944 4 12.824 4 12V4Z\"\n fill=\"#0070D6\"\n />\n </svg>`\n : html`<svg\n class=\"setpoint-arrow\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6 5C6 4.17595 6.94076 3.70557 7.6 4.2L18 12L7.6 19.8C6.94076 20.2944 6 19.824 6 19V5Z\"\n fill=\"var(--instrument-enhanced-primary-color)\"\n />\n </svg>`}\n <div class=\"setpoint-value\">${this.setpointValueBlueNumbers}</div>\n </div>`\n : null}\n <div class=\"value\">\n <div class=\"value-hint-zero\">${this.hintZeros}</div>\n <div class=\"value-blue\">${this.valueBlueNumbers}</div>\n ${this.degree ? html`<div class=\"degree\">°</div>` : null}\n </div>\n <div class=\"label\">\n <div class=\"tag\">${this.tag}</div>\n <div class=\"unit\">${this.unit}</div>\n </div>\n ${this.hasSource\n ? html`<div class=\"source\">${this.source}</div>`\n : null}\n </div>\n `;\n }\n\n get setpointValueBlueNumbers(): string {\n return this.setpoint.toFixed(this.fractionDigits);\n }\n\n get valueBlueNumbers(): string {\n return this.value.toFixed(this.fractionDigits);\n }\n\n get hintZeros(): string {\n if (this.value < 0) {\n return '';\n }\n const nBlues = this.valueBlueNumbers.length;\n const nHints = this.maxDigits - nBlues;\n if (nHints > 0) {\n return '0'.repeat(nHints);\n }\n return '';\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-instrument-field': ObcInstrumentField;\n }\n}\n"],"names":["InstrumentFieldSize"],"mappings":";;;;;;;;;;;;;;;AAKY,IAAA,wCAAAA,yBAAL;AACLA,uBAAA,OAAQ,IAAA;AACRA,uBAAA,SAAU,IAAA;AACVA,uBAAA,UAAW,IAAA;AACXA,uBAAA,OAAQ,IAAA;AACRA,uBAAA,eAAgB,IAAA;AALNA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AASC,IAAA,qBAAN,cAAiC,WAAW;AAAA,EAA5C,cAAA;AAAA,UAAA,GAAA,SAAA;AAEH,SAAA,OAAA;AACmC,SAAA,WAAA;AACI,SAAA,cAAA;AACP,SAAA,QAAA;AACE,SAAA,SAAA;AACE,SAAA,YAAA;AACK,SAAA,iBAAA;AACX,SAAA,MAAA;AACC,SAAA,OAAA;AACE,SAAA,SAAA;AACI,SAAA,YAAA;AAAA,EAAA;AAAA,EAE9B,SAAS;AACT,WAAA;AAAA,mBACQ,SAAS,EAAC,SAAS,MAAM,CAAC,KAAK,IAAI,GAAG,KAAI,CAAC,CAAC;AAAA,UACrD,KAAK,cACH;AAAA,gBACI,KAAK,SAAS,WAAW,KAAK,SAAS,YACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAaA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAYO;AAAA,4CACmB,KAAK,wBAAwB;AAAA,sBAE7D,IAAI;AAAA;AAAA,yCAEyB,KAAK,SAAS;AAAA,oCACnB,KAAK,gBAAgB;AAAA,YAC7C,KAAK,SAAS,oCAAoC,IAAI;AAAA;AAAA;AAAA,6BAGrC,KAAK,GAAG;AAAA,8BACP,KAAK,IAAI;AAAA;AAAA,UAE7B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C,MAAM,QAAO;AAAA,GAVb,mBAUe,WAAA,QAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAXb,mBAWe,WAAA,UAAA,CAAA;AACC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAZd,mBAYgB,WAAA,aAAA,CAAA;AAZhB,qBAAN,gBAAA;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB,kBAAA;"}
|
package/package.json
CHANGED
@@ -10,16 +10,10 @@ export enum InstrumentFieldSize {
|
|
10
10
|
large = 'large',
|
11
11
|
largeEnhanced = 'large-enhanced',
|
12
12
|
}
|
13
|
-
export type InstrumentFieldSizeType =
|
14
|
-
| 'small'
|
15
|
-
| 'regular'
|
16
|
-
| 'enhanced'
|
17
|
-
| 'large'
|
18
|
-
| 'large-enhanced';
|
19
13
|
|
20
14
|
@customElement('obc-instrument-field')
|
21
15
|
export class ObcInstrumentField extends LitElement {
|
22
|
-
@property({type: String}) size:
|
16
|
+
@property({type: String}) size: InstrumentFieldSize =
|
23
17
|
InstrumentFieldSize.regular;
|
24
18
|
@property({type: Number}) setpoint = 0;
|
25
19
|
@property({type: Boolean}) hasSetpoint = false;
|