bromcom-ui 2.8.0-rc.5 → 2.8.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-9c1caebd.entry.js → p-04c1bad3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b7e0fe52.entry.js → p-05765e12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ee381ce5.js → p-067f452f.js} +1 -1
- package/dist/bromcom-ui/p-0a396614.js +5 -0
- package/dist/bromcom-ui/{p-5303f5d7.entry.js → p-107f23b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89d42239.entry.js → p-19a3e24d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b358c791.entry.js → p-1dfeca59.entry.js} +2 -2
- package/dist/bromcom-ui/p-24e67508.entry.js +5 -0
- package/dist/bromcom-ui/{p-cf0e31dc.entry.js → p-25f4f698.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1fa1c5d9.entry.js → p-26b9a077.entry.js} +1 -1
- package/dist/bromcom-ui/{p-504575be.entry.js → p-2852b6bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aaea010b.entry.js → p-2ba751ec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b001d7cd.entry.js → p-3167ae61.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bb2b3ad0.entry.js → p-35363842.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf85d777.entry.js → p-3812a787.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ad5cb398.entry.js → p-43340979.entry.js} +1 -1
- package/dist/bromcom-ui/{p-04f65223.entry.js → p-436b9abf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf3b02d0.entry.js → p-4628b66c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c721df8b.js → p-4c9bac0b.js} +1 -1
- package/dist/bromcom-ui/{p-244075dd.entry.js → p-51410cbf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2e1ae66c.entry.js → p-543b1d79.entry.js} +1 -1
- package/dist/bromcom-ui/{p-10228af8.entry.js → p-56ea6505.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d14fd581.entry.js → p-58dbd24d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bee37fd5.entry.js → p-59293e08.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f11a03af.entry.js → p-6842a7ee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-31f5b765.entry.js → p-688e5d2b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6949fcce.entry.js → p-7174f685.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f654d64d.entry.js → p-74d8005e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c700098.entry.js → p-7567fb01.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9d48056f.entry.js → p-76a9587c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f6dba555.entry.js → p-772ecaaa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d4ed79f0.entry.js → p-7f74b19c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b9ee6aca.js → p-823bab9d.js} +1 -1
- package/dist/bromcom-ui/p-8249e97e.entry.js +5 -0
- package/dist/bromcom-ui/{p-4620092f.js → p-826a363a.js} +1 -1
- package/dist/bromcom-ui/{p-f3c08dc7.entry.js → p-84b62333.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5ae2ce53.entry.js → p-88b40751.entry.js} +1 -1
- package/dist/bromcom-ui/p-8e3a3a24.entry.js +5 -0
- package/dist/bromcom-ui/{p-6e017905.entry.js → p-901e3215.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16bae5a0.entry.js → p-96db1967.entry.js} +1 -1
- package/dist/bromcom-ui/{p-778590bf.entry.js → p-a537edd4.entry.js} +1 -1
- package/dist/bromcom-ui/p-a932a81b.js +5 -0
- package/dist/bromcom-ui/{p-f3d970d7.entry.js → p-a94eb1f6.entry.js} +1 -1
- package/dist/bromcom-ui/p-bcd834ce.entry.js +5 -0
- package/dist/bromcom-ui/{p-51b670a0.entry.js → p-c2aab999.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a681f4b.entry.js → p-c3b93873.entry.js} +1 -1
- package/dist/bromcom-ui/{p-98253d3c.entry.js → p-cd11592d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cde1298c.entry.js → p-ce61f93c.entry.js} +1 -1
- package/dist/bromcom-ui/p-cff21cc1.js +5 -0
- package/dist/bromcom-ui/{p-38a5fb2c.entry.js → p-d12fb063.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7ed49ddd.entry.js → p-d6c20ada.entry.js} +1 -1
- package/dist/bromcom-ui/{p-61ee8d5c.entry.js → p-d80351a4.entry.js} +1 -1
- package/dist/bromcom-ui/p-da846097.entry.js +5 -0
- package/dist/bromcom-ui/{p-7c2806d1.entry.js → p-e4e16cbd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a92be147.entry.js → p-e98f89f6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-49656e08.entry.js → p-f7ff7345.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7496628.entry.js → p-f9270e10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-19c5d157.entry.js → p-fa54001d.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button.cjs.entry.js +1 -1
- package/dist/cjs/bcm-card.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +6 -11
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +41 -11
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-items.cjs.entry.js +1 -1
- package/dist/cjs/bcm-label_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-list.cjs.entry.js +14 -6
- package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-search.cjs.entry.js +2 -2
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +29 -39
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-ab5c97d5.js → generate-69d0693b.js} +1 -1
- package/dist/cjs/{input-template-b540fdc4.js → input-template-94df4827.js} +1 -1
- package/dist/cjs/{json-parse-decarator-fc944651.js → json-parse-decarator-9456d534.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-b9cf4b48.js → number-helper-71379c8d.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-cb28501d.js → stepper-states-020851a5.js} +1 -1
- package/dist/cjs/{tooltip-helper-0f770cf7.js → tooltip-helper-c80d9d7a.js} +3 -3
- package/dist/cjs/{validators-72173f1d.js → validators-fc94eb95.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/molecules/color-input/color-input.js +6 -18
- package/dist/collection/components/molecules/linked/linked.js +44 -7
- package/dist/collection/components/molecules/stepper/stepper.js +29 -42
- package/dist/collection/components/organism/list/list-tag-control.js +1 -0
- package/dist/collection/components/organism/states/bcm-list2.states.js +7 -0
- package/dist/collection/templates/tag-template.js +1 -1
- package/dist/components/bcm-color-input.js +3 -8
- package/dist/components/bcm-list.js +8 -0
- package/dist/components/bcm-stepper.js +25 -35
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/linked.js +40 -9
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar_2.entry.js +3 -3
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-button.entry.js +1 -1
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-group.entry.js +1 -1
- package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
- package/dist/esm/bcm-checkbox_2.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +6 -11
- package/dist/esm/bcm-colorful_2.entry.js +41 -11
- package/dist/esm/bcm-date-picker.entry.js +1 -1
- package/dist/esm/bcm-datetime-picker.entry.js +1 -1
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +3 -3
- package/dist/esm/bcm-dropdown.entry.js +2 -2
- package/dist/esm/bcm-expansion-panel.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +1 -1
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-label_2.entry.js +4 -4
- package/dist/esm/bcm-list.entry.js +14 -6
- package/dist/esm/bcm-menu.entry.js +4 -4
- package/dist/esm/bcm-modal.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +3 -3
- package/dist/esm/bcm-progress.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +4 -4
- package/dist/esm/bcm-radio.entry.js +3 -3
- package/dist/esm/bcm-range.entry.js +1 -1
- package/dist/esm/bcm-search.entry.js +2 -2
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +30 -40
- package/dist/esm/bcm-switch.entry.js +1 -1
- package/dist/esm/bcm-tab-group.entry.js +3 -3
- package/dist/esm/bcm-tab-item-header.entry.js +3 -3
- package/dist/esm/bcm-tab-item.entry.js +3 -3
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +2 -2
- package/dist/esm/bcm-time-picker.entry.js +1 -1
- package/dist/esm/bcm-toast.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{generate-7a787f1e.js → generate-b404f183.js} +1 -1
- package/dist/esm/{input-template-7f7c2370.js → input-template-998c1e3e.js} +1 -1
- package/dist/esm/{json-parse-decarator-d04cb735.js → json-parse-decarator-552bd2bc.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-d88788e7.js → number-helper-88c6ab7d.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +2 -2
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-25155b3b.js → stepper-states-6db9ebf3.js} +1 -1
- package/dist/esm/{tooltip-helper-ec0f9e15.js → tooltip-helper-86c44e24.js} +3 -3
- package/dist/esm/{validators-69c22893.js → validators-35be2684.js} +1 -1
- package/dist/types/components/molecules/linked/linked.d.ts +8 -2
- package/dist/types/components/molecules/stepper/stepper.d.ts +2 -2
- package/dist/types/components.d.ts +1 -1
- package/package.json +4 -2
- package/dist/bromcom-ui/p-2b2a6374.entry.js +0 -5
- package/dist/bromcom-ui/p-4dd66352.js +0 -5
- package/dist/bromcom-ui/p-54a3364d.entry.js +0 -5
- package/dist/bromcom-ui/p-bca3b603.js +0 -5
- package/dist/bromcom-ui/p-c1c066a4.entry.js +0 -5
- package/dist/bromcom-ui/p-c42e3b89.entry.js +0 -5
- package/dist/bromcom-ui/p-e01220df.js +0 -5
- package/dist/bromcom-ui/p-fec276e6.entry.js +0 -5
- package/dist/collection/components/molecules/color-input/color-input.css +0 -127
- /package/dist/bromcom-ui/{p-5fd7a8b6.js → p-2e73d572.js} +0 -0
- /package/dist/cjs/{types-6eb7e028.js → types-7523fd99.js} +0 -0
- /package/dist/collection/components/{atoms → other}/box/box.js +0 -0
- /package/dist/collection/components/{atoms → other}/typography/typography.js +0 -0
- /package/dist/collection/components/{atoms → other_deprecated}/tag/tag.js +0 -0
- /package/dist/collection/components/{atoms → other_deprecated}/tag/types.js +0 -0
- /package/dist/esm/{types-bfc3bba1.js → types-9493a7ed.js} +0 -0
- /package/dist/types/components/{atoms → other}/box/box.d.ts +0 -0
- /package/dist/types/components/{atoms → other}/typography/typography.d.ts +0 -0
- /package/dist/types/components/{atoms → other_deprecated}/tag/tag.d.ts +0 -0
- /package/dist/types/components/{atoms → other_deprecated}/tag/types.d.ts +0 -0
|
@@ -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 {
|
|
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
|
-
|
|
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
|
|
132
|
+
async setActive(index) {
|
|
132
133
|
if (!index)
|
|
133
134
|
return;
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
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": {
|
|
@@ -116,6 +116,7 @@ export class ListTagControl {
|
|
|
116
116
|
text: otherTagTextControl({ count: otherCounter, width: containerWidth[1] }),
|
|
117
117
|
title: snq(() => otherTags
|
|
118
118
|
.map(tag => this.values.find(value => value.id == tag.dataset.id))
|
|
119
|
+
.sort((a, b) => a._ct - b._ct)
|
|
119
120
|
.slice(0, 15)
|
|
120
121
|
.map(item => StringHelper.textLimitter(item.tagTitle || item.text, 40, true))
|
|
121
122
|
.toString()
|
|
@@ -142,6 +142,7 @@ const removeOtherTags = (id, ids, items) => {
|
|
|
142
142
|
if (child.id == otherTagIds) {
|
|
143
143
|
child.checked = false;
|
|
144
144
|
child.itemObject.checked = false;
|
|
145
|
+
child.itemObject._ct = new Date().getTime();
|
|
145
146
|
}
|
|
146
147
|
else if (child.items) {
|
|
147
148
|
onRemoveItems(id, otherTagIds, child.items);
|
|
@@ -156,6 +157,7 @@ const onRemoveItems = (id, itemId, items) => {
|
|
|
156
157
|
if (item.id == itemId) {
|
|
157
158
|
item.checked = false;
|
|
158
159
|
item.itemObject.checked = false;
|
|
160
|
+
item.itemObject._ct = new Date().getTime();
|
|
159
161
|
indeterminateStatus(id, item.parentId);
|
|
160
162
|
}
|
|
161
163
|
else if (item.items) {
|
|
@@ -215,6 +217,7 @@ const checkedProcess = (id, item, status) => {
|
|
|
215
217
|
}
|
|
216
218
|
item.itemObject.checked = item.checked;
|
|
217
219
|
item.indeterminate = item.checked ? 'determinate' : 'uncheck';
|
|
220
|
+
item.itemObject._ct = new Date().getTime();
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
223
|
if (item.items) {
|
|
@@ -249,6 +252,7 @@ const indeterminateStatus = (id, itemId, items) => {
|
|
|
249
252
|
item.indeterminate = indeterminateState;
|
|
250
253
|
item.checked = indeterminateState == 'determinate' ? true : false;
|
|
251
254
|
item.itemObject.checked = item.checked;
|
|
255
|
+
item.itemObject._ct = new Date().getTime();
|
|
252
256
|
if (item.parentId) {
|
|
253
257
|
indeterminateStatus(id, item.parentId);
|
|
254
258
|
}
|
|
@@ -429,6 +433,7 @@ const getCheckedList = (id, items) => {
|
|
|
429
433
|
}
|
|
430
434
|
});
|
|
431
435
|
}
|
|
436
|
+
(checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 && checkedList.sort((a, b) => a._ct - b._ct);
|
|
432
437
|
return { checkedList: (checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 ? checkedList : null, nestedResult: nestedResult };
|
|
433
438
|
};
|
|
434
439
|
const selectedItem = (id, itemId, items) => {
|
|
@@ -456,6 +461,7 @@ const selectedItem = (id, itemId, items) => {
|
|
|
456
461
|
item.itemObject.selected = item.selected;
|
|
457
462
|
}
|
|
458
463
|
}
|
|
464
|
+
item.itemObject._ct = new Date().getTime();
|
|
459
465
|
}
|
|
460
466
|
if (item.items) {
|
|
461
467
|
const found = selectedItem(id, itemId, item.items);
|
|
@@ -488,6 +494,7 @@ const setClear = (id, items) => {
|
|
|
488
494
|
((_a = item.itemObject) === null || _a === void 0 ? void 0 : _a.checked) && (item.itemObject.checked = false);
|
|
489
495
|
((_b = item.itemObject) === null || _b === void 0 ? void 0 : _b.selected) && (item.itemObject.selected = false);
|
|
490
496
|
((_c = item.itemObject) === null || _c === void 0 ? void 0 : _c.indeterminate) && (item.itemObject.indeterminate = 'uncheck');
|
|
497
|
+
item.itemObject._ct = new Date().getTime();
|
|
491
498
|
if (item.items) {
|
|
492
499
|
setClear(id, item.items);
|
|
493
500
|
}
|
|
@@ -8,7 +8,7 @@ import cs from 'classnames';
|
|
|
8
8
|
import { NumberHelper } from '../helper/number-helper';
|
|
9
9
|
import { extractColor } from '../utils/utils';
|
|
10
10
|
import { ColorPalette } from '../global/variables/colors';
|
|
11
|
-
import { ColorProps } from '../components/
|
|
11
|
+
import { ColorProps } from '../components/other_deprecated/tag/types';
|
|
12
12
|
export const TagTemplate = ({ _id, color, customStyle, size, checked, hidden, value, type, onDismiss, onSelect }) => {
|
|
13
13
|
!size && (size = Bcm.FontSize['size-1']);
|
|
14
14
|
const getColor = (color) => {
|
|
@@ -17,15 +17,13 @@ import { d as defineCustomElement$4 } from './label.js';
|
|
|
17
17
|
import { d as defineCustomElement$3 } from './linked.js';
|
|
18
18
|
import { d as defineCustomElement$2 } from './tooltip.js';
|
|
19
19
|
|
|
20
|
-
const colorInputCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}";
|
|
21
|
-
|
|
22
20
|
const BcmColorInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
23
21
|
constructor() {
|
|
24
22
|
super();
|
|
25
23
|
this.__registerHost();
|
|
26
24
|
this._id = Generate.UID();
|
|
27
|
-
this.label = "
|
|
28
|
-
this.placeholder = "
|
|
25
|
+
this.label = "";
|
|
26
|
+
this.placeholder = "";
|
|
29
27
|
this.value = "";
|
|
30
28
|
this.required = false;
|
|
31
29
|
this.disabled = false;
|
|
@@ -45,14 +43,12 @@ const BcmColorInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
45
43
|
}
|
|
46
44
|
handleInputChanged(e) {
|
|
47
45
|
this.getPickerElement().color = e.detail;
|
|
48
|
-
console.log("handleInputChanged: ", e.detail);
|
|
49
46
|
}
|
|
50
47
|
eyeDropper() {
|
|
51
48
|
const eyeDropper = new window.EyeDropper();
|
|
52
49
|
eyeDropper
|
|
53
50
|
.open()
|
|
54
51
|
.then((color) => {
|
|
55
|
-
console.log("color: ", color.sRGBHex);
|
|
56
52
|
this.handleChange(color.sRGBHex);
|
|
57
53
|
})
|
|
58
54
|
.catch((error) => {
|
|
@@ -68,12 +64,11 @@ const BcmColorInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
68
64
|
return typeof window !== "undefined" && "EyeDropper" in window;
|
|
69
65
|
}
|
|
70
66
|
render() {
|
|
71
|
-
return (h(Host,
|
|
67
|
+
return (h(Host, { class: "tw-block" }, h("bcm-input", { id: this._id + "-color", fullWidth: this.fullWidth, label: this.label, placeholder: this.placeholder, type: "text", "onBcm-change": e => this.handleInputChanged(e) }, h("i", { slot: "prefix", class: "tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-gray-100", style: {
|
|
72
68
|
backgroundColor: this.value,
|
|
73
69
|
} }), this.isEyeDropperSupported() && h("i", { slot: "suffix", class: "far fa-eye-dropper", onClick: () => this.eyeDropper() })), h("bcm-linked", { targetId: this._id + "-color-container" }, h("bcm-colorful", { id: this._id + "-picker", color: this.value, onBcmChange: e => this.handleChange(e.detail) }))));
|
|
74
70
|
}
|
|
75
71
|
get el() { return this; }
|
|
76
|
-
static get style() { return colorInputCss; }
|
|
77
72
|
}, [0, "bcm-color-input", {
|
|
78
73
|
"_id": [1537, "id"],
|
|
79
74
|
"label": [1],
|
|
@@ -279,6 +279,7 @@ const removeOtherTags = (id, ids, items) => {
|
|
|
279
279
|
if (child.id == otherTagIds) {
|
|
280
280
|
child.checked = false;
|
|
281
281
|
child.itemObject.checked = false;
|
|
282
|
+
child.itemObject._ct = new Date().getTime();
|
|
282
283
|
}
|
|
283
284
|
else if (child.items) {
|
|
284
285
|
onRemoveItems(id, otherTagIds, child.items);
|
|
@@ -293,6 +294,7 @@ const onRemoveItems = (id, itemId, items) => {
|
|
|
293
294
|
if (item.id == itemId) {
|
|
294
295
|
item.checked = false;
|
|
295
296
|
item.itemObject.checked = false;
|
|
297
|
+
item.itemObject._ct = new Date().getTime();
|
|
296
298
|
indeterminateStatus(id, item.parentId);
|
|
297
299
|
}
|
|
298
300
|
else if (item.items) {
|
|
@@ -352,6 +354,7 @@ const checkedProcess = (id, item, status) => {
|
|
|
352
354
|
}
|
|
353
355
|
item.itemObject.checked = item.checked;
|
|
354
356
|
item.indeterminate = item.checked ? 'determinate' : 'uncheck';
|
|
357
|
+
item.itemObject._ct = new Date().getTime();
|
|
355
358
|
}
|
|
356
359
|
}
|
|
357
360
|
if (item.items) {
|
|
@@ -386,6 +389,7 @@ const indeterminateStatus = (id, itemId, items) => {
|
|
|
386
389
|
item.indeterminate = indeterminateState;
|
|
387
390
|
item.checked = indeterminateState == 'determinate' ? true : false;
|
|
388
391
|
item.itemObject.checked = item.checked;
|
|
392
|
+
item.itemObject._ct = new Date().getTime();
|
|
389
393
|
if (item.parentId) {
|
|
390
394
|
indeterminateStatus(id, item.parentId);
|
|
391
395
|
}
|
|
@@ -521,6 +525,7 @@ const getCheckedList = (id, items) => {
|
|
|
521
525
|
}
|
|
522
526
|
});
|
|
523
527
|
}
|
|
528
|
+
(checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 && checkedList.sort((a, b) => a._ct - b._ct);
|
|
524
529
|
return { checkedList: (checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 ? checkedList : null, nestedResult: nestedResult };
|
|
525
530
|
};
|
|
526
531
|
const selectedItem = (id, itemId, items) => {
|
|
@@ -548,6 +553,7 @@ const selectedItem = (id, itemId, items) => {
|
|
|
548
553
|
item.itemObject.selected = item.selected;
|
|
549
554
|
}
|
|
550
555
|
}
|
|
556
|
+
item.itemObject._ct = new Date().getTime();
|
|
551
557
|
}
|
|
552
558
|
if (item.items) {
|
|
553
559
|
const found = selectedItem(id, itemId, item.items);
|
|
@@ -580,6 +586,7 @@ const setClear = (id, items) => {
|
|
|
580
586
|
((_a = item.itemObject) === null || _a === void 0 ? void 0 : _a.checked) && (item.itemObject.checked = false);
|
|
581
587
|
((_b = item.itemObject) === null || _b === void 0 ? void 0 : _b.selected) && (item.itemObject.selected = false);
|
|
582
588
|
((_c = item.itemObject) === null || _c === void 0 ? void 0 : _c.indeterminate) && (item.itemObject.indeterminate = 'uncheck');
|
|
589
|
+
item.itemObject._ct = new Date().getTime();
|
|
583
590
|
if (item.items) {
|
|
584
591
|
setClear(id, item.items);
|
|
585
592
|
}
|
|
@@ -947,6 +954,7 @@ class ListTagControl {
|
|
|
947
954
|
text: otherTagTextControl({ count: otherCounter, width: containerWidth[1] }),
|
|
948
955
|
title: snq(() => otherTags
|
|
949
956
|
.map(tag => this.values.find(value => value.id == tag.dataset.id))
|
|
957
|
+
.sort((a, b) => a._ct - b._ct)
|
|
950
958
|
.slice(0, 15)
|
|
951
959
|
.map(item => StringHelper.textLimitter(item.tagTitle || item.text, 40, true))
|
|
952
960
|
.toString()
|
|
@@ -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
|
|
13
|
+
import { g as getChildElements } from './utils.js';
|
|
14
14
|
import { a as Bcm } from './bcm.js';
|
|
15
|
-
import {
|
|
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
|
-
|
|
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
|
|
164
|
+
async setActive(index) {
|
|
164
165
|
if (!index)
|
|
165
166
|
return;
|
|
166
|
-
if (
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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);
|
|
@@ -5,7 +5,7 @@ export { BcmAttendance as BcmAttendance } from '../types/components/other/attend
|
|
|
5
5
|
export { BcmAutocomplete as BcmAutocomplete } from '../types/components/organism/autocomplete/autocomplete';
|
|
6
6
|
export { BcmAvatar as BcmAvatar } from '../types/components/atoms/avatar/avatar';
|
|
7
7
|
export { BcmBadge as BcmBadge } from '../types/components/atoms/badge/badge';
|
|
8
|
-
export { BcmBox as BcmBox } from '../types/components/
|
|
8
|
+
export { BcmBox as BcmBox } from '../types/components/other/box/box';
|
|
9
9
|
export { BcmBreadcrumb as BcmBreadcrumb } from '../types/components/molecules/breadcrumb/breadcrumb';
|
|
10
10
|
export { BcmButton as BcmButton } from '../types/components/atoms/button/button';
|
|
11
11
|
export { BcmButtonGroup as BcmButtonGroup } from '../types/components/molecules/button-group/button-group';
|
|
@@ -75,7 +75,7 @@ export { BcmTabPane as BcmTabPane } from '../types/components/other_deprecated/t
|
|
|
75
75
|
export { BcmTable as BcmTable } from '../types/components/other/data-table/table';
|
|
76
76
|
export { BcmTabs as BcmTabs } from '../types/components/other_deprecated/tabs/tabs';
|
|
77
77
|
export { BcmTabsContent as BcmTabsContent } from '../types/components/other_deprecated/tabs/tabs-content';
|
|
78
|
-
export { BcmTag as BcmTag } from '../types/components/
|
|
78
|
+
export { BcmTag as BcmTag } from '../types/components/other_deprecated/tag/tag';
|
|
79
79
|
export { BcmText as BcmText } from '../types/components/other_deprecated/text/text';
|
|
80
80
|
export { BcmTextarea as BcmTextarea } from '../types/components/molecules/textarea/textarea';
|
|
81
81
|
export { BcmTimePicker as BcmTimePicker } from '../types/components/organism/time-picker/time-picker';
|
|
@@ -86,7 +86,7 @@ export { BcmTooltip as BcmTooltip } from '../types/components/molecules/tooltip/
|
|
|
86
86
|
export { Bcmtreeview as BcmTreeview } from '../types/components/other_deprecated/treeview/treeview';
|
|
87
87
|
export { BcmtreeviewGroup as BcmTreeviewGroup } from '../types/components/other_deprecated/treeview/treeview-group';
|
|
88
88
|
export { BcmtreeviewItem as BcmTreeviewItem } from '../types/components/other_deprecated/treeview/treeview-item';
|
|
89
|
-
export { BcmTypography as BcmTypography } from '../types/components/
|
|
89
|
+
export { BcmTypography as BcmTypography } from '../types/components/other/typography/typography';
|
|
90
90
|
export { OldBcmPopover as OldBcmPopover } from '../types/components/other_deprecated/old-popover/old-popover';
|
|
91
91
|
export { OldBcmPopoverBox as OldBcmPopoverBox } from '../types/components/other_deprecated/old-popover/old-popover-box';
|
|
92
92
|
|
|
@@ -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 {
|
|
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
|
|
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
|
-
|
|
173
|
-
|
|
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-
|
|
7
|
+
import { G as Generate } from './generate-b404f183.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-
|
|
6
|
+
import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-b404f183.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-
|
|
7
|
+
import { G as Generate } from './generate-b404f183.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-
|
|
10
|
-
import { N as NumberHelper } from './number-helper-
|
|
9
|
+
import { G as Generate } from './generate-b404f183.js';
|
|
10
|
+
import { N as NumberHelper } from './number-helper-88c6ab7d.js';
|
|
11
11
|
import './string-helper-6bd24967.js';
|
|
12
|
-
import './validators-
|
|
12
|
+
import './validators-35be2684.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-
|
|
8
|
+
import { G as Generate } from './generate-b404f183.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-
|
|
6
|
+
import { G as Generate, s as snq } from './generate-b404f183.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-
|
|
6
|
+
import { s as snq, G as Generate } from './generate-b404f183.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-
|
|
9
|
+
import { G as Generate } from './generate-b404f183.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-
|
|
7
|
+
import { G as Generate, s as snq } from './generate-b404f183.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-
|
|
7
|
+
import { G as Generate } from './generate-b404f183.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';
|