@oicl/openbridge-webcomponents 0.0.15-dev-20241125211335 → 0.0.15-dev-20241127113847

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 (31) hide show
  1. package/custom-elements.json +103 -3
  2. package/dist/components/alert-menu/alert-menu.d.ts.map +1 -1
  3. package/dist/components/alert-menu/alert-menu.js +6 -4
  4. package/dist/components/alert-menu/alert-menu.js.map +1 -1
  5. package/dist/components/alert-topbar-element/alert-topbar-element.d.ts.map +1 -1
  6. package/dist/components/alert-topbar-element/alert-topbar-element.js +3 -1
  7. package/dist/components/alert-topbar-element/alert-topbar-element.js.map +1 -1
  8. package/dist/components/brilliance-menu/brilliance-menu.d.ts.map +1 -1
  9. package/dist/components/brilliance-menu/brilliance-menu.js +6 -4
  10. package/dist/components/brilliance-menu/brilliance-menu.js.map +1 -1
  11. package/dist/generated/locale-codes.d.ts +14 -0
  12. package/dist/generated/locale-codes.d.ts.map +1 -0
  13. package/dist/generated/locale-codes.js +14 -0
  14. package/dist/generated/locale-codes.js.map +1 -0
  15. package/dist/generated/locales/es-419.d.ts +12 -0
  16. package/dist/generated/locales/es-419.d.ts.map +1 -0
  17. package/dist/generated/locales/es-419.js +15 -0
  18. package/dist/generated/locales/es-419.js.map +1 -0
  19. package/dist/localization-settings.d.ts +6 -0
  20. package/dist/localization-settings.d.ts.map +1 -0
  21. package/dist/localization-settings.js +14 -0
  22. package/dist/localization-settings.js.map +1 -0
  23. package/lit-localize.json +15 -0
  24. package/package.json +8 -4
  25. package/src/components/alert-menu/alert-menu.ts +7 -4
  26. package/src/components/alert-topbar-element/alert-topbar-element.ts +4 -1
  27. package/src/components/brilliance-menu/brilliance-menu.ts +7 -4
  28. package/src/generated/locale-codes.ts +23 -0
  29. package/src/generated/locales/es-419.ts +22 -0
  30. package/src/localization-settings.ts +16 -0
  31. package/xliff/es-419.xlf +31 -0
@@ -17,6 +17,26 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/localization-settings.ts",
23
+ "declarations": [
24
+ {
25
+ "kind": "variable",
26
+ "name": "{getLocale, setLocale}"
27
+ }
28
+ ],
29
+ "exports": [
30
+ {
31
+ "kind": "js",
32
+ "name": "{getLocale, setLocale}",
33
+ "declaration": {
34
+ "name": "{getLocale, setLocale}",
35
+ "module": "src/localization-settings.ts"
36
+ }
37
+ }
38
+ ]
39
+ },
20
40
  {
21
41
  "kind": "javascript-module",
22
42
  "path": "src/storybook-util.ts",
@@ -219,9 +239,59 @@
219
239
  },
220
240
  {
221
241
  "kind": "javascript-module",
222
- "path": "src/navigation-instruments/types.ts",
223
- "declarations": [],
224
- "exports": []
242
+ "path": "src/generated/locale-codes.ts",
243
+ "declarations": [
244
+ {
245
+ "kind": "variable",
246
+ "name": "sourceLocale",
247
+ "default": "`en`",
248
+ "description": "The locale code that templates in this source code are written in."
249
+ },
250
+ {
251
+ "kind": "variable",
252
+ "name": "targetLocales",
253
+ "type": {
254
+ "text": "[\n `es-419`,\n]"
255
+ },
256
+ "default": "[ `es-419`, ]",
257
+ "description": "The other locale codes that this application is localized into. Sorted\nlexicographically."
258
+ },
259
+ {
260
+ "kind": "variable",
261
+ "name": "allLocales",
262
+ "type": {
263
+ "text": "[\n `en`,\n `es-419`,\n]"
264
+ },
265
+ "default": "[ `en`, `es-419`, ]",
266
+ "description": "All valid project locale codes. Sorted lexicographically."
267
+ }
268
+ ],
269
+ "exports": [
270
+ {
271
+ "kind": "js",
272
+ "name": "sourceLocale",
273
+ "declaration": {
274
+ "name": "sourceLocale",
275
+ "module": "src/generated/locale-codes.ts"
276
+ }
277
+ },
278
+ {
279
+ "kind": "js",
280
+ "name": "targetLocales",
281
+ "declaration": {
282
+ "name": "targetLocales",
283
+ "module": "src/generated/locale-codes.ts"
284
+ }
285
+ },
286
+ {
287
+ "kind": "js",
288
+ "name": "allLocales",
289
+ "declaration": {
290
+ "name": "allLocales",
291
+ "module": "src/generated/locale-codes.ts"
292
+ }
293
+ }
294
+ ]
225
295
  },
226
296
  {
227
297
  "kind": "javascript-module",
@@ -38197,6 +38267,12 @@
38197
38267
  }
38198
38268
  ]
38199
38269
  },
38270
+ {
38271
+ "kind": "javascript-module",
38272
+ "path": "src/navigation-instruments/types.ts",
38273
+ "declarations": [],
38274
+ "exports": []
38275
+ },
38200
38276
  {
38201
38277
  "kind": "javascript-module",
38202
38278
  "path": "src/svghelpers/circle.ts",
@@ -43617,6 +43693,30 @@
43617
43693
  }
43618
43694
  ]
43619
43695
  },
43696
+ {
43697
+ "kind": "javascript-module",
43698
+ "path": "src/generated/locales/es-419.ts",
43699
+ "declarations": [
43700
+ {
43701
+ "kind": "variable",
43702
+ "name": "templates",
43703
+ "type": {
43704
+ "text": "object"
43705
+ },
43706
+ "default": "{ 's0f3699a7bd401f61': `Noche`, 's3cd891731e99f7e6': `Alertas activas`, 's5de3f4978aaa2443': `Lista de alertas`, 's8119af112f965c78': `Brillantez`, 'sa7f8e003ff63ef9f': `No alertas activas`, 'se0955919920ee87d': `Día`, 's271aae29defa65a5': `ACK ALL`, 's253615bbc36ae2d7': `Auto brilliance`, 's6f01314ca1673b61': `Auto day - night`, }"
43707
+ }
43708
+ ],
43709
+ "exports": [
43710
+ {
43711
+ "kind": "js",
43712
+ "name": "templates",
43713
+ "declaration": {
43714
+ "name": "templates",
43715
+ "module": "src/generated/locales/es-419.ts"
43716
+ }
43717
+ }
43718
+ ]
43719
+ },
43620
43720
  {
43621
43721
  "kind": "javascript-module",
43622
43722
  "path": "src/navigation-instruments/azimuth-thruster/azimuth-thruster.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"alert-menu.d.ts","sourceRoot":"","sources":["../../../src/components/alert-menu/alert-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGhD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,qBACa,YAAa,SAAQ,UAAU;IACf,KAAK,EAAE,OAAO,CAAS;IAEzC,MAAM;IAuCf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
1
+ {"version":3,"file":"alert-menu.d.ts","sourceRoot":"","sources":["../../../src/components/alert-menu/alert-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGhD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,sCAAsC,CAAC;AAC9C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AAIxC;;;;GAIG;AACH,qBAEa,YAAa,SAAQ,UAAU;IACf,KAAK,EAAE,OAAO,CAAS;IAEzC,MAAM;IAuCf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
@@ -5,6 +5,7 @@ import "../button/button.js";
5
5
  import "../card-list-button/card-list-button.js";
6
6
  import "../../icons/icon-02-chevron-right.js";
7
7
  import "../../icons/icon-14-alert-list.js";
8
+ import { localized, msg } from "@lit/localize";
8
9
  var __defProp = Object.defineProperty;
9
10
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
11
  var __decorateClass = (decorators, target, key, kind) => {
@@ -24,19 +25,19 @@ let ObcAlertMenu = class extends LitElement {
24
25
  return html`
25
26
  <div class="wrapper">
26
27
  <div class="header">
27
- <div class="title">Active alerts</div>
28
+ <div class="title">${msg("Active alerts")}</div>
28
29
  ${this.empty ? null : html`<obc-button
29
30
  variant="raised"
30
31
  class="ack-all-btn"
31
32
  @click=${() => this.dispatchEvent(new CustomEvent("ack-all-click"))}
32
33
  >
33
- ACK ALL
34
+ ${msg("ACK ALL")}
34
35
  </obc-button> `}
35
36
  </div>
36
37
  <div class="divider"></div>
37
38
  <slot></slot>
38
39
  ${this.empty ? html`<div class="empty">
39
- <slot name="empty">No active alerts</slot>
40
+ <slot name="empty">${msg("No active alerts")}</slot>
40
41
  </div>` : null}
41
42
  <div class="spacer"></div>
42
43
  <div class="divider"></div>
@@ -47,7 +48,7 @@ let ObcAlertMenu = class extends LitElement {
47
48
  }}
48
49
  >
49
50
  <obi-14-alert-list slot="leading-icon"></obi-14-alert-list>
50
- Alert list
51
+ ${msg("Alert list")}
51
52
  <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
52
53
  </obc-card-list-button>
53
54
  </div>
@@ -59,6 +60,7 @@ __decorateClass([
59
60
  property({ type: Boolean })
60
61
  ], ObcAlertMenu.prototype, "empty", 2);
61
62
  ObcAlertMenu = __decorateClass([
63
+ localized(),
62
64
  customElement("obc-alert-menu")
63
65
  ], ObcAlertMenu);
64
66
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"alert-menu.js","sources":["../../../src/components/alert-menu/alert-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './alert-menu.css?inline';\nimport '../button/button';\nimport '../card-list-button/card-list-button';\nimport '../../icons/icon-02-chevron-right';\nimport '../../icons/icon-14-alert-list';\n\n/**\n *\n * @fires ack-all-click - Fired when the ack button is clicked\n * @fires alert-list-click - Fired when the alert list button is clicked\n */\n@customElement('obc-alert-menu')\nexport class ObcAlertMenu extends LitElement {\n @property({type: Boolean}) empty: boolean = false;\n\n override render() {\n return html`\n <div class=\"wrapper\">\n <div class=\"header\">\n <div class=\"title\">Active alerts</div>\n ${this.empty\n ? null\n : html`<obc-button\n variant=\"raised\"\n class=\"ack-all-btn\"\n @click=${() =>\n this.dispatchEvent(new CustomEvent('ack-all-click'))}\n >\n ACK ALL\n </obc-button> `}\n </div>\n <div class=\"divider\"></div>\n <slot></slot>\n ${this.empty\n ? html`<div class=\"empty\">\n <slot name=\"empty\">No active alerts</slot>\n </div>`\n : null}\n <div class=\"spacer\"></div>\n <div class=\"divider\"></div>\n <obc-card-list-button\n class=\"alert-list-btn\"\n @click=${() => {\n this.dispatchEvent(new CustomEvent('alert-list-click'));\n }}\n >\n <obi-14-alert-list slot=\"leading-icon\"></obi-14-alert-list>\n Alert list\n <obi-02-chevron-right slot=\"trailing-icon\"></obi-02-chevron-right>\n </obc-card-list-button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-menu': ObcAlertMenu;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAca,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACuC,SAAA,QAAA;AAAA,EAAA;AAAA,EAEnC,SAAS;AACT,WAAA;AAAA;AAAA;AAAA;AAAA,YAIC,KAAK,QACH,OACA;AAAA;AAAA;AAAA,yBAGW,MACP,KAAK,cAAc,IAAI,YAAY,eAAe,CAAC,CAAC;AAAA;AAAA;AAAA,6BAGzC;AAAA;AAAA;AAAA;AAAA,UAInB,KAAK,QACH;AAAA;AAAA,sBAGA,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKG,MAAM;AACb,WAAK,cAAc,IAAI,YAAY,kBAAkB,CAAC;AAAA,IACvD,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAWX;AA3Ca,aA0CK,SAAS,UAAU,YAAY;AAzCpB,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GADd,aACgB,WAAA,SAAA,CAAA;AADhB,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
1
+ {"version":3,"file":"alert-menu.js","sources":["../../../src/components/alert-menu/alert-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './alert-menu.css?inline';\nimport '../button/button';\nimport '../card-list-button/card-list-button';\nimport '../../icons/icon-02-chevron-right';\nimport '../../icons/icon-14-alert-list';\n\nimport {localized, msg} from '@lit/localize';\n\n/**\n *\n * @fires ack-all-click - Fired when the ack button is clicked\n * @fires alert-list-click - Fired when the alert list button is clicked\n */\n@localized()\n@customElement('obc-alert-menu')\nexport class ObcAlertMenu extends LitElement {\n @property({type: Boolean}) empty: boolean = false;\n\n override render() {\n return html`\n <div class=\"wrapper\">\n <div class=\"header\">\n <div class=\"title\">${msg('Active alerts')}</div>\n ${this.empty\n ? null\n : html`<obc-button\n variant=\"raised\"\n class=\"ack-all-btn\"\n @click=${() =>\n this.dispatchEvent(new CustomEvent('ack-all-click'))}\n >\n ${msg('ACK ALL')}\n </obc-button> `}\n </div>\n <div class=\"divider\"></div>\n <slot></slot>\n ${this.empty\n ? html`<div class=\"empty\">\n <slot name=\"empty\">${msg('No active alerts')}</slot>\n </div>`\n : null}\n <div class=\"spacer\"></div>\n <div class=\"divider\"></div>\n <obc-card-list-button\n class=\"alert-list-btn\"\n @click=${() => {\n this.dispatchEvent(new CustomEvent('alert-list-click'));\n }}\n >\n <obi-14-alert-list slot=\"leading-icon\"></obi-14-alert-list>\n ${msg('Alert list')}\n <obi-02-chevron-right slot=\"trailing-icon\"></obi-02-chevron-right>\n </obc-card-list-button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-menu': ObcAlertMenu;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAiBa,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACuC,SAAA,QAAA;AAAA,EAAA;AAAA,EAEnC,SAAS;AACT,WAAA;AAAA;AAAA;AAAA,+BAGoB,IAAI,eAAe,CAAC;AAAA,YACvC,KAAK,QACH,OACA;AAAA;AAAA;AAAA,yBAGW,MACP,KAAK,cAAc,IAAI,YAAY,eAAe,CAAC,CAAC;AAAA;AAAA,kBAEpD,IAAI,SAAS,CAAC;AAAA,6BACH;AAAA;AAAA;AAAA;AAAA,UAInB,KAAK,QACH;AAAA,mCACuB,IAAI,kBAAkB,CAAC;AAAA,sBAE9C,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKG,MAAM;AACb,WAAK,cAAc,IAAI,YAAY,kBAAkB,CAAC;AAAA,IACvD,CAAA;AAAA;AAAA;AAAA,YAGC,IAAI,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAQ7B;AA3Ca,aA0CK,SAAS,UAAU,YAAY;AAzCpB,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GADd,aACgB,WAAA,SAAA,CAAA;AADhB,eAAN,gBAAA;AAAA,EAFN,UAAU;AAAA,EACV,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"alert-topbar-element.d.ts","sourceRoot":"","sources":["../../../src/components/alert-topbar-element/alert-topbar-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGhD,OAAO,8BAA8B,CAAC;AACtC,OAAO,4CAA4C,CAAC;AACpD,OAAO,8CAA8C,CAAC;AAEtD,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,qBAAsB,SAAQ,UAAU;IACzB,OAAO,SAAK;IACZ,SAAS,EAAE,SAAS,CAAkB;IACrC,eAAe,UAAS;IACxB,iBAAiB,UAAS;IAC1B,OAAO,UAAS;IAChB,UAAU,UAAS;IACnB,SAAS,UAAS;IACnB,QAAQ,SAAO;IAEhC,MAAM;IAsEf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,yBAAyB,EAAE,qBAAqB,CAAC;KAClD;CACF"}
1
+ {"version":3,"file":"alert-topbar-element.d.ts","sourceRoot":"","sources":["../../../src/components/alert-topbar-element/alert-topbar-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGhD,OAAO,8BAA8B,CAAC;AACtC,OAAO,4CAA4C,CAAC;AACpD,OAAO,8CAA8C,CAAC;AAEtD,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAKtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAEa,qBAAsB,SAAQ,UAAU;IACzB,OAAO,SAAK;IACZ,SAAS,EAAE,SAAS,CAAkB;IACrC,eAAe,UAAS;IACxB,iBAAiB,UAAS;IAC1B,OAAO,UAAS;IAChB,UAAU,UAAS;IACnB,SAAS,UAAS;IACnB,QAAQ,SAAO;IAEhC,MAAM;IAsEf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,yBAAyB,EAAE,qBAAqB,CAAC;KAClD;CACF"}
@@ -7,6 +7,7 @@ import "../notification-message/notification-message.js";
7
7
  import "../../icons/icon-14-mute.js";
8
8
  import { AlertType } from "../../types.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
+ import { localized, msg } from "@lit/localize";
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __decorateClass = (decorators, target, key, kind) => {
@@ -49,7 +50,7 @@ let ObcAlertTopbarElement = class extends LitElement {
49
50
  @click=${() => this.dispatchEvent(new CustomEvent("messageclick"))}
50
51
  >
51
52
  <slot></slot>
52
- <div slot="empty">No active alerts</div>
53
+ <div slot="empty">${msg("No active alerts")}</div>
53
54
  </obc-notification-message>
54
55
  ${this.showAck ? html`<obc-notification-button
55
56
  openright
@@ -118,6 +119,7 @@ __decorateClass([
118
119
  property({ type: Number })
119
120
  ], ObcAlertTopbarElement.prototype, "maxWidth", 2);
120
121
  ObcAlertTopbarElement = __decorateClass([
122
+ localized(),
121
123
  customElement("obc-alert-topbar-element")
122
124
  ], ObcAlertTopbarElement);
123
125
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"alert-topbar-element.js","sources":["../../../src/components/alert-topbar-element/alert-topbar-element.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './alert-topbar-element.css?inline';\nimport '../alert-button/alert-button';\nimport '../notification-button/notification-button';\nimport '../notification-message/notification-message';\n\nimport '../../icons/icon-14-mute';\nimport {AlertType} from '../../types';\nimport {classMap} from 'lit/directives/class-map.js';\n\n/**\n * Element that displays the alert in topbar\n * Use the element in the alerts slot in topbar\n *\n * @prop {number} nAlerts - Number of alerts.\n * @prop {AlertType} alertType - Type of alert.\n * @prop {boolean} blinkAlarmValue - This value should alternate between true and false to make the icon blink.\n * It should be synchronized with the blinkValue of other alarms.\n * @prop {boolean} blinkWarningValue - This value should alternate between true and false to make the icon blink.\n * @prop {boolean} showAck - If the ack button should be shown.\n * @prop {boolean} alertMuted - If the alert is muted.\n * @prop {boolean} minimized - If the alert is minimized.\n * @prop {number} maxWidth - The maximum width of the alert.\n *\n * @fires muteclick - Fired when the mute button is clicked\n * @fires ackclick - Fired when the ack button is clicked\n * @fires alertclick - Fired when the alert button is clicked\n * @fires messageclick - Fired when the message is clicked\n *\n * @slot - The message to display in the alert element of type `obc-notification-message-item`\n * @slot empty - The message to display when there are no alerts\n */\n@customElement('obc-alert-topbar-element')\nexport class ObcAlertTopbarElement extends LitElement {\n @property({type: Number}) nAlerts = 0;\n @property({type: String}) alertType: AlertType = AlertType.None;\n @property({type: Boolean}) blinkAlarmValue = false;\n @property({type: Boolean}) blinkWarningValue = false;\n @property({type: Boolean}) showAck = false;\n @property({type: Boolean}) alertMuted = false;\n @property({type: Boolean}) minimized = false;\n @property({type: Number}) maxWidth = 480;\n\n override render() {\n const empty = this.nAlerts === 0;\n const disabledMute =\n this.alertMuted ||\n empty ||\n this.alertType === AlertType.None ||\n this.alertType === AlertType.Running ||\n this.alertType === AlertType.Caution;\n let firstPart;\n if (this.minimized) {\n firstPart = html`<obc-notification-button\n icon\n openright\n cornerleft\n @click=${() => this.dispatchEvent(new CustomEvent('muteclick'))}\n >\n <obi-14-mute></obi-14-mute>\n </obc-notification-button>`;\n } else {\n firstPart = html`<obc-notification-message\n class=\"notification-message\"\n .empty=${empty}\n @click=${() => this.dispatchEvent(new CustomEvent('messageclick'))}\n >\n <slot></slot>\n <div slot=\"empty\">No active alerts</div>\n </obc-notification-message>\n ${this.showAck\n ? html`<obc-notification-button\n openright\n @click=${() => this.dispatchEvent(new CustomEvent('ackclick'))}\n >ACK</obc-notification-button\n >`\n : html``}\n <obc-notification-button\n icon\n openright\n .indent=${empty}\n .disabled=${disabledMute}\n @click=${() => this.dispatchEvent(new CustomEvent('muteclick'))}\n >\n <obi-14-mute></obi-14-mute>\n </obc-notification-button>`;\n }\n return html`\n <style>\n :host {\n max-width: ${this.maxWidth}px;\n }\n </style>\n <div\n class=${classMap({\n wrapper: true,\n minimized: this.minimized,\n })}\n style=${`max-width: ${this.maxWidth - 8}px;`}\n >\n ${firstPart}\n <obc-alert-button\n .alertType=${this.alertType}\n .nAlerts=${this.nAlerts}\n .counter=${!empty}\n .blinkAlarmValue=${this.blinkAlarmValue}\n .blinkWarningValue=${this.blinkWarningValue}\n @click=${() => this.dispatchEvent(new CustomEvent('alertclick'))}\n ></obc-alert-button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ob-alert-topbar-element': ObcAlertTopbarElement;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkCa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AK;AAAA,6BACE,KAAK,eAAe;AAAA,+BAClB,KAAK,iBAAiB;AAAA,mBAClC,MAAM,KAAK,cAAc,IAAI,YAAY,YAAY,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,EAAA;AAO1E;AAjFa,sBAgFK,SAAS,UAAU,YAAY;AA/ErB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GADb,sBACe,WAAA,WAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAFb,sBAEe,WAAA,aAAA,CAAA;AACC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GAHd,sBAGgB,WAAA,mBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GAJd,sBAIgB,WAAA,qBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GALd,sBAKgB,WAAA,WAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GANd,sBAMgB,WAAA,cAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GAPd,sBAOgB,WAAA,aAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GARb,sBAQe,WAAA,YAAA,CAAA;AARf,wBAAN,gBAAA;AAAA,EADN,cAAc,0BAA0B;AAAA,GAC5B,qBAAA;"}
1
+ {"version":3,"file":"alert-topbar-element.js","sources":["../../../src/components/alert-topbar-element/alert-topbar-element.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './alert-topbar-element.css?inline';\nimport '../alert-button/alert-button';\nimport '../notification-button/notification-button';\nimport '../notification-message/notification-message';\n\nimport '../../icons/icon-14-mute';\nimport {AlertType} from '../../types';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {localized, msg} from '@lit/localize';\n\n/**\n * Element that displays the alert in topbar\n * Use the element in the alerts slot in topbar\n *\n * @prop {number} nAlerts - Number of alerts.\n * @prop {AlertType} alertType - Type of alert.\n * @prop {boolean} blinkAlarmValue - This value should alternate between true and false to make the icon blink.\n * It should be synchronized with the blinkValue of other alarms.\n * @prop {boolean} blinkWarningValue - This value should alternate between true and false to make the icon blink.\n * @prop {boolean} showAck - If the ack button should be shown.\n * @prop {boolean} alertMuted - If the alert is muted.\n * @prop {boolean} minimized - If the alert is minimized.\n * @prop {number} maxWidth - The maximum width of the alert.\n *\n * @fires muteclick - Fired when the mute button is clicked\n * @fires ackclick - Fired when the ack button is clicked\n * @fires alertclick - Fired when the alert button is clicked\n * @fires messageclick - Fired when the message is clicked\n *\n * @slot - The message to display in the alert element of type `obc-notification-message-item`\n * @slot empty - The message to display when there are no alerts\n */\n@localized()\n@customElement('obc-alert-topbar-element')\nexport class ObcAlertTopbarElement extends LitElement {\n @property({type: Number}) nAlerts = 0;\n @property({type: String}) alertType: AlertType = AlertType.None;\n @property({type: Boolean}) blinkAlarmValue = false;\n @property({type: Boolean}) blinkWarningValue = false;\n @property({type: Boolean}) showAck = false;\n @property({type: Boolean}) alertMuted = false;\n @property({type: Boolean}) minimized = false;\n @property({type: Number}) maxWidth = 480;\n\n override render() {\n const empty = this.nAlerts === 0;\n const disabledMute =\n this.alertMuted ||\n empty ||\n this.alertType === AlertType.None ||\n this.alertType === AlertType.Running ||\n this.alertType === AlertType.Caution;\n let firstPart;\n if (this.minimized) {\n firstPart = html`<obc-notification-button\n icon\n openright\n cornerleft\n @click=${() => this.dispatchEvent(new CustomEvent('muteclick'))}\n >\n <obi-14-mute></obi-14-mute>\n </obc-notification-button>`;\n } else {\n firstPart = html`<obc-notification-message\n class=\"notification-message\"\n .empty=${empty}\n @click=${() => this.dispatchEvent(new CustomEvent('messageclick'))}\n >\n <slot></slot>\n <div slot=\"empty\">${msg('No active alerts')}</div>\n </obc-notification-message>\n ${this.showAck\n ? html`<obc-notification-button\n openright\n @click=${() => this.dispatchEvent(new CustomEvent('ackclick'))}\n >ACK</obc-notification-button\n >`\n : html``}\n <obc-notification-button\n icon\n openright\n .indent=${empty}\n .disabled=${disabledMute}\n @click=${() => this.dispatchEvent(new CustomEvent('muteclick'))}\n >\n <obi-14-mute></obi-14-mute>\n </obc-notification-button>`;\n }\n return html`\n <style>\n :host {\n max-width: ${this.maxWidth}px;\n }\n </style>\n <div\n class=${classMap({\n wrapper: true,\n minimized: this.minimized,\n })}\n style=${`max-width: ${this.maxWidth - 8}px;`}\n >\n ${firstPart}\n <obc-alert-button\n .alertType=${this.alertType}\n .nAlerts=${this.nAlerts}\n .counter=${!empty}\n .blinkAlarmValue=${this.blinkAlarmValue}\n .blinkWarningValue=${this.blinkWarningValue}\n @click=${() => this.dispatchEvent(new CustomEvent('alertclick'))}\n ></obc-alert-button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ob-alert-topbar-element': ObcAlertTopbarElement;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAqCa,IAAA,wBAAN,cAAoC,WAAW;AAAA,EAA/C,cAAA;AAAA,UAAA,GAAA,SAAA;AAC+B,SAAA,UAAA;AACV,SAAA,YAAuB,UAAU;AACd,SAAA,kBAAA;AACE,SAAA,oBAAA;AACV,SAAA,UAAA;AACG,SAAA,aAAA;AACD,SAAA,YAAA;AACF,SAAA,WAAA;AAAA,EAAA;AAAA,EAE5B,SAAS;AACV,UAAA,QAAQ,KAAK,YAAY;AAC/B,UAAM,eACJ,KAAK,cACL,SACA,KAAK,cAAc,UAAU,QAC7B,KAAK,cAAc,UAAU,WAC7B,KAAK,cAAc,UAAU;AAC3B,QAAA;AACJ,QAAI,KAAK,WAAW;AACN,kBAAA;A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B,UAAS;IACA,eAAe,UAAS;IACxB,cAAc,UAAS;IAElD,gBAAgB,CAAC,KAAK,EAAE,WAAW;IASnC,mBAAmB,CAAC,KAAK,EAAE,WAAW;IAS7B,MAAM;IAwDf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
1
+ {"version":3,"file":"brilliance-menu.d.ts","sourceRoot":"","sources":["../../../src/components/brilliance-menu/brilliance-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGhD,OAAO,4BAA4B,CAAC;AACpC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,4CAA4C,CAAC;AACpD,OAAO,8CAA8C,CAAC;AACtD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,2BAA2B,CAAC;AACnC,OAAO,0BAA0B,CAAC;AAClC,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAgC,CAAC;AAIxC;;;;;;;;;;;GAWG;AACH,qBAEa,iBAAkB,SAAQ,UAAU;IACrB,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAC9D;IACkB,UAAU,SAAM;IAE1C,kBAAkB,UAAS;IACA,eAAe,UAAS;IACxB,cAAc,UAAS;IAElD,gBAAgB,CAAC,KAAK,EAAE,WAAW;IASnC,mBAAmB,CAAC,KAAK,EAAE,WAAW;IAS7B,MAAM;IAwDf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -12,6 +12,7 @@ import "../../icons/icon-04-night.js";
12
12
  import "../../icons/icon-04-dusk.js";
13
13
  import "../../icons/icon-04-day.js";
14
14
  import "../../icons/icon-04-day-bright.js";
15
+ import { localized, msg } from "@lit/localize";
15
16
  var __defProp = Object.defineProperty;
16
17
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
18
  var __decorateClass = (decorators, target, key, kind) => {
@@ -51,7 +52,7 @@ let ObcBrillianceMenu = class extends LitElement {
51
52
  return html`
52
53
  <div class="card">
53
54
  ${this.hideBrightness ? "" : html`
54
- <h3>Brilliance</h3>
55
+ <h3>${msg("Brilliance")}</h3>
55
56
  <obc-slider
56
57
  value=${this.brightness}
57
58
  @value=${this.onBrightnessChanged}
@@ -67,11 +68,11 @@ let ObcBrillianceMenu = class extends LitElement {
67
68
  ></obi-04-brilliance-high>
68
69
  </obc-slider>
69
70
  ${this.showAutoBrightness ? html`<obc-toggle-switch
70
- label="Auto brilliance"
71
+ .label="${msg("Auto brilliance")}"
71
72
  ></obc-toggle-switch>` : ""}
72
73
  <div class="divider"></div>
73
74
  `}
74
- <h3>Day - Night</h3>
75
+ <h3>${msg("Day")} - ${msg("Night")}</h3>
75
76
  <obc-toggle-button-group
76
77
  value=${this.palette}
77
78
  @value=${this.onPaletteChanged}
@@ -90,7 +91,7 @@ let ObcBrillianceMenu = class extends LitElement {
90
91
  </obc-toggle-button-option>
91
92
  </obc-toggle-button-group>
92
93
  ${this.showAutoPalette ? html`<obc-toggle-switch
93
- label="Auto day - night"
94
+ .label="${msg("Auto day - night")}"
94
95
  checked
95
96
  ></obc-toggle-switch>` : ""}
96
97
  </div>
@@ -114,6 +115,7 @@ __decorateClass([
114
115
  property({ type: Boolean })
115
116
  ], ObcBrillianceMenu.prototype, "hideBrightness", 2);
116
117
  ObcBrillianceMenu = __decorateClass([
118
+ localized(),
117
119
  customElement("obc-brilliance-menu")
118
120
  ], ObcBrillianceMenu);
119
121
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"brilliance-menu.js","sources":["../../../src/components/brilliance-menu/brilliance-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport componentStyle from './brilliance-menu.css?inline';\nimport '../icon-button/icon-button';\nimport '../slider/slider';\nimport '../toggle-switch/toggle-switch';\nimport '../toggle-button-group/toggle-button-group';\nimport '../toggle-button-option/toggle-button-option';\nimport '../../icons/icon-04-brilliance-low';\nimport '../../icons/icon-04-brilliance-high';\nimport '../../icons/icon-04-night';\nimport '../../icons/icon-04-dusk';\nimport '../../icons/icon-04-day';\nimport '../../icons/icon-04-day-bright';\n\n/**\n * @element obc-brilliance-menu\n *\n * @prop {String} palette - The palette to use. Possible values are 'night', 'dusk', 'day', 'bright'\n * @prop {Number} brightness - The brightness value\n * @prop {Boolean} showAutoBrightness - Show the auto brightness toggle\n * @prop {Boolean} showAutoPalette - Show the auto palette toggle\n * @prop {Boolean} hideBrightness - Show the auto brightness toggle\n *\n * @fires palette-changed - Fires when the palette is changed\n * @fires brightness-changed - Fires when the brightness is changed\n */\n@customElement('obc-brilliance-menu')\nexport class ObcBrillianceMenu extends LitElement {\n @property({type: String}) palette: 'night' | 'dusk' | 'day' | 'bright' =\n 'day';\n @property({type: Number}) brightness = 50;\n @property({type: Boolean})\n showAutoBrightness = false;\n @property({type: Boolean}) showAutoPalette = false;\n @property({type: Boolean}) hideBrightness = false;\n\n onPaletteChanged(event: CustomEvent) {\n this.palette = event.detail.value;\n this.dispatchEvent(\n new CustomEvent('palette-changed', {\n detail: {value: event.detail.value},\n })\n );\n }\n\n onBrightnessChanged(event: CustomEvent) {\n this.brightness = event.detail;\n this.dispatchEvent(\n new CustomEvent('brightness-changed', {\n detail: {value: event.detail},\n })\n );\n }\n\n override render() {\n return html`\n <div class=\"card\">\n ${this.hideBrightness\n ? ''\n : html`\n <h3>Brilliance</h3>\n <obc-slider\n value=${this.brightness}\n @value=${this.onBrightnessChanged}\n min=\"0\"\n max=\"100\"\n hugcontainer\n haslefticon\n hasrighticon\n >\n <obi-04-brilliance-low slot=\"icon-left\"></obi-04-brilliance-low>\n <obi-04-brilliance-high\n slot=\"icon-right\"\n ></obi-04-brilliance-high>\n </obc-slider>\n ${this.showAutoBrightness\n ? html`<obc-toggle-switch\n label=\"Auto brilliance\"\n ></obc-toggle-switch>`\n : ''}\n <div class=\"divider\"></div>\n `}\n <h3>Day - Night</h3>\n <obc-toggle-button-group\n value=${this.palette}\n @value=${this.onPaletteChanged}\n >\n <obc-toggle-button-option value=\"night\">\n <obi-04-night slot=\"icon\"></obi-04-night>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"dusk\">\n <obi-04-dusk slot=\"icon\"></obi-04-dusk>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"day\">\n <obi-04-day slot=\"icon\"></obi-04-day>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"bright\">\n <obi-04-day-bright slot=\"icon\"></obi-04-day-bright>\n </obc-toggle-button-option>\n </obc-toggle-button-group>\n ${this.showAutoPalette\n ? html`<obc-toggle-switch\n label=\"Auto day - night\"\n checked\n ></obc-toggle-switch>`\n : ''}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-brilliance-menu': ObcBrillianceMenu;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4Ba,IAAA,oBAAN,cAAgC,WAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA;AAEH,SAAA,UAAA;AACqC,SAAA,aAAA;AAElB,SAAA,qBAAA;AACwB,SAAA,kBAAA;AACD,SAAA,iBAAA;AAAA,EAAA;AAAA,EAE5C,iBAAiB,OAAoB;AAC9B,SAAA,UAAU,MAAM,OAAO;AACvB,SAAA;AAAA,MACH,IAAI,YAAY,mBAAmB;AAAA,QACjC,QAAQ,EAAC,OAAO,MAAM,OAAO,MAAK;AAAA,MACnC,CAAA;AAAA,IACH;AAAA,EAAA;AAAA,EAGF,oBAAoB,OAAoB;AACtC,SAAK,aAAa,MAAM;AACnB,SAAA;AAAA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liance-menu/brilliance-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport componentStyle from './brilliance-menu.css?inline';\nimport '../icon-button/icon-button';\nimport '../slider/slider';\nimport '../toggle-switch/toggle-switch';\nimport '../toggle-button-group/toggle-button-group';\nimport '../toggle-button-option/toggle-button-option';\nimport '../../icons/icon-04-brilliance-low';\nimport '../../icons/icon-04-brilliance-high';\nimport '../../icons/icon-04-night';\nimport '../../icons/icon-04-dusk';\nimport '../../icons/icon-04-day';\nimport '../../icons/icon-04-day-bright';\n\nimport {localized, msg} from '@lit/localize';\n\n/**\n * @element obc-brilliance-menu\n *\n * @prop {String} palette - The palette to use. Possible values are 'night', 'dusk', 'day', 'bright'\n * @prop {Number} brightness - The brightness value\n * @prop {Boolean} showAutoBrightness - Show the auto brightness toggle\n * @prop {Boolean} showAutoPalette - Show the auto palette toggle\n * @prop {Boolean} hideBrightness - Show the auto brightness toggle\n *\n * @fires palette-changed - Fires when the palette is changed\n * @fires brightness-changed - Fires when the brightness is changed\n */\n@localized()\n@customElement('obc-brilliance-menu')\nexport class ObcBrillianceMenu extends LitElement {\n @property({type: String}) palette: 'night' | 'dusk' | 'day' | 'bright' =\n 'day';\n @property({type: Number}) brightness = 50;\n @property({type: Boolean})\n showAutoBrightness = false;\n @property({type: Boolean}) showAutoPalette = false;\n @property({type: Boolean}) hideBrightness = false;\n\n onPaletteChanged(event: CustomEvent) {\n this.palette = event.detail.value;\n this.dispatchEvent(\n new CustomEvent('palette-changed', {\n detail: {value: event.detail.value},\n })\n );\n }\n\n onBrightnessChanged(event: CustomEvent) {\n this.brightness = event.detail;\n this.dispatchEvent(\n new CustomEvent('brightness-changed', {\n detail: {value: event.detail},\n })\n );\n }\n\n override render() {\n return html`\n <div class=\"card\">\n ${this.hideBrightness\n ? ''\n : html`\n <h3>${msg('Brilliance')}</h3>\n <obc-slider\n value=${this.brightness}\n @value=${this.onBrightnessChanged}\n min=\"0\"\n max=\"100\"\n hugcontainer\n haslefticon\n hasrighticon\n >\n <obi-04-brilliance-low slot=\"icon-left\"></obi-04-brilliance-low>\n <obi-04-brilliance-high\n slot=\"icon-right\"\n ></obi-04-brilliance-high>\n </obc-slider>\n ${this.showAutoBrightness\n ? html`<obc-toggle-switch\n .label=\"${msg('Auto brilliance')}\"\n ></obc-toggle-switch>`\n : ''}\n <div class=\"divider\"></div>\n `}\n <h3>${msg('Day')} - ${msg('Night')}</h3>\n <obc-toggle-button-group\n value=${this.palette}\n @value=${this.onPaletteChanged}\n >\n <obc-toggle-button-option value=\"night\">\n <obi-04-night slot=\"icon\"></obi-04-night>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"dusk\">\n <obi-04-dusk slot=\"icon\"></obi-04-dusk>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"day\">\n <obi-04-day slot=\"icon\"></obi-04-day>\n </obc-toggle-button-option>\n <obc-toggle-button-option value=\"bright\">\n <obi-04-day-bright slot=\"icon\"></obi-04-day-bright>\n </obc-toggle-button-option>\n </obc-toggle-button-group>\n ${this.showAutoPalette\n ? html`<obc-toggle-switch\n .label=\"${msg('Auto day - night')}\"\n checked\n ></obc-toggle-switch>`\n : ''}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-brilliance-menu': ObcBrillianceMenu;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+Ba,IAAA,oBAAN,cAAgC,WAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA;AAEH,SAAA,UAAA;AACqC,SAAA,aAAA;AAElB,SAAA,qBAAA;AACwB,SAAA,kBAAA;AACD,SAAA,iBAAA;AAAA,EAAA;AAAA,EAE5C,iBAAiB,OAAoB;AAC9B,SAAA,UAAU,MAAM,OAAO;AACvB,SAAA;AAAA,MACH,IAAI,YAAY,mBAAmB;AAAA,QACjC,QAAQ,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AM,QAAQ,CAAA;AAAA,GANd,kBAMgB,WAAA,mBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAQ,CAAA;AAAA,GAPd,kBAOgB,WAAA,kBAAA,CAAA;AAPhB,oBAAN,gBAAA;AAAA,EAFN,UAAU;AAAA,EACV,cAAc,qBAAqB;AAAA,GACvB,iBAAA;"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The locale code that templates in this source code are written in.
3
+ */
4
+ export declare const sourceLocale = "en";
5
+ /**
6
+ * The other locale codes that this application is localized into. Sorted
7
+ * lexicographically.
8
+ */
9
+ export declare const targetLocales: readonly ["es-419"];
10
+ /**
11
+ * All valid project locale codes. Sorted lexicographically.
12
+ */
13
+ export declare const allLocales: readonly ["en", "es-419"];
14
+ //# sourceMappingURL=locale-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-codes.d.ts","sourceRoot":"","sources":["../../src/generated/locale-codes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAEhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,2BAGb,CAAC"}
@@ -0,0 +1,14 @@
1
+ const sourceLocale = `en`;
2
+ const targetLocales = [
3
+ `es-419`
4
+ ];
5
+ const allLocales = [
6
+ `en`,
7
+ `es-419`
8
+ ];
9
+ export {
10
+ allLocales,
11
+ sourceLocale,
12
+ targetLocales
13
+ };
14
+ //# sourceMappingURL=locale-codes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-codes.js","sources":["../../src/generated/locale-codes.ts"],"sourcesContent":["// Do not modify this file by hand!\n// Re-generate this file by running lit-localize.\n\n/**\n * The locale code that templates in this source code are written in.\n */\nexport const sourceLocale = `en`;\n\n/**\n * The other locale codes that this application is localized into. Sorted\n * lexicographically.\n */\nexport const targetLocales = [\n `es-419`,\n] as const;\n\n/**\n * All valid project locale codes. Sorted lexicographically.\n */\nexport const allLocales = [\n `en`,\n `es-419`,\n] as const;\n"],"names":[],"mappings":"AAMO,MAAM,eAAe;AAMrB,MAAM,gBAAgB;AAAA,EAC3B;AACF;AAKO,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AACF;"}
@@ -0,0 +1,12 @@
1
+ export declare const templates: {
2
+ s0f3699a7bd401f61: string;
3
+ s3cd891731e99f7e6: string;
4
+ s5de3f4978aaa2443: string;
5
+ s8119af112f965c78: string;
6
+ sa7f8e003ff63ef9f: string;
7
+ se0955919920ee87d: string;
8
+ s271aae29defa65a5: string;
9
+ s253615bbc36ae2d7: string;
10
+ s6f01314ca1673b61: string;
11
+ };
12
+ //# sourceMappingURL=es-419.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-419.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/es-419.ts"],"names":[],"mappings":"AAUI,eAAO,MAAM,SAAS;;;;;;;;;;CAUrB,CAAC"}
@@ -0,0 +1,15 @@
1
+ const templates = {
2
+ "s0f3699a7bd401f61": `Noche`,
3
+ "s3cd891731e99f7e6": `Alertas activas`,
4
+ "s5de3f4978aaa2443": `Lista de alertas`,
5
+ "s8119af112f965c78": `Brillantez`,
6
+ "sa7f8e003ff63ef9f": `No alertas activas`,
7
+ "se0955919920ee87d": `Día`,
8
+ "s271aae29defa65a5": `ACK ALL`,
9
+ "s253615bbc36ae2d7": `Auto brilliance`,
10
+ "s6f01314ca1673b61": `Auto day - night`
11
+ };
12
+ export {
13
+ templates
14
+ };
15
+ //# sourceMappingURL=es-419.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-419.js","sources":["../../../src/generated/locales/es-419.ts"],"sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 's0f3699a7bd401f61': `Noche`,\n's3cd891731e99f7e6': `Alertas activas`,\n's5de3f4978aaa2443': `Lista de alertas`,\n's8119af112f965c78': `Brillantez`,\n'sa7f8e003ff63ef9f': `No alertas activas`,\n'se0955919920ee87d': `Día`,\n's271aae29defa65a5': `ACK ALL`,\n's253615bbc36ae2d7': `Auto brilliance`,\n's6f01314ca1673b61': `Auto day - night`,\n };\n "],"names":[],"mappings":"AAUW,MAAM,YAAY;AAAA,EACvB,qBAAqB;AAAA,EAC3B,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACjB;"}
@@ -0,0 +1,6 @@
1
+ export declare const getLocale: (() => string) & {
2
+ _LIT_LOCALIZE_GET_LOCALE_?: undefined;
3
+ }, setLocale: ((newLocale: string) => Promise<void>) & {
4
+ _LIT_LOCALIZE_SET_LOCALE_?: undefined;
5
+ };
6
+ //# sourceMappingURL=localization-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localization-settings.d.ts","sourceRoot":"","sources":["../src/localization-settings.ts"],"names":[],"mappings":"AAUA,eAAO,MAAO,SAAS;;GAAE,SAAS;;CAKhC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { configureLocalization } from "@lit/localize";
2
+ import { sourceLocale, targetLocales } from "./generated/locale-codes.js";
3
+ import * as es419 from "./generated/locales/es-419.js";
4
+ const localizedTemplates = /* @__PURE__ */ new Map([["es-419", es419]]);
5
+ const { getLocale, setLocale } = configureLocalization({
6
+ sourceLocale,
7
+ targetLocales,
8
+ loadLocale: async (locale) => localizedTemplates.get(locale)
9
+ });
10
+ export {
11
+ getLocale,
12
+ setLocale
13
+ };
14
+ //# sourceMappingURL=localization-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localization-settings.js","sources":["../src/localization-settings.ts"],"sourcesContent":["import {configureLocalization, LocaleModule} from '@lit/localize';\n\n// Generated via output.localeCodesModule\n\nimport {sourceLocale, targetLocales} from './generated/locale-codes';\n\nimport * as templates_es_419 from './generated/locales/es-419';\n\nconst localizedTemplates = new Map([['es-419', templates_es_419]]);\n\nexport const {getLocale, setLocale} = configureLocalization({\n sourceLocale,\n targetLocales,\n loadLocale: async (locale): Promise<LocaleModule> =>\n localizedTemplates.get(locale) as LocaleModule,\n});\n"],"names":["templates_es_419"],"mappings":";;;AAQA,MAAM,yCAAyB,IAAI,CAAC,CAAC,UAAUA,KAAgB,CAAC,CAAC;AAE1D,MAAM,EAAC,WAAW,UAAS,IAAI,sBAAsB;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,YAAY,OAAO,WACjB,mBAAmB,IAAI,MAAM;AACjC,CAAC;"}
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
3
+ "sourceLocale": "en",
4
+ "targetLocales": ["es-419"],
5
+ "tsConfig": "./tsconfig.json",
6
+ "output": {
7
+ "mode": "runtime",
8
+ "outputDir": "./src/generated/locales",
9
+ "localeCodesModule": "./src/generated/locale-codes.ts"
10
+ },
11
+ "interchange": {
12
+ "format": "xliff",
13
+ "xliffDir": "./xliff/"
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents",
3
- "version": "0.0.15-dev-20241125211335",
3
+ "version": "0.0.15-dev-20241127113847",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,9 +9,10 @@
9
9
  },
10
10
  "license": "Apache-2.0",
11
11
  "scripts": {
12
- "build": "yarn run typecheck && yarn run build:ts && yarn run analyze && yarn run build:wrappers",
12
+ "build": "yarn run build:translations && yarn run typecheck && yarn run build:ts && yarn run analyze && yarn run build:wrappers",
13
13
  "build:ts": "vite build",
14
14
  "build:ts:watch": "vite build --watch",
15
+ "build:translations": "lit localize build",
15
16
  "build:wrappers": "lit labs gen --framework=vue --framework=react --out=.. && node fix-generated.cjs",
16
17
  "typecheck": "tsc --noEmit",
17
18
  "preview": "vite preview",
@@ -32,14 +33,15 @@
32
33
  },
33
34
  "dependencies": {
34
35
  "@lit-labs/observers": "^2.0.4",
35
- "lit": "^3.2.1",
36
- "typescript-eslint": "^8.15.0"
36
+ "@lit/localize": "^0.12.1",
37
+ "lit": "^3.2.1"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@custom-elements-manifest/analyzer": "^0.10.3",
40
41
  "@eslint/eslintrc": "^3.2.0",
41
42
  "@eslint/js": "^9.15.0",
42
43
  "@lit-labs/cli": "^0.6.5",
44
+ "@lit-labs/cli-localize": "^0.2.1",
43
45
  "@lit-labs/gen-wrapper-react": "^0.3.3",
44
46
  "@lit-labs/gen-wrapper-vue": "^0.4.0",
45
47
  "@open-wc/lit-helpers": "^0.7.0",
@@ -59,6 +61,7 @@
59
61
  "@topcli/prompts": "^2.0.0",
60
62
  "@types/jest-image-snapshot": "^6",
61
63
  "@types/node": "^22.4.1",
64
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
62
65
  "dotenv": "^16.3.1",
63
66
  "eslint": "^9.15.0",
64
67
  "eslint-plugin-storybook": "^0.11.1",
@@ -78,6 +81,7 @@
78
81
  "storybook-addon-tag-badges": "^1.2.0",
79
82
  "tsx": "^4.7.1",
80
83
  "typescript": "^5.3.3",
84
+ "typescript-eslint": "^8.15.0",
81
85
  "vite": "^5.2.7",
82
86
  "vite-plugin-dts": "^4.3.0"
83
87
  },
@@ -6,11 +6,14 @@ import '../card-list-button/card-list-button';
6
6
  import '../../icons/icon-02-chevron-right';
7
7
  import '../../icons/icon-14-alert-list';
8
8
 
9
+ import {localized, msg} from '@lit/localize';
10
+
9
11
  /**
10
12
  *
11
13
  * @fires ack-all-click - Fired when the ack button is clicked
12
14
  * @fires alert-list-click - Fired when the alert list button is clicked
13
15
  */
16
+ @localized()
14
17
  @customElement('obc-alert-menu')
15
18
  export class ObcAlertMenu extends LitElement {
16
19
  @property({type: Boolean}) empty: boolean = false;
@@ -19,7 +22,7 @@ export class ObcAlertMenu extends LitElement {
19
22
  return html`
20
23
  <div class="wrapper">
21
24
  <div class="header">
22
- <div class="title">Active alerts</div>
25
+ <div class="title">${msg('Active alerts')}</div>
23
26
  ${this.empty
24
27
  ? null
25
28
  : html`<obc-button
@@ -28,14 +31,14 @@ export class ObcAlertMenu extends LitElement {
28
31
  @click=${() =>
29
32
  this.dispatchEvent(new CustomEvent('ack-all-click'))}
30
33
  >
31
- ACK ALL
34
+ ${msg('ACK ALL')}
32
35
  </obc-button> `}
33
36
  </div>
34
37
  <div class="divider"></div>
35
38
  <slot></slot>
36
39
  ${this.empty
37
40
  ? html`<div class="empty">
38
- <slot name="empty">No active alerts</slot>
41
+ <slot name="empty">${msg('No active alerts')}</slot>
39
42
  </div>`
40
43
  : null}
41
44
  <div class="spacer"></div>
@@ -47,7 +50,7 @@ export class ObcAlertMenu extends LitElement {
47
50
  }}
48
51
  >
49
52
  <obi-14-alert-list slot="leading-icon"></obi-14-alert-list>
50
- Alert list
53
+ ${msg('Alert list')}
51
54
  <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
52
55
  </obc-card-list-button>
53
56
  </div>
@@ -9,6 +9,8 @@ import '../../icons/icon-14-mute';
9
9
  import {AlertType} from '../../types';
10
10
  import {classMap} from 'lit/directives/class-map.js';
11
11
 
12
+ import {localized, msg} from '@lit/localize';
13
+
12
14
  /**
13
15
  * Element that displays the alert in topbar
14
16
  * Use the element in the alerts slot in topbar
@@ -31,6 +33,7 @@ import {classMap} from 'lit/directives/class-map.js';
31
33
  * @slot - The message to display in the alert element of type `obc-notification-message-item`
32
34
  * @slot empty - The message to display when there are no alerts
33
35
  */
36
+ @localized()
34
37
  @customElement('obc-alert-topbar-element')
35
38
  export class ObcAlertTopbarElement extends LitElement {
36
39
  @property({type: Number}) nAlerts = 0;
@@ -67,7 +70,7 @@ export class ObcAlertTopbarElement extends LitElement {
67
70
  @click=${() => this.dispatchEvent(new CustomEvent('messageclick'))}
68
71
  >
69
72
  <slot></slot>
70
- <div slot="empty">No active alerts</div>
73
+ <div slot="empty">${msg('No active alerts')}</div>
71
74
  </obc-notification-message>
72
75
  ${this.showAck
73
76
  ? html`<obc-notification-button
@@ -13,6 +13,8 @@ import '../../icons/icon-04-dusk';
13
13
  import '../../icons/icon-04-day';
14
14
  import '../../icons/icon-04-day-bright';
15
15
 
16
+ import {localized, msg} from '@lit/localize';
17
+
16
18
  /**
17
19
  * @element obc-brilliance-menu
18
20
  *
@@ -25,6 +27,7 @@ import '../../icons/icon-04-day-bright';
25
27
  * @fires palette-changed - Fires when the palette is changed
26
28
  * @fires brightness-changed - Fires when the brightness is changed
27
29
  */
30
+ @localized()
28
31
  @customElement('obc-brilliance-menu')
29
32
  export class ObcBrillianceMenu extends LitElement {
30
33
  @property({type: String}) palette: 'night' | 'dusk' | 'day' | 'bright' =
@@ -59,7 +62,7 @@ export class ObcBrillianceMenu extends LitElement {
59
62
  ${this.hideBrightness
60
63
  ? ''
61
64
  : html`
62
- <h3>Brilliance</h3>
65
+ <h3>${msg('Brilliance')}</h3>
63
66
  <obc-slider
64
67
  value=${this.brightness}
65
68
  @value=${this.onBrightnessChanged}
@@ -76,12 +79,12 @@ export class ObcBrillianceMenu extends LitElement {
76
79
  </obc-slider>
77
80
  ${this.showAutoBrightness
78
81
  ? html`<obc-toggle-switch
79
- label="Auto brilliance"
82
+ .label="${msg('Auto brilliance')}"
80
83
  ></obc-toggle-switch>`
81
84
  : ''}
82
85
  <div class="divider"></div>
83
86
  `}
84
- <h3>Day - Night</h3>
87
+ <h3>${msg('Day')} - ${msg('Night')}</h3>
85
88
  <obc-toggle-button-group
86
89
  value=${this.palette}
87
90
  @value=${this.onPaletteChanged}
@@ -101,7 +104,7 @@ export class ObcBrillianceMenu extends LitElement {
101
104
  </obc-toggle-button-group>
102
105
  ${this.showAutoPalette
103
106
  ? html`<obc-toggle-switch
104
- label="Auto day - night"
107
+ .label="${msg('Auto day - night')}"
105
108
  checked
106
109
  ></obc-toggle-switch>`
107
110
  : ''}
@@ -0,0 +1,23 @@
1
+ // Do not modify this file by hand!
2
+ // Re-generate this file by running lit-localize.
3
+
4
+ /**
5
+ * The locale code that templates in this source code are written in.
6
+ */
7
+ export const sourceLocale = `en`;
8
+
9
+ /**
10
+ * The other locale codes that this application is localized into. Sorted
11
+ * lexicographically.
12
+ */
13
+ export const targetLocales = [
14
+ `es-419`,
15
+ ] as const;
16
+
17
+ /**
18
+ * All valid project locale codes. Sorted lexicographically.
19
+ */
20
+ export const allLocales = [
21
+ `en`,
22
+ `es-419`,
23
+ ] as const;
@@ -0,0 +1,22 @@
1
+
2
+ // Do not modify this file by hand!
3
+ // Re-generate this file by running lit-localize
4
+
5
+
6
+
7
+
8
+ /* eslint-disable no-irregular-whitespace */
9
+ /* eslint-disable @typescript-eslint/no-explicit-any */
10
+
11
+ export const templates = {
12
+ 's0f3699a7bd401f61': `Noche`,
13
+ 's3cd891731e99f7e6': `Alertas activas`,
14
+ 's5de3f4978aaa2443': `Lista de alertas`,
15
+ 's8119af112f965c78': `Brillantez`,
16
+ 'sa7f8e003ff63ef9f': `No alertas activas`,
17
+ 'se0955919920ee87d': `Día`,
18
+ 's271aae29defa65a5': `ACK ALL`,
19
+ 's253615bbc36ae2d7': `Auto brilliance`,
20
+ 's6f01314ca1673b61': `Auto day - night`,
21
+ };
22
+
@@ -0,0 +1,16 @@
1
+ import {configureLocalization, LocaleModule} from '@lit/localize';
2
+
3
+ // Generated via output.localeCodesModule
4
+
5
+ import {sourceLocale, targetLocales} from './generated/locale-codes';
6
+
7
+ import * as templates_es_419 from './generated/locales/es-419';
8
+
9
+ const localizedTemplates = new Map([['es-419', templates_es_419]]);
10
+
11
+ export const {getLocale, setLocale} = configureLocalization({
12
+ sourceLocale,
13
+ targetLocales,
14
+ loadLocale: async (locale): Promise<LocaleModule> =>
15
+ localizedTemplates.get(locale) as LocaleModule,
16
+ });
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3
+ <file target-language="es-419" source-language="en" original="lit-localize-inputs" datatype="plaintext">
4
+ <body>
5
+ <trans-unit id="sa7f8e003ff63ef9f">
6
+ <source>No active alerts</source>
7
+ <target>No alertas activas</target>
8
+ </trans-unit>
9
+ <trans-unit id="s3cd891731e99f7e6">
10
+ <source>Active alerts</source>
11
+ <target>Alertas activas</target>
12
+ </trans-unit>
13
+ <trans-unit id="s5de3f4978aaa2443">
14
+ <source>Alert list</source>
15
+ <target>Lista de alertas</target>
16
+ </trans-unit>
17
+ <trans-unit id="s8119af112f965c78">
18
+ <source>Brilliance</source>
19
+ <target>Brillantez</target>
20
+ </trans-unit>
21
+ <trans-unit id="se0955919920ee87d">
22
+ <source>Day</source>
23
+ <target>Día</target>
24
+ </trans-unit>
25
+ <trans-unit id="s0f3699a7bd401f61">
26
+ <source>Night</source>
27
+ <target>Noche</target>
28
+ </trans-unit>
29
+ </body>
30
+ </file>
31
+ </xliff>