raise-common-lib 0.0.237-beta → 0.0.238-beta
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 +144 -44
- 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/actions/toolbar-item/index.component.js +1 -1
- package/esm2015/lib/layout/drawer/index.component.js +67 -13
- package/esm2015/lib/layout/rs-stepper/constants.js +1 -1
- package/esm2015/lib/layout/rs-stepper/index.component.js +39 -21
- package/esm2015/lib/service/drawer.service.js +27 -10
- package/esm5/lib/actions/toolbar-item/index.component.js +1 -1
- package/esm5/lib/layout/drawer/index.component.js +79 -14
- package/esm5/lib/layout/rs-stepper/constants.js +1 -1
- package/esm5/lib/layout/rs-stepper/index.component.js +40 -22
- package/esm5/lib/service/drawer.service.js +28 -10
- package/fesm2015/raise-common-lib.js +131 -42
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +145 -45
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/drawer/index.component.d.ts +3 -1
- package/lib/layout/rs-stepper/constants.d.ts +2 -0
- package/lib/layout/rs-stepper/index.component.d.ts +4 -2
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __decorate, __metadata, __read, __values
|
|
1
|
+
import { __assign, __awaiter, __generator, __decorate, __metadata, __spread, __read, __values } from 'tslib';
|
|
2
2
|
import { EventEmitter, Component, ChangeDetectorRef, ViewChild, Input, Output, HostBinding, Injectable, ɵɵdefineInjectable, Inject, ɵɵinject, ContentChild, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChildren, ElementRef, InjectionToken, Optional, ChangeDetectionStrategy, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import { GridComponent, ExcelExportService, ColumnChooserService, VirtualScrollService, FilterService, ResizeService, GridModule, PagerModule, GridAllModule, PageService, RowDDService, SortService, EditService, ToolbarService as ToolbarService$1, AggregateService, ColumnMenuService, DetailRowService, SelectionService, GroupService } from '@syncfusion/ej2-angular-grids';
|
|
4
4
|
import { times, debounce as debounce$1, forEach, throttle, find, cloneDeep, startsWith, filter as filter$1, meanBy, sumBy, minBy, maxBy, sortBy, uniqBy, differenceWith, mean } from 'lodash';
|
|
@@ -3247,9 +3247,7 @@ var DrawerService = /** @class */ (function () {
|
|
|
3247
3247
|
if (data === void 0) { data = {}; }
|
|
3248
3248
|
/** @type {?} */
|
|
3249
3249
|
var drawer = this.uniqueDrawerComponent;
|
|
3250
|
-
if (!this.checkChange("show", { component: component, config: config, data: data }) ||
|
|
3251
|
-
!drawer ||
|
|
3252
|
-
drawer.isOpened) {
|
|
3250
|
+
if (!this.checkChange("show", { component: component, config: config, data: data }) || !drawer) {
|
|
3253
3251
|
return {
|
|
3254
3252
|
instance: null,
|
|
3255
3253
|
result: null,
|
|
@@ -3264,14 +3262,29 @@ var DrawerService = /** @class */ (function () {
|
|
|
3264
3262
|
function (resolve) {
|
|
3265
3263
|
/** @type {?} */
|
|
3266
3264
|
var cacheKey = _this.cacheKey;
|
|
3267
|
-
|
|
3265
|
+
/** @type {?} */
|
|
3266
|
+
var resolves = _this.resultPromiseResolveMap.get(cacheKey) || [];
|
|
3267
|
+
/** @type {?} */
|
|
3268
|
+
var resolveFn = (/**
|
|
3268
3269
|
* @param {?} value
|
|
3269
3270
|
* @return {?}
|
|
3270
3271
|
*/
|
|
3271
3272
|
function (value) {
|
|
3272
3273
|
resolve(value);
|
|
3273
|
-
|
|
3274
|
-
|
|
3274
|
+
/** @type {?} */
|
|
3275
|
+
var caches = _this.resultPromiseResolveMap.get(cacheKey) || [];
|
|
3276
|
+
/** @type {?} */
|
|
3277
|
+
var index = caches.findIndex((/**
|
|
3278
|
+
* @param {?} cache
|
|
3279
|
+
* @return {?}
|
|
3280
|
+
*/
|
|
3281
|
+
function (cache) { return cache === resolveFn; }));
|
|
3282
|
+
caches.splice(index, 1);
|
|
3283
|
+
if (index === 0) {
|
|
3284
|
+
_this.resultPromiseResolveMap.delete(cacheKey);
|
|
3285
|
+
}
|
|
3286
|
+
});
|
|
3287
|
+
_this.resultPromiseResolveMap.set(cacheKey, __spread(resolves, [resolveFn]));
|
|
3275
3288
|
})),
|
|
3276
3289
|
};
|
|
3277
3290
|
};
|
|
@@ -3285,7 +3298,9 @@ var DrawerService = /** @class */ (function () {
|
|
|
3285
3298
|
/** @type {?} */
|
|
3286
3299
|
var drawer = this.uniqueDrawerComponent;
|
|
3287
3300
|
/** @type {?} */
|
|
3288
|
-
var
|
|
3301
|
+
var resolves = this.resultPromiseResolveMap.get(this.cacheKey) || [];
|
|
3302
|
+
/** @type {?} */
|
|
3303
|
+
var resolve = resolves.slice(-1)[0];
|
|
3289
3304
|
if (resolve && this.checkChange("hide")) {
|
|
3290
3305
|
resolve({ type: "hide" });
|
|
3291
3306
|
drawer && drawer.back();
|
|
@@ -3303,7 +3318,9 @@ var DrawerService = /** @class */ (function () {
|
|
|
3303
3318
|
/** @type {?} */
|
|
3304
3319
|
var drawer = this.uniqueDrawerComponent;
|
|
3305
3320
|
/** @type {?} */
|
|
3306
|
-
var
|
|
3321
|
+
var resolves = this.resultPromiseResolveMap.get(this.cacheKey) || [];
|
|
3322
|
+
/** @type {?} */
|
|
3323
|
+
var resolve = resolves.slice(-1)[0];
|
|
3307
3324
|
if (resolve && this.checkChange("complete", { data: data })) {
|
|
3308
3325
|
resolve({ type: "complete", data: data });
|
|
3309
3326
|
drawer && drawer.back();
|
|
@@ -3333,7 +3350,7 @@ var DrawerService = /** @class */ (function () {
|
|
|
3333
3350
|
function (cacheKey) {
|
|
3334
3351
|
/** @type {?} */
|
|
3335
3352
|
var drawer = this.uniqueDrawerComponent;
|
|
3336
|
-
drawer && drawer.
|
|
3353
|
+
drawer && drawer.deleteAllCache(cacheKey);
|
|
3337
3354
|
this.resultPromiseResolveMap.delete(cacheKey);
|
|
3338
3355
|
};
|
|
3339
3356
|
/**
|
|
@@ -4187,7 +4204,9 @@ var DrawerComponent = /** @class */ (function () {
|
|
|
4187
4204
|
*/
|
|
4188
4205
|
function (config) {
|
|
4189
4206
|
/** @type {?} */
|
|
4190
|
-
var
|
|
4207
|
+
var caches = this.componentRefMap.get(this.service.cacheKey) || [];
|
|
4208
|
+
/** @type {?} */
|
|
4209
|
+
var cache = caches.slice(-1)[0];
|
|
4191
4210
|
if (cache) {
|
|
4192
4211
|
cache.config = __assign({}, cache.config, config);
|
|
4193
4212
|
this.setCache(cache);
|
|
@@ -4226,10 +4245,15 @@ var DrawerComponent = /** @class */ (function () {
|
|
|
4226
4245
|
headerEl: headerEl,
|
|
4227
4246
|
topEl: topEl,
|
|
4228
4247
|
};
|
|
4248
|
+
/** @type {?} */
|
|
4249
|
+
var caches = this.componentRefMap.get(this.service.cacheKey) || [];
|
|
4250
|
+
this.componentRefMap.set(this.service.cacheKey, __spread(caches, [cache]));
|
|
4251
|
+
// 如果是第一个缓存,打开抽屉
|
|
4252
|
+
if (caches.length === 0) {
|
|
4253
|
+
this.toggleOpenStatus(true, true);
|
|
4254
|
+
}
|
|
4255
|
+
this.toggleCache(cache);
|
|
4229
4256
|
this.setComponentData(componentRef, data);
|
|
4230
|
-
this.componentRefMap.set(this.service.cacheKey, cache);
|
|
4231
|
-
this.setCache(cache);
|
|
4232
|
-
this.toggleOpenStatus(true, true);
|
|
4233
4257
|
return componentRef.instance;
|
|
4234
4258
|
};
|
|
4235
4259
|
/**
|
|
@@ -4249,43 +4273,101 @@ var DrawerComponent = /** @class */ (function () {
|
|
|
4249
4273
|
*/
|
|
4250
4274
|
function () {
|
|
4251
4275
|
this.deleteCache(this.service.cacheKey);
|
|
4252
|
-
|
|
4276
|
+
// 如果有上一个缓存,设置为当前缓存,否则关闭抽屉
|
|
4277
|
+
/** @type {?} */
|
|
4278
|
+
var caches = this.componentRefMap.get(this.service.cacheKey) || [];
|
|
4279
|
+
/** @type {?} */
|
|
4280
|
+
var cache = caches.slice(-1)[0];
|
|
4281
|
+
if (cache) {
|
|
4282
|
+
this.toggleCache(cache);
|
|
4283
|
+
}
|
|
4284
|
+
else {
|
|
4285
|
+
this.toggleOpenStatus(false, true);
|
|
4286
|
+
}
|
|
4253
4287
|
};
|
|
4254
4288
|
/**
|
|
4289
|
+
* @private
|
|
4255
4290
|
* @param {?} cacheKey
|
|
4256
4291
|
* @return {?}
|
|
4257
4292
|
*/
|
|
4258
4293
|
DrawerComponent.prototype.deleteCache = /**
|
|
4294
|
+
* @private
|
|
4259
4295
|
* @param {?} cacheKey
|
|
4260
4296
|
* @return {?}
|
|
4261
4297
|
*/
|
|
4262
4298
|
function (cacheKey) {
|
|
4263
4299
|
/** @type {?} */
|
|
4264
|
-
var
|
|
4300
|
+
var caches = this.componentRefMap.get(cacheKey) || [];
|
|
4301
|
+
/** @type {?} */
|
|
4302
|
+
var cache = caches.slice(-1)[0];
|
|
4265
4303
|
if (cache) {
|
|
4266
4304
|
this.destroyDynamicComponent(cache.ref);
|
|
4305
|
+
caches.pop();
|
|
4306
|
+
}
|
|
4307
|
+
if (caches.length === 0) {
|
|
4308
|
+
this.componentRefMap.delete(cacheKey);
|
|
4267
4309
|
}
|
|
4268
|
-
this.componentRefMap.delete(cacheKey);
|
|
4269
4310
|
};
|
|
4270
4311
|
/**
|
|
4312
|
+
* @private
|
|
4313
|
+
* @param {?} cache
|
|
4271
4314
|
* @return {?}
|
|
4272
4315
|
*/
|
|
4273
|
-
DrawerComponent.prototype.
|
|
4316
|
+
DrawerComponent.prototype.toggleCache = /**
|
|
4317
|
+
* @private
|
|
4318
|
+
* @param {?} cache
|
|
4274
4319
|
* @return {?}
|
|
4275
4320
|
*/
|
|
4276
|
-
function () {
|
|
4321
|
+
function (cache) {
|
|
4277
4322
|
this.componentRefMap.forEach((/**
|
|
4323
|
+
* @param {?} caches
|
|
4324
|
+
* @return {?}
|
|
4325
|
+
*/
|
|
4326
|
+
function (caches) {
|
|
4327
|
+
caches.forEach((/**
|
|
4328
|
+
* @param {?} c
|
|
4329
|
+
* @return {?}
|
|
4330
|
+
*/
|
|
4331
|
+
function (c) {
|
|
4332
|
+
c.ref.location.nativeElement.style.display = c === cache ? "" : "none";
|
|
4333
|
+
}));
|
|
4334
|
+
}));
|
|
4335
|
+
this.setCache(cache);
|
|
4336
|
+
};
|
|
4337
|
+
/**
|
|
4338
|
+
* @param {?} cacheKey
|
|
4339
|
+
* @return {?}
|
|
4340
|
+
*/
|
|
4341
|
+
DrawerComponent.prototype.deleteAllCache = /**
|
|
4342
|
+
* @param {?} cacheKey
|
|
4343
|
+
* @return {?}
|
|
4344
|
+
*/
|
|
4345
|
+
function (cacheKey) {
|
|
4346
|
+
var _this = this;
|
|
4347
|
+
/** @type {?} */
|
|
4348
|
+
var caches = this.componentRefMap.get(cacheKey) || [];
|
|
4349
|
+
caches.forEach((/**
|
|
4278
4350
|
* @param {?} cache
|
|
4279
4351
|
* @return {?}
|
|
4280
4352
|
*/
|
|
4281
4353
|
function (cache) {
|
|
4282
|
-
cache.ref
|
|
4354
|
+
_this.destroyDynamicComponent(cache.ref);
|
|
4283
4355
|
}));
|
|
4356
|
+
this.componentRefMap.delete(cacheKey);
|
|
4357
|
+
};
|
|
4358
|
+
/**
|
|
4359
|
+
* @return {?}
|
|
4360
|
+
*/
|
|
4361
|
+
DrawerComponent.prototype.onRouteChange = /**
|
|
4362
|
+
* @return {?}
|
|
4363
|
+
*/
|
|
4364
|
+
function () {
|
|
4365
|
+
/** @type {?} */
|
|
4366
|
+
var caches = this.componentRefMap.get(this.service.cacheKey) || [];
|
|
4284
4367
|
/** @type {?} */
|
|
4285
|
-
var cache =
|
|
4368
|
+
var cache = caches.slice(-1)[0];
|
|
4286
4369
|
if (cache) {
|
|
4287
|
-
cache
|
|
4288
|
-
this.setCache(cache);
|
|
4370
|
+
this.toggleCache(cache);
|
|
4289
4371
|
this.toggleOpenStatus(true);
|
|
4290
4372
|
}
|
|
4291
4373
|
else {
|
|
@@ -4654,7 +4736,7 @@ var ToolbarItemComponent = /** @class */ (function () {
|
|
|
4654
4736
|
{ type: Component, args: [{
|
|
4655
4737
|
selector: "rs-toolbar-item",
|
|
4656
4738
|
template: "<button\r\n *ngIf=\"!children.length\"\r\n class=\"toolbar-action-item e-btn text\"\r\n #buttonElement\r\n [disabled]=\"!!disabled\"\r\n>\r\n <span class=\"toolbar-action-image\" *ngIf=\"image\" [attr.data-type]=\"image\">\r\n <img *ngIf=\"!ImageType.includes(image)\" [src]=\"image\" />\r\n </span>\r\n <span>{{ text }}</span>\r\n</button>\r\n\r\n<button\r\n *ngIf=\"children.length\"\r\n class=\"toolbar-action-item e-btn text\"\r\n #buttonElement\r\n mat-menu-item\r\n [matMenuTriggerFor]=\"menu\"\r\n [disabled]=\"!!disabled\"\r\n>\r\n <span class=\"toolbar-action-image\" *ngIf=\"image\" [attr.data-type]=\"image\">\r\n <img *ngIf=\"!ImageType.includes(image)\" [src]=\"image\" />\r\n </span>\r\n <span>{{ text }}</span>\r\n <span class=\"toolbar-action-arrow\" *ngIf=\"!hideArrow\">\r\n <img src=\"assets/img/down-arrow.svg\" />\r\n </span>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" class=\"toolbar-action-menu-content\">\r\n <ng-container *ngFor=\"let button of children\">\r\n <button\r\n class=\"toolbar-action-item e-btn text\"\r\n [disabled]=\"(button.key && disabledOptions[button.key]) || false\"\r\n (click)=\"button.action()\"\r\n >\r\n <span\r\n class=\"toolbar-action-image\"\r\n *ngIf=\"button.image\"\r\n [attr.data-type]=\"button.image\"\r\n >\r\n <img *ngIf=\"!ImageType.includes(button.image)\" [src]=\"button.image\" />\r\n </span>\r\n <span>{{ button.text }}</span>\r\n </button>\r\n </ng-container>\r\n</mat-menu>\r\n",
|
|
4657
|
-
styles: ["rs-toolbar-item.disabled{pointer-events:none}.toolbar-action-item{padding:4px 8px;font-size:11px!important;line-height:24px!important
|
|
4739
|
+
styles: ["rs-toolbar-item.disabled{pointer-events:none}.toolbar-action-item{padding:4px 8px;font-size:11px!important;line-height:24px!important}.toolbar-action-item .toolbar-action-image{height:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}.toolbar-action-item .toolbar-action-image::before{display:block;width:16px;height:16px}.toolbar-action-item .toolbar-action-image[data-type=Add]::before{content:url(/assets/img/toolbar-action-add.svg)}.toolbar-action-item .toolbar-action-image[data-type=Delete]::before{content:url(/assets/img/toolbar-action-delete.svg)}.toolbar-action-item .toolbar-action-image[data-type=Import]::before{content:url(/assets/img/toolbar-action-import.svg)}.toolbar-action-item .toolbar-action-image[data-type=Upload]::before{content:url(/assets/img/toolbar-action-upload.svg)}.toolbar-action-item .toolbar-action-image[data-type=Download]::before{content:url(/assets/img/toolbar-action-download.svg)}.toolbar-action-item .toolbar-action-image[data-type=Export]::before{content:url(/assets/img/toolbar-action-export.svg)}.toolbar-action-item .toolbar-action-image[data-type=Duplicate]::before{content:url(/assets/img/toolbar-action-duplicate.svg)}.toolbar-action-item .toolbar-action-image[data-type=Refresh]::before{content:url(/assets/img/toolbar-action-refresh.svg)}.toolbar-action-item .toolbar-action-image[data-type=AddFolder]::before{content:url(/assets/img/toolbar-action-addFolder.svg)}.toolbar-action-item .toolbar-action-image[data-type=Collapse]::before{content:url(/assets/img/toolbar-action-collapse.svg)}.toolbar-action-item .toolbar-action-image[data-type=Combine]::before{content:url(/assets/img/toolbar-action-combine.svg)}.toolbar-action-item .toolbar-action-image[data-type=Edit]::before{content:url(/assets/img/toolbar-action-edit.svg)}.toolbar-action-item .toolbar-action-image[data-type=Lock]::before{content:url(/assets/img/toolbar-action-lock.svg)}.toolbar-action-item .toolbar-action-image[data-type=Expand]::before{content:url(/assets/img/toolbar-action-expand.svg)}.toolbar-action-item .toolbar-action-image[data-type=MoveTo]::before{content:url(/assets/img/toolbar-action-folderMove.svg)}.toolbar-action-item .toolbar-action-image[data-type=Publish]::before{content:url(/assets/img/toolbar-action-publish.svg)}.toolbar-action-item .toolbar-action-image[data-type=Preview]::before{content:url(/assets/img/toolbar-action-preview.svg)}.toolbar-action-item .toolbar-action-image[data-type=ReCalculate]::before{content:url(/assets/img/toolbar-action-calculator.svg)}.toolbar-action-item .toolbar-action-image[data-type=Sync]::before{content:url(/assets/img/toolbar-action-sync.svg)}.toolbar-action-item .toolbar-action-image[data-type=Share]::before{content:url(/assets/img/toolbar-action-share.svg)}.toolbar-action-item .toolbar-action-image[data-type=Rename]::before{content:url(/assets/img/toolbar-action-rename.svg)}.toolbar-action-item .toolbar-action-image[data-type=SaveSequence]::before{content:url(/assets/img/toolbar-action-saveSequence.svg)}.toolbar-action-item .toolbar-action-image[data-type=SubmitForApproval]::before{content:url(/assets/img/toolbar-action-submitForApproval.svg)}.toolbar-action-item .toolbar-action-image[data-type=SendToControlPanel]::before{content:url(/assets/img/toolbar-action-send-file.svg)}.toolbar-action-item .toolbar-action-image[data-type=SetReminders]::before{content:url(/assets/img/toolbar-action-reminders.svg)}.toolbar-action-item .toolbar-action-image[data-type=Settle]::before{content:url(/assets/img/toolbar-action-settle.svg)}.toolbar-action-item .toolbar-action-image[data-type=Template]::before{content:url(/assets/img/toolbar-action-template.svg)}.toolbar-action-item .toolbar-action-image[data-type=Workflow]::before{content:url(/assets/img/toolbar-action-workflow.svg)}.toolbar-action-item .toolbar-action-image[data-type=Update]::before{content:url(/assets/img/toolbar-action-update.svg)}.toolbar-action-item .toolbar-action-image[data-type=FetchData]::before{content:url(/assets/img/toolbar-action-fetchData.svg)}.toolbar-action-item .toolbar-action-image img{height:16px;display:block}.toolbar-action-item.e-btn{width:100%;min-width:auto!important;height:24px!important;justify-content:flex-start}.toolbar-action-item.mat-menu-item::after{display:none}::ng-deep .toolbar-action-menu-content.mat-menu-panel{border-radius:8px;background-color:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25)}::ng-deep .toolbar-action-menu-content.mat-menu-panel .mat-menu-content{padding:8px}"]
|
|
4658
4740
|
}] }
|
|
4659
4741
|
];
|
|
4660
4742
|
ToolbarItemComponent.propDecorators = {
|
|
@@ -21849,6 +21931,10 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21849
21931
|
this.ref = ref;
|
|
21850
21932
|
this.steps = [];
|
|
21851
21933
|
this.currentStep = 0;
|
|
21934
|
+
/**
|
|
21935
|
+
* Layout direction: 'horizontal' (default) or 'vertical'
|
|
21936
|
+
*/
|
|
21937
|
+
this.orientation = "horizontal";
|
|
21852
21938
|
this.stepClick = new EventEmitter();
|
|
21853
21939
|
this.unlockedStep = 0; //已解锁的最大步骤
|
|
21854
21940
|
this.showBtn = false;
|
|
@@ -21880,10 +21966,12 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21880
21966
|
*/
|
|
21881
21967
|
function () {
|
|
21882
21968
|
var _this = this;
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21969
|
+
if (this.orientation === "horizontal") {
|
|
21970
|
+
setTimeout((/**
|
|
21971
|
+
* @return {?}
|
|
21972
|
+
*/
|
|
21973
|
+
function () { return _this.checkBtnShow(true); }));
|
|
21974
|
+
}
|
|
21887
21975
|
};
|
|
21888
21976
|
/**
|
|
21889
21977
|
* @param {?} changes
|
|
@@ -21897,14 +21985,16 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21897
21985
|
var _this = this;
|
|
21898
21986
|
if (changes["currentStep"] && !changes["currentStep"].firstChange) {
|
|
21899
21987
|
this.syncUnlockedStep();
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21988
|
+
if (this.orientation === "horizontal") {
|
|
21989
|
+
setTimeout((/**
|
|
21990
|
+
* @return {?}
|
|
21991
|
+
*/
|
|
21992
|
+
function () { return _this.scrollToStep(); }));
|
|
21993
|
+
}
|
|
21905
21994
|
}
|
|
21906
|
-
if (
|
|
21907
|
-
changes["
|
|
21995
|
+
if (this.orientation === "horizontal" &&
|
|
21996
|
+
((changes["steps"] && changes["steps"].currentValue) ||
|
|
21997
|
+
changes["currentStep"])) {
|
|
21908
21998
|
setTimeout((/**
|
|
21909
21999
|
* @return {?}
|
|
21910
22000
|
*/
|
|
@@ -21943,10 +22033,12 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
21943
22033
|
if (step.step <= this.unlockedStep) {
|
|
21944
22034
|
this.currentStep = step.step;
|
|
21945
22035
|
this.stepClick.emit(step);
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
22036
|
+
if (this.orientation === "horizontal") {
|
|
22037
|
+
setTimeout((/**
|
|
22038
|
+
* @return {?}
|
|
22039
|
+
*/
|
|
22040
|
+
function () { return _this.scrollToStep(index); }));
|
|
22041
|
+
}
|
|
21950
22042
|
}
|
|
21951
22043
|
};
|
|
21952
22044
|
/**
|
|
@@ -22006,15 +22098,17 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
22006
22098
|
this.onScroll();
|
|
22007
22099
|
};
|
|
22008
22100
|
/**
|
|
22009
|
-
* @param {?}
|
|
22101
|
+
* @param {?} _event
|
|
22010
22102
|
* @return {?}
|
|
22011
22103
|
*/
|
|
22012
22104
|
RSStepperComponent.prototype.onResize = /**
|
|
22013
|
-
* @param {?}
|
|
22105
|
+
* @param {?} _event
|
|
22014
22106
|
* @return {?}
|
|
22015
22107
|
*/
|
|
22016
|
-
function (
|
|
22017
|
-
this.
|
|
22108
|
+
function (_event) {
|
|
22109
|
+
if (this.orientation === "horizontal") {
|
|
22110
|
+
this.checkBtnShow();
|
|
22111
|
+
}
|
|
22018
22112
|
};
|
|
22019
22113
|
/**
|
|
22020
22114
|
* @param {?=} init
|
|
@@ -22093,8 +22187,8 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
22093
22187
|
RSStepperComponent.decorators = [
|
|
22094
22188
|
{ type: Component, args: [{
|
|
22095
22189
|
selector: "rs-stepper",
|
|
22096
|
-
template: "<div class=\"rs-stepper\">\r\n <div class=\"steps-wrap\">\r\n
|
|
22097
|
-
styles: [".rs-stepper{font-family:Arial;width:100
|
|
22190
|
+
template: "<div class=\"rs-stepper\" [ngClass]=\"{ 'rs-stepper--vertical': orientation === 'vertical' }\">\r\n <!-- Horizontal stepper -->\r\n <ng-container *ngIf=\"orientation === 'horizontal'\">\r\n <div class=\"steps-wrap\">\r\n <div\r\n class=\"row-btn\"\r\n [class.hidden]=\"isAtStart || !showBtn\"\r\n (click)=\"scrollLeft()\"\r\n >\r\n <div class=\"hover\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"17\"\r\n height=\"16\"\r\n viewBox=\"0 0 17 16\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M10.4995 3.99955L7.24219 8.24219L10.4995 12.4848\"\r\n stroke=\"#1F7BFF\"\r\n />\r\n </svg>\r\n </div>\r\n <div class=\"normal\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"17\"\r\n height=\"16\"\r\n viewBox=\"0 0 17 16\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M10.4995 3.99955L7.24219 8.24219L10.4995 12.4848\"\r\n stroke=\"#6B6B6B\"\r\n />\r\n </svg>\r\n </div>\r\n </div>\r\n <div\r\n class=\"steps-content\"\r\n [ngClass]=\"{\r\n leftMask: showBtn && !isAtStart,\r\n rightMask: showBtn && !isAtEnd,\r\n bothMask: showBtn && !isAtStart && showBtn && !isAtEnd\r\n }\"\r\n #menu\r\n (scroll)=\"onScroll()\"\r\n >\r\n <ng-container *ngFor=\"let item of steps; let i = index\">\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, i)\"\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=\"i < 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 class=\"row-btn\"\r\n [class.hidden]=\"isAtEnd || !showBtn\"\r\n (click)=\"scrollRight()\"\r\n >\r\n <div class=\"hover\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"17\"\r\n height=\"16\"\r\n viewBox=\"0 0 17 16\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M7.50045 3.99955L10.7578 8.24219L7.50045 12.4848\"\r\n stroke=\"#1F7BFF\"\r\n />\r\n </svg>\r\n </div>\r\n <div class=\"normal\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"17\"\r\n height=\"16\"\r\n viewBox=\"0 0 17 16\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M7.50045 3.99955L10.7578 8.24219L7.50045 12.4848\"\r\n stroke=\"#6B6B6B\"\r\n />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Vertical stepper (Figma RAISE-UI-Kits: right border, \"Step N\" + title) -->\r\n <div class=\"steps-wrap steps-wrap--vertical\" *ngIf=\"orientation === 'vertical'\">\r\n <ol class=\"steps-vertical\" role=\"list\">\r\n <li\r\n *ngFor=\"let item of steps; let i = index\"\r\n class=\"step-vertical\"\r\n [ngClass]=\"{\r\n 'step-vertical--done': item.step <= unlockedStep,\r\n 'step-vertical--active': item.step === currentStep\r\n }\"\r\n (click)=\"onStepClick(item, i)\"\r\n >\r\n <span class=\"step-vertical__number\">Step {{ item.step + 1 }}</span>\r\n <span\r\n class=\"step-vertical__label\"\r\n [matTooltip]=\"item.label !== (item.displayTitle || item.label) ? item.label : ''\"\r\n matTooltipPosition=\"right\"\r\n >\r\n {{ item.displayTitle || item.label }}\r\n </span>\r\n </li>\r\n </ol>\r\n </div>\r\n</div>\r\n",
|
|
22191
|
+
styles: [".rs-stepper{font-family:var(--rs-font-family,Arial);width:100%}.rs-stepper:not(.rs-stepper--vertical){border-bottom:1px solid var(--rs-border-color)}.rs-stepper.rs-stepper--vertical{border-bottom:none}.rs-stepper .steps-wrap{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 auto}.rs-stepper .steps-wrap .steps-content{display:flex;align-items:center;flex-wrap:nowrap;min-width:0;overflow-x:auto;overflow-y:hidden;gap:8px}.rs-stepper .steps-wrap .steps-content.leftMask{-webkit-mask-image:linear-gradient(90deg,transparent,#fff 10%,#d8d3d3 100%);mask-image:linear-gradient(90deg,transparent,#fff 10%,#d8d3d3 100%)}.rs-stepper .steps-wrap .steps-content.rightMask{-webkit-mask-image:linear-gradient(90deg,#fff 0,#fff 90%,transparent);mask-image:linear-gradient(90deg,#fff 0,#fff 90%,transparent)}.rs-stepper .steps-wrap .steps-content.bothMask{-webkit-mask-image:linear-gradient(90deg,transparent,#fff 10%,#fff 90%,transparent)!important;mask-image:linear-gradient(90deg,transparent,#fff 10%,#fff 90%,transparent)!important}.rs-stepper .steps-wrap .steps-content::-webkit-scrollbar{width:0;height:0}.rs-stepper .steps-wrap .step{flex:0 0 auto}.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;display:flex;align-items:center}.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{flex:0 0 auto;padding:0 12px 12px;display:flex;align-items:center}.rs-stepper .row-btn{margin-bottom:12px;display:flex;width:20px;height:20px;align-items:center;justify-content:center;border-radius:4px;border:1px solid #bdc4ca;flex-shrink:0;cursor:pointer;visibility:visible}.rs-stepper .row-btn .hover{display:none}.rs-stepper .row-btn .normal{display:flex}.rs-stepper .row-btn:hover{background-color:rgba(31,123,255,.04)}.rs-stepper .row-btn:hover .normal{display:none}.rs-stepper .row-btn:hover .hover{display:flex}.rs-stepper .row-btn.hidden{visibility:hidden}.rs-stepper .steps-wrap--vertical{display:block;padding:0}.rs-stepper .steps-vertical{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px}.rs-stepper .step-vertical{display:flex;flex-direction:column;align-items:flex-end;gap:6px;padding:4px 12px 4px 0;border-right:2px solid var(--rs-border-color);cursor:default;text-align:right;font-family:var(--rs-font-family,Arial);font-size:11px;line-height:14px;color:var(--rs-labels-color);transition:background-color .15s,border-radius .15s}.rs-stepper .step-vertical.step-vertical--done{cursor:pointer;border-right-color:var(--rs-active-labels-color);color:var(--rs-active-labels-color)}.rs-stepper .step-vertical.step-vertical--done:hover{background-color:rgba(31,123,255,.04);border-top-left-radius:var(--rs-input-border-radius,4px);border-bottom-left-radius:var(--rs-input-border-radius,4px)}.rs-stepper .step-vertical.step-vertical--active{border-right-color:var(--rs-active-labels-color);color:var(--rs-active-labels-color)}.rs-stepper .step-vertical.step-vertical--active .step-vertical__label{font-weight:700}.rs-stepper .step-vertical__number{flex-shrink:0;font-weight:400}.rs-stepper .step-vertical__label{min-width:0;font-weight:400;word-break:break-word}.rs-stepper .step-vertical--active .step-vertical__label{font-weight:700}"]
|
|
22098
22192
|
}] }
|
|
22099
22193
|
];
|
|
22100
22194
|
/** @nocollapse */
|
|
@@ -22106,6 +22200,7 @@ var RSStepperComponent = /** @class */ (function () {
|
|
|
22106
22200
|
menu: [{ type: ViewChild, args: ["menu", { static: false },] }],
|
|
22107
22201
|
steps: [{ type: Input }],
|
|
22108
22202
|
currentStep: [{ type: Input }],
|
|
22203
|
+
orientation: [{ type: Input }],
|
|
22109
22204
|
stepClick: [{ type: Output }],
|
|
22110
22205
|
unlockedStep: [{ type: Input }],
|
|
22111
22206
|
containerRefId: [{ type: Input }],
|
|
@@ -22120,6 +22215,11 @@ if (false) {
|
|
|
22120
22215
|
RSStepperComponent.prototype.steps;
|
|
22121
22216
|
/** @type {?} */
|
|
22122
22217
|
RSStepperComponent.prototype.currentStep;
|
|
22218
|
+
/**
|
|
22219
|
+
* Layout direction: 'horizontal' (default) or 'vertical'
|
|
22220
|
+
* @type {?}
|
|
22221
|
+
*/
|
|
22222
|
+
RSStepperComponent.prototype.orientation;
|
|
22123
22223
|
/** @type {?} */
|
|
22124
22224
|
RSStepperComponent.prototype.stepClick;
|
|
22125
22225
|
/** @type {?} */
|