@agnos-ui/angular-bootstrap 0.8.0-next.0 → 0.8.0-next.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { widgetsConfigFactory, SlotDirective, UseDirective, ComponentTemplate, BaseWidgetDirective, auBooleanAttribute, UseMultiDirective, auNumberAttribute, useDirectiveForHost, callWidgetFactory as callWidgetFactory$1 } from '@agnos-ui/angular-headless';
|
|
2
2
|
export * from '@agnos-ui/angular-headless';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, inject, TemplateRef, Directive, viewChild,
|
|
4
|
+
import { InjectionToken, inject, TemplateRef, Directive, viewChild, ChangeDetectionStrategy, Component, input, contentChild, output, ViewEncapsulation, forwardRef, Injector, runInInjectionContext, NgModule, ApplicationRef, createComponent, EnvironmentInjector, OutputEmitterRef, Injectable } from '@angular/core';
|
|
5
5
|
import { getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick } from '@agnos-ui/core-bootstrap/components/modal';
|
|
6
6
|
import { getPaginationDefaultConfig, createPagination } from '@agnos-ui/core-bootstrap/components/pagination';
|
|
7
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -2839,39 +2839,29 @@ function SliderDefaultTickSlotComponent_ng_template_0_Conditional_0_Template(rf,
|
|
|
2839
2839
|
i0.ɵɵadvance();
|
|
2840
2840
|
i0.ɵɵtextInterpolate1(" ", tick_r3.value, " ");
|
|
2841
2841
|
} }
|
|
2842
|
-
function
|
|
2842
|
+
function SliderDefaultTickSlotComponent_ng_template_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
2843
2843
|
i0.ɵɵnamespaceSVG();
|
|
2844
|
-
i0.ɵɵ
|
|
2845
|
-
i0.ɵɵelement(1, "circle", 4);
|
|
2846
|
-
i0.ɵɵelementEnd();
|
|
2847
|
-
} if (rf & 2) {
|
|
2848
|
-
const state_r4 = i0.ɵɵnextContext().state;
|
|
2849
|
-
i0.ɵɵadvance();
|
|
2850
|
-
i0.ɵɵattribute("stroke", state_r4.disabled() ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-neutral-color)");
|
|
2851
|
-
} }
|
|
2852
|
-
function SliderDefaultTickSlotComponent_ng_template_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
2853
|
-
i0.ɵɵnamespaceSVG();
|
|
2854
|
-
i0.ɵɵelementStart(0, "svg", 3);
|
|
2855
|
-
i0.ɵɵelement(1, "circle", 5)(2, "circle", 6);
|
|
2856
|
-
i0.ɵɵelementEnd();
|
|
2857
|
-
} if (rf & 2) {
|
|
2858
|
-
const state_r4 = i0.ɵɵnextContext().state;
|
|
2859
|
-
i0.ɵɵadvance();
|
|
2860
|
-
i0.ɵɵattribute("fill", state_r4.disabled() ? "var(--bs-slider-tick-disabled-color)" : "var(--bs-slider-tick-selected-color)");
|
|
2844
|
+
i0.ɵɵelement(0, "circle", 5);
|
|
2861
2845
|
} }
|
|
2862
2846
|
function SliderDefaultTickSlotComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
2863
2847
|
i0.ɵɵtemplate(0, SliderDefaultTickSlotComponent_ng_template_0_Conditional_0_Template, 2, 7, "span", 2);
|
|
2864
2848
|
i0.ɵɵelementStart(1, "span", 2);
|
|
2865
|
-
i0.ɵɵ
|
|
2866
|
-
i0.ɵɵ
|
|
2849
|
+
i0.ɵɵnamespaceSVG();
|
|
2850
|
+
i0.ɵɵelementStart(2, "svg", 3);
|
|
2851
|
+
i0.ɵɵelement(3, "circle", 4);
|
|
2852
|
+
i0.ɵɵtemplate(4, SliderDefaultTickSlotComponent_ng_template_0_Conditional_4_Template, 1, 0, ":svg:circle", 5);
|
|
2853
|
+
i0.ɵɵelementEnd()();
|
|
2867
2854
|
} if (rf & 2) {
|
|
2855
|
+
const state_r4 = ctx.state;
|
|
2868
2856
|
const directives_r2 = ctx.directives;
|
|
2869
2857
|
const tick_r3 = ctx.tick;
|
|
2870
2858
|
i0.ɵɵconditional(tick_r3.displayLabel ? 0 : -1);
|
|
2871
2859
|
i0.ɵɵadvance();
|
|
2872
|
-
i0.ɵɵproperty("auUse", i0.ɵɵpureFunction2(
|
|
2860
|
+
i0.ɵɵproperty("auUse", i0.ɵɵpureFunction2(9, _c2$3, directives_r2.tickDirective, i0.ɵɵpureFunction1(7, _c4$3, tick_r3)));
|
|
2861
|
+
i0.ɵɵadvance(2);
|
|
2862
|
+
i0.ɵɵclassProp("au-slider-tick-disabled", state_r4.disabled())("au-slider-tick-selected", tick_r3.selected);
|
|
2873
2863
|
i0.ɵɵadvance();
|
|
2874
|
-
i0.ɵɵconditional(
|
|
2864
|
+
i0.ɵɵconditional(tick_r3.selected ? 4 : -1);
|
|
2875
2865
|
} }
|
|
2876
2866
|
const _c5$2 = ["structure"];
|
|
2877
2867
|
const _c6$1 = a0 => ({ option: a0 });
|
|
@@ -3056,18 +3046,6 @@ class SliderHandleDirective {
|
|
|
3056
3046
|
class SliderDefaultHandleSlotComponent {
|
|
3057
3047
|
constructor() {
|
|
3058
3048
|
this.handle = viewChild.required('handle');
|
|
3059
|
-
/**
|
|
3060
|
-
* When the element moves up the DOM Angluar removes the focus
|
|
3061
|
-
* To avoid this we need to manually focus the element by calling the HTMLElement.focus
|
|
3062
|
-
* after the change, afterRenderEffect is executed after each render of the component
|
|
3063
|
-
* and when the signal inside is changed. On each key stroke we set the `refocus` signal
|
|
3064
|
-
* to the element that needs to be focused and we put the `equal` function to always return
|
|
3065
|
-
* `false` in order to trigger the change even when the element is the same
|
|
3066
|
-
*/
|
|
3067
|
-
this.refocus = signal(undefined, { equal: () => false });
|
|
3068
|
-
afterRenderEffect(() => {
|
|
3069
|
-
this.refocus()?.focus();
|
|
3070
|
-
});
|
|
3071
3049
|
}
|
|
3072
3050
|
/**
|
|
3073
3051
|
* Key handler that sets the refocus element only on the key strokes that move
|
|
@@ -3082,12 +3060,18 @@ class SliderDefaultHandleSlotComponent {
|
|
|
3082
3060
|
case 'ArrowUp':
|
|
3083
3061
|
case 'ArrowRight':
|
|
3084
3062
|
case 'End':
|
|
3085
|
-
this.
|
|
3063
|
+
clearTimeout(this.updateTimeout);
|
|
3064
|
+
this.updateTimeout = setTimeout(() => {
|
|
3065
|
+
event.target?.focus();
|
|
3066
|
+
});
|
|
3086
3067
|
break;
|
|
3087
3068
|
default:
|
|
3088
3069
|
break;
|
|
3089
3070
|
}
|
|
3090
3071
|
}
|
|
3072
|
+
ngOnDestroy() {
|
|
3073
|
+
clearTimeout(this.updateTimeout);
|
|
3074
|
+
}
|
|
3091
3075
|
static { this.ɵfac = function SliderDefaultHandleSlotComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SliderDefaultHandleSlotComponent)(); }; }
|
|
3092
3076
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SliderDefaultHandleSlotComponent, selectors: [["ng-component"]], viewQuery: function SliderDefaultHandleSlotComponent_Query(rf, ctx) { if (rf & 1) {
|
|
3093
3077
|
i0.ɵɵviewQuerySignal(ctx.handle, _c0$3, 5);
|
|
@@ -3108,8 +3092,8 @@ class SliderDefaultHandleSlotComponent {
|
|
|
3108
3092
|
</ng-template>
|
|
3109
3093
|
`,
|
|
3110
3094
|
}]
|
|
3111
|
-
}],
|
|
3112
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultHandleSlotComponent, { className: "SliderDefaultHandleSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber:
|
|
3095
|
+
}], null, null); })();
|
|
3096
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultHandleSlotComponent, { className: "SliderDefaultHandleSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber: 64 }); })();
|
|
3113
3097
|
/**
|
|
3114
3098
|
* A constant representing the default slot handle for the slider component.
|
|
3115
3099
|
*/
|
|
@@ -3142,8 +3126,8 @@ class SliderDefaultTickSlotComponent {
|
|
|
3142
3126
|
i0.ɵɵviewQuerySignal(ctx.tick, _c3$3, 5);
|
|
3143
3127
|
} if (rf & 2) {
|
|
3144
3128
|
i0.ɵɵqueryAdvance();
|
|
3145
|
-
} }, decls: 2, vars: 0, consts: [["tick", ""], ["auSliderTick", ""], [3, "auUse"], ["xmlns", "http://www.w3.org/2000/svg",
|
|
3146
|
-
i0.ɵɵtemplate(0, SliderDefaultTickSlotComponent_ng_template_0_Template,
|
|
3129
|
+
} }, decls: 2, vars: 0, consts: [["tick", ""], ["auSliderTick", ""], [3, "auUse"], ["xmlns", "http://www.w3.org/2000/svg"], [1, "au-slider-tick-outer"], [1, "au-slider-tick-inner", "au-slider-tick-selected"]], template: function SliderDefaultTickSlotComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3130
|
+
i0.ɵɵtemplate(0, SliderDefaultTickSlotComponent_ng_template_0_Template, 5, 12, "ng-template", 1, 0, i0.ɵɵtemplateRefExtractor);
|
|
3147
3131
|
} }, dependencies: [UseDirective, SliderTickDirective], encapsulation: 2, changeDetection: 0 }); }
|
|
3148
3132
|
}
|
|
3149
3133
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SliderDefaultTickSlotComponent, [{
|
|
@@ -3159,42 +3143,18 @@ class SliderDefaultTickSlotComponent {
|
|
|
3159
3143
|
</span>
|
|
3160
3144
|
}
|
|
3161
3145
|
<span [auUse]="[directives.tickDirective, {tick}]">
|
|
3162
|
-
|
|
3163
|
-
<
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
<circle
|
|
3169
|
-
cx="50%"
|
|
3170
|
-
cy="50%"
|
|
3171
|
-
r="45%"
|
|
3172
|
-
fill="white"
|
|
3173
|
-
[attr.stroke]="state.disabled() ? 'var(--bs-slider-tick-disabled-color)' : 'var(--bs-slider-tick-neutral-color)'"
|
|
3174
|
-
stroke-width="1.5"
|
|
3175
|
-
/>
|
|
3176
|
-
</svg>
|
|
3177
|
-
} @else {
|
|
3178
|
-
<svg
|
|
3179
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3180
|
-
style="width: var(--bs-slider-tick-secondary-size); height: var(--bs-slider-tick-primary-size);"
|
|
3181
|
-
fill="none"
|
|
3182
|
-
>
|
|
3183
|
-
<circle
|
|
3184
|
-
cx="50%"
|
|
3185
|
-
cy="50%"
|
|
3186
|
-
r="50%"
|
|
3187
|
-
[attr.fill]="state.disabled() ? 'var(--bs-slider-tick-disabled-color)' : 'var(--bs-slider-tick-selected-color)'"
|
|
3188
|
-
/>
|
|
3189
|
-
<circle cx="50%" cy="50%" r="25%" fill="white" />
|
|
3190
|
-
</svg>
|
|
3191
|
-
}
|
|
3146
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
3147
|
+
<circle class="au-slider-tick-outer" [class.au-slider-tick-disabled]="state.disabled()" [class.au-slider-tick-selected]="tick.selected" />
|
|
3148
|
+
@if (tick.selected) {
|
|
3149
|
+
<circle class="au-slider-tick-inner au-slider-tick-selected" />
|
|
3150
|
+
}
|
|
3151
|
+
</svg>
|
|
3192
3152
|
</span>
|
|
3193
3153
|
</ng-template>
|
|
3194
3154
|
`,
|
|
3195
3155
|
}]
|
|
3196
3156
|
}], null, null); })();
|
|
3197
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultTickSlotComponent, { className: "SliderDefaultTickSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber:
|
|
3157
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultTickSlotComponent, { className: "SliderDefaultTickSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber: 136 }); })();
|
|
3198
3158
|
/**
|
|
3199
3159
|
* A constant representing the default slot tick for the slider component.
|
|
3200
3160
|
*/
|
|
@@ -3276,7 +3236,7 @@ class SliderDefaultStructureSlotComponent {
|
|
|
3276
3236
|
`,
|
|
3277
3237
|
}]
|
|
3278
3238
|
}], null, null); })();
|
|
3279
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultStructureSlotComponent, { className: "SliderDefaultStructureSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber:
|
|
3239
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderDefaultStructureSlotComponent, { className: "SliderDefaultStructureSlotComponent", filePath: "components/slider/slider.component.ts", lineNumber: 200 }); })();
|
|
3280
3240
|
/**
|
|
3281
3241
|
* Represents the default slot structure for the slider component.
|
|
3282
3242
|
*/
|
|
@@ -3527,7 +3487,7 @@ class SliderComponent extends BaseWidgetDirective {
|
|
|
3527
3487
|
template: ` <ng-template [auSlot]="state.structure()" [auSlotProps]="{state, api, directives}" /> `,
|
|
3528
3488
|
}]
|
|
3529
3489
|
}], () => [], null); })();
|
|
3530
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderComponent, { className: "SliderComponent", filePath: "components/slider/slider.component.ts", lineNumber:
|
|
3490
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SliderComponent, { className: "SliderComponent", filePath: "components/slider/slider.component.ts", lineNumber: 225 }); })();
|
|
3531
3491
|
|
|
3532
3492
|
/**
|
|
3533
3493
|
* Retrieve a shallow copy of the default Progressbar config
|