bromcom-ui 2.8.0-rc.5 → 2.8.0-rc.6

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 (191) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-c42e3b89.entry.js → p-01a0a933.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-504575be.entry.js → p-0541edbf.entry.js} +1 -1
  4. package/dist/bromcom-ui/p-10699025.entry.js +5 -0
  5. package/dist/bromcom-ui/{p-6e017905.entry.js → p-1263a567.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-b7e0fe52.entry.js → p-141d380f.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-f3d970d7.entry.js → p-1a2c869c.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-fec276e6.entry.js → p-1ebf2c97.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-b358c791.entry.js → p-2179cbce.entry.js} +2 -2
  10. package/dist/bromcom-ui/{p-f3c08dc7.entry.js → p-249f149d.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-7ed49ddd.entry.js → p-24ba1573.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-1fa1c5d9.entry.js → p-262da209.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-b001d7cd.entry.js → p-2f7fb8dd.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-e01220df.js → p-31bb9db5.js} +1 -1
  15. package/dist/bromcom-ui/{p-38a5fb2c.entry.js → p-33dfaba1.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-04f65223.entry.js → p-3ad01bf4.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-4dd66352.js → p-3db8f91e.js} +1 -1
  18. package/dist/bromcom-ui/{p-16bae5a0.entry.js → p-4fd8b48e.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-2e1ae66c.entry.js → p-538c87d2.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-10228af8.entry.js → p-59e12dad.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-98253d3c.entry.js → p-5d172f7d.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-a92be147.entry.js → p-5df785a3.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-b9ee6aca.js → p-60f7ae5d.js} +1 -1
  24. package/dist/bromcom-ui/{p-bb2b3ad0.entry.js → p-617f4eb2.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-9d48056f.entry.js → p-67d3d8c6.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-244075dd.entry.js → p-68185d36.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-c1c066a4.entry.js → p-6f27cf6d.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-cf85d777.entry.js → p-74dd5f31.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-49656e08.entry.js → p-75fa262b.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-f654d64d.entry.js → p-79117799.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-cde1298c.entry.js → p-7cff3fa9.entry.js} +1 -1
  32. package/dist/bromcom-ui/p-84c513eb.entry.js +5 -0
  33. package/dist/bromcom-ui/{p-c7496628.entry.js → p-889a1255.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-9c1caebd.entry.js → p-8afc794d.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-5ae2ce53.entry.js → p-8fc1e2b0.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-1a681f4b.entry.js → p-9155ca09.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-51b670a0.entry.js → p-998f305e.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-61ee8d5c.entry.js → p-a176cebc.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-1c700098.entry.js → p-a51a8010.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-f6dba555.entry.js → p-b16f3edd.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-d4ed79f0.entry.js → p-b5d1ddf9.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-cf3b02d0.entry.js → p-b8fe88df.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-d14fd581.entry.js → p-ba5686e2.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-ad5cb398.entry.js → p-bc97278b.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-7c2806d1.entry.js → p-c36c80f8.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-6949fcce.entry.js → p-c4cdcb75.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-4620092f.js → p-c682622d.js} +1 -1
  48. package/dist/bromcom-ui/{p-bee37fd5.entry.js → p-c9707add.entry.js} +1 -1
  49. package/dist/bromcom-ui/p-cdb04058.entry.js +5 -0
  50. package/dist/bromcom-ui/{p-5303f5d7.entry.js → p-d96c04f0.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-778590bf.entry.js → p-e16ff3f3.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-ee381ce5.js → p-e741d71e.js} +1 -1
  53. package/dist/bromcom-ui/{p-bca3b603.js → p-ea6b1764.js} +1 -1
  54. package/dist/bromcom-ui/{p-c721df8b.js → p-eb5b09a1.js} +1 -1
  55. package/dist/bromcom-ui/{p-19c5d157.entry.js → p-eb7da19e.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-31f5b765.entry.js → p-eb89054e.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-f11a03af.entry.js → p-ed6c561a.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-aaea010b.entry.js → p-f27bb138.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-cf0e31dc.entry.js → p-f9c235f9.entry.js} +1 -1
  60. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  61. package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
  62. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  63. package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
  64. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  65. package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
  66. package/dist/cjs/bcm-button.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-card.cjs.entry.js +1 -1
  68. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +1 -1
  69. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
  70. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
  71. package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
  72. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  73. package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
  74. package/dist/cjs/bcm-colorful_2.cjs.entry.js +41 -11
  75. package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
  76. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
  77. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  78. package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
  79. package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
  80. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
  81. package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
  82. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-input.cjs.entry.js +4 -4
  84. package/dist/cjs/bcm-item.cjs.entry.js +1 -1
  85. package/dist/cjs/bcm-items.cjs.entry.js +1 -1
  86. package/dist/cjs/bcm-label_2.cjs.entry.js +4 -4
  87. package/dist/cjs/bcm-list.cjs.entry.js +5 -5
  88. package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
  89. package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
  91. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  92. package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
  93. package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
  94. package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -3
  95. package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
  96. package/dist/cjs/bcm-range.cjs.entry.js +1 -1
  97. package/dist/cjs/bcm-search.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-stepper.cjs.entry.js +28 -38
  101. package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
  102. package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
  103. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
  104. package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
  106. package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
  107. package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
  108. package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
  109. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  110. package/dist/cjs/{generate-ab5c97d5.js → generate-5d859f16.js} +1 -1
  111. package/dist/cjs/{input-template-b540fdc4.js → input-template-4b1d9f28.js} +1 -1
  112. package/dist/cjs/{json-parse-decarator-fc944651.js → json-parse-decarator-79fa9387.js} +1 -1
  113. package/dist/cjs/loader.cjs.js +1 -1
  114. package/dist/cjs/{number-helper-b9cf4b48.js → number-helper-038de3fb.js} +1 -1
  115. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
  116. package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
  117. package/dist/cjs/{stepper-states-cb28501d.js → stepper-states-23d4c730.js} +1 -1
  118. package/dist/cjs/{tooltip-helper-0f770cf7.js → tooltip-helper-434735c4.js} +3 -3
  119. package/dist/cjs/{validators-72173f1d.js → validators-412368c6.js} +1 -1
  120. package/dist/collection/components/molecules/linked/linked.js +44 -7
  121. package/dist/collection/components/molecules/stepper/stepper.js +29 -42
  122. package/dist/components/bcm-stepper.js +25 -35
  123. package/dist/components/generate.js +1 -1
  124. package/dist/components/linked.js +40 -9
  125. package/dist/esm/bcm-accordion.entry.js +1 -1
  126. package/dist/esm/bcm-alert.entry.js +1 -1
  127. package/dist/esm/bcm-attendance.entry.js +1 -1
  128. package/dist/esm/bcm-avatar_2.entry.js +3 -3
  129. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  130. package/dist/esm/bcm-button-group.entry.js +1 -1
  131. package/dist/esm/bcm-button.entry.js +1 -1
  132. package/dist/esm/bcm-card.entry.js +1 -1
  133. package/dist/esm/bcm-checkbox-group.entry.js +1 -1
  134. package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
  135. package/dist/esm/bcm-checkbox_2.entry.js +1 -1
  136. package/dist/esm/bcm-chip.entry.js +1 -1
  137. package/dist/esm/bcm-collapse.entry.js +1 -1
  138. package/dist/esm/bcm-color-input.entry.js +3 -3
  139. package/dist/esm/bcm-colorful_2.entry.js +41 -11
  140. package/dist/esm/bcm-date-picker.entry.js +1 -1
  141. package/dist/esm/bcm-datetime-picker.entry.js +1 -1
  142. package/dist/esm/bcm-default.entry.js +1 -1
  143. package/dist/esm/bcm-drawer.entry.js +3 -3
  144. package/dist/esm/bcm-dropdown.entry.js +2 -2
  145. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  146. package/dist/esm/bcm-form-2.entry.js +1 -1
  147. package/dist/esm/bcm-input-custom.entry.js +1 -1
  148. package/dist/esm/bcm-input.entry.js +4 -4
  149. package/dist/esm/bcm-item.entry.js +1 -1
  150. package/dist/esm/bcm-items.entry.js +1 -1
  151. package/dist/esm/bcm-label_2.entry.js +4 -4
  152. package/dist/esm/bcm-list.entry.js +5 -5
  153. package/dist/esm/bcm-menu.entry.js +4 -4
  154. package/dist/esm/bcm-modal.entry.js +1 -1
  155. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  156. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  157. package/dist/esm/bcm-popover.entry.js +3 -3
  158. package/dist/esm/bcm-progress.entry.js +1 -1
  159. package/dist/esm/bcm-radio-group.entry.js +3 -3
  160. package/dist/esm/bcm-radio.entry.js +3 -3
  161. package/dist/esm/bcm-range.entry.js +1 -1
  162. package/dist/esm/bcm-search.entry.js +2 -2
  163. package/dist/esm/bcm-skeleton.entry.js +1 -1
  164. package/dist/esm/bcm-step.entry.js +2 -2
  165. package/dist/esm/bcm-stepper.entry.js +29 -39
  166. package/dist/esm/bcm-switch.entry.js +1 -1
  167. package/dist/esm/bcm-tab-group.entry.js +3 -3
  168. package/dist/esm/bcm-tab-item-header.entry.js +3 -3
  169. package/dist/esm/bcm-tab-item.entry.js +3 -3
  170. package/dist/esm/bcm-tag.entry.js +2 -2
  171. package/dist/esm/bcm-textarea.entry.js +2 -2
  172. package/dist/esm/bcm-time-picker.entry.js +1 -1
  173. package/dist/esm/bcm-toast.entry.js +1 -1
  174. package/dist/esm/bromcom-ui.js +1 -1
  175. package/dist/esm/{generate-7a787f1e.js → generate-6c6d178a.js} +1 -1
  176. package/dist/esm/{input-template-7f7c2370.js → input-template-cdbd9d71.js} +1 -1
  177. package/dist/esm/{json-parse-decarator-d04cb735.js → json-parse-decarator-fb94a9f7.js} +1 -1
  178. package/dist/esm/loader.js +1 -1
  179. package/dist/esm/{number-helper-d88788e7.js → number-helper-3d45cd6b.js} +1 -1
  180. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  181. package/dist/esm/old-bcm-popover.entry.js +1 -1
  182. package/dist/esm/{stepper-states-25155b3b.js → stepper-states-9b3262ac.js} +1 -1
  183. package/dist/esm/{tooltip-helper-ec0f9e15.js → tooltip-helper-5bb91f74.js} +3 -3
  184. package/dist/esm/{validators-69c22893.js → validators-143e9133.js} +1 -1
  185. package/dist/types/components/molecules/linked/linked.d.ts +8 -2
  186. package/dist/types/components/molecules/stepper/stepper.d.ts +2 -2
  187. package/dist/types/components.d.ts +1 -1
  188. package/package.json +4 -2
  189. package/dist/bromcom-ui/p-2b2a6374.entry.js +0 -5
  190. package/dist/bromcom-ui/p-54a3364d.entry.js +0 -5
  191. package/dist/bromcom-ui/p-89d42239.entry.js +0 -5
@@ -10,9 +10,9 @@ const utils = require('./utils-fc077139.js');
10
10
  const floatingUi = require('./floating-ui-74eb26d6.js');
11
11
  const colorHelper = require('./color-helper-0097a7c2.js');
12
12
  require('./datetime-helper-eaf4fadb.js');
13
- const generate = require('./generate-ab5c97d5.js');
14
- require('./number-helper-b9cf4b48.js');
15
- require('./validators-72173f1d.js');
13
+ const generate = require('./generate-5d859f16.js');
14
+ require('./number-helper-038de3fb.js');
15
+ require('./validators-412368c6.js');
16
16
  const bcm = require('./bcm-634604e3.js');
17
17
 
18
18
  class Tooltip {
@@ -4,7 +4,7 @@
4
4
  */
5
5
  'use strict';
6
6
 
7
- const generate = require('./generate-ab5c97d5.js');
7
+ const generate = require('./generate-5d859f16.js');
8
8
 
9
9
  class Validators {
10
10
  }
@@ -12,11 +12,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { Host, h } from "@stencil/core";
16
- import { Bcm } from "@bcm/model";
17
- import { delay, FloatingUI } from "@bcm/utils";
18
- import { Generate } from "@bcm/helpers";
19
15
  import { IsLoad } from "@bcm/decorator";
16
+ import { Generate } from "@bcm/helpers";
17
+ import { Bcm } from "@bcm/model";
18
+ import { FloatingUI, delay } from "@bcm/utils";
19
+ import { Host, h } from "@stencil/core";
20
20
  export class BcmLinked {
21
21
  constructor() {
22
22
  this._id = Generate.UID();
@@ -27,6 +27,7 @@ export class BcmLinked {
27
27
  this.maxHeight = undefined;
28
28
  this.minHeight = "50px";
29
29
  this.isOpen = false;
30
+ this.isMouseOverLink = false;
30
31
  }
31
32
  target() {
32
33
  const target = document.querySelectorAll(`[id="${this.targetId}"]`);
@@ -78,6 +79,7 @@ export class BcmLinked {
78
79
  }
79
80
  init() {
80
81
  const target = this.target();
82
+ this.trigger === Bcm.TriggerType.hover && this.listenMouseOver();
81
83
  if (target) {
82
84
  target.setAttribute("is-linked", this.el.id);
83
85
  if (!Generate.getAncestor(target, "bcm-linked")) {
@@ -92,8 +94,15 @@ export class BcmLinked {
92
94
  this.init();
93
95
  document.body.appendChild(this.el);
94
96
  }
97
+ triggerWatch(newValue) {
98
+ if (newValue === Bcm.TriggerType.hover) {
99
+ this.listenMouseOver();
100
+ }
101
+ }
102
+ watchIsOpen() {
103
+ this.bcmOpen.emit(this.isOpen);
104
+ }
95
105
  onLinkedDataDismis() {
96
- // console.log('onLinkedDataDismis');
97
106
  this.hide(false);
98
107
  }
99
108
  onBcmFloatingIsHide(e) {
@@ -118,6 +127,7 @@ export class BcmLinked {
118
127
  async hide(wait = true) {
119
128
  wait && (await delay(50));
120
129
  const target = this.target();
130
+ this.isMouseOverLink = false;
121
131
  if (target) {
122
132
  target.removeAttribute("linked-is-open");
123
133
  this.hideChildLinked();
@@ -131,6 +141,8 @@ export class BcmLinked {
131
141
  clickListener(e) {
132
142
  if (!this.target())
133
143
  return;
144
+ if (this.trigger === Bcm.TriggerType.hover)
145
+ return;
134
146
  const isTarget = Generate.findEventPath(e, this.target());
135
147
  const isSelf = Generate.findEventPath(e, this.el);
136
148
  const isLinked = Generate.findEventPathWithNodeName(e, "BCM-LINKED");
@@ -159,8 +171,25 @@ export class BcmLinked {
159
171
  wheelListener() {
160
172
  this.calculatePosition();
161
173
  }
162
- watchIsOpen() {
163
- this.bcmOpen.emit(this.isOpen);
174
+ listenMouseOver() {
175
+ var _a, _b;
176
+ this.el.addEventListener("mouseover", () => (this.isMouseOverLink = true));
177
+ this.el.addEventListener("mouseleave", () => {
178
+ this.isMouseOverLink = false;
179
+ this.handleMouseLeave();
180
+ });
181
+ (_a = this.target()) === null || _a === void 0 ? void 0 : _a.addEventListener("mouseenter", this.handleMouseEnter.bind(this));
182
+ (_b = this.target()) === null || _b === void 0 ? void 0 : _b.addEventListener("mouseleave", this.handleMouseLeave.bind(this));
183
+ }
184
+ handleMouseLeave() {
185
+ setTimeout(() => {
186
+ !this.isMouseOverLink && this.hide();
187
+ }, 500);
188
+ }
189
+ handleMouseEnter() {
190
+ clearTimeout(this.timeoutId);
191
+ this.isMouseOverLink = false;
192
+ this.show();
164
193
  }
165
194
  render() {
166
195
  const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
@@ -323,6 +352,11 @@ export class BcmLinked {
323
352
  }
324
353
  };
325
354
  }
355
+ static get states() {
356
+ return {
357
+ "isMouseOverLink": {}
358
+ };
359
+ }
326
360
  static get events() {
327
361
  return [{
328
362
  "method": "bcmOpen",
@@ -405,6 +439,9 @@ export class BcmLinked {
405
439
  static get elementRef() { return "el"; }
406
440
  static get watchers() {
407
441
  return [{
442
+ "propName": "trigger",
443
+ "methodName": "triggerWatch"
444
+ }, {
408
445
  "propName": "isOpen",
409
446
  "methodName": "watchIsOpen"
410
447
  }];
@@ -12,14 +12,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { forceUpdate, h, Host } from "@stencil/core";
16
- import snq from "snq";
17
- import cs from "classnames";
18
- import { Generate } from "@bcm/helpers";
19
15
  import { IsLoad } from "@bcm/decorator";
20
- import { StepperHeaderTemplate } from "@bcm/template";
21
- import { delay, getChildElements } from "@bcm/utils";
16
+ import { Generate } from "@bcm/helpers";
22
17
  import { Bcm } from "@bcm/model";
18
+ import { StepperHeaderTemplate } from "@bcm/template";
19
+ import { getChildElements } from "@bcm/utils";
20
+ import { Host, forceUpdate, h } from "@stencil/core";
21
+ import cs from "classnames";
22
+ import snq from "snq";
23
23
  import stepperStates from "../states/stepper-states";
24
24
  export class BcmStepper {
25
25
  constructor() {
@@ -113,7 +113,8 @@ export class BcmStepper {
113
113
  return Promise.resolve(this.getActiveIndex());
114
114
  }
115
115
  async next(idx) {
116
- const index = idx || this.getActiveIndex();
116
+ let index;
117
+ idx == 0 ? (index = 0) : index == 1 ? (index = 1) : (index = idx || this.getActiveIndex());
117
118
  const step = await this.getCurrentStep();
118
119
  const lastStep = this.getItems()[this.getItems().length - 1];
119
120
  if (step.valid) {
@@ -128,43 +129,32 @@ export class BcmStepper {
128
129
  forceUpdate(this.el);
129
130
  return Promise.resolve(this.getActiveIndex());
130
131
  }
131
- async setActive(index, force = false) {
132
+ async setActive(index) {
132
133
  if (!index)
133
134
  return;
134
- if (force) {
135
- if (this.getActiveIndex() < index) {
136
- while (this.getActiveIndex() < index) {
137
- await this.next();
138
- await delay(100);
139
- }
140
- }
141
- else {
142
- while (this.getActiveIndex() > index) {
143
- await this.prev();
144
- await delay(100);
145
- }
146
- }
135
+ if (typeof index != "number") {
136
+ console.warn("index must be a number");
137
+ return;
147
138
  }
148
- else {
149
- if (this.linear) {
150
- const prevStepIsValid = this.getItems()
151
- .filter(item => item.index < index)
152
- .map(item => ({
153
- id: item.id,
154
- status: item.status,
155
- disabled: item.disabled,
156
- }))
157
- .every(item => !item.disabled && (item.status === "success" || item.status === "default"));
158
- console.log("prevStepIsValid", prevStepIsValid);
159
- if (prevStepIsValid) {
160
- await this.next(index - 1);
161
- }
162
- }
163
- else {
164
- stepperStates.setActiveIndex(this.stepperId, index);
139
+ if (this.linear) {
140
+ const prevSteps = this.getItems().filter(item => item.index < index);
141
+ const prevStepIsValid = prevSteps === null || prevSteps === void 0 ? void 0 : prevSteps.map(item => ({
142
+ id: item.id,
143
+ status: item.status,
144
+ disabled: item.disabled,
145
+ })).every(item => item.status == "success" || item.status == "default");
146
+ if (prevStepIsValid) {
147
+ prevSteps === null || prevSteps === void 0 ? void 0 : prevSteps.forEach(item => {
148
+ item.status = "success";
149
+ item.disabled = false;
150
+ });
165
151
  await this.next(index - 1);
166
152
  }
167
153
  }
154
+ else {
155
+ stepperStates.setActiveIndex(this.stepperId, index);
156
+ await this.next(index - 1);
157
+ }
168
158
  }
169
159
  async reset() {
170
160
  await this.onStepChange(1);
@@ -452,13 +442,10 @@ export class BcmStepper {
452
442
  },
453
443
  "setActive": {
454
444
  "complexType": {
455
- "signature": "(index: number, force?: boolean) => Promise<void>",
445
+ "signature": "(index: number) => Promise<void>",
456
446
  "parameters": [{
457
447
  "tags": [],
458
448
  "text": ""
459
- }, {
460
- "tags": [],
461
- "text": ""
462
449
  }],
463
450
  "references": {
464
451
  "Promise": {
@@ -3,16 +3,16 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { h, proxyCustomElement, HTMLElement, createEvent, forceUpdate, Host } from '@stencil/core/internal/client';
6
+ import { I as IsLoad } from './is-load-decorator.js';
6
7
  import { G as Generate, s as snq } from './generate.js';
7
- import { c as classnames } from './index2.js';
8
8
  import './color-helper.js';
9
9
  import './validators.js';
10
10
  import './number-helper.js';
11
11
  import './string-helper.js';
12
12
  import './element-dragger.js';
13
- import { g as getChildElements, d as delay } from './utils.js';
13
+ import { g as getChildElements } from './utils.js';
14
14
  import { a as Bcm } from './bcm.js';
15
- import { I as IsLoad } from './is-load-decorator.js';
15
+ import { c as classnames } from './index2.js';
16
16
  import './types.js';
17
17
  import './types2.js';
18
18
  import { s as stepperStates, d as defineCustomElement$2 } from './step.js';
@@ -145,7 +145,8 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
145
145
  return Promise.resolve(this.getActiveIndex());
146
146
  }
147
147
  async next(idx) {
148
- const index = idx || this.getActiveIndex();
148
+ let index;
149
+ idx == 0 ? (index = 0) : index == 1 ? (index = 1) : (index = idx || this.getActiveIndex());
149
150
  const step = await this.getCurrentStep();
150
151
  const lastStep = this.getItems()[this.getItems().length - 1];
151
152
  if (step.valid) {
@@ -160,43 +161,32 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
160
161
  forceUpdate(this.el);
161
162
  return Promise.resolve(this.getActiveIndex());
162
163
  }
163
- async setActive(index, force = false) {
164
+ async setActive(index) {
164
165
  if (!index)
165
166
  return;
166
- if (force) {
167
- if (this.getActiveIndex() < index) {
168
- while (this.getActiveIndex() < index) {
169
- await this.next();
170
- await delay(100);
171
- }
172
- }
173
- else {
174
- while (this.getActiveIndex() > index) {
175
- await this.prev();
176
- await delay(100);
177
- }
178
- }
167
+ if (typeof index != "number") {
168
+ console.warn("index must be a number");
169
+ return;
179
170
  }
180
- else {
181
- if (this.linear) {
182
- const prevStepIsValid = this.getItems()
183
- .filter(item => item.index < index)
184
- .map(item => ({
185
- id: item.id,
186
- status: item.status,
187
- disabled: item.disabled,
188
- }))
189
- .every(item => !item.disabled && (item.status === "success" || item.status === "default"));
190
- console.log("prevStepIsValid", prevStepIsValid);
191
- if (prevStepIsValid) {
192
- await this.next(index - 1);
193
- }
194
- }
195
- else {
196
- stepperStates.setActiveIndex(this.stepperId, index);
171
+ if (this.linear) {
172
+ const prevSteps = this.getItems().filter(item => item.index < index);
173
+ const prevStepIsValid = prevSteps === null || prevSteps === void 0 ? void 0 : prevSteps.map(item => ({
174
+ id: item.id,
175
+ status: item.status,
176
+ disabled: item.disabled,
177
+ })).every(item => item.status == "success" || item.status == "default");
178
+ if (prevStepIsValid) {
179
+ prevSteps === null || prevSteps === void 0 ? void 0 : prevSteps.forEach(item => {
180
+ item.status = "success";
181
+ item.disabled = false;
182
+ });
197
183
  await this.next(index - 1);
198
184
  }
199
185
  }
186
+ else {
187
+ stepperStates.setActiveIndex(this.stepperId, index);
188
+ await this.next(index - 1);
189
+ }
200
190
  }
201
191
  async reset() {
202
192
  await this.onStepChange(1);
@@ -25,7 +25,7 @@ var TypeProps;
25
25
  TypeProps["basic"] = "basic";
26
26
  })(TypeProps || (TypeProps = {}));
27
27
 
28
- const version = "2.8.0-rc.5";
28
+ const version = "2.8.0-rc.6";
29
29
 
30
30
  function snq(callback, defaultValue) {
31
31
  try {
@@ -3,16 +3,16 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
6
- import { a as Bcm } from './bcm.js';
7
- import './element-dragger.js';
8
- import './string-helper.js';
9
- import { d as delay } from './utils.js';
10
- import { F as FloatingUI } from './floating-ui.js';
6
+ import { I as IsLoad } from './is-load-decorator.js';
11
7
  import './color-helper.js';
12
8
  import './validators.js';
13
9
  import { G as Generate } from './generate.js';
14
10
  import './number-helper.js';
15
- import { I as IsLoad } from './is-load-decorator.js';
11
+ import './string-helper.js';
12
+ import './element-dragger.js';
13
+ import { d as delay } from './utils.js';
14
+ import { F as FloatingUI } from './floating-ui.js';
15
+ import { a as Bcm } from './bcm.js';
16
16
 
17
17
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
18
18
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -37,6 +37,7 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
37
37
  this.maxHeight = undefined;
38
38
  this.minHeight = "50px";
39
39
  this.isOpen = false;
40
+ this.isMouseOverLink = false;
40
41
  }
41
42
  target() {
42
43
  const target = document.querySelectorAll(`[id="${this.targetId}"]`);
@@ -88,6 +89,7 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
88
89
  }
89
90
  init() {
90
91
  const target = this.target();
92
+ this.trigger === Bcm.TriggerType.hover && this.listenMouseOver();
91
93
  if (target) {
92
94
  target.setAttribute("is-linked", this.el.id);
93
95
  if (!Generate.getAncestor(target, "bcm-linked")) {
@@ -102,8 +104,15 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
102
104
  this.init();
103
105
  document.body.appendChild(this.el);
104
106
  }
107
+ triggerWatch(newValue) {
108
+ if (newValue === Bcm.TriggerType.hover) {
109
+ this.listenMouseOver();
110
+ }
111
+ }
112
+ watchIsOpen() {
113
+ this.bcmOpen.emit(this.isOpen);
114
+ }
105
115
  onLinkedDataDismis() {
106
- // console.log('onLinkedDataDismis');
107
116
  this.hide(false);
108
117
  }
109
118
  onBcmFloatingIsHide(e) {
@@ -128,6 +137,7 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
128
137
  async hide(wait = true) {
129
138
  wait && (await delay(50));
130
139
  const target = this.target();
140
+ this.isMouseOverLink = false;
131
141
  if (target) {
132
142
  target.removeAttribute("linked-is-open");
133
143
  this.hideChildLinked();
@@ -141,6 +151,8 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
141
151
  clickListener(e) {
142
152
  if (!this.target())
143
153
  return;
154
+ if (this.trigger === Bcm.TriggerType.hover)
155
+ return;
144
156
  const isTarget = Generate.findEventPath(e, this.target());
145
157
  const isSelf = Generate.findEventPath(e, this.el);
146
158
  const isLinked = Generate.findEventPathWithNodeName(e, "BCM-LINKED");
@@ -169,8 +181,25 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
169
181
  wheelListener() {
170
182
  this.calculatePosition();
171
183
  }
172
- watchIsOpen() {
173
- this.bcmOpen.emit(this.isOpen);
184
+ listenMouseOver() {
185
+ var _a, _b;
186
+ this.el.addEventListener("mouseover", () => (this.isMouseOverLink = true));
187
+ this.el.addEventListener("mouseleave", () => {
188
+ this.isMouseOverLink = false;
189
+ this.handleMouseLeave();
190
+ });
191
+ (_a = this.target()) === null || _a === void 0 ? void 0 : _a.addEventListener("mouseenter", this.handleMouseEnter.bind(this));
192
+ (_b = this.target()) === null || _b === void 0 ? void 0 : _b.addEventListener("mouseleave", this.handleMouseLeave.bind(this));
193
+ }
194
+ handleMouseLeave() {
195
+ setTimeout(() => {
196
+ !this.isMouseOverLink && this.hide();
197
+ }, 500);
198
+ }
199
+ handleMouseEnter() {
200
+ clearTimeout(this.timeoutId);
201
+ this.isMouseOverLink = false;
202
+ this.show();
174
203
  }
175
204
  render() {
176
205
  const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
@@ -178,6 +207,7 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
178
207
  }
179
208
  get el() { return this; }
180
209
  static get watchers() { return {
210
+ "trigger": ["triggerWatch"],
181
211
  "isOpen": ["watchIsOpen"]
182
212
  }; }
183
213
  }, [4, "bcm-linked", {
@@ -189,6 +219,7 @@ const BcmLinked = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
189
219
  "maxHeight": [1, "max-height"],
190
220
  "minHeight": [1, "min-height"],
191
221
  "isOpen": [1540, "is-open"],
222
+ "isMouseOverLink": [32],
192
223
  "show": [64],
193
224
  "hide": [64],
194
225
  "toggle": [64]
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
7
- import { G as Generate } from './generate-7a787f1e.js';
7
+ import { G as Generate } from './generate-6c6d178a.js';
8
8
  import './colors-fa05fe33.js';
9
9
  import './_commonjsHelpers-3016b722.js';
10
10
 
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
- import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-7a787f1e.js';
6
+ import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-6c6d178a.js';
7
7
  import { c as classnames } from './index-ed9652af.js';
8
8
  import { c as createStore } from './index-93e36fdb.js';
9
9
  import { S as StringHelper } from './string-helper-6bd24967.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
7
- import { G as Generate } from './generate-7a787f1e.js';
7
+ import { G as Generate } from './generate-6c6d178a.js';
8
8
  import './colors-fa05fe33.js';
9
9
  import './_commonjsHelpers-3016b722.js';
10
10
 
@@ -6,10 +6,10 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-39
6
6
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
7
7
  import { C as ColorHelper } from './color-helper-4fa5dd0d.js';
8
8
  import './datetime-helper-df25808a.js';
9
- import { G as Generate } from './generate-7a787f1e.js';
10
- import { N as NumberHelper } from './number-helper-d88788e7.js';
9
+ import { G as Generate } from './generate-6c6d178a.js';
10
+ import { N as NumberHelper } from './number-helper-3d45cd6b.js';
11
11
  import './string-helper-6bd24967.js';
12
- import './validators-69c22893.js';
12
+ import './validators-143e9133.js';
13
13
  import './element-dragger-89bb52fd.js';
14
14
  import { a as Bcm } from './bcm-9f50af9c.js';
15
15
  import { c as classnames } from './index-ed9652af.js';
@@ -5,7 +5,7 @@
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
7
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
8
- import { G as Generate } from './generate-7a787f1e.js';
8
+ import { G as Generate } from './generate-6c6d178a.js';
9
9
  import './_commonjsHelpers-3016b722.js';
10
10
  import './colors-fa05fe33.js';
11
11
 
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
- import { G as Generate, s as snq } from './generate-7a787f1e.js';
6
+ import { G as Generate, s as snq } from './generate-6c6d178a.js';
7
7
  import { B as Bcm } from './bcm-9f50af9c.js';
8
8
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
9
9
  import { c as classnames } from './index-ed9652af.js';
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-39133086.js';
6
- import { s as snq, G as Generate } from './generate-7a787f1e.js';
6
+ import { s as snq, G as Generate } from './generate-6c6d178a.js';
7
7
  import { B as Bcm } from './bcm-9f50af9c.js';
8
8
  import { c as classnames } from './index-ed9652af.js';
9
9
  import { c as createStore } from './index-93e36fdb.js';
@@ -6,7 +6,7 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-39
6
6
  import { c as classnames } from './index-ed9652af.js';
7
7
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
8
8
  import { C as ColorHelper } from './color-helper-4fa5dd0d.js';
9
- import { G as Generate } from './generate-7a787f1e.js';
9
+ import { G as Generate } from './generate-6c6d178a.js';
10
10
  import { S as StringHelper } from './string-helper-6bd24967.js';
11
11
  import { S as SlotTemplate } from './slot-template-5b2db362.js';
12
12
  import './_commonjsHelpers-3016b722.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
- import { G as Generate, s as snq } from './generate-7a787f1e.js';
7
+ import { G as Generate, s as snq } from './generate-6c6d178a.js';
8
8
  import { B as Bcm } from './bcm-9f50af9c.js';
9
9
  import { d as delay, g as getChildElements } from './utils-57652744.js';
10
10
  import { c as createStore } from './index-93e36fdb.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
- import { G as Generate } from './generate-7a787f1e.js';
7
+ import { G as Generate } from './generate-6c6d178a.js';
8
8
  import { B as Bcm } from './bcm-9f50af9c.js';
9
9
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
10
10
  import { c as getChilds, d as delay } from './utils-57652744.js';
@@ -5,7 +5,7 @@
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
7
  import { C as CaptionTemplate } from './caption-template-da16ba7b.js';
8
- import { G as Generate } from './generate-7a787f1e.js';
8
+ import { G as Generate } from './generate-6c6d178a.js';
9
9
  import { S as SlotTemplate } from './slot-template-5b2db362.js';
10
10
  import { B as Bcm } from './bcm-9f50af9c.js';
11
11
  import { d as delay } from './utils-57652744.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
7
- import { G as Generate } from './generate-7a787f1e.js';
7
+ import { G as Generate } from './generate-6c6d178a.js';
8
8
  import { c as classnames } from './index-ed9652af.js';
9
9
  import { C as ColorHelper } from './color-helper-4fa5dd0d.js';
10
10
  import './colors-fa05fe33.js';
@@ -5,7 +5,7 @@
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
7
  import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
8
- import { G as Generate } from './generate-7a787f1e.js';
8
+ import { G as Generate } from './generate-6c6d178a.js';
9
9
  import './_commonjsHelpers-3016b722.js';
10
10
  import './colors-fa05fe33.js';
11
11
 
@@ -5,10 +5,10 @@
5
5
  import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import './color-helper-4fa5dd0d.js';
7
7
  import './datetime-helper-df25808a.js';
8
- import { G as Generate } from './generate-7a787f1e.js';
9
- import './number-helper-d88788e7.js';
8
+ import { G as Generate } from './generate-6c6d178a.js';
9
+ import './number-helper-3d45cd6b.js';
10
10
  import './string-helper-6bd24967.js';
11
- import './validators-69c22893.js';
11
+ import './validators-143e9133.js';
12
12
  import './element-dragger-89bb52fd.js';
13
13
  import './bcm-9f50af9c.js';
14
14
  import './colors-1d7854ea.js';