herum-shared 0.1.64 → 0.1.65-amit-beta.1
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/atoms/index.d.ts +7 -3
- package/fesm2022/herum-shared-animations.mjs.map +1 -1
- package/fesm2022/herum-shared-atoms.mjs +53 -21
- package/fesm2022/herum-shared-atoms.mjs.map +1 -1
- package/fesm2022/herum-shared-constants.mjs.map +1 -1
- package/fesm2022/herum-shared-decorators.mjs.map +1 -1
- package/fesm2022/herum-shared-dialogs.mjs.map +1 -1
- package/fesm2022/herum-shared-directives.mjs.map +1 -1
- package/fesm2022/herum-shared-environment.mjs.map +1 -1
- package/fesm2022/herum-shared-errors.mjs.map +1 -1
- package/fesm2022/herum-shared-fetched-message.mjs.map +1 -1
- package/fesm2022/herum-shared-molecules.mjs.map +1 -1
- package/fesm2022/herum-shared-mongo.mjs.map +1 -1
- package/fesm2022/herum-shared-objectsExample.mjs.map +1 -1
- package/fesm2022/herum-shared-pipes.mjs.map +1 -1
- package/fesm2022/herum-shared-services.mjs +3 -1
- package/fesm2022/herum-shared-services.mjs.map +1 -1
- package/fesm2022/herum-shared-static-services.mjs.map +1 -1
- package/fesm2022/herum-shared-table.mjs +17 -6
- package/fesm2022/herum-shared-table.mjs.map +1 -1
- package/fesm2022/herum-shared-testsObjects.mjs.map +1 -1
- package/fesm2022/herum-shared-tokens.mjs.map +1 -1
- package/fesm2022/herum-shared-utils.mjs.map +1 -1
- package/fesm2022/herum-shared-validators.mjs.map +1 -1
- package/fesm2022/herum-shared.mjs +72 -27
- package/fesm2022/herum-shared.mjs.map +1 -1
- package/index.d.ts +14 -8
- package/package.json +1 -1
- package/services/index.d.ts +1 -1
- package/table/index.d.ts +4 -2
package/atoms/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, SimpleChanges, EventEmitter, PipeTransform, ElementRef, ChangeDetectorRef, Renderer2, SimpleChange, OnChanges } from '@angular/core';
|
|
3
3
|
import { User } from 'herum-types/User';
|
|
4
|
-
import { IdentifiedEntity, RecursiveTitledOption, FileData, MenuItem, Tick } from 'herum-types/Shared';
|
|
4
|
+
import { IdentifiedEntity, RecursiveTitledOption, FileData, MenuItem, NumericSliderRange, Tick } from 'herum-types/Shared';
|
|
5
5
|
import * as i41 from '@angular/forms';
|
|
6
6
|
import { ControlValueAccessor, NgControl, ControlContainer, FormControl, ValidatorFn, AsyncValidatorFn } from '@angular/forms';
|
|
7
7
|
import { HerumTableParams } from 'herum-types/Table';
|
|
@@ -817,19 +817,23 @@ declare class NumericSliderComponent {
|
|
|
817
817
|
max: number;
|
|
818
818
|
value: number;
|
|
819
819
|
disabled: boolean;
|
|
820
|
-
|
|
820
|
+
creationMode: boolean;
|
|
821
|
+
visualTickSegments: number;
|
|
822
|
+
valueChange: EventEmitter<number | NumericSliderRange>;
|
|
821
823
|
ticks: Array<Tick>;
|
|
822
824
|
trackStyle: Record<string, string>;
|
|
823
825
|
bubbleStyle: Record<string, string>;
|
|
826
|
+
creationTrackStyle: Record<string, string>;
|
|
824
827
|
ngOnChanges(changes: SimpleChanges): void;
|
|
825
828
|
_onInput(event: Event): void;
|
|
829
|
+
_onCreationValueChange(value: string | number, thumb: 'min' | 'max'): void;
|
|
826
830
|
_onEmitValue(): void;
|
|
827
831
|
private recalculateViewModel;
|
|
828
832
|
private getTicks;
|
|
829
833
|
private getBubbleOffsetPercent;
|
|
830
834
|
private getBubbleStyle;
|
|
831
835
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumericSliderComponent, never>;
|
|
832
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumericSliderComponent, "numeric-slider", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
|
|
836
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumericSliderComponent, "numeric-slider", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "creationMode": { "alias": "creationMode"; "required": false; }; "visualTickSegments": { "alias": "visualTickSegments"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
|
|
833
837
|
}
|
|
834
838
|
|
|
835
839
|
declare class AtomsModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"herum-shared-animations.mjs","sources":["../../../projects/herum-shared/animations/open-close.ts","../../../projects/herum-shared/animations/index.ts","../../../projects/herum-shared/animations/herum-shared-animations.ts"],"sourcesContent":["import { trigger, state, style, animate, transition } from '@angular/animations'; \r\n \r\nexport const openClose = trigger('openClose', [ \r\n state('openUp', style({ \r\n opacity: 1, \r\n transform: 'translateY(-100%)' \r\n })), \r\n \r\n state('openDown', style({ \r\n opacity: 1 \r\n })), \r\n \r\n state('closeDown', style({ \r\n top: 0, \r\n transform: 'translateY(-100%)', \r\n opacity: 0, \r\n height: '0px' ,\r\n })), \r\n \r\n state('closeUp', style({ \r\n opacity: 0, \r\n height: '0px' ,\r\n padding:0\r\n })), \r\n \r\n transition('openUp => closeDown', [ \r\n animate('350ms ease-in') \r\n ]), \r\n \r\n transition('closeDown => openUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('openDown => closeUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('closeUp => openDown', [ \r\n animate('350ms ease-in') \r\n ]) \r\n])","/**\
|
|
1
|
+
{"version":3,"file":"herum-shared-animations.mjs","sources":["../../../projects/herum-shared/animations/open-close.ts","../../../projects/herum-shared/animations/index.ts","../../../projects/herum-shared/animations/herum-shared-animations.ts"],"sourcesContent":["import { trigger, state, style, animate, transition } from '@angular/animations'; \r\n \r\nexport const openClose = trigger('openClose', [ \r\n state('openUp', style({ \r\n opacity: 1, \r\n transform: 'translateY(-100%)' \r\n })), \r\n \r\n state('openDown', style({ \r\n opacity: 1 \r\n })), \r\n \r\n state('closeDown', style({ \r\n top: 0, \r\n transform: 'translateY(-100%)', \r\n opacity: 0, \r\n height: '0px' ,\r\n })), \r\n \r\n state('closeUp', style({ \r\n opacity: 0, \r\n height: '0px' ,\r\n padding:0\r\n })), \r\n \r\n transition('openUp => closeDown', [ \r\n animate('350ms ease-in') \r\n ]), \r\n \r\n transition('closeDown => openUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('openDown => closeUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('closeUp => openDown', [ \r\n animate('350ms ease-in') \r\n ]) \r\n])","/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./open-close\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEO,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE;AAC1C,IAAA,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;AAClB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE;AACd,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC;AACpB,QAAA,OAAO,EAAE;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC;AACrB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,SAAS,EAAE,mBAAmB;AAC9B,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AAChB,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;AACnB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,OAAO,EAAC;AACX,KAAA,CAAC,CAAC;IAEH,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B;AACJ,CAAA;;ACxCD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -2666,64 +2666,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2666
2666
|
}] } });
|
|
2667
2667
|
|
|
2668
2668
|
const thumbSize = 16;
|
|
2669
|
-
const visualTickSegments = 10;
|
|
2670
2669
|
class NumericSliderComponent {
|
|
2671
2670
|
min = 0;
|
|
2672
2671
|
max = 100;
|
|
2673
2672
|
value = 0;
|
|
2674
2673
|
disabled = true;
|
|
2674
|
+
creationMode = false;
|
|
2675
|
+
visualTickSegments = 10;
|
|
2675
2676
|
valueChange = new EventEmitter();
|
|
2676
2677
|
ticks = [];
|
|
2677
2678
|
trackStyle = {};
|
|
2678
2679
|
bubbleStyle = {};
|
|
2680
|
+
creationTrackStyle = {};
|
|
2679
2681
|
ngOnChanges(changes) {
|
|
2680
|
-
if (changes['min'] || changes['max'] || changes['value'])
|
|
2682
|
+
if (changes['min'] || changes['max'] || changes['value'] || changes['creationMode'])
|
|
2681
2683
|
this.recalculateViewModel();
|
|
2682
2684
|
}
|
|
2683
2685
|
_onInput(event) {
|
|
2684
|
-
|
|
2686
|
+
const inputElement = event.target;
|
|
2687
|
+
this.value = Math.round(Number(inputElement.value));
|
|
2688
|
+
;
|
|
2685
2689
|
this.recalculateViewModel();
|
|
2686
2690
|
}
|
|
2691
|
+
_onCreationValueChange(value, thumb) {
|
|
2692
|
+
const nextValue = Math.round(Number(value));
|
|
2693
|
+
if (isNaN(nextValue))
|
|
2694
|
+
return;
|
|
2695
|
+
if (thumb === 'min')
|
|
2696
|
+
this.min = nextValue;
|
|
2697
|
+
else
|
|
2698
|
+
this.max = nextValue;
|
|
2699
|
+
this.recalculateViewModel();
|
|
2700
|
+
this._onEmitValue();
|
|
2701
|
+
}
|
|
2687
2702
|
_onEmitValue() {
|
|
2703
|
+
if (this.creationMode) {
|
|
2704
|
+
this.valueChange.emit({
|
|
2705
|
+
min: this.min,
|
|
2706
|
+
max: this.max
|
|
2707
|
+
});
|
|
2708
|
+
return;
|
|
2709
|
+
}
|
|
2688
2710
|
this.valueChange.emit(this.value);
|
|
2689
2711
|
}
|
|
2690
2712
|
recalculateViewModel() {
|
|
2691
|
-
|
|
2692
|
-
|
|
2713
|
+
this.ticks = this.getTicks(this.min, this.max);
|
|
2714
|
+
if (this.creationMode)
|
|
2715
|
+
return;
|
|
2716
|
+
const bubbleOffsetPercent = this.getBubbleOffsetPercent(this.value);
|
|
2693
2717
|
this.trackStyle = { '--slider-progress': `${bubbleOffsetPercent}%` };
|
|
2694
2718
|
this.bubbleStyle = this.getBubbleStyle(bubbleOffsetPercent);
|
|
2695
2719
|
}
|
|
2696
|
-
getTicks() {
|
|
2697
|
-
const range =
|
|
2720
|
+
getTicks(minValue, maxValue) {
|
|
2721
|
+
const range = maxValue - minValue;
|
|
2698
2722
|
if (range <= 0)
|
|
2699
|
-
return [{ value:
|
|
2723
|
+
return [{ value: maxValue, offsetPercent: 0, isEdge: true }];
|
|
2700
2724
|
const ticks = [];
|
|
2701
|
-
if (
|
|
2702
|
-
for (let tick =
|
|
2725
|
+
if (range <= this.visualTickSegments) {
|
|
2726
|
+
for (let tick = maxValue; tick >= minValue; tick--) {
|
|
2703
2727
|
ticks.push({
|
|
2704
2728
|
value: tick,
|
|
2705
|
-
offsetPercent: ((
|
|
2706
|
-
isEdge: tick ===
|
|
2729
|
+
offsetPercent: ((maxValue - tick) / range) * 100,
|
|
2730
|
+
isEdge: tick === maxValue || tick === minValue
|
|
2707
2731
|
});
|
|
2708
2732
|
}
|
|
2709
2733
|
;
|
|
2710
2734
|
return ticks;
|
|
2711
2735
|
}
|
|
2712
|
-
|
|
2713
|
-
|
|
2736
|
+
const inclusiveRange = maxValue - minValue + 1;
|
|
2737
|
+
for (let index = 0; index <= this.visualTickSegments; index++) {
|
|
2738
|
+
const value = index === this.visualTickSegments
|
|
2739
|
+
? minValue
|
|
2740
|
+
: Math.round(maxValue - ((inclusiveRange / this.visualTickSegments) * index));
|
|
2714
2741
|
ticks.push({
|
|
2715
2742
|
value: value,
|
|
2716
|
-
offsetPercent: ((
|
|
2717
|
-
isEdge: index === 0 || index === visualTickSegments
|
|
2743
|
+
offsetPercent: ((maxValue - value) / range) * 100,
|
|
2744
|
+
isEdge: index === 0 || index === this.visualTickSegments
|
|
2718
2745
|
});
|
|
2719
2746
|
}
|
|
2720
2747
|
;
|
|
2721
2748
|
return ticks;
|
|
2722
2749
|
}
|
|
2723
|
-
getBubbleOffsetPercent() {
|
|
2724
|
-
|
|
2750
|
+
getBubbleOffsetPercent(currentValue) {
|
|
2751
|
+
const range = this.max - this.min;
|
|
2752
|
+
if (range === 0)
|
|
2725
2753
|
return 50;
|
|
2726
|
-
return ((this.max -
|
|
2754
|
+
return ((this.max - currentValue) / range) * 100;
|
|
2727
2755
|
}
|
|
2728
2756
|
getBubbleStyle(offsetPercent) {
|
|
2729
2757
|
const thumbCenterCompensation = (thumbSize / 2) - (thumbSize * offsetPercent / 100);
|
|
@@ -2732,11 +2760,11 @@ class NumericSliderComponent {
|
|
|
2732
2760
|
};
|
|
2733
2761
|
}
|
|
2734
2762
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: NumericSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: NumericSliderComponent, isStandalone: false, selector: "numeric-slider", inputs: { min: "min", max: "max", value: "value", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"numeric-slider\" [
|
|
2763
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: NumericSliderComponent, isStandalone: false, selector: "numeric-slider", inputs: { min: "min", max: "max", value: "value", disabled: "disabled", creationMode: "creationMode", visualTickSegments: "visualTickSegments" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"numeric-slider\" [ngClass]=\"{ 'disabled': disabled && !creationMode, 'creation-mode': creationMode }\">\n @if (!creationMode) {\n <div class=\"slider-shell\">\n <div class=\"value-bubble\" [ngStyle]=\"bubbleStyle\">\n <span class=\"text\">{{ value }}</span>\n </div>\n\n <input class=\"slider-input\" type=\"range\" [min]=\"min\" [max]=\"max\" [value]=\"value\" [disabled]=\"disabled\"\n [ngStyle]=\"trackStyle\" (input)=\"_onInput($event)\" (mouseup)=\"_onEmitValue()\">\n </div>\n } @else {\n <div class=\"creation-container\">\n <div class=\"labels\">\n <span class=\"label\">\u05DE\u05D9\u05E0\u05D9\u05DE\u05D5\u05DD</span>\n <span class=\"label\">\u05DE\u05E7\u05E1\u05D9\u05DE\u05D5\u05DD</span>\n </div>\n\n <div class=\"slider-shell\" [ngStyle]=\"creationTrackStyle\">\n <div class=\"track\"></div>\n <input class=\"slider-input slider-input-range\" type=\"range\" [max]=\"max\" [value]=\"max\" disabled=\"true\">\n <input class=\"slider-input slider-input-range\" type=\"range\" [min]=\"min\" [value]=\"min\" disabled=\"true\">\n </div>\n </div>\n }\n\n <div class=\"ticks\"> @for (tick of ticks; track $index) {\n @if (!creationMode || !tick.isEdge) {\n <div class=\"tick\" [style.left.%]=\"tick.offsetPercent\">\n @if (!tick.isEdge) {\n <span class=\"tick-mark\"></span>\n }\n <span class=\"tick-label\" [class.edge-tick]=\"tick.isEdge\">{{ tick.value }}</span>\n </div>\n }\n }\n </div>\n\n @if (creationMode) {\n <div class=\"inputs\">\n <herum-input-field class=\"input\" [type]=\"'number'\" [inputValue]=\"min\" [maxValue]=\"max - 1\"\n (inputValueEmitter)=\"_onCreationValueChange($event, 'min')\">\n </herum-input-field>\n\n <herum-input-field class=\"input\" [type]=\"'number'\" [inputValue]=\"max\" [minValue]=\"min + 1\"\n (inputValueEmitter)=\"_onCreationValueChange($event, 'max')\">\n </herum-input-field>\n </div>\n }\n</div>", styles: [":host{display:block;width:100%}.numeric-slider{--thumb-size: 16px;--bubble-height: 40px;--bubble-tail-height: 5px;--slider-progress-color: var(--secondary-color);--slider-fill-color: var(--disable-color);--input-width: 80px;--track-height: 8px;width:100%;min-width:320px}.numeric-slider.creation-mode .ticks{width:calc(100% - var(--input-width));margin-inline:calc(var(--input-width) / 2)}.numeric-slider.creation-mode .ticks .tick{top:-5px;bottom:3px}.numeric-slider .creation-container{display:flex;flex-direction:column;gap:8px}.numeric-slider .creation-container .labels{display:flex;justify-content:space-between;align-items:center;width:calc(100% - var(--thumb-size));margin-inline:calc(var(--thumb-size) / 2)}.numeric-slider .creation-container .labels .label{color:var(--icons-color);font-size:14px;font-weight:700}.numeric-slider .creation-container .slider-shell{width:calc(100% - var(--input-width));margin-inline:calc(var(--input-width) * .5)}.numeric-slider .creation-container .slider-shell .track{position:absolute;inset-inline:0;top:50%;transform:translateY(-50%);height:var(--track-height);background:var(--slider-fill-color);border-radius:var(--border-radius)}.numeric-slider .creation-container .slider-shell .slider-input-range{position:absolute;inset:0}.numeric-slider .creation-container .slider-shell .slider-input{cursor:default}.numeric-slider .creation-container .slider-shell .slider-input::-webkit-slider-thumb{cursor:default}.numeric-slider .slider-shell{position:relative;padding-top:24px}.numeric-slider .inputs{display:flex;justify-content:space-between;margin-inline:calc(var(--input-width) / -2) calc(var(--input-width) / 2);margin-top:8px}.numeric-slider .inputs .input{width:var(--input-width);transform:translate(-50%)}.numeric-slider .value-bubble{position:absolute;top:-16px;transform:translate(-50%);width:52px;height:var(--bubble-height);pointer-events:none}.numeric-slider .value-bubble:before{content:\"\";position:absolute;inset:0;background:var(--secondary-color);-webkit-mask-image:url(/assets/hadracha/general/numericSliderBubble.svg);mask-image:url(/assets/hadracha/general/numericSliderBubble.svg);-webkit-mask-size:100% 100%;mask-size:100% 100%}.numeric-slider .value-bubble .text{position:absolute;top:0;left:0;width:100%;height:calc(var(--bubble-height) - var(--bubble-tail-height));display:flex;align-items:center;justify-content:center;text-align:center;color:var(--light-background-color);font-size:14px;font-weight:400;line-height:1}.numeric-slider .slider-input{position:relative;width:100%;appearance:none;-webkit-appearance:none;direction:rtl;cursor:pointer;z-index:1;background:transparent}.numeric-slider .slider-input::-webkit-slider-runnable-track{height:var(--track-height);border-radius:var(--border-radius);background:linear-gradient(90deg,var(--slider-fill-color) 0,var(--slider-fill-color) var(--slider-progress),var(--slider-progress-color) var(--slider-progress),var(--slider-progress-color) 100%)}.numeric-slider .slider-input::-webkit-slider-thumb{position:relative;-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);margin-top:-4px;border-radius:50%;background-color:var(--light-background-color);border:1.5px solid var(--secondary-text-color);cursor:grab}.numeric-slider .ticks{position:relative;width:calc(100% - var(--thumb-size));margin-inline:calc(var(--thumb-size) / 2);direction:ltr;height:30px;top:-3px}.numeric-slider .tick{position:absolute;top:-2px;bottom:0;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0}.numeric-slider .tick .tick-mark{width:1.5px;height:8px;background:var(--secondary-text-color)}.numeric-slider .tick .tick-label{color:var(--secondary-text-color);line-height:1;margin-top:auto;text-align:center;line-height:normal;font-weight:400;font-size:12px}.numeric-slider .tick .edge-tick{font-weight:700;font-size:14px;color:var(--icons-color)}.numeric-slider.disabled{--slider-progress-color: var(--disable-color);--slider-fill-color: var(--slider-disabled-fill-color)}.numeric-slider.disabled .slider-input{cursor:default}.numeric-slider.disabled .slider-input::-webkit-slider-thumb{cursor:default}.numeric-slider.disabled .tick .edge-tick{color:var(--slider-disabled-fill-color)}.numeric-slider.disabled .value-bubble:before{background:var(--disable-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: HerumInputFieldComponent, selector: "herum-input-field", inputs: ["type", "placeholder", "disabled", "isBlocked", "isValid", "errorMsg", "showErrorMsgGap", "inputValue", "isLoading", "id", "debounceTime", "minValue", "maxValue", "isBlurred", "touched", "ltrMode", "preventMacroKeysPressEvent"], outputs: ["inputValueEmitter"] }] });
|
|
2736
2764
|
}
|
|
2737
2765
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: NumericSliderComponent, decorators: [{
|
|
2738
2766
|
type: Component,
|
|
2739
|
-
args: [{ standalone: false, selector: 'numeric-slider', template: "<div class=\"numeric-slider\" [
|
|
2767
|
+
args: [{ standalone: false, selector: 'numeric-slider', template: "<div class=\"numeric-slider\" [ngClass]=\"{ 'disabled': disabled && !creationMode, 'creation-mode': creationMode }\">\n @if (!creationMode) {\n <div class=\"slider-shell\">\n <div class=\"value-bubble\" [ngStyle]=\"bubbleStyle\">\n <span class=\"text\">{{ value }}</span>\n </div>\n\n <input class=\"slider-input\" type=\"range\" [min]=\"min\" [max]=\"max\" [value]=\"value\" [disabled]=\"disabled\"\n [ngStyle]=\"trackStyle\" (input)=\"_onInput($event)\" (mouseup)=\"_onEmitValue()\">\n </div>\n } @else {\n <div class=\"creation-container\">\n <div class=\"labels\">\n <span class=\"label\">\u05DE\u05D9\u05E0\u05D9\u05DE\u05D5\u05DD</span>\n <span class=\"label\">\u05DE\u05E7\u05E1\u05D9\u05DE\u05D5\u05DD</span>\n </div>\n\n <div class=\"slider-shell\" [ngStyle]=\"creationTrackStyle\">\n <div class=\"track\"></div>\n <input class=\"slider-input slider-input-range\" type=\"range\" [max]=\"max\" [value]=\"max\" disabled=\"true\">\n <input class=\"slider-input slider-input-range\" type=\"range\" [min]=\"min\" [value]=\"min\" disabled=\"true\">\n </div>\n </div>\n }\n\n <div class=\"ticks\"> @for (tick of ticks; track $index) {\n @if (!creationMode || !tick.isEdge) {\n <div class=\"tick\" [style.left.%]=\"tick.offsetPercent\">\n @if (!tick.isEdge) {\n <span class=\"tick-mark\"></span>\n }\n <span class=\"tick-label\" [class.edge-tick]=\"tick.isEdge\">{{ tick.value }}</span>\n </div>\n }\n }\n </div>\n\n @if (creationMode) {\n <div class=\"inputs\">\n <herum-input-field class=\"input\" [type]=\"'number'\" [inputValue]=\"min\" [maxValue]=\"max - 1\"\n (inputValueEmitter)=\"_onCreationValueChange($event, 'min')\">\n </herum-input-field>\n\n <herum-input-field class=\"input\" [type]=\"'number'\" [inputValue]=\"max\" [minValue]=\"min + 1\"\n (inputValueEmitter)=\"_onCreationValueChange($event, 'max')\">\n </herum-input-field>\n </div>\n }\n</div>", styles: [":host{display:block;width:100%}.numeric-slider{--thumb-size: 16px;--bubble-height: 40px;--bubble-tail-height: 5px;--slider-progress-color: var(--secondary-color);--slider-fill-color: var(--disable-color);--input-width: 80px;--track-height: 8px;width:100%;min-width:320px}.numeric-slider.creation-mode .ticks{width:calc(100% - var(--input-width));margin-inline:calc(var(--input-width) / 2)}.numeric-slider.creation-mode .ticks .tick{top:-5px;bottom:3px}.numeric-slider .creation-container{display:flex;flex-direction:column;gap:8px}.numeric-slider .creation-container .labels{display:flex;justify-content:space-between;align-items:center;width:calc(100% - var(--thumb-size));margin-inline:calc(var(--thumb-size) / 2)}.numeric-slider .creation-container .labels .label{color:var(--icons-color);font-size:14px;font-weight:700}.numeric-slider .creation-container .slider-shell{width:calc(100% - var(--input-width));margin-inline:calc(var(--input-width) * .5)}.numeric-slider .creation-container .slider-shell .track{position:absolute;inset-inline:0;top:50%;transform:translateY(-50%);height:var(--track-height);background:var(--slider-fill-color);border-radius:var(--border-radius)}.numeric-slider .creation-container .slider-shell .slider-input-range{position:absolute;inset:0}.numeric-slider .creation-container .slider-shell .slider-input{cursor:default}.numeric-slider .creation-container .slider-shell .slider-input::-webkit-slider-thumb{cursor:default}.numeric-slider .slider-shell{position:relative;padding-top:24px}.numeric-slider .inputs{display:flex;justify-content:space-between;margin-inline:calc(var(--input-width) / -2) calc(var(--input-width) / 2);margin-top:8px}.numeric-slider .inputs .input{width:var(--input-width);transform:translate(-50%)}.numeric-slider .value-bubble{position:absolute;top:-16px;transform:translate(-50%);width:52px;height:var(--bubble-height);pointer-events:none}.numeric-slider .value-bubble:before{content:\"\";position:absolute;inset:0;background:var(--secondary-color);-webkit-mask-image:url(/assets/hadracha/general/numericSliderBubble.svg);mask-image:url(/assets/hadracha/general/numericSliderBubble.svg);-webkit-mask-size:100% 100%;mask-size:100% 100%}.numeric-slider .value-bubble .text{position:absolute;top:0;left:0;width:100%;height:calc(var(--bubble-height) - var(--bubble-tail-height));display:flex;align-items:center;justify-content:center;text-align:center;color:var(--light-background-color);font-size:14px;font-weight:400;line-height:1}.numeric-slider .slider-input{position:relative;width:100%;appearance:none;-webkit-appearance:none;direction:rtl;cursor:pointer;z-index:1;background:transparent}.numeric-slider .slider-input::-webkit-slider-runnable-track{height:var(--track-height);border-radius:var(--border-radius);background:linear-gradient(90deg,var(--slider-fill-color) 0,var(--slider-fill-color) var(--slider-progress),var(--slider-progress-color) var(--slider-progress),var(--slider-progress-color) 100%)}.numeric-slider .slider-input::-webkit-slider-thumb{position:relative;-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);margin-top:-4px;border-radius:50%;background-color:var(--light-background-color);border:1.5px solid var(--secondary-text-color);cursor:grab}.numeric-slider .ticks{position:relative;width:calc(100% - var(--thumb-size));margin-inline:calc(var(--thumb-size) / 2);direction:ltr;height:30px;top:-3px}.numeric-slider .tick{position:absolute;top:-2px;bottom:0;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0}.numeric-slider .tick .tick-mark{width:1.5px;height:8px;background:var(--secondary-text-color)}.numeric-slider .tick .tick-label{color:var(--secondary-text-color);line-height:1;margin-top:auto;text-align:center;line-height:normal;font-weight:400;font-size:12px}.numeric-slider .tick .edge-tick{font-weight:700;font-size:14px;color:var(--icons-color)}.numeric-slider.disabled{--slider-progress-color: var(--disable-color);--slider-fill-color: var(--slider-disabled-fill-color)}.numeric-slider.disabled .slider-input{cursor:default}.numeric-slider.disabled .slider-input::-webkit-slider-thumb{cursor:default}.numeric-slider.disabled .tick .edge-tick{color:var(--slider-disabled-fill-color)}.numeric-slider.disabled .value-bubble:before{background:var(--disable-color)}\n"] }]
|
|
2740
2768
|
}], propDecorators: { min: [{
|
|
2741
2769
|
type: Input
|
|
2742
2770
|
}], max: [{
|
|
@@ -2745,6 +2773,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2745
2773
|
type: Input
|
|
2746
2774
|
}], disabled: [{
|
|
2747
2775
|
type: Input
|
|
2776
|
+
}], creationMode: [{
|
|
2777
|
+
type: Input
|
|
2778
|
+
}], visualTickSegments: [{
|
|
2779
|
+
type: Input
|
|
2748
2780
|
}], valueChange: [{
|
|
2749
2781
|
type: Output
|
|
2750
2782
|
}] } });
|