quang 20.5.0 → 20.5.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.
@@ -137,10 +137,10 @@ class QuangBaseComponent {
137
137
  ngAfterViewInit() {
138
138
  this.setupFormControl();
139
139
  }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
141
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.10", type: QuangBaseComponent, isStandalone: true, inputs: { componentId: { classPropertyName: "componentId", publicName: "componentId", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, componentTabIndex: { classPropertyName: "componentTabIndex", publicName: "componentTabIndex", isSignal: true, isRequired: false, transformFunction: null }, componentClass: { classPropertyName: "componentClass", publicName: "componentClass", isSignal: true, isRequired: false, transformFunction: null }, componentLabel: { classPropertyName: "componentLabel", publicName: "componentLabel", isSignal: true, isRequired: false, transformFunction: null }, componentPlaceholder: { classPropertyName: "componentPlaceholder", publicName: "componentPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, errorMap: { classPropertyName: "errorMap", publicName: "errorMap", isSignal: true, isRequired: false, transformFunction: null }, successMessage: { classPropertyName: "successMessage", publicName: "successMessage", isSignal: true, isRequired: false, transformFunction: null }, helpMessage: { classPropertyName: "helpMessage", publicName: "helpMessage", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, helpMessageTooltip: { classPropertyName: "helpMessageTooltip", publicName: "helpMessageTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { componentBlur: "componentBlur" }, ngImport: i0 }); }
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
141
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: QuangBaseComponent, isStandalone: true, inputs: { componentId: { classPropertyName: "componentId", publicName: "componentId", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, componentTabIndex: { classPropertyName: "componentTabIndex", publicName: "componentTabIndex", isSignal: true, isRequired: false, transformFunction: null }, componentClass: { classPropertyName: "componentClass", publicName: "componentClass", isSignal: true, isRequired: false, transformFunction: null }, componentLabel: { classPropertyName: "componentLabel", publicName: "componentLabel", isSignal: true, isRequired: false, transformFunction: null }, componentPlaceholder: { classPropertyName: "componentPlaceholder", publicName: "componentPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, errorMap: { classPropertyName: "errorMap", publicName: "errorMap", isSignal: true, isRequired: false, transformFunction: null }, successMessage: { classPropertyName: "successMessage", publicName: "successMessage", isSignal: true, isRequired: false, transformFunction: null }, helpMessage: { classPropertyName: "helpMessage", publicName: "helpMessage", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, helpMessageTooltip: { classPropertyName: "helpMessageTooltip", publicName: "helpMessageTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { componentBlur: "componentBlur" }, ngImport: i0 }); }
142
142
  }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangBaseComponent, decorators: [{
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangBaseComponent, decorators: [{
144
144
  type: Directive
145
145
  }], ctorParameters: () => [], propDecorators: { componentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentId", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], componentTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentTabIndex", required: false }] }], componentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentClass", required: false }] }], componentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentLabel", required: false }] }], componentPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentPlaceholder", required: false }] }], errorMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMap", required: false }] }], successMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "successMessage", required: false }] }], helpMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "helpMessage", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], helpMessageTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "helpMessageTooltip", required: false }] }], componentBlur: [{ type: i0.Output, args: ["componentBlur"] }] } });
146
146
 
@@ -170,6 +170,10 @@ class QuangOptionListComponent {
170
170
  this.scrollBehaviorOnOpen = input('smooth', ...(ngDevMode ? [{ debugName: "scrollBehaviorOnOpen" }] : []));
171
171
  this.changedHandler = output();
172
172
  this.blurHandler = output();
173
+ /** Emitted when user presses Escape - parent should close dropdown and return focus to trigger */
174
+ this.escapePressed = output();
175
+ /** Emitted when user presses Tab - parent should handle focus transition */
176
+ this.tabPressed = output();
173
177
  this.optionListContainer = viewChild('optionListContainer', ...(ngDevMode ? [{ debugName: "optionListContainer" }] : []));
174
178
  this.destroyRef = inject(DestroyRef);
175
179
  this.parentType = input.required(...(ngDevMode ? [{ debugName: "parentType" }] : []));
@@ -200,25 +204,28 @@ class QuangOptionListComponent {
200
204
  }, ...(ngDevMode ? [{ debugName: "selectOptionsList" }] : []));
201
205
  this.onKeyDown = null;
202
206
  this.selectedElementIndex = computed(() => this.selectOptionsList()?.findIndex((x) => x?.value === this._value()) ?? 0, ...(ngDevMode ? [{ debugName: "selectedElementIndex" }] : []));
207
+ /** Signal to track currently focused item index for aria-activedescendant */
208
+ this.focusedItemIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedItemIndex" }] : []));
203
209
  this.optionList$ = effect(() => {
204
210
  const optionListContainer = this.optionListContainer();
205
- if (optionListContainer && this.parentType() === OptionListParentType.SELECT) {
211
+ const parentType = this.parentType();
212
+ // Focus the option list container when opened (only for SELECT)
213
+ if (optionListContainer && parentType === OptionListParentType.SELECT) {
206
214
  optionListContainer?.nativeElement.focus();
207
- const optionListContainerNativeElement = optionListContainer?.nativeElement;
208
- if (optionListContainerNativeElement) {
209
- const ul = optionListContainerNativeElement?.children[0];
210
- const listItem = ul?.children.item(this.selectedElementIndex());
211
- if (listItem) {
212
- setTimeout(() => {
213
- listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() });
214
- }, 0);
215
- }
216
- }
217
215
  }
218
216
  const ul = optionListContainer?.nativeElement?.children[0];
219
217
  const listItems = (ul?.children ?? []);
220
218
  let currentIndex = this.selectedElementIndex();
221
219
  listItems?.[currentIndex]?.classList.add('selected');
220
+ // Initialize focusedItemIndex with current selection
221
+ this.focusedItemIndex.set(currentIndex);
222
+ // Scroll to selected item when option list opens
223
+ const listItem = listItems[currentIndex];
224
+ if (listItem) {
225
+ setTimeout(() => {
226
+ listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen(), block: 'nearest' });
227
+ }, 0);
228
+ }
222
229
  if (this.onKeyDown) {
223
230
  this.onKeyDown.unsubscribe();
224
231
  }
@@ -239,25 +246,12 @@ class QuangOptionListComponent {
239
246
  else {
240
247
  currentIndex += 1;
241
248
  }
242
- if (currentIndex === 0) {
243
- event.preventDefault();
244
- optionListContainer?.nativeElement?.scroll(0, 0);
245
- }
246
- const optionListBottom = optionListContainer?.nativeElement?.getBoundingClientRect()?.bottom ?? 0;
247
- const itemListHeight = optionListContainer?.nativeElement?.children?.[0]?.children
248
- ?.item(currentIndex)
249
- ?.getBoundingClientRect()?.height;
250
- const itemListBottom = optionListContainer?.nativeElement?.children?.[0]?.children
251
- ?.item(currentIndex)
252
- ?.getBoundingClientRect()?.bottom;
253
- if (optionListBottom > (itemListBottom ?? 0) + (itemListHeight ?? 0))
254
- event.preventDefault();
249
+ event.preventDefault();
255
250
  listItems[currentIndex]?.classList.add('selected');
256
- if ((optionListContainer?.nativeElement?.scrollTop ?? 0) >=
257
- (optionListContainer?.nativeElement?.scrollHeight ?? 0) -
258
- (optionListContainer?.nativeElement?.offsetHeight ?? 0)) {
259
- event.preventDefault();
260
- }
251
+ // Scroll item into view if not visible
252
+ listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
253
+ // Update focusedItemIndex for aria-activedescendant
254
+ this.focusedItemIndex.set(currentIndex);
261
255
  break;
262
256
  }
263
257
  case 'ArrowUp': {
@@ -267,25 +261,34 @@ class QuangOptionListComponent {
267
261
  listItems[currentIndex]?.classList.remove('selected');
268
262
  if (currentIndex !== 0)
269
263
  currentIndex -= 1;
270
- const optionListTop = optionListContainer?.nativeElement?.getBoundingClientRect()?.top ?? 0;
271
- const itemListHeight = optionListContainer?.nativeElement?.children?.[0]?.children
272
- ?.item(currentIndex)
273
- ?.getBoundingClientRect()?.height;
274
- const itemListTop = optionListContainer?.nativeElement?.children?.[0]?.children
275
- ?.item(currentIndex)
276
- ?.getBoundingClientRect()?.top;
277
- if (optionListTop < (itemListTop ?? 0) - (itemListHeight ?? 0))
278
- event.preventDefault();
264
+ event.preventDefault();
279
265
  listItems[currentIndex]?.classList.add('selected');
280
- if (!optionListContainer?.nativeElement?.scrollTop) {
281
- event.preventDefault();
282
- }
266
+ // Scroll item into view if not visible
267
+ listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
268
+ // Update focusedItemIndex for aria-activedescendant
269
+ this.focusedItemIndex.set(currentIndex);
283
270
  break;
284
271
  }
285
272
  case 'Enter': {
273
+ event.preventDefault();
286
274
  this.onSelectItem(this.selectOptionsList()[currentIndex]);
287
275
  break;
288
276
  }
277
+ case 'Escape': {
278
+ event.preventDefault();
279
+ this.escapePressed.emit();
280
+ break;
281
+ }
282
+ case 'Tab': {
283
+ // Only handle Tab when focus is on the option list itself
284
+ // If focus is on the parent input, let the input's blur handler deal with it
285
+ if (document.activeElement?.id === optionListContainer?.nativeElement?.id) {
286
+ // Allow Tab to close dropdown and move focus naturally
287
+ // Emit event so parent can handle focus transition
288
+ this.tabPressed.emit({ shiftKey: event.shiftKey });
289
+ }
290
+ break;
291
+ }
289
292
  default: {
290
293
  if ((event?.key?.length === 1 || event?.key === 'Backspace') &&
291
294
  this.parentType() === OptionListParentType.AUTOCOMPLETE &&
@@ -306,6 +309,16 @@ class QuangOptionListComponent {
306
309
  });
307
310
  }, ...(ngDevMode ? [{ debugName: "optionList$" }] : []));
308
311
  }
312
+ /**
313
+ * Returns the ID of the currently focused item for aria-activedescendant
314
+ */
315
+ getActiveDescendantId() {
316
+ const index = this.focusedItemIndex();
317
+ if (index >= 0 && index < this.selectOptionsList().length) {
318
+ return `item-${index}`;
319
+ }
320
+ return null;
321
+ }
309
322
  handleSearch(key, listItems, currentIndex) {
310
323
  if (this.searchResetTimer) {
311
324
  clearTimeout(this.searchResetTimer);
@@ -414,13 +427,13 @@ class QuangOptionListComponent {
414
427
  this.getOptionListTop();
415
428
  });
416
429
  }
417
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangOptionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
418
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: QuangOptionListComponent, isStandalone: true, selector: "quang-option-list", inputs: { selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, optionListMaxHeight: { classPropertyName: "optionListMaxHeight", publicName: "optionListMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, selectOptions: { classPropertyName: "selectOptions", publicName: "selectOptions", isSignal: true, isRequired: false, transformFunction: null }, selectButtonRef: { classPropertyName: "selectButtonRef", publicName: "selectButtonRef", isSignal: true, isRequired: true, transformFunction: null }, _value: { classPropertyName: "_value", publicName: "_value", isSignal: true, isRequired: false, transformFunction: null }, _isDisabled: { classPropertyName: "_isDisabled", publicName: "_isDisabled", isSignal: true, isRequired: false, transformFunction: null }, componentClass: { classPropertyName: "componentClass", publicName: "componentClass", isSignal: true, isRequired: false, transformFunction: null }, componentLabel: { classPropertyName: "componentLabel", publicName: "componentLabel", isSignal: true, isRequired: false, transformFunction: null }, componentTabIndex: { classPropertyName: "componentTabIndex", publicName: "componentTabIndex", isSignal: true, isRequired: false, transformFunction: null }, translateValue: { classPropertyName: "translateValue", publicName: "translateValue", isSignal: true, isRequired: false, transformFunction: null }, nullOption: { classPropertyName: "nullOption", publicName: "nullOption", isSignal: true, isRequired: false, transformFunction: null }, scrollBehaviorOnOpen: { classPropertyName: "scrollBehaviorOnOpen", publicName: "scrollBehaviorOnOpen", isSignal: true, isRequired: false, transformFunction: null }, parentType: { classPropertyName: "parentType", publicName: "parentType", isSignal: true, isRequired: true, transformFunction: null }, parentID: { classPropertyName: "parentID", publicName: "parentID", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changedHandler: "changedHandler", blurHandler: "blurHandler" }, host: { listeners: { "window:scroll": "changePosition()" } }, viewQueries: [{ propertyName: "optionListContainer", first: true, predicate: ["optionListContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n class=\"option-list\"\n id=\"optionList\"\n tabindex=\"1\"\n>\n <ul>\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n class=\"form-check-input opacity-100\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | transloco) : item.label }}\n </label>\n </li>\n }\n </ul>\n</div>\n", styles: [":host{display:block;z-index:999}.option-list{--option-list-width: 100%;--option-list-top: 10px;--option-list-bottom: unset;border:1px solid var(--bs-border-color);border-top:0;border-radius:var(--bs-border-radius);overflow:auto;position:fixed;width:var(--option-list-width);top:var(--option-list-top);bottom:var(--option-list-bottom);z-index:999}.option-list ul{margin:0;padding:0}.option-list .selected{background-color:var(--bs-body-bg);filter:brightness(95%)}.option-list.option-list-top{border-top:1px solid var(--bs-border-color);border-bottom:0}.option-list:focus-visible{outline:none}.item{display:flex;background-color:var(--bs-body-bg);z-index:1;padding:0 .5rem;min-height:2.5rem}.item label{padding:.5rem 0}.item:hover{cursor:pointer;background-color:var(--bs-body-bg);filter:brightness(95%)}.item *:hover{cursor:pointer}.item .form-check-input{align-self:center}.item .form-check-input:focus{border-color:var(--bs-border-color);box-shadow:unset}.item .form-check-input:checked{background-color:var(--bs-primary);border-color:var(--bs-border-color)}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangOptionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
431
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: QuangOptionListComponent, isStandalone: true, selector: "quang-option-list", inputs: { selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, optionListMaxHeight: { classPropertyName: "optionListMaxHeight", publicName: "optionListMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, selectOptions: { classPropertyName: "selectOptions", publicName: "selectOptions", isSignal: true, isRequired: false, transformFunction: null }, selectButtonRef: { classPropertyName: "selectButtonRef", publicName: "selectButtonRef", isSignal: true, isRequired: true, transformFunction: null }, _value: { classPropertyName: "_value", publicName: "_value", isSignal: true, isRequired: false, transformFunction: null }, _isDisabled: { classPropertyName: "_isDisabled", publicName: "_isDisabled", isSignal: true, isRequired: false, transformFunction: null }, componentClass: { classPropertyName: "componentClass", publicName: "componentClass", isSignal: true, isRequired: false, transformFunction: null }, componentLabel: { classPropertyName: "componentLabel", publicName: "componentLabel", isSignal: true, isRequired: false, transformFunction: null }, componentTabIndex: { classPropertyName: "componentTabIndex", publicName: "componentTabIndex", isSignal: true, isRequired: false, transformFunction: null }, translateValue: { classPropertyName: "translateValue", publicName: "translateValue", isSignal: true, isRequired: false, transformFunction: null }, nullOption: { classPropertyName: "nullOption", publicName: "nullOption", isSignal: true, isRequired: false, transformFunction: null }, scrollBehaviorOnOpen: { classPropertyName: "scrollBehaviorOnOpen", publicName: "scrollBehaviorOnOpen", isSignal: true, isRequired: false, transformFunction: null }, parentType: { classPropertyName: "parentType", publicName: "parentType", isSignal: true, isRequired: true, transformFunction: null }, parentID: { classPropertyName: "parentID", publicName: "parentID", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changedHandler: "changedHandler", blurHandler: "blurHandler", escapePressed: "escapePressed", tabPressed: "tabPressed" }, host: { listeners: { "window:scroll": "changePosition()" } }, viewQueries: [{ propertyName: "optionListContainer", first: true, predicate: ["optionListContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [attr.aria-activedescendant]=\"getActiveDescendantId()\"\n [attr.aria-label]=\"componentLabel()\"\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n aria-orientation=\"vertical\"\n class=\"option-list\"\n id=\"optionList\"\n role=\"listbox\"\n tabindex=\"0\"\n>\n <ul role=\"presentation\">\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [attr.aria-selected]=\"getSelected(item)\"\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n role=\"option\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n aria-hidden=\"true\"\n class=\"form-check-input opacity-100\"\n tabindex=\"-1\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | transloco) : item.label }}\n </label>\n </li>\n }\n </ul>\n</div>\n", styles: [":host{display:block;z-index:999}.option-list{--option-list-width: 100%;--option-list-top: 10px;--option-list-bottom: unset;border:1px solid var(--bs-border-color);border-top:0;border-radius:var(--bs-border-radius);overflow:auto;position:fixed;width:var(--option-list-width);top:var(--option-list-top);bottom:var(--option-list-bottom);z-index:999}.option-list ul{margin:0;padding:0}.option-list .selected{background-color:var(--bs-body-bg);filter:brightness(95%)}.option-list.option-list-top{border-top:1px solid var(--bs-border-color);border-bottom:0}.option-list:focus-visible{outline:none}.item{display:flex;background-color:var(--bs-body-bg);z-index:1;padding:0 .5rem;min-height:2.5rem}.item label{padding:.5rem 0}.item:hover{cursor:pointer;background-color:var(--bs-body-bg);filter:brightness(95%)}.item *:hover{cursor:pointer}.item .form-check-input{align-self:center}.item .form-check-input:focus{border-color:var(--bs-border-color);box-shadow:unset}.item .form-check-input:checked{background-color:var(--bs-primary);border-color:var(--bs-border-color)}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
419
432
  }
420
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangOptionListComponent, decorators: [{
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangOptionListComponent, decorators: [{
421
434
  type: Component,
422
- args: [{ selector: 'quang-option-list', imports: [NgStyle, NgClass, TranslocoPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n class=\"option-list\"\n id=\"optionList\"\n tabindex=\"1\"\n>\n <ul>\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n class=\"form-check-input opacity-100\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | transloco) : item.label }}\n </label>\n </li>\n }\n </ul>\n</div>\n", styles: [":host{display:block;z-index:999}.option-list{--option-list-width: 100%;--option-list-top: 10px;--option-list-bottom: unset;border:1px solid var(--bs-border-color);border-top:0;border-radius:var(--bs-border-radius);overflow:auto;position:fixed;width:var(--option-list-width);top:var(--option-list-top);bottom:var(--option-list-bottom);z-index:999}.option-list ul{margin:0;padding:0}.option-list .selected{background-color:var(--bs-body-bg);filter:brightness(95%)}.option-list.option-list-top{border-top:1px solid var(--bs-border-color);border-bottom:0}.option-list:focus-visible{outline:none}.item{display:flex;background-color:var(--bs-body-bg);z-index:1;padding:0 .5rem;min-height:2.5rem}.item label{padding:.5rem 0}.item:hover{cursor:pointer;background-color:var(--bs-body-bg);filter:brightness(95%)}.item *:hover{cursor:pointer}.item .form-check-input{align-self:center}.item .form-check-input:focus{border-color:var(--bs-border-color);box-shadow:unset}.item .form-check-input:checked{background-color:var(--bs-primary);border-color:var(--bs-border-color)}\n"] }]
423
- }], propDecorators: { selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], optionListMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionListMaxHeight", required: false }] }], selectOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOptions", required: false }] }], selectButtonRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectButtonRef", required: true }] }], _value: [{ type: i0.Input, args: [{ isSignal: true, alias: "_value", required: false }] }], _isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "_isDisabled", required: false }] }], componentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentClass", required: false }] }], componentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentLabel", required: false }] }], componentTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentTabIndex", required: false }] }], translateValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateValue", required: false }] }], nullOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullOption", required: false }] }], scrollBehaviorOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehaviorOnOpen", required: false }] }], changedHandler: [{ type: i0.Output, args: ["changedHandler"] }], blurHandler: [{ type: i0.Output, args: ["blurHandler"] }], optionListContainer: [{ type: i0.ViewChild, args: ['optionListContainer', { isSignal: true }] }], parentType: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentType", required: true }] }], parentID: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentID", required: false }] }], changePosition: [{
435
+ args: [{ selector: 'quang-option-list', imports: [NgStyle, NgClass, TranslocoPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [attr.aria-activedescendant]=\"getActiveDescendantId()\"\n [attr.aria-label]=\"componentLabel()\"\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n aria-orientation=\"vertical\"\n class=\"option-list\"\n id=\"optionList\"\n role=\"listbox\"\n tabindex=\"0\"\n>\n <ul role=\"presentation\">\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [attr.aria-selected]=\"getSelected(item)\"\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n role=\"option\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n aria-hidden=\"true\"\n class=\"form-check-input opacity-100\"\n tabindex=\"-1\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | transloco) : item.label }}\n </label>\n </li>\n }\n </ul>\n</div>\n", styles: [":host{display:block;z-index:999}.option-list{--option-list-width: 100%;--option-list-top: 10px;--option-list-bottom: unset;border:1px solid var(--bs-border-color);border-top:0;border-radius:var(--bs-border-radius);overflow:auto;position:fixed;width:var(--option-list-width);top:var(--option-list-top);bottom:var(--option-list-bottom);z-index:999}.option-list ul{margin:0;padding:0}.option-list .selected{background-color:var(--bs-body-bg);filter:brightness(95%)}.option-list.option-list-top{border-top:1px solid var(--bs-border-color);border-bottom:0}.option-list:focus-visible{outline:none}.item{display:flex;background-color:var(--bs-body-bg);z-index:1;padding:0 .5rem;min-height:2.5rem}.item label{padding:.5rem 0}.item:hover{cursor:pointer;background-color:var(--bs-body-bg);filter:brightness(95%)}.item *:hover{cursor:pointer}.item .form-check-input{align-self:center}.item .form-check-input:focus{border-color:var(--bs-border-color);box-shadow:unset}.item .form-check-input:checked{background-color:var(--bs-primary);border-color:var(--bs-border-color)}\n"] }]
436
+ }], propDecorators: { selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], optionListMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionListMaxHeight", required: false }] }], selectOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOptions", required: false }] }], selectButtonRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectButtonRef", required: true }] }], _value: [{ type: i0.Input, args: [{ isSignal: true, alias: "_value", required: false }] }], _isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "_isDisabled", required: false }] }], componentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentClass", required: false }] }], componentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentLabel", required: false }] }], componentTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentTabIndex", required: false }] }], translateValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateValue", required: false }] }], nullOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullOption", required: false }] }], scrollBehaviorOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehaviorOnOpen", required: false }] }], changedHandler: [{ type: i0.Output, args: ["changedHandler"] }], blurHandler: [{ type: i0.Output, args: ["blurHandler"] }], escapePressed: [{ type: i0.Output, args: ["escapePressed"] }], tabPressed: [{ type: i0.Output, args: ["tabPressed"] }], optionListContainer: [{ type: i0.ViewChild, args: ['optionListContainer', { isSignal: true }] }], parentType: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentType", required: true }] }], parentID: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentID", required: false }] }], changePosition: [{
424
437
  type: HostListener,
425
438
  args: ['window:scroll']
426
439
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"quang-components-shared.mjs","sources":["../../../projects/quang/components/shared/makeId.ts","../../../projects/quang/components/shared/quang-base-component.directive.ts","../../../projects/quang/components/shared/option-list/option-list.component.ts","../../../projects/quang/components/shared/option-list/option-list.component.html","../../../projects/quang/components/shared/quang-components-shared.ts"],"sourcesContent":["export const makeId = (length: number) => {\n let result = ''\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n const charactersLength = characters.length\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n","import { AfterViewInit, DestroyRef, Directive, Injector, computed, inject, input, output, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, FormControl, NgControl, Validators } from '@angular/forms'\n\nimport { Subscription } from 'rxjs'\n\nimport { ErrorData } from './ErrorData'\nimport { makeId } from './makeId'\n\n@Directive()\nexport abstract class QuangBaseComponent<T = any> implements ControlValueAccessor, AfterViewInit {\n componentId = input<string>(makeId(10))\n\n isReadonly = input<boolean>(false)\n\n isReadonly$ = toObservable(this.isReadonly)\n\n componentTabIndex = input<number>(0)\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentPlaceholder = input<string>('')\n\n errorMap = input<ErrorData[]>([])\n\n errorMap$ = toObservable(this.errorMap)\n .pipe(takeUntilDestroyed())\n .subscribe(() => {\n if (this._isTouched()) {\n this.checkFormErrors()\n }\n })\n\n _errorMessagesByKey = computed(\n () => new Map((this.errorMap() ?? []).map((errorData) => [errorData.error, errorData.message]))\n )\n\n successMessage = input<string>('')\n\n helpMessage = input<string>('')\n\n formControl = input<FormControl>()\n\n // If true, the help message will be shown in a tooltip. Remember to set the `helpMessage` input and add help-icon as ng-content\n helpMessageTooltip = input<boolean>(false)\n\n componentBlur = output<void>()\n\n _value = signal<T | null>(null)\n\n _isRequired = signal<boolean>(false)\n\n _isDisabled = signal<boolean>(false)\n\n _isTouched = signal<boolean>(false)\n\n _isValid = signal<boolean>(false)\n\n _showSuccess = computed(() => this.successMessage() && this._isValid() && this._isTouched() && !this._isDisabled())\n\n _showErrors = computed(\n () => this.errorMap()?.length > 0 && !this._isValid() && this._isTouched() && !this._isDisabled()\n )\n\n _currentErrorMessage = signal<string>('')\n\n _currentErrorMessageExtraData = signal<Record<string, any>>({})\n\n _ngControl = signal<NgControl | null>(null)\n\n _injector = signal<Injector>(inject(Injector))\n\n _statusChange$?: Subscription\n\n getIsRequiredControl = computed(\n () => !!(this._ngControl()?.control as any)?._rawValidators?.find((x: any) => x.name === 'required')\n )\n\n onChange?: (value: T) => void\n\n onTouched?: () => void\n\n destroyRef = inject(DestroyRef)\n\n constructor() {\n toObservable(this.formControl)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((form) => {\n if (form) {\n this.setupFormControl()\n }\n })\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn\n }\n\n writeValue(val: T): void {\n this._value.set(val)\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = () => {\n this._isTouched.set(true)\n fn()\n }\n }\n\n onChangedEventHandler($event: Event) {\n const inputElement = $event.target as HTMLInputElement\n this.onChangedHandler(inputElement.value as T)\n }\n\n onChangedHandler(value: T) {\n this._value.set(value)\n if (this.onChange) {\n this.onChange(value)\n }\n\n if (this.onTouched) {\n this.onTouched()\n }\n }\n\n onBlurHandler() {\n if (this.onTouched) {\n this.onTouched()\n }\n this.componentBlur.emit()\n }\n\n setupFormControl() {\n if (this._statusChange$) {\n this._statusChange$.unsubscribe()\n this._statusChange$ = undefined\n }\n\n this._ngControl.set(this._injector().get(NgControl))\n this._statusChange$ = this._ngControl()\n ?.control?.statusChanges.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.checkFormErrors()\n })\n\n this._isTouched.set(this._ngControl()?.touched ?? false)\n this._isDisabled.set(this.isReadonly() || this._ngControl()?.disabled || false)\n this.checkFormErrors()\n }\n\n onChangeIsReadonly = this.isReadonly$.pipe(takeUntilDestroyed()).subscribe((isReadonly: boolean) => {\n this._isDisabled.set(isReadonly || this._ngControl()?.disabled || false)\n })\n\n setDisabledState(isDisabled: boolean) {\n this._isDisabled.set(isDisabled)\n }\n\n checkFormErrors() {\n const control = this._ngControl()?.control\n this._isValid.set(control?.valid ?? false)\n this._isTouched.set(!control?.pristine)\n\n const validationErrors = control?.errors\n\n this._isRequired.set(validationErrors?.[Validators.required.name])\n\n let errorName = ''\n let errorMessage = ''\n let errorData = true\n\n for (const [validationErrorName, validationErrorData] of Object.entries(validationErrors ?? {})) {\n const relatedErrorMessage = this._errorMessagesByKey().get(validationErrorName)\n if (relatedErrorMessage) {\n errorName = validationErrorName\n errorMessage = relatedErrorMessage\n errorData = validationErrorData\n }\n }\n\n this._currentErrorMessage.set(errorMessage)\n this._currentErrorMessageExtraData.set({ [errorName]: errorData })\n }\n\n ngAfterViewInit(): void {\n this.setupFormControl()\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NgClass, NgStyle } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n HostListener,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { QUANG_LOGGING_BEHAVIOR } from 'quang'\nimport { Subscription, fromEvent } from 'rxjs'\n\nexport interface SelectOption {\n label: string\n value: string | number | null\n}\n\nexport enum OptionListParentType {\n SELECT = 'select',\n AUTOCOMPLETE = 'autocomplete',\n}\n\n@Component({\n selector: 'quang-option-list',\n imports: [NgStyle, NgClass, TranslocoPipe],\n templateUrl: './option-list.component.html',\n styleUrl: './option-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QuangOptionListComponent {\n logLevel = inject(QUANG_LOGGING_BEHAVIOR, { optional: true })\n\n selectionMode = input<'single' | 'multiple'>('single')\n\n optionListMaxHeight = input<string>('201px')\n\n selectOptions = input<SelectOption[]>([])\n\n selectButtonRef = input.required<HTMLButtonElement | HTMLInputElement | HTMLDivElement>()\n\n _value = input<any>()\n\n _isDisabled = input<boolean>()\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentTabIndex = input<number>(0)\n\n translateValue = input<boolean>(false)\n\n nullOption = input<boolean>(true)\n\n elementWidth = signal<string>('0px')\n\n elementTop = signal<string>('0px')\n\n elementBottom = signal<string>('0px')\n\n scrollBehaviorOnOpen = input<ScrollBehavior>('smooth')\n\n changedHandler = output<any>()\n\n blurHandler = output<any>()\n\n optionListContainer = viewChild<ElementRef<HTMLDivElement>>('optionListContainer')\n\n destroyRef = inject(DestroyRef)\n\n parentType = input.required<OptionListParentType>()\n\n parentID = input<string>('')\n\n searchString = signal<string>('')\n\n searchResetTimer: ReturnType<typeof setTimeout> | null = null\n\n selectButtonRef$ = toObservable(this.selectButtonRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.getOptionListWidth()\n this.getOptionListTop()\n this.getScrollParent(this.selectButtonRef())?.addEventListener('scroll', () => {\n this.getOptionListWidth()\n this.getOptionListTop()\n })\n })\n\n selectOptionsList = computed(() => {\n if (this.nullOption() && this.selectionMode() === 'single') {\n return [\n {\n label: '',\n value: null,\n },\n ...this.selectOptions(),\n ]\n }\n return [...this.selectOptions()]\n })\n\n onKeyDown: Subscription | null = null\n\n selectedElementIndex = computed<number>(\n () => this.selectOptionsList()?.findIndex((x) => x?.value === this._value()) ?? 0\n )\n\n optionList$ = effect(() => {\n const optionListContainer = this.optionListContainer()\n if (optionListContainer && this.parentType() === OptionListParentType.SELECT) {\n optionListContainer?.nativeElement.focus()\n const optionListContainerNativeElement = optionListContainer?.nativeElement\n if (optionListContainerNativeElement) {\n const ul = optionListContainerNativeElement?.children[0] as HTMLUListElement\n const listItem = ul?.children.item(this.selectedElementIndex()) as HTMLLIElement | undefined\n if (listItem) {\n setTimeout(() => {\n listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() })\n }, 0)\n }\n }\n }\n const ul = optionListContainer?.nativeElement?.children[0] as HTMLUListElement | undefined\n const listItems = (ul?.children ?? []) as HTMLLIElement[]\n let currentIndex = this.selectedElementIndex()\n listItems?.[currentIndex]?.classList.add('selected')\n\n if (this.onKeyDown) {\n this.onKeyDown.unsubscribe()\n }\n\n this.onKeyDown = fromEvent(document, 'keydown', {\n capture: true,\n })\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => {\n switch ((event as KeyboardEvent).key) {\n case 'ArrowDown': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex === listItems.length - 1) {\n currentIndex = listItems.length - 1\n } else {\n currentIndex += 1\n }\n if (currentIndex === 0) {\n event.preventDefault()\n optionListContainer?.nativeElement?.scroll(0, 0)\n }\n const optionListBottom = optionListContainer?.nativeElement?.getBoundingClientRect()?.bottom ?? 0\n const itemListHeight = optionListContainer?.nativeElement?.children?.[0]?.children\n ?.item(currentIndex)\n ?.getBoundingClientRect()?.height\n const itemListBottom = optionListContainer?.nativeElement?.children?.[0]?.children\n ?.item(currentIndex)\n ?.getBoundingClientRect()?.bottom\n if (optionListBottom > (itemListBottom ?? 0) + (itemListHeight ?? 0)) event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n if (\n (optionListContainer?.nativeElement?.scrollTop ?? 0) >=\n (optionListContainer?.nativeElement?.scrollHeight ?? 0) -\n (optionListContainer?.nativeElement?.offsetHeight ?? 0)\n ) {\n event.preventDefault()\n }\n break\n }\n case 'ArrowUp': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex !== 0) currentIndex -= 1\n const optionListTop = optionListContainer?.nativeElement?.getBoundingClientRect()?.top ?? 0\n const itemListHeight = optionListContainer?.nativeElement?.children?.[0]?.children\n ?.item(currentIndex)\n ?.getBoundingClientRect()?.height\n const itemListTop = optionListContainer?.nativeElement?.children?.[0]?.children\n ?.item(currentIndex)\n ?.getBoundingClientRect()?.top\n if (optionListTop < (itemListTop ?? 0) - (itemListHeight ?? 0)) event.preventDefault()\n listItems[currentIndex]?.classList.add('selected')\n if (!optionListContainer?.nativeElement?.scrollTop) {\n event.preventDefault()\n }\n break\n }\n case 'Enter': {\n this.onSelectItem(this.selectOptionsList()[currentIndex])\n break\n }\n default: {\n if (\n ((event as KeyboardEvent)?.key?.length === 1 || (event as KeyboardEvent)?.key === 'Backspace') &&\n this.parentType() === OptionListParentType.AUTOCOMPLETE &&\n document.activeElement?.id === optionListContainer?.nativeElement?.id\n ) {\n currentIndex = 0\n document.getElementById(this.parentID())?.focus()\n document.getElementById(this.parentID())?.click()\n } else if (\n (event as KeyboardEvent)?.key?.length === 1 &&\n this.parentType() === OptionListParentType.SELECT\n ) {\n const key = (event as KeyboardEvent).key\n currentIndex = this.handleSearch(key, listItems, currentIndex)\n event.preventDefault()\n }\n break\n }\n }\n })\n })\n\n handleSearch(key: string, listItems: HTMLLIElement[], currentIndex: number): number {\n if (this.searchResetTimer) {\n clearTimeout(this.searchResetTimer)\n }\n\n this.searchString.update((current) => current + key)\n\n this.searchResetTimer = setTimeout(() => {\n this.searchString.set('')\n this.searchResetTimer = null\n }, 500)\n\n const searchStr = this.searchString().toLowerCase()\n const matchIndex = this.selectOptionsList().findIndex((option) => option.label.toLowerCase().includes(searchStr))\n\n if (matchIndex !== -1 && matchIndex !== currentIndex) {\n listItems[currentIndex]?.classList.remove('selected')\n listItems[matchIndex]?.classList.add('selected')\n listItems[matchIndex]?.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() })\n return matchIndex\n }\n\n return currentIndex\n }\n\n @HostListener('window:scroll') changePosition() {\n this.getOptionListWidth()\n this.getOptionListTop()\n }\n\n isScrollable(ele: Element): boolean {\n if (!ele) return false\n\n let result = false\n\n try {\n const hasScrollableContent = ele.scrollHeight > ele.clientHeight\n\n const overflowYStyle = window.getComputedStyle(ele).overflowY\n const isOverflowHidden = overflowYStyle.includes('hidden')\n\n result = hasScrollableContent && !isOverflowHidden\n } catch (_error) {\n if (this.logLevel === 'verbose') console.error('captured error isScrollable', _error)\n }\n\n return result\n }\n\n getScrollParent(node: unknown): Element {\n if (!node || node === document.body || !(node instanceof Element)) return document.body\n return this.isScrollable(node) ? node : this.getScrollParent(node.parentNode)\n }\n\n onSelectItem(item: SelectOption | null): void {\n if (this.selectionMode() === 'single') {\n this.changedHandler.emit(item?.value ?? null)\n } else {\n let targetValue = this._value()\n if (!Array.isArray(targetValue) && targetValue) {\n targetValue = [targetValue]\n }\n const values: string[] | number[] | null = targetValue as string[] | number[] | null\n if (values) {\n if (values.some((x) => x === item?.value)) {\n this.changedHandler.emit(values.filter((x) => x !== item?.value) as string[] | number[])\n } else if (item) {\n this.changedHandler.emit([...values, item.value] as string[] | number[])\n } else {\n this.changedHandler.emit([...values] as string[] | number[])\n }\n } else if (item?.value) {\n this.changedHandler.emit([item.value] as string[] | number[])\n } else {\n this.changedHandler.emit(null)\n }\n }\n this.getOptionListTop()\n }\n\n getSelected(item: SelectOption): boolean {\n if (this.selectionMode() === 'single' || !Array.isArray(this._value())) {\n return this._value() === item.value\n }\n return this._value()?.some((x: number | string | null) => x === item?.value)\n }\n\n onBlurHandler(e: Event): void {\n this.blurHandler.emit(e)\n }\n\n getOptionListWidth() {\n this.elementWidth.set(`${this.selectButtonRef()?.offsetWidth}px`)\n }\n\n getOptionListTop() {\n const nativeElement = this.optionListContainer()?.nativeElement\n const diff =\n window.innerHeight -\n (nativeElement?.getBoundingClientRect()?.height ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)\n let topValue = 'unset'\n let bottomValue = 'unset'\n const isTop = diff >= 0\n if (isTop) {\n topValue = `${(this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n } else {\n bottomValue = `${window.innerHeight - (this.selectButtonRef()?.getBoundingClientRect()?.bottom ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n }\n nativeElement?.classList.toggle('option-list-top', !isTop)\n this.elementTop.set(topValue)\n this.elementBottom.set(bottomValue)\n setTimeout(() => {\n this.getOptionListTop()\n })\n }\n}\n","<div\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n class=\"option-list\"\n id=\"optionList\"\n tabindex=\"1\"\n>\n <ul>\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n class=\"form-check-input opacity-100\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | translo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,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA;sBA6KhF,YAAY;uBAAC,eAAe;;;AEzP/B;;AAEG;;;;"}
1
+ {"version":3,"file":"quang-components-shared.mjs","sources":["../../../projects/quang/components/shared/makeId.ts","../../../projects/quang/components/shared/quang-base-component.directive.ts","../../../projects/quang/components/shared/option-list/option-list.component.ts","../../../projects/quang/components/shared/option-list/option-list.component.html","../../../projects/quang/components/shared/quang-components-shared.ts"],"sourcesContent":["export const makeId = (length: number) => {\n let result = ''\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n const charactersLength = characters.length\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n","import { AfterViewInit, DestroyRef, Directive, Injector, computed, inject, input, output, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, FormControl, NgControl, Validators } from '@angular/forms'\n\nimport { Subscription } from 'rxjs'\n\nimport { ErrorData } from './ErrorData'\nimport { makeId } from './makeId'\n\n@Directive()\nexport abstract class QuangBaseComponent<T = any> implements ControlValueAccessor, AfterViewInit {\n componentId = input<string>(makeId(10))\n\n isReadonly = input<boolean>(false)\n\n isReadonly$ = toObservable(this.isReadonly)\n\n componentTabIndex = input<number>(0)\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentPlaceholder = input<string>('')\n\n errorMap = input<ErrorData[]>([])\n\n errorMap$ = toObservable(this.errorMap)\n .pipe(takeUntilDestroyed())\n .subscribe(() => {\n if (this._isTouched()) {\n this.checkFormErrors()\n }\n })\n\n _errorMessagesByKey = computed(\n () => new Map((this.errorMap() ?? []).map((errorData) => [errorData.error, errorData.message]))\n )\n\n successMessage = input<string>('')\n\n helpMessage = input<string>('')\n\n formControl = input<FormControl>()\n\n // If true, the help message will be shown in a tooltip. Remember to set the `helpMessage` input and add help-icon as ng-content\n helpMessageTooltip = input<boolean>(false)\n\n componentBlur = output<void>()\n\n _value = signal<T | null>(null)\n\n _isRequired = signal<boolean>(false)\n\n _isDisabled = signal<boolean>(false)\n\n _isTouched = signal<boolean>(false)\n\n _isValid = signal<boolean>(false)\n\n _showSuccess = computed(() => this.successMessage() && this._isValid() && this._isTouched() && !this._isDisabled())\n\n _showErrors = computed(\n () => this.errorMap()?.length > 0 && !this._isValid() && this._isTouched() && !this._isDisabled()\n )\n\n _currentErrorMessage = signal<string>('')\n\n _currentErrorMessageExtraData = signal<Record<string, any>>({})\n\n _ngControl = signal<NgControl | null>(null)\n\n _injector = signal<Injector>(inject(Injector))\n\n _statusChange$?: Subscription\n\n getIsRequiredControl = computed(\n () => !!(this._ngControl()?.control as any)?._rawValidators?.find((x: any) => x.name === 'required')\n )\n\n onChange?: (value: T) => void\n\n onTouched?: () => void\n\n destroyRef = inject(DestroyRef)\n\n constructor() {\n toObservable(this.formControl)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((form) => {\n if (form) {\n this.setupFormControl()\n }\n })\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn\n }\n\n writeValue(val: T): void {\n this._value.set(val)\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = () => {\n this._isTouched.set(true)\n fn()\n }\n }\n\n onChangedEventHandler($event: Event) {\n const inputElement = $event.target as HTMLInputElement\n this.onChangedHandler(inputElement.value as T)\n }\n\n onChangedHandler(value: T) {\n this._value.set(value)\n if (this.onChange) {\n this.onChange(value)\n }\n\n if (this.onTouched) {\n this.onTouched()\n }\n }\n\n onBlurHandler() {\n if (this.onTouched) {\n this.onTouched()\n }\n this.componentBlur.emit()\n }\n\n setupFormControl() {\n if (this._statusChange$) {\n this._statusChange$.unsubscribe()\n this._statusChange$ = undefined\n }\n\n this._ngControl.set(this._injector().get(NgControl))\n this._statusChange$ = this._ngControl()\n ?.control?.statusChanges.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.checkFormErrors()\n })\n\n this._isTouched.set(this._ngControl()?.touched ?? false)\n this._isDisabled.set(this.isReadonly() || this._ngControl()?.disabled || false)\n this.checkFormErrors()\n }\n\n onChangeIsReadonly = this.isReadonly$.pipe(takeUntilDestroyed()).subscribe((isReadonly: boolean) => {\n this._isDisabled.set(isReadonly || this._ngControl()?.disabled || false)\n })\n\n setDisabledState(isDisabled: boolean) {\n this._isDisabled.set(isDisabled)\n }\n\n checkFormErrors() {\n const control = this._ngControl()?.control\n this._isValid.set(control?.valid ?? false)\n this._isTouched.set(!control?.pristine)\n\n const validationErrors = control?.errors\n\n this._isRequired.set(validationErrors?.[Validators.required.name])\n\n let errorName = ''\n let errorMessage = ''\n let errorData = true\n\n for (const [validationErrorName, validationErrorData] of Object.entries(validationErrors ?? {})) {\n const relatedErrorMessage = this._errorMessagesByKey().get(validationErrorName)\n if (relatedErrorMessage) {\n errorName = validationErrorName\n errorMessage = relatedErrorMessage\n errorData = validationErrorData\n }\n }\n\n this._currentErrorMessage.set(errorMessage)\n this._currentErrorMessageExtraData.set({ [errorName]: errorData })\n }\n\n ngAfterViewInit(): void {\n this.setupFormControl()\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NgClass, NgStyle } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n HostListener,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { QUANG_LOGGING_BEHAVIOR } from 'quang'\nimport { Subscription, fromEvent } from 'rxjs'\n\nexport interface SelectOption {\n label: string\n value: string | number | null\n}\n\nexport enum OptionListParentType {\n SELECT = 'select',\n AUTOCOMPLETE = 'autocomplete',\n}\n\n@Component({\n selector: 'quang-option-list',\n imports: [NgStyle, NgClass, TranslocoPipe],\n templateUrl: './option-list.component.html',\n styleUrl: './option-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QuangOptionListComponent {\n logLevel = inject(QUANG_LOGGING_BEHAVIOR, { optional: true })\n\n selectionMode = input<'single' | 'multiple'>('single')\n\n optionListMaxHeight = input<string>('201px')\n\n selectOptions = input<SelectOption[]>([])\n\n selectButtonRef = input.required<HTMLButtonElement | HTMLInputElement | HTMLDivElement>()\n\n _value = input<any>()\n\n _isDisabled = input<boolean>()\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentTabIndex = input<number>(0)\n\n translateValue = input<boolean>(false)\n\n nullOption = input<boolean>(true)\n\n elementWidth = signal<string>('0px')\n\n elementTop = signal<string>('0px')\n\n elementBottom = signal<string>('0px')\n\n scrollBehaviorOnOpen = input<ScrollBehavior>('smooth')\n\n changedHandler = output<any>()\n\n blurHandler = output<any>()\n\n /** Emitted when user presses Escape - parent should close dropdown and return focus to trigger */\n escapePressed = output<void>()\n\n /** Emitted when user presses Tab - parent should handle focus transition */\n tabPressed = output<{ shiftKey: boolean }>()\n\n optionListContainer = viewChild<ElementRef<HTMLDivElement>>('optionListContainer')\n\n destroyRef = inject(DestroyRef)\n\n parentType = input.required<OptionListParentType>()\n\n parentID = input<string>('')\n\n searchString = signal<string>('')\n\n searchResetTimer: ReturnType<typeof setTimeout> | null = null\n\n selectButtonRef$ = toObservable(this.selectButtonRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.getOptionListWidth()\n this.getOptionListTop()\n this.getScrollParent(this.selectButtonRef())?.addEventListener('scroll', () => {\n this.getOptionListWidth()\n this.getOptionListTop()\n })\n })\n\n selectOptionsList = computed(() => {\n if (this.nullOption() && this.selectionMode() === 'single') {\n return [\n {\n label: '',\n value: null,\n },\n ...this.selectOptions(),\n ]\n }\n return [...this.selectOptions()]\n })\n\n onKeyDown: Subscription | null = null\n\n selectedElementIndex = computed<number>(\n () => this.selectOptionsList()?.findIndex((x) => x?.value === this._value()) ?? 0\n )\n\n /** Signal to track currently focused item index for aria-activedescendant */\n focusedItemIndex = signal<number>(-1)\n\n /**\n * Returns the ID of the currently focused item for aria-activedescendant\n */\n getActiveDescendantId(): string | null {\n const index = this.focusedItemIndex()\n if (index >= 0 && index < this.selectOptionsList().length) {\n return `item-${index}`\n }\n return null\n }\n\n optionList$ = effect(() => {\n const optionListContainer = this.optionListContainer()\n const parentType = this.parentType()\n\n // Focus the option list container when opened (only for SELECT)\n if (optionListContainer && parentType === OptionListParentType.SELECT) {\n optionListContainer?.nativeElement.focus()\n }\n\n const ul = optionListContainer?.nativeElement?.children[0] as HTMLUListElement | undefined\n const listItems = (ul?.children ?? []) as HTMLLIElement[]\n let currentIndex = this.selectedElementIndex()\n listItems?.[currentIndex]?.classList.add('selected')\n // Initialize focusedItemIndex with current selection\n this.focusedItemIndex.set(currentIndex)\n\n // Scroll to selected item when option list opens\n const listItem = listItems[currentIndex]\n if (listItem) {\n setTimeout(() => {\n listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen(), block: 'nearest' })\n }, 0)\n }\n\n if (this.onKeyDown) {\n this.onKeyDown.unsubscribe()\n }\n\n this.onKeyDown = fromEvent(document, 'keydown', {\n capture: true,\n })\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => {\n switch ((event as KeyboardEvent).key) {\n case 'ArrowDown': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex === listItems.length - 1) {\n currentIndex = listItems.length - 1\n } else {\n currentIndex += 1\n }\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'ArrowUp': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex !== 0) currentIndex -= 1\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'Enter': {\n event.preventDefault()\n this.onSelectItem(this.selectOptionsList()[currentIndex])\n break\n }\n case 'Escape': {\n event.preventDefault()\n this.escapePressed.emit()\n break\n }\n case 'Tab': {\n // Only handle Tab when focus is on the option list itself\n // If focus is on the parent input, let the input's blur handler deal with it\n if (document.activeElement?.id === optionListContainer?.nativeElement?.id) {\n // Allow Tab to close dropdown and move focus naturally\n // Emit event so parent can handle focus transition\n this.tabPressed.emit({ shiftKey: (event as KeyboardEvent).shiftKey })\n }\n break\n }\n default: {\n if (\n ((event as KeyboardEvent)?.key?.length === 1 || (event as KeyboardEvent)?.key === 'Backspace') &&\n this.parentType() === OptionListParentType.AUTOCOMPLETE &&\n document.activeElement?.id === optionListContainer?.nativeElement?.id\n ) {\n currentIndex = 0\n document.getElementById(this.parentID())?.focus()\n document.getElementById(this.parentID())?.click()\n } else if (\n (event as KeyboardEvent)?.key?.length === 1 &&\n this.parentType() === OptionListParentType.SELECT\n ) {\n const key = (event as KeyboardEvent).key\n currentIndex = this.handleSearch(key, listItems, currentIndex)\n event.preventDefault()\n }\n break\n }\n }\n })\n })\n\n handleSearch(key: string, listItems: HTMLLIElement[], currentIndex: number): number {\n if (this.searchResetTimer) {\n clearTimeout(this.searchResetTimer)\n }\n\n this.searchString.update((current) => current + key)\n\n this.searchResetTimer = setTimeout(() => {\n this.searchString.set('')\n this.searchResetTimer = null\n }, 500)\n\n const searchStr = this.searchString().toLowerCase()\n const matchIndex = this.selectOptionsList().findIndex((option) => option.label.toLowerCase().includes(searchStr))\n\n if (matchIndex !== -1 && matchIndex !== currentIndex) {\n listItems[currentIndex]?.classList.remove('selected')\n listItems[matchIndex]?.classList.add('selected')\n listItems[matchIndex]?.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() })\n return matchIndex\n }\n\n return currentIndex\n }\n\n @HostListener('window:scroll') changePosition() {\n this.getOptionListWidth()\n this.getOptionListTop()\n }\n\n isScrollable(ele: Element): boolean {\n if (!ele) return false\n\n let result = false\n\n try {\n const hasScrollableContent = ele.scrollHeight > ele.clientHeight\n\n const overflowYStyle = window.getComputedStyle(ele).overflowY\n const isOverflowHidden = overflowYStyle.includes('hidden')\n\n result = hasScrollableContent && !isOverflowHidden\n } catch (_error) {\n if (this.logLevel === 'verbose') console.error('captured error isScrollable', _error)\n }\n\n return result\n }\n\n getScrollParent(node: unknown): Element {\n if (!node || node === document.body || !(node instanceof Element)) return document.body\n return this.isScrollable(node) ? node : this.getScrollParent(node.parentNode)\n }\n\n onSelectItem(item: SelectOption | null): void {\n if (this.selectionMode() === 'single') {\n this.changedHandler.emit(item?.value ?? null)\n } else {\n let targetValue = this._value()\n if (!Array.isArray(targetValue) && targetValue) {\n targetValue = [targetValue]\n }\n const values: string[] | number[] | null = targetValue as string[] | number[] | null\n if (values) {\n if (values.some((x) => x === item?.value)) {\n this.changedHandler.emit(values.filter((x) => x !== item?.value) as string[] | number[])\n } else if (item) {\n this.changedHandler.emit([...values, item.value] as string[] | number[])\n } else {\n this.changedHandler.emit([...values] as string[] | number[])\n }\n } else if (item?.value) {\n this.changedHandler.emit([item.value] as string[] | number[])\n } else {\n this.changedHandler.emit(null)\n }\n }\n this.getOptionListTop()\n }\n\n getSelected(item: SelectOption): boolean {\n if (this.selectionMode() === 'single' || !Array.isArray(this._value())) {\n return this._value() === item.value\n }\n return this._value()?.some((x: number | string | null) => x === item?.value)\n }\n\n onBlurHandler(e: Event): void {\n this.blurHandler.emit(e)\n }\n\n getOptionListWidth() {\n this.elementWidth.set(`${this.selectButtonRef()?.offsetWidth}px`)\n }\n\n getOptionListTop() {\n const nativeElement = this.optionListContainer()?.nativeElement\n const diff =\n window.innerHeight -\n (nativeElement?.getBoundingClientRect()?.height ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)\n let topValue = 'unset'\n let bottomValue = 'unset'\n const isTop = diff >= 0\n if (isTop) {\n topValue = `${(this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n } else {\n bottomValue = `${window.innerHeight - (this.selectButtonRef()?.getBoundingClientRect()?.bottom ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n }\n nativeElement?.classList.toggle('option-list-top', !isTop)\n this.elementTop.set(topValue)\n this.elementBottom.set(bottomValue)\n setTimeout(() => {\n this.getOptionListTop()\n })\n }\n}\n","<div\n [attr.aria-activedescendant]=\"getActiveDescendantId()\"\n [attr.aria-label]=\"componentLabel()\"\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n aria-orientation=\"vertical\"\n class=\"option-list\"\n id=\"optionList\"\n role=\"listbox\"\n tabindex=\"0\"\n>\n <ul role=\"presentation\">\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [attr.aria-selected]=\"getSelected(item)\"\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n role=\"option\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n aria-hidden=\"true\"\n class=\"form-check-input opacity-100\"\n tabindex=\"-1\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n {{ translateValue() ? (item.label | transloco) : item.label }}\n </label>\n </li>\n }\n </ul>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAO,MAAM,MAAM,GAAG,CAAC,MAAc,KAAI;IACvC,IAAI,MAAM,GAAG,EAAE;IACf,MAAM,UAAU,GAAG,gEAAgE;AACnF,IAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM;AAC1C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/B,QAAA,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC;IAC3E;AACA,IAAA,OAAO,MAAM;AACf;;MCEsB,kBAAkB,CAAA;AA4EtC,IAAA,WAAA,GAAA;QA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A,MAAA,EAAA,CAAA,CAAA;;4FAK9B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;+BACE,mBAAmB,EAAA,OAAA,EACpB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,q6DAAA,EAAA,MAAA,EAAA,CAAA,uiCAAA,CAAA,EAAA;glDA6Ca,qBAAqB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA;sBA4LhF,YAAY;uBAAC,eAAe;;;AE9Q/B;;AAEG;;;;"}
@@ -222,10 +222,10 @@ class QuangTableComponent {
222
222
  return undefined;
223
223
  return JSON.stringify(value);
224
224
  }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
226
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: QuangTableComponent, isStandalone: true, selector: "quang-table", inputs: { clickableRow: { classPropertyName: "clickableRow", publicName: "clickableRow", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, stickyTable: { classPropertyName: "stickyTable", publicName: "stickyTable", isSignal: true, isRequired: false, transformFunction: null }, sortType: { classPropertyName: "sortType", publicName: "sortType", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, tableConfigurations: { classPropertyName: "tableConfigurations", publicName: "tableConfigurations", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedRow: "selectedRow", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "_tableHeader", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "_tableHeaderElement", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "tdWithProperties", predicate: ["tdCell"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_fakeTableHeader", first: true, predicate: ["fakeTableHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track (row.rowId?.toString() ?? '') + $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track (cell.text ?? '') + $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
225
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
226
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: QuangTableComponent, isStandalone: true, selector: "quang-table", inputs: { clickableRow: { classPropertyName: "clickableRow", publicName: "clickableRow", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, stickyTable: { classPropertyName: "stickyTable", publicName: "stickyTable", isSignal: true, isRequired: false, transformFunction: null }, sortType: { classPropertyName: "sortType", publicName: "sortType", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, tableConfigurations: { classPropertyName: "tableConfigurations", publicName: "tableConfigurations", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedRow: "selectedRow", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "_tableHeader", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "_tableHeaderElement", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "tdWithProperties", predicate: ["tdCell"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_fakeTableHeader", first: true, predicate: ["fakeTableHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track (row.rowId?.toString() ?? '') + $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track (cell.text ?? '') + $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
227
227
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangTableComponent, decorators: [{
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangTableComponent, decorators: [{
229
229
  type: Component,
230
230
  args: [{ selector: 'quang-table', imports: [TranslocoPipe, NgClass, NgTemplateOutlet, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track (header.text ?? '') + $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track (row.rowId?.toString() ?? '') + $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track (cell.text ?? '') + $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"] }]
231
231
  }], propDecorators: { clickableRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickableRow", required: false }] }], selectedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedRows", required: false }] }], stickyTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyTable", required: false }] }], sortType: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortType", required: false }] }], selectedRow: [{ type: i0.Output, args: ["selectedRow"] }], sortChanged: [{ type: i0.Output, args: ["sortChanged"] }], _tableHeader: [{ type: i0.ViewChild, args: ['tableHeader', { isSignal: true }] }], _tableHeaderElement: [{ type: i0.ViewChild, args: ['tableHeader', { isSignal: true }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], tdWithProperties: [{ type: i0.ViewChildren, args: ['tdCell', { ...{ read: ElementRef }, isSignal: true }] }], _fakeTableHeader: [{ type: i0.ViewChild, args: ['fakeTableHeader', { isSignal: true }] }], tableConfigurations: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableConfigurations", required: true }] }] } });
@@ -202,8 +202,8 @@ class QuangWysiwygComponent extends QuangBaseComponent {
202
202
  }
203
203
  return buttonList;
204
204
  }
205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangWysiwygComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: QuangWysiwygComponent, isStandalone: true, selector: "quang-wysiwyg", inputs: { minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, font: { classPropertyName: "font", publicName: "font", isSignal: true, isRequired: false, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, formatBlock: { classPropertyName: "formatBlock", publicName: "formatBlock", isSignal: true, isRequired: false, transformFunction: null }, paragraphStyle: { classPropertyName: "paragraphStyle", publicName: "paragraphStyle", isSignal: true, isRequired: false, transformFunction: null }, blockquote: { classPropertyName: "blockquote", publicName: "blockquote", isSignal: true, isRequired: false, transformFunction: null }, bold: { classPropertyName: "bold", publicName: "bold", isSignal: true, isRequired: false, transformFunction: null }, underline: { classPropertyName: "underline", publicName: "underline", isSignal: true, isRequired: false, transformFunction: null }, italic: { classPropertyName: "italic", publicName: "italic", isSignal: true, isRequired: false, transformFunction: null }, strike: { classPropertyName: "strike", publicName: "strike", isSignal: true, isRequired: false, transformFunction: null }, fontColor: { classPropertyName: "fontColor", publicName: "fontColor", isSignal: true, isRequired: false, transformFunction: null }, highlightColor: { classPropertyName: "highlightColor", publicName: "highlightColor", isSignal: true, isRequired: false, transformFunction: null }, textStyle: { classPropertyName: "textStyle", publicName: "textStyle", isSignal: true, isRequired: false, transformFunction: null }, removeFormat: { classPropertyName: "removeFormat", publicName: "removeFormat", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null }, table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, showBlocks: { classPropertyName: "showBlocks", publicName: "showBlocks", isSignal: true, isRequired: false, transformFunction: null }, onImageUploadError: { classPropertyName: "onImageUploadError", publicName: "onImageUploadError", isSignal: true, isRequired: false, transformFunction: null }, onFileDrop: { classPropertyName: "onFileDrop", publicName: "onFileDrop", isSignal: true, isRequired: false, transformFunction: null }, wysiwygOptions: { classPropertyName: "wysiwygOptions", publicName: "wysiwygOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangWysiwygComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
206
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: QuangWysiwygComponent, isStandalone: true, selector: "quang-wysiwyg", inputs: { minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, font: { classPropertyName: "font", publicName: "font", isSignal: true, isRequired: false, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, formatBlock: { classPropertyName: "formatBlock", publicName: "formatBlock", isSignal: true, isRequired: false, transformFunction: null }, paragraphStyle: { classPropertyName: "paragraphStyle", publicName: "paragraphStyle", isSignal: true, isRequired: false, transformFunction: null }, blockquote: { classPropertyName: "blockquote", publicName: "blockquote", isSignal: true, isRequired: false, transformFunction: null }, bold: { classPropertyName: "bold", publicName: "bold", isSignal: true, isRequired: false, transformFunction: null }, underline: { classPropertyName: "underline", publicName: "underline", isSignal: true, isRequired: false, transformFunction: null }, italic: { classPropertyName: "italic", publicName: "italic", isSignal: true, isRequired: false, transformFunction: null }, strike: { classPropertyName: "strike", publicName: "strike", isSignal: true, isRequired: false, transformFunction: null }, fontColor: { classPropertyName: "fontColor", publicName: "fontColor", isSignal: true, isRequired: false, transformFunction: null }, highlightColor: { classPropertyName: "highlightColor", publicName: "highlightColor", isSignal: true, isRequired: false, transformFunction: null }, textStyle: { classPropertyName: "textStyle", publicName: "textStyle", isSignal: true, isRequired: false, transformFunction: null }, removeFormat: { classPropertyName: "removeFormat", publicName: "removeFormat", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null }, table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, showBlocks: { classPropertyName: "showBlocks", publicName: "showBlocks", isSignal: true, isRequired: false, transformFunction: null }, onImageUploadError: { classPropertyName: "onImageUploadError", publicName: "onImageUploadError", isSignal: true, isRequired: false, transformFunction: null }, onFileDrop: { classPropertyName: "onFileDrop", publicName: "onFileDrop", isSignal: true, isRequired: false, transformFunction: null }, wysiwygOptions: { classPropertyName: "wysiwygOptions", publicName: "wysiwygOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
207
207
  {
208
208
  provide: NG_VALUE_ACCESSOR,
209
209
  useExisting: forwardRef(() => QuangWysiwygComponent),
@@ -211,7 +211,7 @@ class QuangWysiwygComponent extends QuangBaseComponent {
211
211
  },
212
212
  ], viewQueries: [{ propertyName: "_inputForWysiwyg", first: true, predicate: ["inputForWysiwyg"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label d-flex gap-2\"\n >\n <div>\n <span>{{ componentLabel() | transloco }}</span>\n <span [hidden]=\"!_isRequired()\">*</span>\n </div>\n @if (helpMessage() && helpMessageTooltip()) {\n <div [quangTooltip]=\"helpMessage() | transloco\">\n <ng-content select=\"[help-icon]\" />\n </div>\n }\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-wysiwyg-container is-invalid\"\n >\n <textarea\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"_value()\"\n #inputForWysiwyg\n class=\"form-control\"\n ></textarea>\n </div>\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage() && !helpMessageTooltip()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n</div>\n", styles: [":host{display:block}::ng-deep .se-toolbar{color:var(--bs-body-color)!important;background-color:var(--bs-body-bg)!important;z-index:unset!important}::ng-deep .se-wrapper-inner{color:var(--bs-body-color)!important;background-color:var(--bs-body-bg)!important}::ng-deep .se-btn{color:var(--bs-body-color)!important}::ng-deep .se-btn:enabled.active{color:var(--bs-primary)!important}::ng-deep .se-btn:hover{background-color:var(--bs-secondary-bg)!important}::ng-deep .se-resizing-bar{color:var(--bs-body-color)!important;background-color:var(--bs-body-bg)!important}::ng-deep .se-navigation{color:var(--bs-body-color)!important;background-color:var(--bs-body-bg)!important}::ng-deep .sun-editor input{display:none}::ng-deep .sun-editor .se-container{border-radius:var(--bs-border-radius)}::ng-deep .se-wrapper{z-index:unset!important}::ng-deep .se-wrapper textarea:disabled+.se-wrapper-wysiwyg{background-color:var(--bs-secondary-bg)}::ng-deep .se-wrapper .se-wrapper-inner{border-top:1px solid var(--bs-border-color)}::ng-deep .is-invalid .sun-editor .se-container .se-toolbar{border-bottom:1px solid var(--bs-danger)}::ng-deep .is-invalid .sun-editor .se-container .se-wrapper .se-wrapper-inner{--bs-form-bg-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");border:1px solid var(--bs-danger);padding-right:3rem;background-position:right .75rem center,center right 2.25rem;background-size:1.5rem,calc(.75em + .375rem) calc(.75em + .375rem);background-image:var(--bs-form-bg-icon);background-repeat:no-repeat}::ng-deep .is-valid .sun-editor .se-container .se-toolbar{border-bottom:1px solid var(--bs-success)}::ng-deep .is-valid .sun-editor .se-container .se-wrapper .se-wrapper-inner{--bs-form-bg-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");border:1px solid var(--bs-success);padding-right:3rem;background-position:right .75rem center,center right 2.25rem;background-size:1.5rem,calc(.75em + .375rem) calc(.75em + .375rem);background-image:var(--bs-form-bg-icon);background-repeat:no-repeat}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: QuangTooltipDirective, selector: "[quangTooltip]", inputs: ["quangTooltip", "showMethod"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
213
213
  }
214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: QuangWysiwygComponent, decorators: [{
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: QuangWysiwygComponent, decorators: [{
215
215
  type: Component,
216
216
  args: [{ selector: 'quang-wysiwyg', providers: [
217
217
  {
@@ -24,10 +24,10 @@ class ResizeObservableService {
24
24
  widthResizeObservable(elem) {
25
25
  return this.resizeObservable(elem).pipe(map((entry) => entry.borderBoxSize[0].inlineSize), filter(Boolean));
26
26
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ResizeObservableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
28
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ResizeObservableService, providedIn: 'root' }); }
27
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ResizeObservableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
28
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ResizeObservableService, providedIn: 'root' }); }
29
29
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ResizeObservableService, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ResizeObservableService, decorators: [{
31
31
  type: Injectable,
32
32
  args: [{
33
33
  providedIn: 'root',