raise-common-lib 0.0.203 → 0.0.204
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/bundles/raise-common-lib.umd.js +44 -6
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/layout/rs-stepper/index.component.js +34 -9
- package/esm5/lib/layout/rs-stepper/index.component.js +47 -9
- package/fesm2015/raise-common-lib.js +31 -6
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +44 -6
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/rs-stepper/index.component.d.ts +6 -3
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -21932,11 +21932,15 @@
|
|
|
21932
21932
|
this.steps = [];
|
|
21933
21933
|
this.currentStep = 0;
|
|
21934
21934
|
this.stepClick = new core.EventEmitter();
|
|
21935
|
+
this.unlockedStep = 0; //已解锁的最大步骤
|
|
21935
21936
|
}
|
|
21937
|
+
//已解锁的最大步骤
|
|
21936
21938
|
/**
|
|
21937
21939
|
* @return {?}
|
|
21938
21940
|
*/
|
|
21939
|
-
RSStepperComponent.prototype.ngOnInit =
|
|
21941
|
+
RSStepperComponent.prototype.ngOnInit =
|
|
21942
|
+
//已解锁的最大步骤
|
|
21943
|
+
/**
|
|
21940
21944
|
* @return {?}
|
|
21941
21945
|
*/
|
|
21942
21946
|
function () {
|
|
@@ -21948,6 +21952,37 @@
|
|
|
21948
21952
|
function (step) {
|
|
21949
21953
|
step.displayTitle = _this.cf.setMiddleEllipsis(step.label, 132, 12);
|
|
21950
21954
|
}));
|
|
21955
|
+
this.syncUnlockedStep();
|
|
21956
|
+
};
|
|
21957
|
+
/**
|
|
21958
|
+
* @param {?} changes
|
|
21959
|
+
* @return {?}
|
|
21960
|
+
*/
|
|
21961
|
+
RSStepperComponent.prototype.ngOnChanges = /**
|
|
21962
|
+
* @param {?} changes
|
|
21963
|
+
* @return {?}
|
|
21964
|
+
*/
|
|
21965
|
+
function (changes) {
|
|
21966
|
+
if (changes["currentStep"] && !changes["currentStep"].firstChange) {
|
|
21967
|
+
this.syncUnlockedStep();
|
|
21968
|
+
}
|
|
21969
|
+
};
|
|
21970
|
+
// 同步unlockedStep的最大值
|
|
21971
|
+
// 同步unlockedStep的最大值
|
|
21972
|
+
/**
|
|
21973
|
+
* @private
|
|
21974
|
+
* @return {?}
|
|
21975
|
+
*/
|
|
21976
|
+
RSStepperComponent.prototype.syncUnlockedStep =
|
|
21977
|
+
// 同步unlockedStep的最大值
|
|
21978
|
+
/**
|
|
21979
|
+
* @private
|
|
21980
|
+
* @return {?}
|
|
21981
|
+
*/
|
|
21982
|
+
function () {
|
|
21983
|
+
if (this.currentStep > this.unlockedStep) {
|
|
21984
|
+
this.unlockedStep = this.currentStep;
|
|
21985
|
+
}
|
|
21951
21986
|
};
|
|
21952
21987
|
/**
|
|
21953
21988
|
* @param {?} step
|
|
@@ -21958,16 +21993,16 @@
|
|
|
21958
21993
|
* @return {?}
|
|
21959
21994
|
*/
|
|
21960
21995
|
function (step) {
|
|
21961
|
-
if (step.step
|
|
21996
|
+
if (step.step <= this.unlockedStep) {
|
|
21962
21997
|
this.currentStep = step.step;
|
|
21963
21998
|
this.stepClick.emit(step);
|
|
21964
21999
|
}
|
|
21965
22000
|
};
|
|
21966
22001
|
RSStepperComponent.decorators = [
|
|
21967
22002
|
{ type: core.Component, args: [{
|
|
21968
|
-
selector:
|
|
21969
|
-
template: "<div class=\"rs-stepper\">\r\n <div class=\"steps-wrap\">\r\n <ng-container *ngFor=\"let item of steps\">\r\n <div\r\n class=\"step\"\r\n [ngClass]=\"{\r\n done: item.step
|
|
21970
|
-
styles: [".rs-stepper{font-family:Arial;width:100%;border-bottom:1px solid var(--rs-border-color)}.rs-stepper .steps-wrap{display:flex;align-items:center;justify-content:space-between;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;gap:8px}.rs-stepper .steps-wrap .step{flex:1
|
|
22003
|
+
selector: "rs-stepper",
|
|
22004
|
+
template: "<div class=\"rs-stepper\">\r\n <div class=\"steps-wrap\">\r\n <ng-container *ngFor=\"let item of steps\">\r\n <div\r\n class=\"step\"\r\n [ngClass]=\"{\r\n done: item.step <= unlockedStep,\r\n active: item.step === currentStep\r\n }\"\r\n (click)=\"onStepClick(item)\"\r\n >\r\n <div\r\n class=\"step-label\"\r\n [matTooltip]=\"item.label !== item.displayTitle ? item.label : ''\"\r\n matTooltipPosition=\"above\"\r\n >\r\n {{ item.displayTitle }}\r\n </div>\r\n </div>\r\n <div class=\"step-arrow\" *ngIf=\"item.step !== steps.length - 1\">\r\n <img src=\"/assets/img/step-arrow.svg\" />\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n",
|
|
22005
|
+
styles: [".rs-stepper{font-family:Arial;width:100%;border-bottom:1px solid var(--rs-border-color)}.rs-stepper .steps-wrap{display:flex;align-items:center;justify-content:space-between;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;gap:8px}.rs-stepper .steps-wrap .step{flex:1}.rs-stepper .steps-wrap .step .step-label{color:var(--rs-labels-color);font-size:12px;font-weight:400;line-height:22px;text-align:center;white-space:nowrap;padding:0 12px 12px}.rs-stepper .steps-wrap .step.done{cursor:pointer}.rs-stepper .steps-wrap .step.done .step-label{color:var(--rs-active-labels-color)}.rs-stepper .steps-wrap .step.active .step-label{color:var(--rs-active-labels-color);font-weight:700;border-bottom:1px solid var(--rs-active-labels-color)}.rs-stepper .steps-wrap .step-arrow{padding:4px;align-self:flex-start}"]
|
|
21971
22006
|
}] }
|
|
21972
22007
|
];
|
|
21973
22008
|
/** @nocollapse */
|
|
@@ -21977,7 +22012,8 @@
|
|
|
21977
22012
|
RSStepperComponent.propDecorators = {
|
|
21978
22013
|
steps: [{ type: core.Input }],
|
|
21979
22014
|
currentStep: [{ type: core.Input }],
|
|
21980
|
-
stepClick: [{ type: core.Output }]
|
|
22015
|
+
stepClick: [{ type: core.Output }],
|
|
22016
|
+
unlockedStep: [{ type: core.Input }]
|
|
21981
22017
|
};
|
|
21982
22018
|
return RSStepperComponent;
|
|
21983
22019
|
}());
|
|
@@ -21989,6 +22025,8 @@
|
|
|
21989
22025
|
/** @type {?} */
|
|
21990
22026
|
RSStepperComponent.prototype.stepClick;
|
|
21991
22027
|
/** @type {?} */
|
|
22028
|
+
RSStepperComponent.prototype.unlockedStep;
|
|
22029
|
+
/** @type {?} */
|
|
21992
22030
|
RSStepperComponent.prototype.cf;
|
|
21993
22031
|
}
|
|
21994
22032
|
|