@fmsim/board 1.0.68 → 1.0.69

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.
@@ -1280,6 +1280,30 @@
1280
1280
  "kind": "method",
1281
1281
  "name": "onLegendToggle"
1282
1282
  },
1283
+ {
1284
+ "kind": "method",
1285
+ "name": "onPopup",
1286
+ "parameters": [
1287
+ {
1288
+ "name": "component",
1289
+ "type": {
1290
+ "text": "Component"
1291
+ }
1292
+ }
1293
+ ]
1294
+ },
1295
+ {
1296
+ "kind": "method",
1297
+ "name": "onModalPopup",
1298
+ "parameters": [
1299
+ {
1300
+ "name": "component",
1301
+ "type": {
1302
+ "text": "Component"
1303
+ }
1304
+ }
1305
+ ]
1306
+ },
1283
1307
  {
1284
1308
  "kind": "method",
1285
1309
  "name": "getSceneData"
@@ -3988,14 +4012,6 @@
3988
4012
  },
3989
4013
  "attribute": "group"
3990
4014
  },
3991
- {
3992
- "kind": "field",
3993
- "name": "inherited",
3994
- "type": {
3995
- "text": "InheritedValueType | undefined"
3996
- },
3997
- "attribute": "inherited"
3998
- },
3999
4015
  {
4000
4016
  "kind": "field",
4001
4017
  "name": "creatable",
@@ -4154,13 +4170,6 @@
4154
4170
  },
4155
4171
  "fieldName": "group"
4156
4172
  },
4157
- {
4158
- "name": "inherited",
4159
- "type": {
4160
- "text": "InheritedValueType | undefined"
4161
- },
4162
- "fieldName": "inherited"
4163
- },
4164
4173
  {
4165
4174
  "name": "creatable",
4166
4175
  "type": {
@@ -7343,172 +7352,6 @@
7343
7352
  }
7344
7353
  ]
7345
7354
  },
7346
- {
7347
- "kind": "javascript-module",
7348
- "path": "src/modeller/property-sidebar/styles/styles.ts",
7349
- "declarations": [
7350
- {
7351
- "kind": "class",
7352
- "description": "",
7353
- "name": "PropertyStyles",
7354
- "members": [
7355
- {
7356
- "kind": "field",
7357
- "name": "value",
7358
- "type": {
7359
- "text": "any"
7360
- },
7361
- "default": "{}",
7362
- "attribute": "value"
7363
- },
7364
- {
7365
- "kind": "field",
7366
- "name": "selected",
7367
- "type": {
7368
- "text": "Component[]"
7369
- },
7370
- "default": "[]",
7371
- "attribute": "selected"
7372
- },
7373
- {
7374
- "kind": "field",
7375
- "name": "fonts",
7376
- "type": {
7377
- "text": "any[]"
7378
- },
7379
- "default": "[]",
7380
- "attribute": "fonts"
7381
- },
7382
- {
7383
- "kind": "field",
7384
- "name": "fontAvailable",
7385
- "type": {
7386
- "text": "boolean"
7387
- },
7388
- "default": "false"
7389
- },
7390
- {
7391
- "kind": "method",
7392
- "name": "_isLine",
7393
- "parameters": [
7394
- {
7395
- "name": "selected",
7396
- "type": {
7397
- "text": "Component[]"
7398
- }
7399
- }
7400
- ]
7401
- },
7402
- {
7403
- "kind": "method",
7404
- "name": "_onValueChange",
7405
- "parameters": [
7406
- {
7407
- "name": "e",
7408
- "type": {
7409
- "text": "Event"
7410
- }
7411
- }
7412
- ],
7413
- "inheritedFrom": {
7414
- "name": "AbstractProperty",
7415
- "module": "src/modeller/property-sidebar/abstract-property.ts"
7416
- }
7417
- },
7418
- {
7419
- "kind": "method",
7420
- "name": "_getValueFromEventTarget",
7421
- "parameters": [
7422
- {
7423
- "name": "element",
7424
- "type": {
7425
- "text": "HTMLElement"
7426
- }
7427
- }
7428
- ],
7429
- "inheritedFrom": {
7430
- "name": "AbstractProperty",
7431
- "module": "src/modeller/property-sidebar/abstract-property.ts"
7432
- }
7433
- },
7434
- {
7435
- "kind": "method",
7436
- "name": "_onAfterValueChange",
7437
- "parameters": [
7438
- {
7439
- "name": "key",
7440
- "type": {
7441
- "text": "string"
7442
- }
7443
- },
7444
- {
7445
- "name": "value",
7446
- "type": {
7447
- "text": "any"
7448
- }
7449
- }
7450
- ],
7451
- "inheritedFrom": {
7452
- "name": "AbstractProperty",
7453
- "module": "src/modeller/property-sidebar/abstract-property.ts"
7454
- }
7455
- }
7456
- ],
7457
- "attributes": [
7458
- {
7459
- "name": "value",
7460
- "type": {
7461
- "text": "any"
7462
- },
7463
- "default": "{}",
7464
- "fieldName": "value"
7465
- },
7466
- {
7467
- "name": "selected",
7468
- "type": {
7469
- "text": "Component[]"
7470
- },
7471
- "default": "[]",
7472
- "fieldName": "selected"
7473
- },
7474
- {
7475
- "name": "fonts",
7476
- "type": {
7477
- "text": "any[]"
7478
- },
7479
- "default": "[]",
7480
- "fieldName": "fonts"
7481
- }
7482
- ],
7483
- "superclass": {
7484
- "name": "AbstractProperty",
7485
- "module": "/src/modeller/property-sidebar/abstract-property.js"
7486
- },
7487
- "events": [
7488
- {
7489
- "name": "property-change",
7490
- "type": {
7491
- "text": "CustomEvent"
7492
- },
7493
- "inheritedFrom": {
7494
- "name": "AbstractProperty",
7495
- "module": "src/modeller/property-sidebar/abstract-property.ts"
7496
- }
7497
- }
7498
- ]
7499
- }
7500
- ],
7501
- "exports": [
7502
- {
7503
- "kind": "js",
7504
- "name": "PropertyStyles",
7505
- "declaration": {
7506
- "name": "PropertyStyles",
7507
- "module": "src/modeller/property-sidebar/styles/styles.ts"
7508
- }
7509
- }
7510
- ]
7511
- },
7512
7355
  {
7513
7356
  "kind": "javascript-module",
7514
7357
  "path": "src/modeller/property-sidebar/specifics/specific-properties-builder.ts",
@@ -7855,6 +7698,172 @@
7855
7698
  }
7856
7699
  }
7857
7700
  ]
7701
+ },
7702
+ {
7703
+ "kind": "javascript-module",
7704
+ "path": "src/modeller/property-sidebar/styles/styles.ts",
7705
+ "declarations": [
7706
+ {
7707
+ "kind": "class",
7708
+ "description": "",
7709
+ "name": "PropertyStyles",
7710
+ "members": [
7711
+ {
7712
+ "kind": "field",
7713
+ "name": "value",
7714
+ "type": {
7715
+ "text": "any"
7716
+ },
7717
+ "default": "{}",
7718
+ "attribute": "value"
7719
+ },
7720
+ {
7721
+ "kind": "field",
7722
+ "name": "selected",
7723
+ "type": {
7724
+ "text": "Component[]"
7725
+ },
7726
+ "default": "[]",
7727
+ "attribute": "selected"
7728
+ },
7729
+ {
7730
+ "kind": "field",
7731
+ "name": "fonts",
7732
+ "type": {
7733
+ "text": "any[]"
7734
+ },
7735
+ "default": "[]",
7736
+ "attribute": "fonts"
7737
+ },
7738
+ {
7739
+ "kind": "field",
7740
+ "name": "fontAvailable",
7741
+ "type": {
7742
+ "text": "boolean"
7743
+ },
7744
+ "default": "false"
7745
+ },
7746
+ {
7747
+ "kind": "method",
7748
+ "name": "_isLine",
7749
+ "parameters": [
7750
+ {
7751
+ "name": "selected",
7752
+ "type": {
7753
+ "text": "Component[]"
7754
+ }
7755
+ }
7756
+ ]
7757
+ },
7758
+ {
7759
+ "kind": "method",
7760
+ "name": "_onValueChange",
7761
+ "parameters": [
7762
+ {
7763
+ "name": "e",
7764
+ "type": {
7765
+ "text": "Event"
7766
+ }
7767
+ }
7768
+ ],
7769
+ "inheritedFrom": {
7770
+ "name": "AbstractProperty",
7771
+ "module": "src/modeller/property-sidebar/abstract-property.ts"
7772
+ }
7773
+ },
7774
+ {
7775
+ "kind": "method",
7776
+ "name": "_getValueFromEventTarget",
7777
+ "parameters": [
7778
+ {
7779
+ "name": "element",
7780
+ "type": {
7781
+ "text": "HTMLElement"
7782
+ }
7783
+ }
7784
+ ],
7785
+ "inheritedFrom": {
7786
+ "name": "AbstractProperty",
7787
+ "module": "src/modeller/property-sidebar/abstract-property.ts"
7788
+ }
7789
+ },
7790
+ {
7791
+ "kind": "method",
7792
+ "name": "_onAfterValueChange",
7793
+ "parameters": [
7794
+ {
7795
+ "name": "key",
7796
+ "type": {
7797
+ "text": "string"
7798
+ }
7799
+ },
7800
+ {
7801
+ "name": "value",
7802
+ "type": {
7803
+ "text": "any"
7804
+ }
7805
+ }
7806
+ ],
7807
+ "inheritedFrom": {
7808
+ "name": "AbstractProperty",
7809
+ "module": "src/modeller/property-sidebar/abstract-property.ts"
7810
+ }
7811
+ }
7812
+ ],
7813
+ "attributes": [
7814
+ {
7815
+ "name": "value",
7816
+ "type": {
7817
+ "text": "any"
7818
+ },
7819
+ "default": "{}",
7820
+ "fieldName": "value"
7821
+ },
7822
+ {
7823
+ "name": "selected",
7824
+ "type": {
7825
+ "text": "Component[]"
7826
+ },
7827
+ "default": "[]",
7828
+ "fieldName": "selected"
7829
+ },
7830
+ {
7831
+ "name": "fonts",
7832
+ "type": {
7833
+ "text": "any[]"
7834
+ },
7835
+ "default": "[]",
7836
+ "fieldName": "fonts"
7837
+ }
7838
+ ],
7839
+ "superclass": {
7840
+ "name": "AbstractProperty",
7841
+ "module": "/src/modeller/property-sidebar/abstract-property.js"
7842
+ },
7843
+ "events": [
7844
+ {
7845
+ "name": "property-change",
7846
+ "type": {
7847
+ "text": "CustomEvent"
7848
+ },
7849
+ "inheritedFrom": {
7850
+ "name": "AbstractProperty",
7851
+ "module": "src/modeller/property-sidebar/abstract-property.ts"
7852
+ }
7853
+ }
7854
+ ]
7855
+ }
7856
+ ],
7857
+ "exports": [
7858
+ {
7859
+ "kind": "js",
7860
+ "name": "PropertyStyles",
7861
+ "declaration": {
7862
+ "name": "PropertyStyles",
7863
+ "module": "src/modeller/property-sidebar/styles/styles.ts"
7864
+ }
7865
+ }
7866
+ ]
7858
7867
  }
7859
7868
  ]
7860
7869
  }
@@ -29,6 +29,8 @@ export class PropertyEventTap extends LitElement {
29
29
  <option value="link-move">move to target link</option>
30
30
  <option value="data-toggle">toggle data</option>
31
31
  <option value="legend-toggle">toggle legend</option>
32
+ <option value="popup">popup target board</option>
33
+ <option value="modal-popup">modal popup target board</option>
32
34
  </select>
33
35
 
34
36
  <label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
@@ -1 +1 @@
1
- {"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,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;gBACb,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;iBACxB;aACF,CAAA;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;aACxB,CAAA;QACH,CAAC;QAED,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAC3B,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,OAAO,CAAC,CAAA,EAAE,CAAC;YACpD,0BAA0B;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAA;QAC3B,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AA1EM,uBAAM,GAAG,CAAC,kBAAkB,CAAC,AAAvB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AAEhC;IAAR,KAAK,EAAE;oDAA0D","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-data.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\nexport class PropertyEventTap extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n @state() targetList: { value: string; description: string }[] = []\n\n async firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, target = '', pressed } = this.value || {}\n\n return html`\n <input id=\"checkbox-pressed\" type=\"checkbox\" value-key=\"pressed\" .checked=${pressed} />\n <label for=\"checkbox-pressed\" class=\"checkbox-label\"> <ox-i18n msgid=\"label.pressed\">pressed</ox-i18n> </label>\n\n <label> <ox-i18n msgid=\"label.action\">action</ox-i18n> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"link-open\">open new window for target link</option>\n <option value=\"link-move\">move to target link</option>\n <option value=\"data-toggle\">toggle data</option>\n <option value=\"legend-toggle\">toggle legend</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.target\">target</ox-i18n> </label>\n <input value-key=\"target\" .value=${target} .placeholder=${this._getPlaceHoder(action)} />\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n if (key === 'input' || key === 'output') {\n var { options = {} } = this.value || {}\n\n this.value = {\n ...this.value,\n options: {\n ...options,\n [key]: convert(element)\n }\n }\n } else {\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n }\n\n var { action } = this.value\n if (action !== 'goto' && !action?.includes('popup')) {\n /* clear unused options */\n delete this.value.options\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
1
+ {"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,UAAU,E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AI,EAAE,CAAA;YAEvC,IAAI,CAAC,KAAK,GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;iBACxB;aACF,CAAA;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;aACxB,CAAA;QACH,CAAC;QAED,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAC3B,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,OAAO,CAAC,CAAA,EAAE,CAAC;YACpD,0BAA0B;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAA;QAC3B,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AA5EM,uBAAM,GAAG,CAAC,kBAAkB,CAAC,AAAvB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AAEhC;IAAR,KAAK,EAAE;oDAA0D","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-data.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\nexport class PropertyEventTap extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n @state() targetList: { value: string; description: string }[] = []\n\n async firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, target = '', pressed } = this.value || {}\n\n return html`\n <input id=\"checkbox-pressed\" type=\"checkbox\" value-key=\"pressed\" .checked=${pressed} />\n <label for=\"checkbox-pressed\" class=\"checkbox-label\"> <ox-i18n msgid=\"label.pressed\">pressed</ox-i18n> </label>\n\n <label> <ox-i18n msgid=\"label.action\">action</ox-i18n> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"link-open\">open new window for target link</option>\n <option value=\"link-move\">move to target link</option>\n <option value=\"data-toggle\">toggle data</option>\n <option value=\"legend-toggle\">toggle legend</option>\n <option value=\"popup\">popup target board</option>\n <option value=\"modal-popup\">modal popup target board</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.target\">target</ox-i18n> </label>\n <input value-key=\"target\" .value=${target} .placeholder=${this._getPlaceHoder(action)} />\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n if (key === 'input' || key === 'output') {\n var { options = {} } = this.value || {}\n\n this.value = {\n ...this.value,\n options: {\n ...options,\n [key]: convert(element)\n }\n }\n } else {\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n }\n\n var { action } = this.value\n if (action !== 'goto' && !action?.includes('popup')) {\n /* clear unused options */\n delete this.value.options\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
@@ -68,6 +68,8 @@ export declare class BoardViewer extends LitElement {
68
68
  onStartScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
69
69
  onRunScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
70
70
  onLegendToggle(): void;
71
+ onPopup(component: Component): void;
72
+ onModalPopup(component: Component): void;
71
73
  getSceneData(): object | undefined;
72
74
  getSceneValues(): object | undefined;
73
75
  togglePopup(component: Component): void;
@@ -492,6 +492,20 @@ let BoardViewer = class BoardViewer extends LitElement {
492
492
  }
493
493
  legendLayer.hidden = !legendLayer.hidden;
494
494
  }
495
+ onPopup(component) {
496
+ if (this._scene) {
497
+ this._scene.target = null;
498
+ this._scene.target = this._target;
499
+ }
500
+ // this.togglePopup(component)
501
+ }
502
+ onModalPopup(component) {
503
+ if (this._scene) {
504
+ this._scene.target = null;
505
+ this._scene.target = this._target;
506
+ }
507
+ // this.togglePopup(component)
508
+ }
495
509
  getSceneData() {
496
510
  var _a;
497
511
  return (_a = this._scene) === null || _a === void 0 ? void 0 : _a.data;