@seniorsistemas/angular-components 19.2.0 → 19.3.0
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/dynamic-form/dynamic-form/dynamic-form.directive.d.ts +3 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/field.d.ts +7 -0
- package/dynamic-form/public-api.d.ts +2 -3
- package/esm2022/dynamic-form/dynamic-form/dynamic-form.directive.mjs +17 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/field.mjs +1 -1
- package/esm2022/dynamic-form/public-api.mjs +3 -4
- package/esm2022/lib/locale/fallback.mjs +10 -2
- package/esm2022/spotlight/lib/spotlight/spotlight-overlay/spotlight-overlay.component.mjs +460 -0
- package/esm2022/spotlight/lib/spotlight/spotlight-step.directive.mjs +50 -0
- package/esm2022/spotlight/lib/spotlight/spotlight-tour.service.mjs +251 -0
- package/esm2022/spotlight/lib/spotlight/spotlight.component.mjs +193 -0
- package/esm2022/spotlight/lib/spotlight/types/spotlight-position.mjs +2 -0
- package/esm2022/spotlight/lib/spotlight/types/spotlight-step.mjs +2 -0
- package/esm2022/spotlight/lib/spotlight/types/spotlight-stop-event.mjs +2 -0
- package/esm2022/spotlight/public-api.mjs +4 -0
- package/esm2022/spotlight/seniorsistemas-angular-components-spotlight.mjs +5 -0
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +16 -0
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-spotlight.mjs +947 -0
- package/fesm2022/seniorsistemas-angular-components-spotlight.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components.mjs +9 -1
- package/fesm2022/seniorsistemas-angular-components.mjs.map +1 -1
- package/package.json +13 -7
- package/spotlight/README.md +311 -0
- package/spotlight/index.d.ts +5 -0
- package/spotlight/lib/spotlight/spotlight-overlay/spotlight-overlay.component.d.ts +70 -0
- package/spotlight/lib/spotlight/spotlight-step.directive.d.ts +28 -0
- package/spotlight/lib/spotlight/spotlight-tour.service.d.ts +146 -0
- package/spotlight/lib/spotlight/spotlight.component.d.ts +82 -0
- package/spotlight/lib/spotlight/types/spotlight-position.d.ts +1 -0
- package/spotlight/lib/spotlight/types/spotlight-step.d.ts +21 -0
- package/spotlight/lib/spotlight/types/spotlight-stop-event.d.ts +13 -0
- package/spotlight/public-api.d.ts +6 -0
|
@@ -7,6 +7,7 @@ import { ButtonComponent } from '@seniorsistemas/angular-components/button';
|
|
|
7
7
|
import * as i1 from '@seniorsistemas/angular-components/control-errors';
|
|
8
8
|
import { ControlErrorsModule } from '@seniorsistemas/angular-components/control-errors';
|
|
9
9
|
import { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';
|
|
10
|
+
import { SpotlightTourService } from '@seniorsistemas/angular-components/spotlight';
|
|
10
11
|
import { takeUntil, Subject, delay } from 'rxjs';
|
|
11
12
|
import * as i1$2 from '@seniorsistemas/angular-components/fieldset';
|
|
12
13
|
import { FieldsetModule } from '@seniorsistemas/angular-components/fieldset';
|
|
@@ -193,6 +194,7 @@ class DynamicFormDirective {
|
|
|
193
194
|
}
|
|
194
195
|
component = null;
|
|
195
196
|
viewContainerRef = inject(ViewContainerRef);
|
|
197
|
+
spotlightTourService = inject(SpotlightTourService, { optional: true });
|
|
196
198
|
ngOnInit() {
|
|
197
199
|
if (this.isField(this.config)) {
|
|
198
200
|
if (!this.config.id && this.id) {
|
|
@@ -218,6 +220,7 @@ class DynamicFormDirective {
|
|
|
218
220
|
if (this.component && 'errorMessages' in this.component.instance) {
|
|
219
221
|
this.component.setInput('errorMessages', this.errorMessages);
|
|
220
222
|
}
|
|
223
|
+
this.registerSpotlightStep();
|
|
221
224
|
}
|
|
222
225
|
ngOnChanges() {
|
|
223
226
|
if (this.component) {
|
|
@@ -229,6 +232,7 @@ class DynamicFormDirective {
|
|
|
229
232
|
}
|
|
230
233
|
ngOnDestroy() {
|
|
231
234
|
this.component?.destroy();
|
|
235
|
+
this.unregisterSpotlightStep();
|
|
232
236
|
}
|
|
233
237
|
isField(config) {
|
|
234
238
|
return !this.isStructure(config);
|
|
@@ -239,6 +243,18 @@ class DynamicFormDirective {
|
|
|
239
243
|
get getType() {
|
|
240
244
|
return this.config.type;
|
|
241
245
|
}
|
|
246
|
+
registerSpotlightStep() {
|
|
247
|
+
const stepId = this.config?.spotlightStepId;
|
|
248
|
+
if (!stepId || !this.spotlightTourService || !this.component)
|
|
249
|
+
return;
|
|
250
|
+
this.spotlightTourService.registerElement(stepId, this.component.location);
|
|
251
|
+
}
|
|
252
|
+
unregisterSpotlightStep() {
|
|
253
|
+
const stepId = this.config?.spotlightStepId;
|
|
254
|
+
if (!stepId || !this.spotlightTourService)
|
|
255
|
+
return;
|
|
256
|
+
this.spotlightTourService.unregisterElement(stepId);
|
|
257
|
+
}
|
|
242
258
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
243
259
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DynamicFormDirective, isStandalone: true, selector: "[sDynamicForm]", inputs: { sDynamicForm: "sDynamicForm" }, usesOnChanges: true, ngImport: i0 });
|
|
244
260
|
}
|