bromcom-ui 2.7.38-rc.3-0 → 2.7.38-rc.3
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-3391d449.entry.js +5 -0
- package/dist/cjs/bcm-button_9.cjs.entry.js +11 -8
- package/dist/collection/components/molecules/states/stepper-states.js +6 -4
- package/dist/collection/components/molecules/stepper/stepper.js +5 -3
- package/dist/collection/templates/step-template.js +2 -2
- package/dist/components/bcm-stepper.js +7 -5
- package/dist/components/step.js +6 -5
- package/dist/esm/bcm-button_9.entry.js +12 -9
- package/dist/types/templates/step-template.d.ts +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-79e4aacc.entry.js +0 -5
|
@@ -1381,7 +1381,8 @@ const setValue = val => {
|
|
|
1381
1381
|
.filter(data => !data.hidden)
|
|
1382
1382
|
.map((item, index) => ({
|
|
1383
1383
|
id: item.id || generate.Generate.UID(),
|
|
1384
|
-
title: item.title || item._title
|
|
1384
|
+
title: item.title || item._title,
|
|
1385
|
+
_title: item.title || item._title || 'Step ' + (index + 1),
|
|
1385
1386
|
description: item.description || '',
|
|
1386
1387
|
status: item.status || 'default',
|
|
1387
1388
|
disabled: val.linear ? (index == 0 ? false : true) : item.disabled || false,
|
|
@@ -1411,14 +1412,14 @@ const changeStepStatus = (id, stepId, status) => {
|
|
|
1411
1412
|
const value = state.value.get(id);
|
|
1412
1413
|
if (value && value.steps) {
|
|
1413
1414
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { status: step.id === stepId ? status : step.status })));
|
|
1414
|
-
value.el
|
|
1415
|
+
index$1.forceUpdate(value.el);
|
|
1415
1416
|
}
|
|
1416
1417
|
};
|
|
1417
1418
|
const changeStepDisabled = (id, stepId, disabled) => {
|
|
1418
1419
|
const value = state.value.get(id);
|
|
1419
1420
|
if (value && value.steps) {
|
|
1420
1421
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { disabled: step.id === stepId ? disabled : step.disabled })));
|
|
1421
|
-
value.el
|
|
1422
|
+
index$1.forceUpdate(value.el);
|
|
1422
1423
|
}
|
|
1423
1424
|
};
|
|
1424
1425
|
const setActiveIndex = (id, index) => state.value.get(id).active = index;
|
|
@@ -1427,7 +1428,7 @@ const stepperReset = id => {
|
|
|
1427
1428
|
if (value) {
|
|
1428
1429
|
value.active = 1;
|
|
1429
1430
|
value.steps = value.steps.map((step, i) => (Object.assign(Object.assign({}, step), { active: i === 0, status: 'default', disabled: i !== 0, loading: false })));
|
|
1430
|
-
value.el
|
|
1431
|
+
index$1.forceUpdate(value.el);
|
|
1431
1432
|
}
|
|
1432
1433
|
};
|
|
1433
1434
|
const getValue = id => generate.snq(() => state.value.get(id), {});
|
|
@@ -1527,7 +1528,7 @@ __decorate$2([
|
|
|
1527
1528
|
isLoadDecorator.IsLoad()
|
|
1528
1529
|
], BcmStep.prototype, "el", void 0);
|
|
1529
1530
|
|
|
1530
|
-
const StepperHeaderTemplate = ({
|
|
1531
|
+
const StepperHeaderTemplate = ({ _title, description, status, valid, index, loading, active, stepChange, statusIcon, icon, disabled, headerHidden, }) => {
|
|
1531
1532
|
const classes = index$2.classnames('bcm-stepper__header-item', `bcm-stepper__header-item--${status}`, {
|
|
1532
1533
|
'bcm-stepper__header-item--active': active,
|
|
1533
1534
|
'bcm-stepper__header-item--valid': valid,
|
|
@@ -1544,7 +1545,7 @@ const StepperHeaderTemplate = ({ title, description, status, valid, index, loadi
|
|
|
1544
1545
|
return (index$1.h("div", { class: classes },
|
|
1545
1546
|
index$1.h("div", { class: "bcm-stepper__header-item--container", onClick: () => !disabled && stepChange(index) },
|
|
1546
1547
|
index$1.h("div", { class: "bcm-stepper__header-item-icon size-3" }, loading ? index$1.h("bcm-icon", { icon: "far fa-spinner-third fa-spin" }) : customIcon || index),
|
|
1547
|
-
index$1.h("div", { class: "bcm-stepper__header-item-title size-2" },
|
|
1548
|
+
index$1.h("div", { class: "bcm-stepper__header-item-title size-2" }, _title),
|
|
1548
1549
|
index$1.h("div", { class: "bcm-stepper__header-item-description size-1" }, description))));
|
|
1549
1550
|
};
|
|
1550
1551
|
|
|
@@ -1609,7 +1610,7 @@ const BcmStepper = class {
|
|
|
1609
1610
|
slots.forEach((item, index) => {
|
|
1610
1611
|
const step = steps.find(step => !item.headerHidden && step.id === item.id);
|
|
1611
1612
|
if (step) {
|
|
1612
|
-
generate.Generate.setAttributes(item, Object.assign({ title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
1613
|
+
generate.Generate.setAttributes(item, Object.assign({ title: '', _title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
1613
1614
|
if ((item.hidden = false)) {
|
|
1614
1615
|
item.removeAttribute('hidden');
|
|
1615
1616
|
}
|
|
@@ -1634,7 +1635,7 @@ const BcmStepper = class {
|
|
|
1634
1635
|
stepperStates.changeActiveStep(this.stepperId, index);
|
|
1635
1636
|
this.bcmStepChange.emit(index);
|
|
1636
1637
|
}
|
|
1637
|
-
this.
|
|
1638
|
+
index$1.forceUpdate(this.el);
|
|
1638
1639
|
return Promise.resolve(index);
|
|
1639
1640
|
}
|
|
1640
1641
|
async prev() {
|
|
@@ -1650,6 +1651,7 @@ const BcmStepper = class {
|
|
|
1650
1651
|
await this.onStepChange(index);
|
|
1651
1652
|
}
|
|
1652
1653
|
}
|
|
1654
|
+
index$1.forceUpdate(this.el);
|
|
1653
1655
|
return Promise.resolve(this.getActiveIndex());
|
|
1654
1656
|
}
|
|
1655
1657
|
async next(idx) {
|
|
@@ -1665,6 +1667,7 @@ const BcmStepper = class {
|
|
|
1665
1667
|
else {
|
|
1666
1668
|
step.status = 'error';
|
|
1667
1669
|
}
|
|
1670
|
+
index$1.forceUpdate(this.el);
|
|
1668
1671
|
return Promise.resolve(this.getActiveIndex());
|
|
1669
1672
|
}
|
|
1670
1673
|
async setActive(index) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { createStore } from '@stencil/store';
|
|
6
6
|
import snq from 'snq';
|
|
7
7
|
import { Generate } from '../../../helper/generate';
|
|
8
|
+
import { forceUpdate } from '@stencil/core';
|
|
8
9
|
const { state } = createStore({
|
|
9
10
|
value: new Map(),
|
|
10
11
|
setData: {},
|
|
@@ -16,7 +17,8 @@ const setValue = val => {
|
|
|
16
17
|
.filter(data => !data.hidden)
|
|
17
18
|
.map((item, index) => ({
|
|
18
19
|
id: item.id || Generate.UID(),
|
|
19
|
-
title: item.title || item._title
|
|
20
|
+
title: item.title || item._title,
|
|
21
|
+
_title: item.title || item._title || 'Step ' + (index + 1),
|
|
20
22
|
description: item.description || '',
|
|
21
23
|
status: item.status || 'default',
|
|
22
24
|
disabled: val.linear ? (index == 0 ? false : true) : item.disabled || false,
|
|
@@ -46,14 +48,14 @@ const changeStepStatus = (id, stepId, status) => {
|
|
|
46
48
|
const value = state.value.get(id);
|
|
47
49
|
if (value && value.steps) {
|
|
48
50
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { status: step.id === stepId ? status : step.status })));
|
|
49
|
-
value.el
|
|
51
|
+
forceUpdate(value.el);
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
54
|
const changeStepDisabled = (id, stepId, disabled) => {
|
|
53
55
|
const value = state.value.get(id);
|
|
54
56
|
if (value && value.steps) {
|
|
55
57
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { disabled: step.id === stepId ? disabled : step.disabled })));
|
|
56
|
-
value.el
|
|
58
|
+
forceUpdate(value.el);
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
const setActiveIndex = (id, index) => state.value.get(id).active = index;
|
|
@@ -62,7 +64,7 @@ const stepperReset = id => {
|
|
|
62
64
|
if (value) {
|
|
63
65
|
value.active = 1;
|
|
64
66
|
value.steps = value.steps.map((step, i) => (Object.assign(Object.assign({}, step), { active: i === 0, status: 'default', disabled: i !== 0, loading: false })));
|
|
65
|
-
value.el
|
|
67
|
+
forceUpdate(value.el);
|
|
66
68
|
}
|
|
67
69
|
};
|
|
68
70
|
const getValue = id => snq(() => state.value.get(id), {});
|
|
@@ -12,7 +12,7 @@ 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 { h, Host } from '@stencil/core';
|
|
15
|
+
import { forceUpdate, h, Host } from '@stencil/core';
|
|
16
16
|
import cs from 'classnames';
|
|
17
17
|
import snq from 'snq';
|
|
18
18
|
import { IsLoad } from '../../../decorators/is-load-decorator';
|
|
@@ -68,7 +68,7 @@ export class BcmStepper {
|
|
|
68
68
|
slots.forEach((item, index) => {
|
|
69
69
|
const step = steps.find(step => !item.headerHidden && step.id === item.id);
|
|
70
70
|
if (step) {
|
|
71
|
-
Generate.setAttributes(item, Object.assign({ title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
71
|
+
Generate.setAttributes(item, Object.assign({ title: '', _title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
72
72
|
if ((item.hidden = false)) {
|
|
73
73
|
item.removeAttribute('hidden');
|
|
74
74
|
}
|
|
@@ -93,7 +93,7 @@ export class BcmStepper {
|
|
|
93
93
|
stepperStates.changeActiveStep(this.stepperId, index);
|
|
94
94
|
this.bcmStepChange.emit(index);
|
|
95
95
|
}
|
|
96
|
-
this.
|
|
96
|
+
forceUpdate(this.el);
|
|
97
97
|
return Promise.resolve(index);
|
|
98
98
|
}
|
|
99
99
|
async prev() {
|
|
@@ -109,6 +109,7 @@ export class BcmStepper {
|
|
|
109
109
|
await this.onStepChange(index);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
forceUpdate(this.el);
|
|
112
113
|
return Promise.resolve(this.getActiveIndex());
|
|
113
114
|
}
|
|
114
115
|
async next(idx) {
|
|
@@ -124,6 +125,7 @@ export class BcmStepper {
|
|
|
124
125
|
else {
|
|
125
126
|
step.status = 'error';
|
|
126
127
|
}
|
|
128
|
+
forceUpdate(this.el);
|
|
127
129
|
return Promise.resolve(this.getActiveIndex());
|
|
128
130
|
}
|
|
129
131
|
async setActive(index) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { h } from '@stencil/core';
|
|
6
6
|
import cs from 'classnames';
|
|
7
|
-
export const StepperHeaderTemplate = ({
|
|
7
|
+
export const StepperHeaderTemplate = ({ _title, description, status, valid, index, loading, active, stepChange, statusIcon, icon, disabled, headerHidden, }) => {
|
|
8
8
|
const classes = cs('bcm-stepper__header-item', `bcm-stepper__header-item--${status}`, {
|
|
9
9
|
'bcm-stepper__header-item--active': active,
|
|
10
10
|
'bcm-stepper__header-item--valid': valid,
|
|
@@ -18,5 +18,5 @@ export const StepperHeaderTemplate = ({ title, description, status, valid, index
|
|
|
18
18
|
error: 'fal fa-times',
|
|
19
19
|
};
|
|
20
20
|
const customIcon = (icon || (statusIcon && defaultIcons[status])) && h("bcm-icon", { icon: icon ? icon : defaultIcons[status] });
|
|
21
|
-
return (h("div", { class: classes }, h("div", { class: "bcm-stepper__header-item--container", onClick: () => !disabled && stepChange(index) }, h("div", { class: "bcm-stepper__header-item-icon size-3" }, loading ? h("bcm-icon", { icon: "far fa-spinner-third fa-spin" }) : customIcon || index), h("div", { class: "bcm-stepper__header-item-title size-2" },
|
|
21
|
+
return (h("div", { class: classes }, h("div", { class: "bcm-stepper__header-item--container", onClick: () => !disabled && stepChange(index) }, h("div", { class: "bcm-stepper__header-item-icon size-3" }, loading ? h("bcm-icon", { icon: "far fa-spinner-third fa-spin" }) : customIcon || index), h("div", { class: "bcm-stepper__header-item-title size-2" }, _title), h("div", { class: "bcm-stepper__header-item-description size-1" }, description))));
|
|
22
22
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { h, proxyCustomElement, HTMLElement, createEvent, forceUpdate, Host } from '@stencil/core/internal/client';
|
|
6
6
|
import { c as classnames } from './index2.js';
|
|
7
7
|
import { G as Generate, s as snq } from './generate.js';
|
|
8
8
|
import { I as IsLoad } from './is-load-decorator.js';
|
|
@@ -11,7 +11,7 @@ import { g as getChildElements } from './utils.js';
|
|
|
11
11
|
import { s as stepperStates, d as defineCustomElement$2 } from './step.js';
|
|
12
12
|
import { d as defineCustomElement$3 } from './icon.js';
|
|
13
13
|
|
|
14
|
-
const StepperHeaderTemplate = ({
|
|
14
|
+
const StepperHeaderTemplate = ({ _title, description, status, valid, index, loading, active, stepChange, statusIcon, icon, disabled, headerHidden, }) => {
|
|
15
15
|
const classes = classnames('bcm-stepper__header-item', `bcm-stepper__header-item--${status}`, {
|
|
16
16
|
'bcm-stepper__header-item--active': active,
|
|
17
17
|
'bcm-stepper__header-item--valid': valid,
|
|
@@ -28,7 +28,7 @@ const StepperHeaderTemplate = ({ title, description, status, valid, index, loadi
|
|
|
28
28
|
return (h("div", { class: classes },
|
|
29
29
|
h("div", { class: "bcm-stepper__header-item--container", onClick: () => !disabled && stepChange(index) },
|
|
30
30
|
h("div", { class: "bcm-stepper__header-item-icon size-3" }, loading ? h("bcm-icon", { icon: "far fa-spinner-third fa-spin" }) : customIcon || index),
|
|
31
|
-
h("div", { class: "bcm-stepper__header-item-title size-2" },
|
|
31
|
+
h("div", { class: "bcm-stepper__header-item-title size-2" }, _title),
|
|
32
32
|
h("div", { class: "bcm-stepper__header-item-description size-1" }, description))));
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -94,7 +94,7 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
94
94
|
slots.forEach((item, index) => {
|
|
95
95
|
const step = steps.find(step => !item.headerHidden && step.id === item.id);
|
|
96
96
|
if (step) {
|
|
97
|
-
Generate.setAttributes(item, Object.assign({ title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
97
|
+
Generate.setAttributes(item, Object.assign({ title: '', _title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
98
98
|
if ((item.hidden = false)) {
|
|
99
99
|
item.removeAttribute('hidden');
|
|
100
100
|
}
|
|
@@ -119,7 +119,7 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
119
119
|
stepperStates.changeActiveStep(this.stepperId, index);
|
|
120
120
|
this.bcmStepChange.emit(index);
|
|
121
121
|
}
|
|
122
|
-
this.
|
|
122
|
+
forceUpdate(this.el);
|
|
123
123
|
return Promise.resolve(index);
|
|
124
124
|
}
|
|
125
125
|
async prev() {
|
|
@@ -135,6 +135,7 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
135
135
|
await this.onStepChange(index);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
+
forceUpdate(this.el);
|
|
138
139
|
return Promise.resolve(this.getActiveIndex());
|
|
139
140
|
}
|
|
140
141
|
async next(idx) {
|
|
@@ -150,6 +151,7 @@ const BcmStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
150
151
|
else {
|
|
151
152
|
step.status = 'error';
|
|
152
153
|
}
|
|
154
|
+
forceUpdate(this.el);
|
|
153
155
|
return Promise.resolve(this.getActiveIndex());
|
|
154
156
|
}
|
|
155
157
|
async setActive(index) {
|
package/dist/components/step.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { forceUpdate, proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
6
|
import { c as classnames } from './index2.js';
|
|
7
7
|
import { I as IsLoad } from './is-load-decorator.js';
|
|
8
8
|
import { G as Generate, s as snq } from './generate.js';
|
|
@@ -19,7 +19,8 @@ const setValue = val => {
|
|
|
19
19
|
.filter(data => !data.hidden)
|
|
20
20
|
.map((item, index) => ({
|
|
21
21
|
id: item.id || Generate.UID(),
|
|
22
|
-
title: item.title || item._title
|
|
22
|
+
title: item.title || item._title,
|
|
23
|
+
_title: item.title || item._title || 'Step ' + (index + 1),
|
|
23
24
|
description: item.description || '',
|
|
24
25
|
status: item.status || 'default',
|
|
25
26
|
disabled: val.linear ? (index == 0 ? false : true) : item.disabled || false,
|
|
@@ -49,14 +50,14 @@ const changeStepStatus = (id, stepId, status) => {
|
|
|
49
50
|
const value = state.value.get(id);
|
|
50
51
|
if (value && value.steps) {
|
|
51
52
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { status: step.id === stepId ? status : step.status })));
|
|
52
|
-
value.el
|
|
53
|
+
forceUpdate(value.el);
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
const changeStepDisabled = (id, stepId, disabled) => {
|
|
56
57
|
const value = state.value.get(id);
|
|
57
58
|
if (value && value.steps) {
|
|
58
59
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { disabled: step.id === stepId ? disabled : step.disabled })));
|
|
59
|
-
value.el
|
|
60
|
+
forceUpdate(value.el);
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
const setActiveIndex = (id, index) => state.value.get(id).active = index;
|
|
@@ -65,7 +66,7 @@ const stepperReset = id => {
|
|
|
65
66
|
if (value) {
|
|
66
67
|
value.active = 1;
|
|
67
68
|
value.steps = value.steps.map((step, i) => (Object.assign(Object.assign({}, step), { active: i === 0, status: 'default', disabled: i !== 0, loading: false })));
|
|
68
|
-
value.el
|
|
69
|
+
forceUpdate(value.el);
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
72
|
const getValue = id => snq(() => state.value.get(id), {});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-58077b32.js';
|
|
5
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, f as forceUpdate } from './index-58077b32.js';
|
|
6
6
|
import { s as snq, G as Generate } from './generate-2cdc77b7.js';
|
|
7
7
|
import { B as Bcm, a as Bcm$1 } from './bcm-b8d8a236.js';
|
|
8
8
|
import { c as classnames } from './index-ba2edd32.js';
|
|
@@ -1377,7 +1377,8 @@ const setValue = val => {
|
|
|
1377
1377
|
.filter(data => !data.hidden)
|
|
1378
1378
|
.map((item, index) => ({
|
|
1379
1379
|
id: item.id || Generate.UID(),
|
|
1380
|
-
title: item.title || item._title
|
|
1380
|
+
title: item.title || item._title,
|
|
1381
|
+
_title: item.title || item._title || 'Step ' + (index + 1),
|
|
1381
1382
|
description: item.description || '',
|
|
1382
1383
|
status: item.status || 'default',
|
|
1383
1384
|
disabled: val.linear ? (index == 0 ? false : true) : item.disabled || false,
|
|
@@ -1407,14 +1408,14 @@ const changeStepStatus = (id, stepId, status) => {
|
|
|
1407
1408
|
const value = state.value.get(id);
|
|
1408
1409
|
if (value && value.steps) {
|
|
1409
1410
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { status: step.id === stepId ? status : step.status })));
|
|
1410
|
-
value.el
|
|
1411
|
+
forceUpdate(value.el);
|
|
1411
1412
|
}
|
|
1412
1413
|
};
|
|
1413
1414
|
const changeStepDisabled = (id, stepId, disabled) => {
|
|
1414
1415
|
const value = state.value.get(id);
|
|
1415
1416
|
if (value && value.steps) {
|
|
1416
1417
|
value.steps = value.steps.map(step => (Object.assign(Object.assign({}, step), { disabled: step.id === stepId ? disabled : step.disabled })));
|
|
1417
|
-
value.el
|
|
1418
|
+
forceUpdate(value.el);
|
|
1418
1419
|
}
|
|
1419
1420
|
};
|
|
1420
1421
|
const setActiveIndex = (id, index) => state.value.get(id).active = index;
|
|
@@ -1423,7 +1424,7 @@ const stepperReset = id => {
|
|
|
1423
1424
|
if (value) {
|
|
1424
1425
|
value.active = 1;
|
|
1425
1426
|
value.steps = value.steps.map((step, i) => (Object.assign(Object.assign({}, step), { active: i === 0, status: 'default', disabled: i !== 0, loading: false })));
|
|
1426
|
-
value.el
|
|
1427
|
+
forceUpdate(value.el);
|
|
1427
1428
|
}
|
|
1428
1429
|
};
|
|
1429
1430
|
const getValue = id => snq(() => state.value.get(id), {});
|
|
@@ -1523,7 +1524,7 @@ __decorate$2([
|
|
|
1523
1524
|
IsLoad()
|
|
1524
1525
|
], BcmStep.prototype, "el", void 0);
|
|
1525
1526
|
|
|
1526
|
-
const StepperHeaderTemplate = ({
|
|
1527
|
+
const StepperHeaderTemplate = ({ _title, description, status, valid, index, loading, active, stepChange, statusIcon, icon, disabled, headerHidden, }) => {
|
|
1527
1528
|
const classes = classnames('bcm-stepper__header-item', `bcm-stepper__header-item--${status}`, {
|
|
1528
1529
|
'bcm-stepper__header-item--active': active,
|
|
1529
1530
|
'bcm-stepper__header-item--valid': valid,
|
|
@@ -1540,7 +1541,7 @@ const StepperHeaderTemplate = ({ title, description, status, valid, index, loadi
|
|
|
1540
1541
|
return (h("div", { class: classes },
|
|
1541
1542
|
h("div", { class: "bcm-stepper__header-item--container", onClick: () => !disabled && stepChange(index) },
|
|
1542
1543
|
h("div", { class: "bcm-stepper__header-item-icon size-3" }, loading ? h("bcm-icon", { icon: "far fa-spinner-third fa-spin" }) : customIcon || index),
|
|
1543
|
-
h("div", { class: "bcm-stepper__header-item-title size-2" },
|
|
1544
|
+
h("div", { class: "bcm-stepper__header-item-title size-2" }, _title),
|
|
1544
1545
|
h("div", { class: "bcm-stepper__header-item-description size-1" }, description))));
|
|
1545
1546
|
};
|
|
1546
1547
|
|
|
@@ -1605,7 +1606,7 @@ const BcmStepper = class {
|
|
|
1605
1606
|
slots.forEach((item, index) => {
|
|
1606
1607
|
const step = steps.find(step => !item.headerHidden && step.id === item.id);
|
|
1607
1608
|
if (step) {
|
|
1608
|
-
Generate.setAttributes(item, Object.assign({ title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
1609
|
+
Generate.setAttributes(item, Object.assign({ title: '', _title: step.title || step._title || '', status: step.status || 'default', disabled: step.disabled || false, valid: step.valid || true, loading: step.loading || false, index: step.index || index, active: step.active || false, innerHtml: step.innerHtml || '' }, (item.hidden == true && { headerHidden: true })));
|
|
1609
1610
|
if ((item.hidden = false)) {
|
|
1610
1611
|
item.removeAttribute('hidden');
|
|
1611
1612
|
}
|
|
@@ -1630,7 +1631,7 @@ const BcmStepper = class {
|
|
|
1630
1631
|
stepperStates.changeActiveStep(this.stepperId, index);
|
|
1631
1632
|
this.bcmStepChange.emit(index);
|
|
1632
1633
|
}
|
|
1633
|
-
this.
|
|
1634
|
+
forceUpdate(this.el);
|
|
1634
1635
|
return Promise.resolve(index);
|
|
1635
1636
|
}
|
|
1636
1637
|
async prev() {
|
|
@@ -1646,6 +1647,7 @@ const BcmStepper = class {
|
|
|
1646
1647
|
await this.onStepChange(index);
|
|
1647
1648
|
}
|
|
1648
1649
|
}
|
|
1650
|
+
forceUpdate(this.el);
|
|
1649
1651
|
return Promise.resolve(this.getActiveIndex());
|
|
1650
1652
|
}
|
|
1651
1653
|
async next(idx) {
|
|
@@ -1661,6 +1663,7 @@ const BcmStepper = class {
|
|
|
1661
1663
|
else {
|
|
1662
1664
|
step.status = 'error';
|
|
1663
1665
|
}
|
|
1666
|
+
forceUpdate(this.el);
|
|
1664
1667
|
return Promise.resolve(this.getActiveIndex());
|
|
1665
1668
|
}
|
|
1666
1669
|
async setActive(index) {
|