tickera-angular-components 0.0.1-dev.194 → 0.0.1-dev.196

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.
@@ -3224,22 +3224,17 @@ class PriceZoneService {
3224
3224
  constructor(apiService) {
3225
3225
  this.apiService = apiService;
3226
3226
  }
3227
- fetchPriceZones({ roomMapId, page, search, limit, } = {}) {
3228
- const queryParams = new URLSearchParams();
3229
- if (roomMapId)
3230
- queryParams.append('room_map_id', roomMapId.toString());
3231
- if (page)
3232
- queryParams.append('page', page.toString());
3233
- if (search)
3234
- queryParams.append('search', search);
3235
- if (limit)
3236
- queryParams.append('limit', limit.toString());
3227
+ fetchPriceZones(params = {}) {
3228
+ const queryParams = transformUrlParams(params);
3229
+ if (params.show_ids?.length) {
3230
+ params.show_ids.forEach((showId) => queryParams.append('show_ids', showId.toString()));
3231
+ }
3237
3232
  const queryString = queryParams.toString();
3238
3233
  const apiRoute = `${PRICE_ZONES_API_ROUTES.FIND_ALL}${queryString ? '?' + queryString : ''}`;
3239
3234
  return this.apiService.get(apiRoute);
3240
3235
  }
3241
- loadPriceZones({ roomMapId, page, search, limit } = {}) {
3242
- this.fetchPriceZones({ roomMapId, page, search, limit }).subscribe({
3236
+ loadPriceZones(params = {}) {
3237
+ this.fetchPriceZones(params).subscribe({
3243
3238
  next: ({ data }) => {
3244
3239
  this.priceZonesSubject.next(data?.price_zones ?? []);
3245
3240
  },
@@ -5862,11 +5857,11 @@ class AppBreadcumbComponent {
5862
5857
  steps = [];
5863
5858
  theme = 'light';
5864
5859
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppBreadcumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5865
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppBreadcumbComponent, isStandalone: true, selector: "app-breadcrumb", inputs: { homeUrl: "homeUrl", steps: "steps", theme: "theme" }, ngImport: i0, template: "<div class=\"breadcrumb\" [class.breadcrumb--dark]=\"theme === 'dark'\">\n <nav class=\"breadcrumb__nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumb__list\">\n <li class=\"breadcrumb__item\">\n @if (!!homeUrl) {\n <a href=\"/\" class=\"breadcrumb__link\"> <i class=\"ri-home-2-line\"></i> Inicio </a>\n } @else {\n <span class=\"breadcrumb__link\"><i class=\"ri-home-2-line\"></i> Inicio</span>\n }\n </li>\n\n @for (step of steps; track step.label) {\n <li class=\"breadcrumb__item\">\n <i class=\"ri-arrow-right-s-line breadcrumb__separator\"></i>\n\n @if (!!step.href) {\n <a [href]=\"step.href\" class=\"breadcrumb__link\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </a>\n } @else {\n <span class=\"breadcrumb__current\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </span>\n }\n </li>\n }\n </ol>\n </nav>\n</div>\n", styles: [".breadcrumb{align-items:center;display:flex;padding:0 1rem;width:100%}.breadcrumb__nav{display:flex;width:100%;max-width:80rem;margin:0 auto}.breadcrumb__list{display:inline-flex;align-items:center;gap:.25rem}@media(min-width:768px){.breadcrumb__list{gap:.5rem}}.breadcrumb__item{display:inline-flex;align-items:center;gap:.375rem}.breadcrumb__link,.breadcrumb__current{display:inline-flex;align-items:center;font-size:.75rem;font-weight:500}.breadcrumb__link{gap:.5rem;color:#374151}.breadcrumb__link:hover{color:#4f46e5}.breadcrumb__current{color:#6b7280}.breadcrumb--dark .breadcrumb__link{color:#f3f4f6}.breadcrumb--dark .breadcrumb__current{color:#d1d5db}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
5860
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppBreadcumbComponent, isStandalone: true, selector: "app-breadcrumb", inputs: { homeUrl: "homeUrl", steps: "steps", theme: "theme" }, ngImport: i0, template: "<div class=\"breadcrumb\" [class.breadcrumb--dark]=\"theme === 'dark'\">\n <nav class=\"breadcrumb__nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumb__list\">\n <li class=\"breadcrumb__item\">\n @if (!!homeUrl) {\n <a [href]=\"homeUrl\" class=\"breadcrumb__link\"> <i class=\"ri-home-2-line\"></i> Inicio </a>\n } @else {\n <span class=\"breadcrumb__link\"><i class=\"ri-home-2-line\"></i> Inicio</span>\n }\n </li>\n\n @for (step of steps; track step.label) {\n <li class=\"breadcrumb__item\">\n <i class=\"ri-arrow-right-s-line breadcrumb__separator\"></i>\n\n @if (!!step.href) {\n <a [href]=\"step.href\" class=\"breadcrumb__link\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </a>\n } @else {\n <span class=\"breadcrumb__current\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </span>\n }\n </li>\n }\n </ol>\n </nav>\n</div>\n", styles: [".breadcrumb{align-items:center;display:flex;padding:0 1rem;width:100%}.breadcrumb__nav{display:flex;width:100%;max-width:80rem;margin:0 auto}.breadcrumb__list{display:inline-flex;align-items:center;gap:.25rem}@media(min-width:768px){.breadcrumb__list{gap:.5rem}}.breadcrumb__item{display:inline-flex;align-items:center;gap:.375rem}.breadcrumb__link,.breadcrumb__current{display:inline-flex;align-items:center;font-size:.75rem;font-weight:500}.breadcrumb__link{gap:.5rem;color:#374151}.breadcrumb__link:hover{color:#4f46e5}.breadcrumb__current{color:#6b7280}.breadcrumb--dark .breadcrumb__link{color:#f3f4f6}.breadcrumb--dark .breadcrumb__current{color:#d1d5db}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
5866
5861
  }
5867
5862
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppBreadcumbComponent, decorators: [{
5868
5863
  type: Component,
5869
- args: [{ selector: 'app-breadcrumb', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"breadcrumb\" [class.breadcrumb--dark]=\"theme === 'dark'\">\n <nav class=\"breadcrumb__nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumb__list\">\n <li class=\"breadcrumb__item\">\n @if (!!homeUrl) {\n <a href=\"/\" class=\"breadcrumb__link\"> <i class=\"ri-home-2-line\"></i> Inicio </a>\n } @else {\n <span class=\"breadcrumb__link\"><i class=\"ri-home-2-line\"></i> Inicio</span>\n }\n </li>\n\n @for (step of steps; track step.label) {\n <li class=\"breadcrumb__item\">\n <i class=\"ri-arrow-right-s-line breadcrumb__separator\"></i>\n\n @if (!!step.href) {\n <a [href]=\"step.href\" class=\"breadcrumb__link\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </a>\n } @else {\n <span class=\"breadcrumb__current\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </span>\n }\n </li>\n }\n </ol>\n </nav>\n</div>\n", styles: [".breadcrumb{align-items:center;display:flex;padding:0 1rem;width:100%}.breadcrumb__nav{display:flex;width:100%;max-width:80rem;margin:0 auto}.breadcrumb__list{display:inline-flex;align-items:center;gap:.25rem}@media(min-width:768px){.breadcrumb__list{gap:.5rem}}.breadcrumb__item{display:inline-flex;align-items:center;gap:.375rem}.breadcrumb__link,.breadcrumb__current{display:inline-flex;align-items:center;font-size:.75rem;font-weight:500}.breadcrumb__link{gap:.5rem;color:#374151}.breadcrumb__link:hover{color:#4f46e5}.breadcrumb__current{color:#6b7280}.breadcrumb--dark .breadcrumb__link{color:#f3f4f6}.breadcrumb--dark .breadcrumb__current{color:#d1d5db}\n"] }]
5864
+ args: [{ selector: 'app-breadcrumb', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"breadcrumb\" [class.breadcrumb--dark]=\"theme === 'dark'\">\n <nav class=\"breadcrumb__nav\" aria-label=\"Breadcrumb\">\n <ol class=\"breadcrumb__list\">\n <li class=\"breadcrumb__item\">\n @if (!!homeUrl) {\n <a [href]=\"homeUrl\" class=\"breadcrumb__link\"> <i class=\"ri-home-2-line\"></i> Inicio </a>\n } @else {\n <span class=\"breadcrumb__link\"><i class=\"ri-home-2-line\"></i> Inicio</span>\n }\n </li>\n\n @for (step of steps; track step.label) {\n <li class=\"breadcrumb__item\">\n <i class=\"ri-arrow-right-s-line breadcrumb__separator\"></i>\n\n @if (!!step.href) {\n <a [href]=\"step.href\" class=\"breadcrumb__link\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </a>\n } @else {\n <span class=\"breadcrumb__current\">\n @if (step.icon; as icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ step.label }}\n </span>\n }\n </li>\n }\n </ol>\n </nav>\n</div>\n", styles: [".breadcrumb{align-items:center;display:flex;padding:0 1rem;width:100%}.breadcrumb__nav{display:flex;width:100%;max-width:80rem;margin:0 auto}.breadcrumb__list{display:inline-flex;align-items:center;gap:.25rem}@media(min-width:768px){.breadcrumb__list{gap:.5rem}}.breadcrumb__item{display:inline-flex;align-items:center;gap:.375rem}.breadcrumb__link,.breadcrumb__current{display:inline-flex;align-items:center;font-size:.75rem;font-weight:500}.breadcrumb__link{gap:.5rem;color:#374151}.breadcrumb__link:hover{color:#4f46e5}.breadcrumb__current{color:#6b7280}.breadcrumb--dark .breadcrumb__link{color:#f3f4f6}.breadcrumb--dark .breadcrumb__current{color:#d1d5db}\n"] }]
5870
5865
  }], propDecorators: { homeUrl: [{
5871
5866
  type: Input
5872
5867
  }], steps: [{
@@ -9279,6 +9274,7 @@ class PriceZoneSelectComponent {
9279
9274
  showError = true;
9280
9275
  customClass = '';
9281
9276
  control = null;
9277
+ showIds = [];
9282
9278
  priceZoneChange = new EventEmitter();
9283
9279
  priceZones = signal([], ...(ngDevMode ? [{ debugName: "priceZones" }] : []));
9284
9280
  loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
@@ -9294,7 +9290,10 @@ class PriceZoneSelectComponent {
9294
9290
  }
9295
9291
  ngOnInit() {
9296
9292
  if (isPlatformBrowser(this.platformId)) {
9297
- this.priceZoneService.loadPriceZones({ search: this.searchTerm });
9293
+ this.priceZoneService.loadPriceZones({
9294
+ search: this.searchTerm,
9295
+ show_ids: this.showIds,
9296
+ });
9298
9297
  this.priceZoneService.priceZones$
9299
9298
  .pipe(takeUntil(this.destroy$))
9300
9299
  .subscribe((priceZones) => {
@@ -9308,7 +9307,20 @@ class PriceZoneSelectComponent {
9308
9307
  .pipe(debounceTime(400), distinctUntilChanged(), takeUntil(this.destroy$))
9309
9308
  .subscribe((search) => {
9310
9309
  this.searchTerm = search;
9311
- this.priceZoneService.loadPriceZones({ search: this.searchTerm });
9310
+ this.priceZoneService.loadPriceZones({
9311
+ search: this.searchTerm,
9312
+ show_ids: this.showIds,
9313
+ });
9314
+ });
9315
+ }
9316
+ }
9317
+ ngOnChanges(changes) {
9318
+ if (changes['showIds'] &&
9319
+ !changes['showIds'].firstChange &&
9320
+ isPlatformBrowser(this.platformId)) {
9321
+ this.priceZoneService.loadPriceZones({
9322
+ search: this.searchTerm,
9323
+ show_ids: this.showIds,
9312
9324
  });
9313
9325
  }
9314
9326
  }
@@ -9351,7 +9363,7 @@ class PriceZoneSelectComponent {
9351
9363
  return false;
9352
9364
  }
9353
9365
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PriceZoneSelectComponent, deps: [{ token: PLATFORM_ID }, { token: PriceZoneService }], target: i0.ɵɵFactoryTarget.Component });
9354
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: PriceZoneSelectComponent, isStandalone: true, selector: "price-zone-select", inputs: { label: "label", placeholder: "placeholder", name: "name", required: "required", readonly: "readonly", showError: "showError", customClass: "customClass", control: "control" }, outputs: { priceZoneChange: "priceZoneChange" }, providers: [
9366
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: PriceZoneSelectComponent, isStandalone: true, selector: "price-zone-select", inputs: { label: "label", placeholder: "placeholder", name: "name", required: "required", readonly: "readonly", showError: "showError", customClass: "customClass", control: "control", showIds: "showIds" }, outputs: { priceZoneChange: "priceZoneChange" }, providers: [
9355
9367
  {
9356
9368
  provide: NG_VALUE_ACCESSOR,
9357
9369
  useExisting: forwardRef(() => PriceZoneSelectComponent),
@@ -9362,7 +9374,7 @@ class PriceZoneSelectComponent {
9362
9374
  useExisting: forwardRef(() => PriceZoneSelectComponent),
9363
9375
  multi: true,
9364
9376
  },
9365
- ], ngImport: i0, template: "<form-select\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n [name]=\"name || 'price_zone_id'\"\n [class]=\"customClass\"\n [options]=\"priceZones()\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [formControl]=\"formControl\"\n (change)=\"onPriceZoneSelected($event)\"\n></form-select>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormSelectComponent, selector: "form-select", inputs: ["label", "name", "id", "placeholder", "required", "disabled", "readonly", "options", "fieldGroupClass", "showDefaultOption", "defaultOptionLabel"] }] });
9377
+ ], usesOnChanges: true, ngImport: i0, template: "<form-select\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n [name]=\"name || 'price_zone_id'\"\n [class]=\"customClass\"\n [options]=\"priceZones()\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [formControl]=\"formControl\"\n (change)=\"onPriceZoneSelected($event)\"\n></form-select>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormSelectComponent, selector: "form-select", inputs: ["label", "name", "id", "placeholder", "required", "disabled", "readonly", "options", "fieldGroupClass", "showDefaultOption", "defaultOptionLabel"] }] });
9366
9378
  }
9367
9379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PriceZoneSelectComponent, decorators: [{
9368
9380
  type: Component,
@@ -9397,6 +9409,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9397
9409
  type: Input
9398
9410
  }], control: [{
9399
9411
  type: Input
9412
+ }], showIds: [{
9413
+ type: Input
9400
9414
  }], priceZoneChange: [{
9401
9415
  type: Output
9402
9416
  }] } });