@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.
Files changed (33) hide show
  1. package/dynamic-form/dynamic-form/dynamic-form.directive.d.ts +3 -0
  2. package/dynamic-form/dynamic-form/form-field/configurations/fields/field.d.ts +7 -0
  3. package/dynamic-form/public-api.d.ts +2 -3
  4. package/esm2022/dynamic-form/dynamic-form/dynamic-form.directive.mjs +17 -1
  5. package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/field.mjs +1 -1
  6. package/esm2022/dynamic-form/public-api.mjs +3 -4
  7. package/esm2022/lib/locale/fallback.mjs +10 -2
  8. package/esm2022/spotlight/lib/spotlight/spotlight-overlay/spotlight-overlay.component.mjs +460 -0
  9. package/esm2022/spotlight/lib/spotlight/spotlight-step.directive.mjs +50 -0
  10. package/esm2022/spotlight/lib/spotlight/spotlight-tour.service.mjs +251 -0
  11. package/esm2022/spotlight/lib/spotlight/spotlight.component.mjs +193 -0
  12. package/esm2022/spotlight/lib/spotlight/types/spotlight-position.mjs +2 -0
  13. package/esm2022/spotlight/lib/spotlight/types/spotlight-step.mjs +2 -0
  14. package/esm2022/spotlight/lib/spotlight/types/spotlight-stop-event.mjs +2 -0
  15. package/esm2022/spotlight/public-api.mjs +4 -0
  16. package/esm2022/spotlight/seniorsistemas-angular-components-spotlight.mjs +5 -0
  17. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +16 -0
  18. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
  19. package/fesm2022/seniorsistemas-angular-components-spotlight.mjs +947 -0
  20. package/fesm2022/seniorsistemas-angular-components-spotlight.mjs.map +1 -0
  21. package/fesm2022/seniorsistemas-angular-components.mjs +9 -1
  22. package/fesm2022/seniorsistemas-angular-components.mjs.map +1 -1
  23. package/package.json +13 -7
  24. package/spotlight/README.md +311 -0
  25. package/spotlight/index.d.ts +5 -0
  26. package/spotlight/lib/spotlight/spotlight-overlay/spotlight-overlay.component.d.ts +70 -0
  27. package/spotlight/lib/spotlight/spotlight-step.directive.d.ts +28 -0
  28. package/spotlight/lib/spotlight/spotlight-tour.service.d.ts +146 -0
  29. package/spotlight/lib/spotlight/spotlight.component.d.ts +82 -0
  30. package/spotlight/lib/spotlight/types/spotlight-position.d.ts +1 -0
  31. package/spotlight/lib/spotlight/types/spotlight-step.d.ts +21 -0
  32. package/spotlight/lib/spotlight/types/spotlight-stop-event.d.ts +13 -0
  33. 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
  }