@datarailsshared/datarailsshared 1.4.73 → 1.4.75-dragons

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.
@@ -4655,6 +4655,77 @@
4655
4655
  },] }
4656
4656
  ];
4657
4657
 
4658
+ var StepperComponent = /** @class */ (function () {
4659
+ function StepperComponent() {
4660
+ this.withoutConnectors = false;
4661
+ this.hiddenNames = false;
4662
+ this.inlineLabels = false;
4663
+ this.disabled = false;
4664
+ this.hiddenIndex = false;
4665
+ this.stepChange = new i0.EventEmitter();
4666
+ }
4667
+ StepperComponent.prototype.selectStep = function (step) {
4668
+ if (step !== this.currentStep && !this.disabled) {
4669
+ this.stepChange.emit(step);
4670
+ }
4671
+ };
4672
+ StepperComponent.prototype.getWidth = function (step) {
4673
+ if (this.withoutConnectors)
4674
+ return '0%';
4675
+ if (step.completed)
4676
+ return '100%';
4677
+ if (step.index === 0 || this.steps[step.index - 1].completed)
4678
+ return (((step === null || step === void 0 ? void 0 : step.completedTasks) / (step === null || step === void 0 ? void 0 : step.requiredTasks) * 100) || 0) + "%";
4679
+ return '0%';
4680
+ };
4681
+ StepperComponent.prototype.scrollLeft = function () {
4682
+ this.stepper.nativeElement.scrollLeft -= 80;
4683
+ };
4684
+ StepperComponent.prototype.scrollRight = function () {
4685
+ this.stepper.nativeElement.scrollLeft += 80;
4686
+ };
4687
+ StepperComponent.prototype.roundWidth = function (width) {
4688
+ return Math.round(width);
4689
+ };
4690
+ return StepperComponent;
4691
+ }());
4692
+ StepperComponent.decorators = [
4693
+ { type: i0.Component, args: [{
4694
+ selector: 'dr-stepper',
4695
+ template: "<div class=\"scroll-section\" *ngIf=\"stepper?.scrollLeft !== 0\" (click)=\"scrollLeft()\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n<div #stepper class=\"stepper\" [ngClass]=\"{'stepper--disabled': disabled}\">\n <ng-container *ngFor=\"let step of steps; let index = index; last as isLast; first as isFirst\">\n <div *ngIf=\"!step.hide\" class=\"step\" (click)=\"selectStep(step)\"\n [class.step-setup]=\"inlineLabels\">\n <div class=\"step-wrapper\" [drTooltip]=\"step.description && tooltip\"\n [drTooltipContext]=\"{ step: step }\"\n [drTooltipPosition]=\"'bottom'\">\n <div data-test=\"step_point\" class=\"step-point\">\n <div *ngIf=\"step === currentStep;\" class=\"ellipse\"></div>\n <ng-container [ngSwitch]=\"step.completed\">\n <ng-template [ngSwitchCase]=\"true\">\n <div class=\"pointer blue\">\n <i class=\"dr-icon-approve\"></i>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"false\">\n <div class=\"pointer\" [class.gray]=\"step !== currentStep\"\n [ngClass]=\"{'blue with-ellipse': step === currentStep}\">\n <div [hidden]=\"step === currentStep || hiddenIndex\" class=\"text\">{{index + 1}}</div>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div data-test=\"step_label_name\" class=\"step-label\" [class.active]=\"currentStep === step\"\n [ngClass]=\"step.completed ? 'completed' : 'uncompleted'\">\n <span [hidden]=\"hiddenNames\">{{step.name}}</span>\n </div>\n <ng-container *ngIf=\"inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n <span *ngIf=\"step.showProgress\"\n data-test=\"step_progress\"\n class=\"step-progress\">\n {{(step.requiredTasks ? step.completedTasks : step.requiredTasks) + '/' + step.requiredTasks}}\n </span>\n </div>\n <ng-container *ngIf=\"!inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n </div>\n </ng-container>\n</div>\n<div (click)=\"scrollRight()\" class=\"scroll-section\"\n *ngIf=\"stepper?.scrollWidth > stepper?.clientWidth && roundWidth(stepper?.scrollLeft + stepper?.clientWidth) < stepper?.scrollWidth\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n\n<ng-template #tooltip let-step=\"step\">\n <div class=\"step-tooltip\">\n <div class=\"step-tooltip_name\">{{step.name}}</div>\n <div class=\"step-tooltip_description\">{{step.description}}</div>\n </div>\n</ng-template>\n\n<ng-template #connector let-step=\"step\" let-isLast=\"isLast\" let-index=\"index\">\n <div class=\"step-connector\" [class.only-one-step]=\"steps.length === 1\"\n [class]=\"'step-connector--' + (!inlineLabels ? 'absolute' : 'inline')\"\n *ngIf=\"steps.length === 1 || !isLast\"\n [style.visibility]=\"withoutConnectors || steps[step.index + 1]?.hide ? 'hidden' : 'unset'\"\n [class.connector-grand]=\"!inlineLabels && (index === 0 || index === steps.length - 2)\">\n <div class=\"progress\" [style.width]=\"getWidth(step)\"></div>\n </div>\n</ng-template>\n",
4696
+ changeDetection: i0.ChangeDetectionStrategy.Default,
4697
+ styles: [":host{font-family:\"Poppins\",sans-serif;display:flex;justify-content:center;height:100%;position:relative}:host .scroll-section{position:absolute;top:0;height:100%;width:108px;display:flex;align-items:center;z-index:10}:host .scroll-section i{font-size:24px;color:#2969b0;background:#F3F7FF;border-radius:24px}:host .scroll-section i:hover{background:#CDE1FB;cursor:pointer}:host .scroll-section:first-child{left:0;padding-left:16px;background:linear-gradient(90deg,#FFFFFF 36.08%,rgba(255,255,255,0) 87.17%)}:host .scroll-section:first-child i{transform:rotate(180deg)}:host .scroll-section:last-child{right:0;padding-right:16px;background:linear-gradient(270deg,#FFFFFF 36.08%,rgba(255,255,255,0) 87.17%);justify-content:flex-end}:host .stepper{display:flex;align-items:center;height:100%;width:100%;overflow:auto;scroll-behavior:smooth}:host .stepper::-webkit-scrollbar{display:none}:host .stepper--disabled .step:hover{cursor:default}:host .stepper--disabled .step-point .ellipse{border-color:#bcbcbc}:host .stepper--disabled .step-point .pointer{color:#fff;background-color:#bcbcbc;cursor:default}:host .stepper--disabled .step-label{color:#bcbcbc}:host .stepper--disabled .step-connector{background-color:#bcbcbc}:host .stepper--disabled .step-connector .progress{background-color:#bcbcbc}:host .step{position:relative;display:flex;flex-direction:column;width:120px;align-items:center;flex-shrink:0;flex-grow:1}:host .step:hover{cursor:pointer}:host .step:not(.step-setup) .step-wrapper{width:100%}:host .step:not(.step-setup):first-child .step-wrapper,:host .step:not(.step-setup):first-child .step-point,:host .step:not(.step-setup):first-child .step-label,:host .step:not(.step-setup):first-child .step-progress{margin-left:8px}:host .step:not(.step-setup):first-child .only-one-step{left:0!important;margin-left:25px}:host .step-point{display:flex;justify-content:center;width:100%;height:38px;position:relative;align-items:center}:host .step-point .ellipse{width:38px;height:38px;position:absolute;border-radius:50px;border-color:#579bf2;border-style:solid;border-width:2px;background:white;display:flex;justify-content:center;align-items:center;z-index:2}:host .step-point .pointer{width:24px;height:24px;position:absolute;z-index:4;border-radius:20px;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:16px;line-height:1.4;color:#51566f}:host .step-point .pointer i{color:#fff;font-size:22px}:host .step-point .pointer.blue{background:#579BF2}:host .step-point .pointer.completed{background-color:#151b3f}:host .step-point .pointer.uncompleted{background-color:#e5e5e5}:host .step-point .pointer.active-uncompleted{background-color:#2969b0}:host .step-point .pointer.gray{background:#E5E6EA}:host .step-label{font-weight:normal;font-size:14px;line-height:1.5;color:#51566f;display:flex;justify-content:center;overflow:hidden;margin-top:3px;width:95%}:host .step-label span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .step-label.active{font-weight:600}:host .step-label:last-child{margin-bottom:23px}:host .step-progress{margin-top:3px;font-style:normal;font-weight:normal;font-size:12px;line-height:1.4;display:flex;justify-content:center}:host .step-connector{background-color:#e5e5e5;height:2px}:host .step-connector.connector-grand{width:calc(100% - 25px)}:host .step-connector.connector-grand.only-one-step{width:calc(100% - 50px)}:host .step-connector .progress{background-color:#579bf2;height:2px;width:0}:host .step-connector--absolute{position:absolute;top:18px;width:100%;left:calc(100% / 2 + 12px)}:host .step-connector--inline{width:23px;margin-left:19px;margin-right:calc(19px - (38px - 24px) / 2)}:host .step-setup{width:auto}:host .step-setup .step-wrapper{display:flex;flex-direction:row;align-items:center;width:auto}:host .step-setup+.step-setup{margin-left:0}:host .step-setup .step-progress{display:none}:host .step-setup .step-label{position:relative;transform:none;align-items:center;justify-content:start;margin:0 0 0 5px;font-size:16px}:host .step-setup .step-point{width:38px;height:38px}:host .step-setup .step-point .ellipse{width:24px;height:24px}:host .step-setup .step-point .pointer{width:24px;height:24px}:host .step-setup .step-point .pointer.with-ellipse{width:14px;height:14px}:host .step-setup .step-point .pointer i{font-size:22px}:host .step-setup .step-point .pointer .text{font-size:16px}::ng-deep .step-tooltip{max-width:250px;font-size:14px;line-height:22px;padding:10px 12px}::ng-deep .step-tooltip_name{font-weight:700;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1367px){.stepper .step-label{font-size:14px}}\n"]
4698
+ },] }
4699
+ ];
4700
+ StepperComponent.ctorParameters = function () { return []; };
4701
+ StepperComponent.propDecorators = {
4702
+ steps: [{ type: i0.Input }],
4703
+ currentStep: [{ type: i0.Input }],
4704
+ withoutConnectors: [{ type: i0.Input }],
4705
+ hiddenNames: [{ type: i0.Input }],
4706
+ inlineLabels: [{ type: i0.Input }],
4707
+ disabled: [{ type: i0.Input }],
4708
+ hiddenIndex: [{ type: i0.Input }],
4709
+ stepChange: [{ type: i0.Output }],
4710
+ stepper: [{ type: i0.ViewChild, args: ['stepper', { read: i0.ElementRef },] }]
4711
+ };
4712
+
4713
+ var StepperModule = /** @class */ (function () {
4714
+ function StepperModule() {
4715
+ }
4716
+ return StepperModule;
4717
+ }());
4718
+ StepperModule.decorators = [
4719
+ { type: i0.NgModule, args: [{
4720
+ declarations: [StepperComponent],
4721
+ imports: [
4722
+ common.CommonModule,
4723
+ DrTooltipModule
4724
+ ],
4725
+ exports: [StepperComponent]
4726
+ },] }
4727
+ ];
4728
+
4658
4729
  /* components */
4659
4730
 
4660
4731
  /**
@@ -4717,6 +4788,7 @@
4717
4788
  exports.QuarterTagComponent = QuarterTagComponent;
4718
4789
  exports.RadioButtonComponent = RadioButtonComponent;
4719
4790
  exports.RadioGroupComponent = RadioGroupComponent;
4791
+ exports.StepperModule = StepperModule;
4720
4792
  exports.TooltipComponent = TooltipComponent;
4721
4793
  exports.WeekTagComponent = WeekTagComponent;
4722
4794
  exports.YearTagComponent = YearTagComponent;
@@ -4732,6 +4804,7 @@
4732
4804
  exports["ɵj"] = TooltipInfoSimpleComponent;
4733
4805
  exports["ɵk"] = TooltipNoBodyComponent;
4734
4806
  exports["ɵl"] = TooltipProcessDefaultComponent;
4807
+ exports["ɵm"] = StepperComponent;
4735
4808
 
4736
4809
  Object.defineProperty(exports, '__esModule', { value: true });
4737
4810