raise-common-lib 0.0.202 → 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 +153 -100
- 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/form/drawer-form/drawer-form.component.js +1 -1
- package/esm2015/lib/layout/page-list/index.component.js +14 -2
- package/esm2015/lib/layout/rs-stepper/index.component.js +34 -9
- package/esm5/lib/form/drawer-form/drawer-form.component.js +1 -1
- package/esm5/lib/layout/page-list/index.component.js +18 -2
- package/esm5/lib/layout/rs-stepper/index.component.js +47 -9
- package/fesm2015/raise-common-lib.js +121 -85
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +153 -100
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/page-list/index.component.d.ts +3 -0
- package/lib/layout/rs-stepper/index.component.d.ts +6 -3
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -647,7 +647,7 @@ DrawerFormComponent.decorators = [
|
|
|
647
647
|
{ type: Component, args: [{
|
|
648
648
|
selector: "rs-drawer-form",
|
|
649
649
|
template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format || numberFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n #dropdown\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (dataBound)=\"onDropdownDataBound($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [(value)]=\"dateForm[field.formKey]\"\r\n [format]=\"field.format || dateFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
|
|
650
|
-
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{
|
|
650
|
+
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{display:flex;flex-flow:column nowrap;max-width:1576px;flex:1;width:0}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
|
|
651
651
|
}] }
|
|
652
652
|
];
|
|
653
653
|
/** @nocollapse */
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
5
|
*/
|
|
6
6
|
// 组件类
|
|
7
|
-
import { Component, ContentChild, EventEmitter, Input, Output, } from "@angular/core";
|
|
7
|
+
import { Component, ContentChild, EventEmitter, Input, Output, ViewChild, } from "@angular/core";
|
|
8
8
|
import { CommonGridComponent } from "../../common-grid/index.component";
|
|
9
9
|
import { GridComponent } from "@syncfusion/ej2-angular-grids";
|
|
10
10
|
import { TreeGridComponent } from "@syncfusion/ej2-angular-treegrid";
|
|
11
|
+
import { SearchInputComponent } from "../../form/search-input/index.component";
|
|
11
12
|
export class RsPageListComponent {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.customPageTitle = false;
|
|
@@ -37,6 +38,14 @@ export class RsPageListComponent {
|
|
|
37
38
|
this.hasWholeToolbarSlot = !!this.wholeToolbarSlot;
|
|
38
39
|
this.hasLeftContentSlot = !!this.leftContentSlot;
|
|
39
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @param {?} value
|
|
43
|
+
* @return {?}
|
|
44
|
+
*/
|
|
45
|
+
setSearchValue(value) {
|
|
46
|
+
this.searchInput.searchValue = value;
|
|
47
|
+
this.onSeach(value);
|
|
48
|
+
}
|
|
40
49
|
/**
|
|
41
50
|
* @param {?} value
|
|
42
51
|
* @return {?}
|
|
@@ -68,6 +77,7 @@ RsPageListComponent.propDecorators = {
|
|
|
68
77
|
orignGrid: [{ type: ContentChild, args: [GridComponent, { static: false },] }],
|
|
69
78
|
treeGrid: [{ type: ContentChild, args: [TreeGridComponent, { static: false },] }],
|
|
70
79
|
wholeToolbarSlot: [{ type: ContentChild, args: ["wholeToolbarSlot", { static: false },] }],
|
|
80
|
+
searchInput: [{ type: ViewChild, args: ["searchInput", { static: false },] }],
|
|
71
81
|
leftContentSlot: [{ type: ContentChild, args: ["leftContentSlot", { static: false },] }],
|
|
72
82
|
pageTitle: [{ type: Input }],
|
|
73
83
|
customPageTitle: [{ type: Input }],
|
|
@@ -85,6 +95,8 @@ if (false) {
|
|
|
85
95
|
/** @type {?} */
|
|
86
96
|
RsPageListComponent.prototype.wholeToolbarSlot;
|
|
87
97
|
/** @type {?} */
|
|
98
|
+
RsPageListComponent.prototype.searchInput;
|
|
99
|
+
/** @type {?} */
|
|
88
100
|
RsPageListComponent.prototype.leftContentSlot;
|
|
89
101
|
/** @type {?} */
|
|
90
102
|
RsPageListComponent.prototype.pageTitle;
|
|
@@ -103,4 +115,4 @@ if (false) {
|
|
|
103
115
|
/** @type {?} */
|
|
104
116
|
RsPageListComponent.prototype.translation;
|
|
105
117
|
}
|
|
106
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
118
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9sYXlvdXQvcGFnZS1saXN0L2luZGV4LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSxPQUFPLEVBRUwsU0FBUyxFQUNULFlBQVksRUFDWixZQUFZLEVBQ1osS0FBSyxFQUVMLE1BQU0sRUFDTixTQUFTLEdBQ1YsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sbUNBQW1DLENBQUM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pcy5vbkdyaWRTZWFyY2guZW1pdCh2YWx1ZSk7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
5
|
*/
|
|
6
6
|
// 组件类
|
|
7
|
-
import { Component, EventEmitter, Input, Output, } from
|
|
8
|
-
import { CommonFunctionService } from
|
|
7
|
+
import { Component, EventEmitter, Input, Output, } from "@angular/core";
|
|
8
|
+
import { CommonFunctionService } from "../../service/common-function.service";
|
|
9
9
|
export class RSStepperComponent {
|
|
10
10
|
/**
|
|
11
11
|
* @param {?} cf
|
|
@@ -15,7 +15,9 @@ export class RSStepperComponent {
|
|
|
15
15
|
this.steps = [];
|
|
16
16
|
this.currentStep = 0;
|
|
17
17
|
this.stepClick = new EventEmitter();
|
|
18
|
+
this.unlockedStep = 0; //已解锁的最大步骤
|
|
18
19
|
}
|
|
20
|
+
//已解锁的最大步骤
|
|
19
21
|
/**
|
|
20
22
|
* @return {?}
|
|
21
23
|
*/
|
|
@@ -24,16 +26,36 @@ export class RSStepperComponent {
|
|
|
24
26
|
* @param {?} step
|
|
25
27
|
* @return {?}
|
|
26
28
|
*/
|
|
27
|
-
step => {
|
|
29
|
+
(step) => {
|
|
28
30
|
step.displayTitle = this.cf.setMiddleEllipsis(step.label, 132, 12);
|
|
29
31
|
}));
|
|
32
|
+
this.syncUnlockedStep();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @param {?} changes
|
|
36
|
+
* @return {?}
|
|
37
|
+
*/
|
|
38
|
+
ngOnChanges(changes) {
|
|
39
|
+
if (changes["currentStep"] && !changes["currentStep"].firstChange) {
|
|
40
|
+
this.syncUnlockedStep();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// 同步unlockedStep的最大值
|
|
44
|
+
/**
|
|
45
|
+
* @private
|
|
46
|
+
* @return {?}
|
|
47
|
+
*/
|
|
48
|
+
syncUnlockedStep() {
|
|
49
|
+
if (this.currentStep > this.unlockedStep) {
|
|
50
|
+
this.unlockedStep = this.currentStep;
|
|
51
|
+
}
|
|
30
52
|
}
|
|
31
53
|
/**
|
|
32
54
|
* @param {?} step
|
|
33
55
|
* @return {?}
|
|
34
56
|
*/
|
|
35
57
|
onStepClick(step) {
|
|
36
|
-
if (step.step
|
|
58
|
+
if (step.step <= this.unlockedStep) {
|
|
37
59
|
this.currentStep = step.step;
|
|
38
60
|
this.stepClick.emit(step);
|
|
39
61
|
}
|
|
@@ -41,9 +63,9 @@ export class RSStepperComponent {
|
|
|
41
63
|
}
|
|
42
64
|
RSStepperComponent.decorators = [
|
|
43
65
|
{ type: Component, args: [{
|
|
44
|
-
selector:
|
|
45
|
-
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
|
|
46
|
-
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
|
|
66
|
+
selector: "rs-stepper",
|
|
67
|
+
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",
|
|
68
|
+
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}"]
|
|
47
69
|
}] }
|
|
48
70
|
];
|
|
49
71
|
/** @nocollapse */
|
|
@@ -53,7 +75,8 @@ RSStepperComponent.ctorParameters = () => [
|
|
|
53
75
|
RSStepperComponent.propDecorators = {
|
|
54
76
|
steps: [{ type: Input }],
|
|
55
77
|
currentStep: [{ type: Input }],
|
|
56
|
-
stepClick: [{ type: Output }]
|
|
78
|
+
stepClick: [{ type: Output }],
|
|
79
|
+
unlockedStep: [{ type: Input }]
|
|
57
80
|
};
|
|
58
81
|
if (false) {
|
|
59
82
|
/** @type {?} */
|
|
@@ -63,6 +86,8 @@ if (false) {
|
|
|
63
86
|
/** @type {?} */
|
|
64
87
|
RSStepperComponent.prototype.stepClick;
|
|
65
88
|
/** @type {?} */
|
|
89
|
+
RSStepperComponent.prototype.unlockedStep;
|
|
90
|
+
/** @type {?} */
|
|
66
91
|
RSStepperComponent.prototype.cf;
|
|
67
92
|
}
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
93
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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1wiY3VycmVudFN0ZXBcIl0gJiYgIWNoYW5nZXNbXCJjdXJyZW50U3RlcFwiXS5maXJzdENoYW5nZSkge1xyXG4gICAgICB0aGlzLnN5bmNVbmxvY2tlZFN0ZXAoKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8vIOWQjOatpXVubG9ja2VkU3RlcOeahOacgOWkp+WAvFxyXG4gIHByaXZhdGUgc3luY1VubG9ja2VkU3RlcCgpIHtcclxuICAgIGlmICh0aGlzLmN1cnJlbnRTdGVwID4gdGhpcy51bmxvY2tlZFN0ZXApIHtcclxuICAgICAgdGhpcy51bmxvY2tlZFN0ZXAgPSB0aGlzLmN1cnJlbnRTdGVwO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgb25TdGVwQ2xpY2soc3RlcDogU3RlcEl0ZW0pIHtcclxuICAgIGlmIChzdGVwLnN0ZXAgPD0gdGhpcy51bmxvY2tlZFN0ZXApIHtcclxuICAgICAgdGhpcy5jdXJyZW50U3RlcCA9IHN0ZXAuc3RlcDtcclxuICAgICAgdGhpcy5zdGVwQ2xpY2suZW1pdChzdGVwKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
|
@@ -808,7 +808,7 @@ var DrawerFormComponent = /** @class */ (function () {
|
|
|
808
808
|
{ type: Component, args: [{
|
|
809
809
|
selector: "rs-drawer-form",
|
|
810
810
|
template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format || numberFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n #dropdown\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (dataBound)=\"onDropdownDataBound($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [(value)]=\"dateForm[field.formKey]\"\r\n [format]=\"field.format || dateFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
|
|
811
|
-
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{
|
|
811
|
+
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{display:flex;flex-flow:column nowrap;max-width:1576px;flex:1;width:0}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
|
|
812
812
|
}] }
|
|
813
813
|
];
|
|
814
814
|
/** @nocollapse */
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
5
|
*/
|
|
6
6
|
// 组件类
|
|
7
|
-
import { Component, ContentChild, EventEmitter, Input, Output, } from "@angular/core";
|
|
7
|
+
import { Component, ContentChild, EventEmitter, Input, Output, ViewChild, } from "@angular/core";
|
|
8
8
|
import { CommonGridComponent } from "../../common-grid/index.component";
|
|
9
9
|
import { GridComponent } from "@syncfusion/ej2-angular-grids";
|
|
10
10
|
import { TreeGridComponent } from "@syncfusion/ej2-angular-treegrid";
|
|
11
|
+
import { SearchInputComponent } from "../../form/search-input/index.component";
|
|
11
12
|
var RsPageListComponent = /** @class */ (function () {
|
|
12
13
|
function RsPageListComponent() {
|
|
13
14
|
this.customPageTitle = false;
|
|
@@ -46,6 +47,18 @@ var RsPageListComponent = /** @class */ (function () {
|
|
|
46
47
|
this.hasWholeToolbarSlot = !!this.wholeToolbarSlot;
|
|
47
48
|
this.hasLeftContentSlot = !!this.leftContentSlot;
|
|
48
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* @param {?} value
|
|
52
|
+
* @return {?}
|
|
53
|
+
*/
|
|
54
|
+
RsPageListComponent.prototype.setSearchValue = /**
|
|
55
|
+
* @param {?} value
|
|
56
|
+
* @return {?}
|
|
57
|
+
*/
|
|
58
|
+
function (value) {
|
|
59
|
+
this.searchInput.searchValue = value;
|
|
60
|
+
this.onSeach(value);
|
|
61
|
+
};
|
|
49
62
|
/**
|
|
50
63
|
* @param {?} value
|
|
51
64
|
* @return {?}
|
|
@@ -80,6 +93,7 @@ var RsPageListComponent = /** @class */ (function () {
|
|
|
80
93
|
orignGrid: [{ type: ContentChild, args: [GridComponent, { static: false },] }],
|
|
81
94
|
treeGrid: [{ type: ContentChild, args: [TreeGridComponent, { static: false },] }],
|
|
82
95
|
wholeToolbarSlot: [{ type: ContentChild, args: ["wholeToolbarSlot", { static: false },] }],
|
|
96
|
+
searchInput: [{ type: ViewChild, args: ["searchInput", { static: false },] }],
|
|
83
97
|
leftContentSlot: [{ type: ContentChild, args: ["leftContentSlot", { static: false },] }],
|
|
84
98
|
pageTitle: [{ type: Input }],
|
|
85
99
|
customPageTitle: [{ type: Input }],
|
|
@@ -100,6 +114,8 @@ if (false) {
|
|
|
100
114
|
/** @type {?} */
|
|
101
115
|
RsPageListComponent.prototype.wholeToolbarSlot;
|
|
102
116
|
/** @type {?} */
|
|
117
|
+
RsPageListComponent.prototype.searchInput;
|
|
118
|
+
/** @type {?} */
|
|
103
119
|
RsPageListComponent.prototype.leftContentSlot;
|
|
104
120
|
/** @type {?} */
|
|
105
121
|
RsPageListComponent.prototype.pageTitle;
|
|
@@ -118,4 +134,4 @@ if (false) {
|
|
|
118
134
|
/** @type {?} */
|
|
119
135
|
RsPageListComponent.prototype.translation;
|
|
120
136
|
}
|
|
121
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
137
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9sYXlvdXQvcGFnZS1saXN0L2luZGV4LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSxPQUFPLEVBRUwsU0FBUyxFQ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3JpZENvbnRlbnQuZ3JpZC5zZWFyY2godmFsdWUpO1xyXG4gICAgfSBlbHNlIGlmICh0aGlzLm9yaWduR3JpZCkge1xyXG4gICAgICB0aGlzLm9yaWduR3JpZC5zZWFyY2godmFsdWUpO1xyXG4gICAgfSBlbHNlIGlmICh0aGlzLnRyZWVHcmlkKSB7XHJcbiAgICAgIHRoaXMudHJlZUdyaWQuc2VhcmNoKHZhbHVlKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIHRoaXMub25HcmlkU2VhcmNoLmVtaXQodmFsdWUpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -4,19 +4,23 @@
|
|
|
4
4
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
5
|
*/
|
|
6
6
|
// 组件类
|
|
7
|
-
import { Component, EventEmitter, Input, Output, } from
|
|
8
|
-
import { CommonFunctionService } from
|
|
7
|
+
import { Component, EventEmitter, Input, Output, } from "@angular/core";
|
|
8
|
+
import { CommonFunctionService } from "../../service/common-function.service";
|
|
9
9
|
var RSStepperComponent = /** @class */ (function () {
|
|
10
10
|
function RSStepperComponent(cf) {
|
|
11
11
|
this.cf = cf;
|
|
12
12
|
this.steps = [];
|
|
13
13
|
this.currentStep = 0;
|
|
14
14
|
this.stepClick = new EventEmitter();
|
|
15
|
+
this.unlockedStep = 0; //已解锁的最大步骤
|
|
15
16
|
}
|
|
17
|
+
//已解锁的最大步骤
|
|
16
18
|
/**
|
|
17
19
|
* @return {?}
|
|
18
20
|
*/
|
|
19
|
-
RSStepperComponent.prototype.ngOnInit =
|
|
21
|
+
RSStepperComponent.prototype.ngOnInit =
|
|
22
|
+
//已解锁的最大步骤
|
|
23
|
+
/**
|
|
20
24
|
* @return {?}
|
|
21
25
|
*/
|
|
22
26
|
function () {
|
|
@@ -28,6 +32,37 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
28
32
|
function (step) {
|
|
29
33
|
step.displayTitle = _this.cf.setMiddleEllipsis(step.label, 132, 12);
|
|
30
34
|
}));
|
|
35
|
+
this.syncUnlockedStep();
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @param {?} changes
|
|
39
|
+
* @return {?}
|
|
40
|
+
*/
|
|
41
|
+
RSStepperComponent.prototype.ngOnChanges = /**
|
|
42
|
+
* @param {?} changes
|
|
43
|
+
* @return {?}
|
|
44
|
+
*/
|
|
45
|
+
function (changes) {
|
|
46
|
+
if (changes["currentStep"] && !changes["currentStep"].firstChange) {
|
|
47
|
+
this.syncUnlockedStep();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// 同步unlockedStep的最大值
|
|
51
|
+
// 同步unlockedStep的最大值
|
|
52
|
+
/**
|
|
53
|
+
* @private
|
|
54
|
+
* @return {?}
|
|
55
|
+
*/
|
|
56
|
+
RSStepperComponent.prototype.syncUnlockedStep =
|
|
57
|
+
// 同步unlockedStep的最大值
|
|
58
|
+
/**
|
|
59
|
+
* @private
|
|
60
|
+
* @return {?}
|
|
61
|
+
*/
|
|
62
|
+
function () {
|
|
63
|
+
if (this.currentStep > this.unlockedStep) {
|
|
64
|
+
this.unlockedStep = this.currentStep;
|
|
65
|
+
}
|
|
31
66
|
};
|
|
32
67
|
/**
|
|
33
68
|
* @param {?} step
|
|
@@ -38,16 +73,16 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
38
73
|
* @return {?}
|
|
39
74
|
*/
|
|
40
75
|
function (step) {
|
|
41
|
-
if (step.step
|
|
76
|
+
if (step.step <= this.unlockedStep) {
|
|
42
77
|
this.currentStep = step.step;
|
|
43
78
|
this.stepClick.emit(step);
|
|
44
79
|
}
|
|
45
80
|
};
|
|
46
81
|
RSStepperComponent.decorators = [
|
|
47
82
|
{ type: Component, args: [{
|
|
48
|
-
selector:
|
|
49
|
-
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
|
|
50
|
-
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
|
|
83
|
+
selector: "rs-stepper",
|
|
84
|
+
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",
|
|
85
|
+
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}"]
|
|
51
86
|
}] }
|
|
52
87
|
];
|
|
53
88
|
/** @nocollapse */
|
|
@@ -57,7 +92,8 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
57
92
|
RSStepperComponent.propDecorators = {
|
|
58
93
|
steps: [{ type: Input }],
|
|
59
94
|
currentStep: [{ type: Input }],
|
|
60
|
-
stepClick: [{ type: Output }]
|
|
95
|
+
stepClick: [{ type: Output }],
|
|
96
|
+
unlockedStep: [{ type: Input }]
|
|
61
97
|
};
|
|
62
98
|
return RSStepperComponent;
|
|
63
99
|
}());
|
|
@@ -70,6 +106,8 @@ if (false) {
|
|
|
70
106
|
/** @type {?} */
|
|
71
107
|
RSStepperComponent.prototype.stepClick;
|
|
72
108
|
/** @type {?} */
|
|
109
|
+
RSStepperComponent.prototype.unlockedStep;
|
|
110
|
+
/** @type {?} */
|
|
73
111
|
RSStepperComponent.prototype.cf;
|
|
74
112
|
}
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9sYXlvdXQvcnMtc3RlcHBlci9pbmRleC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EsT0FBTyxFQUNMLFNBQVMsRUFDVCxZQUFZLEVBQ1osS0FBSyxFQUVMLE1BQU0sR0FFUCxNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUU5RTtJQVFFLDRCQUFtQixFQUF5QjtRQUF6QixPQUFFLEdBQUYsRUFBRSxDQUF1QjtRQUZuQyxVQUFLLEdBQWUsRUFBRSxDQUFDO1FBQ3ZCLGdCQUFXLEdBQVcsQ0FBQyxDQUFDO1FBRXZCLGN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