herum-shared 0.1.63 → 0.1.65
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/assets/shared/icons/numericSliderBubble.svg +3 -0
- package/atoms/index.d.ts +45 -22
- package/fesm2022/herum-shared-atoms.mjs +123 -5
- package/fesm2022/herum-shared-atoms.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.mjs +125 -5
- package/fesm2022/herum-shared.mjs.map +1 -1
- package/index.d.ts +49 -26
- package/molecules/index.d.ts +1 -1
- package/package.json +1 -1
- package/services/index.d.ts +1 -1
- package/styles/variables/_colors.scss +2 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 39" fill="none">
|
|
2
|
+
<path d="M21.6699 34L9 34C4.02944 34 7.89378e-07 29.9706 1.22392e-06 25L2.62268e-06 9C3.05722e-06 4.02943 4.02944 -4.19372e-06 9 -3.75918e-06L43 -7.86805e-07C47.9706 -3.52265e-07 52 4.02944 52 9L52 25C52 29.9706 47.9706 34 43 34L30.3301 34L26 39L21.6699 34Z" fill="#A255FF"/>
|
|
3
|
+
</svg>
|
package/atoms/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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 } from 'herum-types/Shared';
|
|
5
|
-
import * as
|
|
4
|
+
import { IdentifiedEntity, RecursiveTitledOption, FileData, MenuItem, NumericSliderRange, Tick } from 'herum-types/Shared';
|
|
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';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i55 from '@angular/material/core';
|
|
9
9
|
import { DateAdapter } from '@angular/material/core';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i54 from '@angular/material/datepicker';
|
|
11
11
|
import { DateRange, MatCalendar } from '@angular/material/datepicker';
|
|
12
12
|
import { Subject } from 'rxjs';
|
|
13
13
|
import { TextChange } from 'herum-types/TrackTextChanges';
|
|
14
14
|
import { UserPreview } from 'herum-types/Previews';
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
15
|
+
import * as i40 from '@angular/common';
|
|
16
|
+
import * as i42 from '@angular/material/menu';
|
|
17
|
+
import * as i43 from '@angular/cdk/clipboard';
|
|
18
|
+
import * as i44 from '@angular/material/autocomplete';
|
|
19
|
+
import * as i45 from '@angular/material/chips';
|
|
20
|
+
import * as i46 from '@angular/material/form-field';
|
|
21
|
+
import * as i47 from '@angular/material/tooltip';
|
|
22
|
+
import * as i48 from '@angular/material/input';
|
|
23
|
+
import * as i49 from '@angular/material/select';
|
|
24
|
+
import * as i50 from '@angular/material/icon';
|
|
25
|
+
import * as i51 from '@angular/material/checkbox';
|
|
26
|
+
import * as i52 from '@angular/material/slider';
|
|
27
|
+
import * as i53 from '@angular/cdk/drag-drop';
|
|
28
|
+
import * as i56 from 'herum-shared/directives';
|
|
29
|
+
import * as i57 from 'herum-shared/pipes';
|
|
30
30
|
|
|
31
31
|
declare class CollegeLoaderComponent implements OnInit {
|
|
32
32
|
bars: any[];
|
|
@@ -695,7 +695,7 @@ declare class HerumUploadFileComponent implements ControlValueAccessor {
|
|
|
695
695
|
registerOnChange(fn: any): void;
|
|
696
696
|
registerOnTouched(fn: any): void;
|
|
697
697
|
get directoryName(): string;
|
|
698
|
-
get formControl():
|
|
698
|
+
get formControl(): i41.AbstractControl<any, any, any>;
|
|
699
699
|
static ɵfac: i0.ɵɵFactoryDeclaration<HerumUploadFileComponent, [{ optional: true; }]>;
|
|
700
700
|
static ɵcmp: i0.ɵɵComponentDeclaration<HerumUploadFileComponent, "herum-upload-file", never, { "size": { "alias": "size"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "isDirectoryMode": { "alias": "isDirectoryMode"; "required": false; }; "allowedFileTypes": { "alias": "allowedFileTypes"; "required": false; }; "selectedFile": { "alias": "selectedFile"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "isEditMode": { "alias": "isEditMode"; "required": false; }; }, { "uploadFile": "uploadFile"; }, never, never, false, never>;
|
|
701
701
|
}
|
|
@@ -812,9 +812,32 @@ declare class UserProfileImageComponent {
|
|
|
812
812
|
static ɵcmp: i0.ɵɵComponentDeclaration<UserProfileImageComponent, "user-profile-image", never, { "imageSize": { "alias": "imageSize"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "user": { "alias": "user"; "required": false; }; "isLoadingUser": { "alias": "isLoadingUser"; "required": false; }; "isUserClickAble": { "alias": "isUserClickAble"; "required": false; }; }, { "userClicked": "userClicked"; }, never, ["*"], false, never>;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
+
declare class NumericSliderComponent {
|
|
816
|
+
min: number;
|
|
817
|
+
max: number;
|
|
818
|
+
value: number;
|
|
819
|
+
disabled: boolean;
|
|
820
|
+
creationMode: boolean;
|
|
821
|
+
valueChange: EventEmitter<number | NumericSliderRange>;
|
|
822
|
+
ticks: Array<Tick>;
|
|
823
|
+
trackStyle: Record<string, string>;
|
|
824
|
+
bubbleStyle: Record<string, string>;
|
|
825
|
+
creationTrackStyle: Record<string, string>;
|
|
826
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
827
|
+
_onInput(event: Event): void;
|
|
828
|
+
_onCreationValueChange(value: string | number, thumb: 'min' | 'max'): void;
|
|
829
|
+
_onEmitValue(): void;
|
|
830
|
+
private recalculateViewModel;
|
|
831
|
+
private getTicks;
|
|
832
|
+
private getBubbleOffsetPercent;
|
|
833
|
+
private getBubbleStyle;
|
|
834
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumericSliderComponent, never>;
|
|
835
|
+
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; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
|
|
836
|
+
}
|
|
837
|
+
|
|
815
838
|
declare class AtomsModule {
|
|
816
839
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtomsModule, never>;
|
|
817
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AtomsModule, [typeof CollegeLoaderComponent, typeof UsersProfilePreviewComponent, typeof HerumBreadcrumbsComponent, typeof SliceBreadcrumbsPipe, typeof HerumButtonComponent, typeof HerumCheckboxComponent, typeof HerumChipComponent, typeof HerumCircularProgressBarComponent, typeof HerumDatePickerComponent, typeof HerumDownloadFileComponent, typeof HerumEllipsisLoaderComponent, typeof HerumIconLabelComponent, typeof HerumIndeterminateComponent, typeof ConditionalFormControlNameDirective, typeof HerumInputFieldComponent, typeof HerumLogoComponent, typeof HerumMultiSelectComponent, typeof HerumNarrowCollectionMenuItemComponent, typeof HerumNoResultMessageComponent, typeof HerumOptionsListComponent, typeof HerumPaginatorComponent, typeof HerumPanelLinksComponent, typeof HerumProgressBarComponent, typeof HerumQuizHeaderItemComponent, typeof HerumRecursiveHierarchyOptionsListComponent, typeof HerumSelectComponent, typeof HerumSliderComponent, typeof HerumSpinnerComponent, typeof HerumSwitchComponent, typeof HerumTextAreaComponent, typeof HerumTimePickerComponent, typeof HerumToggleButtonComponent, typeof HerumUploadFileComponent, typeof HerumVideoSelectComponent, typeof HerumRadioButtonComponent, typeof RoundedVerticalMenuComponent, typeof TrackTextChangesNotesComponent, typeof UserProfileImageComponent], [typeof
|
|
840
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AtomsModule, [typeof CollegeLoaderComponent, typeof UsersProfilePreviewComponent, typeof HerumBreadcrumbsComponent, typeof SliceBreadcrumbsPipe, typeof HerumButtonComponent, typeof HerumCheckboxComponent, typeof HerumChipComponent, typeof HerumCircularProgressBarComponent, typeof HerumDatePickerComponent, typeof HerumDownloadFileComponent, typeof HerumEllipsisLoaderComponent, typeof HerumIconLabelComponent, typeof HerumIndeterminateComponent, typeof ConditionalFormControlNameDirective, typeof HerumInputFieldComponent, typeof HerumLogoComponent, typeof HerumMultiSelectComponent, typeof HerumNarrowCollectionMenuItemComponent, typeof HerumNoResultMessageComponent, typeof HerumOptionsListComponent, typeof HerumPaginatorComponent, typeof HerumPanelLinksComponent, typeof HerumProgressBarComponent, typeof HerumQuizHeaderItemComponent, typeof HerumRecursiveHierarchyOptionsListComponent, typeof HerumSelectComponent, typeof HerumSliderComponent, typeof HerumSpinnerComponent, typeof HerumSwitchComponent, typeof HerumTextAreaComponent, typeof HerumTimePickerComponent, typeof HerumToggleButtonComponent, typeof HerumUploadFileComponent, typeof HerumVideoSelectComponent, typeof HerumRadioButtonComponent, typeof RoundedVerticalMenuComponent, typeof TrackTextChangesNotesComponent, typeof UserProfileImageComponent, typeof NumericSliderComponent], [typeof i40.CommonModule, typeof i41.ReactiveFormsModule, typeof i41.FormsModule, typeof i42.MatMenuModule, typeof i43.ClipboardModule, typeof i44.MatAutocompleteModule, typeof i45.MatChipsModule, typeof i46.MatFormFieldModule, typeof i47.MatTooltipModule, typeof i48.MatInputModule, typeof i49.MatSelectModule, typeof i50.MatIconModule, typeof i51.MatCheckboxModule, typeof i52.MatSliderModule, typeof i53.DragDropModule, typeof i54.MatDatepickerModule, typeof i55.MatNativeDateModule, typeof i56.DirectivesModule, typeof i57.PipesModule], [typeof CollegeLoaderComponent, typeof UsersProfilePreviewComponent, typeof HerumBreadcrumbsComponent, typeof SliceBreadcrumbsPipe, typeof HerumButtonComponent, typeof HerumCheckboxComponent, typeof HerumChipComponent, typeof HerumCircularProgressBarComponent, typeof HerumDatePickerComponent, typeof HerumDownloadFileComponent, typeof HerumEllipsisLoaderComponent, typeof HerumIconLabelComponent, typeof HerumIndeterminateComponent, typeof ConditionalFormControlNameDirective, typeof HerumInputFieldComponent, typeof HerumLogoComponent, typeof HerumMultiSelectComponent, typeof HerumNarrowCollectionMenuItemComponent, typeof HerumNoResultMessageComponent, typeof HerumOptionsListComponent, typeof HerumPaginatorComponent, typeof HerumPanelLinksComponent, typeof HerumProgressBarComponent, typeof HerumQuizHeaderItemComponent, typeof HerumRecursiveHierarchyOptionsListComponent, typeof HerumSelectComponent, typeof HerumSliderComponent, typeof HerumSpinnerComponent, typeof HerumSwitchComponent, typeof HerumTextAreaComponent, typeof HerumTimePickerComponent, typeof HerumToggleButtonComponent, typeof HerumUploadFileComponent, typeof HerumVideoSelectComponent, typeof HerumRadioButtonComponent, typeof RoundedVerticalMenuComponent, typeof TrackTextChangesNotesComponent, typeof UserProfileImageComponent, typeof NumericSliderComponent]>;
|
|
818
841
|
static ɵinj: i0.ɵɵInjectorDeclaration<AtomsModule>;
|
|
819
842
|
}
|
|
820
843
|
|
|
@@ -833,4 +856,4 @@ declare class HerumFormControl extends FormControl {
|
|
|
833
856
|
private setCurrentErrorMessage;
|
|
834
857
|
}
|
|
835
858
|
|
|
836
|
-
export { AtomsModule, CollegeLoaderComponent, ConditionalFormControlNameDirective, HerumBreadcrumbsComponent, HerumButtonComponent, HerumCheckboxComponent, HerumChipComponent, HerumCircularProgressBarComponent, HerumDatePickerComponent, HerumDownloadFileComponent, HerumEllipsisLoaderComponent, HerumFormControl, HerumIconLabelComponent, HerumIndeterminateComponent, HerumInputFieldComponent, HerumLogoComponent, HerumMultiSelectComponent, HerumNarrowCollectionMenuItemComponent, HerumNoResultMessageComponent, HerumOptionsListComponent, HerumPaginatorComponent, HerumPanelLinksComponent, HerumProgressBarComponent, HerumQuizHeaderItemComponent, HerumRadioButtonComponent, HerumRecursiveHierarchyOptionsListComponent, HerumSelectComponent, HerumSliderComponent, HerumSpinnerComponent, HerumSwitchComponent, HerumTextAreaComponent, HerumTimePickerComponent, HerumToggleButtonComponent, HerumUploadFileComponent, HerumVideoSelectComponent, RoundedVerticalMenuComponent, SliceBreadcrumbsPipe, TrackTextChangesNotesComponent, UserProfileImageComponent, UsersProfilePreviewComponent };
|
|
859
|
+
export { AtomsModule, CollegeLoaderComponent, ConditionalFormControlNameDirective, HerumBreadcrumbsComponent, HerumButtonComponent, HerumCheckboxComponent, HerumChipComponent, HerumCircularProgressBarComponent, HerumDatePickerComponent, HerumDownloadFileComponent, HerumEllipsisLoaderComponent, HerumFormControl, HerumIconLabelComponent, HerumIndeterminateComponent, HerumInputFieldComponent, HerumLogoComponent, HerumMultiSelectComponent, HerumNarrowCollectionMenuItemComponent, HerumNoResultMessageComponent, HerumOptionsListComponent, HerumPaginatorComponent, HerumPanelLinksComponent, HerumProgressBarComponent, HerumQuizHeaderItemComponent, HerumRadioButtonComponent, HerumRecursiveHierarchyOptionsListComponent, HerumSelectComponent, HerumSliderComponent, HerumSpinnerComponent, HerumSwitchComponent, HerumTextAreaComponent, HerumTimePickerComponent, HerumToggleButtonComponent, HerumUploadFileComponent, HerumVideoSelectComponent, NumericSliderComponent, RoundedVerticalMenuComponent, SliceBreadcrumbsPipe, TrackTextChangesNotesComponent, UserProfileImageComponent, UsersProfilePreviewComponent };
|
|
@@ -2665,6 +2665,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2665
2665
|
type: Input
|
|
2666
2666
|
}] } });
|
|
2667
2667
|
|
|
2668
|
+
const thumbSize = 16;
|
|
2669
|
+
const visualTickSegments = 10;
|
|
2670
|
+
class NumericSliderComponent {
|
|
2671
|
+
min = 0;
|
|
2672
|
+
max = 100;
|
|
2673
|
+
value = 0;
|
|
2674
|
+
disabled = true;
|
|
2675
|
+
creationMode = false;
|
|
2676
|
+
valueChange = new EventEmitter();
|
|
2677
|
+
ticks = [];
|
|
2678
|
+
trackStyle = {};
|
|
2679
|
+
bubbleStyle = {};
|
|
2680
|
+
creationTrackStyle = {};
|
|
2681
|
+
ngOnChanges(changes) {
|
|
2682
|
+
if (changes['min'] || changes['max'] || changes['value'] || changes['creationMode'])
|
|
2683
|
+
this.recalculateViewModel();
|
|
2684
|
+
}
|
|
2685
|
+
_onInput(event) {
|
|
2686
|
+
const inputElement = event.target;
|
|
2687
|
+
this.value = Math.round(Number(inputElement.value));
|
|
2688
|
+
;
|
|
2689
|
+
this.recalculateViewModel();
|
|
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
|
+
}
|
|
2702
|
+
_onEmitValue() {
|
|
2703
|
+
if (this.creationMode) {
|
|
2704
|
+
this.valueChange.emit({
|
|
2705
|
+
min: this.min,
|
|
2706
|
+
max: this.max
|
|
2707
|
+
});
|
|
2708
|
+
return;
|
|
2709
|
+
}
|
|
2710
|
+
this.valueChange.emit(this.value);
|
|
2711
|
+
}
|
|
2712
|
+
recalculateViewModel() {
|
|
2713
|
+
this.ticks = this.getTicks(this.min, this.max);
|
|
2714
|
+
if (this.creationMode)
|
|
2715
|
+
return;
|
|
2716
|
+
const bubbleOffsetPercent = this.getBubbleOffsetPercent(this.value);
|
|
2717
|
+
this.trackStyle = { '--slider-progress': `${bubbleOffsetPercent}%` };
|
|
2718
|
+
this.bubbleStyle = this.getBubbleStyle(bubbleOffsetPercent);
|
|
2719
|
+
}
|
|
2720
|
+
getTicks(minValue, maxValue) {
|
|
2721
|
+
const range = maxValue - minValue;
|
|
2722
|
+
if (range <= 0)
|
|
2723
|
+
return [{ value: maxValue, offsetPercent: 0, isEdge: true }];
|
|
2724
|
+
const ticks = [];
|
|
2725
|
+
if (range <= 10) {
|
|
2726
|
+
for (let tick = maxValue; tick >= minValue; tick--) {
|
|
2727
|
+
ticks.push({
|
|
2728
|
+
value: tick,
|
|
2729
|
+
offsetPercent: ((maxValue - tick) / range) * 100,
|
|
2730
|
+
isEdge: tick === maxValue || tick === minValue
|
|
2731
|
+
});
|
|
2732
|
+
}
|
|
2733
|
+
;
|
|
2734
|
+
return ticks;
|
|
2735
|
+
}
|
|
2736
|
+
const inclusiveRange = maxValue - minValue + 1;
|
|
2737
|
+
for (let index = 0; index <= visualTickSegments; index++) {
|
|
2738
|
+
const value = index === visualTickSegments
|
|
2739
|
+
? minValue
|
|
2740
|
+
: Math.round(maxValue - ((inclusiveRange / visualTickSegments) * index));
|
|
2741
|
+
ticks.push({
|
|
2742
|
+
value: value,
|
|
2743
|
+
offsetPercent: ((maxValue - value) / range) * 100,
|
|
2744
|
+
isEdge: index === 0 || index === visualTickSegments
|
|
2745
|
+
});
|
|
2746
|
+
}
|
|
2747
|
+
;
|
|
2748
|
+
return ticks;
|
|
2749
|
+
}
|
|
2750
|
+
getBubbleOffsetPercent(currentValue) {
|
|
2751
|
+
const range = this.max - this.min;
|
|
2752
|
+
if (range === 0)
|
|
2753
|
+
return 50;
|
|
2754
|
+
return ((this.max - currentValue) / range) * 100;
|
|
2755
|
+
}
|
|
2756
|
+
getBubbleStyle(offsetPercent) {
|
|
2757
|
+
const thumbCenterCompensation = (thumbSize / 2) - (thumbSize * offsetPercent / 100);
|
|
2758
|
+
return {
|
|
2759
|
+
left: `calc(${offsetPercent}% + ${thumbCenterCompensation}px)`
|
|
2760
|
+
};
|
|
2761
|
+
}
|
|
2762
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: NumericSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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" }, 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"] }] });
|
|
2764
|
+
}
|
|
2765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: NumericSliderComponent, decorators: [{
|
|
2766
|
+
type: Component,
|
|
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"] }]
|
|
2768
|
+
}], propDecorators: { min: [{
|
|
2769
|
+
type: Input
|
|
2770
|
+
}], max: [{
|
|
2771
|
+
type: Input
|
|
2772
|
+
}], value: [{
|
|
2773
|
+
type: Input
|
|
2774
|
+
}], disabled: [{
|
|
2775
|
+
type: Input
|
|
2776
|
+
}], creationMode: [{
|
|
2777
|
+
type: Input
|
|
2778
|
+
}], valueChange: [{
|
|
2779
|
+
type: Output
|
|
2780
|
+
}] } });
|
|
2781
|
+
|
|
2668
2782
|
class AtomsModule {
|
|
2669
2783
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2670
2784
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, declarations: [CollegeLoaderComponent,
|
|
@@ -2704,7 +2818,8 @@ class AtomsModule {
|
|
|
2704
2818
|
HerumRadioButtonComponent,
|
|
2705
2819
|
RoundedVerticalMenuComponent,
|
|
2706
2820
|
TrackTextChangesNotesComponent,
|
|
2707
|
-
UserProfileImageComponent
|
|
2821
|
+
UserProfileImageComponent,
|
|
2822
|
+
NumericSliderComponent], imports: [CommonModule,
|
|
2708
2823
|
ReactiveFormsModule,
|
|
2709
2824
|
FormsModule,
|
|
2710
2825
|
MatMenuModule,
|
|
@@ -2759,7 +2874,8 @@ class AtomsModule {
|
|
|
2759
2874
|
HerumRadioButtonComponent,
|
|
2760
2875
|
RoundedVerticalMenuComponent,
|
|
2761
2876
|
TrackTextChangesNotesComponent,
|
|
2762
|
-
UserProfileImageComponent
|
|
2877
|
+
UserProfileImageComponent,
|
|
2878
|
+
NumericSliderComponent] });
|
|
2763
2879
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, providers: [
|
|
2764
2880
|
{ provide: MAT_DATE_LOCALE, useValue: 'he-IL' },
|
|
2765
2881
|
], imports: [CommonModule,
|
|
@@ -2823,7 +2939,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2823
2939
|
HerumRadioButtonComponent,
|
|
2824
2940
|
RoundedVerticalMenuComponent,
|
|
2825
2941
|
TrackTextChangesNotesComponent,
|
|
2826
|
-
UserProfileImageComponent
|
|
2942
|
+
UserProfileImageComponent,
|
|
2943
|
+
NumericSliderComponent
|
|
2827
2944
|
],
|
|
2828
2945
|
exports: [
|
|
2829
2946
|
CollegeLoaderComponent,
|
|
@@ -2863,7 +2980,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2863
2980
|
HerumRadioButtonComponent,
|
|
2864
2981
|
RoundedVerticalMenuComponent,
|
|
2865
2982
|
TrackTextChangesNotesComponent,
|
|
2866
|
-
UserProfileImageComponent
|
|
2983
|
+
UserProfileImageComponent,
|
|
2984
|
+
NumericSliderComponent
|
|
2867
2985
|
],
|
|
2868
2986
|
imports: [
|
|
2869
2987
|
CommonModule,
|
|
@@ -2922,5 +3040,5 @@ class HerumFormControl extends FormControl {
|
|
|
2922
3040
|
* Generated bundle index. Do not edit.
|
|
2923
3041
|
*/
|
|
2924
3042
|
|
|
2925
|
-
export { AtomsModule, CollegeLoaderComponent, ConditionalFormControlNameDirective, HerumBreadcrumbsComponent, HerumButtonComponent, HerumCheckboxComponent, HerumChipComponent, HerumCircularProgressBarComponent, HerumDatePickerComponent, HerumDownloadFileComponent, HerumEllipsisLoaderComponent, HerumFormControl, HerumIconLabelComponent, HerumIndeterminateComponent, HerumInputFieldComponent, HerumLogoComponent, HerumMultiSelectComponent, HerumNarrowCollectionMenuItemComponent, HerumNoResultMessageComponent, HerumOptionsListComponent, HerumPaginatorComponent, HerumPanelLinksComponent, HerumProgressBarComponent, HerumQuizHeaderItemComponent, HerumRadioButtonComponent, HerumRecursiveHierarchyOptionsListComponent, HerumSelectComponent, HerumSliderComponent, HerumSpinnerComponent, HerumSwitchComponent, HerumTextAreaComponent, HerumTimePickerComponent, HerumToggleButtonComponent, HerumUploadFileComponent, HerumVideoSelectComponent, RoundedVerticalMenuComponent, SliceBreadcrumbsPipe, TrackTextChangesNotesComponent, UserProfileImageComponent, UsersProfilePreviewComponent };
|
|
3043
|
+
export { AtomsModule, CollegeLoaderComponent, ConditionalFormControlNameDirective, HerumBreadcrumbsComponent, HerumButtonComponent, HerumCheckboxComponent, HerumChipComponent, HerumCircularProgressBarComponent, HerumDatePickerComponent, HerumDownloadFileComponent, HerumEllipsisLoaderComponent, HerumFormControl, HerumIconLabelComponent, HerumIndeterminateComponent, HerumInputFieldComponent, HerumLogoComponent, HerumMultiSelectComponent, HerumNarrowCollectionMenuItemComponent, HerumNoResultMessageComponent, HerumOptionsListComponent, HerumPaginatorComponent, HerumPanelLinksComponent, HerumProgressBarComponent, HerumQuizHeaderItemComponent, HerumRadioButtonComponent, HerumRecursiveHierarchyOptionsListComponent, HerumSelectComponent, HerumSliderComponent, HerumSpinnerComponent, HerumSwitchComponent, HerumTextAreaComponent, HerumTimePickerComponent, HerumToggleButtonComponent, HerumUploadFileComponent, HerumVideoSelectComponent, NumericSliderComponent, RoundedVerticalMenuComponent, SliceBreadcrumbsPipe, TrackTextChangesNotesComponent, UserProfileImageComponent, UsersProfilePreviewComponent };
|
|
2926
3044
|
//# sourceMappingURL=herum-shared-atoms.mjs.map
|