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
|
@@ -21740,11 +21740,15 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21740
21740
|
this.steps = [];
|
|
21741
21741
|
this.currentStep = 0;
|
|
21742
21742
|
this.stepClick = new EventEmitter();
|
|
21743
|
+
this.unlockedStep = 0; //已解锁的最大步骤
|
|
21743
21744
|
}
|
|
21745
|
+
//已解锁的最大步骤
|
|
21744
21746
|
/**
|
|
21745
21747
|
* @return {?}
|
|
21746
21748
|
*/
|
|
21747
|
-
RSStepperComponent.prototype.ngOnInit =
|
|
21749
|
+
RSStepperComponent.prototype.ngOnInit =
|
|
21750
|
+
//已解锁的最大步骤
|
|
21751
|
+
/**
|
|
21748
21752
|
* @return {?}
|
|
21749
21753
|
*/
|
|
21750
21754
|
function () {
|
|
@@ -21756,6 +21760,37 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21756
21760
|
function (step) {
|
|
21757
21761
|
step.displayTitle = _this.cf.setMiddleEllipsis(step.label, 132, 12);
|
|
21758
21762
|
}));
|
|
21763
|
+
this.syncUnlockedStep();
|
|
21764
|
+
};
|
|
21765
|
+
/**
|
|
21766
|
+
* @param {?} changes
|
|
21767
|
+
* @return {?}
|
|
21768
|
+
*/
|
|
21769
|
+
RSStepperComponent.prototype.ngOnChanges = /**
|
|
21770
|
+
* @param {?} changes
|
|
21771
|
+
* @return {?}
|
|
21772
|
+
*/
|
|
21773
|
+
function (changes) {
|
|
21774
|
+
if (changes["currentStep"] && !changes["currentStep"].firstChange) {
|
|
21775
|
+
this.syncUnlockedStep();
|
|
21776
|
+
}
|
|
21777
|
+
};
|
|
21778
|
+
// 同步unlockedStep的最大值
|
|
21779
|
+
// 同步unlockedStep的最大值
|
|
21780
|
+
/**
|
|
21781
|
+
* @private
|
|
21782
|
+
* @return {?}
|
|
21783
|
+
*/
|
|
21784
|
+
RSStepperComponent.prototype.syncUnlockedStep =
|
|
21785
|
+
// 同步unlockedStep的最大值
|
|
21786
|
+
/**
|
|
21787
|
+
* @private
|
|
21788
|
+
* @return {?}
|
|
21789
|
+
*/
|
|
21790
|
+
function () {
|
|
21791
|
+
if (this.currentStep > this.unlockedStep) {
|
|
21792
|
+
this.unlockedStep = this.currentStep;
|
|
21793
|
+
}
|
|
21759
21794
|
};
|
|
21760
21795
|
/**
|
|
21761
21796
|
* @param {?} step
|
|
@@ -21766,16 +21801,16 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21766
21801
|
* @return {?}
|
|
21767
21802
|
*/
|
|
21768
21803
|
function (step) {
|
|
21769
|
-
if (step.step
|
|
21804
|
+
if (step.step <= this.unlockedStep) {
|
|
21770
21805
|
this.currentStep = step.step;
|
|
21771
21806
|
this.stepClick.emit(step);
|
|
21772
21807
|
}
|
|
21773
21808
|
};
|
|
21774
21809
|
RSStepperComponent.decorators = [
|
|
21775
21810
|
{ type: Component, args: [{
|
|
21776
|
-
selector:
|
|
21777
|
-
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
|
|
21778
|
-
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
|
|
21811
|
+
selector: "rs-stepper",
|
|
21812
|
+
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",
|
|
21813
|
+
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}"]
|
|
21779
21814
|
}] }
|
|
21780
21815
|
];
|
|
21781
21816
|
/** @nocollapse */
|
|
@@ -21785,7 +21820,8 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21785
21820
|
RSStepperComponent.propDecorators = {
|
|
21786
21821
|
steps: [{ type: Input }],
|
|
21787
21822
|
currentStep: [{ type: Input }],
|
|
21788
|
-
stepClick: [{ type: Output }]
|
|
21823
|
+
stepClick: [{ type: Output }],
|
|
21824
|
+
unlockedStep: [{ type: Input }]
|
|
21789
21825
|
};
|
|
21790
21826
|
return RSStepperComponent;
|
|
21791
21827
|
}());
|
|
@@ -21797,6 +21833,8 @@ if (false) {
|
|
|
21797
21833
|
/** @type {?} */
|
|
21798
21834
|
RSStepperComponent.prototype.stepClick;
|
|
21799
21835
|
/** @type {?} */
|
|
21836
|
+
RSStepperComponent.prototype.unlockedStep;
|
|
21837
|
+
/** @type {?} */
|
|
21800
21838
|
RSStepperComponent.prototype.cf;
|
|
21801
21839
|
}
|
|
21802
21840
|
|